Search
lxdream.org :: lxdream/src/drivers/video_gtk.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gtk.c
changeset 770:429ff505c450
prev736:a02d1475ccfd
next771:749f0f4575d2
author nkeynes
date Mon Jul 28 03:41:25 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Implement key-binding configuration pane for Cocoa UI
Minor tweaks for consistency and static-correctness
file annotate diff log raw
1.1 --- a/src/drivers/video_gtk.c Mon Jul 14 07:44:42 2008 +0000
1.2 +++ b/src/drivers/video_gtk.c Mon Jul 28 03:41:25 2008 +0000
1.3 @@ -123,8 +123,9 @@
1.4 gboolean video_gtk_init();
1.5 void video_gtk_shutdown();
1.6 void video_gtk_display_blank( uint32_t colour );
1.7 -uint16_t video_gtk_resolve_keysym( const gchar *keysym );
1.8 -uint16_t video_gtk_keycode_to_dckeysym(uint16_t keycode);
1.9 +static uint16_t video_gtk_resolve_keysym( const gchar *keysym );
1.10 +static uint16_t video_gtk_keycode_to_dckeysym(uint16_t keycode);
1.11 +static gchar *video_gtk_get_keysym_for_keycode(uint16_t keycode);
1.12
1.13 struct display_driver display_gtk_driver = {
1.14 "gtk",
1.15 @@ -133,18 +134,10 @@
1.16 video_gtk_shutdown,
1.17 video_gtk_resolve_keysym,
1.18 video_gtk_keycode_to_dckeysym,
1.19 - NULL,
1.20 + video_gtk_keycode_to_keysym,
1.21 NULL, NULL, NULL, NULL, NULL,
1.22 video_gtk_display_blank, NULL };
1.23
1.24 -uint16_t video_gtk_resolve_keysym( const gchar *keysym )
1.25 -{
1.26 - int val = gdk_keyval_from_name( keysym );
1.27 - if( val == GDK_VoidSymbol )
1.28 - return 0;
1.29 - return (uint16_t)val;
1.30 -}
1.31 -
1.32 gboolean video_gtk_expose_callback(GtkWidget *widget, GdkEventExpose *event, gpointer data )
1.33 {
1.34 pvr2_redraw_display();
1.35 @@ -159,7 +152,20 @@
1.36 return TRUE;
1.37 }
1.38
1.39 -uint16_t video_gtk_keycode_to_dckeysym(uint16_t keycode)
1.40 +static uint16_t video_gtk_resolve_keysym( const gchar *keysym )
1.41 +{
1.42 + int val = gdk_keyval_from_name( keysym );
1.43 + if( val == GDK_VoidSymbol )
1.44 + return 0;
1.45 + return (uint16_t)val;
1.46 +}
1.47 +
1.48 +static gchar *video_gtk_get_keycode_to_keysym( uint16_t keycode )
1.49 +{
1.50 + return g_strdup(gdk_keyval_name(keycode));
1.51 +}
1.52 +
1.53 +static uint16_t video_gtk_keycode_to_dckeysym(uint16_t keycode)
1.54 {
1.55 if( keycode >= 'a' && keycode <= 'z' ) {
1.56 return (keycode - 'a') + DCKB_a;
.