Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
77ee42fd
Commit
77ee42fd
authored
Nov 05, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use BOOL type where appropriate.
parent
3cb2ddfd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
mdi.c
dlls/user32/mdi.c
+11
-11
menu.c
dlls/user32/menu.c
+2
-2
message.c
dlls/user32/message.c
+2
-2
misc.c
dlls/user32/misc.c
+1
-1
win.c
dlls/user32/win.c
+4
-4
No files found.
dlls/user32/mdi.c
View file @
77ee42fd
...
@@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
...
@@ -844,13 +844,13 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
TRACE
(
"frame %p,child %p
\n
"
,
frame
,
hChild
);
TRACE
(
"frame %p,child %p
\n
"
,
frame
,
hChild
);
if
(
!
menu
)
return
0
;
if
(
!
menu
)
return
FALSE
;
/* create a copy of sysmenu popup and insert it into frame menu bar */
/* create a copy of sysmenu popup and insert it into frame menu bar */
if
(
!
(
hSysPopup
=
GetSystemMenu
(
hChild
,
FALSE
)))
if
(
!
(
hSysPopup
=
GetSystemMenu
(
hChild
,
FALSE
)))
{
{
TRACE
(
"child %p doesn't have a system menu
\n
"
,
hChild
);
TRACE
(
"child %p doesn't have a system menu
\n
"
,
hChild
);
return
0
;
return
FALSE
;
}
}
AppendMenuW
(
menu
,
MF_HELP
|
MF_BITMAP
,
AppendMenuW
(
menu
,
MF_HELP
|
MF_BITMAP
,
...
@@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
...
@@ -898,7 +898,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
{
{
TRACE
(
"not inserted
\n
"
);
TRACE
(
"not inserted
\n
"
);
DestroyMenu
(
hSysPopup
);
DestroyMenu
(
hSysPopup
);
return
0
;
return
FALSE
;
}
}
EnableMenuItem
(
hSysPopup
,
SC_SIZE
,
MF_BYCOMMAND
|
MF_GRAYED
);
EnableMenuItem
(
hSysPopup
,
SC_SIZE
,
MF_BYCOMMAND
|
MF_GRAYED
);
...
@@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
...
@@ -909,7 +909,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
/* redraw menu */
/* redraw menu */
DrawMenuBar
(
frame
);
DrawMenuBar
(
frame
);
return
1
;
return
TRUE
;
}
}
/**********************************************************************
/**********************************************************************
...
@@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
...
@@ -924,13 +924,13 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
TRACE
(
"frame %p, child %p
\n
"
,
frame
,
hChild
);
TRACE
(
"frame %p, child %p
\n
"
,
frame
,
hChild
);
if
(
!
menu
)
return
0
;
if
(
!
menu
)
return
FALSE
;
/* if there is no system buttons then nothing to do */
/* if there is no system buttons then nothing to do */
nItems
=
GetMenuItemCount
(
menu
)
-
1
;
nItems
=
GetMenuItemCount
(
menu
)
-
1
;
iId
=
GetMenuItemID
(
menu
,
nItems
);
iId
=
GetMenuItemID
(
menu
,
nItems
);
if
(
!
(
iId
==
SC_RESTORE
||
iId
==
SC_CLOSE
)
)
if
(
!
(
iId
==
SC_RESTORE
||
iId
==
SC_CLOSE
)
)
return
0
;
return
FALSE
;
/*
/*
* Remove the system menu, If that menu is the icon of the window
* Remove the system menu, If that menu is the icon of the window
...
@@ -963,7 +963,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
...
@@ -963,7 +963,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
DrawMenuBar
(
frame
);
DrawMenuBar
(
frame
);
return
1
;
return
TRUE
;
}
}
...
@@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
...
@@ -1665,7 +1665,7 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
MDICLIENTINFO
*
ci
=
get_client_info
(
hwndClient
);
MDICLIENTINFO
*
ci
=
get_client_info
(
hwndClient
);
WPARAM
wParam
=
0
;
WPARAM
wParam
=
0
;
if
(
!
ci
||
!
IsWindowEnabled
(
ci
->
hwndActiveChild
))
return
0
;
if
(
!
ci
||
!
IsWindowEnabled
(
ci
->
hwndActiveChild
))
return
FALSE
;
/* translate if the Ctrl key is down and Alt not. */
/* translate if the Ctrl key is down and Alt not. */
...
@@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
...
@@ -1686,14 +1686,14 @@ BOOL WINAPI TranslateMDISysAccel( HWND hwndClient, LPMSG msg )
}
}
/* fall through */
/* fall through */
default:
default:
return
0
;
return
FALSE
;
}
}
TRACE
(
"wParam = %04lx
\n
"
,
wParam
);
TRACE
(
"wParam = %04lx
\n
"
,
wParam
);
SendMessageW
(
ci
->
hwndActiveChild
,
WM_SYSCOMMAND
,
wParam
,
msg
->
wParam
);
SendMessageW
(
ci
->
hwndActiveChild
,
WM_SYSCOMMAND
,
wParam
,
msg
->
wParam
);
return
1
;
return
TRUE
;
}
}
}
}
return
0
;
/* failure */
return
FALSE
;
/* failure */
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/user32/menu.c
View file @
77ee42fd
...
@@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
...
@@ -1172,7 +1172,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
MENUITEM
*
lpitem
;
MENUITEM
*
lpitem
;
HDC
hdc
;
HDC
hdc
;
UINT
start
,
i
;
UINT
start
,
i
;
int
textandbmp
=
FALSE
;
BOOL
textandbmp
=
FALSE
;
int
orgX
,
orgY
,
maxX
,
maxTab
,
maxTabWidth
,
maxHeight
;
int
orgX
,
orgY
,
maxX
,
maxTab
,
maxTabWidth
,
maxHeight
;
lppop
->
Width
=
lppop
->
Height
=
0
;
lppop
->
Width
=
lppop
->
Height
=
0
;
...
@@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
...
@@ -1591,7 +1591,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
HBITMAP
bm
;
HBITMAP
bm
;
INT
y
=
rect
.
top
+
rect
.
bottom
;
INT
y
=
rect
.
top
+
rect
.
bottom
;
RECT
rc
=
rect
;
RECT
rc
=
rect
;
int
checked
=
FALSE
;
BOOL
checked
=
FALSE
;
UINT
check_bitmap_width
=
GetSystemMetrics
(
SM_CXMENUCHECK
);
UINT
check_bitmap_width
=
GetSystemMetrics
(
SM_CXMENUCHECK
);
UINT
check_bitmap_height
=
GetSystemMetrics
(
SM_CYMENUCHECK
);
UINT
check_bitmap_height
=
GetSystemMetrics
(
SM_CYMENUCHECK
);
/* Draw the check mark
/* Draw the check mark
...
...
dlls/user32/message.c
View file @
77ee42fd
...
@@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] =
...
@@ -422,14 +422,14 @@ static const unsigned int message_unicode_flags[] =
};
};
/* check whether a given message type includes pointers */
/* check whether a given message type includes pointers */
static
inline
int
is_pointer_message
(
UINT
message
)
static
inline
BOOL
is_pointer_message
(
UINT
message
)
{
{
if
(
message
>=
8
*
sizeof
(
message_pointer_flags
))
return
FALSE
;
if
(
message
>=
8
*
sizeof
(
message_pointer_flags
))
return
FALSE
;
return
(
message_pointer_flags
[
message
/
32
]
&
SET
(
message
))
!=
0
;
return
(
message_pointer_flags
[
message
/
32
]
&
SET
(
message
))
!=
0
;
}
}
/* check whether a given message type contains Unicode (or ASCII) chars */
/* check whether a given message type contains Unicode (or ASCII) chars */
static
inline
int
is_unicode_message
(
UINT
message
)
static
inline
BOOL
is_unicode_message
(
UINT
message
)
{
{
if
(
message
>=
8
*
sizeof
(
message_unicode_flags
))
return
FALSE
;
if
(
message
>=
8
*
sizeof
(
message_unicode_flags
))
return
FALSE
;
return
(
message_unicode_flags
[
message
/
32
]
&
SET
(
message
))
!=
0
;
return
(
message_unicode_flags
[
message
/
32
]
&
SET
(
message
))
!=
0
;
...
...
dlls/user32/misc.c
View file @
77ee42fd
...
@@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
...
@@ -458,7 +458,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
BOOL
WINAPI
RegisterShellHookWindow
(
HWND
hWnd
)
BOOL
WINAPI
RegisterShellHookWindow
(
HWND
hWnd
)
{
{
FIXME
(
"(%p): stub
\n
"
,
hWnd
);
FIXME
(
"(%p): stub
\n
"
,
hWnd
);
return
0
;
return
FALSE
;
}
}
...
...
dlls/user32/win.c
View file @
77ee42fd
...
@@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
...
@@ -3478,7 +3478,7 @@ BOOL WINAPI SetWindowContextHelpId( HWND hwnd, DWORD id )
if
(
wnd
==
WND_OTHER_PROCESS
)
if
(
wnd
==
WND_OTHER_PROCESS
)
{
{
if
(
IsWindow
(
hwnd
))
FIXME
(
"not supported on other process window %p
\n
"
,
hwnd
);
if
(
IsWindow
(
hwnd
))
FIXME
(
"not supported on other process window %p
\n
"
,
hwnd
);
return
0
;
return
FALSE
;
}
}
wnd
->
helpContext
=
id
;
wnd
->
helpContext
=
id
;
WIN_ReleasePtr
(
wnd
);
WIN_ReleasePtr
(
wnd
);
...
@@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
...
@@ -3511,7 +3511,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if
(
msg
.
message
==
WM_LBUTTONUP
)
if
(
msg
.
message
==
WM_LBUTTONUP
)
{
{
ReleaseCapture
();
ReleaseCapture
();
return
0
;
return
FALSE
;
}
}
if
(
msg
.
message
==
WM_MOUSEMOVE
)
if
(
msg
.
message
==
WM_MOUSEMOVE
)
{
{
...
@@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
...
@@ -3521,13 +3521,13 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
if
(
!
PtInRect
(
&
rect
,
tmp
))
if
(
!
PtInRect
(
&
rect
,
tmp
))
{
{
ReleaseCapture
();
ReleaseCapture
();
return
1
;
return
TRUE
;
}
}
}
}
}
}
WaitMessage
();
WaitMessage
();
}
}
return
0
;
return
FALSE
;
}
}
/******************************************************************************
/******************************************************************************
...
...
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