Commit in reactos/lib/rosky/libskygi on MAIN
libskygi.c+56-251.10 -> 1.11
stubs.c+1-121.8 -> 1.9
+57-37
2 modified files
implemented GI_EnableMouseTracking()

reactos/lib/rosky/libskygi
libskygi.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- libskygi.c	14 Aug 2004 07:15:05 -0000	1.10
+++ libskygi.c	14 Aug 2004 10:47:19 -0000	1.11
@@ -16,7 +16,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-/* $Id: libskygi.c,v 1.10 2004/08/14 07:15:05 navaraf Exp $
+/* $Id: libskygi.c,v 1.11 2004/08/14 10:47:19 weiden Exp $
  *
  * PROJECT:         SkyOS GI library
  * FILE:            lib/libskygi/libskygi.c
@@ -35,6 +35,7 @@
 {
   s_window Window;
   HWND hWnd;
+  BOOL MouseInput;
 } SKY_WINDOW, *PSKY_WINDOW;
 
 typedef struct
@@ -218,36 +219,44 @@
       smsg->para2 = 0;
       return TRUE;
 
-    case WM_LBUTTONDOWN:
-    case WM_LBUTTONUP:
-    case WM_RBUTTONDOWN:
-    case WM_RBUTTONUP:
+    case WM_COMMAND:
+      smsg->type = MSG_COMMAND;
+      smsg->para1 = LOWORD(Msg->wParam);
+      return TRUE;
+  }
+  
+  if(skw->MouseInput)
+  {
+    switch(Msg->message)
     {
-      POINT pt;
-
-      switch (Msg->message)
+      case WM_LBUTTONDOWN:
+        smsg->type = MSG_MOUSE_BUT1_PRESSED;
+        goto DoMouseInputMessage;
+      case WM_LBUTTONUP:
+        smsg->type = MSG_MOUSE_BUT1_RELEASED;
+        goto DoMouseInputMessage;
+      case WM_RBUTTONDOWN:
+        smsg->type = MSG_MOUSE_BUT2_PRESSED;
+        goto DoMouseInputMessage;
+      case WM_RBUTTONUP:
       {
-        case WM_LBUTTONDOWN: smsg->type = MSG_MOUSE_BUT1_PRESSED; break;
-        case WM_LBUTTONUP: smsg->type = MSG_MOUSE_BUT1_RELEASED; break;
-        case WM_RBUTTONDOWN: smsg->type = MSG_MOUSE_BUT2_PRESSED; break;
-        case WM_RBUTTONUP: smsg->type = MSG_MOUSE_BUT2_RELEASED; break;
-      }
+        POINT pt;
+
+        smsg->type = MSG_MOUSE_BUT2_RELEASED;
+
+DoMouseInputMessage:
 #if 0
-      pt.x = LOWORD(Msg->lParam);
-      pt.y = HIWORD(Msg->lParam);
+        pt.x = LOWORD(Msg->lParam);
+        pt.y = HIWORD(Msg->lParam);
 #else
-      pt = Msg->pt;
-      MapWindowPoints(NULL, skw->hWnd, &pt, 1);
+        pt = Msg->pt;
+        MapWindowPoints(NULL, skw->hWnd, &pt, 1);
 #endif
-      smsg->para1 = pt.x;
-      smsg->para2 = pt.y;
-      return TRUE;
+        smsg->para1 = pt.x;
+        smsg->para2 = pt.y;
+        return TRUE;
+      }
     }
-
-    case WM_COMMAND:
-      smsg->type = MSG_COMMAND;
-      smsg->para1 = LOWORD(Msg->wParam);
-      return TRUE;
   }
   
   return FALSE;
@@ -1171,4 +1180,26 @@
    return 0;
 }
 
+
+/*
+ * @implemented
+ */
+int __cdecl
+GI_EnableMouseTracking(s_window *win)
+{
+  DBG("GI_EnableMouseTracking(0x%x)!\n", win);
+  if(win != NULL)
+  {
+    ((PSKY_WINDOW)win)->MouseInput = TRUE;
+    return 1;
+  }
+   #if DEBUG
+   else
+   {
+     DBG("GI_EnableMouseTracking: win == NULL!\n");
+   }
+   #endif
+  return 0;
+}
+
 /* EOF */

reactos/lib/rosky/libskygi
stubs.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- stubs.c	14 Aug 2004 01:03:38 -0000	1.8
+++ stubs.c	14 Aug 2004 10:47:19 -0000	1.9
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.8 2004/08/14 01:03:38 weiden Exp $
+/* $Id: stubs.c,v 1.9 2004/08/14 10:47:19 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         SkyOS GI library
@@ -162,17 +162,6 @@
  * @unimplemented
  */
 int __cdecl
-GI_EnableMouseTracking(s_window *win)
-{
-  STUB("GI_EnableMouseTracking(0x%x) returns 0!\n", win);
-  return 0;
-}
-
-
-/*
- * @unimplemented
- */
-int __cdecl
 GI_create_font(unsigned char *family,
                unsigned char *style,
                unsigned char *filename)
CVSspam 0.2.8