1.added callback routine for loading system cursors after switching to gui (not imple...
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 29 Aug 2003 00:24:42 +0000 (00:24 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 29 Aug 2003 00:24:42 +0000 (00:24 +0000)
2.added CopyCursor() which didn't exist as yet

svn path=/trunk/; revision=5910

12 files changed:
reactos/include/funcs.h
reactos/include/user32/callback.h
reactos/lib/user32/include/user32.h
reactos/lib/user32/misc/dllmain.c
reactos/lib/user32/user32.def
reactos/lib/user32/user32.edf
reactos/lib/user32/windows/cursor.c
reactos/lib/user32/windows/icon.c
reactos/subsys/win32k/eng/mouse.c
reactos/subsys/win32k/include/callback.h
reactos/subsys/win32k/ntuser/callback.c
reactos/subsys/win32k/objects/cursoricon.c

index 09dbacc..8457d73 100644 (file)
@@ -6757,6 +6757,10 @@ STDCALL
 MessageBeep(
            UINT uType);
 
+HCURSOR
+STDCALL
+CopyCursor(HCURSOR pcur);
+
 int
 STDCALL
 ShowCursor(
index 3e8ec9a..b45e56c 100644 (file)
@@ -12,7 +12,8 @@
 #define USER32_CALLBACK_SENDSTYLECHANGING     (8)
 #define USER32_CALLBACK_SENDSTYLECHANGED      (9)
 #define USER32_CALLBACK_LOADSYSMENUTEMPLATE   (10)
-#define USER32_CALLBACK_MAXIMUM               (10)
+#define USER32_CALLBACK_LOADDEFAULTCURSORS    (11)
+#define USER32_CALLBACK_MAXIMUM               (11)
 
 typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
 {
index de948e4..c4921fb 100644 (file)
@@ -15,3 +15,6 @@ typedef struct _USER32_THREAD_DATA
 PUSER32_THREAD_DATA User32GetThreadData();
 
 VOID DeleteFrameBrushes(VOID);
+
+BOOL FASTCALL
+User32SetupDefaultCursors(void);
index 9e83ee0..611cb1e 100644 (file)
@@ -75,6 +75,8 @@ Init(VOID)
     (PVOID)User32SendSTYLECHANGEDMessageForKernel;
   NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
     (PVOID)User32LoadSysMenuTemplateForKernel;
+  NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
+    (PVOID)User32SetupDefaultCursors;
 
   /* Allocate an index for user32 thread local data. */
   User32TlsIndex = TlsAlloc();
index eced5f6..7773a95 100644 (file)
@@ -73,6 +73,7 @@ CloseWindow@4
 CloseWindowStation@4
 CopyAcceleratorTableA@12
 CopyAcceleratorTableW@12
+CopyCursor@4
 CopyIcon@4
 CopyImage@20
 CopyRect@8
index 4199554..2fb94ab 100644 (file)
@@ -73,6 +73,7 @@ CloseWindow=CloseWindow@4
 CloseWindowStation=CloseWindowStation@4
 CopyAcceleratorTableA=CopyAcceleratorTableA@12
 CopyAcceleratorTableW=CopyAcceleratorTableW@12
+CopyCursor=CopyCursor@4
 CopyIcon=CopyIcon@4
 CopyImage=CopyImage@20
 CopyRect=CopyRect@8
index 53fb480..c57a93f 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: cursor.c,v 1.10 2003/08/24 18:52:18 weiden Exp $
+/* $Id: cursor.c,v 1.11 2003/08/29 00:24:42 weiden Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/cursor.c
 #include <string.h>
 #include <debug.h>
 
+/* INTERNAL ******************************************************************/
+
+/* This callback routine is called directly after switching to gui mode */
+BOOL FASTCALL
+User32SetupDefaultCursors(void)
+{
+  LRESULT Result = TRUE;
+  
+  /* FIXME load system cursor scheme */
+  
+  return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
+}
+
 /* FUNCTIONS *****************************************************************/
 
 
+/*
+ * @unimplemented
+ */
+HCURSOR STDCALL
+CopyCursor(HCURSOR pcur)
+{
+  UNIMPLEMENTED;
+  return (HCURSOR)0;
+}
+
+
 /*
  * @unimplemented
  */
index 1db5783..ee26894 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: icon.c,v 1.10 2003/08/22 20:50:44 weiden Exp $
+/* $Id: icon.c,v 1.11 2003/08/29 00:24:42 weiden Exp $
  *
  * PROJECT:         ReactOS user32.dll
  * FILE:            lib/user32/windows/icon.c
@@ -459,14 +459,14 @@ GetIconInfo(
     return FALSE;
   }
   
-  RtlCopyMemory(&IconInfo, piconinfo, sizeof(ICONINFO));
   res = NtUserGetIconInfo(hIcon,
                           &piconinfo->fIcon,
                           &piconinfo->xHotspot,
                           &piconinfo->yHotspot,
                           &piconinfo->hbmMask,
                           &piconinfo->hbmColor);
-  RtlCopyMemory(piconinfo, &IconInfo, sizeof(ICONINFO));
+  if(res)
+    RtlCopyMemory(piconinfo, &IconInfo, sizeof(ICONINFO));
   return res;
 }
 
index 73ff67d..28204e9 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: mouse.c,v 1.38 2003/08/28 16:33:22 weiden Exp $
+/* $Id: mouse.c,v 1.39 2003/08/29 00:24:42 weiden Exp $
  *
  * PROJECT:          ReactOS kernel
  * PURPOSE:          Mouse
@@ -598,7 +598,7 @@ EnableMouse(HDC hDisplayDC)
     hMouseSurf = EngCreateBitmap(MouseSize, 4, BMF_1BPP, BMF_TOPDOWN, DefaultCursor);
     MouseSurf = (PSURFOBJ)AccessUserObject((ULONG) hMouseSurf);
 
-    DbgPrint("Setting Cursor up at 0x%x, 0x%x\n", CurInfo->x, CurInfo->y);
+    DPRINT("Setting Cursor up at 0x%x, 0x%x\n", CurInfo->x, CurInfo->y);
     IntCheckClipCursor(&CurInfo->x, 
                        &CurInfo->y,
                        CurInfo);
index 5e82752..d2e5274 100644 (file)
@@ -44,4 +44,7 @@ IntSendSTYLECHANGEDMessage(HWND Wnd, DWORD WhichStyle, STYLESTRUCT* Style);
 HMENU STDCALL
 IntLoadSysMenuTemplate();
 
+BOOL STDCALL
+IntLoadDefaultCursors();
+
 #endif /* __SUBSYS_WIN32K_INCLUDE_CALLBACK_H */
index 4f5ccb0..0cc2675 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: callback.c,v 1.13 2003/08/21 20:29:43 weiden Exp $
+/* $Id: callback.c,v 1.14 2003/08/29 00:24:42 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -402,4 +402,26 @@ IntLoadSysMenuTemplate()
   return (HMENU)Result;
 }
 
+BOOL STDCALL
+IntLoadDefaultCursors()
+{
+  LRESULT Result;
+  NTSTATUS Status;
+  PVOID ResultPointer;
+  ULONG ResultLength;
+
+  ResultPointer = &Result;
+  ResultLength = sizeof(LRESULT);
+  Status = NtW32Call(USER32_CALLBACK_LOADDEFAULTCURSORS,
+                    NULL,
+                    0,
+                    &ResultPointer,
+                    &ResultLength);
+  if (!NT_SUCCESS(Status))
+    {
+      return(0);
+    }
+  return (BOOL)Result;
+}
+
 /* EOF */
index 6164e66..64ae337 100644 (file)
@@ -398,7 +398,7 @@ NtUserSetCursorIconData(
 
 
 /*
- * @unimplemented
+ * @implemented
  */
 BOOL
 STDCALL
@@ -406,7 +406,7 @@ NtUserSetSystemCursor(
   HCURSOR hcur,
   DWORD id)
 {
-  UNIMPLEMENTED
+  BOOL res = FALSE;
 
-  return 0;
+  return res;
 }