gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash gui/fltk.cpp gui/gtk.cpp gui/gui.cpp serv...


From: Dossy Shiobara
Subject: [Gnash-commit] gnash gui/fltk.cpp gui/gtk.cpp gui/gui.cpp serv...
Date: Sat, 22 Mar 2008 02:27:24 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Dossy Shiobara <dossy>  08/03/22 02:27:24

Modified files:
        gui            : fltk.cpp gtk.cpp gui.cpp 
        server         : gnash.h 

Log message:
        Fix some macro redefinition issues when compiling with GCC 3.x,
        which does not have strongly typed enums.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fltk.cpp?cvsroot=gnash&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.158&r2=1.159
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.142&r2=1.143
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.118&r2=1.119

Patches:
Index: gui/fltk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/fltk.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- gui/fltk.cpp        21 Jan 2008 20:55:40 -0000      1.17
+++ gui/fltk.cpp        22 Mar 2008 02:27:23 -0000      1.18
@@ -171,18 +171,18 @@
 #endif
     };
 
-    int modifier = gnash::key::MOD_NONE;
+    int modifier = gnash::key::GNASH_MOD_NONE;
 
     unsigned long state = event_state();
 
     if (state & SHIFT) { 
-        modifier = modifier | gnash::key::MOD_SHIFT;
+        modifier = modifier | gnash::key::GNASH_MOD_SHIFT;
     }
     if (state & CTRL) {
-        modifier = modifier | gnash::key::MOD_CONTROL;
+        modifier = modifier | gnash::key::GNASH_MOD_CONTROL;
     }
     if (state & ALT) {
-        modifier = modifier | gnash::key::MOD_ALT;
+        modifier = modifier | gnash::key::GNASH_MOD_ALT;
     }
 
     for (int i = 0; table[i].fltkKey; i++) {

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -b -r1.158 -r1.159
--- gui/gtk.cpp 17 Mar 2008 18:38:11 -0000      1.158
+++ gui/gtk.cpp 22 Mar 2008 02:27:23 -0000      1.159
@@ -37,7 +37,11 @@
 #include <X11/keysym.h>
 
 #include <gtk/gtk.h>
+#ifndef _WIN32
 #include <gdk/gdkx.h>
+#else
+#include <gdk/gdk.h>
+#endif
 #include <gdk/gdkkeysyms.h>
 #include <string>
 
@@ -2124,16 +2128,16 @@
 int
 GtkGui::gdk_to_gnash_modifier(int state)
 {
-    int modifier = gnash::key::MOD_NONE;
+    int modifier = gnash::key::GNASH_MOD_NONE;
 
     if (state & GDK_SHIFT_MASK) {
-      modifier = modifier | gnash::key::MOD_SHIFT;
+      modifier = modifier | gnash::key::GNASH_MOD_SHIFT;
     }
     if (state & GDK_CONTROL_MASK) {
-      modifier = modifier | gnash::key::MOD_CONTROL;
+      modifier = modifier | gnash::key::GNASH_MOD_CONTROL;
     }
     if (state & GDK_MOD1_MASK) {
-      modifier = modifier | gnash::key::MOD_ALT;
+      modifier = modifier | gnash::key::GNASH_MOD_ALT;
     }
 
     return modifier;

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -b -r1.142 -r1.143
--- gui/gui.cpp 14 Mar 2008 13:38:08 -0000      1.142
+++ gui/gui.cpp 22 Mar 2008 02:27:23 -0000      1.143
@@ -453,7 +453,7 @@
                        }
                }
                
-               if (modifier & gnash::key::MOD_CONTROL)
+               if (modifier & gnash::key::GNASH_MOD_CONTROL)
                {
                        switch(k)
                        {
@@ -493,7 +493,7 @@
                        if ( _keyboardMouseMovements )
                        {
                                int step = _keyboardMouseMovementsStep; 
-                               if (modifier & gnash::key::MOD_SHIFT) step*=5; 
// x5 if SHIFT is pressed
+                               if (modifier & gnash::key::GNASH_MOD_SHIFT) 
step*=5; // x5 if SHIFT is pressed
                                switch(k)
                                {
                                        case gnash::key::UP:

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- server/gnash.h      10 Mar 2008 10:32:10 -0000      1.118
+++ server/gnash.h      22 Mar 2008 02:27:23 -0000      1.119
@@ -362,12 +362,16 @@
 
 enum modifier
 {
-    MOD_NONE = 0,
-    MOD_SHIFT = 1,
-    MOD_CONTROL = 2,
-    MOD_ALT = 4
+    GNASH_MOD_NONE = 0,
+    GNASH_MOD_SHIFT = 1,
+    GNASH_MOD_CONTROL = 2,
+    GNASH_MOD_ALT = 4
 };
 
+#ifdef _WIN32
+#undef REGISTERED // conflicts with /mingw/include/nb30.h
+#endif
+
 // Gnash character codes. Each code represents a single character on the 
keyboard.
 // The first 128 code are ordered by their correspond ASCII value.
 enum code




reply via email to

[Prev in Thread] Current Thread [Next in Thread]