1996-08-24 20:26:35 +02:00
|
|
|
/*
|
|
|
|
* X11 graphics driver initialisation functions
|
|
|
|
*
|
|
|
|
* Copyright 1996 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1996-08-24 20:26:35 +02:00
|
|
|
*/
|
|
|
|
|
1999-02-04 12:11:01 +01:00
|
|
|
#include "config.h"
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
1996-08-24 20:26:35 +02:00
|
|
|
#include <string.h>
|
1999-04-01 10:16:08 +02:00
|
|
|
|
2002-12-10 23:56:43 +01:00
|
|
|
#include "windef.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "winbase.h"
|
2005-06-01 13:08:39 +02:00
|
|
|
#include "winreg.h"
|
1999-04-01 10:16:08 +02:00
|
|
|
#include "x11drv.h"
|
2002-06-02 23:40:24 +02:00
|
|
|
#include "wine/debug.h"
|
1998-02-15 20:40:49 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2001-05-11 02:17:47 +02:00
|
|
|
Display *gdi_display; /* display to use for all GDI functions */
|
|
|
|
|
2001-07-28 02:18:02 +02:00
|
|
|
static int palette_size;
|
|
|
|
|
2012-05-23 23:55:17 +02:00
|
|
|
static Pixmap stock_bitmap_pixmap; /* phys bitmap for the default stock bitmap */
|
2004-08-26 20:24:49 +02:00
|
|
|
|
2013-08-29 16:49:04 +02:00
|
|
|
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
|
|
|
|
|
2011-09-07 15:36:58 +02:00
|
|
|
static const struct gdi_dc_funcs x11drv_funcs;
|
2011-09-12 11:39:17 +02:00
|
|
|
static const struct gdi_dc_funcs *xrender_funcs;
|
2004-08-26 20:24:49 +02:00
|
|
|
|
1996-08-24 20:26:35 +02:00
|
|
|
/**********************************************************************
|
2005-06-29 21:28:06 +02:00
|
|
|
* device_init
|
|
|
|
*
|
|
|
|
* Perform initializations needed upon creation of the first device.
|
1996-08-24 20:26:35 +02:00
|
|
|
*/
|
2013-08-29 16:49:04 +02:00
|
|
|
static BOOL WINAPI device_init( INIT_ONCE *once, void *param, void **context )
|
1996-08-24 20:26:35 +02:00
|
|
|
{
|
2005-03-24 22:04:10 +01:00
|
|
|
/* Initialize XRender */
|
2011-09-12 11:39:17 +02:00
|
|
|
xrender_funcs = X11DRV_XRender_Init();
|
2005-03-24 22:04:10 +01:00
|
|
|
|
2007-03-22 20:06:19 +01:00
|
|
|
/* Init Xcursor */
|
|
|
|
X11DRV_Xcursor_Init();
|
|
|
|
|
2001-07-28 02:18:02 +02:00
|
|
|
palette_size = X11DRV_PALETTE_Init();
|
1997-06-16 19:43:53 +02:00
|
|
|
|
2012-05-23 23:55:17 +02:00
|
|
|
stock_bitmap_pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, 1 );
|
1997-02-02 20:01:52 +01:00
|
|
|
|
2013-08-29 16:49:04 +02:00
|
|
|
return TRUE;
|
1996-08-24 20:26:35 +02:00
|
|
|
}
|
|
|
|
|
2011-09-07 15:36:58 +02:00
|
|
|
|
|
|
|
static X11DRV_PDEVICE *create_x11_physdev( Drawable drawable )
|
1996-08-24 20:26:35 +02:00
|
|
|
{
|
|
|
|
X11DRV_PDEVICE *physDev;
|
|
|
|
|
2013-08-29 16:49:04 +02:00
|
|
|
InitOnceExecuteOnce( &init_once, device_init, NULL, NULL );
|
2005-06-29 21:28:06 +02:00
|
|
|
|
2011-09-07 15:36:58 +02:00
|
|
|
if (!(physDev = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*physDev) ))) return NULL;
|
1996-08-24 20:26:35 +02:00
|
|
|
|
2011-09-07 15:36:58 +02:00
|
|
|
physDev->drawable = drawable;
|
|
|
|
physDev->gc = XCreateGC( gdi_display, drawable, 0, NULL );
|
2001-05-11 02:17:47 +02:00
|
|
|
XSetGraphicsExposures( gdi_display, physDev->gc, False );
|
|
|
|
XSetSubwindowMode( gdi_display, physDev->gc, IncludeInferiors );
|
|
|
|
XFlush( gdi_display );
|
2011-09-07 15:36:58 +02:00
|
|
|
return physDev;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* X11DRV_CreateDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL X11DRV_CreateDC( PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
|
|
|
|
LPCWSTR output, const DEVMODEW* initData )
|
2011-09-07 15:36:58 +02:00
|
|
|
{
|
|
|
|
X11DRV_PDEVICE *physDev = create_x11_physdev( root_window );
|
|
|
|
|
|
|
|
if (!physDev) return FALSE;
|
|
|
|
|
2012-09-25 15:51:03 +02:00
|
|
|
physDev->depth = default_visual.depth;
|
2011-09-07 15:36:58 +02:00
|
|
|
physDev->color_shifts = &X11DRV_PALETTE_default_shifts;
|
2013-10-14 14:38:58 +02:00
|
|
|
physDev->dc_rect = get_virtual_screen_rect();
|
|
|
|
OffsetRect( &physDev->dc_rect, -physDev->dc_rect.left, -physDev->dc_rect.top );
|
2011-09-07 17:01:29 +02:00
|
|
|
push_dc_driver( pdev, &physDev->dev, &x11drv_funcs );
|
2012-05-08 12:18:54 +02:00
|
|
|
if (xrender_funcs && !xrender_funcs->pCreateDC( pdev, driver, device, output, initData )) return FALSE;
|
|
|
|
return TRUE;
|
2011-09-07 15:36:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* X11DRV_CreateCompatibleDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL X11DRV_CreateCompatibleDC( PHYSDEV orig, PHYSDEV *pdev )
|
2011-09-07 15:36:58 +02:00
|
|
|
{
|
2012-05-23 23:55:17 +02:00
|
|
|
X11DRV_PDEVICE *physDev = create_x11_physdev( stock_bitmap_pixmap );
|
2011-09-07 15:36:58 +02:00
|
|
|
|
|
|
|
if (!physDev) return FALSE;
|
|
|
|
|
|
|
|
physDev->depth = 1;
|
2012-07-12 21:19:58 +02:00
|
|
|
SetRect( &physDev->dc_rect, 0, 0, 1, 1 );
|
2011-09-07 15:36:58 +02:00
|
|
|
push_dc_driver( pdev, &physDev->dev, &x11drv_funcs );
|
2011-09-12 11:39:17 +02:00
|
|
|
if (orig) return TRUE; /* we already went through Xrender if we have an orig device */
|
2012-05-08 12:18:54 +02:00
|
|
|
if (xrender_funcs && !xrender_funcs->pCreateCompatibleDC( NULL, pdev )) return FALSE;
|
|
|
|
return TRUE;
|
1996-08-24 20:26:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* X11DRV_DeleteDC
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static BOOL CDECL X11DRV_DeleteDC( PHYSDEV dev )
|
1996-08-24 20:26:35 +02:00
|
|
|
{
|
2011-07-08 15:55:11 +02:00
|
|
|
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
|
|
|
|
2001-05-11 02:17:47 +02:00
|
|
|
XFreeGC( gdi_display, physDev->gc );
|
1998-11-25 13:36:03 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, physDev );
|
1996-08-24 20:26:35 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
1997-06-16 19:43:53 +02:00
|
|
|
|
2001-07-28 02:18:02 +02:00
|
|
|
|
2012-04-16 17:49:05 +02:00
|
|
|
void add_device_bounds( X11DRV_PDEVICE *dev, const RECT *rect )
|
|
|
|
{
|
|
|
|
RECT rc;
|
|
|
|
|
2012-04-25 13:18:28 +02:00
|
|
|
if (!dev->bounds) return;
|
2012-04-16 17:49:05 +02:00
|
|
|
if (dev->region && GetRgnBox( dev->region, &rc ))
|
|
|
|
{
|
2012-04-25 13:18:28 +02:00
|
|
|
if (IntersectRect( &rc, &rc, rect )) add_bounds_rect( dev->bounds, &rc );
|
2012-04-16 17:49:05 +02:00
|
|
|
}
|
2012-04-25 13:18:28 +02:00
|
|
|
else add_bounds_rect( dev->bounds, rect );
|
2012-04-16 17:49:05 +02:00
|
|
|
}
|
|
|
|
|
2012-04-25 12:26:44 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* X11DRV_SetBoundsRect
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static UINT CDECL X11DRV_SetBoundsRect( PHYSDEV dev, RECT *rect, UINT flags )
|
2012-04-25 12:26:44 +02:00
|
|
|
{
|
|
|
|
X11DRV_PDEVICE *pdev = get_x11drv_dev( dev );
|
|
|
|
|
2012-04-25 13:18:28 +02:00
|
|
|
if (flags & DCB_DISABLE) pdev->bounds = NULL;
|
|
|
|
else if (flags & DCB_ENABLE) pdev->bounds = rect;
|
|
|
|
return DCB_RESET; /* we don't have device-specific bounds */
|
2012-04-25 12:26:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-28 02:18:02 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetDeviceCaps (X11DRV.@)
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap )
|
2001-07-28 02:18:02 +02:00
|
|
|
{
|
|
|
|
switch(cap)
|
|
|
|
{
|
|
|
|
case SIZEPALETTE:
|
|
|
|
return palette_size;
|
|
|
|
default:
|
2017-05-18 13:35:02 +02:00
|
|
|
dev = GET_NEXT_PHYSDEV( dev, pGetDeviceCaps );
|
|
|
|
return dev->funcs->pGetDeviceCaps( dev, cap );
|
2001-07-28 02:18:02 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-10-31 16:07:51 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SelectFont
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static HFONT CDECL X11DRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
|
2012-10-31 16:07:51 +01:00
|
|
|
{
|
|
|
|
if (default_visual.depth <= 8) *aa_flags = GGO_BITMAP; /* no anti-aliasing on <= 8bpp */
|
|
|
|
dev = GET_NEXT_PHYSDEV( dev, pSelectFont );
|
|
|
|
return dev->funcs->pSelectFont( dev, hfont, aa_flags );
|
|
|
|
}
|
|
|
|
|
1997-06-16 19:43:53 +02:00
|
|
|
/**********************************************************************
|
2001-07-29 22:25:14 +02:00
|
|
|
* ExtEscape (X11DRV.@)
|
1997-06-16 19:43:53 +02:00
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data,
|
|
|
|
INT out_count, LPVOID out_data )
|
1997-06-16 19:43:53 +02:00
|
|
|
{
|
2011-07-08 15:55:11 +02:00
|
|
|
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
|
|
|
|
|
2001-07-29 22:25:14 +02:00
|
|
|
switch(escape)
|
1997-06-16 19:43:53 +02:00
|
|
|
{
|
2001-07-29 22:25:14 +02:00
|
|
|
case QUERYESCSUPPORT:
|
2013-02-01 09:01:20 +01:00
|
|
|
if (in_data && in_count >= sizeof(DWORD))
|
2001-07-29 22:25:14 +02:00
|
|
|
{
|
2004-11-30 22:38:57 +01:00
|
|
|
switch (*(const INT *)in_data)
|
2001-07-29 22:25:14 +02:00
|
|
|
{
|
2002-03-23 22:43:56 +01:00
|
|
|
case X11DRV_ESCAPE:
|
|
|
|
return TRUE;
|
2001-07-29 22:25:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2002-03-23 22:43:56 +01:00
|
|
|
case X11DRV_ESCAPE:
|
|
|
|
if (in_data && in_count >= sizeof(enum x11drv_escape_codes))
|
|
|
|
{
|
2004-11-30 22:38:57 +01:00
|
|
|
switch(*(const enum x11drv_escape_codes *)in_data)
|
2002-03-23 22:43:56 +01:00
|
|
|
{
|
2004-01-14 05:53:11 +01:00
|
|
|
case X11DRV_SET_DRAWABLE:
|
|
|
|
if (in_count >= sizeof(struct x11drv_escape_set_drawable))
|
|
|
|
{
|
2009-01-19 10:23:40 +01:00
|
|
|
const struct x11drv_escape_set_drawable *data = in_data;
|
2006-12-07 16:43:59 +01:00
|
|
|
physDev->dc_rect = data->dc_rect;
|
2004-01-14 05:53:11 +01:00
|
|
|
physDev->drawable = data->drawable;
|
2012-09-26 12:14:03 +02:00
|
|
|
XFreeGC( gdi_display, physDev->gc );
|
|
|
|
physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL );
|
|
|
|
XSetGraphicsExposures( gdi_display, physDev->gc, False );
|
2004-01-14 05:53:11 +01:00
|
|
|
XSetSubwindowMode( gdi_display, physDev->gc, data->mode );
|
2012-07-12 21:19:58 +02:00
|
|
|
TRACE( "SET_DRAWABLE hdc %p drawable %lx dc_rect %s\n",
|
|
|
|
dev->hdc, physDev->drawable, wine_dbgstr_rect(&physDev->dc_rect) );
|
2004-01-14 05:53:11 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2012-06-27 13:57:26 +02:00
|
|
|
case X11DRV_GET_DRAWABLE:
|
|
|
|
if (out_count >= sizeof(struct x11drv_escape_get_drawable))
|
|
|
|
{
|
|
|
|
struct x11drv_escape_get_drawable *data = out_data;
|
|
|
|
data->drawable = physDev->drawable;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2012-10-02 21:56:43 +02:00
|
|
|
case X11DRV_FLUSH_GL_DRAWABLE:
|
|
|
|
if (in_count >= sizeof(struct x11drv_escape_flush_gl_drawable))
|
|
|
|
{
|
|
|
|
const struct x11drv_escape_flush_gl_drawable *data = in_data;
|
|
|
|
RECT rect = physDev->dc_rect;
|
|
|
|
|
|
|
|
OffsetRect( &rect, -physDev->dc_rect.left, -physDev->dc_rect.top );
|
2018-03-16 11:08:28 +01:00
|
|
|
if (data->flush) XFlush( gdi_display );
|
2012-10-02 21:56:43 +02:00
|
|
|
XSetFunction( gdi_display, physDev->gc, GXcopy );
|
|
|
|
XCopyArea( gdi_display, data->gl_drawable, physDev->drawable, physDev->gc,
|
|
|
|
0, 0, rect.right, rect.bottom,
|
|
|
|
physDev->dc_rect.left, physDev->dc_rect.top );
|
|
|
|
add_device_bounds( physDev, &rect );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2004-01-14 05:53:11 +01:00
|
|
|
case X11DRV_START_EXPOSURES:
|
|
|
|
XSetGraphicsExposures( gdi_display, physDev->gc, True );
|
|
|
|
physDev->exposures = 0;
|
|
|
|
return TRUE;
|
|
|
|
case X11DRV_END_EXPOSURES:
|
|
|
|
if (out_count >= sizeof(HRGN))
|
|
|
|
{
|
|
|
|
HRGN hrgn = 0, tmp = 0;
|
|
|
|
|
|
|
|
XSetGraphicsExposures( gdi_display, physDev->gc, False );
|
|
|
|
if (physDev->exposures)
|
|
|
|
{
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
XEvent event;
|
|
|
|
|
|
|
|
XWindowEvent( gdi_display, physDev->drawable, ~0, &event );
|
|
|
|
if (event.type == NoExpose) break;
|
|
|
|
if (event.type == GraphicsExpose)
|
|
|
|
{
|
2010-10-04 20:41:11 +02:00
|
|
|
RECT rect;
|
2004-01-14 05:53:11 +01:00
|
|
|
|
2010-10-04 20:41:11 +02:00
|
|
|
rect.left = event.xgraphicsexpose.x - physDev->dc_rect.left;
|
|
|
|
rect.top = event.xgraphicsexpose.y - physDev->dc_rect.top;
|
|
|
|
rect.right = rect.left + event.xgraphicsexpose.width;
|
|
|
|
rect.bottom = rect.top + event.xgraphicsexpose.height;
|
2011-07-08 16:03:59 +02:00
|
|
|
if (GetLayout( dev->hdc ) & LAYOUT_RTL)
|
2010-10-04 20:41:11 +02:00
|
|
|
mirror_rect( &physDev->dc_rect, &rect );
|
|
|
|
|
|
|
|
TRACE( "got %s count %d\n", wine_dbgstr_rect(&rect),
|
2004-01-14 05:53:11 +01:00
|
|
|
event.xgraphicsexpose.count );
|
|
|
|
|
2010-10-04 20:41:11 +02:00
|
|
|
if (!tmp) tmp = CreateRectRgnIndirect( &rect );
|
|
|
|
else SetRectRgn( tmp, rect.left, rect.top, rect.right, rect.bottom );
|
2004-01-14 05:53:11 +01:00
|
|
|
if (hrgn) CombineRgn( hrgn, hrgn, tmp, RGN_OR );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
hrgn = tmp;
|
|
|
|
tmp = 0;
|
|
|
|
}
|
|
|
|
if (!event.xgraphicsexpose.count) break;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR( "got unexpected event %d\n", event.type );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tmp) DeleteObject( tmp );
|
|
|
|
}
|
|
|
|
*(HRGN *)out_data = hrgn;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
2012-05-08 14:03:56 +02:00
|
|
|
default:
|
|
|
|
break;
|
2002-03-23 22:43:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
1997-06-16 19:43:53 +02:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
2011-07-13 14:05:07 +02:00
|
|
|
|
2012-10-02 22:05:57 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* X11DRV_wine_get_wgl_driver
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static struct opengl_funcs * CDECL X11DRV_wine_get_wgl_driver( PHYSDEV dev, UINT version )
|
2012-10-02 22:05:57 +02:00
|
|
|
{
|
|
|
|
struct opengl_funcs *ret;
|
|
|
|
|
|
|
|
if (!(ret = get_glx_driver( version )))
|
|
|
|
{
|
|
|
|
dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
|
|
|
|
ret = dev->funcs->wine_get_wgl_driver( dev, version );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2018-02-26 19:42:16 +01:00
|
|
|
/**********************************************************************
|
|
|
|
* X11DRV_wine_get_vulkan_driver
|
|
|
|
*/
|
2019-07-06 20:45:50 +02:00
|
|
|
static const struct vulkan_funcs * CDECL X11DRV_wine_get_vulkan_driver( PHYSDEV dev, UINT version )
|
2018-02-26 19:42:16 +01:00
|
|
|
{
|
|
|
|
const struct vulkan_funcs *ret;
|
|
|
|
|
|
|
|
if (!(ret = get_vulkan_driver( version )))
|
|
|
|
{
|
|
|
|
dev = GET_NEXT_PHYSDEV( dev, wine_get_vulkan_driver );
|
|
|
|
ret = dev->funcs->wine_get_vulkan_driver( dev, version );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-07-13 14:05:07 +02:00
|
|
|
|
|
|
|
static const struct gdi_dc_funcs x11drv_funcs =
|
|
|
|
{
|
|
|
|
NULL, /* pAbortDoc */
|
|
|
|
NULL, /* pAbortPath */
|
2011-09-12 12:20:01 +02:00
|
|
|
NULL, /* pAlphaBlend */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pAngleArc */
|
|
|
|
X11DRV_Arc, /* pArc */
|
|
|
|
NULL, /* pArcTo */
|
|
|
|
NULL, /* pBeginPath */
|
2011-09-14 11:57:45 +02:00
|
|
|
NULL, /* pBlendImage */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_Chord, /* pChord */
|
|
|
|
NULL, /* pCloseFigure */
|
2011-09-07 15:36:58 +02:00
|
|
|
X11DRV_CreateCompatibleDC, /* pCreateCompatibleDC */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_CreateDC, /* pCreateDC */
|
|
|
|
X11DRV_DeleteDC, /* pDeleteDC */
|
|
|
|
NULL, /* pDeleteObject */
|
|
|
|
NULL, /* pDeviceCapabilities */
|
|
|
|
X11DRV_Ellipse, /* pEllipse */
|
|
|
|
NULL, /* pEndDoc */
|
|
|
|
NULL, /* pEndPage */
|
|
|
|
NULL, /* pEndPath */
|
2012-04-18 13:07:17 +02:00
|
|
|
NULL, /* pEnumFonts */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_EnumICMProfiles, /* pEnumICMProfiles */
|
|
|
|
NULL, /* pExcludeClipRect */
|
|
|
|
NULL, /* pExtDeviceMode */
|
|
|
|
X11DRV_ExtEscape, /* pExtEscape */
|
|
|
|
X11DRV_ExtFloodFill, /* pExtFloodFill */
|
|
|
|
NULL, /* pExtSelectClipRgn */
|
2012-04-18 13:07:17 +02:00
|
|
|
NULL, /* pExtTextOut */
|
2016-06-16 07:15:05 +02:00
|
|
|
X11DRV_FillPath, /* pFillPath */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pFillRgn */
|
|
|
|
NULL, /* pFlattenPath */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pFontIsLinked */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pFrameRgn */
|
|
|
|
NULL, /* pGdiComment */
|
2012-04-25 13:18:28 +02:00
|
|
|
NULL, /* pGetBoundsRect */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetCharABCWidths */
|
|
|
|
NULL, /* pGetCharABCWidthsI */
|
2012-04-18 13:07:17 +02:00
|
|
|
NULL, /* pGetCharWidth */
|
2019-04-09 11:32:59 +02:00
|
|
|
NULL, /* pGetCharWidthInfo */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_GetDeviceCaps, /* pGetDeviceCaps */
|
|
|
|
X11DRV_GetDeviceGammaRamp, /* pGetDeviceGammaRamp */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetFontData */
|
2015-08-29 18:54:17 +02:00
|
|
|
NULL, /* pGetFontRealizationInfo */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetFontUnicodeRanges */
|
|
|
|
NULL, /* pGetGlyphIndices */
|
|
|
|
NULL, /* pGetGlyphOutline */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_GetICMProfile, /* pGetICMProfile */
|
2011-07-14 12:37:04 +02:00
|
|
|
X11DRV_GetImage, /* pGetImage */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetKerningPairs */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_GetNearestColor, /* pGetNearestColor */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetOutlineTextMetrics */
|
2011-12-12 21:21:28 +01:00
|
|
|
NULL, /* pGetPixel */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_GetSystemPaletteEntries, /* pGetSystemPaletteEntries */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetTextCharsetInfo */
|
2012-04-18 13:07:17 +02:00
|
|
|
NULL, /* pGetTextExtentExPoint */
|
2011-10-19 21:51:39 +02:00
|
|
|
NULL, /* pGetTextExtentExPointI */
|
|
|
|
NULL, /* pGetTextFace */
|
2012-04-18 13:07:17 +02:00
|
|
|
NULL, /* pGetTextMetrics */
|
2011-11-30 13:09:08 +01:00
|
|
|
X11DRV_GradientFill, /* pGradientFill */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pIntersectClipRect */
|
|
|
|
NULL, /* pInvertRgn */
|
|
|
|
X11DRV_LineTo, /* pLineTo */
|
|
|
|
NULL, /* pModifyWorldTransform */
|
|
|
|
NULL, /* pMoveTo */
|
|
|
|
NULL, /* pOffsetClipRgn */
|
|
|
|
NULL, /* pOffsetViewportOrg */
|
|
|
|
NULL, /* pOffsetWindowOrg */
|
|
|
|
X11DRV_PaintRgn, /* pPaintRgn */
|
|
|
|
X11DRV_PatBlt, /* pPatBlt */
|
|
|
|
X11DRV_Pie, /* pPie */
|
|
|
|
NULL, /* pPolyBezier */
|
|
|
|
NULL, /* pPolyBezierTo */
|
|
|
|
NULL, /* pPolyDraw */
|
|
|
|
X11DRV_PolyPolygon, /* pPolyPolygon */
|
|
|
|
X11DRV_PolyPolyline, /* pPolyPolyline */
|
|
|
|
X11DRV_Polygon, /* pPolygon */
|
2012-04-17 14:38:24 +02:00
|
|
|
NULL, /* pPolyline */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pPolylineTo */
|
2011-07-14 12:59:48 +02:00
|
|
|
X11DRV_PutImage, /* pPutImage */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_RealizeDefaultPalette, /* pRealizeDefaultPalette */
|
|
|
|
X11DRV_RealizePalette, /* pRealizePalette */
|
|
|
|
X11DRV_Rectangle, /* pRectangle */
|
|
|
|
NULL, /* pResetDC */
|
|
|
|
NULL, /* pRestoreDC */
|
|
|
|
X11DRV_RoundRect, /* pRoundRect */
|
|
|
|
NULL, /* pSaveDC */
|
|
|
|
NULL, /* pScaleViewportExt */
|
|
|
|
NULL, /* pScaleWindowExt */
|
2012-05-23 23:55:17 +02:00
|
|
|
NULL, /* pSelectBitmap */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_SelectBrush, /* pSelectBrush */
|
|
|
|
NULL, /* pSelectClipPath */
|
2012-10-31 16:07:51 +01:00
|
|
|
X11DRV_SelectFont, /* pSelectFont */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pSelectPalette */
|
|
|
|
X11DRV_SelectPen, /* pSelectPen */
|
|
|
|
NULL, /* pSetArcDirection */
|
2012-01-11 20:55:35 +01:00
|
|
|
NULL, /* pSetBkColor */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pSetBkMode */
|
2012-04-25 12:26:44 +02:00
|
|
|
X11DRV_SetBoundsRect, /* pSetBoundsRect */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_SetDCBrushColor, /* pSetDCBrushColor */
|
|
|
|
X11DRV_SetDCPenColor, /* pSetDCPenColor */
|
2011-09-06 14:44:11 +02:00
|
|
|
NULL, /* pSetDIBitsToDevice */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_SetDeviceClipping, /* pSetDeviceClipping */
|
|
|
|
X11DRV_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */
|
|
|
|
NULL, /* pSetLayout */
|
|
|
|
NULL, /* pSetMapMode */
|
|
|
|
NULL, /* pSetMapperFlags */
|
|
|
|
X11DRV_SetPixel, /* pSetPixel */
|
|
|
|
NULL, /* pSetPolyFillMode */
|
|
|
|
NULL, /* pSetROP2 */
|
|
|
|
NULL, /* pSetRelAbs */
|
|
|
|
NULL, /* pSetStretchBltMode */
|
|
|
|
NULL, /* pSetTextAlign */
|
|
|
|
NULL, /* pSetTextCharacterExtra */
|
2012-01-11 20:55:35 +01:00
|
|
|
NULL, /* pSetTextColor */
|
2011-07-13 14:05:07 +02:00
|
|
|
NULL, /* pSetTextJustification */
|
|
|
|
NULL, /* pSetViewportExt */
|
|
|
|
NULL, /* pSetViewportOrg */
|
|
|
|
NULL, /* pSetWindowExt */
|
|
|
|
NULL, /* pSetWindowOrg */
|
|
|
|
NULL, /* pSetWorldTransform */
|
|
|
|
NULL, /* pStartDoc */
|
|
|
|
NULL, /* pStartPage */
|
|
|
|
X11DRV_StretchBlt, /* pStretchBlt */
|
|
|
|
NULL, /* pStretchDIBits */
|
2016-06-16 07:15:05 +02:00
|
|
|
X11DRV_StrokeAndFillPath, /* pStrokeAndFillPath */
|
|
|
|
X11DRV_StrokePath, /* pStrokePath */
|
2011-07-13 14:05:07 +02:00
|
|
|
X11DRV_UnrealizePalette, /* pUnrealizePalette */
|
|
|
|
NULL, /* pWidenPath */
|
2019-10-22 10:39:16 +02:00
|
|
|
X11DRV_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */
|
2019-10-22 10:39:06 +02:00
|
|
|
X11DRV_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */
|
2012-10-02 22:05:57 +02:00
|
|
|
X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */
|
2018-02-26 19:42:16 +01:00
|
|
|
X11DRV_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
|
2012-05-08 12:16:05 +02:00
|
|
|
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
2011-07-13 14:05:07 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* X11DRV_get_gdi_driver
|
|
|
|
*/
|
|
|
|
const struct gdi_dc_funcs * CDECL X11DRV_get_gdi_driver( unsigned int version )
|
|
|
|
{
|
|
|
|
if (version != WINE_GDI_DRIVER_VERSION)
|
|
|
|
{
|
|
|
|
ERR( "version mismatch, gdi32 wants %u but winex11 has %u\n", version, WINE_GDI_DRIVER_VERSION );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
return &x11drv_funcs;
|
|
|
|
}
|