mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +00:00

- rename ObmXxx functions to UserXxx functions - remove some macros - move prototypes to object.h - implement UserreferenceObjectByHandle creating a reference to the object, used for cursoricon stuff so far - rewrite object manager functions to reasonably handle references - dereference cursoricons correctly, so they will really get deleted -> fixes a cursoricon leak - destroy submenus in NtUserDestroyMenu -> fixes a big menu leak - free the buffer of the menu text -> fixes a mem leak - delete old bitmaps in NtUserSetCursorContent -> fixes a bitmap leak - delete monitor object on failure Now taskmgr doesn't leak memory anymore. we still leak some user handles here and there even after terminating a process, but it's much better now. svn path=/trunk/; revision=32336
90 lines
2.2 KiB
C
90 lines
2.2 KiB
C
#ifndef _WIN32K_CURSORICON_H
|
|
#define _WIN32K_CURSORICON_H
|
|
|
|
#define MAXCURICONHANDLES 4096
|
|
|
|
typedef struct tagCURICON_PROCESS
|
|
{
|
|
LIST_ENTRY ListEntry;
|
|
PW32PROCESS Process;
|
|
} CURICON_PROCESS, *PCURICON_PROCESS;
|
|
|
|
typedef struct _CURICON_OBJECT
|
|
{
|
|
LIST_ENTRY ListEntry;
|
|
HANDLE Self;
|
|
LIST_ENTRY ProcessList;
|
|
HMODULE hModule;
|
|
HRSRC hRsrc;
|
|
HRSRC hGroupRsrc;
|
|
SIZE Size;
|
|
BYTE Shadow;
|
|
ICONINFO IconInfo;
|
|
} CURICON_OBJECT, *PCURICON_OBJECT;
|
|
|
|
typedef struct _CURSORCLIP_INFO
|
|
{
|
|
BOOL IsClipped;
|
|
UINT Left;
|
|
UINT Top;
|
|
UINT Right;
|
|
UINT Bottom;
|
|
} CURSORCLIP_INFO, *PCURSORCLIP_INFO;
|
|
|
|
typedef struct _CURSORACCELERATION_INFO
|
|
{
|
|
UINT FirstThreshold;
|
|
UINT SecondThreshold;
|
|
UINT Acceleration;
|
|
} CURSORACCELERATION_INFO, *PCURSORACCELERATION_INFO;
|
|
|
|
typedef struct _SYSTEM_CURSORINFO
|
|
{
|
|
BOOL Enabled;
|
|
BOOL SwapButtons;
|
|
UINT ButtonsDown;
|
|
CURSORCLIP_INFO CursorClipInfo;
|
|
PCURICON_OBJECT CurrentCursorObject;
|
|
UINT WheelScroLines;
|
|
UINT WheelScroChars;
|
|
BYTE ShowingCursor;
|
|
UINT DblClickSpeed;
|
|
UINT DblClickWidth;
|
|
UINT DblClickHeight;
|
|
|
|
UINT MouseHoverTime;
|
|
UINT MouseHoverWidth;
|
|
UINT MouseHoverHeight;
|
|
|
|
UINT MouseSpeed;
|
|
CURSORACCELERATION_INFO CursorAccelerationInfo;
|
|
|
|
DWORD LastBtnDown;
|
|
LONG LastBtnDownX;
|
|
LONG LastBtnDownY;
|
|
HANDLE LastClkWnd;
|
|
BOOL ScreenSaverRunning;
|
|
} SYSTEM_CURSORINFO, *PSYSTEM_CURSORINFO;
|
|
|
|
HCURSOR FASTCALL IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, BOOL ForceChange);
|
|
BOOL FASTCALL IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject);
|
|
PCURICON_OBJECT FASTCALL IntCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject);
|
|
VOID FASTCALL IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process);
|
|
|
|
BOOL FASTCALL IntGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc);
|
|
|
|
BOOL UserDrawIconEx(HDC hDc, INT xLeft, INT yTop, PCURICON_OBJECT pIcon, INT cxWidth,
|
|
INT cyHeight, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
|
|
PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon);
|
|
|
|
#define IntGetSysCursorInfo(WinStaObj) \
|
|
(PSYSTEM_CURSORINFO)((WinStaObj)->SystemCursor)
|
|
|
|
#define IntReleaseCurIconObject(CurIconObj) \
|
|
UserDereferenceObject(CurIconObj)
|
|
|
|
#endif /* _WIN32K_CURSORICON_H */
|
|
|
|
/* EOF */
|
|
|
|
|