Debian Codegraph @

gtk/shell_skin.h

raw
1 ///////////////////////////////////////////////////////////////////////////////
2 // Free42 -- an HP-42S calculator simulator
3 // Copyright (C) 2004-2026 Thomas Okken
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License, version 2,
7 // as published by the Free Software Foundation.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, see http://www.gnu.org/licenses/.
16 ///////////////////////////////////////////////////////////////////////////////
17
18 #ifndef SHELL_SKIN_H
19 #define SHELL_SKIN_H 1
20
21 #include <gtk/gtk.h>
22
23 void skin_menu_update(GtkWidget *w);
24 void skin_load(int *width, int *height);
25
26 struct SkinColor {
27 unsigned char r, g, b, pad;
28 };
29
30 #define IMGTYPE_MONO 1
31 #define IMGTYPE_GRAY 2
32 #define IMGTYPE_COLORMAPPED 3
33 #define IMGTYPE_TRUECOLOR 4
34
35 int skin_getchar();
36 void skin_rewind();
37 bool skin_init_image(int type, int ncolors, const SkinColor *colors,
38 int width, int height);
39 void skin_put_pixels(unsigned const char *data);
40 void skin_finish_image();
41
42 void skin_repaint(cairo_t *cr);
43 void skin_repaint_annunciator(cairo_t *cr, int which);
44 void skin_draw_keyboard_shortcuts(cairo_t *cr);
45 void skin_make_darker(cairo_t *cr);
46 void skin_invalidate_annunciator(GdkWindow *win, int which);
47 void skin_find_key(int x, int y, bool cshift, int *key, int *code);
48 int skin_find_skey(int ckey, bool cshift);
49 unsigned char *skin_find_macro(int ckey, int *type);
50 unsigned char *skin_keymap_lookup(guint keyval, bool printable,
51 bool ctrl, bool alt, bool shift, bool cshift,
52 bool *exact);
53 void skin_repaint_key(cairo_t *cr, int key, bool state);
54 void skin_invalidate_key(GdkWindow *win, int key);
55 void skin_display_invalidater(GdkWindow *win, const char *bits, int bytesperline,
56 int x, int y, int width, int height);
57 bool need_to_paint_only_display(cairo_t *cr);
58 void skin_repaint_display(cairo_t *cr);
59 void skin_get_size(int *width, int *height);
60 void skin_set_window_size(int width, int height);
61 void skin_get_window_size(int *width, int *height);
62
63 #endif