mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
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:
parent
62a4b07158
commit
502394d4ce
12 changed files with 72 additions and 11 deletions
|
@ -6757,6 +6757,10 @@ STDCALL
|
||||||
MessageBeep(
|
MessageBeep(
|
||||||
UINT uType);
|
UINT uType);
|
||||||
|
|
||||||
|
HCURSOR
|
||||||
|
STDCALL
|
||||||
|
CopyCursor(HCURSOR pcur);
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
ShowCursor(
|
ShowCursor(
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
#define USER32_CALLBACK_SENDSTYLECHANGING (8)
|
#define USER32_CALLBACK_SENDSTYLECHANGING (8)
|
||||||
#define USER32_CALLBACK_SENDSTYLECHANGED (9)
|
#define USER32_CALLBACK_SENDSTYLECHANGED (9)
|
||||||
#define USER32_CALLBACK_LOADSYSMENUTEMPLATE (10)
|
#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
|
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,3 +15,6 @@ typedef struct _USER32_THREAD_DATA
|
||||||
PUSER32_THREAD_DATA User32GetThreadData();
|
PUSER32_THREAD_DATA User32GetThreadData();
|
||||||
|
|
||||||
VOID DeleteFrameBrushes(VOID);
|
VOID DeleteFrameBrushes(VOID);
|
||||||
|
|
||||||
|
BOOL FASTCALL
|
||||||
|
User32SetupDefaultCursors(void);
|
||||||
|
|
|
@ -75,6 +75,8 @@ Init(VOID)
|
||||||
(PVOID)User32SendSTYLECHANGEDMessageForKernel;
|
(PVOID)User32SendSTYLECHANGEDMessageForKernel;
|
||||||
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
|
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
|
||||||
(PVOID)User32LoadSysMenuTemplateForKernel;
|
(PVOID)User32LoadSysMenuTemplateForKernel;
|
||||||
|
NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
|
||||||
|
(PVOID)User32SetupDefaultCursors;
|
||||||
|
|
||||||
/* Allocate an index for user32 thread local data. */
|
/* Allocate an index for user32 thread local data. */
|
||||||
User32TlsIndex = TlsAlloc();
|
User32TlsIndex = TlsAlloc();
|
||||||
|
|
|
@ -73,6 +73,7 @@ CloseWindow@4
|
||||||
CloseWindowStation@4
|
CloseWindowStation@4
|
||||||
CopyAcceleratorTableA@12
|
CopyAcceleratorTableA@12
|
||||||
CopyAcceleratorTableW@12
|
CopyAcceleratorTableW@12
|
||||||
|
CopyCursor@4
|
||||||
CopyIcon@4
|
CopyIcon@4
|
||||||
CopyImage@20
|
CopyImage@20
|
||||||
CopyRect@8
|
CopyRect@8
|
||||||
|
|
|
@ -73,6 +73,7 @@ CloseWindow=CloseWindow@4
|
||||||
CloseWindowStation=CloseWindowStation@4
|
CloseWindowStation=CloseWindowStation@4
|
||||||
CopyAcceleratorTableA=CopyAcceleratorTableA@12
|
CopyAcceleratorTableA=CopyAcceleratorTableA@12
|
||||||
CopyAcceleratorTableW=CopyAcceleratorTableW@12
|
CopyAcceleratorTableW=CopyAcceleratorTableW@12
|
||||||
|
CopyCursor=CopyCursor@4
|
||||||
CopyIcon=CopyIcon@4
|
CopyIcon=CopyIcon@4
|
||||||
CopyImage=CopyImage@20
|
CopyImage=CopyImage@20
|
||||||
CopyRect=CopyRect@8
|
CopyRect=CopyRect@8
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/cursor.c
|
* FILE: lib/user32/windows/cursor.c
|
||||||
|
@ -33,9 +33,33 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <debug.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 *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
HCURSOR STDCALL
|
||||||
|
CopyCursor(HCURSOR pcur)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
return (HCURSOR)0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/icon.c
|
* FILE: lib/user32/windows/icon.c
|
||||||
|
@ -459,14 +459,14 @@ GetIconInfo(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlCopyMemory(&IconInfo, piconinfo, sizeof(ICONINFO));
|
|
||||||
res = NtUserGetIconInfo(hIcon,
|
res = NtUserGetIconInfo(hIcon,
|
||||||
&piconinfo->fIcon,
|
&piconinfo->fIcon,
|
||||||
&piconinfo->xHotspot,
|
&piconinfo->xHotspot,
|
||||||
&piconinfo->yHotspot,
|
&piconinfo->yHotspot,
|
||||||
&piconinfo->hbmMask,
|
&piconinfo->hbmMask,
|
||||||
&piconinfo->hbmColor);
|
&piconinfo->hbmColor);
|
||||||
RtlCopyMemory(piconinfo, &IconInfo, sizeof(ICONINFO));
|
if(res)
|
||||||
|
RtlCopyMemory(piconinfo, &IconInfo, sizeof(ICONINFO));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* PROJECT: ReactOS kernel
|
||||||
* PURPOSE: Mouse
|
* PURPOSE: Mouse
|
||||||
|
@ -598,7 +598,7 @@ EnableMouse(HDC hDisplayDC)
|
||||||
hMouseSurf = EngCreateBitmap(MouseSize, 4, BMF_1BPP, BMF_TOPDOWN, DefaultCursor);
|
hMouseSurf = EngCreateBitmap(MouseSize, 4, BMF_1BPP, BMF_TOPDOWN, DefaultCursor);
|
||||||
MouseSurf = (PSURFOBJ)AccessUserObject((ULONG) hMouseSurf);
|
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,
|
IntCheckClipCursor(&CurInfo->x,
|
||||||
&CurInfo->y,
|
&CurInfo->y,
|
||||||
CurInfo);
|
CurInfo);
|
||||||
|
|
|
@ -44,4 +44,7 @@ IntSendSTYLECHANGEDMessage(HWND Wnd, DWORD WhichStyle, STYLESTRUCT* Style);
|
||||||
HMENU STDCALL
|
HMENU STDCALL
|
||||||
IntLoadSysMenuTemplate();
|
IntLoadSysMenuTemplate();
|
||||||
|
|
||||||
|
BOOL STDCALL
|
||||||
|
IntLoadDefaultCursors();
|
||||||
|
|
||||||
#endif /* __SUBSYS_WIN32K_INCLUDE_CALLBACK_H */
|
#endif /* __SUBSYS_WIN32K_INCLUDE_CALLBACK_H */
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -402,4 +402,26 @@ IntLoadSysMenuTemplate()
|
||||||
return (HMENU)Result;
|
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 */
|
/* EOF */
|
||||||
|
|
|
@ -398,7 +398,7 @@ NtUserSetCursorIconData(
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
|
@ -406,7 +406,7 @@ NtUserSetSystemCursor(
|
||||||
HCURSOR hcur,
|
HCURSOR hcur,
|
||||||
DWORD id)
|
DWORD id)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
BOOL res = FALSE;
|
||||||
|
|
||||||
return 0;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue