Search
lxdream.org :: lxdream/src/drivers/video_osx.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_osx.c
changeset 770:429ff505c450
prev736:a02d1475ccfd
next780:4e4ea322cb84
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_osx.c Mon Jul 14 07:44:42 2008 +0000
1.2 +++ b/src/drivers/video_osx.c Mon Jul 28 03:41:25 2008 +0000
1.3 @@ -35,6 +35,7 @@
1.4 static void video_osx_display_blank( uint32_t colour );
1.5 static uint16_t video_osx_resolve_keysym( const gchar *keysym );
1.6 static uint16_t video_osx_keycode_to_dckeysym(uint16_t keycode);
1.7 +static gchar *video_osx_keycode_to_keysym(uint16_t keycode);
1.8
1.9 struct display_driver display_osx_driver = {
1.10 "osx",
1.11 @@ -42,7 +43,7 @@
1.12 video_osx_init, video_osx_shutdown,
1.13 video_osx_resolve_keysym,
1.14 video_osx_keycode_to_dckeysym,
1.15 - NULL,
1.16 + video_osx_keycode_to_keysym,
1.17 NULL, NULL, NULL, NULL, NULL,
1.18 video_osx_display_blank, NULL };
1.19
1.20 @@ -250,3 +251,11 @@
1.21 }
1.22 }
1.23
1.24 +static gchar *video_osx_keycode_to_keysym(uint16_t keycode)
1.25 +{
1.26 + if( keycode < 1 || keycode > 128 ) {
1.27 + return NULL;
1.28 + } else {
1.29 + return g_strdup(mac_keysyms_by_keycode[keycode-1]);
1.30 + }
1.31 +}
1.32 \ No newline at end of file
.