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
670033b2
Commit
670033b2
authored
Nov 23, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use int instead of long types in a few places.
To avoid typecasts in debug traces.
parent
d38a4a23
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
45 additions
and
42 deletions
+45
-42
clipboard.c
dlls/win32u/clipboard.c
+2
-2
dc.c
dlls/win32u/dc.c
+1
-1
dce.c
dlls/win32u/dce.c
+1
-1
defwnd.c
dlls/win32u/defwnd.c
+4
-4
dibdrv.h
dlls/win32u/dibdrv/dibdrv.h
+1
-1
font.c
dlls/win32u/font.c
+7
-7
input.c
dlls/win32u/input.c
+9
-8
menu.c
dlls/win32u/menu.c
+4
-2
message.c
dlls/win32u/message.c
+2
-2
ntgdi_private.h
dlls/win32u/ntgdi_private.h
+2
-2
ntuser_private.h
dlls/win32u/ntuser_private.h
+5
-5
rawinput.c
dlls/win32u/rawinput.c
+1
-1
sysparams.c
dlls/win32u/sysparams.c
+3
-3
win32u_private.h
dlls/win32u/win32u_private.h
+1
-1
window.c
dlls/win32u/window.c
+1
-1
winstation.c
dlls/win32u/winstation.c
+1
-1
No files found.
dlls/win32u/clipboard.c
View file @
670033b2
...
...
@@ -475,7 +475,7 @@ HWND WINAPI NtUserGetOpenClipboardWindow(void)
*/
DWORD
WINAPI
NtUserGetClipboardSequenceNumber
(
void
)
{
DWORD
seqno
=
0
;
unsigned
int
seqno
=
0
;
SERVER_START_REQ
(
get_clipboard_info
)
{
...
...
@@ -641,7 +641,7 @@ done:
HANDLE
WINAPI
NtUserGetClipboardData
(
UINT
format
,
struct
get_clipboard_params
*
params
)
{
struct
cached_format
*
cache
=
NULL
;
NTSTATUS
status
;
unsigned
int
status
;
UINT
from
,
data_seqno
;
size_t
size
;
HWND
owner
;
...
...
dlls/win32u/dc.c
View file @
670033b2
...
...
@@ -1451,7 +1451,7 @@ UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
*/
DWORD
WINAPI
NtGdiSetLayout
(
HDC
hdc
,
LONG
wox
,
DWORD
layout
)
{
DWORD
old_layout
=
GDI_ERROR
;
UINT
old_layout
=
GDI_ERROR
;
DC
*
dc
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
...
...
dlls/win32u/dce.c
View file @
670033b2
...
...
@@ -40,7 +40,7 @@ struct dce
HDC
hdc
;
HWND
hwnd
;
HRGN
clip_rgn
;
DWORD
flags
;
UINT
flags
;
LONG
count
;
/* usage count; 0 or 1 for cache DCEs, always 1 for window DCEs,
always >= 1 for class DCEs */
};
...
...
dlls/win32u/defwnd.c
View file @
670033b2
...
...
@@ -668,9 +668,9 @@ static void sys_command_size_move( HWND hwnd, WPARAM wparam )
DWORD
msg_pos
=
NtUserGetThreadInfo
()
->
message_pos
;
BOOL
thickframe
,
drag_full_windows
=
TRUE
,
moved
=
FALSE
;
RECT
sizing_rect
,
mouse_rect
,
orig_rect
;
LONG
hittest
=
wparam
&
0x0f
;
WPARAM
syscommand
=
wparam
&
0xfff0
;
LONG
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
UINT
hittest
=
wparam
&
0x0f
;
UINT
syscommand
=
wparam
&
0xfff0
;
UINT
style
=
get_window_long
(
hwnd
,
GWL_STYLE
);
POINT
capture_point
,
pt
;
MINMAXINFO
minmax
;
HMONITOR
mon
=
0
;
...
...
@@ -688,7 +688,7 @@ static void sys_command_size_move( HWND hwnd, WPARAM wparam )
capture_point
=
pt
;
NtUserClipCursor
(
NULL
);
TRACE
(
"hwnd %p command %04
l
x, hittest %d, pos %d,%d
\n
"
,
TRACE
(
"hwnd %p command %04x, hittest %d, pos %d,%d
\n
"
,
hwnd
,
syscommand
,
hittest
,
pt
.
x
,
pt
.
y
);
if
(
syscommand
==
SC_MOVE
)
...
...
dlls/win32u/dibdrv/dibdrv.h
View file @
670033b2
...
...
@@ -102,7 +102,7 @@ typedef struct dibdrv_physdev
struct
cached_font
*
font
;
/* pen */
DWORD
pen_style
,
pen_endcap
,
pen_join
;
UINT
pen_style
,
pen_endcap
,
pen_join
;
BOOL
pen_uses_region
,
pen_is_ext
;
int
pen_width
;
dib_brush
pen_brush
;
...
...
dlls/win32u/font.c
View file @
670033b2
...
...
@@ -2309,7 +2309,7 @@ static struct font_handle_entry font_handles[MAX_FONT_HANDLES];
static
struct
font_handle_entry
*
next_free
;
static
struct
font_handle_entry
*
next_unused
=
font_handles
;
static
struct
font_handle_entry
*
handle_entry
(
DWORD
handle
)
static
struct
font_handle_entry
*
handle_entry
(
unsigned
int
handle
)
{
unsigned
int
idx
=
LOWORD
(
handle
)
-
FIRST_FONT_HANDLE
;
...
...
@@ -2322,7 +2322,7 @@ static struct font_handle_entry *handle_entry( DWORD handle )
return
NULL
;
}
static
struct
gdi_font
*
get_font_from_handle
(
DWORD
handle
)
static
struct
gdi_font
*
get_font_from_handle
(
unsigned
int
handle
)
{
struct
font_handle_entry
*
entry
=
handle_entry
(
handle
);
...
...
@@ -3041,7 +3041,7 @@ static void update_font_association_info(void)
reg_delete_tree
(
NULL
,
font_assoc_keyW
,
sizeof
(
font_assoc_keyW
)
);
}
static
void
set_multi_value_key
(
HKEY
hkey
,
const
WCHAR
*
name
,
const
char
*
value
,
DWORD
len
)
static
void
set_multi_value_key
(
HKEY
hkey
,
const
WCHAR
*
name
,
const
char
*
value
,
UINT
len
)
{
WCHAR
*
valueW
;
...
...
@@ -3112,7 +3112,7 @@ static void update_codepage( UINT screen_dpi )
HKEY
hkey
;
DWORD
size
;
UINT
i
;
DWORD
font_dpi
=
0
;
UINT
font_dpi
=
0
;
BOOL
done
=
FALSE
,
cp_match
=
FALSE
;
static
const
WCHAR
log_pixelsW
[]
=
{
'L'
,
'o'
,
'g'
,
'P'
,
'i'
,
'x'
,
'e'
,
'l'
,
's'
,
0
};
...
...
@@ -3459,7 +3459,7 @@ static BOOL enum_face_charsets( const struct gdi_font_family *family, struct gdi
{
ENUMLOGFONTEXW
elf
;
NEWTEXTMETRICEXW
ntm
;
DWORD
type
,
i
;
UINT
type
,
i
;
if
(
!
face
->
cached_enum_data
)
{
...
...
@@ -3523,7 +3523,7 @@ static BOOL CDECL font_EnumFonts( PHYSDEV dev, LOGFONTW *lf, FONTENUMPROCW proc,
struct
gdi_font_family
*
family
;
struct
gdi_font_face
*
face
;
struct
enum_charset
enum_charsets
[
32
];
DWORD
count
,
charset
;
UINT
count
,
charset
;
charset
=
lf
?
lf
->
lfCharSet
:
DEFAULT_CHARSET
;
...
...
@@ -4960,7 +4960,7 @@ HFONT WINAPI NtGdiHfontCreate( const void *logfont, ULONG size, ULONG type,
static
DWORD
get_associated_charset_info
(
void
)
{
static
DWORD
associated_charset
=
-
1
;
static
int
associated_charset
=
-
1
;
if
(
associated_charset
==
-
1
)
{
...
...
dlls/win32u/input.c
View file @
670033b2
...
...
@@ -994,7 +994,8 @@ BOOL WINAPI NtUserGetKeyboardLayoutName( WCHAR *name )
KEY_NODE_INFORMATION
*
key
=
(
KEY_NODE_INFORMATION
*
)
buffer
;
KEY_VALUE_PARTIAL_INFORMATION
*
value
=
(
KEY_VALUE_PARTIAL_INFORMATION
*
)
buffer
;
WCHAR
klid
[
KL_NAMELENGTH
];
DWORD
tmp
,
i
=
0
;
UINT
id
;
ULONG
len
,
i
=
0
;
HKEY
hkey
,
subkey
;
HKL
layout
;
...
...
@@ -1014,27 +1015,27 @@ BOOL WINAPI NtUserGetKeyboardLayoutName( WCHAR *name )
}
layout
=
NtUserGetKeyboardLayout
(
0
);
tmp
=
HandleToUlong
(
layout
);
if
(
HIWORD
(
tmp
)
==
LOWORD
(
tmp
))
tmp
=
LOWORD
(
tmp
);
sprintf
(
buffer
,
"%08X"
,
tmp
);
id
=
HandleToUlong
(
layout
);
if
(
HIWORD
(
id
)
==
LOWORD
(
id
))
id
=
LOWORD
(
id
);
sprintf
(
buffer
,
"%08X"
,
id
);
asciiz_to_unicode
(
name
,
buffer
);
if
((
hkey
=
reg_open_key
(
NULL
,
keyboard_layouts_keyW
,
sizeof
(
keyboard_layouts_keyW
)
)))
{
while
(
!
NtEnumerateKey
(
hkey
,
i
++
,
KeyNodeInformation
,
key
,
sizeof
(
buffer
)
-
sizeof
(
WCHAR
),
&
tmp
))
sizeof
(
buffer
)
-
sizeof
(
WCHAR
),
&
len
))
{
if
(
!
(
subkey
=
reg_open_key
(
hkey
,
key
->
Name
,
key
->
NameLength
)))
continue
;
memcpy
(
klid
,
key
->
Name
,
key
->
NameLength
);
klid
[
key
->
NameLength
/
sizeof
(
WCHAR
)]
=
0
;
if
(
query_reg_ascii_value
(
subkey
,
"Layout Id"
,
value
,
sizeof
(
buffer
)
)
&&
value
->
Type
==
REG_SZ
)
tmp
=
0xf000
|
(
wcstoul
(
(
const
WCHAR
*
)
value
->
Data
,
NULL
,
16
)
&
0xfff
);
id
=
0xf000
|
(
wcstoul
(
(
const
WCHAR
*
)
value
->
Data
,
NULL
,
16
)
&
0xfff
);
else
tmp
=
wcstoul
(
klid
,
NULL
,
16
);
id
=
wcstoul
(
klid
,
NULL
,
16
);
NtClose
(
subkey
);
if
(
HIWORD
(
layout
)
==
tmp
)
if
(
HIWORD
(
layout
)
==
id
)
{
lstrcpynW
(
name
,
klid
,
KL_NAMELENGTH
);
break
;
...
...
dlls/win32u/menu.c
View file @
670033b2
...
...
@@ -68,7 +68,7 @@ struct menu
UINT
nTotalHeight
;
/* total height of menu items inside menu */
RECT
items_rect
;
/* rectangle within which the items lie, excludes margins and scroll arrows */
LONG
refcount
;
DWORD
dwStyle
;
/* extended menu style */
UINT
dwStyle
;
/* extended menu style */
UINT
cyMax
;
/* max height of the whole menu, 0 is screen height */
HBRUSH
hbrBack
;
/* brush for menu background */
DWORD
dwContextHelpID
;
...
...
@@ -1994,7 +1994,9 @@ static void calc_menu_item_size( HDC hdc, struct menu_item *item, HWND owner, IN
if
(
!
menucharsize
.
cx
)
{
menucharsize
.
cx
=
get_char_dimensions
(
hdc
,
NULL
,
&
menucharsize
.
cy
);
int
height
;
menucharsize
.
cx
=
get_char_dimensions
(
hdc
,
NULL
,
&
height
);
menucharsize
.
cy
=
height
;
/* Win95/98/ME will use menucharsize.cy here. Testing is possible
* but it is unlikely an application will depend on that */
od_item_height
=
HIWORD
(
get_dialog_base_units
()
);
...
...
dlls/win32u/message.c
View file @
670033b2
...
...
@@ -1715,7 +1715,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
if
((
get_window_long
(
hwndTop
,
GWL_STYLE
)
&
(
WS_POPUP
|
WS_CHILD
))
!=
WS_CHILD
)
{
LONG
ret
=
send_message
(
msg
->
hwnd
,
WM_MOUSEACTIVATE
,
(
WPARAM
)
hwndTop
,
UINT
ret
=
send_message
(
msg
->
hwnd
,
WM_MOUSEACTIVATE
,
(
WPARAM
)
hwndTop
,
MAKELONG
(
hittest
,
msg
->
message
)
);
switch
(
ret
)
{
...
...
@@ -2458,7 +2458,7 @@ static void wait_message_reply( UINT flags )
static
LRESULT
retrieve_reply
(
const
struct
send_message_info
*
info
,
size_t
reply_size
,
LRESULT
*
result
)
{
NTSTATUS
status
;
unsigned
int
status
;
void
*
reply_data
=
NULL
;
if
(
reply_size
)
...
...
dlls/win32u/ntgdi_private.h
View file @
670033b2
...
...
@@ -49,7 +49,7 @@ typedef struct tagDC
HDC
hSelf
;
/* Handle to this DC */
struct
gdi_physdev
nulldrv
;
/* physdev for the null driver */
PHYSDEV
physDev
;
/* current top of the physdev stack */
DWORD
thread
;
/* thread owning the DC */
UINT
thread
;
/* thread owning the DC */
LONG
refcount
;
/* thread refcount */
LONG
dirty
;
/* dirty flag */
DC_ATTR
*
attr
;
/* DC attributes accessible by client */
...
...
@@ -229,7 +229,7 @@ extern const struct gdi_dc_funcs *get_display_driver(void) DECLSPEC_HIDDEN;
struct
font_gamma_ramp
{
DWORD
gamma
;
UINT
gamma
;
BYTE
encode
[
256
];
BYTE
decode
[
256
];
};
...
...
dlls/win32u/ntuser_private.h
View file @
670033b2
...
...
@@ -65,7 +65,7 @@ typedef struct tagWND
struct
tagCLASS
*
class
;
/* Window class */
struct
dce
*
dce
;
/* DCE pointer */
WNDPROC
winproc
;
/* Window procedure */
DWORD
tid
;
/* Owner thread id */
UINT
tid
;
/* Owner thread id */
HINSTANCE
hInstance
;
/* Window hInstance (from CreateWindow) */
RECT
client_rect
;
/* Client area rel. to parent client area */
RECT
window_rect
;
/* Whole window rel. to parent client area */
...
...
@@ -75,10 +75,10 @@ typedef struct tagWND
POINT
max_pos
;
/* Position for maximized window */
WCHAR
*
text
;
/* Window text */
struct
win_scroll_bar_info
*
pScroll
;
/* Scroll-bar info */
DWORD
dwStyle
;
/* Window style (from CreateWindow) */
DWORD
dwExStyle
;
/* Extended style (from CreateWindowEx) */
UINT
dwStyle
;
/* Window style (from CreateWindow) */
UINT
dwExStyle
;
/* Extended style (from CreateWindowEx) */
UINT_PTR
wIDmenu
;
/* ID or hmenu (from CreateWindow) */
DWORD
helpContext
;
/* Help context ID */
UINT
helpContext
;
/* Help context ID */
UINT
flags
;
/* Misc. flags (see below) */
HMENU
hSysMenu
;
/* window's copy of System Menu */
HICON
hIcon
;
/* window's icon */
...
...
@@ -131,7 +131,7 @@ struct user_thread_info
struct
user_key_state_info
*
key_state
;
/* Cache of global key state */
struct
imm_thread_data
*
imm_thread_data
;
/* IMM thread data */
HKL
kbd_layout
;
/* Current keyboard layout */
DWORD
kbd_layout_id
;
/* Current keyboard layout ID */
UINT
kbd_layout_id
;
/* Current keyboard layout ID */
struct
rawinput_thread_data
*
rawinput
;
/* RawInput thread local data / buffer */
UINT
spy_indent
;
/* Current spy indent */
};
...
...
dlls/win32u/rawinput.c
View file @
670033b2
...
...
@@ -223,7 +223,7 @@ static struct device *add_device( HKEY key, DWORD type )
struct
device
*
device
;
RID_DEVICE_INFO
info
;
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
unsigned
int
status
;
UINT32
handle
;
void
*
buffer
;
SIZE_T
size
;
...
...
dlls/win32u/sysparams.c
View file @
670033b2
...
...
@@ -2551,7 +2551,7 @@ LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devm
DWORD
flags
,
void
*
lparam
)
{
DEVMODEW
full_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
LONG
ret
=
DISP_CHANGE_SUCCESSFUL
;
int
ret
=
DISP_CHANGE_SUCCESSFUL
;
struct
adapter
*
adapter
;
TRACE
(
"%s %p %p %#x %p
\n
"
,
debugstr_us
(
devname
),
devmode
,
hwnd
,
flags
,
lparam
);
...
...
@@ -3447,7 +3447,7 @@ static void get_real_fontname( LOGFONTW *lf, WCHAR fullname[LF_FACESIZE] )
lstrcpyW
(
fullname
,
lf
->
lfFaceName
);
}
LONG
get_char_dimensions
(
HDC
hdc
,
TEXTMETRICW
*
metric
,
LONG
*
height
)
LONG
get_char_dimensions
(
HDC
hdc
,
TEXTMETRICW
*
metric
,
int
*
height
)
{
SIZE
sz
;
static
const
WCHAR
abcdW
[]
=
...
...
@@ -3488,7 +3488,7 @@ static void get_text_metr_size( HDC hdc, LOGFONTW *lf, TEXTMETRICW *metric, UINT
DWORD
get_dialog_base_units
(
void
)
{
static
LONG
cx
,
cy
;
static
int
cx
,
cy
;
if
(
!
cx
)
{
...
...
dlls/win32u/win32u_private.h
View file @
670033b2
...
...
@@ -329,7 +329,7 @@ extern void track_scroll_bar( HWND hwnd, int scrollbar, POINT pt ) DECLSPEC_HIDD
extern
BOOL
enable_thunk_lock
DECLSPEC_HIDDEN
;
extern
HBRUSH
get_55aa_brush
(
void
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_dialog_base_units
(
void
)
DECLSPEC_HIDDEN
;
extern
LONG
get_char_dimensions
(
HDC
hdc
,
TEXTMETRICW
*
metric
,
LONG
*
height
)
DECLSPEC_HIDDEN
;
extern
LONG
get_char_dimensions
(
HDC
hdc
,
TEXTMETRICW
*
metric
,
int
*
height
)
DECLSPEC_HIDDEN
;
extern
RECT
get_display_rect
(
const
WCHAR
*
display
)
DECLSPEC_HIDDEN
;
extern
UINT
get_monitor_dpi
(
HMONITOR
monitor
)
DECLSPEC_HIDDEN
;
extern
BOOL
get_monitor_info
(
HMONITOR
handle
,
MONITORINFO
*
info
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/window.c
View file @
670033b2
...
...
@@ -2913,7 +2913,7 @@ int map_window_points( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count,
*/
static
void
dump_winpos_flags
(
UINT
flags
)
{
static
const
DWORD
dumped_flags
=
(
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOREDRAW
|
static
const
UINT
dumped_flags
=
(
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOREDRAW
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_SHOWWINDOW
|
SWP_HIDEWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOSENDCHANGING
|
SWP_DEFERERASE
|
SWP_ASYNCWINDOWPOS
|
...
...
dlls/win32u/winstation.c
View file @
670033b2
...
...
@@ -428,7 +428,7 @@ HWND get_desktop_window(void)
WCHAR
desktop
[
MAX_PATH
];
PEB
*
peb
=
NtCurrentTeb
()
->
Peb
;
HANDLE
process
,
thread
;
NTSTATUS
status
;
unsigned
int
status
;
SERVER_START_REQ
(
set_user_object_info
)
{
...
...
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