[gtk-vnc] Add compatability code for GDK symbolic keys
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Add compatability code for GDK symbolic keys
- Date: Thu, 28 Oct 2010 15:41:19 +0000 (UTC)
commit a9538a9315ebb1c67a2581be5f5d44e73c8c1549
Author: Daniel P. Berrange <berrange redhat com>
Date: Wed Oct 27 22:03:25 2010 +0100
Add compatability code for GDK symbolic keys
The GDK key macros were changed from GDK_ to GDK_KEY_ in GTK3.
Add some compatibility #ifdefs to allow the same macros to be
used on both Gtk2 and Gtk3.
* examples/gvncviewer.c: Add GDK_KEY compat
* src/vncdisplaykeymap.c: Add GDK_KEY compat
examples/gvncviewer.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/vncdisplaykeymap.c | 6 ++++++
2 files changed, 53 insertions(+), 0 deletions(-)
---
diff --git a/examples/gvncviewer.c b/examples/gvncviewer.c
index ffe7e5b..84f36e0 100644
--- a/examples/gvncviewer.c
+++ b/examples/gvncviewer.c
@@ -32,6 +32,53 @@
#include <libview/autoDrawer.h>
#endif
+#ifndef GDK_Return
+#define GDK_Return GDK_KEY_Return
+#endif
+#ifndef GDK_Escape
+#define GDK_Escape GDK_KEY_Escape
+#endif
+#ifndef GDK_BackSpace
+#define GDK_BackSpace GDK_KEY_BackSpace
+#endif
+#ifndef GDK_Delete
+#define GDK_Delete GDK_KEY_Delete
+#endif
+#ifndef GDK_Control_L
+#define GDK_Control_L GDK_KEY_Control_L
+#endif
+#ifndef GDK_Alt_L
+#define GDK_Alt_L GDK_KEY_Alt_L
+#endif
+#ifndef GDK_F1
+#define GDK_F1 GDK_KEY_F1
+#endif
+#ifndef GDK_F2
+#define GDK_F2 GDK_KEY_F2
+#endif
+#ifndef GDK_F3
+#define GDK_F3 GDK_KEY_F3
+#endif
+#ifndef GDK_F4
+#define GDK_F4 GDK_KEY_F4
+#endif
+#ifndef GDK_F5
+#define GDK_F5 GDK_KEY_F5
+#endif
+#ifndef GDK_F6
+#define GDK_F6 GDK_KEY_F6
+#endif
+#ifndef GDK_F7
+#define GDK_F7 GDK_KEY_F7
+#endif
+#ifndef GDK_F8
+#define GDK_F8 GDK_KEY_F8
+#endif
+#ifndef GDK_F11
+#define GDK_F11 GDK_KEY_F11
+#endif
+
+
static gchar **args = NULL;
static const GOptionEntry options [] =
{
diff --git a/src/vncdisplaykeymap.c b/src/vncdisplaykeymap.c
index c1e9af1..748c3e6 100644
--- a/src/vncdisplaykeymap.c
+++ b/src/vncdisplaykeymap.c
@@ -37,6 +37,12 @@
* THE SOFTWARE.
*/
+
+/* Compatability code to allow build on Gtk2 and Gtk3 */
+#ifndef GDK_Tab
+#define GDK_Tab GDK_KEY_Tab
+#endif
+
/* keycode translation for sending ISO_Left_Send
* to vncserver
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]