mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:55:50 +00:00
winex11: Use int instead of long types in a few places.
This commit is contained in:
parent
1a5bfe1307
commit
7d614be43c
|
@ -163,7 +163,7 @@ void init_registry_display_settings(void)
|
|||
DISPLAY_DEVICEW dd = {sizeof(dd)};
|
||||
UNICODE_STRING device_name;
|
||||
DWORD i = 0;
|
||||
LONG ret;
|
||||
int ret;
|
||||
|
||||
while (!NtUserEnumDisplayDevices( NULL, i++, &dd, 0 ))
|
||||
{
|
||||
|
|
|
@ -1268,7 +1268,7 @@ static int get_window_wm_state( Display *display, Window window )
|
|||
static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL update_window )
|
||||
{
|
||||
struct x11drv_win_data *data = get_win_data( hwnd );
|
||||
DWORD style;
|
||||
UINT style;
|
||||
|
||||
if (!data) return;
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ static DWORD xdnd_action_to_drop_effect( long action )
|
|||
}
|
||||
|
||||
|
||||
static long drop_effect_to_xdnd_action( DWORD effect )
|
||||
static long drop_effect_to_xdnd_action( UINT effect )
|
||||
{
|
||||
if (effect == DROPEFFECT_COPY)
|
||||
return x11drv_atom(XdndActionCopy);
|
||||
|
@ -1801,7 +1801,7 @@ static void handle_xdnd_position_event( HWND hwnd, XClientMessageEvent *event )
|
|||
{
|
||||
struct dnd_position_event_params params;
|
||||
XClientMessageEvent e;
|
||||
DWORD effect;
|
||||
UINT effect;
|
||||
|
||||
params.hwnd = HandleToUlong( hwnd );
|
||||
params.point = root_to_virtual_screen( event->data.l[2] >> 16, event->data.l[2] & 0xFFFF );
|
||||
|
|
|
@ -1704,7 +1704,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
|
|||
IO_STATUS_BLOCK io;
|
||||
UINT64 hash = 0;
|
||||
HANDLE file;
|
||||
NTSTATUS status;
|
||||
int status;
|
||||
|
||||
for (i = 0; i < buflen; i++) hash = (hash << 16) - hash + buffer[i];
|
||||
for (i = 0; i < sizeof(hash) * 2; i++)
|
||||
|
|
|
@ -1132,7 +1132,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
|
|||
/***********************************************************************
|
||||
* X11DRV_send_keyboard_input
|
||||
*/
|
||||
static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags, DWORD time )
|
||||
static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT flags, UINT time )
|
||||
{
|
||||
INPUT input;
|
||||
|
||||
|
@ -1275,7 +1275,7 @@ static void adjust_lock_state( BYTE *keystate, HWND hwnd, WORD vkey, WORD scan,
|
|||
}
|
||||
}
|
||||
|
||||
static void update_lock_state( HWND hwnd, WORD vkey, UINT state, DWORD time )
|
||||
static void update_lock_state( HWND hwnd, WORD vkey, UINT state, UINT time )
|
||||
{
|
||||
BYTE keystate[256];
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ static DWORD get_user_dashes( char *res, const DWORD *style, DWORD len )
|
|||
}
|
||||
else dashes[pos++] = dashes[i];
|
||||
}
|
||||
for (i = 0; i < pos; i++) res[i] = min( dashes[i], 255 );
|
||||
for (i = 0; i < pos; i++) res[i] = (char)min( dashes[i], 255 );
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ HPEN CDECL X11DRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern
|
|||
(logpen.lopnStyle & PS_STYLE_MASK) != PS_USERSTYLE &&
|
||||
(logpen.lopnStyle & PS_STYLE_MASK) != PS_ALTERNATE)
|
||||
for(i = 0; i < physDev->pen.dash_len; i++)
|
||||
physDev->pen.dashes[i] = min( physDev->pen.dashes[i] * physDev->pen.width, 255 );
|
||||
physDev->pen.dashes[i] = (char)min( physDev->pen.dashes[i] * physDev->pen.width, 255 );
|
||||
|
||||
free( elp );
|
||||
|
||||
|
|
|
@ -737,7 +737,7 @@ static void set_size_hints( struct x11drv_win_data *data, DWORD style )
|
|||
/***********************************************************************
|
||||
* set_mwm_hints
|
||||
*/
|
||||
static void set_mwm_hints( struct x11drv_win_data *data, DWORD style, DWORD ex_style )
|
||||
static void set_mwm_hints( struct x11drv_win_data *data, UINT style, UINT ex_style )
|
||||
{
|
||||
MwmHints mwm_hints;
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data )
|
|||
*/
|
||||
void update_net_wm_states( struct x11drv_win_data *data )
|
||||
{
|
||||
DWORD i, style, ex_style, new_state = 0;
|
||||
UINT i, style, ex_style, new_state = 0;
|
||||
|
||||
if (!data->managed) return;
|
||||
if (data->whole_window == root_window) return;
|
||||
|
@ -2053,7 +2053,7 @@ HWND create_foreign_window( Display *display, Window xwin )
|
|||
Window *xchildren;
|
||||
unsigned int nchildren;
|
||||
XWindowAttributes attr;
|
||||
DWORD style = WS_CLIPCHILDREN;
|
||||
UINT style = WS_CLIPCHILDREN;
|
||||
UNICODE_STRING class_name;
|
||||
|
||||
if (!class_registered)
|
||||
|
@ -2592,7 +2592,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|||
{
|
||||
struct x11drv_thread_data *thread_data;
|
||||
struct x11drv_win_data *data;
|
||||
DWORD new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE );
|
||||
UINT new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE );
|
||||
RECT old_window_rect, old_whole_rect, old_client_rect;
|
||||
int event_type;
|
||||
|
||||
|
|
|
@ -823,7 +823,7 @@ extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
|
|||
extern BOOL X11DRV_InitXIM( const WCHAR *input_style ) DECLSPEC_HIDDEN;
|
||||
extern XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_SetupXIM(void) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_XIMLookupChars( const char *str, DWORD count ) DECLSPEC_HIDDEN;
|
||||
extern void X11DRV_XIMLookupChars( const char *str, UINT count ) DECLSPEC_HIDDEN;
|
||||
|
||||
#define XEMBED_MAPPED (1 << 0)
|
||||
|
||||
|
|
|
@ -61,17 +61,16 @@ static XIMStyle ximStyle = 0;
|
|||
static XIMStyle ximStyleRoot = 0;
|
||||
static XIMStyle ximStyleRequest = STYLE_CALLBACK;
|
||||
|
||||
static void X11DRV_ImmSetInternalString(DWORD dwOffset,
|
||||
DWORD selLength, LPWSTR lpComp, DWORD dwCompLen)
|
||||
static void X11DRV_ImmSetInternalString(UINT offset, UINT selLength, LPWSTR lpComp, UINT len)
|
||||
{
|
||||
/* Composition strings are edited in chunks */
|
||||
unsigned int byte_length = dwCompLen * sizeof(WCHAR);
|
||||
unsigned int byte_offset = dwOffset * sizeof(WCHAR);
|
||||
unsigned int byte_length = len * sizeof(WCHAR);
|
||||
unsigned int byte_offset = offset * sizeof(WCHAR);
|
||||
unsigned int byte_selection = selLength * sizeof(WCHAR);
|
||||
int byte_expansion = byte_length - byte_selection;
|
||||
LPBYTE ptr_new;
|
||||
|
||||
TRACE("( %i, %i, %p, %d):\n", dwOffset, selLength, lpComp, dwCompLen );
|
||||
TRACE("( %i, %i, %p, %d):\n", offset, selLength, lpComp, len );
|
||||
|
||||
if (byte_expansion + dwCompStringLength >= dwCompStringSize)
|
||||
{
|
||||
|
@ -96,7 +95,7 @@ static void X11DRV_ImmSetInternalString(DWORD dwOffset,
|
|||
CompositionString, dwCompStringLength );
|
||||
}
|
||||
|
||||
void X11DRV_XIMLookupChars( const char *str, DWORD count )
|
||||
void X11DRV_XIMLookupChars( const char *str, UINT count )
|
||||
{
|
||||
WCHAR *output;
|
||||
DWORD len;
|
||||
|
|
Loading…
Reference in a new issue