Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bad82953
Commit
bad82953
authored
Apr 14, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move GetMenuItemCount implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1899cd2a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
10 deletions
+26
-10
menu.c
dlls/user32/menu.c
+2
-10
menu.c
dlls/win32u/menu.c
+14
-0
sysparams.c
dlls/win32u/sysparams.c
+3
-0
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
ntuser.h
include/ntuser.h
+6
-0
No files found.
dlls/user32/menu.c
View file @
bad82953
...
...
@@ -3696,17 +3696,9 @@ UINT WINAPI GetMenuState( HMENU menu, UINT item, UINT flags )
/**********************************************************************
* GetMenuItemCount (USER32.@)
*/
INT
WINAPI
GetMenuItemCount
(
HMENU
hM
enu
)
INT
WINAPI
GetMenuItemCount
(
HMENU
m
enu
)
{
POPUPMENU
*
menu
=
grab_menu_ptr
(
hMenu
);
INT
count
;
if
(
!
menu
)
return
-
1
;
count
=
menu
->
nItems
;
release_menu_ptr
(
menu
);
TRACE
(
"(%p) returning %d
\n
"
,
hMenu
,
count
);
return
count
;
return
NtUserGetMenuItemCount
(
menu
);
}
...
...
dlls/win32u/menu.c
View file @
bad82953
...
...
@@ -864,6 +864,20 @@ UINT WINAPI NtUserThunkedMenuItemInfo( HMENU handle, UINT pos, UINT flags, UINT
return
ret
;
}
/* see GetMenuItemCount */
INT
get_menu_item_count
(
HMENU
handle
)
{
POPUPMENU
*
menu
;
INT
count
;
if
(
!
(
menu
=
grab_menu_ptr
(
handle
)))
return
-
1
;
count
=
menu
->
nItems
;
release_menu_ptr
(
menu
);
TRACE
(
"(%p) returning %d
\n
"
,
handle
,
count
);
return
count
;
}
/**********************************************************************
* NtUserRemoveMenu (win32u.@)
*/
...
...
dlls/win32u/sysparams.c
View file @
bad82953
...
...
@@ -4718,6 +4718,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
case
NtUserCallOneParam_GetIconParam
:
return
get_icon_param
(
UlongToHandle
(
arg
)
);
case
NtUserCallOneParam_GetMenuItemCount
:
return
get_menu_item_count
(
UlongToHandle
(
arg
)
);
case
NtUserCallOneParam_GetSysColor
:
return
get_sys_color
(
arg
);
...
...
dlls/win32u/win32u_private.h
View file @
bad82953
...
...
@@ -377,6 +377,7 @@ extern HMENU create_menu( BOOL is_popup ) DECLSPEC_HIDDEN;
extern
BOOL
draw_menu_bar
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
HMENU
get_menu
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_menu_info
(
HMENU
handle
,
MENUINFO
*
info
)
DECLSPEC_HIDDEN
;
extern
INT
get_menu_item_count
(
HMENU
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
set_window_menu
(
HWND
hwnd
,
HMENU
handle
)
DECLSPEC_HIDDEN
;
/* message.c */
...
...
include/ntuser.h
View file @
bad82953
...
...
@@ -704,6 +704,7 @@ enum
NtUserCallOneParam_GetClipCursor
,
NtUserCallOneParam_GetCursorPos
,
NtUserCallOneParam_GetIconParam
,
NtUserCallOneParam_GetMenuItemCount
,
NtUserCallOneParam_GetPrimaryMonitorRect
,
NtUserCallOneParam_GetSysColor
,
NtUserCallOneParam_GetSysColorBrush
,
...
...
@@ -773,6 +774,11 @@ static inline UINT_PTR NtUserGetIconParam( HICON icon )
return
NtUserCallOneParam
(
HandleToUlong
(
icon
),
NtUserCallOneParam_GetIconParam
);
}
static
inline
UINT_PTR
NtUserGetMenuItemCount
(
HMENU
menu
)
{
return
NtUserCallOneParam
(
HandleToUlong
(
menu
),
NtUserCallOneParam_GetMenuItemCount
);
}
static
inline
RECT
NtUserGetPrimaryMonitorRect
(
void
)
{
RECT
primary
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment