--- tme/host/gtk/gtk-display.h 2018/04/24 16:39:15 1.1 +++ tme/host/gtk/gtk-display.h 2018/04/24 16:42:26 1.1.1.3 @@ -1,4 +1,4 @@ -/* $Id: gtk-display.h,v 1.1 2018/04/24 16:39:15 root Exp $ */ +/* $Id: gtk-display.h,v 1.1.1.3 2018/04/24 16:42:26 root Exp $ */ /* host/gtk/gtk-display.h - header file for GTK display support: */ @@ -37,7 +37,7 @@ #define _HOST_GTK_GTK_DISPLAY_H #include -_TME_RCSID("$Id: gtk-display.h,v 1.1 2018/04/24 16:39:15 root Exp $"); +_TME_RCSID("$Id: gtk-display.h,v 1.1.1.3 2018/04/24 16:42:26 root Exp $"); /* includes: */ #include @@ -45,6 +45,9 @@ _TME_RCSID("$Id: gtk-display.h,v 1.1 201 #include #include #include +#ifndef G_ENABLE_DEBUG +#define G_ENABLE_DEBUG (0) +#endif /* !G_ENABLE_DEBUG */ #include /* macros: */ @@ -77,6 +80,9 @@ struct tme_gtk_screen { given scaling yet: */ int tme_gtk_screen_fb_scale; + /* any colorset signature: */ + tme_uint32_t tme_gtk_screen_colorset; + /* the top-level window: */ GtkWidget *tme_gtk_screen_window; @@ -87,10 +93,6 @@ struct tme_gtk_screen { GtkWidget *tme_gtk_screen_scale_default; GtkWidget *tme_gtk_screen_scale_half; - /* when connected to a monochrome framebuffer, this is all-bits-one - iff a zero pixel should be drawn as white: */ - gushort tme_gtk_screen_mono_invert_mask; - /* the GtkEventBox, GdkImage and GtkImage for the framebuffer: */ GtkWidget *tme_gtk_screen_event_box; GdkImage *tme_gtk_screen_gdkimage; @@ -117,8 +119,8 @@ struct tme_gtk_screen { GdkEventMask tme_gtk_screen_mouse_events_old; /* when mouse mode is on, this is the warp center: */ - guint tme_gtk_screen_mouse_warp_x; - guint tme_gtk_screen_mouse_warp_y; + gint tme_gtk_screen_mouse_warp_x; + gint tme_gtk_screen_mouse_warp_y; /* when mouse mode is on, the last tme buttons state: */ unsigned int tme_gtk_screen_mouse_buttons_last; @@ -163,6 +165,9 @@ struct tme_gtk_display { /* our keysym to keycode hash: */ tme_hash_t tme_gtk_display_keyboard_keysym_to_keycode; + /* the next keysym to allocate for an unknown keysym string: */ + guint tme_gtk_display_keyboard_keysym_alloc_next; + /* our mouse connection: */ struct tme_mouse_connection *tme_gtk_display_mouse_connection; @@ -182,6 +187,22 @@ struct tme_gtk_display { GtkTooltips *tme_gtk_display_tooltips; }; +/* a menu item: */ +struct tme_gtk_display_menu_item { + + /* which menu item this is: */ + unsigned int tme_gtk_display_menu_item_which; + + /* where to save the menu item widget: */ + GtkWidget **tme_gtk_display_menu_item_widget; + + /* the string for the menu item label: */ + const char *tme_gtk_display_menu_item_string; +}; + +/* this generates menu items: */ +typedef GtkSignalFunc (*tme_gtk_display_menu_items_t) _TME_P((void *, struct tme_gtk_display_menu_item *)); + /* prototypes: */ struct tme_gtk_screen *_tme_gtk_screen_new _TME_P((struct tme_gtk_display *)); int _tme_gtk_screen_connections_new _TME_P((struct tme_gtk_display *, @@ -199,6 +220,7 @@ void _tme_gtk_screen_th_update _TME_P((s void _tme_gtk_display_callout _TME_P((struct tme_gtk_display *, int)); gint _tme_gtk_display_enter_focus _TME_P((GtkWidget *, GdkEvent *, gpointer)); +GtkWidget *_tme_gtk_display_menu_radio _TME_P((void *, tme_gtk_display_menu_items_t)); #endif /* _HOST_GTK_GTK_DISPLAY_H */