]> Git Repo - qemu.git/blob - include/ui/gtk.h
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-05-09' into...
[qemu.git] / include / ui / gtk.h
1 #ifndef UI_GTK_H
2 #define UI_GTK_H
3
4 #ifdef _WIN32
5 # define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC */
6 #endif
7
8 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
9 /* Work around an -Wstrict-prototypes warning in GTK headers */
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
12 #endif
13 #include <gtk/gtk.h>
14 #ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE
15 #pragma GCC diagnostic pop
16 #endif
17
18 #include <gdk/gdkkeysyms.h>
19
20 #ifdef GDK_WINDOWING_X11
21 #include <gdk/gdkx.h>
22 #include <X11/XKBlib.h>
23 #endif
24
25 /* Compatibility define to let us build on both Gtk2 and Gtk3 */
26 #if GTK_CHECK_VERSION(3, 0, 0)
27 static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
28 {
29     *ww = gdk_window_get_width(w);
30     *wh = gdk_window_get_height(w);
31 }
32 #endif
33
34 typedef struct GtkDisplayState GtkDisplayState;
35
36 typedef struct VirtualGfxConsole {
37     GtkWidget *drawing_area;
38     DisplayChangeListener dcl;
39     DisplaySurface *ds;
40     pixman_image_t *convert;
41     cairo_surface_t *surface;
42     double scale_x;
43     double scale_y;
44 } VirtualGfxConsole;
45
46 #if defined(CONFIG_VTE)
47 typedef struct VirtualVteConsole {
48     GtkWidget *box;
49     GtkWidget *scrollbar;
50     GtkWidget *terminal;
51     CharDriverState *chr;
52 } VirtualVteConsole;
53 #endif
54
55 typedef enum VirtualConsoleType {
56     GD_VC_GFX,
57     GD_VC_VTE,
58 } VirtualConsoleType;
59
60 typedef struct VirtualConsole {
61     GtkDisplayState *s;
62     char *label;
63     GtkWidget *window;
64     GtkWidget *menu_item;
65     GtkWidget *tab_item;
66     GtkWidget *focus;
67     VirtualConsoleType type;
68     union {
69         VirtualGfxConsole gfx;
70 #if defined(CONFIG_VTE)
71         VirtualVteConsole vte;
72 #endif
73     };
74 } VirtualConsole;
75
76 #endif /* UI_GTK_H */
This page took 0.02797 seconds and 4 git commands to generate.