Commit ced71edb authored by Alexandre Julliard's avatar Alexandre Julliard

Added support for driver-specific escapes in the x11drv to retrieve

X11 information. Finished dll separation of opengl32.
parent 65dbf4f6
......@@ -40,7 +40,7 @@ LIBRARIES = \
unicode/libwine_unicode.$(LIBEXT)
# Dlls that we need to link against (should go away)
LINKABLE_DLLS = winspool.drv x11drv.dll user32.dll gdi32.dll kernel32.dll ntdll.dll
LINKABLE_DLLS = winspool.drv user32.dll gdi32.dll kernel32.dll ntdll.dll
# Libraries symlinks to create at the top level
LIBSYMLINKS = \
......@@ -118,9 +118,6 @@ libwine_uuid.a: ole/libwine_uuid.a
libwinspool.drv.$(LIBEXT): dlls/winspool.drv$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/winspool.drv$(DLLEXT) $@
libx11drv.dll.$(LIBEXT): dlls/x11drv.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/x11drv.dll$(DLLEXT) $@
libuser32.dll.$(LIBEXT): dlls/user32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) dlls/user32.dll$(DLLEXT) $@
......
......@@ -651,9 +651,8 @@ olepro32/olepro32.dll$(DLLEXT): dummy oleaut32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
olesvr/olesvr32.dll$(DLLEXT): dummy kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
@cd olesvr && $(MAKE) olesvr32.dll$(DLLEXT)
opengl32/opengl32.dll$(DLLEXT): dummy user32.dll$(DLLEXT) x11drv.dll$(DLLEXT) \
kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT) libx11drv.dll.$(LIBEXT) libkernel32.dll.$(LIBEXT) \
libntdll.dll.$(LIBEXT)
opengl32/opengl32.dll$(DLLEXT): dummy user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) \
kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
@cd opengl32 && $(MAKE) opengl32.dll$(DLLEXT)
psapi/psapi.dll$(DLLEXT): dummy kernel32.dll$(DLLEXT) ntdll.dll$(DLLEXT)
......@@ -833,9 +832,6 @@ libntdll.dll.$(LIBEXT): ntdll/ntdll.dll$(DLLEXT)
libgdi32.dll.$(LIBEXT): gdi/gdi32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) gdi/gdi32.dll$(DLLEXT) $@
libx11drv.dll.$(LIBEXT): x11drv/x11drv.dll$(DLLEXT)
$(RM) $@ && $(LN_S) x11drv/x11drv.dll$(DLLEXT) $@
libuser32.dll.$(LIBEXT): user/user32.dll$(DLLEXT)
$(RM) $@ && $(LN_S) user/user32.dll$(DLLEXT) $@
......
......@@ -3,7 +3,10 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = opengl32.dll
IMPORTS = x11drv.dll kernel32.dll ntdll.dll
EXTRALIBS = $(LIBTSX11) $(X_LIBS) $(XLIB)
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \
wgl.c \
......
......@@ -3,7 +3,7 @@ type win32
init OpenGL32_Init
import user32.dll
import x11drv.dll
import gdi32.dll
import kernel32.dll
import ntdll.dll
......
......@@ -29,6 +29,7 @@
#include "wine/debug.h"
#include "winnt.h"
#include "x11drv.h"
#include "x11font.h"
#include "ddrawi.h"
WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
......@@ -286,6 +287,8 @@ INT X11DRV_GetDeviceCaps( DC *dc, INT cap )
INT X11DRV_ExtEscape( DC *dc, INT escape, INT in_count, LPCVOID in_data,
INT out_count, LPVOID out_data )
{
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
switch(escape)
{
case QUERYESCSUPPORT:
......@@ -295,6 +298,8 @@ INT X11DRV_ExtEscape( DC *dc, INT escape, INT in_count, LPCVOID in_data,
{
case DCICOMMAND:
return DD_HAL_VERSION;
case X11DRV_ESCAPE:
return TRUE;
}
}
break;
......@@ -307,6 +312,36 @@ INT X11DRV_ExtEscape( DC *dc, INT escape, INT in_count, LPCVOID in_data,
return X11DRV_DCICommand(in_count, lpCmd, out_data);
}
break;
case X11DRV_ESCAPE:
if (in_data && in_count >= sizeof(enum x11drv_escape_codes))
{
switch(*(enum x11drv_escape_codes *)in_data)
{
case X11DRV_GET_DISPLAY:
if (out_count >= sizeof(Display *))
{
*(Display **)out_data = gdi_display;
return TRUE;
}
break;
case X11DRV_GET_DRAWABLE:
if (out_count >= sizeof(Drawable))
{
*(Drawable *)out_data = physDev->drawable;
return TRUE;
}
break;
case X11DRV_GET_FONT:
if (out_count >= sizeof(Font))
{
fontObject* pfo = XFONT_GetFontObject( physDev->font );
*(Font *)out_data = pfo->fs->fid;
return TRUE;
}
}
}
break;
}
return 0;
}
......@@ -329,6 +329,16 @@ extern int X11DRV_PALETTE_SetMapping(struct tagPALETTEOBJ *palPtr, UINT uStart,
extern int X11DRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ *palPtr);
extern BOOL X11DRV_PALETTE_IsDark(int pixel);
/* GDI escapes */
#define X11DRV_ESCAPE 6789
enum x11drv_escape_codes
{
X11DRV_GET_DISPLAY, /* get X11 display for a DC */
X11DRV_GET_DRAWABLE, /* get current drawable for a DC */
X11DRV_GET_FONT, /* get current X font for a DC */
};
/**************************************************************************
* X11 USER driver
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment