1.added callback routine for loading system cursors after switching to gui (not implemented so far)

2.added CopyCursor() which didn't exist as yet

svn path=/trunk/; revision=5910
This commit is contained in:
Thomas Bluemel 2003-08-29 00:24:42 +00:00
parent 62a4b07158
commit 502394d4ce
12 changed files with 72 additions and 11 deletions

View file

@ -6757,6 +6757,10 @@ STDCALL
MessageBeep(
UINT uType);
HCURSOR
STDCALL
CopyCursor(HCURSOR pcur);
int
STDCALL
ShowCursor(

View 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
{

View file

@ -15,3 +15,6 @@ typedef struct _USER32_THREAD_DATA
PUSER32_THREAD_DATA User32GetThreadData();
VOID DeleteFrameBrushes(VOID);
BOOL FASTCALL
User32SetupDefaultCursors(void);

View 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();

View file

@ -73,6 +73,7 @@ CloseWindow@4
CloseWindowStation@4
CopyAcceleratorTableA@12
CopyAcceleratorTableW@12
CopyCursor@4
CopyIcon@4
CopyImage@20
CopyRect@8

View 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

View 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
@ -33,9 +33,33 @@
#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
*/

View 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,13 +459,13 @@ GetIconInfo(
return FALSE;
}
RtlCopyMemory(&IconInfo, piconinfo, sizeof(ICONINFO));
res = NtUserGetIconInfo(hIcon,
&piconinfo->fIcon,
&piconinfo->xHotspot,
&piconinfo->yHotspot,
&piconinfo->hbmMask,
&piconinfo->hbmColor);
if(res)
RtlCopyMemory(piconinfo, &IconInfo, sizeof(ICONINFO));
return res;
}

View 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);

View file

@ -44,4 +44,7 @@ IntSendSTYLECHANGEDMessage(HWND Wnd, DWORD WhichStyle, STYLESTRUCT* Style);
HMENU STDCALL
IntLoadSysMenuTemplate();
BOOL STDCALL
IntLoadDefaultCursors();
#endif /* __SUBSYS_WIN32K_INCLUDE_CALLBACK_H */

View 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 */

View 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;
}