gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/src jni/Main.cxx os/Os-GLX.cxx


From: Matti Katila
Subject: [Gzz-commits] libvob/src jni/Main.cxx os/Os-GLX.cxx
Date: Thu, 31 Jul 2003 10:05:17 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Matti Katila <address@hidden>   03/07/31 10:05:17

Modified files:
        src/jni        : Main.cxx 
        src/os         : Os-GLX.cxx 

Log message:
        just wondering about the code. I didn't understood the jni part of 
calling mouse so bbl..

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Main.cxx.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/os/Os-GLX.cxx.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: libvob/src/jni/Main.cxx
diff -u libvob/src/jni/Main.cxx:1.19 libvob/src/jni/Main.cxx:1.20
--- libvob/src/jni/Main.cxx:1.19        Tue Jul 22 08:01:50 2003
+++ libvob/src/jni/Main.cxx     Thu Jul 31 10:05:17 2003
@@ -219,7 +219,6 @@
     }
 
     virtual void mouse(int x, int y, int button, int type) {
-
         jnienv_eventloop->CallVoidMethod(globalRef, mid_mousepress, x, y, 
button, type);
        javaExc(jnienv_eventloop, "mouse");
     }
Index: libvob/src/os/Os-GLX.cxx
diff -u libvob/src/os/Os-GLX.cxx:1.7 libvob/src/os/Os-GLX.cxx:1.8
--- libvob/src/os/Os-GLX.cxx:1.7        Tue Jul 22 08:01:51 2003
+++ libvob/src/os/Os-GLX.cxx    Thu Jul 31 10:05:17 2003
@@ -61,6 +61,7 @@
 namespace Os {
 
     DBGVAR(dbg, "Os");
+    DBGVAR(dbg_ctrl, "Os.controlEvents");
 
     using std::cerr;
     using std::cout;
@@ -568,9 +569,9 @@
        }
 
        void deliverEvent(XEvent *e) {
-           DBG(dbg) << "event "<<xw<<" "<<e->type<<"\n";
+           DBG(dbg_ctrl) << "event "<<xw<<" "<<e->type<<"\n";
            if(!eventhandler) {
-               DBG(dbg) << "No event handler for window\n";
+               DBG(dbg_ctrl) << "No event handler for window\n";
                return;
            }
            switch(e->type) {
@@ -585,7 +586,7 @@
                        cout << "Null keystroke\n";
                        return;
                    }
-                   if(dbg) {
+                   if(dbg_ctrl) {
                        for(const char *c = str; *c != 0; c++) {
                            cout << (int)*c << " ";
                        }
@@ -597,14 +598,20 @@
                    sprintf(buf2, "Ctrl-%s", str);
                    str = buf2;
                }
-               DBG(dbg) << "Sending keystroke '"<<str<<"'\n";
+               DBG(dbg_ctrl) << "Sending keystroke '"<<str<<"'\n";
                eventhandler->keystroke(str);
                break;
            }
+            case KeyRelease: {
+                DBG(dbg_ctrl) << "Key released";
+
+            }
            case ButtonPress: case ButtonRelease: {
              int button = mapButton(e->xbutton.button);
-             DBG(dbg) << "Button: " << e->xbutton.button << " " <<e->xbutton.x 
<< " "
+             DBG(dbg_ctrl) << "Button: " << e->xbutton.button << " " 
<<e->xbutton.x << " "
                    << e->xbutton.y<<"\n";
+              DBG(dbg_ctrl) << "  Control: " << int(e->xkey.state & 
ControlMask) 
+                            << ", shift: " << int(e->xkey.state & ShiftMask) 
<<"\n";
              eventhandler->mouse(e->xbutton.x, e->xbutton.y, button, 
                        (e->type == ButtonPress ? 
                                eventhandler->PRESS : 
@@ -613,7 +620,7 @@
            }
            case MotionNotify: {
                int button = mapButtonStateMask(e->xmotion.state);
-               DBG(dbg) << "Motion: " << button << " " <<e->xmotion.x << " "
+               DBG(dbg_ctrl) << "Motion: " << button << " " <<e->xmotion.x << 
" "
                    << e->xmotion.y<<"\n";
                eventhandler->mouse(e->xmotion.x, e->xmotion.y, button, 
                                eventhandler->MOTION);
@@ -621,23 +628,23 @@
               break;
            }
            case Expose:
-               DBG(dbg) << "Expose\n";
+               DBG(dbg_ctrl) << "Expose\n";
                eventhandler->repaint();
                break;
            case ConfigureNotify:
-               DBG(dbg) << "Configurenotify\n";
+               DBG(dbg_ctrl) << "Configurenotify\n";
                eventhandler->repaint();
                break;
            case MapRequest:
-               DBG(dbg) << "MapRequest\n";
+               DBG(dbg_ctrl) << "MapRequest\n";
                eventhandler->repaint();
                break;
            case MapNotify:
-               DBG(dbg) << "MapNotify\n";
+               DBG(dbg_ctrl) << "MapNotify\n";
                eventhandler->repaint();
                break;
            default:
-                   DBG(dbg) << "Unknown event "<<e->type<<"\n";
+                   DBG(dbg_ctrl) << "Unknown event "<<e->type<<"\n";
            }
        }
     };




reply via email to

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