1996-08-24 18:26:35 +00:00
|
|
|
/*
|
1999-04-01 08:16:08 +00:00
|
|
|
* X11 driver definitions
|
2002-03-09 23:29:33 +00:00
|
|
|
*
|
|
|
|
* Copyright 1996 Alexandre Julliard
|
|
|
|
* Copyright 1999 Patrik Stridvall
|
|
|
|
*
|
|
|
|
* 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 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1996-08-24 18:26:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_X11DRV_H
|
|
|
|
#define __WINE_X11DRV_H
|
|
|
|
|
2002-05-31 23:06:46 +00:00
|
|
|
#ifndef __WINE_CONFIG_H
|
|
|
|
# error You must include config.h to use this header
|
|
|
|
#endif
|
1998-12-26 12:00:43 +00:00
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
1998-12-26 12:00:43 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xresource.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xatom.h>
|
2002-09-12 22:28:01 +00:00
|
|
|
|
2005-04-14 12:48:11 +00:00
|
|
|
#define BOOL X_BOOL
|
|
|
|
#define BYTE X_BYTE
|
|
|
|
#define INT8 X_INT8
|
|
|
|
#define INT16 X_INT16
|
|
|
|
#define INT32 X_INT32
|
|
|
|
#define INT64 X_INT64
|
|
|
|
#include <X11/Xmd.h>
|
|
|
|
#include <X11/Xproto.h>
|
|
|
|
#undef BOOL
|
|
|
|
#undef BYTE
|
|
|
|
#undef INT8
|
|
|
|
#undef INT16
|
|
|
|
#undef INT32
|
|
|
|
#undef INT64
|
|
|
|
#undef LONG64
|
|
|
|
|
2002-09-12 22:28:01 +00:00
|
|
|
#undef Status /* avoid conflict with wintrnl.h */
|
|
|
|
typedef int Status;
|
1998-12-07 09:13:40 +00:00
|
|
|
|
1999-03-14 16:35:05 +00:00
|
|
|
#include "windef.h"
|
2000-06-08 04:57:22 +00:00
|
|
|
#include "winbase.h"
|
2005-01-17 19:17:47 +00:00
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
2003-09-16 20:24:29 +00:00
|
|
|
#include "ddrawi.h"
|
2011-07-07 10:43:51 +00:00
|
|
|
#include "wine/gdi_driver.h"
|
2005-04-20 16:24:13 +00:00
|
|
|
#include "wine/list.h"
|
1999-02-04 14:05:38 +00:00
|
|
|
|
2000-05-12 20:18:14 +00:00
|
|
|
#define MAX_PIXELFORMATS 8
|
2007-07-19 02:40:24 +00:00
|
|
|
#define MAX_DASHLEN 16
|
1999-09-03 16:49:17 +00:00
|
|
|
|
2010-02-20 08:57:07 +00:00
|
|
|
#define WINE_XDND_VERSION 4
|
|
|
|
|
2008-12-16 13:18:49 +00:00
|
|
|
extern void CDECL wine_tsx11_lock(void);
|
|
|
|
extern void CDECL wine_tsx11_unlock(void);
|
2003-11-21 21:48:36 +00:00
|
|
|
|
1996-08-24 18:26:35 +00:00
|
|
|
/* X physical pen */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int style;
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 19:17:50 +00:00
|
|
|
int endcap;
|
|
|
|
int linejoin;
|
1996-08-24 18:26:35 +00:00
|
|
|
int pixel;
|
|
|
|
int width;
|
2007-07-19 02:40:24 +00:00
|
|
|
char dashes[MAX_DASHLEN];
|
1996-08-24 18:26:35 +00:00
|
|
|
int dash_len;
|
Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
1998-06-28 18:40:26 +00:00
|
|
|
int type; /* GEOMETRIC || COSMETIC */
|
2007-07-19 02:40:24 +00:00
|
|
|
int ext; /* extended pen - 1, otherwise - 0 */
|
1996-08-24 18:26:35 +00:00
|
|
|
} X_PHYSPEN;
|
|
|
|
|
|
|
|
/* X physical brush */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int style;
|
|
|
|
int fillStyle;
|
|
|
|
int pixel;
|
|
|
|
Pixmap pixmap;
|
|
|
|
} X_PHYSBRUSH;
|
|
|
|
|
2009-09-01 18:50:48 +00:00
|
|
|
typedef struct {
|
|
|
|
int shift;
|
|
|
|
int scale;
|
|
|
|
int max;
|
|
|
|
} ChannelShift;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-09-26 14:56:55 +00:00
|
|
|
ChannelShift physicalRed, physicalGreen, physicalBlue;
|
|
|
|
ChannelShift logicalRed, logicalGreen, logicalBlue;
|
2009-09-01 18:50:48 +00:00
|
|
|
} ColorShifts;
|
|
|
|
|
2005-03-31 19:13:03 +00:00
|
|
|
/* X physical bitmap */
|
|
|
|
typedef struct
|
|
|
|
{
|
2005-04-12 10:17:55 +00:00
|
|
|
HBITMAP hbitmap;
|
2005-03-31 19:13:03 +00:00
|
|
|
Pixmap pixmap;
|
2005-09-26 11:04:12 +00:00
|
|
|
XID glxpixmap;
|
2011-09-26 13:29:28 +00:00
|
|
|
int depth; /* depth of the X pixmap */
|
2012-01-10 19:19:56 +00:00
|
|
|
int format; /* color format (used by XRender) */
|
2011-09-26 13:29:28 +00:00
|
|
|
ColorShifts color_shifts; /* color shifts of the X pixmap */
|
2009-09-10 14:00:00 +00:00
|
|
|
BOOL trueColor;
|
2005-03-31 19:13:03 +00:00
|
|
|
} X_PHYSBITMAP;
|
|
|
|
|
1996-08-24 18:26:35 +00:00
|
|
|
/* X physical font */
|
1999-02-26 11:11:13 +00:00
|
|
|
typedef UINT X_PHYSFONT;
|
1996-08-24 18:26:35 +00:00
|
|
|
|
|
|
|
/* X physical device */
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-03-18 11:59:26 +00:00
|
|
|
struct gdi_physdev dev;
|
1996-08-24 18:26:35 +00:00
|
|
|
GC gc; /* X Window GC */
|
|
|
|
Drawable drawable;
|
2006-12-07 15:43:59 +00:00
|
|
|
RECT dc_rect; /* DC rectangle relative to drawable */
|
|
|
|
RECT drawable_rect; /* Drawable rectangle relative to screen */
|
|
|
|
HRGN region; /* Device region (visible region & clip region) */
|
1996-08-24 18:26:35 +00:00
|
|
|
X_PHYSFONT font;
|
|
|
|
X_PHYSPEN pen;
|
|
|
|
X_PHYSBRUSH brush;
|
2005-04-12 11:59:48 +00:00
|
|
|
X_PHYSBITMAP *bitmap; /* currently selected bitmap for memory DCs */
|
2004-03-04 04:05:04 +00:00
|
|
|
BOOL has_gdi_font; /* is current font a GDI font? */
|
2004-01-18 22:20:17 +00:00
|
|
|
int depth; /* bit depth of the DC */
|
2009-09-01 19:48:29 +00:00
|
|
|
ColorShifts *color_shifts; /* color shifts of the DC */
|
2001-06-11 20:24:57 +00:00
|
|
|
int exposures; /* count of graphics exposures operations */
|
2000-05-12 20:18:14 +00:00
|
|
|
int current_pf;
|
2007-09-25 17:20:58 +00:00
|
|
|
Drawable gl_drawable;
|
2007-09-26 15:17:13 +00:00
|
|
|
Pixmap pixmap; /* Pixmap for a GLXPixmap gl_drawable */
|
2008-05-28 15:52:06 +00:00
|
|
|
int gl_copy;
|
1996-08-24 18:26:35 +00:00
|
|
|
} X11DRV_PDEVICE;
|
|
|
|
|
2011-07-08 13:55:11 +00:00
|
|
|
static inline X11DRV_PDEVICE *get_x11drv_dev( PHYSDEV dev )
|
|
|
|
{
|
|
|
|
return (X11DRV_PDEVICE *)dev;
|
|
|
|
}
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern X_PHYSBITMAP BITMAP_stock_phys_bitmap DECLSPEC_HIDDEN; /* phys bitmap for the default stock bitmap */
|
1998-10-28 09:53:53 +00:00
|
|
|
|
2009-07-09 19:51:05 +00:00
|
|
|
/* Retrieve the GC used for bitmap operations */
|
2011-05-13 16:52:35 +00:00
|
|
|
extern GC get_bitmap_gc(int depth) DECLSPEC_HIDDEN;
|
1998-10-28 09:53:53 +00:00
|
|
|
|
1996-08-24 18:26:35 +00:00
|
|
|
/* Wine driver X11 functions */
|
|
|
|
|
2011-07-13 12:56:12 +00:00
|
|
|
extern BOOL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
|
|
|
|
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
2011-11-07 21:04:00 +00:00
|
|
|
extern BOOL X11DRV_CopyBitmap( HBITMAP src, HBITMAP dst ) DECLSPEC_HIDDEN;
|
2011-08-03 09:37:02 +00:00
|
|
|
extern BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
|
2011-10-19 13:37:10 +00:00
|
|
|
extern BOOL X11DRV_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW dfeproc, LPARAM lp ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern INT X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const RECT *lprect,
|
|
|
|
LPCWSTR str, UINT count, const INT *lpDx ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buffer ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_GetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_GetICMProfile( PHYSDEV dev, LPDWORD size, LPWSTR filename ) DECLSPEC_HIDDEN;
|
2011-07-14 10:37:04 +00:00
|
|
|
extern DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
|
2011-07-21 09:17:13 +00:00
|
|
|
struct gdi_image_bits *bits, struct bitblt_coords *src ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern COLORREF X11DRV_GetNearestColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
|
|
|
extern UINT X11DRV_GetSystemPaletteEntries( PHYSDEV dev, UINT start, UINT count, LPPALETTEENTRY entries ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count, INT maxExt,
|
|
|
|
LPINT lpnFit, LPINT alpDx, LPSIZE size ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics) DECLSPEC_HIDDEN;
|
2011-11-30 12:09:08 +00:00
|
|
|
extern BOOL X11DRV_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
|
|
|
|
void *grad_array, ULONG ngrad, ULONG mode ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern BOOL X11DRV_LineTo( PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Pie( PHYSDEV dev, INT left, INT top, INT right,
|
|
|
|
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Polyline( PHYSDEV dev,const POINT* pt,INT count) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines) DECLSPEC_HIDDEN;
|
2011-07-21 16:49:47 +00:00
|
|
|
extern DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info,
|
|
|
|
const struct gdi_image_bits *bits, struct bitblt_coords *src,
|
|
|
|
struct bitblt_coords *dst, DWORD rop ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern UINT X11DRV_RealizeDefaultPalette( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
|
|
|
extern UINT X11DRV_RealizePalette( PHYSDEV dev, HPALETTE hpal, BOOL primary ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|
|
|
INT ell_width, INT ell_height ) DECLSPEC_HIDDEN;
|
|
|
|
extern HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
2011-12-29 18:49:41 +00:00
|
|
|
extern HBRUSH X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush, const struct brush_pattern *pattern ) DECLSPEC_HIDDEN;
|
2011-10-18 11:10:58 +00:00
|
|
|
extern HFONT X11DRV_SelectFont( PHYSDEV dev, HFONT hfont ) DECLSPEC_HIDDEN;
|
2011-12-29 19:16:46 +00:00
|
|
|
extern HPEN X11DRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *pattern ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern COLORREF X11DRV_SetDCBrushColor( PHYSDEV dev, COLORREF crColor ) DECLSPEC_HIDDEN;
|
|
|
|
extern COLORREF X11DRV_SetDCPenColor( PHYSDEV dev, COLORREF crColor ) DECLSPEC_HIDDEN;
|
2011-12-06 12:15:35 +00:00
|
|
|
extern void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN rgn ) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern BOOL X11DRV_SetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
|
|
|
|
extern COLORREF X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|
|
|
PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_UnrealizePalette( HPALETTE hpal ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglCopyContext( HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask ) DECLSPEC_HIDDEN;
|
|
|
|
extern HGLRC X11DRV_wglCreateContext( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
|
|
|
extern HGLRC X11DRV_wglCreateContextAttribsARB( PHYSDEV dev, HGLRC hShareContext, const int* attribList ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglDeleteContext( HGLRC hglrc ) DECLSPEC_HIDDEN;
|
|
|
|
extern PROC X11DRV_wglGetProcAddress( LPCSTR proc ) DECLSPEC_HIDDEN;
|
|
|
|
extern HDC X11DRV_wglGetPbufferDCARB( PHYSDEV dev, void *pbuffer ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC hglrc ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglMakeCurrent( PHYSDEV dev, HGLRC hglrc ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglSetPixelFormatWINE( PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglShareLists( HGLRC hglrc1, HGLRC hglrc2 ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglUseFontBitmapsA( PHYSDEV dev, DWORD first, DWORD count, DWORD listBase ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_wglUseFontBitmapsW( PHYSDEV dev, DWORD first, DWORD count, DWORD listBase ) DECLSPEC_HIDDEN;
|
1998-12-02 10:29:04 +00:00
|
|
|
|
2000-05-12 20:18:14 +00:00
|
|
|
/* OpenGL / X11 driver functions */
|
2011-07-13 12:56:12 +00:00
|
|
|
extern int X11DRV_ChoosePixelFormat(PHYSDEV dev,
|
2011-05-13 16:52:35 +00:00
|
|
|
const PIXELFORMATDESCRIPTOR *pppfd) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern int X11DRV_DescribePixelFormat(PHYSDEV dev,
|
2002-04-08 22:43:58 +00:00
|
|
|
int iPixelFormat, UINT nBytes,
|
2011-05-13 16:52:35 +00:00
|
|
|
PIXELFORMATDESCRIPTOR *ppfd) DECLSPEC_HIDDEN;
|
2011-07-13 12:56:12 +00:00
|
|
|
extern int X11DRV_GetPixelFormat(PHYSDEV dev) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_SwapBuffers(PHYSDEV dev) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_OpenGL_Cleanup(void) DECLSPEC_HIDDEN;
|
2000-05-12 20:18:14 +00:00
|
|
|
|
1997-02-02 19:01:52 +00:00
|
|
|
/* X11 driver internal functions */
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_Xcursor_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_BITMAP_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_FONT_Init( int log_pixels_x, int log_pixels_y ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_XInput2_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
|
2011-12-29 18:49:41 +00:00
|
|
|
extern HBITMAP create_brush_bitmap( X11DRV_PDEVICE *physDev, const struct brush_pattern *pattern ) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern X_PHYSBITMAP *X11DRV_get_phys_bitmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
|
|
|
extern X_PHYSBITMAP *X11DRV_init_phys_bitmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
2012-01-10 19:19:56 +00:00
|
|
|
extern X_PHYSBITMAP *X11DRV_create_phys_bitmap( HBITMAP hbitmap, const BITMAP *bitmap, int depth ) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Pixmap X11DRV_get_pixmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN;
|
2011-09-19 15:46:33 +00:00
|
|
|
extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image,
|
|
|
|
const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits,
|
|
|
|
struct bitblt_coords *coords, const int *mapping, unsigned int zeropad_mask ) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
|
|
|
|
extern RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) DECLSPEC_HIDDEN;
|
2011-12-06 13:00:14 +00:00
|
|
|
extern BOOL add_extra_clipping_region( X11DRV_PDEVICE *dev, HRGN rgn ) DECLSPEC_HIDDEN;
|
|
|
|
extern void restore_clipping_region( X11DRV_PDEVICE *dev ) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
|
2011-09-15 10:49:08 +00:00
|
|
|
extern void execute_rop( X11DRV_PDEVICE *physdev, Pixmap src_pixmap, GC gc, const RECT *visrect, DWORD rop ) DECLSPEC_HIDDEN;
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_SetupGCForBrush( X11DRV_PDEVICE *physDev ) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_SetupGCForText( X11DRV_PDEVICE *physDev ) DECLSPEC_HIDDEN;
|
2011-09-12 11:27:31 +00:00
|
|
|
extern INT X11DRV_XWStoDS( HDC hdc, INT width ) DECLSPEC_HIDDEN;
|
|
|
|
extern INT X11DRV_YWStoDS( HDC hdc, INT height ) DECLSPEC_HIDDEN;
|
1998-11-22 17:45:06 +00:00
|
|
|
|
|
|
|
extern const int X11DRV_XROPfunction[];
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void _XInitImageFuncPtrs(XImage *) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern int client_side_with_core DECLSPEC_HIDDEN;
|
|
|
|
extern int client_side_with_render DECLSPEC_HIDDEN;
|
|
|
|
extern int client_side_antialias_with_core DECLSPEC_HIDDEN;
|
|
|
|
extern int client_side_antialias_with_render DECLSPEC_HIDDEN;
|
|
|
|
extern int using_client_side_fonts DECLSPEC_HIDDEN;
|
2011-09-12 09:39:17 +00:00
|
|
|
extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_XRender_Finalize(void) DECLSPEC_HIDDEN;
|
2002-01-29 03:07:21 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Drawable get_glxdrawable(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL destroy_glxpixmap(Display *display, XID glxpixmap) DECLSPEC_HIDDEN;
|
2002-11-15 04:16:38 +00:00
|
|
|
|
2008-04-02 15:13:59 +00:00
|
|
|
/* IME support */
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void IME_UnregisterClasses(void) DECLSPEC_HIDDEN;
|
2012-01-09 07:36:10 +00:00
|
|
|
extern void IME_SetOpenStatus(BOOL fOpen) DECLSPEC_HIDDEN;
|
|
|
|
extern void IME_SetCompositionStatus(BOOL fOpen) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern INT IME_GetCursorPos(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void IME_SetCursorPos(DWORD pos) DECLSPEC_HIDDEN;
|
|
|
|
extern void IME_UpdateAssociation(HWND focus) DECLSPEC_HIDDEN;
|
2008-04-02 15:13:59 +00:00
|
|
|
extern BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp,
|
|
|
|
DWORD dwCompLen, LPCVOID lpRead,
|
2011-05-13 16:52:35 +00:00
|
|
|
DWORD dwReadLen) DECLSPEC_HIDDEN;
|
|
|
|
extern void IME_SetResultString(LPWSTR lpResult, DWORD dwResultlen) DECLSPEC_HIDDEN;
|
2004-01-21 02:22:26 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_XDND_EnterEvent( HWND hWnd, XClientMessageEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_XDND_PositionEvent( HWND hWnd, XClientMessageEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event ) DECLSPEC_HIDDEN;
|
2003-11-20 22:09:51 +00:00
|
|
|
|
1999-04-01 08:16:08 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* X11 GDI driver
|
|
|
|
*/
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_GDI_Finalize(void) DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Display *gdi_display DECLSPEC_HIDDEN; /* display to use for all GDI functions */
|
2001-05-11 00:17:47 +00:00
|
|
|
|
1999-04-01 08:16:08 +00:00
|
|
|
/* X11 GDI palette driver */
|
|
|
|
|
2000-09-22 22:37:56 +00:00
|
|
|
#define X11DRV_PALETTE_FIXED 0x0001 /* read-only colormap - have to use XAllocColor (if not virtual) */
|
1999-04-01 08:16:08 +00:00
|
|
|
#define X11DRV_PALETTE_VIRTUAL 0x0002 /* no mapping needed - pixel == pixel color */
|
|
|
|
|
|
|
|
#define X11DRV_PALETTE_PRIVATE 0x1000 /* private colormap, identity mapping */
|
|
|
|
#define X11DRV_PALETTE_WHITESET 0x2000
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Colormap X11DRV_PALETTE_PaletteXColormap DECLSPEC_HIDDEN;
|
|
|
|
extern UINT16 X11DRV_PALETTE_PaletteFlags DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern int *X11DRV_PALETTE_PaletteToXPixel DECLSPEC_HIDDEN;
|
|
|
|
extern int *X11DRV_PALETTE_XPixelToPalette DECLSPEC_HIDDEN;
|
|
|
|
extern ColorShifts X11DRV_PALETTE_default_shifts DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern int X11DRV_PALETTE_mapEGAPixel[16] DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern int X11DRV_PALETTE_Init(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_PALETTE_Cleanup(void) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL X11DRV_IsSolidColor(COLORREF color) DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel) DECLSPEC_HIDDEN;
|
|
|
|
extern int X11DRV_PALETTE_ToPhysical(X11DRV_PDEVICE *physDev, COLORREF color) DECLSPEC_HIDDEN;
|
|
|
|
extern COLORREF X11DRV_PALETTE_GetColor( X11DRV_PDEVICE *physDev, COLORREF color ) DECLSPEC_HIDDEN;
|
|
|
|
extern int X11DRV_PALETTE_LookupPixel(ColorShifts *shifts, COLORREF color) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long redMask, unsigned long greenMask, unsigned long blueMask) DECLSPEC_HIDDEN;
|
1999-04-01 08:16:08 +00:00
|
|
|
|
2002-03-23 21:43:56 +00:00
|
|
|
/* GDI escapes */
|
|
|
|
|
|
|
|
#define X11DRV_ESCAPE 6789
|
|
|
|
enum x11drv_escape_codes
|
|
|
|
{
|
2004-01-14 04:53:11 +00:00
|
|
|
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 */
|
|
|
|
X11DRV_SET_DRAWABLE, /* set current drawable for a DC */
|
|
|
|
X11DRV_START_EXPOSURES, /* start graphics exposures */
|
|
|
|
X11DRV_END_EXPOSURES, /* end graphics exposures */
|
2008-02-18 10:25:14 +00:00
|
|
|
X11DRV_GET_DCE, /* no longer used */
|
|
|
|
X11DRV_SET_DCE, /* no longer used */
|
2006-02-02 12:23:55 +00:00
|
|
|
X11DRV_GET_GLX_DRAWABLE, /* get current glx drawable for a DC */
|
2007-10-10 15:33:35 +00:00
|
|
|
X11DRV_SYNC_PIXMAP, /* sync the dibsection to its pixmap */
|
|
|
|
X11DRV_FLUSH_GL_DRAWABLE /* flush changes made to the gl drawable */
|
2004-01-14 04:53:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct x11drv_escape_set_drawable
|
|
|
|
{
|
|
|
|
enum x11drv_escape_codes code; /* escape code (X11DRV_SET_DRAWABLE) */
|
|
|
|
Drawable drawable; /* X drawable */
|
|
|
|
int mode; /* ClipByChildren or IncludeInferiors */
|
2006-12-07 15:43:59 +00:00
|
|
|
RECT dc_rect; /* DC rectangle relative to drawable */
|
|
|
|
RECT drawable_rect;/* Drawable rectangle relative to screen */
|
2007-09-15 20:02:32 +00:00
|
|
|
XID fbconfig_id; /* fbconfig id used by the GL drawable */
|
2007-09-25 17:20:58 +00:00
|
|
|
Drawable gl_drawable; /* GL drawable */
|
2007-09-26 15:17:13 +00:00
|
|
|
Pixmap pixmap; /* Pixmap for a GLXPixmap gl_drawable */
|
2008-05-28 15:52:06 +00:00
|
|
|
int gl_copy; /* whether the GL contents need explicit copying */
|
2002-03-23 21:43:56 +00:00
|
|
|
};
|
|
|
|
|
1999-04-01 08:16:08 +00:00
|
|
|
/**************************************************************************
|
|
|
|
* X11 USER driver
|
|
|
|
*/
|
|
|
|
|
2001-05-16 19:52:29 +00:00
|
|
|
struct x11drv_thread_data
|
|
|
|
{
|
|
|
|
Display *display;
|
2008-03-13 12:35:02 +00:00
|
|
|
XEvent *current_event; /* event currently being processed */
|
2005-03-27 17:58:41 +00:00
|
|
|
Window grab_window; /* window that currently grabs the mouse */
|
2002-09-18 23:09:50 +00:00
|
|
|
HWND last_focus; /* last window that had focus */
|
2003-01-23 01:28:12 +00:00
|
|
|
XIM xim; /* input method */
|
2010-07-23 13:21:58 +00:00
|
|
|
HWND last_xic_hwnd; /* last xic window */
|
2008-10-18 14:03:48 +00:00
|
|
|
XFontSet font_set; /* international text drawing font set */
|
2005-03-07 19:31:46 +00:00
|
|
|
Window selection_wnd; /* window used for selection interactions */
|
2011-05-16 12:33:32 +00:00
|
|
|
unsigned long warp_serial; /* serial number of last pointer warp request */
|
2011-04-14 10:04:45 +00:00
|
|
|
Window clip_window; /* window used for cursor clipping */
|
2011-04-22 14:58:20 +00:00
|
|
|
HWND clip_hwnd; /* message window stored in desktop while clipping is active */
|
2011-05-11 10:30:03 +00:00
|
|
|
DWORD clip_reset; /* time when clipping was last reset */
|
2008-12-17 16:12:51 +00:00
|
|
|
HKL kbd_layout; /* active keyboard layout */
|
2011-04-13 18:18:30 +00:00
|
|
|
enum { xi_unavailable = -1, xi_unknown, xi_disabled, xi_enabled } xi2_state; /* XInput2 state */
|
2001-05-16 19:52:29 +00:00
|
|
|
};
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN;
|
|
|
|
extern DWORD thread_data_tls_index DECLSPEC_HIDDEN;
|
2001-05-16 19:52:29 +00:00
|
|
|
|
2007-03-17 10:47:28 +00:00
|
|
|
static inline struct x11drv_thread_data *x11drv_thread_data(void)
|
2001-05-16 19:52:29 +00:00
|
|
|
{
|
2008-06-26 13:08:08 +00:00
|
|
|
return TlsGetValue( thread_data_tls_index );
|
2001-05-16 19:52:29 +00:00
|
|
|
}
|
|
|
|
|
2008-06-26 14:47:42 +00:00
|
|
|
/* retrieve the thread display, or NULL if not created yet */
|
|
|
|
static inline Display *thread_display(void)
|
|
|
|
{
|
|
|
|
struct x11drv_thread_data *data = x11drv_thread_data();
|
|
|
|
if (!data) return NULL;
|
|
|
|
return data->display;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* retrieve the thread display, creating it if needed */
|
|
|
|
static inline Display *thread_init_display(void)
|
|
|
|
{
|
|
|
|
return x11drv_init_thread_data()->display;
|
|
|
|
}
|
2001-05-16 19:52:29 +00:00
|
|
|
|
2008-04-07 09:41:54 +00:00
|
|
|
static inline size_t get_property_size( int format, unsigned long count )
|
|
|
|
{
|
|
|
|
/* format==32 means long, which can be 64 bits... */
|
|
|
|
if (format == 32) return count * sizeof(long);
|
|
|
|
return count * (format / 8);
|
|
|
|
}
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Visual *visual DECLSPEC_HIDDEN;
|
2011-07-06 10:38:31 +00:00
|
|
|
extern XPixmapFormatValues **pixmap_formats DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Window root_window DECLSPEC_HIDDEN;
|
|
|
|
extern int clipping_cursor DECLSPEC_HIDDEN;
|
|
|
|
extern unsigned int screen_width DECLSPEC_HIDDEN;
|
|
|
|
extern unsigned int screen_height DECLSPEC_HIDDEN;
|
|
|
|
extern unsigned int screen_bpp DECLSPEC_HIDDEN;
|
|
|
|
extern unsigned int screen_depth DECLSPEC_HIDDEN;
|
|
|
|
extern RECT virtual_screen_rect DECLSPEC_HIDDEN;
|
|
|
|
extern unsigned int text_caps DECLSPEC_HIDDEN;
|
|
|
|
extern int use_xkb DECLSPEC_HIDDEN;
|
|
|
|
extern int usexrandr DECLSPEC_HIDDEN;
|
|
|
|
extern int usexvidmode DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL ximInComposeMode DECLSPEC_HIDDEN;
|
|
|
|
extern int use_take_focus DECLSPEC_HIDDEN;
|
|
|
|
extern int use_primary_selection DECLSPEC_HIDDEN;
|
|
|
|
extern int use_system_cursors DECLSPEC_HIDDEN;
|
|
|
|
extern int show_systray DECLSPEC_HIDDEN;
|
|
|
|
extern int grab_pointer DECLSPEC_HIDDEN;
|
|
|
|
extern int grab_fullscreen DECLSPEC_HIDDEN;
|
|
|
|
extern int usexcomposite DECLSPEC_HIDDEN;
|
|
|
|
extern int managed_mode DECLSPEC_HIDDEN;
|
|
|
|
extern int decorated_mode DECLSPEC_HIDDEN;
|
|
|
|
extern int private_color_map DECLSPEC_HIDDEN;
|
|
|
|
extern int primary_monitor DECLSPEC_HIDDEN;
|
|
|
|
extern int copy_default_colors DECLSPEC_HIDDEN;
|
|
|
|
extern int alloc_system_colors DECLSPEC_HIDDEN;
|
|
|
|
extern int xrender_error_base DECLSPEC_HIDDEN;
|
|
|
|
extern HMODULE x11drv_module DECLSPEC_HIDDEN;
|
2000-03-25 14:05:06 +00:00
|
|
|
|
2003-11-20 04:24:18 +00:00
|
|
|
/* atoms */
|
2001-06-04 21:55:17 +00:00
|
|
|
|
2003-11-20 04:24:18 +00:00
|
|
|
enum x11drv_atoms
|
2003-06-23 23:02:02 +00:00
|
|
|
{
|
2003-11-20 04:24:18 +00:00
|
|
|
FIRST_XATOM = XA_LAST_PREDEFINED + 1,
|
|
|
|
XATOM_CLIPBOARD = FIRST_XATOM,
|
|
|
|
XATOM_COMPOUND_TEXT,
|
2008-10-31 03:18:00 +00:00
|
|
|
XATOM_INCR,
|
2010-11-01 18:57:12 +00:00
|
|
|
XATOM_MANAGER,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM_MULTIPLE,
|
|
|
|
XATOM_SELECTION_DATA,
|
|
|
|
XATOM_TARGETS,
|
|
|
|
XATOM_TEXT,
|
|
|
|
XATOM_UTF8_STRING,
|
|
|
|
XATOM_RAW_ASCENT,
|
|
|
|
XATOM_RAW_DESCENT,
|
|
|
|
XATOM_RAW_CAP_HEIGHT,
|
|
|
|
XATOM_WM_PROTOCOLS,
|
|
|
|
XATOM_WM_DELETE_WINDOW,
|
2008-02-27 18:11:43 +00:00
|
|
|
XATOM_WM_STATE,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM_WM_TAKE_FOCUS,
|
|
|
|
XATOM_DndProtocol,
|
|
|
|
XATOM_DndSelection,
|
2008-03-05 14:57:39 +00:00
|
|
|
XATOM__ICC_PROFILE,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM__MOTIF_WM_HINTS,
|
2009-01-06 18:59:07 +00:00
|
|
|
XATOM__NET_STARTUP_INFO_BEGIN,
|
|
|
|
XATOM__NET_STARTUP_INFO,
|
2008-03-12 16:29:28 +00:00
|
|
|
XATOM__NET_SUPPORTED,
|
2006-08-23 00:14:11 +00:00
|
|
|
XATOM__NET_SYSTEM_TRAY_OPCODE,
|
|
|
|
XATOM__NET_SYSTEM_TRAY_S0,
|
2010-04-16 14:23:33 +00:00
|
|
|
XATOM__NET_WM_ICON,
|
2004-08-18 23:47:48 +00:00
|
|
|
XATOM__NET_WM_MOVERESIZE,
|
2006-06-19 17:25:54 +00:00
|
|
|
XATOM__NET_WM_NAME,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM__NET_WM_PID,
|
|
|
|
XATOM__NET_WM_PING,
|
2006-06-19 17:25:54 +00:00
|
|
|
XATOM__NET_WM_STATE,
|
2007-10-31 17:13:20 +00:00
|
|
|
XATOM__NET_WM_STATE_ABOVE,
|
2006-06-19 17:25:54 +00:00
|
|
|
XATOM__NET_WM_STATE_FULLSCREEN,
|
2008-03-01 12:30:58 +00:00
|
|
|
XATOM__NET_WM_STATE_MAXIMIZED_HORZ,
|
|
|
|
XATOM__NET_WM_STATE_MAXIMIZED_VERT,
|
2007-10-11 09:40:55 +00:00
|
|
|
XATOM__NET_WM_STATE_SKIP_PAGER,
|
|
|
|
XATOM__NET_WM_STATE_SKIP_TASKBAR,
|
2010-06-29 09:08:51 +00:00
|
|
|
XATOM__NET_WM_USER_TIME,
|
|
|
|
XATOM__NET_WM_USER_TIME_WINDOW,
|
2008-09-12 13:54:02 +00:00
|
|
|
XATOM__NET_WM_WINDOW_OPACITY,
|
2003-12-04 21:54:13 +00:00
|
|
|
XATOM__NET_WM_WINDOW_TYPE,
|
2006-10-11 15:32:22 +00:00
|
|
|
XATOM__NET_WM_WINDOW_TYPE_DIALOG,
|
|
|
|
XATOM__NET_WM_WINDOW_TYPE_NORMAL,
|
2003-12-04 21:54:13 +00:00
|
|
|
XATOM__NET_WM_WINDOW_TYPE_UTILITY,
|
2008-10-01 19:00:18 +00:00
|
|
|
XATOM__NET_WORKAREA,
|
2010-11-01 18:45:12 +00:00
|
|
|
XATOM__XEMBED,
|
2006-08-23 00:14:11 +00:00
|
|
|
XATOM__XEMBED_INFO,
|
2003-11-20 22:09:51 +00:00
|
|
|
XATOM_XdndAware,
|
|
|
|
XATOM_XdndEnter,
|
|
|
|
XATOM_XdndPosition,
|
|
|
|
XATOM_XdndStatus,
|
|
|
|
XATOM_XdndLeave,
|
|
|
|
XATOM_XdndFinished,
|
|
|
|
XATOM_XdndDrop,
|
|
|
|
XATOM_XdndActionCopy,
|
|
|
|
XATOM_XdndActionMove,
|
|
|
|
XATOM_XdndActionLink,
|
|
|
|
XATOM_XdndActionAsk,
|
|
|
|
XATOM_XdndActionPrivate,
|
|
|
|
XATOM_XdndSelection,
|
|
|
|
XATOM_XdndTarget,
|
|
|
|
XATOM_XdndTypeList,
|
2009-11-22 20:30:18 +00:00
|
|
|
XATOM_HTML_Format,
|
2011-03-03 20:27:34 +00:00
|
|
|
XATOM_WCF_BITMAP,
|
2004-02-20 05:43:00 +00:00
|
|
|
XATOM_WCF_DIB,
|
2011-03-03 20:27:34 +00:00
|
|
|
XATOM_WCF_DIBV5,
|
|
|
|
XATOM_WCF_DIF,
|
|
|
|
XATOM_WCF_DSPBITMAP,
|
|
|
|
XATOM_WCF_DSPENHMETAFILE,
|
|
|
|
XATOM_WCF_DSPMETAFILEPICT,
|
|
|
|
XATOM_WCF_DSPTEXT,
|
|
|
|
XATOM_WCF_ENHMETAFILE,
|
|
|
|
XATOM_WCF_HDROP,
|
|
|
|
XATOM_WCF_LOCALE,
|
|
|
|
XATOM_WCF_METAFILEPICT,
|
|
|
|
XATOM_WCF_OEMTEXT,
|
|
|
|
XATOM_WCF_OWNERDISPLAY,
|
|
|
|
XATOM_WCF_PALETTE,
|
|
|
|
XATOM_WCF_PENDATA,
|
|
|
|
XATOM_WCF_RIFF,
|
|
|
|
XATOM_WCF_SYLK,
|
|
|
|
XATOM_WCF_TIFF,
|
|
|
|
XATOM_WCF_WAVE,
|
|
|
|
XATOM_image_bmp,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM_image_gif,
|
2009-06-19 18:54:33 +00:00
|
|
|
XATOM_image_jpeg,
|
2009-06-19 18:46:57 +00:00
|
|
|
XATOM_image_png,
|
2003-11-20 22:09:51 +00:00
|
|
|
XATOM_text_html,
|
|
|
|
XATOM_text_plain,
|
2003-11-20 04:24:18 +00:00
|
|
|
XATOM_text_rtf,
|
|
|
|
XATOM_text_richtext,
|
2007-06-27 07:50:35 +00:00
|
|
|
XATOM_text_uri_list,
|
2003-11-20 04:24:18 +00:00
|
|
|
NB_XATOMS
|
|
|
|
};
|
2003-06-23 23:02:02 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern Atom X11DRV_Atoms[NB_XATOMS - FIRST_XATOM] DECLSPEC_HIDDEN;
|
|
|
|
extern Atom systray_atom DECLSPEC_HIDDEN;
|
2003-11-20 04:24:18 +00:00
|
|
|
|
|
|
|
#define x11drv_atom(name) (X11DRV_Atoms[XATOM_##name - FIRST_XATOM])
|
|
|
|
|
1998-12-07 09:13:40 +00:00
|
|
|
/* X11 event driver */
|
|
|
|
|
2005-02-26 17:49:38 +00:00
|
|
|
typedef void (*x11drv_event_handler)( HWND hwnd, XEvent *event );
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_register_event_handler( int type, x11drv_event_handler handler, const char *name ) DECLSPEC_HIDDEN;
|
2005-02-26 17:49:38 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_ButtonPress( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_ButtonRelease( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_MotionNotify( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_KeyEvent( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_DestroyNotify( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_SelectionRequest( HWND hWnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_SelectionClear( HWND hWnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_MappingNotify( HWND hWnd, XEvent *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_GenericEvent( HWND hwnd, XEvent *event ) DECLSPEC_HIDDEN;
|
1999-12-12 19:42:47 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern int xinput2_opcode DECLSPEC_HIDDEN;
|
|
|
|
extern Bool (*pXGetEventData)( Display *display, XEvent /*XGenericEventCookie*/ *event ) DECLSPEC_HIDDEN;
|
|
|
|
extern void (*pXFreeEventData)( Display *display, XEvent /*XGenericEventCookie*/ *event ) DECLSPEC_HIDDEN;
|
2011-04-12 19:16:15 +00:00
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern DWORD EVENT_x11_time_to_win32_time(Time time) DECLSPEC_HIDDEN;
|
2004-01-09 00:03:00 +00:00
|
|
|
|
2005-03-07 19:31:46 +00:00
|
|
|
/* X11 driver private messages, must be in the range 0x80001000..0x80001fff */
|
|
|
|
enum x11drv_window_messages
|
|
|
|
{
|
2005-03-09 18:46:13 +00:00
|
|
|
WM_X11DRV_ACQUIRE_SELECTION = 0x80001000,
|
2008-01-17 18:53:59 +00:00
|
|
|
WM_X11DRV_SET_WIN_FORMAT,
|
2008-09-08 13:51:08 +00:00
|
|
|
WM_X11DRV_SET_WIN_REGION,
|
2010-04-29 00:23:05 +00:00
|
|
|
WM_X11DRV_RESIZE_DESKTOP,
|
2011-04-22 14:22:09 +00:00
|
|
|
WM_X11DRV_SET_CURSOR,
|
|
|
|
WM_X11DRV_CLIP_CURSOR
|
2005-03-07 19:31:46 +00:00
|
|
|
};
|
|
|
|
|
2007-10-11 09:38:59 +00:00
|
|
|
/* _NET_WM_STATE properties that we keep track of */
|
2008-02-27 17:01:31 +00:00
|
|
|
enum x11drv_net_wm_state
|
2007-10-11 09:38:59 +00:00
|
|
|
{
|
2008-02-27 17:01:31 +00:00
|
|
|
NET_WM_STATE_FULLSCREEN,
|
|
|
|
NET_WM_STATE_ABOVE,
|
2008-03-01 12:30:58 +00:00
|
|
|
NET_WM_STATE_MAXIMIZED,
|
2008-02-27 17:01:31 +00:00
|
|
|
NET_WM_STATE_SKIP_PAGER,
|
|
|
|
NET_WM_STATE_SKIP_TASKBAR,
|
|
|
|
NB_NET_WM_STATES
|
2007-10-11 09:38:59 +00:00
|
|
|
};
|
|
|
|
|
2001-06-04 21:55:17 +00:00
|
|
|
/* x11drv private window data */
|
|
|
|
struct x11drv_win_data
|
|
|
|
{
|
2005-03-25 16:47:04 +00:00
|
|
|
HWND hwnd; /* hwnd that this private data belongs to */
|
|
|
|
Window whole_window; /* X window for the complete window */
|
2008-02-21 11:29:36 +00:00
|
|
|
Window client_window; /* X window for the client area */
|
2005-03-25 16:47:04 +00:00
|
|
|
Window icon_window; /* X window for the icon */
|
2008-02-21 19:23:32 +00:00
|
|
|
Colormap colormap; /* Colormap for this window */
|
2008-05-13 08:43:48 +00:00
|
|
|
VisualID visualid; /* visual id of the client window */
|
2007-09-15 20:02:32 +00:00
|
|
|
XID fbconfig_id; /* fbconfig id for the GL drawable this hwnd uses */
|
2007-09-25 17:20:58 +00:00
|
|
|
Drawable gl_drawable; /* Optional GL drawable for rendering the client area */
|
2007-09-26 15:17:13 +00:00
|
|
|
Pixmap pixmap; /* Base pixmap for if gl_drawable is a GLXPixmap */
|
2005-03-25 16:47:04 +00:00
|
|
|
RECT window_rect; /* USER window rectangle relative to parent */
|
|
|
|
RECT whole_rect; /* X window rectangle for the whole window relative to parent */
|
2008-01-22 19:08:56 +00:00
|
|
|
RECT client_rect; /* client area relative to parent */
|
2005-03-25 16:47:04 +00:00
|
|
|
XIC xic; /* X input context */
|
2007-08-16 21:27:37 +00:00
|
|
|
XWMHints *wm_hints; /* window manager hints */
|
2008-01-23 11:28:32 +00:00
|
|
|
BOOL managed : 1; /* is window managed? */
|
|
|
|
BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */
|
2008-02-28 16:01:10 +00:00
|
|
|
BOOL iconic : 1; /* is window in iconic state? */
|
2008-04-09 13:46:33 +00:00
|
|
|
BOOL embedded : 1; /* is window an XEMBED client? */
|
2008-04-29 10:46:16 +00:00
|
|
|
BOOL shaped : 1; /* is window using a custom region shape? */
|
2008-02-27 18:11:43 +00:00
|
|
|
int wm_state; /* current value of the WM_STATE property */
|
2008-02-27 17:01:31 +00:00
|
|
|
DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */
|
2010-11-01 18:45:12 +00:00
|
|
|
Window embedder; /* window id of embedder */
|
2010-01-04 16:56:32 +00:00
|
|
|
unsigned long configure_serial; /* serial number of last configure request */
|
2005-03-25 16:47:04 +00:00
|
|
|
HBITMAP hWMIconBitmap;
|
|
|
|
HBITMAP hWMIconMask;
|
2001-06-04 21:55:17 +00:00
|
|
|
};
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern struct x11drv_win_data *X11DRV_get_win_data( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern struct x11drv_win_data *X11DRV_create_win_data( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern Window X11DRV_get_whole_window( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern XIC X11DRV_get_ic( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern int pixelformat_from_fbconfig_id( XID fbconfig_id ) DECLSPEC_HIDDEN;
|
|
|
|
extern XVisualInfo *visual_from_fbconfig_id( XID fbconfig_id ) DECLSPEC_HIDDEN;
|
|
|
|
extern void mark_drawable_dirty( Drawable old, Drawable new ) DECLSPEC_HIDDEN;
|
|
|
|
extern Drawable create_glxpixmap( Display *display, XVisualInfo *vis, Pixmap parent ) DECLSPEC_HIDDEN;
|
|
|
|
extern void flush_gl_drawable( X11DRV_PDEVICE *physDev ) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern void wait_for_withdrawn_state( Display *display, struct x11drv_win_data *data, BOOL set ) DECLSPEC_HIDDEN;
|
|
|
|
extern Window init_clip_window(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void update_user_time( Time time ) DECLSPEC_HIDDEN;
|
|
|
|
extern void update_net_wm_states( Display *display, struct x11drv_win_data *data ) DECLSPEC_HIDDEN;
|
|
|
|
extern void make_window_embedded( Display *display, struct x11drv_win_data *data ) DECLSPEC_HIDDEN;
|
|
|
|
extern void change_systray_owner( Display *display, Window systray_window ) DECLSPEC_HIDDEN;
|
|
|
|
extern void update_systray_balloon_position(void) DECLSPEC_HIDDEN;
|
|
|
|
extern HWND create_foreign_window( Display *display, Window window ) DECLSPEC_HIDDEN;
|
2008-02-27 18:13:09 +00:00
|
|
|
|
2010-10-04 18:41:11 +00:00
|
|
|
static inline void mirror_rect( const RECT *window_rect, RECT *rect )
|
|
|
|
{
|
|
|
|
int width = window_rect->right - window_rect->left;
|
|
|
|
int tmp = rect->left;
|
|
|
|
rect->left = width - rect->right;
|
|
|
|
rect->right = width - tmp;
|
|
|
|
}
|
|
|
|
|
2011-05-11 10:09:12 +00:00
|
|
|
static inline BOOL is_window_rect_mapped( const RECT *rect )
|
|
|
|
{
|
2012-01-31 16:28:34 +00:00
|
|
|
return (rect->left < virtual_screen_rect.right &&
|
|
|
|
rect->top < virtual_screen_rect.bottom &&
|
|
|
|
max( rect->right, rect->left + 1 ) > virtual_screen_rect.left &&
|
|
|
|
max( rect->bottom, rect->top + 1 ) > virtual_screen_rect.top);
|
2011-05-11 10:09:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline BOOL is_window_rect_fullscreen( const RECT *rect )
|
|
|
|
{
|
|
|
|
return (rect->left <= 0 && rect->right >= screen_width &&
|
|
|
|
rect->top <= 0 && rect->bottom >= screen_height);
|
|
|
|
}
|
|
|
|
|
2005-01-28 17:25:50 +00:00
|
|
|
/* X context to associate a hwnd to an X window */
|
2011-05-13 16:52:35 +00:00
|
|
|
extern XContext winContext DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern void X11DRV_InitClipboard(void) DECLSPEC_HIDDEN;
|
|
|
|
extern int CDECL X11DRV_AcquireClipboard(HWND hWndClipWindow) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_Clipboard_Cleanup(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_ResetSelectionOwner(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void CDECL X11DRV_SetFocus( HWND hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern void set_window_cursor( Window window, HCURSOR handle ) DECLSPEC_HIDDEN;
|
|
|
|
extern void sync_window_cursor( Window window ) DECLSPEC_HIDDEN;
|
|
|
|
extern LRESULT clip_cursor_notify( HWND hwnd, HWND new_clip_hwnd ) DECLSPEC_HIDDEN;
|
|
|
|
extern void ungrab_clipping_window(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void reset_clipping_window(void) DECLSPEC_HIDDEN;
|
|
|
|
extern BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) DECLSPEC_HIDDEN;
|
2012-02-01 14:46:52 +00:00
|
|
|
extern void move_resize_window( Display *display, struct x11drv_win_data *data, int dir ) DECLSPEC_HIDDEN;
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_InitKeyboard( Display *display ) DECLSPEC_HIDDEN;
|
2008-12-16 14:32:08 +00:00
|
|
|
extern DWORD CDECL X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
|
2011-05-13 16:52:35 +00:00
|
|
|
DWORD mask, DWORD flags ) DECLSPEC_HIDDEN;
|
2001-05-16 19:52:29 +00:00
|
|
|
|
2002-04-24 21:32:11 +00:00
|
|
|
typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void *arg );
|
|
|
|
|
2011-05-13 16:52:35 +00:00
|
|
|
extern void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg ) DECLSPEC_HIDDEN;
|
|
|
|
extern int X11DRV_check_error(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect ) DECLSPEC_HIDDEN;
|
|
|
|
extern void xinerama_init( unsigned int width, unsigned int height ) DECLSPEC_HIDDEN;
|
|
|
|
|
|
|
|
extern void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_resize_desktop(unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_Settings_AddDepthModes(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_Settings_AddOneMode(unsigned int width, unsigned int height, unsigned int bpp, unsigned int freq) DECLSPEC_HIDDEN;
|
|
|
|
extern int X11DRV_Settings_CreateDriver(LPDDHALINFO info) DECLSPEC_HIDDEN;
|
|
|
|
extern LPDDHALMODEINFO X11DRV_Settings_CreateModes(unsigned int max_modes, int reserve_depths) DECLSPEC_HIDDEN;
|
|
|
|
unsigned int X11DRV_Settings_GetModeCount(void) DECLSPEC_HIDDEN;
|
|
|
|
void X11DRV_Settings_Init(void) DECLSPEC_HIDDEN;
|
2007-02-22 11:42:20 +00:00
|
|
|
LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name,
|
|
|
|
int (*pNewGCM)(void),
|
|
|
|
LONG (*pNewSCM)(int),
|
|
|
|
unsigned int nmodes,
|
2011-05-13 16:52:35 +00:00
|
|
|
int reserve_depths) DECLSPEC_HIDDEN;
|
2003-10-16 00:21:42 +00:00
|
|
|
|
2008-04-04 11:44:36 +00:00
|
|
|
/* XIM support */
|
2008-12-16 14:02:52 +00:00
|
|
|
extern BOOL X11DRV_InitXIM( const char *input_style ) DECLSPEC_HIDDEN;
|
|
|
|
extern XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_SetupXIM(void) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_XIMLookupChars( const char *str, DWORD count ) DECLSPEC_HIDDEN;
|
|
|
|
extern void X11DRV_ForceXIMReset(HWND hwnd) DECLSPEC_HIDDEN;
|
2012-01-09 07:36:10 +00:00
|
|
|
extern void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) DECLSPEC_HIDDEN;
|
2008-04-04 11:44:36 +00:00
|
|
|
|
2008-04-09 13:46:33 +00:00
|
|
|
#define XEMBED_MAPPED (1 << 0)
|
|
|
|
|
1998-12-07 09:13:40 +00:00
|
|
|
#endif /* __WINE_X11DRV_H */
|