Merged clipboard driver into USER driver.

Moved all ttydrv source files to dlls/ttydrv.
Load functions pointer for the USER driver from the graphics driver
dll with GetProcAddress.
This commit is contained in:
Alexandre Julliard 2000-08-10 01:16:19 +00:00
parent 5ab9d860f2
commit 42d20f9dca
55 changed files with 1010 additions and 1343 deletions

4
configure vendored
View File

@ -6405,7 +6405,6 @@ files/Makefile
graphics/Makefile graphics/Makefile
graphics/enhmetafiledrv/Makefile graphics/enhmetafiledrv/Makefile
graphics/metafiledrv/Makefile graphics/metafiledrv/Makefile
graphics/ttydrv/Makefile
graphics/win16drv/Makefile graphics/win16drv/Makefile
graphics/x11drv/Makefile graphics/x11drv/Makefile
if1632/Makefile if1632/Makefile
@ -6450,7 +6449,6 @@ tsx11/Makefile
unicode/Makefile unicode/Makefile
win32/Makefile win32/Makefile
windows/Makefile windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 windows/x11drv/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF EOF
cat >> $CONFIG_STATUS <<EOF cat >> $CONFIG_STATUS <<EOF
@ -6641,7 +6639,6 @@ files/Makefile
graphics/Makefile graphics/Makefile
graphics/enhmetafiledrv/Makefile graphics/enhmetafiledrv/Makefile
graphics/metafiledrv/Makefile graphics/metafiledrv/Makefile
graphics/ttydrv/Makefile
graphics/win16drv/Makefile graphics/win16drv/Makefile
graphics/x11drv/Makefile graphics/x11drv/Makefile
if1632/Makefile if1632/Makefile
@ -6686,7 +6683,6 @@ tsx11/Makefile
unicode/Makefile unicode/Makefile
win32/Makefile win32/Makefile
windows/Makefile windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile "} windows/x11drv/Makefile "}
EOF EOF
cat >> $CONFIG_STATUS <<\EOF cat >> $CONFIG_STATUS <<\EOF

View File

@ -1074,7 +1074,6 @@ files/Makefile
graphics/Makefile graphics/Makefile
graphics/enhmetafiledrv/Makefile graphics/enhmetafiledrv/Makefile
graphics/metafiledrv/Makefile graphics/metafiledrv/Makefile
graphics/ttydrv/Makefile
graphics/win16drv/Makefile graphics/win16drv/Makefile
graphics/x11drv/Makefile graphics/x11drv/Makefile
if1632/Makefile if1632/Makefile
@ -1119,7 +1118,6 @@ tsx11/Makefile
unicode/Makefile unicode/Makefile
win32/Makefile win32/Makefile
windows/Makefile windows/Makefile
windows/ttydrv/Makefile
windows/x11drv/Makefile ]) windows/x11drv/Makefile ])
if test "$have_x" = "no" if test "$have_x" = "no"

View File

@ -159,7 +159,7 @@ static inline LRESULT WINAPI DesktopWndProc_locked( WND *wndPtr, UINT message,
return 1; return 1;
case WM_ERASEBKGND: case WM_ERASEBKGND:
if(!USER_Driver->pIsSingleWindow()) if(!USER_Driver.pIsSingleWindow())
return 1; return 1;
return DESKTOP_DoEraseBkgnd( hwnd, (HDC)wParam, desktopPtr ); return DESKTOP_DoEraseBkgnd( hwnd, (HDC)wParam, desktopPtr );

View File

@ -787,7 +787,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr LPDIRECTINPUTDEVICE2A iface,DWORD len,LPVOID ptr
) )
{ {
return USER_Driver->pGetDIState(len, ptr)?DI_OK:E_FAIL; return USER_Driver.pGetDIState(len, ptr)?DI_OK:E_FAIL;
} }
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData( static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
@ -802,7 +802,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
TRACE("(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n", TRACE("(this=%p,%ld,%p,%p(%ld)),0x%08lx)\n",
This,dodsize,dod,entries,entries?*entries:0,flags); This,dodsize,dod,entries,entries?*entries:0,flags);
ret=USER_Driver->pGetDIData( ret=USER_Driver.pGetDIData(
This->keystate, dodsize, dod, entries, flags)?DI_OK:E_FAIL; This->keystate, dodsize, dod, entries, flags)?DI_OK:E_FAIL;
for (i=0;i<*entries;i++) { for (i=0;i<*entries;i++) {
dod[i].dwTimeStamp = GetTickCount(); dod[i].dwTimeStamp = GetTickCount();
@ -821,11 +821,11 @@ static HRESULT WINAPI SysKeyboardAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
KEYBOARD_CONFIG no_auto; KEYBOARD_CONFIG no_auto;
/* Save the original config */ /* Save the original config */
USER_Driver->pGetKeyboardConfig(&(This->initial_config)); USER_Driver.pGetKeyboardConfig(&(This->initial_config));
/* Now, remove auto-repeat */ /* Now, remove auto-repeat */
no_auto.auto_repeat = FALSE; no_auto.auto_repeat = FALSE;
USER_Driver->pSetKeyboardConfig(&no_auto, WINE_KEYBOARD_CONFIG_AUTO_REPEAT); USER_Driver.pSetKeyboardConfig(&no_auto, WINE_KEYBOARD_CONFIG_AUTO_REPEAT);
This->acquired = 1; This->acquired = 1;
} }
@ -840,7 +840,7 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
if (This->acquired == 1) { if (This->acquired == 1) {
/* Restore the original configuration */ /* Restore the original configuration */
USER_Driver->pSetKeyboardConfig(&(This->initial_config), 0xFFFFFFFF); USER_Driver.pSetKeyboardConfig(&(This->initial_config), 0xFFFFFFFF);
This->acquired = 0; This->acquired = 0;
} else { } else {
ERR("Unacquiring a not-acquired device !!!\n"); ERR("Unacquiring a not-acquired device !!!\n");
@ -1431,7 +1431,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
point.x = This->win_centerX; point.x = This->win_centerX;
point.y = This->win_centerY; point.y = This->win_centerY;
MapWindowPoints(This->win, HWND_DESKTOP, &point, 1); MapWindowPoints(This->win, HWND_DESKTOP, &point, 1);
USER_Driver->pMoveCursor( point.x, point.y ); USER_Driver.pMoveCursor( point.x, point.y );
This->need_warp = WARP_STARTED; This->need_warp = WARP_STARTED;
} }
@ -1493,7 +1493,7 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceState(
point.x = This->win_centerX; point.x = This->win_centerX;
point.y = This->win_centerY; point.y = This->win_centerY;
MapWindowPoints(This->win, HWND_DESKTOP, &point, 1); MapWindowPoints(This->win, HWND_DESKTOP, &point, 1);
USER_Driver->pMoveCursor( point.x, point.y ); USER_Driver.pMoveCursor( point.x, point.y );
This->need_warp = WARP_STARTED; This->need_warp = WARP_STARTED;
} }
@ -1560,7 +1560,7 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE2A iface,
point.y = This->win_centerY; point.y = This->win_centerY;
MapWindowPoints(This->win, HWND_DESKTOP, &point, 1); MapWindowPoints(This->win, HWND_DESKTOP, &point, 1);
USER_Driver->pMoveCursor( point.x, point.y ); USER_Driver.pMoveCursor( point.x, point.y );
This->need_warp = WARP_STARTED; This->need_warp = WARP_STARTED;
} }

View File

@ -8,20 +8,16 @@ EXTRALIBS = $(LIBS)
IMPORTS = user32 gdi32 kernel32 IMPORTS = user32 gdi32 kernel32
C_SRCS = \ C_SRCS = \
ttydrv_main.c bitmap.c \
dc.c \
EXTRA_OBJS = \ graphics.c \
$(TOPOBJDIR)/graphics/ttydrv/ttydrv.o \ objects.c \
$(TOPOBJDIR)/windows/ttydrv/ttydrv.o palette.c \
ttydrv_main.c \
SUBDIRS = \ user.c \
$(TOPOBJDIR)/graphics/ttydrv \ wnd.c
$(TOPOBJDIR)/windows/ttydrv
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@
$(EXTRA_OBJS): $(TOOLSUBDIRS) dummy
@cd `dirname $@` && $(MAKE) `basename $@`
### Dependencies: ### Dependencies:

View File

@ -10,7 +10,7 @@
#include "winbase.h" #include "winbase.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/ /**********************************************************************/
@ -169,3 +169,78 @@ static LONG TTYDRV_DC_SetBitmapBits(BITMAPOBJ *bitmap, void *bits, LONG count)
return count; return count;
} }
/***********************************************************************
* TTYDRV_BITMAP_CreateDIBSection
*/
HBITMAP TTYDRV_BITMAP_CreateDIBSection(
DC *dc, BITMAPINFO *bmi, UINT usage,
LPVOID *bits, HANDLE section, DWORD offset)
{
FIXME("(%p, %p, %u, %p, 0x%04x, %ld): stub\n",
dc, bmi, usage, bits, section, offset);
return (HBITMAP) NULL;
}
/**********************************************************************
* TTYDRV_BITMAP_CreateDIBSection16
*/
HBITMAP16 TTYDRV_DIB_CreateDIBSection16(
DC *dc, BITMAPINFO *bmi, UINT16 usage,
SEGPTR *bits, HANDLE section, DWORD offset)
{
FIXME("(%p, %p, %u, %p, 0x%04x, %ld): stub\n",
dc, bmi, usage, bits, section, offset);
return (HBITMAP16) NULL;
}
/***********************************************************************
* TTYDRV_BITMAP_DeleteDIBSection
*/
void TTYDRV_BITMAP_DeleteDIBSection(BITMAPOBJ *bmp)
{
FIXME("(%p): stub\n", bmp);
}
/***********************************************************************
* TTYDRV_BITMAP_GetDIBits
*/
INT TTYDRV_BITMAP_GetDIBits(
BITMAPOBJ *bmp, DC *dc, UINT startscan, UINT lines,
LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap)
{
FIXME("(%p, %p, %u, %u, %p, %p, %u, 0x%04x): stub\n",
bmp, dc, startscan, lines, bits, info, coloruse, hbitmap);
return 0;
}
/***********************************************************************
* TTYDRV_BITMAP_SetDIBits
*/
INT TTYDRV_BITMAP_SetDIBits(
BITMAPOBJ *bmp, DC *dc, UINT startscan, UINT lines,
LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap)
{
FIXME("(%p, %p, %u, %u, %p, %p, %u, 0x%04x): stub\n",
bmp, dc, startscan, lines, bits, info, coloruse, hbitmap);
return 0;
}
/***********************************************************************
* TTYDRV_DC_SetDIBitsToDevice
*/
INT TTYDRV_DC_SetDIBitsToDevice(DC *dc, INT xDest, INT yDest, DWORD cx,
DWORD cy, INT xSrc, INT ySrc,
UINT startscan, UINT lines, LPCVOID bits,
const BITMAPINFO *info, UINT coloruse)
{
FIXME("(%p, %d, %d, %ld, %ld, %d, %d, %u, %u, %p, %p, %u): stub\n",
dc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, bits, info, coloruse);
return 0;
}

View File

@ -1,19 +1,22 @@
/* /*
* TTY driver * TTY DC driver
* *
* Copyright 1998-1999 Patrik Stridvall * Copyright 1999 Patrik Stridvall
*/ */
#include "config.h" #include "config.h"
#include "gdi.h" #include "gdi.h"
#include "bitmap.h" #include "bitmap.h"
#include "color.h"
#include "dc.h" #include "dc.h"
#include "palette.h"
#include "ttydrv.h" #include "ttydrv.h"
#include "winbase.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/
static const DC_FUNCTIONS TTYDRV_DC_Driver = static const DC_FUNCTIONS TTYDRV_DC_Driver =
{ {
@ -169,7 +172,7 @@ BOOL TTYDRV_GDI_Initialize(void)
TTYDRV_DC_DevCaps.horzRes = 640; /* FIXME: Screen width in pixel */ TTYDRV_DC_DevCaps.horzRes = 640; /* FIXME: Screen width in pixel */
TTYDRV_DC_DevCaps.vertRes = 480; /* FIXME: Screen height in pixel */ TTYDRV_DC_DevCaps.vertRes = 480; /* FIXME: Screen height in pixel */
TTYDRV_DC_DevCaps.bitsPixel = 1; /* FIXME: Bits per pixel */ TTYDRV_DC_DevCaps.bitsPixel = 1; /* FIXME: Bits per pixel */
TTYDRV_DC_DevCaps.sizePalette = 0; /* FIXME: ??? */ TTYDRV_DC_DevCaps.sizePalette = 256; /* FIXME: ??? */
/* Resolution will be adjusted during the font init */ /* Resolution will be adjusted during the font init */
@ -189,3 +192,89 @@ void TTYDRV_GDI_Finalize(void)
{ {
TTYDRV_PALETTE_Finalize(); TTYDRV_PALETTE_Finalize();
} }
/***********************************************************************
* TTYDRV_DC_CreateDC
*/
BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODEA *initData)
{
TTYDRV_PDEVICE *physDev;
BITMAPOBJ *bmp;
TRACE("(%p, %s, %s, %s, %p)\n",
dc, debugstr_a(driver), debugstr_a(device),
debugstr_a(output), initData);
dc->physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(TTYDRV_PDEVICE));
if(!dc->physDev) {
ERR("Can't allocate physDev\n");
return FALSE;
}
physDev = (TTYDRV_PDEVICE *) dc->physDev;
dc->w.devCaps = &TTYDRV_DC_DevCaps;
if(dc->w.flags & DC_MEMORY){
physDev->window = NULL;
physDev->cellWidth = 1;
physDev->cellHeight = 1;
TTYDRV_DC_CreateBitmap(dc->w.hBitmap);
bmp = (BITMAPOBJ *) GDI_GetObjPtr(dc->w.hBitmap, BITMAP_MAGIC);
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
dc->w.hVisRgn = CreateRectRgnIndirect( &dc->w.totalExtent );
GDI_HEAP_UNLOCK( dc->w.hBitmap );
} else {
physDev->window = TTYDRV_GetRootWindow();
physDev->cellWidth = cell_width;
physDev->cellHeight = cell_height;
dc->w.bitsPerPixel = 1;
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = cell_width * screen_cols;
dc->w.totalExtent.bottom = cell_height * screen_rows;
dc->w.hVisRgn = CreateRectRgnIndirect( &dc->w.totalExtent );
}
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_DeleteDC
*/
BOOL TTYDRV_DC_DeleteDC(DC *dc)
{
TRACE("(%p)\n", dc);
HeapFree( GetProcessHeap(), 0, dc->physDev );
dc->physDev = NULL;
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_Escape
*/
INT TTYDRV_DC_Escape(DC *dc, INT nEscape, INT cbInput,
SEGPTR lpInData, SEGPTR lpOutData)
{
return 0;
}
/***********************************************************************
* TTYDRV_DC_SetDeviceClipping
*/
void TTYDRV_DC_SetDeviceClipping(DC *dc)
{
TRACE("(%p)\n", dc);
}

View File

@ -7,10 +7,11 @@
#include "config.h" #include "config.h"
#include "dc.h" #include "dc.h"
#include "heap.h"
#include "debugtools.h" #include "debugtools.h"
#include "ttydrv.h" #include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
/*********************************************************************** /***********************************************************************
* TTYDRV_DC_Arc * TTYDRV_DC_Arc
@ -306,3 +307,164 @@ COLORREF TTYDRV_DC_SetTextColor(DC *dc, COLORREF color)
return oldColor; return oldColor;
} }
/***********************************************************************
* TTYDRV_DC_BitBlt
*/
BOOL TTYDRV_DC_BitBlt(DC *dcDst, INT xDst, INT yDst,
INT width, INT height, DC *dcSrc,
INT xSrc, INT ySrc, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %p, %d, %d, %lu): stub\n",
dcDst, xDst, yDst, width, height,
dcSrc, xSrc, ySrc, rop
);
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_PatBlt
*/
BOOL TTYDRV_DC_PatBlt(DC *dc, INT left, INT top,
INT width, INT height, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %lu): stub\n",
dc, left, top, width, height, rop
);
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_StretchBlt
*/
BOOL TTYDRV_DC_StretchBlt(DC *dcDst, INT xDst, INT yDst,
INT widthDst, INT heightDst,
DC *dcSrc, INT xSrc, INT ySrc,
INT widthSrc, INT heightSrc, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %p, %d, %d, %d, %d, %lu): stub\n",
dcDst, xDst, yDst, widthDst, heightDst,
dcSrc, xSrc, ySrc, widthSrc, heightSrc, rop
);
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_ExtTextOut
*/
BOOL TTYDRV_DC_ExtTextOut(DC *dc, INT x, INT y, UINT flags,
const RECT *lpRect, LPCWSTR str, UINT count,
const INT *lpDx)
{
#ifdef WINE_CURSES
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
INT row, col;
LPSTR ascii;
TRACE("(%p, %d, %d, 0x%08x, %p, %s, %d, %p)\n",
dc, x, y, flags, lpRect, debugstr_wn(str, count), count, lpDx);
if(!physDev->window)
return FALSE;
/* FIXME: Is this really correct? */
if(dc->w.textAlign & TA_UPDATECP) {
x = dc->w.CursPosX;
y = dc->w.CursPosY;
}
x = XLPTODP(dc, x);
y = YLPTODP(dc, y);
row = (dc->w.DCOrgY + y) / physDev->cellHeight;
col = (dc->w.DCOrgX + x) / physDev->cellWidth;
ascii = HeapAlloc( GetProcessHeap(), 0, count+1 );
lstrcpynWtoA(ascii, str, count+1);
mvwaddnstr(physDev->window, row, col, ascii, count);
HeapFree( GetProcessHeap(), 0, ascii );
wrefresh(physDev->window);
if(dc->w.textAlign & TA_UPDATECP) {
dc->w.CursPosX += count * physDev->cellWidth;
dc->w.CursPosY += physDev->cellHeight;
}
return TRUE;
#else /* defined(WINE_CURSES) */
FIXME("(%p, %d, %d, 0x%08x, %p, %s, %d, %p): stub\n",
dc, x, y, flags, lpRect, debugstr_wn(str,count), count, lpDx);
return TRUE;
#endif /* defined(WINE_CURSES) */
}
/***********************************************************************
* TTYDRV_DC_GetCharWidth
*/
BOOL TTYDRV_DC_GetCharWidth(DC *dc, UINT firstChar, UINT lastChar,
LPINT buffer)
{
UINT c;
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
FIXME("(%p, %u, %u, %p): semistub\n", dc, firstChar, lastChar, buffer);
for(c=firstChar; c<=lastChar; c++) {
buffer[c-firstChar] = physDev->cellWidth;
}
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_GetTextExtentPoint
*/
BOOL TTYDRV_DC_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count,
LPSIZE size)
{
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
TRACE("(%p, %s, %d, %p)\n", dc, debugstr_wn(str, count), count, size);
size->cx = count * physDev->cellWidth;
size->cy = physDev->cellHeight;
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_GetTextMetrics
*/
BOOL TTYDRV_DC_GetTextMetrics(DC *dc, LPTEXTMETRICA lptm)
{
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
TRACE("(%p, %p)\n", dc, lptm);
lptm->tmHeight = physDev->cellHeight;
lptm->tmAscent = 0;
lptm->tmDescent = 0;
lptm->tmInternalLeading = 0;
lptm->tmExternalLeading = 0;
lptm->tmAveCharWidth = physDev->cellWidth;
lptm->tmMaxCharWidth = physDev->cellWidth;
lptm->tmWeight = FW_MEDIUM;
lptm->tmOverhang = 0;
lptm->tmDigitizedAspectX = physDev->cellWidth;
lptm->tmDigitizedAspectY = physDev->cellHeight;
lptm->tmFirstChar = 32;
lptm->tmLastChar = 255;
lptm->tmDefaultChar = 0;
lptm->tmBreakChar = 32;
lptm->tmItalic = FALSE;
lptm->tmUnderlined = FALSE;
lptm->tmStruckOut = FALSE;
lptm->tmPitchAndFamily = TMPF_FIXED_PITCH|TMPF_DEVICE;
lptm->tmCharSet = ANSI_CHARSET;
return TRUE;
}

View File

@ -13,17 +13,59 @@
#include "ttydrv.h" #include "ttydrv.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/ /**********************************************************************/
extern HBITMAP TTYDRV_DC_BITMAP_SelectObject(DC *dc, HBITMAP hbitmap, BITMAPOBJ *bitmap); extern HBITMAP TTYDRV_DC_BITMAP_SelectObject(DC *dc, HBITMAP hbitmap, BITMAPOBJ *bitmap);
extern HBRUSH TTYDRV_DC_BRUSH_SelectObject(DC *dc, HBRUSH hbrush, BRUSHOBJ *brush);
extern HFONT TTYDRV_DC_FONT_SelectObject(DC* dc, HFONT hfont, FONTOBJ *font);
extern HPEN TTYDRV_DC_PEN_SelectObject(DC *dc, HBRUSH hpen, PENOBJ *pen);
extern BOOL TTYDRV_DC_BITMAP_DeleteObject(HBITMAP hbitmap, BITMAPOBJ *bitmap); extern BOOL TTYDRV_DC_BITMAP_DeleteObject(HBITMAP hbitmap, BITMAPOBJ *bitmap);
/***********************************************************************
* TTYDRV_DC_BRUSH_SelectObject
*/
static HBRUSH TTYDRV_DC_BRUSH_SelectObject(DC *dc, HBRUSH hbrush, BRUSHOBJ *brush)
{
HBRUSH hPreviousBrush;
TRACE("(%p, 0x%04x, %p)\n", dc, hbrush, brush);
hPreviousBrush = dc->w.hBrush;
dc->w.hBrush = hbrush;
return hPreviousBrush;
}
/***********************************************************************
* TTYDRV_DC_FONT_SelectObject
*/
static HFONT TTYDRV_DC_FONT_SelectObject(DC* dc, HFONT hfont, FONTOBJ *font)
{
HFONT hPreviousFont;
TRACE("(%p, 0x%04x, %p)\n", dc, hfont, font);
hPreviousFont = dc->w.hFont;
dc->w.hFont = hfont;
return hPreviousFont;
}
/***********************************************************************
* TTYDRV_DC_PEN_SelectObject
*/
static HPEN TTYDRV_DC_PEN_SelectObject(DC *dc, HBRUSH hpen, PENOBJ *pen)
{
HPEN hPreviousPen;
TRACE("(%p, 0x%04x, %p)\n", dc, hpen, pen);
hPreviousPen = dc->w.hPen;
dc->w.hPen = hpen;
return hPreviousPen;
}
/*********************************************************************** /***********************************************************************
* TTYDRV_DC_SelectObject * TTYDRV_DC_SelectObject
*/ */

View File

@ -12,7 +12,7 @@
#include "winbase.h" #include "winbase.h"
#include "ttydrv.h" #include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/ /**********************************************************************/
@ -35,8 +35,6 @@ BOOL TTYDRV_PALETTE_Initialize(void)
TRACE("(void)\n"); TRACE("(void)\n");
TTYDRV_DC_DevCaps.sizePalette = 256;
COLOR_sysPal = (PALETTEENTRY *) HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * TTYDRV_DC_DevCaps.sizePalette); COLOR_sysPal = (PALETTEENTRY *) HeapAlloc(GetProcessHeap(), 0, sizeof(PALETTEENTRY) * TTYDRV_DC_DevCaps.sizePalette);
if(COLOR_sysPal == NULL) { if(COLOR_sysPal == NULL) {
WARN("No memory to create system palette!"); WARN("No memory to create system palette!");

View File

@ -127,52 +127,6 @@ extern int screen_cols;
extern WINDOW *root_window; extern WINDOW *root_window;
static inline WINDOW *TTYDRV_GetRootWindow(void) { return root_window; } static inline WINDOW *TTYDRV_GetRootWindow(void) { return root_window; }
extern BOOL TTYDRV_GetScreenSaveActive(void);
extern void TTYDRV_SetScreenSaveActive(BOOL bActivate);
extern int TTYDRV_GetScreenSaveTimeout(void);
extern void TTYDRV_SetScreenSaveTimeout(int nTimeout);
extern BOOL TTYDRV_IsSingleWindow(void);
/* TTY clipboard driver */
extern struct tagCLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver;
extern void TTYDRV_CLIPBOARD_Acquire(void);
extern void TTYDRV_CLIPBOARD_Release(void);
extern void TTYDRV_CLIPBOARD_SetData(UINT wFormat);
extern BOOL TTYDRV_CLIPBOARD_GetData(UINT wFormat);
extern BOOL TTYDRV_CLIPBOARD_IsFormatAvailable(UINT wFormat);
extern BOOL TTYDRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName );
extern BOOL TTYDRV_CLIPBOARD_IsSelectionowner();
extern void TTYDRV_CLIPBOARD_ResetOwner(struct tagWND *pWnd, BOOL bFooBar);
/* TTY event driver */
extern void TTYDRV_EVENT_Synchronize(void);
extern BOOL TTYDRV_EVENT_CheckFocus(void);
extern void TTYDRV_EVENT_UserRepaintDisable(BOOL bDisable);
/* TTY keyboard driver */
extern void TTYDRV_KEYBOARD_Init(void);
extern WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar);
extern UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
extern INT16 TTYDRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
extern BOOL TTYDRV_KEYBOARD_GetBeepActive(void);
extern void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate);
extern void TTYDRV_KEYBOARD_Beep(void);
extern BOOL TTYDRV_KEYBOARD_GetDIState(DWORD len, LPVOID ptr);
extern BOOL TTYDRV_KEYBOARD_GetDIData(BYTE *keystate, DWORD dodsize, struct DIDEVICEOBJECTDATA *dod, LPDWORD entries, DWORD flags);
extern void TTYDRV_KEYBOARD_GetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg);
extern void TTYDRV_KEYBOARD_SetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg, DWORD mask);
/* TTY mouse driver */
extern void TTYDRV_MOUSE_Init(LPMOUSE_EVENT_PROC);
extern void TTYDRV_MOUSE_SetCursor(struct tagCURSORICONINFO *lpCursor);
extern void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY);
/* TTY windows driver */ /* TTY windows driver */
extern struct tagWND_DRIVER TTYDRV_WND_Driver; extern struct tagWND_DRIVER TTYDRV_WND_Driver;

View File

@ -5,3 +5,38 @@ init TTYDRV_Init
import user32.dll import user32.dll
import gdi32.dll import gdi32.dll
import kernel32.dll import kernel32.dll
# USER driver
@ cdecl Synchronize() TTYDRV_Synchronize
@ cdecl CheckFocus() TTYDRV_CheckFocus
@ cdecl UserRepaintDisable(long) TTYDRV_UserRepaintDisable
@ cdecl InitKeyboard() TTYDRV_InitKeyboard
@ cdecl VkKeyScan(long) TTYDRV_VkKeyScan
@ cdecl MapVirtualKey(long long) TTYDRV_MapVirtualKey
@ cdecl GetKeyNameText(long str long) TTYDRV_GetKeyNameText
@ cdecl ToAscii(long long ptr ptr long) TTYDRV_ToAscii
@ cdecl GetBeepActive() TTYDRV_GetBeepActive
@ cdecl SetBeepActive(long) TTYDRV_SetBeepActive
@ cdecl Beep() TTYDRV_Beep
@ cdecl GetDIState(long ptr) TTYDRV_GetDIState
@ cdecl GetDIData(ptr long ptr ptr long) TTYDRV_GetDIData
@ cdecl GetKeyboardConfig(ptr) TTYDRV_GetKeyboardConfig
@ cdecl SetKeyboardConfig(ptr long) TTYDRV_SetKeyboardConfig
@ cdecl InitMouse(ptr) TTYDRV_InitMouse
@ cdecl SetCursor(ptr) TTYDRV_SetCursor
@ cdecl MoveCursor(long long) TTYDRV_MoveCursor
@ cdecl GetScreenSaveActive() TTYDRV_GetScreenSaveActive
@ cdecl SetScreenSaveActive(long) TTYDRV_SetScreenSaveActive
@ cdecl GetScreenSaveTimeout() TTYDRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) TTYDRV_SetScreenSaveTimeout
@ cdecl LoadOEMResource(long long) TTYDRV_LoadOEMResource
@ cdecl IsSingleWindow() TTYDRV_IsSingleWindow
@ cdecl AcquireClipboard() TTYDRV_AcquireClipboard
@ cdecl ReleaseClipboard() TTYDRV_ReleaseClipboard
@ cdecl SetClipboardData(long) TTYDRV_SetClipboardData
@ cdecl GetClipboardData(long) TTYDRV_GetClipboardData
@ cdecl IsClipboardFormatAvailable(long) TTYDRV_IsClipboardFormatAvailable
@ cdecl RegisterClipboardFormat(str) TTYDRV_RegisterClipboardFormat
@ cdecl IsSelectionOwner() TTYDRV_IsSelectionOwner
@ cdecl ResetSelectionOwner(ptr long) TTYDRV_ResetSelectionOwner

View File

@ -8,7 +8,6 @@
#include "winbase.h" #include "winbase.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "clipboard.h"
#include "gdi.h" #include "gdi.h"
#include "message.h" #include "message.h"
#include "user.h" #include "user.h"
@ -18,40 +17,6 @@
DEFAULT_DEBUG_CHANNEL(ttydrv); DEFAULT_DEBUG_CHANNEL(ttydrv);
static USER_DRIVER user_driver =
{
/* event functions */
TTYDRV_EVENT_Synchronize,
TTYDRV_EVENT_CheckFocus,
TTYDRV_EVENT_UserRepaintDisable,
/* keyboard functions */
TTYDRV_KEYBOARD_Init,
TTYDRV_KEYBOARD_VkKeyScan,
TTYDRV_KEYBOARD_MapVirtualKey,
TTYDRV_KEYBOARD_GetKeyNameText,
TTYDRV_KEYBOARD_ToAscii,
TTYDRV_KEYBOARD_GetBeepActive,
TTYDRV_KEYBOARD_SetBeepActive,
TTYDRV_KEYBOARD_Beep,
TTYDRV_KEYBOARD_GetDIState,
TTYDRV_KEYBOARD_GetDIData,
TTYDRV_KEYBOARD_GetKeyboardConfig,
TTYDRV_KEYBOARD_SetKeyboardConfig,
/* mouse functions */
TTYDRV_MOUSE_Init,
TTYDRV_MOUSE_SetCursor,
TTYDRV_MOUSE_MoveCursor,
/* screen saver functions */
TTYDRV_GetScreenSaveActive,
TTYDRV_SetScreenSaveActive,
TTYDRV_GetScreenSaveTimeout,
TTYDRV_SetScreenSaveTimeout,
/* resource functions */
TTYDRV_LoadOEMResource,
/* windowing functions */
TTYDRV_IsSingleWindow
};
int cell_width = 8; int cell_width = 8;
int cell_height = 8; int cell_height = 8;
int screen_rows = 50; /* default value */ int screen_rows = 50; /* default value */
@ -64,8 +29,6 @@ WINDOW *root_window;
*/ */
static void process_attach(void) static void process_attach(void)
{ {
USER_Driver = &user_driver;
CLIPBOARD_Driver = &TTYDRV_CLIPBOARD_Driver;
WND_Driver = &TTYDRV_WND_Driver; WND_Driver = &TTYDRV_WND_Driver;
#ifdef WINE_CURSES #ifdef WINE_CURSES
@ -95,8 +58,6 @@ static void process_detach(void)
if (root_window) endwin(); if (root_window) endwin();
#endif /* WINE_CURSES */ #endif /* WINE_CURSES */
USER_Driver = NULL;
CLIPBOARD_Driver = NULL;
WND_Driver = NULL; WND_Driver = NULL;
} }
@ -120,52 +81,3 @@ BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
} }
return TRUE; return TRUE;
} }
/***********************************************************************
* TTYDRV_GetScreenSaveActive
*
* Returns the active status of the screen saver
*/
BOOL TTYDRV_GetScreenSaveActive(void)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_SetScreenSaveActive
*
* Activate/Deactivate the screen saver
*/
void TTYDRV_SetScreenSaveActive(BOOL bActivate)
{
FIXME("(%d): stub\n", bActivate);
}
/***********************************************************************
* TTYDRV_GetScreenSaveTimeout
*
* Return the screen saver timeout
*/
int TTYDRV_GetScreenSaveTimeout(void)
{
return 0;
}
/***********************************************************************
* TTYDRV_SetScreenSaveTimeout
*
* Set the screen saver timeout
*/
void TTYDRV_SetScreenSaveTimeout(int nTimeout)
{
FIXME("(%d): stub\n", nTimeout);
}
/***********************************************************************
* TTYDRV_IsSingleWindow
*/
BOOL TTYDRV_IsSingleWindow(void)
{
return TRUE;
}

287
dlls/ttydrv/user.c Normal file
View File

@ -0,0 +1,287 @@
/*
* TTYDRV USER driver functions
*
* Copyright 1998 Patrik Stridvall
*/
#include "dinput.h"
#include "gdi.h"
#include "ttydrv.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv);
/***********************************************************************
* TTYDRV_Synchronize
*/
void TTYDRV_Synchronize( void )
{
}
/***********************************************************************
* TTYDRV_CheckFocus
*/
BOOL TTYDRV_CheckFocus(void)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_UserRepaintDisable
*/
void TTYDRV_UserRepaintDisable( BOOL bDisable )
{
}
/***********************************************************************
* TTYDRV_InitKeyboard
*/
void TTYDRV_InitKeyboard(void)
{
}
/***********************************************************************
* TTYDRV_VkKeyScan
*/
WORD TTYDRV_VkKeyScan(CHAR cChar)
{
return 0;
}
/***********************************************************************
* TTYDRV_MapVirtualKey
*/
UINT16 TTYDRV_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{
return 0;
}
/***********************************************************************
* TTYDRV_GetKeyNameText
*/
INT16 TTYDRV_GetKeyNameText( LONG lParam, LPSTR lpBuffer, INT16 nSize )
{
if(lpBuffer && nSize)
{
*lpBuffer = 0;
}
return 0;
}
/***********************************************************************
* TTYDRV_ToAscii
*/
INT16 TTYDRV_ToAscii( UINT16 virtKey, UINT16 scanCode,
LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags )
{
return 0;
}
/***********************************************************************
* TTYDRV_GetBeepActive
*/
BOOL TTYDRV_GetBeepActive(void)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_SetBeepActive
*/
void TTYDRV_SetBeepActive(BOOL bActivate)
{
}
/***********************************************************************
* TTYDRV_Beep
*/
void TTYDRV_Beep(void)
{
}
/***********************************************************************
* TTYDRV_GetDIState
*/
BOOL TTYDRV_GetDIState(DWORD len, LPVOID ptr)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_GetDIData
*/
BOOL TTYDRV_GetDIData( BYTE *keystate, DWORD dodsize, LPDIDEVICEOBJECTDATA dod,
LPDWORD entries, DWORD flags )
{
return TRUE;
}
/***********************************************************************
* TTYDRV_GetKeyboardConfig
*/
void TTYDRV_GetKeyboardConfig(KEYBOARD_CONFIG *cfg)
{
}
/***********************************************************************
* TTYDRV_SetKeyboardConfig
*/
extern void TTYDRV_SetKeyboardConfig(KEYBOARD_CONFIG *cfg, DWORD mask)
{
}
/***********************************************************************
* TTYDRV_InitMouse
*/
void TTYDRV_InitMouse(LPMOUSE_EVENT_PROC proc)
{
}
/***********************************************************************
* TTYDRV_SetCursor
*/
void TTYDRV_SetCursor( struct tagCURSORICONINFO *lpCursor )
{
}
/***********************************************************************
* TTYDRV_MoveCursor
*/
void TTYDRV_MoveCursor(WORD wAbsX, WORD wAbsY)
{
}
/***********************************************************************
* TTYDRV_GetScreenSaveActive
*
* Returns the active status of the screen saver
*/
BOOL TTYDRV_GetScreenSaveActive(void)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_SetScreenSaveActive
*
* Activate/Deactivate the screen saver
*/
void TTYDRV_SetScreenSaveActive(BOOL bActivate)
{
FIXME("(%d): stub\n", bActivate);
}
/***********************************************************************
* TTYDRV_GetScreenSaveTimeout
*
* Return the screen saver timeout
*/
int TTYDRV_GetScreenSaveTimeout(void)
{
return 0;
}
/***********************************************************************
* TTYDRV_SetScreenSaveTimeout
*
* Set the screen saver timeout
*/
void TTYDRV_SetScreenSaveTimeout(int nTimeout)
{
FIXME("(%d): stub\n", nTimeout);
}
/**********************************************************************
* TTYDRV_LoadOEMResource
*/
HANDLE TTYDRV_LoadOEMResource(WORD resid, WORD type)
{
HBITMAP hbitmap;
switch(type)
{
case OEM_BITMAP:
hbitmap = CreateBitmap(1, 1, 1, 1, NULL);
TTYDRV_DC_CreateBitmap(hbitmap);
return hbitmap;
case OEM_CURSOR:
case OEM_ICON:
break;
default:
ERR("unknown type (%d)\n", type);
}
return 0;
}
/***********************************************************************
* TTYDRV_IsSingleWindow
*/
BOOL TTYDRV_IsSingleWindow(void)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_AcquireClipboard
*/
void TTYDRV_AcquireClipboard(void)
{
}
/***********************************************************************
* TTYDRV_ReleaseClipboard
*/
void TTYDRV_ReleaseClipboard(void)
{
}
/***********************************************************************
* TTYDRV_SetClipboardData
*/
void TTYDRV_SetClipboardData(UINT wFormat)
{
}
/***********************************************************************
* TTYDRV_GetClipboardData
*/
BOOL TTYDRV_GetClipboardData(UINT wFormat)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_IsClipboardFormatAvailable
*/
BOOL TTYDRV_IsClipboardFormatAvailable(UINT wFormat)
{
return FALSE;
}
/**************************************************************************
* TTYDRV_RegisterClipboardFormat
*
* Registers a custom clipboard format
* Returns: TRUE - new format registered, FALSE - Format already registered
*/
BOOL TTYDRV_RegisterClipboardFormat( LPCSTR FormatName )
{
return TRUE;
}
/**************************************************************************
* TTYDRV_IsSelectionOwner
*
* Returns: TRUE - We(WINE) own the selection, FALSE - Selection not owned by us
*/
BOOL TTYDRV_IsSelectionOwner(void)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_ResetSelectionOwner
*/
void TTYDRV_ResetSelectionOwner(struct tagWND *pWnd, BOOL bFooBar)
{
}

View File

@ -13,7 +13,29 @@
#include "win.h" #include "win.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv) DEFAULT_DEBUG_CHANNEL(ttydrv);
WND_DRIVER TTYDRV_WND_Driver =
{
TTYDRV_WND_Initialize,
TTYDRV_WND_Finalize,
TTYDRV_WND_CreateDesktopWindow,
TTYDRV_WND_CreateWindow,
TTYDRV_WND_DestroyWindow,
TTYDRV_WND_SetParent,
TTYDRV_WND_ForceWindowRaise,
TTYDRV_WND_SetWindowPos,
TTYDRV_WND_SetText,
TTYDRV_WND_SetFocus,
TTYDRV_WND_PreSizeMove,
TTYDRV_WND_PostSizeMove,
TTYDRV_WND_ScrollWindow,
TTYDRV_WND_SetDrawable,
TTYDRV_WND_SetHostAttr,
TTYDRV_WND_IsSelfClipping,
TTYDRV_WND_SetWindowRgn
};
/*********************************************************************** /***********************************************************************
* TTYDRV_WND_GetCursesWindow * TTYDRV_WND_GetCursesWindow

View File

@ -36,7 +36,7 @@ WORD WINAPI DISPLAY_Inquire(LPCURSORINFO lpCursorInfo)
*/ */
VOID WINAPI DISPLAY_SetCursor( struct tagCURSORICONINFO *lpCursor ) VOID WINAPI DISPLAY_SetCursor( struct tagCURSORICONINFO *lpCursor )
{ {
USER_Driver->pSetCursor(lpCursor); USER_Driver.pSetCursor(lpCursor);
} }
/*********************************************************************** /***********************************************************************
@ -44,7 +44,7 @@ VOID WINAPI DISPLAY_SetCursor( struct tagCURSORICONINFO *lpCursor )
*/ */
VOID WINAPI DISPLAY_MoveCursor( WORD wAbsX, WORD wAbsY ) VOID WINAPI DISPLAY_MoveCursor( WORD wAbsX, WORD wAbsY )
{ {
USER_Driver->pMoveCursor(wAbsX, wAbsY); USER_Driver.pMoveCursor(wAbsX, wAbsY);
} }
/*********************************************************************** /***********************************************************************
@ -76,6 +76,6 @@ DWORD WINAPI DISPLAY_GetDriverResourceID( WORD wQueriedResID, LPSTR lpsResName )
*/ */
VOID WINAPI UserRepaintDisable16( BOOL16 disable ) VOID WINAPI UserRepaintDisable16( BOOL16 disable )
{ {
USER_Driver->pUserRepaintDisable( disable ); USER_Driver.pUserRepaintDisable( disable );
} }

View File

@ -63,7 +63,7 @@ VOID WINAPI MOUSE_Enable(LPMOUSE_EVENT_PROC lpMouseEventProc)
{ {
THUNK_Free( (FARPROC)DefMouseEventProc ); THUNK_Free( (FARPROC)DefMouseEventProc );
DefMouseEventProc = lpMouseEventProc; DefMouseEventProc = lpMouseEventProc;
USER_Driver->pInitMouse( lpMouseEventProc ); USER_Driver.pInitMouse( lpMouseEventProc );
} }
static VOID WINAPI MOUSE_CallMouseEventProc( FARPROC16 proc, static VOID WINAPI MOUSE_CallMouseEventProc( FARPROC16 proc,
@ -100,5 +100,5 @@ VOID WINAPI MOUSE_Disable(VOID)
{ {
THUNK_Free( (FARPROC)DefMouseEventProc ); THUNK_Free( (FARPROC)DefMouseEventProc );
DefMouseEventProc = 0; DefMouseEventProc = 0;
USER_Driver->pInitMouse( 0 ); USER_Driver.pInitMouse( 0 );
} }

View File

@ -22,6 +22,15 @@
#include "win.h" #include "win.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(graphics);
USER_DRIVER USER_Driver;
static HMODULE graphics_driver;
#define GET_USER_FUNC(name) \
if (!(USER_Driver.p##name = (void*)GetProcAddress( graphics_driver, #name ))) \
FIXME("%s not found in graphics driver\n", #name)
/* load the graphics driver */ /* load the graphics driver */
static BOOL load_driver(void) static BOOL load_driver(void)
@ -41,11 +50,45 @@ static BOOL load_driver(void)
strcpy( buffer, "x11drv" ); /* default value */ strcpy( buffer, "x11drv" ); /* default value */
RegCloseKey( hkey ); RegCloseKey( hkey );
if (!LoadLibraryA( buffer )) if (!(graphics_driver = LoadLibraryA( buffer )))
{ {
MESSAGE( "Could not load graphics driver '%s'\n", buffer ); MESSAGE( "Could not load graphics driver '%s'\n", buffer );
return FALSE; return FALSE;
} }
GET_USER_FUNC(Synchronize);
GET_USER_FUNC(CheckFocus);
GET_USER_FUNC(UserRepaintDisable);
GET_USER_FUNC(InitKeyboard);
GET_USER_FUNC(VkKeyScan);
GET_USER_FUNC(MapVirtualKey);
GET_USER_FUNC(GetKeyNameText);
GET_USER_FUNC(ToAscii);
GET_USER_FUNC(GetBeepActive);
GET_USER_FUNC(SetBeepActive);
GET_USER_FUNC(Beep);
GET_USER_FUNC(GetDIState);
GET_USER_FUNC(GetDIData);
GET_USER_FUNC(GetKeyboardConfig);
GET_USER_FUNC(SetKeyboardConfig);
GET_USER_FUNC(InitMouse);
GET_USER_FUNC(SetCursor);
GET_USER_FUNC(MoveCursor);
GET_USER_FUNC(GetScreenSaveActive);
GET_USER_FUNC(SetScreenSaveActive);
GET_USER_FUNC(GetScreenSaveTimeout);
GET_USER_FUNC(SetScreenSaveTimeout);
GET_USER_FUNC(LoadOEMResource);
GET_USER_FUNC(IsSingleWindow);
GET_USER_FUNC(AcquireClipboard);
GET_USER_FUNC(ReleaseClipboard);
GET_USER_FUNC(SetClipboardData);
GET_USER_FUNC(GetClipboardData);
GET_USER_FUNC(IsClipboardFormatAvailable);
GET_USER_FUNC(RegisterClipboardFormat);
GET_USER_FUNC(IsSelectionOwner);
GET_USER_FUNC(ResetSelectionOwner);
return TRUE; return TRUE;
} }
@ -115,7 +158,7 @@ BOOL WINAPI USER_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
MOUSE_Enable( mouse_event ); MOUSE_Enable( mouse_event );
/* Start processing X events */ /* Start processing X events */
USER_Driver->pUserRepaintDisable( FALSE ); USER_Driver.pUserRepaintDisable( FALSE );
return TRUE; return TRUE;
} }

View File

@ -5,3 +5,38 @@ init X11DRV_Init
import user32.dll import user32.dll
import gdi32.dll import gdi32.dll
import kernel32.dll import kernel32.dll
# USER driver
@ cdecl Synchronize() X11DRV_Synchronize
@ cdecl CheckFocus() X11DRV_CheckFocus
@ cdecl UserRepaintDisable(long) X11DRV_UserRepaintDisable
@ cdecl InitKeyboard() X11DRV_InitKeyboard
@ cdecl VkKeyScan(long) X11DRV_VkKeyScan
@ cdecl MapVirtualKey(long long) X11DRV_MapVirtualKey
@ cdecl GetKeyNameText(long str long) X11DRV_GetKeyNameText
@ cdecl ToAscii(long long ptr ptr long) X11DRV_ToAscii
@ cdecl GetBeepActive() X11DRV_GetBeepActive
@ cdecl SetBeepActive(long) X11DRV_SetBeepActive
@ cdecl Beep() X11DRV_Beep
@ cdecl GetDIState(long ptr) X11DRV_GetDIState
@ cdecl GetDIData(ptr long ptr ptr long) X11DRV_GetDIData
@ cdecl GetKeyboardConfig(ptr) X11DRV_GetKeyboardConfig
@ cdecl SetKeyboardConfig(ptr long) X11DRV_SetKeyboardConfig
@ cdecl InitMouse(ptr) X11DRV_InitMouse
@ cdecl SetCursor(ptr) X11DRV_SetCursor
@ cdecl MoveCursor(long long) X11DRV_MoveCursor
@ cdecl GetScreenSaveActive() X11DRV_GetScreenSaveActive
@ cdecl SetScreenSaveActive(long) X11DRV_SetScreenSaveActive
@ cdecl GetScreenSaveTimeout() X11DRV_GetScreenSaveTimeout
@ cdecl SetScreenSaveTimeout(long) X11DRV_SetScreenSaveTimeout
@ cdecl LoadOEMResource(long long) X11DRV_LoadOEMResource
@ cdecl IsSingleWindow() X11DRV_IsSingleWindow
@ cdecl AcquireClipboard() X11DRV_AcquireClipboard
@ cdecl ReleaseClipboard() X11DRV_ReleaseClipboard
@ cdecl SetClipboardData(long) X11DRV_SetClipboardData
@ cdecl GetClipboardData(long) X11DRV_GetClipboardData
@ cdecl IsClipboardFormatAvailable(long) X11DRV_IsClipboardFormatAvailable
@ cdecl RegisterClipboardFormat(str) X11DRV_RegisterClipboardFormat
@ cdecl IsSelectionOwner() X11DRV_IsSelectionOwner
@ cdecl ResetSelectionOwner(ptr long) X11DRV_ResetSelectionOwner

View File

@ -20,7 +20,6 @@
#include "winreg.h" #include "winreg.h"
#include "callback.h" #include "callback.h"
#include "clipboard.h"
#include "debugtools.h" #include "debugtools.h"
#include "gdi.h" #include "gdi.h"
#include "options.h" #include "options.h"
@ -31,40 +30,6 @@
DEFAULT_DEBUG_CHANNEL(x11drv); DEFAULT_DEBUG_CHANNEL(x11drv);
static USER_DRIVER user_driver =
{
/* event functions */
X11DRV_EVENT_Synchronize,
X11DRV_EVENT_CheckFocus,
X11DRV_EVENT_UserRepaintDisable,
/* keyboard functions */
X11DRV_KEYBOARD_Init,
X11DRV_KEYBOARD_VkKeyScan,
X11DRV_KEYBOARD_MapVirtualKey,
X11DRV_KEYBOARD_GetKeyNameText,
X11DRV_KEYBOARD_ToAscii,
X11DRV_KEYBOARD_GetBeepActive,
X11DRV_KEYBOARD_SetBeepActive,
X11DRV_KEYBOARD_Beep,
X11DRV_KEYBOARD_GetDIState,
X11DRV_KEYBOARD_GetDIData,
X11DRV_KEYBOARD_GetKeyboardConfig,
X11DRV_KEYBOARD_SetKeyboardConfig,
/* mouse functions */
X11DRV_MOUSE_Init,
X11DRV_MOUSE_SetCursor,
X11DRV_MOUSE_MoveCursor,
/* screen saver functions */
X11DRV_GetScreenSaveActive,
X11DRV_SetScreenSaveActive,
X11DRV_GetScreenSaveTimeout,
X11DRV_SetScreenSaveTimeout,
/* resource functions */
X11DRV_LoadOEMResource,
/* windowing functions */
X11DRV_IsSingleWindow
};
static XKeyboardState keyboard_state; static XKeyboardState keyboard_state;
Display *display; Display *display;
@ -249,8 +214,6 @@ static void XOpenIM_large_stack(void)
*/ */
static void process_attach(void) static void process_attach(void)
{ {
USER_Driver = &user_driver;
CLIPBOARD_Driver = &X11DRV_CLIPBOARD_Driver;
WND_Driver = &X11DRV_WND_Driver; WND_Driver = &X11DRV_WND_Driver;
setup_options(); setup_options();
@ -344,8 +307,6 @@ static void process_detach(void)
XCloseDisplay( display ); XCloseDisplay( display );
display = NULL; display = NULL;
USER_Driver = NULL;
CLIPBOARD_Driver = NULL;
WND_Driver = NULL; WND_Driver = NULL;
#endif #endif
} }

View File

@ -1 +0,0 @@
Makefile

View File

@ -1,28 +0,0 @@
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ttydrv
C_SRCS = \
bitblt.c \
bitmap.c \
brush.c \
clipping.c \
dc.c \
dib.c \
font.c \
graphics.c \
init.c \
objects.c \
oembitmap.c \
palette.c \
pen.c \
text.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:

View File

@ -1,58 +0,0 @@
/*
* TTY DC bit blit
*
* Copyright 1999 Patrik Stridvall
*/
#include "dc.h"
#include "debugtools.h"
#include "pen.h"
#include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_DC_BitBlt
*/
BOOL TTYDRV_DC_BitBlt(DC *dcDst, INT xDst, INT yDst,
INT width, INT height, DC *dcSrc,
INT xSrc, INT ySrc, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %p, %d, %d, %lu): stub\n",
dcDst, xDst, yDst, width, height,
dcSrc, xSrc, ySrc, rop
);
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_PatBlt
*/
BOOL TTYDRV_DC_PatBlt(DC *dc, INT left, INT top,
INT width, INT height, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %lu): stub\n",
dc, left, top, width, height, rop
);
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_StretchBlt
*/
BOOL TTYDRV_DC_StretchBlt(DC *dcDst, INT xDst, INT yDst,
INT widthDst, INT heightDst,
DC *dcSrc, INT xSrc, INT ySrc,
INT widthSrc, INT heightSrc, DWORD rop)
{
FIXME("(%p, %d, %d, %d, %d, %p, %d, %d, %d, %d, %lu): stub\n",
dcDst, xDst, yDst, widthDst, heightDst,
dcSrc, xSrc, ySrc, widthSrc, heightSrc, rop
);
return TRUE;
}

View File

@ -1,27 +0,0 @@
/*
* TTY DC brush
*
* Copyright 1999 Patrik Stridvall
*/
#include "brush.h"
#include "dc.h"
#include "debugtools.h"
#include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_DC_BRUSH_SelectObject
*/
HBRUSH TTYDRV_DC_BRUSH_SelectObject(DC *dc, HBRUSH hbrush, BRUSHOBJ *brush)
{
HBRUSH hPreviousBrush;
TRACE("(%p, 0x%04x, %p)\n", dc, hbrush, brush);
hPreviousBrush = dc->w.hBrush;
dc->w.hBrush = hbrush;
return hPreviousBrush;
}

View File

@ -1,21 +0,0 @@
/*
* TTY DC clipping
*
* Copyright 1999 Patrik Stridvall
*/
#include "dc.h"
#include "debugtools.h"
#include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_DC_SetDeviceClipping
*/
void TTYDRV_DC_SetDeviceClipping(DC *dc)
{
TRACE("(%p)\n", dc);
}

View File

@ -1,99 +0,0 @@
/*
* TTY DC driver
*
* Copyright 1999 Patrik Stridvall
*/
#include "config.h"
#include "gdi.h"
#include "bitmap.h"
#include "dc.h"
#include "ttydrv.h"
#include "winbase.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv);
/**********************************************************************/
extern DeviceCaps TTYDRV_DC_DevCaps;
/***********************************************************************
* TTYDRV_DC_CreateDC
*/
BOOL TTYDRV_DC_CreateDC(DC *dc, LPCSTR driver, LPCSTR device,
LPCSTR output, const DEVMODEA *initData)
{
TTYDRV_PDEVICE *physDev;
BITMAPOBJ *bmp;
TRACE("(%p, %s, %s, %s, %p)\n",
dc, debugstr_a(driver), debugstr_a(device),
debugstr_a(output), initData);
dc->physDev = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(TTYDRV_PDEVICE));
if(!dc->physDev) {
ERR("Can't allocate physDev\n");
return FALSE;
}
physDev = (TTYDRV_PDEVICE *) dc->physDev;
dc->w.devCaps = &TTYDRV_DC_DevCaps;
if(dc->w.flags & DC_MEMORY){
physDev->window = NULL;
physDev->cellWidth = 1;
physDev->cellHeight = 1;
TTYDRV_DC_CreateBitmap(dc->w.hBitmap);
bmp = (BITMAPOBJ *) GDI_GetObjPtr(dc->w.hBitmap, BITMAP_MAGIC);
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = bmp->bitmap.bmWidth;
dc->w.totalExtent.bottom = bmp->bitmap.bmHeight;
dc->w.hVisRgn = CreateRectRgnIndirect( &dc->w.totalExtent );
GDI_HEAP_UNLOCK( dc->w.hBitmap );
} else {
physDev->window = TTYDRV_GetRootWindow();
physDev->cellWidth = cell_width;
physDev->cellHeight = cell_height;
dc->w.bitsPerPixel = 1;
dc->w.totalExtent.left = 0;
dc->w.totalExtent.top = 0;
dc->w.totalExtent.right = cell_width * screen_cols;
dc->w.totalExtent.bottom = cell_height * screen_rows;
dc->w.hVisRgn = CreateRectRgnIndirect( &dc->w.totalExtent );
}
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_DeleteDC
*/
BOOL TTYDRV_DC_DeleteDC(DC *dc)
{
TRACE("(%p)\n", dc);
HeapFree( GetProcessHeap(), 0, dc->physDev );
dc->physDev = NULL;
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_Escape
*/
INT TTYDRV_DC_Escape(DC *dc, INT nEscape, INT cbInput,
SEGPTR lpInData, SEGPTR lpOutData)
{
return 0;
}

View File

@ -1,89 +0,0 @@
/*
* TTY DC dib
*
* Copyright 1999 Patrik Stridvall
*/
#include "bitmap.h"
#include "dc.h"
#include "ttydrv.h"
#include "winbase.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_BITMAP_CreateDIBSection
*/
HBITMAP TTYDRV_BITMAP_CreateDIBSection(
DC *dc, BITMAPINFO *bmi, UINT usage,
LPVOID *bits, HANDLE section, DWORD offset)
{
FIXME("(%p, %p, %u, %p, 0x%04x, %ld): stub\n",
dc, bmi, usage, bits, section, offset);
return (HBITMAP) NULL;
}
/**********************************************************************
* TTYDRV_BITMAP_CreateDIBSection16
*/
HBITMAP16 TTYDRV_DIB_CreateDIBSection16(
DC *dc, BITMAPINFO *bmi, UINT16 usage,
SEGPTR *bits, HANDLE section, DWORD offset)
{
FIXME("(%p, %p, %u, %p, 0x%04x, %ld): stub\n",
dc, bmi, usage, bits, section, offset);
return (HBITMAP16) NULL;
}
/***********************************************************************
* TTYDRV_BITMAP_DeleteDIBSection
*/
void TTYDRV_BITMAP_DeleteDIBSection(BITMAPOBJ *bmp)
{
FIXME("(%p): stub\n", bmp);
}
/***********************************************************************
* TTYDRV_BITMAP_GetDIBits
*/
INT TTYDRV_BITMAP_GetDIBits(
BITMAPOBJ *bmp, DC *dc, UINT startscan, UINT lines,
LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap)
{
FIXME("(%p, %p, %u, %u, %p, %p, %u, 0x%04x): stub\n",
bmp, dc, startscan, lines, bits, info, coloruse, hbitmap);
return 0;
}
/***********************************************************************
* TTYDRV_BITMAP_SetDIBits
*/
INT TTYDRV_BITMAP_SetDIBits(
BITMAPOBJ *bmp, DC *dc, UINT startscan, UINT lines,
LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap)
{
FIXME("(%p, %p, %u, %u, %p, %p, %u, 0x%04x): stub\n",
bmp, dc, startscan, lines, bits, info, coloruse, hbitmap);
return 0;
}
/***********************************************************************
* TTYDRV_DC_SetDIBitsToDevice
*/
INT TTYDRV_DC_SetDIBitsToDevice(DC *dc, INT xDest, INT yDest, DWORD cx,
DWORD cy, INT xSrc, INT ySrc,
UINT startscan, UINT lines, LPCVOID bits,
const BITMAPINFO *info, UINT coloruse)
{
FIXME("(%p, %d, %d, %ld, %ld, %d, %d, %u, %u, %p, %p, %u): stub\n",
dc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, bits, info, coloruse);
return 0;
}

View File

@ -1,94 +0,0 @@
/*
* TTY font driver
*
* Copyright 1999 Patrik Stridvall
*/
#include "dc.h"
#include "debugtools.h"
#include "font.h"
#include "ttydrv.h"
#include "wingdi.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_DC_GetCharWidth
*/
BOOL TTYDRV_DC_GetCharWidth(DC *dc, UINT firstChar, UINT lastChar,
LPINT buffer)
{
UINT c;
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
FIXME("(%p, %u, %u, %p): semistub\n", dc, firstChar, lastChar, buffer);
for(c=firstChar; c<=lastChar; c++) {
buffer[c-firstChar] = physDev->cellWidth;
}
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_GetTextExtentPoint
*/
BOOL TTYDRV_DC_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count,
LPSIZE size)
{
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
TRACE("(%p, %s, %d, %p)\n", dc, debugstr_wn(str, count), count, size);
size->cx = count * physDev->cellWidth;
size->cy = physDev->cellHeight;
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_GetTextMetrics
*/
BOOL TTYDRV_DC_GetTextMetrics(DC *dc, LPTEXTMETRICA lptm)
{
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
TRACE("(%p, %p)\n", dc, lptm);
lptm->tmHeight = physDev->cellHeight;
lptm->tmAscent = 0;
lptm->tmDescent = 0;
lptm->tmInternalLeading = 0;
lptm->tmExternalLeading = 0;
lptm->tmAveCharWidth = physDev->cellWidth;
lptm->tmMaxCharWidth = physDev->cellWidth;
lptm->tmWeight = FW_MEDIUM;
lptm->tmOverhang = 0;
lptm->tmDigitizedAspectX = physDev->cellWidth;
lptm->tmDigitizedAspectY = physDev->cellHeight;
lptm->tmFirstChar = 32;
lptm->tmLastChar = 255;
lptm->tmDefaultChar = 0;
lptm->tmBreakChar = 32;
lptm->tmItalic = FALSE;
lptm->tmUnderlined = FALSE;
lptm->tmStruckOut = FALSE;
lptm->tmPitchAndFamily = TMPF_FIXED_PITCH|TMPF_DEVICE;
lptm->tmCharSet = ANSI_CHARSET;
return TRUE;
}
/***********************************************************************
* TTYDRV_DC_FONT_SelectObject
*/
HFONT TTYDRV_DC_FONT_SelectObject(DC* dc, HFONT hfont, FONTOBJ *font)
{
HFONT hPreviousFont;
TRACE("(%p, 0x%04x, %p)\n", dc, hfont, font);
hPreviousFont = dc->w.hFont;
dc->w.hFont = hfont;
return hPreviousFont;
}

View File

@ -1,54 +0,0 @@
/*
* TTY DC OEM bitmap
*
* Copyright 1999 Patrik Stridvall
*/
#include "bitmap.h"
#include "ttydrv.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/**********************************************************************
* TTYDRV_LoadOEMBitmap
*/
static HANDLE TTYDRV_LoadOEMBitmap(WORD resid)
{
HBITMAP hbitmap;
TRACE("(%d)\n", resid);
hbitmap = CreateBitmap(1, 1, 1, 1, NULL);
TTYDRV_DC_CreateBitmap(hbitmap);
return hbitmap;
}
/**********************************************************************
* TTYDRV_LoadOEMCursorIcon
*/
static HANDLE TTYDRV_LoadOEMCursorIcon(WORD resid, BOOL bCursor)
{
return (HANDLE) NULL;
}
/**********************************************************************
* TTYDRV_LoadOEMResource
*/
HANDLE TTYDRV_LoadOEMResource(WORD resid, WORD type)
{
switch(type)
{
case OEM_BITMAP:
return TTYDRV_LoadOEMBitmap(resid);
case OEM_CURSOR:
return TTYDRV_LoadOEMCursorIcon(resid, TRUE);
case OEM_ICON:
return TTYDRV_LoadOEMCursorIcon(resid, FALSE);
default:
ERR("unknown type (%d)\n", type);
}
return (HANDLE) NULL;
}

View File

@ -1,27 +0,0 @@
/*
* TTY DC pen
*
* Copyright 1999 Patrik Stridvall
*/
#include "dc.h"
#include "debugtools.h"
#include "pen.h"
#include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv)
/***********************************************************************
* TTYDRV_DC_PEN_SelectObject
*/
HPEN TTYDRV_DC_PEN_SelectObject(DC *dc, HBRUSH hpen, PENOBJ *pen)
{
HPEN hPreviousPen;
TRACE("(%p, 0x%04x, %p)\n", dc, hpen, pen);
hPreviousPen = dc->w.hPen;
dc->w.hPen = hpen;
return hPreviousPen;
}

View File

@ -1,66 +0,0 @@
/*
* TTY DC text
*
* Copyright 1999 Patrik Stridvall
*/
#include "config.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "dc.h"
#include "debugtools.h"
#include "gdi.h"
#include "ttydrv.h"
DEFAULT_DEBUG_CHANNEL(ttydrv);
/***********************************************************************
* TTYDRV_DC_ExtTextOut
*/
BOOL TTYDRV_DC_ExtTextOut(DC *dc, INT x, INT y, UINT flags,
const RECT *lpRect, LPCWSTR str, UINT count,
const INT *lpDx)
{
#ifdef WINE_CURSES
TTYDRV_PDEVICE *physDev = (TTYDRV_PDEVICE *) dc->physDev;
INT row, col;
LPSTR ascii;
TRACE("(%p, %d, %d, 0x%08x, %p, %s, %d, %p)\n",
dc, x, y, flags, lpRect, debugstr_wn(str, count), count, lpDx);
if(!physDev->window)
return FALSE;
/* FIXME: Is this really correct? */
if(dc->w.textAlign & TA_UPDATECP) {
x = dc->w.CursPosX;
y = dc->w.CursPosY;
}
x = XLPTODP(dc, x);
y = YLPTODP(dc, y);
row = (dc->w.DCOrgY + y) / physDev->cellHeight;
col = (dc->w.DCOrgX + x) / physDev->cellWidth;
ascii = HeapAlloc( GetProcessHeap(), 0, count+1 );
lstrcpynWtoA(ascii, str, count+1);
mvwaddnstr(physDev->window, row, col, ascii, count);
HeapFree( GetProcessHeap(), 0, ascii );
wrefresh(physDev->window);
if(dc->w.textAlign & TA_UPDATECP) {
dc->w.CursPosX += count * physDev->cellWidth;
dc->w.CursPosY += physDev->cellHeight;
}
return TRUE;
#else /* defined(WINE_CURSES) */
FIXME("(%p, %d, %d, 0x%08x, %p, %s, %d, %p): stub\n",
dc, x, y, flags, lpRect, debugstr_wn(str,count), count, lpDx);
return TRUE;
#endif /* defined(WINE_CURSES) */
}

View File

@ -18,20 +18,6 @@ typedef struct tagWINE_CLIPFORMAT {
struct tagWINE_CLIPFORMAT *NextFormat; struct tagWINE_CLIPFORMAT *NextFormat;
} WINE_CLIPFORMAT, *LPWINE_CLIPFORMAT; } WINE_CLIPFORMAT, *LPWINE_CLIPFORMAT;
typedef struct tagCLIPBOARD_DRIVER
{
void (*pAcquire)(void); /* Acquire selection */
void (*pRelease)(void); /* Release selection */
void (*pSetData)(UINT); /* Set specified selection data */
BOOL (*pGetData)(UINT); /* Get specified selection data */
BOOL (*pIsFormatAvailable)(UINT); /* Check if specified format is available */
BOOL (*pRegisterFormat)(LPCSTR); /* Register a clipboard format */
BOOL (*pIsSelectionOwner)(void); /* Check if we own the selection */
void (*pResetOwner)(struct tagWND *, BOOL);
} CLIPBOARD_DRIVER;
extern CLIPBOARD_DRIVER *CLIPBOARD_Driver;
extern LPWINE_CLIPFORMAT CLIPBOARD_LookupFormat( WORD wID ); extern LPWINE_CLIPFORMAT CLIPBOARD_LookupFormat( WORD wID );
extern BOOL CLIPBOARD_IsCacheRendered(); extern BOOL CLIPBOARD_IsCacheRendered();
extern void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange); extern void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange);
@ -40,5 +26,4 @@ extern BOOL CLIPBOARD_IsPresent(WORD wFormat);
extern char * CLIPBOARD_GetFormatName(UINT wFormat); extern char * CLIPBOARD_GetFormatName(UINT wFormat);
extern void CLIPBOARD_ReleaseOwner(); extern void CLIPBOARD_ReleaseOwner();
#endif /* __WINE_CLIPBOARD_H */ #endif /* __WINE_CLIPBOARD_H */

View File

@ -39,6 +39,8 @@ typedef struct tagKEYBOARD_CONFIG {
typedef VOID CALLBACK (*LPMOUSE_EVENT_PROC)(DWORD,DWORD,DWORD,DWORD,DWORD); typedef VOID CALLBACK (*LPMOUSE_EVENT_PROC)(DWORD,DWORD,DWORD,DWORD,DWORD);
struct tagWND;
typedef struct tagUSER_DRIVER { typedef struct tagUSER_DRIVER {
/* event functions */ /* event functions */
void (*pSynchronize)(void); void (*pSynchronize)(void);
@ -70,9 +72,18 @@ typedef struct tagUSER_DRIVER {
HANDLE (*pLoadOEMResource)(WORD,WORD); HANDLE (*pLoadOEMResource)(WORD,WORD);
/* windowing functions */ /* windowing functions */
BOOL (*pIsSingleWindow)(void); BOOL (*pIsSingleWindow)(void);
/* clipboard functions */
void (*pAcquireClipboard)(void); /* Acquire selection */
void (*pReleaseClipboard)(void); /* Release selection */
void (*pSetClipboardData)(UINT); /* Set specified selection data */
BOOL (*pGetClipboardData)(UINT); /* Get specified selection data */
BOOL (*pIsClipboardFormatAvailable)(UINT); /* Check if specified format is available */
BOOL (*pRegisterClipboardFormat)(LPCSTR); /* Register a clipboard format */
BOOL (*pIsSelectionOwner)(void); /* Check if we own the selection */
void (*pResetSelectionOwner)(struct tagWND *, BOOL);
} USER_DRIVER; } USER_DRIVER;
extern USER_DRIVER *USER_Driver; extern USER_DRIVER USER_Driver;
WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID, WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
DWORD dwFlags, HMODULE16 hModule ); DWORD dwFlags, HMODULE16 hModule );

View File

@ -331,41 +331,23 @@ static inline Visual *X11DRV_GetVisual(void) { return visual; }
static inline Window X11DRV_GetXRootWindow(void) { return root_window; } static inline Window X11DRV_GetXRootWindow(void) { return root_window; }
static inline unsigned int X11DRV_GetDepth(void) { return screen_depth; } static inline unsigned int X11DRV_GetDepth(void) { return screen_depth; }
extern BOOL X11DRV_GetScreenSaveActive(void);
extern void X11DRV_SetScreenSaveActive(BOOL bActivate);
extern int X11DRV_GetScreenSaveTimeout(void);
extern void X11DRV_SetScreenSaveTimeout(int nTimeout);
extern HANDLE X11DRV_LoadOEMResource( WORD id, WORD type );
extern BOOL X11DRV_IsSingleWindow(void);
/* X11 clipboard driver */ /* X11 clipboard driver */
extern struct tagCLIPBOARD_DRIVER X11DRV_CLIPBOARD_Driver;
extern void X11DRV_CLIPBOARD_FreeResources( Atom property ); extern void X11DRV_CLIPBOARD_FreeResources( Atom property );
extern BOOL X11DRV_CLIPBOARD_RegisterPixmapResource( Atom property, Pixmap pixmap ); extern BOOL X11DRV_CLIPBOARD_RegisterPixmapResource( Atom property, Pixmap pixmap );
extern void X11DRV_CLIPBOARD_Acquire(void);
extern void X11DRV_CLIPBOARD_Release(void);
extern void X11DRV_CLIPBOARD_SetData(UINT wFormat);
extern BOOL X11DRV_CLIPBOARD_GetData(UINT wFormat);
extern BOOL X11DRV_CLIPBOARD_IsFormatAvailable(UINT wFormat);
extern BOOL X11DRV_CLIPBOARD_IsNativeProperty(Atom prop); extern BOOL X11DRV_CLIPBOARD_IsNativeProperty(Atom prop);
extern BOOL X11DRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName );
extern BOOL X11DRV_CLIPBOARD_IsSelectionowner();
extern UINT X11DRV_CLIPBOARD_MapPropertyToFormat(char *itemFmtName); extern UINT X11DRV_CLIPBOARD_MapPropertyToFormat(char *itemFmtName);
extern Atom X11DRV_CLIPBOARD_MapFormatToProperty(UINT id); extern Atom X11DRV_CLIPBOARD_MapFormatToProperty(UINT id);
extern void X11DRV_CLIPBOARD_ResetOwner(struct tagWND *pWnd, BOOL bFooBar);
extern void X11DRV_CLIPBOARD_ReleaseSelection(Atom selType, Window w, HWND hwnd); extern void X11DRV_CLIPBOARD_ReleaseSelection(Atom selType, Window w, HWND hwnd);
extern BOOL X11DRV_IsSelectionOwner(void);
extern BOOL X11DRV_GetClipboardData(UINT wFormat);
/* X11 event driver */ /* X11 event driver */
extern WORD X11DRV_EVENT_XStateToKeyState( int state ) ; extern WORD X11DRV_EVENT_XStateToKeyState( int state ) ;
extern BOOL X11DRV_EVENT_Init(void); extern BOOL X11DRV_EVENT_Init(void);
extern void X11DRV_EVENT_Synchronize( void ); extern void X11DRV_Synchronize( void );
extern BOOL X11DRV_EVENT_CheckFocus( void );
extern void X11DRV_EVENT_UserRepaintDisable( BOOL bDisable );
typedef enum { typedef enum {
X11DRV_INPUT_RELATIVE, X11DRV_INPUT_RELATIVE,
@ -380,27 +362,24 @@ void X11DRV_EVENT_SetDGAStatus(HWND hwnd, int event_base) ;
/* X11 keyboard driver */ /* X11 keyboard driver */
extern void X11DRV_KEYBOARD_Init(void); extern void X11DRV_InitKeyboard(void);
extern WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar); extern WORD X11DRV_VkKeyScan(CHAR cChar);
extern UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType); extern UINT16 X11DRV_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
extern INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize); extern INT16 X11DRV_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
extern INT16 X11DRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags); extern INT16 X11DRV_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
extern BOOL X11DRV_KEYBOARD_GetBeepActive(void); extern BOOL X11DRV_GetDIState(DWORD len, LPVOID ptr);
extern void X11DRV_KEYBOARD_SetBeepActive(BOOL bActivate); extern BOOL X11DRV_GetDIData(BYTE *keystate, DWORD dodsize, struct DIDEVICEOBJECTDATA *dod, LPDWORD entries, DWORD flags);
extern void X11DRV_KEYBOARD_Beep(void); extern void X11DRV_GetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg);
extern BOOL X11DRV_KEYBOARD_GetDIState(DWORD len, LPVOID ptr); extern void X11DRV_SetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg, DWORD mask);
extern BOOL X11DRV_KEYBOARD_GetDIData(BYTE *keystate, DWORD dodsize, struct DIDEVICEOBJECTDATA *dod, LPDWORD entries, DWORD flags);
extern void X11DRV_KEYBOARD_GetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg);
extern void X11DRV_KEYBOARD_SetKeyboardConfig(struct tagKEYBOARD_CONFIG *cfg, DWORD mask);
extern void X11DRV_KEYBOARD_HandleEvent(struct tagWND *pWnd, XKeyEvent *event); extern void X11DRV_HandleEvent(struct tagWND *pWnd, XKeyEvent *event);
/* X11 mouse driver */ /* X11 mouse driver */
extern void X11DRV_MOUSE_Init(LPMOUSE_EVENT_PROC); extern void X11DRV_InitMouse(LPMOUSE_EVENT_PROC);
extern void X11DRV_MOUSE_SetCursor(struct tagCURSORICONINFO *lpCursor); extern void X11DRV_SetCursor(struct tagCURSORICONINFO *lpCursor);
extern void X11DRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY); extern void X11DRV_MoveCursor(WORD wAbsX, WORD wAbsY);
extern void X11DRV_MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY, extern void X11DRV_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
DWORD keyState, DWORD time, HWND hWnd ); DWORD keyState, DWORD time, HWND hWnd );
/* X11 windows driver */ /* X11 windows driver */

View File

@ -25,18 +25,12 @@
#include "debugdefs.h" #include "debugdefs.h"
#include "module.h" #include "module.h"
#include "winnls.h" #include "winnls.h"
#include "user.h"
#include "windef.h" #include "windef.h"
#include "wingdi.h" #include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "tweak.h" #include "tweak.h"
#include "winerror.h" #include "winerror.h"
/**********************************************************************/
USER_DRIVER *USER_Driver = NULL;
/*********************************************************************** /***********************************************************************
* MAIN_ParseDebugOptions * MAIN_ParseDebugOptions

View File

@ -32,10 +32,11 @@
#include "message.h" #include "message.h"
#include "task.h" #include "task.h"
#include "queue.h" #include "queue.h"
#include "user.h"
#include "clipboard.h" #include "clipboard.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(clipboard) DEFAULT_DEBUG_CHANNEL(clipboard);
#define CF_REGFORMATBASE 0xC000 #define CF_REGFORMATBASE 0xC000
@ -43,8 +44,6 @@ DEFAULT_DEBUG_CHANNEL(clipboard)
* Clipboard context global variables * Clipboard context global variables
*/ */
CLIPBOARD_DRIVER *CLIPBOARD_Driver = NULL;
static HANDLE hClipLock = 0; static HANDLE hClipLock = 0;
static BOOL bCBHasChanged = FALSE; static BOOL bCBHasChanged = FALSE;
@ -60,24 +59,24 @@ static WORD LastRegFormat = CF_REGFORMATBASE;
* declared in clipboard.h * declared in clipboard.h
*/ */
WINE_CLIPFORMAT ClipFormats[17] = { WINE_CLIPFORMAT ClipFormats[17] = {
{ CF_TEXT, 1, 0, "Text", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, NULL, &ClipFormats[1]}, { CF_TEXT, 1, 0, "Text", 0, 0, 0, 0, NULL, &ClipFormats[1]},
{ CF_BITMAP, 1, 0, "Bitmap", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[0], &ClipFormats[2]}, { CF_BITMAP, 1, 0, "Bitmap", 0, 0, 0, 0, &ClipFormats[0], &ClipFormats[2]},
{ CF_METAFILEPICT, 1, 0, "MetaFile Picture", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[1], &ClipFormats[3]}, { CF_METAFILEPICT, 1, 0, "MetaFile Picture", 0, 0, 0, 0, &ClipFormats[1], &ClipFormats[3]},
{ CF_SYLK, 1, 0, "Sylk", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[2], &ClipFormats[4]}, { CF_SYLK, 1, 0, "Sylk", 0, 0, 0, 0, &ClipFormats[2], &ClipFormats[4]},
{ CF_DIF, 1, 0, "DIF", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[3], &ClipFormats[5]}, { CF_DIF, 1, 0, "DIF", 0, 0, 0, 0, &ClipFormats[3], &ClipFormats[5]},
{ CF_TIFF, 1, 0, "TIFF", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[4], &ClipFormats[6]}, { CF_TIFF, 1, 0, "TIFF", 0, 0, 0, 0, &ClipFormats[4], &ClipFormats[6]},
{ CF_OEMTEXT, 1, 0, "OEM Text", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[5], &ClipFormats[7]}, { CF_OEMTEXT, 1, 0, "OEM Text", 0, 0, 0, 0, &ClipFormats[5], &ClipFormats[7]},
{ CF_DIB, 1, 0, "DIB", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[6], &ClipFormats[8]}, { CF_DIB, 1, 0, "DIB", 0, 0, 0, 0, &ClipFormats[6], &ClipFormats[8]},
{ CF_PALETTE, 1, 0, "Palette", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[7], &ClipFormats[9]}, { CF_PALETTE, 1, 0, "Palette", 0, 0, 0, 0, &ClipFormats[7], &ClipFormats[9]},
{ CF_PENDATA, 1, 0, "PenData", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[8], &ClipFormats[10]}, { CF_PENDATA, 1, 0, "PenData", 0, 0, 0, 0, &ClipFormats[8], &ClipFormats[10]},
{ CF_RIFF, 1, 0, "RIFF", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[9], &ClipFormats[11]}, { CF_RIFF, 1, 0, "RIFF", 0, 0, 0, 0, &ClipFormats[9], &ClipFormats[11]},
{ CF_WAVE, 1, 0, "Wave", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[10], &ClipFormats[12]}, { CF_WAVE, 1, 0, "Wave", 0, 0, 0, 0, &ClipFormats[10], &ClipFormats[12]},
{ CF_OWNERDISPLAY, 1, 0, "Owner Display", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[11], &ClipFormats[13]}, { CF_OWNERDISPLAY, 1, 0, "Owner Display", 0, 0, 0, 0, &ClipFormats[11], &ClipFormats[13]},
{ CF_DSPTEXT, 1, 0, "DSPText", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[12], &ClipFormats[14]}, { CF_DSPTEXT, 1, 0, "DSPText", 0, 0, 0, 0, &ClipFormats[12], &ClipFormats[14]},
{ CF_DSPMETAFILEPICT, 1, 0, "DSPMetaFile Picture", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[13], &ClipFormats[15]}, { CF_DSPMETAFILEPICT, 1, 0, "DSPMetaFile Picture", 0, 0, 0, 0, &ClipFormats[13], &ClipFormats[15]},
{ CF_DSPBITMAP, 1, 0, "DSPBitmap", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[14], &ClipFormats[16]}, { CF_DSPBITMAP, 1, 0, "DSPBitmap", 0, 0, 0, 0, &ClipFormats[14], &ClipFormats[16]},
{ CF_HDROP, 1, 0, "HDROP", (HANDLE16)NULL, (HANDLE)NULL, (HANDLE)NULL, 0, &ClipFormats[15], NULL} { CF_HDROP, 1, 0, "HDROP", 0, 0, 0, 0, &ClipFormats[15], NULL}
}; };
/************************************************************************** /**************************************************************************
@ -389,10 +388,10 @@ static BOOL CLIPBOARD_RenderFormat(LPWINE_CLIPFORMAT lpFormat)
* If WINE is not the selection owner, and the format is available * If WINE is not the selection owner, and the format is available
* we must ask the the driver to render the data to the clipboard cache. * we must ask the the driver to render the data to the clipboard cache.
*/ */
if ( !CLIPBOARD_Driver->pIsSelectionOwner() if ( !USER_Driver.pIsSelectionOwner()
&& CLIPBOARD_Driver->pIsFormatAvailable( lpFormat->wFormatID ) ) && USER_Driver.pIsClipboardFormatAvailable( lpFormat->wFormatID ) )
{ {
if ( !CLIPBOARD_Driver->pGetData( lpFormat->wFormatID ) ) if ( !USER_Driver.pGetClipboardData( lpFormat->wFormatID ) )
return FALSE; return FALSE;
} }
/* /*
@ -621,7 +620,7 @@ BOOL WINAPI EmptyClipboard(void)
hTaskClipOwner = GetCurrentTask(); hTaskClipOwner = GetCurrentTask();
/* Tell the driver to acquire the selection */ /* Tell the driver to acquire the selection */
CLIPBOARD_Driver->pAcquire(); USER_Driver.pAcquireClipboard();
return TRUE; return TRUE;
} }
@ -673,7 +672,7 @@ HANDLE16 WINAPI SetClipboardData16( UINT16 wFormat, HANDLE16 hData )
} }
/* Pass on the request to the driver */ /* Pass on the request to the driver */
CLIPBOARD_Driver->pSetData(wFormat); USER_Driver.pSetClipboardData(wFormat);
if ( lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32 ) if ( lpFormat->wDataPresent || lpFormat->hData16 || lpFormat->hData32 )
{ {
@ -726,7 +725,7 @@ HANDLE WINAPI SetClipboardData( UINT wFormat, HANDLE hData )
} }
/* Tell the driver to acquire the selection */ /* Tell the driver to acquire the selection */
CLIPBOARD_Driver->pAcquire(); USER_Driver.pAcquireClipboard();
if ( lpFormat->wDataPresent && if ( lpFormat->wDataPresent &&
(lpFormat->hData16 || lpFormat->hData32) ) (lpFormat->hData16 || lpFormat->hData32) )
@ -927,8 +926,8 @@ INT WINAPI CountClipboardFormats(void)
* available to the clipboard driver. * available to the clipboard driver.
*/ */
if ( lpFormat->wDataPresent || if ( lpFormat->wDataPresent ||
( !CLIPBOARD_Driver->pIsSelectionOwner() ( !USER_Driver.pIsSelectionOwner()
&& CLIPBOARD_Driver->pIsFormatAvailable( lpFormat->wFormatID ) ) ) && USER_Driver.pIsClipboardFormatAvailable( lpFormat->wFormatID ) ) )
{ {
TRACE("\tdata found for format 0x%04x(%s)\n", TRACE("\tdata found for format 0x%04x(%s)\n",
lpFormat->wFormatID, CLIPBOARD_GetFormatName(lpFormat->wFormatID)); lpFormat->wFormatID, CLIPBOARD_GetFormatName(lpFormat->wFormatID));
@ -995,10 +994,10 @@ UINT WINAPI EnumClipboardFormats( UINT wFormat )
(lpFormat->wFormatID == CF_TEXT && ClipFormats[CF_OEMTEXT-1].wDataPresent) ); (lpFormat->wFormatID == CF_TEXT && ClipFormats[CF_OEMTEXT-1].wDataPresent) );
/* Query the driver if not yet in the cache */ /* Query the driver if not yet in the cache */
if (!bFormatPresent && !CLIPBOARD_Driver->pIsSelectionOwner()) if (!bFormatPresent && !USER_Driver.pIsSelectionOwner())
{ {
bFormatPresent = bFormatPresent =
CLIPBOARD_Driver->pIsFormatAvailable( (lpFormat->wFormatID == CF_TEXT) ? USER_Driver.pIsClipboardFormatAvailable( (lpFormat->wFormatID == CF_TEXT) ?
CF_OEMTEXT : lpFormat->wFormatID ); CF_OEMTEXT : lpFormat->wFormatID );
} }
@ -1066,7 +1065,7 @@ UINT16 WINAPI RegisterClipboardFormat16( LPCSTR FormatName )
lpNewFormat->NextFormat = NULL; lpNewFormat->NextFormat = NULL;
/* Pass on the registration request to the driver */ /* Pass on the registration request to the driver */
CLIPBOARD_Driver->pRegisterFormat( FormatName ); USER_Driver.pRegisterClipboardFormat( FormatName );
return LastRegFormat++; return LastRegFormat++;
} }
@ -1231,8 +1230,8 @@ BOOL WINAPI IsClipboardFormatAvailable( UINT wFormat )
bRet = FALSE; bRet = FALSE;
/* If WINE is not the clipboard selection owner ask the clipboard driver */ /* If WINE is not the clipboard selection owner ask the clipboard driver */
else if ( !CLIPBOARD_Driver->pIsSelectionOwner() ) else if ( !USER_Driver.pIsSelectionOwner() )
bRet = CLIPBOARD_Driver->pIsFormatAvailable( (wFormat == CF_TEXT) ? bRet = USER_Driver.pIsClipboardFormatAvailable( (wFormat == CF_TEXT) ?
CF_OEMTEXT : wFormat ); CF_OEMTEXT : wFormat );
/* Check if the format is in the local cache */ /* Check if the format is in the local cache */
else else

View File

@ -707,7 +707,7 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
} }
} }
else resid = LOWORD(name); else resid = LOWORD(name);
h = USER_Driver->pLoadOEMResource( resid, fCursor ? OEM_CURSOR : OEM_ICON ); h = USER_Driver.pLoadOEMResource( resid, fCursor ? OEM_CURSOR : OEM_ICON );
} }
else /* Load from resource */ else /* Load from resource */
@ -1392,7 +1392,7 @@ HCURSOR WINAPI SetCursor(
/* Change the cursor shape only if it is visible */ /* Change the cursor shape only if it is visible */
if (CURSOR_ShowCount >= 0) if (CURSOR_ShowCount >= 0)
{ {
USER_Driver->pSetCursor( (CURSORICONINFO*)GlobalLock16( hActiveCursor ) ); USER_Driver.pSetCursor( (CURSORICONINFO*)GlobalLock16( hActiveCursor ) );
GlobalUnlock16( hActiveCursor ); GlobalUnlock16( hActiveCursor );
} }
return hOldCursor; return hOldCursor;
@ -1413,7 +1413,7 @@ void WINAPI SetCursorPos16( INT16 x, INT16 y )
*/ */
BOOL WINAPI SetCursorPos( INT x, INT y ) BOOL WINAPI SetCursorPos( INT x, INT y )
{ {
USER_Driver->pMoveCursor( x, y ); USER_Driver.pMoveCursor( x, y );
return TRUE; return TRUE;
} }
@ -1439,14 +1439,14 @@ INT WINAPI ShowCursor( BOOL bShow )
{ {
if (++CURSOR_ShowCount == 0) /* Show it */ if (++CURSOR_ShowCount == 0) /* Show it */
{ {
USER_Driver->pSetCursor( (CURSORICONINFO*)GlobalLock16( hActiveCursor ) ); USER_Driver.pSetCursor( (CURSORICONINFO*)GlobalLock16( hActiveCursor ) );
GlobalUnlock16( hActiveCursor ); GlobalUnlock16( hActiveCursor );
} }
} }
else else
{ {
if (--CURSOR_ShowCount == -1) /* Hide it */ if (--CURSOR_ShowCount == -1) /* Hide it */
USER_Driver->pSetCursor( NULL ); USER_Driver.pSetCursor( NULL );
} }
return CURSOR_ShowCount; return CURSOR_ShowCount;
} }
@ -2096,7 +2096,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance,LPCWSTR name, UINT loadflags )
if (!instance) /* OEM bitmap */ if (!instance) /* OEM bitmap */
{ {
if (HIWORD((int)name)) return 0; if (HIWORD((int)name)) return 0;
return USER_Driver->pLoadOEMResource( LOWORD((int)name), OEM_BITMAP ); return USER_Driver.pLoadOEMResource( LOWORD((int)name), OEM_BITMAP );
} }
if (!(hRsrc = FindResourceW( instance, name, RT_BITMAPW ))) return 0; if (!(hRsrc = FindResourceW( instance, name, RT_BITMAPW ))) return 0;

View File

@ -838,7 +838,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
WIN_ReleaseWndPtr(parentPtr); WIN_ReleaseWndPtr(parentPtr);
} }
else else
if ((hwnd == GetDesktopWindow()) && !USER_Driver->pIsSingleWindow()) if ((hwnd == GetDesktopWindow()) && !USER_Driver.pIsSingleWindow())
hrgnVisible = CreateRectRgn( 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) ); hrgnVisible = CreateRectRgn( 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN) );
else else
{ {

View File

@ -20,7 +20,7 @@ DECLARE_DEBUG_CHANNEL(event);
void EVENT_Synchronize( void ) void EVENT_Synchronize( void )
{ {
int iWndsLocks = WIN_SuspendWndsLock(); int iWndsLocks = WIN_SuspendWndsLock();
USER_Driver->pSynchronize(); USER_Driver.pSynchronize();
WIN_RestoreWndsLock(iWndsLocks); WIN_RestoreWndsLock(iWndsLocks);
} }
@ -29,7 +29,7 @@ void EVENT_Synchronize( void )
*/ */
BOOL EVENT_CheckFocus(void) BOOL EVENT_CheckFocus(void)
{ {
return USER_Driver->pCheckFocus(); return USER_Driver.pCheckFocus();
} }

View File

@ -66,7 +66,7 @@ VOID WINAPI KEYBOARD_Enable( LPKEYBD_EVENT_PROC lpKeybEventProc,
/* all states to false */ /* all states to false */
memset( lpKeyState, 0, 256 ); memset( lpKeyState, 0, 256 );
if (!initDone) USER_Driver->pInitKeyboard(); if (!initDone) USER_Driver.pInitKeyboard();
initDone = TRUE; initDone = TRUE;
} }
@ -180,7 +180,7 @@ DWORD WINAPI OemKeyScan(WORD wOemChar)
WORD WINAPI VkKeyScan16(CHAR cChar) WORD WINAPI VkKeyScan16(CHAR cChar)
{ {
return USER_Driver->pVkKeyScan(cChar); return USER_Driver.pVkKeyScan(cChar);
} }
/****************************************************************************** /******************************************************************************
@ -213,7 +213,7 @@ INT16 WINAPI GetKeyboardType16(INT16 nTypeFlag)
*/ */
UINT16 WINAPI MapVirtualKey16(UINT16 wCode, UINT16 wMapType) UINT16 WINAPI MapVirtualKey16(UINT16 wCode, UINT16 wMapType)
{ {
return USER_Driver->pMapVirtualKey(wCode,wMapType); return USER_Driver.pMapVirtualKey(wCode,wMapType);
} }
/**************************************************************************** /****************************************************************************
@ -230,7 +230,7 @@ INT16 WINAPI GetKBCodePage16(void)
*/ */
INT16 WINAPI GetKeyNameText16(LONG lParam, LPSTR lpBuffer, INT16 nSize) INT16 WINAPI GetKeyNameText16(LONG lParam, LPSTR lpBuffer, INT16 nSize)
{ {
return USER_Driver->pGetKeyNameText(lParam, lpBuffer, nSize); return USER_Driver.pGetKeyNameText(lParam, lpBuffer, nSize);
} }
/**************************************************************************** /****************************************************************************
@ -254,7 +254,7 @@ INT16 WINAPI GetKeyNameText16(LONG lParam, LPSTR lpBuffer, INT16 nSize)
INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState, INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
LPVOID lpChar, UINT16 flags) LPVOID lpChar, UINT16 flags)
{ {
return USER_Driver->pToAscii( virtKey, scanCode, lpKeyState, lpChar, flags ); return USER_Driver.pToAscii( virtKey, scanCode, lpKeyState, lpChar, flags );
} }
/*********************************************************************** /***********************************************************************
@ -262,7 +262,7 @@ INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
*/ */
BOOL KEYBOARD_GetBeepActive() BOOL KEYBOARD_GetBeepActive()
{ {
return USER_Driver->pGetBeepActive(); return USER_Driver.pGetBeepActive();
} }
/*********************************************************************** /***********************************************************************
@ -270,7 +270,7 @@ BOOL KEYBOARD_GetBeepActive()
*/ */
void KEYBOARD_SetBeepActive(BOOL bActivate) void KEYBOARD_SetBeepActive(BOOL bActivate)
{ {
USER_Driver->pSetBeepActive(bActivate); USER_Driver.pSetBeepActive(bActivate);
} }
/*********************************************************************** /***********************************************************************
@ -286,6 +286,6 @@ void WINAPI MessageBeep16( UINT16 i )
*/ */
BOOL WINAPI MessageBeep( UINT i ) BOOL WINAPI MessageBeep( UINT i )
{ {
USER_Driver->pBeep(); USER_Driver.pBeep();
return TRUE; return TRUE;
} }

View File

@ -91,7 +91,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam,
break; break;
case SPI_GETSCREENSAVEACTIVE: case SPI_GETSCREENSAVEACTIVE:
if(USER_Driver->pGetScreenSaveActive() || if(USER_Driver.pGetScreenSaveActive() ||
GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1) GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1)
*(BOOL*)lpvParam = TRUE; *(BOOL*)lpvParam = TRUE;
else else
@ -99,7 +99,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam,
break; break;
case SPI_GETSCREENSAVETIMEOUT: case SPI_GETSCREENSAVETIMEOUT:
timeout = USER_Driver->pGetScreenSaveTimeout(); timeout = USER_Driver.pGetScreenSaveTimeout();
if(!timeout) if(!timeout)
timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 ); timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 );
*(INT *) lpvParam = timeout * 1000; *(INT *) lpvParam = timeout * 1000;
@ -328,7 +328,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
break; break;
case SPI_GETSCREENSAVEACTIVE: case SPI_GETSCREENSAVEACTIVE:
if(USER_Driver->pGetScreenSaveActive() || if(USER_Driver.pGetScreenSaveActive() ||
GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1) GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1)
*(BOOL16 *) lpvParam = TRUE; *(BOOL16 *) lpvParam = TRUE;
else else
@ -336,7 +336,7 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
break; break;
case SPI_GETSCREENSAVETIMEOUT: case SPI_GETSCREENSAVETIMEOUT:
timeout = USER_Driver->pGetScreenSaveTimeout(); timeout = USER_Driver.pGetScreenSaveTimeout();
if(!timeout) if(!timeout)
timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 ); timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 );
*(INT16 *) lpvParam = timeout; *(INT16 *) lpvParam = timeout;
@ -363,11 +363,11 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
break; break;
case SPI_SETSCREENSAVEACTIVE: case SPI_SETSCREENSAVEACTIVE:
USER_Driver->pSetScreenSaveActive(uParam); USER_Driver.pSetScreenSaveActive(uParam);
break; break;
case SPI_SETSCREENSAVETIMEOUT: case SPI_SETSCREENSAVETIMEOUT:
USER_Driver->pSetScreenSaveTimeout(uParam); USER_Driver.pSetScreenSaveTimeout(uParam);
break; break;
case SPI_SETDESKWALLPAPER: case SPI_SETDESKWALLPAPER:

View File

@ -1,20 +0,0 @@
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ttydrv
C_SRCS = \
clipboard.c \
event.c \
init.c \
keyboard.c \
mouse.c \
wnd.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:

View File

@ -1,83 +0,0 @@
/*
* TTY clipboard driver
*
* Copyright 1998-1999 Patrik Stridvall
*/
#include "heap.h"
#include "ttydrv.h"
#include "win.h"
/**********************************************************************/
char *TTYDRV_CLIPBOARD_szSelection = NULL;
/***********************************************************************
* TTYDRV_CLIPBOARD_Acquire
*/
void TTYDRV_CLIPBOARD_Acquire()
{
}
/***********************************************************************
* TTYDRV_CLIPBOARD_Release
*/
void TTYDRV_CLIPBOARD_Release()
{
if(TTYDRV_CLIPBOARD_szSelection)
{
HeapFree(SystemHeap, 0, TTYDRV_CLIPBOARD_szSelection);
TTYDRV_CLIPBOARD_szSelection = NULL;
}
}
/***********************************************************************
* TTYDRV_CLIPBOARD_SetData
*/
void TTYDRV_CLIPBOARD_SetData(UINT wFormat)
{
}
/***********************************************************************
* TTYDRV_CLIPBOARD_GetData
*/
BOOL TTYDRV_CLIPBOARD_GetData(UINT wFormat)
{
return FALSE;
}
/***********************************************************************
* TTYDRV_CLIPBOARD_IsFormatAvailable
*/
BOOL TTYDRV_CLIPBOARD_IsFormatAvailable(UINT wFormat)
{
return FALSE;
}
/**************************************************************************
* TTYDRV_CLIPBOARD_RegisterFormat
*
* Registers a custom clipboard format
* Returns: TRUE - new format registered, FALSE - Format already registered
*/
BOOL TTYDRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName )
{
return TRUE;
}
/**************************************************************************
* TTYDRV_CLIPBOARD_IsSelectionowner
*
* Returns: TRUE - We(WINE) own the selection, FALSE - Selection not owned by us
*/
BOOL TTYDRV_CLIPBOARD_IsSelectionowner()
{
return FALSE;
}
/***********************************************************************
* TTYDRV_CLIPBOARD_ResetOwner
*/
void TTYDRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL bFooBar)
{
}

View File

@ -1,30 +0,0 @@
/*
* TTY event driver
*
* Copyright 1998-1999 Patrik Stridvall
*/
#include "ttydrv.h"
/***********************************************************************
* TTYDRV_EVENT_Synchronize
*/
void TTYDRV_EVENT_Synchronize( void )
{
}
/***********************************************************************
* TTYDRV_EVENT_CheckFocus
*/
BOOL TTYDRV_EVENT_CheckFocus(void)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_EVENT_UserRepaintDisable
*/
void TTYDRV_EVENT_UserRepaintDisable( BOOL bDisable )
{
}

View File

@ -1,45 +0,0 @@
/*
* TTY driver
*
* Copyright 1998-1999 Patrik Stridvall
*/
#include "clipboard.h"
#include "user.h"
#include "win.h"
#include "ttydrv.h"
CLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver =
{
TTYDRV_CLIPBOARD_Acquire,
TTYDRV_CLIPBOARD_Release,
TTYDRV_CLIPBOARD_SetData,
TTYDRV_CLIPBOARD_GetData,
TTYDRV_CLIPBOARD_IsFormatAvailable,
TTYDRV_CLIPBOARD_RegisterFormat,
TTYDRV_CLIPBOARD_IsSelectionowner,
TTYDRV_CLIPBOARD_ResetOwner
};
WND_DRIVER TTYDRV_WND_Driver =
{
TTYDRV_WND_Initialize,
TTYDRV_WND_Finalize,
TTYDRV_WND_CreateDesktopWindow,
TTYDRV_WND_CreateWindow,
TTYDRV_WND_DestroyWindow,
TTYDRV_WND_SetParent,
TTYDRV_WND_ForceWindowRaise,
TTYDRV_WND_SetWindowPos,
TTYDRV_WND_SetText,
TTYDRV_WND_SetFocus,
TTYDRV_WND_PreSizeMove,
TTYDRV_WND_PostSizeMove,
TTYDRV_WND_ScrollWindow,
TTYDRV_WND_SetDrawable,
TTYDRV_WND_SetHostAttr,
TTYDRV_WND_IsSelfClipping,
TTYDRV_WND_SetWindowRgn
};

View File

@ -1,112 +0,0 @@
/*
* TTY keyboard driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "dinput.h"
#include "user.h"
#include "keyboard.h"
#include "ttydrv.h"
/***********************************************************************
* TTYDRV_KEYBOARD_Init
*/
void TTYDRV_KEYBOARD_Init(void)
{
}
/***********************************************************************
* TTYDRV_KEYBOARD_VkKeyScan
*/
WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar)
{
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_MapVirtualKey
*/
UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetKeyNameText
*/
INT16 TTYDRV_KEYBOARD_GetKeyNameText(
LONG lParam, LPSTR lpBuffer, INT16 nSize)
{
if(lpBuffer && nSize)
{
*lpBuffer = 0;
}
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_ToAscii
*/
INT16 TTYDRV_KEYBOARD_ToAscii(
UINT16 virtKey, UINT16 scanCode,
LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags)
{
return 0;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetBeepActive
*/
BOOL TTYDRV_KEYBOARD_GetBeepActive()
{
return FALSE;
}
/***********************************************************************
* TTYDRV_KEYBOARD_SetBeepActive
*/
void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate)
{
}
/***********************************************************************
* TTYDRV_KEYBOARD_Beep
*/
void TTYDRV_KEYBOARD_Beep()
{
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetDIState
*/
BOOL TTYDRV_KEYBOARD_GetDIState(DWORD len, LPVOID ptr)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetDIData
*/
BOOL TTYDRV_KEYBOARD_GetDIData(
BYTE *keystate,
DWORD dodsize, LPDIDEVICEOBJECTDATA dod,
LPDWORD entries, DWORD flags)
{
return TRUE;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetKeyboardConfig
*/
void TTYDRV_KEYBOARD_GetKeyboardConfig(KEYBOARD_CONFIG *cfg) {
}
/***********************************************************************
* TTYDRV_KEYBOARD_SetKeyboardConfig
*/
extern void TTYDRV_KEYBOARD_SetKeyboardConfig(KEYBOARD_CONFIG *cfg, DWORD mask) {
}

View File

@ -1,28 +0,0 @@
/*
* TTY mouse driver
*
* Copyright 1998,1999 Patrik Stridvall
*/
#include "ttydrv.h"
/***********************************************************************
* TTYDRV_MOUSE_SetCursor
*/
void TTYDRV_MOUSE_SetCursor( struct tagCURSORICONINFO *lpCursor )
{
}
/***********************************************************************
* TTYDRV_MOUSE_MoveCursor
*/
void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
{
}
/***********************************************************************
* TTYDRV_MOUSE_Init
*/
void TTYDRV_MOUSE_Init(LPMOUSE_EVENT_PROC proc)
{
}

View File

@ -1233,7 +1233,7 @@ static void WIN_SendDestroyMsg( WND* pWnd )
WIN_CheckFocus(pWnd); WIN_CheckFocus(pWnd);
if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret(); if( CARET_GetHwnd() == pWnd->hwndSelf ) DestroyCaret();
CLIPBOARD_Driver->pResetOwner( pWnd, TRUE ); USER_Driver.pResetSelectionOwner( pWnd, TRUE );
/* /*
* Send the WM_DESTROY to the window. * Send the WM_DESTROY to the window.
@ -1374,7 +1374,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
} }
} }
CLIPBOARD_Driver->pResetOwner( wndPtr, FALSE ); /* before the window is unmapped */ USER_Driver.pResetSelectionOwner( wndPtr, FALSE ); /* before the window is unmapped */
/* Hide the window */ /* Hide the window */

View File

@ -8,7 +8,6 @@ MODULE = x11drv
C_SRCS = \ C_SRCS = \
clipboard.c \ clipboard.c \
event.c \ event.c \
init.c \
keyboard.c \ keyboard.c \
mouse.c \ mouse.c \
wnd.c wnd.c

View File

@ -126,7 +126,7 @@ UINT X11DRV_CLIPBOARD_MapPropertyToFormat(char *itemFmtName)
* and if CF_DIB exists in the cache. * and if CF_DIB exists in the cache.
* If wine dowsn't own the selection we always return CF_DIB * If wine dowsn't own the selection we always return CF_DIB
*/ */
if ( !X11DRV_CLIPBOARD_IsSelectionowner() ) if ( !X11DRV_IsSelectionOwner() )
return CF_DIB; return CF_DIB;
else if ( CLIPBOARD_IsPresent(CF_DIB) ) else if ( CLIPBOARD_IsPresent(CF_DIB) )
return CF_DIB; return CF_DIB;
@ -161,7 +161,7 @@ Atom X11DRV_CLIPBOARD_MapFormatToProperty(UINT wFormat)
* Request a PIXMAP, only if WINE is NOT the selection owner, * Request a PIXMAP, only if WINE is NOT the selection owner,
* AND the requested format is not in the cache. * AND the requested format is not in the cache.
*/ */
if ( !X11DRV_CLIPBOARD_IsSelectionowner() && !CLIPBOARD_IsPresent(wFormat) ) if ( !X11DRV_IsSelectionOwner() && !CLIPBOARD_IsPresent(wFormat) )
{ {
prop = XA_PIXMAP; prop = XA_PIXMAP;
break; break;
@ -793,10 +793,10 @@ void X11DRV_CLIPBOARD_ReleaseSelection(Atom selType, Window w, HWND hwnd)
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_Empty * X11DRV_ReleaseClipboard
* Voluntarily release all currently owned X selections * Voluntarily release all currently owned X selections
*/ */
void X11DRV_CLIPBOARD_Release() void X11DRV_ReleaseClipboard(void)
{ {
if( selectionAcquired ) if( selectionAcquired )
{ {
@ -845,9 +845,9 @@ void X11DRV_CLIPBOARD_Release()
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_Acquire() * X11DRV_AcquireClipboard
*/ */
void X11DRV_CLIPBOARD_Acquire() void X11DRV_AcquireClipboard(void)
{ {
Window owner; Window owner;
HWND hWndClipWindow = GetOpenClipboardWindow(); HWND hWndClipWindow = GetOpenClipboardWindow();
@ -895,12 +895,12 @@ void X11DRV_CLIPBOARD_Acquire()
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_IsFormatAvailable * X11DRV_IsClipboardFormatAvailable
* *
* Checks if the specified format is available in the current selection * Checks if the specified format is available in the current selection
* Only invoked when WINE is not the selection owner * Only invoked when WINE is not the selection owner
*/ */
BOOL X11DRV_CLIPBOARD_IsFormatAvailable(UINT wFormat) BOOL X11DRV_IsClipboardFormatAvailable(UINT wFormat)
{ {
Atom xaClipboard = TSXInternAtom(display, _CLIPBOARD, False); Atom xaClipboard = TSXInternAtom(display, _CLIPBOARD, False);
Window ownerPrimary = TSXGetSelectionOwner(display,XA_PRIMARY); Window ownerPrimary = TSXGetSelectionOwner(display,XA_PRIMARY);
@ -943,18 +943,18 @@ BOOL X11DRV_CLIPBOARD_IsFormatAvailable(UINT wFormat)
* try to convert the selection to the requested type. * try to convert the selection to the requested type.
*/ */
if ( !cSelectionTargets ) if ( !cSelectionTargets )
return X11DRV_CLIPBOARD_GetData( wFormat ); return X11DRV_GetClipboardData( wFormat );
return FALSE; return FALSE;
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_RegisterFormat * X11DRV_RegisterClipboardFormat
* *
* Registers a custom X clipboard format * Registers a custom X clipboard format
* Returns: TRUE - success, FALSE - failure * Returns: TRUE - success, FALSE - failure
*/ */
BOOL X11DRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName ) BOOL X11DRV_RegisterClipboardFormat( LPCSTR FormatName )
{ {
Atom prop = None; Atom prop = None;
char str[256]; char str[256];
@ -975,30 +975,30 @@ BOOL X11DRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName )
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_IsSelectionowner * X11DRV_IsSelectionOwner
* *
* Returns: TRUE - We(WINE) own the selection, FALSE - Selection not owned by us * Returns: TRUE - We(WINE) own the selection, FALSE - Selection not owned by us
*/ */
BOOL X11DRV_CLIPBOARD_IsSelectionowner() BOOL X11DRV_IsSelectionOwner(void)
{ {
return selectionAcquired; return selectionAcquired;
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_SetData * X11DRV_SetClipboardData
* *
* We don't need to do anything special here since the clipboard code * We don't need to do anything special here since the clipboard code
* maintains the cache. * maintains the cache.
* *
*/ */
void X11DRV_CLIPBOARD_SetData(UINT wFormat) void X11DRV_SetClipboardData(UINT wFormat)
{ {
/* Make sure we have acquired the X selection */ /* Make sure we have acquired the X selection */
X11DRV_CLIPBOARD_Acquire(); X11DRV_AcquireClipboard();
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_GetData * X11DRV_GetClipboardData
* *
* This method is invoked only when we DO NOT own the X selection * This method is invoked only when we DO NOT own the X selection
* *
@ -1007,7 +1007,7 @@ void X11DRV_CLIPBOARD_SetData(UINT wFormat)
* We always get the data from the selection client each time, * We always get the data from the selection client each time,
* since we have no way of determining if the data in our cache is stale. * since we have no way of determining if the data in our cache is stale.
*/ */
BOOL X11DRV_CLIPBOARD_GetData(UINT wFormat) BOOL X11DRV_GetClipboardData(UINT wFormat)
{ {
BOOL bRet = selectionAcquired; BOOL bRet = selectionAcquired;
HWND hWndClipWindow = GetOpenClipboardWindow(); HWND hWndClipWindow = GetOpenClipboardWindow();
@ -1074,7 +1074,7 @@ BOOL X11DRV_CLIPBOARD_GetData(UINT wFormat)
} }
/************************************************************************** /**************************************************************************
* X11DRV_CLIPBOARD_ResetOwner * X11DRV_ResetSelectionOwner
* *
* Called from DestroyWindow() to prevent X selection from being lost when * Called from DestroyWindow() to prevent X selection from being lost when
* a top level window is destroyed, by switching ownership to another top * a top level window is destroyed, by switching ownership to another top
@ -1082,7 +1082,7 @@ BOOL X11DRV_CLIPBOARD_GetData(UINT wFormat)
* Any top level window can own the selection. See X11DRV_CLIPBOARD_Acquire * Any top level window can own the selection. See X11DRV_CLIPBOARD_Acquire
* for a more detailed description of this. * for a more detailed description of this.
*/ */
void X11DRV_CLIPBOARD_ResetOwner(WND *pWnd, BOOL bFooBar) void X11DRV_ResetSelectionOwner(WND *pWnd, BOOL bFooBar)
{ {
HWND hWndClipOwner = 0; HWND hWndClipOwner = 0;
Window XWnd = X11DRV_WND_GetXWindow(pWnd); Window XWnd = X11DRV_WND_GetXWindow(pWnd);

View File

@ -202,20 +202,20 @@ static void CALLBACK EVENT_ProcessAllEvents( ULONG_PTR arg )
} }
/*********************************************************************** /***********************************************************************
* EVENT_Synchronize * X11DRV_Synchronize
* *
* Synchronize with the X server. Should not be used too often. * Synchronize with the X server. Should not be used too often.
*/ */
void X11DRV_EVENT_Synchronize( void ) void X11DRV_Synchronize( void )
{ {
TSXSync( display, False ); TSXSync( display, False );
EVENT_ProcessAllEvents( 0 ); EVENT_ProcessAllEvents( 0 );
} }
/*********************************************************************** /***********************************************************************
* EVENT_UserRepaintDisable * X11DRV_UserRepaintDisable
*/ */
void X11DRV_EVENT_UserRepaintDisable( BOOL bDisabled ) void X11DRV_UserRepaintDisable( BOOL bDisabled )
{ {
bUserRepaintDisabled = bDisabled; bUserRepaintDisabled = bDisabled;
} }
@ -715,12 +715,12 @@ static void EVENT_MotionNotify( HWND hWnd, XMotionEvent *event )
int yOffset = pWnd? pWnd->rectWindow.top : 0; int yOffset = pWnd? pWnd->rectWindow.top : 0;
WIN_ReleaseWndPtr(pWnd); WIN_ReleaseWndPtr(pWnd);
X11DRV_MOUSE_SendEvent( MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, X11DRV_SendEvent( MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE,
xOffset + event->x, yOffset + event->y, xOffset + event->x, yOffset + event->y,
X11DRV_EVENT_XStateToKeyState( event->state ), X11DRV_EVENT_XStateToKeyState( event->state ),
event->time, hWnd); event->time, hWnd);
} else { } else {
X11DRV_MOUSE_SendEvent( MOUSEEVENTF_MOVE, X11DRV_SendEvent( MOUSEEVENTF_MOVE,
event->x_root, event->y_root, event->x_root, event->y_root,
X11DRV_EVENT_XStateToKeyState( event->state ), X11DRV_EVENT_XStateToKeyState( event->state ),
event->time, hWnd); event->time, hWnd);
@ -774,7 +774,7 @@ static void EVENT_ButtonPress( HWND hWnd, XButtonEvent *event )
break; break;
} }
X11DRV_MOUSE_SendEvent( statusCodes[buttonNum], X11DRV_SendEvent( statusCodes[buttonNum],
xOffset + event->x, yOffset + event->y, xOffset + event->x, yOffset + event->y,
MAKEWPARAM(keystate,wData), MAKEWPARAM(keystate,wData),
event->time, hWnd); event->time, hWnd);
@ -822,7 +822,7 @@ static void EVENT_ButtonRelease( HWND hWnd, XButtonEvent *event )
return; return;
} }
X11DRV_MOUSE_SendEvent( statusCodes[buttonNum], X11DRV_SendEvent( statusCodes[buttonNum],
xOffset + event->x, yOffset + event->y, xOffset + event->x, yOffset + event->y,
keystate, event->time, hWnd); keystate, event->time, hWnd);
} }
@ -865,9 +865,9 @@ static void EVENT_FocusOut( HWND hWnd, XFocusChangeEvent *event )
} }
/********************************************************************** /**********************************************************************
* X11DRV_EVENT_CheckFocus * X11DRV_CheckFocus
*/ */
BOOL X11DRV_EVENT_CheckFocus(void) BOOL X11DRV_CheckFocus(void)
{ {
HWND hWnd; HWND hWnd;
Window xW; Window xW;
@ -1489,7 +1489,7 @@ static void EVENT_PropertyNotify( XPropertyEvent *event )
TRACE("\tPropertyDelete for atom %s on window %ld\n", TRACE("\tPropertyDelete for atom %s on window %ld\n",
TSXGetAtomName(event->display, event->atom), (long)event->window); TSXGetAtomName(event->display, event->atom), (long)event->window);
if (X11DRV_CLIPBOARD_IsSelectionowner()) if (X11DRV_IsSelectionOwner())
X11DRV_CLIPBOARD_FreeResources( event->atom ); X11DRV_CLIPBOARD_FreeResources( event->atom );
break; break;
} }
@ -1899,7 +1899,7 @@ static void EVENT_MappingNotify( XMappingEvent *event )
TSXRefreshKeyboardMapping(event); TSXRefreshKeyboardMapping(event);
/* reinitialize Wine-X11 driver keyboard table */ /* reinitialize Wine-X11 driver keyboard table */
X11DRV_KEYBOARD_Init(); X11DRV_InitKeyboard();
} }
@ -1940,7 +1940,7 @@ void X11DRV_EVENT_SetDGAStatus(HWND hwnd, int event_base)
/* DGA2 event handlers */ /* DGA2 event handlers */
static void EVENT_DGAMotionEvent( XDGAMotionEvent *event ) static void EVENT_DGAMotionEvent( XDGAMotionEvent *event )
{ {
X11DRV_MOUSE_SendEvent( MOUSEEVENTF_MOVE, X11DRV_SendEvent( MOUSEEVENTF_MOVE,
event->dx, event->dy, event->dx, event->dy,
X11DRV_EVENT_XStateToKeyState( event->state ), X11DRV_EVENT_XStateToKeyState( event->state ),
event->time, DGAhwnd ); event->time, DGAhwnd );
@ -1971,7 +1971,7 @@ static void EVENT_DGAButtonPressEvent( XDGAButtonEvent *event )
break; break;
} }
X11DRV_MOUSE_SendEvent( statusCodes[buttonNum], 0, 0, keystate, event->time, DGAhwnd ); X11DRV_SendEvent( statusCodes[buttonNum], 0, 0, keystate, event->time, DGAhwnd );
} }
static void EVENT_DGAButtonReleaseEvent( XDGAButtonEvent *event ) static void EVENT_DGAButtonReleaseEvent( XDGAButtonEvent *event )
@ -1999,7 +1999,7 @@ static void EVENT_DGAButtonReleaseEvent( XDGAButtonEvent *event )
break; break;
} }
X11DRV_MOUSE_SendEvent( statusCodes[buttonNum], 0, 0, keystate, event->time, DGAhwnd ); X11DRV_SendEvent( statusCodes[buttonNum], 0, 0, keystate, event->time, DGAhwnd );
} }
#endif #endif

View File

@ -1,45 +0,0 @@
/*
* X11 driver
*
* Copyright 1998 Patrik Stridvall
*/
#include "clipboard.h"
#include "user.h"
#include "win.h"
#include "x11drv.h"
CLIPBOARD_DRIVER X11DRV_CLIPBOARD_Driver =
{
X11DRV_CLIPBOARD_Acquire,
X11DRV_CLIPBOARD_Release,
X11DRV_CLIPBOARD_SetData,
X11DRV_CLIPBOARD_GetData,
X11DRV_CLIPBOARD_IsFormatAvailable,
X11DRV_CLIPBOARD_RegisterFormat,
X11DRV_CLIPBOARD_IsSelectionowner,
X11DRV_CLIPBOARD_ResetOwner
};
WND_DRIVER X11DRV_WND_Driver =
{
X11DRV_WND_Initialize,
X11DRV_WND_Finalize,
X11DRV_WND_CreateDesktopWindow,
X11DRV_WND_CreateWindow,
X11DRV_WND_DestroyWindow,
X11DRV_WND_SetParent,
X11DRV_WND_ForceWindowRaise,
X11DRV_WND_SetWindowPos,
X11DRV_WND_SetText,
X11DRV_WND_SetFocus,
X11DRV_WND_PreSizeMove,
X11DRV_WND_PostSizeMove,
X11DRV_WND_SurfaceCopy,
X11DRV_WND_SetDrawable,
X11DRV_WND_SetHostAttr,
X11DRV_WND_IsSelfClipping,
X11DRV_WND_SetWindowRgn
};

View File

@ -718,7 +718,7 @@ void X11DRV_KEYBOARD_HandleEvent( WND *pWnd, XKeyEvent *event )
/********************************************************************** /**********************************************************************
* X11DRV_KEYBOARD_DetectLayout * X11DRV_KEYBOARD_DetectLayout
* *
* Called from X11DRV_KEYBOARD_Init * Called from X11DRV_InitKeyboard
* This routine walks through the defined keyboard layouts and selects * This routine walks through the defined keyboard layouts and selects
* whichever matches most closely. * whichever matches most closely.
*/ */
@ -816,9 +816,9 @@ X11DRV_KEYBOARD_DetectLayout (void)
} }
/********************************************************************** /**********************************************************************
* X11DRV_KEYBOARD_Init * X11DRV_InitKeyboard
*/ */
void X11DRV_KEYBOARD_Init(void) void X11DRV_InitKeyboard(void)
{ {
KeySym *ksp; KeySym *ksp;
XModifierKeymap *mmp; XModifierKeymap *mmp;
@ -1029,9 +1029,9 @@ void X11DRV_KEYBOARD_Init(void)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_VkKeyScan * X11DRV_VkKeyScan
*/ */
WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar) WORD X11DRV_VkKeyScan(CHAR cChar)
{ {
KeyCode keycode; KeyCode keycode;
KeySym keysym; KeySym keysym;
@ -1077,9 +1077,9 @@ WORD X11DRV_KEYBOARD_VkKeyScan(CHAR cChar)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_MapVirtualKey * X11DRV_MapVirtualKey
*/ */
UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType) UINT16 X11DRV_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
{ {
#define returnMVK(value) { TRACE("returning 0x%x.\n",value); return value; } #define returnMVK(value) { TRACE("returning 0x%x.\n",value); return value; }
@ -1161,9 +1161,9 @@ UINT16 X11DRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_GetKeyNameText * X11DRV_GetKeyNameText
*/ */
INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize) INT16 X11DRV_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
{ {
int vkey, ansi, scanCode; int vkey, ansi, scanCode;
KeyCode keyc; KeyCode keyc;
@ -1174,7 +1174,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
scanCode &= 0x1ff; /* keep "extended-key" flag with code */ scanCode &= 0x1ff; /* keep "extended-key" flag with code */
/* FIXME: should use MVK type 3 (NT version that distinguishes right and left */ /* FIXME: should use MVK type 3 (NT version that distinguishes right and left */
vkey = X11DRV_KEYBOARD_MapVirtualKey(scanCode, 1); vkey = X11DRV_MapVirtualKey(scanCode, 1);
/* handle "don't care" bit (0x02000000) */ /* handle "don't care" bit (0x02000000) */
if (!(lParam & 0x02000000)) { if (!(lParam & 0x02000000)) {
@ -1196,7 +1196,7 @@ INT16 X11DRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize)
} }
} }
ansi = X11DRV_KEYBOARD_MapVirtualKey(vkey, 2); ansi = X11DRV_MapVirtualKey(vkey, 2);
TRACE("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", scanCode, vkey, ansi); TRACE("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", scanCode, vkey, ansi);
/* first get the name of the "regular" keys which is the Upper case /* first get the name of the "regular" keys which is the Upper case
@ -1333,7 +1333,7 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_ToAscii * X11DRV_ToAscii
* *
* The ToAscii function translates the specified virtual-key code and keyboard * The ToAscii function translates the specified virtual-key code and keyboard
* state to the corresponding Windows character or characters. * state to the corresponding Windows character or characters.
@ -1350,7 +1350,7 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
* FIXME : should do the above (return 2 for non matching deadchar+char combinations) * FIXME : should do the above (return 2 for non matching deadchar+char combinations)
* *
*/ */
INT16 X11DRV_KEYBOARD_ToAscii( INT16 X11DRV_ToAscii(
UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState, UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
LPVOID lpChar, UINT16 flags) LPVOID lpChar, UINT16 flags)
{ {
@ -1469,9 +1469,9 @@ INT16 X11DRV_KEYBOARD_ToAscii(
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_GetBeepActive * X11DRV_GetBeepActive
*/ */
BOOL X11DRV_KEYBOARD_GetBeepActive() BOOL X11DRV_GetBeepActive()
{ {
XKeyboardState keyboard_state; XKeyboardState keyboard_state;
@ -1481,9 +1481,9 @@ BOOL X11DRV_KEYBOARD_GetBeepActive()
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_SetBeepActive * X11DRV_SetBeepActive
*/ */
void X11DRV_KEYBOARD_SetBeepActive(BOOL bActivate) void X11DRV_SetBeepActive(BOOL bActivate)
{ {
XKeyboardControl keyboard_value; XKeyboardControl keyboard_value;
@ -1496,17 +1496,17 @@ void X11DRV_KEYBOARD_SetBeepActive(BOOL bActivate)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_Beep * X11DRV_Beep
*/ */
void X11DRV_KEYBOARD_Beep() void X11DRV_Beep()
{ {
TSXBell(display, 0); TSXBell(display, 0);
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_GetDIState * X11DRV_GetDIState
*/ */
BOOL X11DRV_KEYBOARD_GetDIState(DWORD len, LPVOID ptr) BOOL X11DRV_GetDIState(DWORD len, LPVOID ptr)
{ {
if (len==256) { if (len==256) {
int keyc,vkey; int keyc,vkey;
@ -1524,14 +1524,14 @@ BOOL X11DRV_KEYBOARD_GetDIState(DWORD len, LPVOID ptr)
} }
return TRUE; return TRUE;
} }
WARN("whoops, X11DRV_KEYBOARD_GetState got len %ld?\n", len); WARN("whoops, got len %ld?\n", len);
return TRUE; return TRUE;
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_GetDIData * X11DRV_GetDIData
*/ */
BOOL X11DRV_KEYBOARD_GetDIData( BOOL X11DRV_GetDIData(
BYTE *keystate, BYTE *keystate,
DWORD dodsize, LPDIDEVICEOBJECTDATA dod, DWORD dodsize, LPDIDEVICEOBJECTDATA dod,
LPDWORD entries, DWORD flags) LPDWORD entries, DWORD flags)
@ -1573,9 +1573,9 @@ BOOL X11DRV_KEYBOARD_GetDIData(
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_GetKeyboardConfig * X11DRV_GetKeyboardConfig
*/ */
void X11DRV_KEYBOARD_GetKeyboardConfig(KEYBOARD_CONFIG *cfg) { void X11DRV_GetKeyboardConfig(KEYBOARD_CONFIG *cfg) {
XKeyboardState xks; XKeyboardState xks;
/* For the moment, only get the auto-repeat mode */ /* For the moment, only get the auto-repeat mode */
@ -1584,9 +1584,9 @@ void X11DRV_KEYBOARD_GetKeyboardConfig(KEYBOARD_CONFIG *cfg) {
} }
/*********************************************************************** /***********************************************************************
* X11DRV_KEYBOARD_SetKeyboardConfig * X11DRV_SetKeyboardConfig
*/ */
extern void X11DRV_KEYBOARD_SetKeyboardConfig(KEYBOARD_CONFIG *cfg, DWORD mask) { extern void X11DRV_SetKeyboardConfig(KEYBOARD_CONFIG *cfg, DWORD mask) {
XKeyboardControl xkc; XKeyboardControl xkc;
unsigned long X_mask = 0; unsigned long X_mask = 0;

View File

@ -161,9 +161,9 @@ static BOOL X11DRV_MOUSE_DoSetCursor( CURSORICONINFO *ptr )
} }
/*********************************************************************** /***********************************************************************
* X11DRV_MOUSE_SetCursor * X11DRV_SetCursor
*/ */
void X11DRV_MOUSE_SetCursor( CURSORICONINFO *lpCursor ) void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
{ {
BOOL success; BOOL success;
@ -199,9 +199,9 @@ void X11DRV_MOUSE_SetCursor( CURSORICONINFO *lpCursor )
} }
/*********************************************************************** /***********************************************************************
* X11DRV_MOUSE_MoveCursor * X11DRV_MoveCursor
*/ */
void X11DRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY) void X11DRV_MoveCursor(WORD wAbsX, WORD wAbsY)
{ {
/* /*
* We do not want the to create MotionNotify events here, * We do not want the to create MotionNotify events here,
@ -241,9 +241,9 @@ void X11DRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY)
} }
/*********************************************************************** /***********************************************************************
* X11DRV_MOUSE_Init * X11DRV_InitMouse
*/ */
void X11DRV_MOUSE_Init( LPMOUSE_EVENT_PROC proc ) void X11DRV_InitMouse( LPMOUSE_EVENT_PROC proc )
{ {
static int init_done; static int init_done;
@ -260,7 +260,7 @@ void X11DRV_MOUSE_Init( LPMOUSE_EVENT_PROC proc )
movement to initialize the mouse global variables */ movement to initialize the mouse global variables */
TSXQueryPointer( display, X11DRV_GetXRootWindow(), &root, &child, TSXQueryPointer( display, X11DRV_GetXRootWindow(), &root, &child,
&root_x, &root_y, &child_x, &child_y, &KeyState); &root_x, &root_y, &child_x, &child_y, &KeyState);
X11DRV_MOUSE_SendEvent(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, X11DRV_SendEvent(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE,
root_x, root_y, X11DRV_EVENT_XStateToKeyState(KeyState), root_x, root_y, X11DRV_EVENT_XStateToKeyState(KeyState),
GetTickCount(), 0 ); GetTickCount(), 0 );
} }
@ -268,9 +268,9 @@ void X11DRV_MOUSE_Init( LPMOUSE_EVENT_PROC proc )
/*********************************************************************** /***********************************************************************
* X11DRV_MOUSE_SendEvent * X11DRV_SendEvent
*/ */
void X11DRV_MOUSE_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY, void X11DRV_SendEvent( DWORD mouseStatus, DWORD posX, DWORD posY,
DWORD keyState, DWORD time, HWND hWnd ) DWORD keyState, DWORD time, HWND hWnd )
{ {
int width = GetSystemMetrics( SM_CXSCREEN ); int width = GetSystemMetrics( SM_CXSCREEN );

View File

@ -46,6 +46,28 @@ extern Pixmap X11DRV_BITMAP_Pixmap( HBITMAP );
/**********************************************************************/ /**********************************************************************/
WND_DRIVER X11DRV_WND_Driver =
{
X11DRV_WND_Initialize,
X11DRV_WND_Finalize,
X11DRV_WND_CreateDesktopWindow,
X11DRV_WND_CreateWindow,
X11DRV_WND_DestroyWindow,
X11DRV_WND_SetParent,
X11DRV_WND_ForceWindowRaise,
X11DRV_WND_SetWindowPos,
X11DRV_WND_SetText,
X11DRV_WND_SetFocus,
X11DRV_WND_PreSizeMove,
X11DRV_WND_PostSizeMove,
X11DRV_WND_SurfaceCopy,
X11DRV_WND_SetDrawable,
X11DRV_WND_SetHostAttr,
X11DRV_WND_IsSelfClipping,
X11DRV_WND_SetWindowRgn
};
/* X context to associate a hwnd to an X window */ /* X context to associate a hwnd to an X window */
XContext winContext = 0; XContext winContext = 0;