Commit 2997fc51 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed a few prototypes in the USER driver.

parent 8c02f636
......@@ -2634,8 +2634,8 @@ LONG WINAPI ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode, HWND
DWORD flags, LPVOID lparam )
{
/* Pass the request on to the driver */
if (!USER_Driver.pChangeDisplaySettingsExW) return DISP_CHANGE_FAILED;
return USER_Driver.pChangeDisplaySettingsExW( devname, devmode, hwnd, flags, lparam );
if (!USER_Driver.pChangeDisplaySettingsEx) return DISP_CHANGE_FAILED;
return USER_Driver.pChangeDisplaySettingsEx( devname, devmode, hwnd, flags, lparam );
}
......@@ -2696,6 +2696,6 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
LPDEVMODEW lpDevMode, DWORD dwFlags)
{
/* Pass the request on to the driver */
if (!USER_Driver.pEnumDisplaySettingsExW) return FALSE;
return USER_Driver.pEnumDisplaySettingsExW(lpszDeviceName, iModeNum, lpDevMode, dwFlags);
if (!USER_Driver.pEnumDisplaySettingsEx) return FALSE;
return USER_Driver.pEnumDisplaySettingsEx(lpszDeviceName, iModeNum, lpDevMode, dwFlags);
}
......@@ -122,8 +122,8 @@ static BOOL load_driver(void)
GET_USER_FUNC(GetClipboardFormatName);
GET_USER_FUNC(EndClipboardUpdate);
GET_USER_FUNC(ResetSelectionOwner);
GET_USER_FUNC(ChangeDisplaySettingsExW);
GET_USER_FUNC(EnumDisplaySettingsExW);
GET_USER_FUNC(ChangeDisplaySettingsEx);
GET_USER_FUNC(EnumDisplaySettingsEx);
GET_USER_FUNC(CreateDesktopWindow);
GET_USER_FUNC(CreateWindow);
GET_USER_FUNC(DestroyWindow);
......
......@@ -125,24 +125,24 @@ typedef struct tagUSER_DRIVER {
void (*pAcquireClipboard)(HWND); /* Acquire selection */
BOOL (*pCountClipboardFormats)(void); /* Count available clipboard formats */
void (*pEmptyClipboard)(BOOL); /* Empty clipboard data */
BOOL (*pEndClipboardUpdate)(void); /* End clipboard update */
BOOL (*pEnumClipboardFormats)(UINT); /* Enumerate clipboard formats */
void (*pEndClipboardUpdate)(void); /* End clipboard update */
UINT (*pEnumClipboardFormats)(UINT); /* Enumerate clipboard formats */
BOOL (*pGetClipboardData)(UINT, HANDLE16*, HANDLE*); /* Get specified selection data */
BOOL (*pGetClipboardFormatName)(UINT, LPWSTR, UINT); /* Get a clipboard format name */
INT (*pGetClipboardFormatName)(UINT, LPWSTR, UINT); /* Get a clipboard format name */
BOOL (*pIsClipboardFormatAvailable)(UINT); /* Check if specified format is available */
INT (*pRegisterClipboardFormat)(LPCWSTR); /* Register a clipboard format */
UINT (*pRegisterClipboardFormat)(LPCWSTR); /* Register a clipboard format */
void (*pResetSelectionOwner)(HWND, BOOL);
BOOL (*pSetClipboardData)(UINT, HANDLE16, HANDLE, BOOL); /* Set specified selection data */
/* display modes */
LONG (*pChangeDisplaySettingsExW)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
BOOL (*pEnumDisplaySettingsExW)(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
LONG (*pChangeDisplaySettingsEx)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
BOOL (*pEnumDisplaySettingsEx)(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
/* windowing functions */
BOOL (*pCreateDesktopWindow)(HWND);
BOOL (*pCreateWindow)(HWND,CREATESTRUCTA*,BOOL);
BOOL (*pDestroyWindow)(HWND);
void (*pDestroyWindow)(HWND);
HDC (*pGetDCEx)(HWND,HRGN,DWORD);
DWORD (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
BOOL (*pReleaseDC)(HWND,HDC,BOOL);
INT (*pReleaseDC)(HWND,HDC,BOOL);
BOOL (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
void (*pSetFocus)(HWND);
HWND (*pSetParent)(HWND,HWND);
......@@ -150,7 +150,7 @@ typedef struct tagUSER_DRIVER {
int (*pSetWindowRgn)(HWND,HRGN,BOOL);
void (*pSetWindowIcon)(HWND,UINT,HICON);
void (*pSetWindowStyle)(HWND,DWORD);
BOOL (*pSetWindowText)(HWND,LPCWSTR);
void (*pSetWindowText)(HWND,LPCWSTR);
BOOL (*pShowWindow)(HWND,INT);
void (*pSysCommandSizeMove)(HWND,WPARAM);
HWND (*pWindowFromDC)(HDC);
......
......@@ -140,7 +140,6 @@ static int selectionAcquired = 0; /* Contains the current selection
static Window selectionWindow = None; /* The top level X window which owns the selection */
static Atom selectionCacheSrc = XA_PRIMARY; /* The selection source from which the clipboard cache was filled */
INT X11DRV_RegisterClipboardFormat(LPCWSTR FormatName);
void X11DRV_EmptyClipboard(BOOL keepunowned);
void X11DRV_EndClipboardUpdate(void);
static HANDLE X11DRV_CLIPBOARD_ImportClipboardData(LPBYTE lpdata, UINT cBytes);
......@@ -2067,7 +2066,7 @@ static BOOL X11DRV_CLIPBOARD_IsSelectionOwner(void)
* Registers a custom X clipboard format
* Returns: Format id or 0 on failure
*/
INT X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
UINT X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
{
LPWINE_CLIPFORMAT lpFormat;
......
......@@ -561,7 +561,7 @@ HDC X11DRV_GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
/***********************************************************************
* X11DRV_ReleaseDC (X11DRV.@)
*/
BOOL X11DRV_ReleaseDC( HWND hwnd, HDC hdc, BOOL end_paint )
INT X11DRV_ReleaseDC( HWND hwnd, HDC hdc, BOOL end_paint )
{
enum x11drv_escape_codes escape = X11DRV_GET_DCE;
struct dce *dce;
......
......@@ -160,10 +160,10 @@ void X11DRV_Settings_Init(void)
}
/***********************************************************************
* EnumDisplaySettingsExW (X11DRV.@)
* EnumDisplaySettingsEx (X11DRV.@)
*
*/
BOOL X11DRV_EnumDisplaySettingsExW( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags)
BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags)
{
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;
......@@ -231,11 +231,11 @@ static const char * _DM_fields(DWORD fields)
#undef _X_FIELD
/***********************************************************************
* ChangeDisplaySettingsExW (X11DRV.@)
* ChangeDisplaySettingsEx (X11DRV.@)
*
*/
LONG X11DRV_ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode,
HWND hwnd, DWORD flags, LPVOID lpvoid )
LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
HWND hwnd, DWORD flags, LPVOID lpvoid )
{
DWORD i;
DEVMODEW dm;
......@@ -252,7 +252,7 @@ LONG X11DRV_ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode,
else
{
TRACE("Return to original display mode (%s)\n", handler_name);
if (!X11DRV_EnumDisplaySettingsExW(devname, dd_mode_default, &dm, 0))
if (!X11DRV_EnumDisplaySettingsEx(devname, dd_mode_default, &dm, 0))
{
ERR("Default mode not found!\n");
return DISP_CHANGE_BADMODE;
......
......@@ -732,7 +732,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data
/*****************************************************************
* SetWindowText (X11DRV.@)
*/
BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
void X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
{
Display *display = thread_display();
UINT count;
......@@ -748,7 +748,7 @@ BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, count )))
{
ERR("Not enough memory for window text\n");
return FALSE;
return;
}
WideCharToMultiByte(CP_UNIXCP, 0, text, -1, buffer, count, NULL, NULL);
......@@ -757,7 +757,7 @@ BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
{
ERR("Not enough memory for window text in UTF-8\n");
HeapFree( GetProcessHeap(), 0, buffer );
return FALSE;
return;
}
WideCharToMultiByte(CP_UTF8, 0, text, strlenW(text), utf8_buffer, count, NULL, NULL);
......@@ -780,20 +780,19 @@ BOOL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
HeapFree( GetProcessHeap(), 0, utf8_buffer );
HeapFree( GetProcessHeap(), 0, buffer );
}
return TRUE;
}
/***********************************************************************
* DestroyWindow (X11DRV.@)
*/
BOOL X11DRV_DestroyWindow( HWND hwnd )
void X11DRV_DestroyWindow( HWND hwnd )
{
struct x11drv_thread_data *thread_data = x11drv_thread_data();
Display *display = thread_data->display;
struct x11drv_win_data *data;
if (!(data = X11DRV_get_win_data( hwnd ))) return TRUE;
if (!(data = X11DRV_get_win_data( hwnd ))) return;
free_window_dce( data );
destroy_whole_window( display, data );
......@@ -806,8 +805,6 @@ BOOL X11DRV_DestroyWindow( HWND hwnd )
XDeleteContext( display, (XID)hwnd, win_data_context );
wine_tsx11_unlock();
HeapFree( GetProcessHeap(), 0, data );
return TRUE;
}
......
......@@ -81,8 +81,8 @@
@ cdecl SetCursorPos(long long) X11DRV_SetCursorPos
@ cdecl GetScreenSaveActive() X11DRV_GetScreenSaveActive
@ cdecl SetScreenSaveActive(long) X11DRV_SetScreenSaveActive
@ cdecl ChangeDisplaySettingsExW (ptr ptr long long long) X11DRV_ChangeDisplaySettingsExW
@ cdecl EnumDisplaySettingsExW (ptr long ptr long) X11DRV_EnumDisplaySettingsExW
@ cdecl ChangeDisplaySettingsEx(ptr ptr long long long) X11DRV_ChangeDisplaySettingsEx
@ cdecl EnumDisplaySettingsEx(ptr long ptr long) X11DRV_EnumDisplaySettingsEx
@ cdecl AcquireClipboard(long) X11DRV_AcquireClipboard
@ cdecl CountClipboardFormats() X11DRV_CountClipboardFormats
@ cdecl CreateDesktopWindow(long) X11DRV_CreateDesktopWindow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment