xserver-multidpi/hw/xwin/win.h

1046 lines
22 KiB
C
Raw Normal View History

2003-11-14 17:48:57 +01:00
/*
*Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
*
*Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
*"Software"), to deal in the Software without restriction, including
*without limitation the rights to use, copy, modify, merge, publish,
*distribute, sublicense, and/or sell copies of the Software, and to
*permit persons to whom the Software is furnished to do so, subject to
*the following conditions:
*
*The above copyright notice and this permission notice shall be
*included in all copies or substantial portions of the Software.
*
*THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
*EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
*MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
*NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
*ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
*CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
*WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*Except as contained in this notice, the name of the XFree86 Project
*shall not be used in advertising or otherwise to promote the sale, use
*or other dealings in this Software without prior written authorization
*from the XFree86 Project.
*
* Authors: Dakshinamurthy Karra
* Suhaib M Siddiqi
* Peter Busch
* Harold L Hunt II
* Kensuke Matsuzaki
*/
#ifndef _WIN_H_
#define _WIN_H_
#ifndef NO
#define NO 0
#endif
#ifndef YES
#define YES 1
#endif
/* We can handle WM_MOUSEHWHEEL even though _WIN32_WINNT < 0x0600 */
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL 0x020E
#endif
2003-11-14 17:48:57 +01:00
/* Turn debug messages on or off */
2004-06-21 15:19:32 +02:00
#ifndef CYGDEBUG
2003-11-14 17:48:57 +01:00
#define CYGDEBUG NO
2004-06-21 15:19:32 +02:00
#endif
2003-11-14 17:48:57 +01:00
#define WIN_DEFAULT_BPP 0
#define WIN_DEFAULT_WHITEPIXEL 255
#define WIN_DEFAULT_BLACKPIXEL 0
#define WIN_DEFAULT_LINEBIAS 0
#define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */
#define WIN_DEFAULT_DPI 96
2003-11-14 17:48:57 +01:00
#define WIN_DEFAULT_REFRESH 0
#define WIN_DEFAULT_WIN_KILL TRUE
#define WIN_DEFAULT_UNIX_KILL FALSE
#define WIN_DEFAULT_CLIP_UPDATES_NBOXES 0
2004-06-21 15:19:32 +02:00
#ifdef XWIN_EMULATEPSEUDO
2003-11-14 17:48:57 +01:00
#define WIN_DEFAULT_EMULATE_PSEUDO FALSE
2004-06-21 15:19:32 +02:00
#endif
2003-11-14 17:48:57 +01:00
#define WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH FALSE
/*
* Windows only supports 256 color palettes
*/
#define WIN_NUM_PALETTE_ENTRIES 256
/*
* Number of times to call Restore in an attempt to restore the primary surface
*/
#define WIN_REGAIN_SURFACE_RETRIES 1
/*
* Build a supported display depths mask by shifting one to the left
* by the number of bits in the supported depth.
*/
#define WIN_SUPPORTED_BPPS ( (1 << (32 - 1)) | (1 << (24 - 1)) \
| (1 << (16 - 1)) | (1 << (15 - 1)) \
| (1 << ( 8 - 1)))
#define WIN_CHECK_DEPTH YES
/*
* Timer IDs for WM_TIMER
*/
#define WIN_E3B_TIMER_ID 1
#define WIN_POLLING_MOUSE_TIMER_ID 2
#define MOUSE_POLLING_INTERVAL 50
2003-11-14 17:48:57 +01:00
#define WIN_E3B_OFF -1
#define WIN_E3B_DEFAULT 0
2003-11-14 17:48:57 +01:00
#define WIN_FD_INVALID -1
#define WIN_SERVER_NONE 0x0L /* 0 */
#define WIN_SERVER_SHADOW_GDI 0x1L /* 1 */
#define WIN_SERVER_SHADOW_DDNL 0x4L /* 4 */
2003-11-14 17:48:57 +01:00
#define AltMapIndex Mod1MapIndex
#define NumLockMapIndex Mod2MapIndex
#define AltLangMapIndex Mod3MapIndex
#define KanaMapIndex Mod4MapIndex
#define ScrollLockMapIndex Mod5MapIndex
#define WIN_MOD_LALT 0x00000001
#define WIN_MOD_RALT 0x00000002
#define WIN_MOD_LCONTROL 0x00000004
#define WIN_MOD_RCONTROL 0x00000008
#define WIN_24BPP_MASK_RED 0x00FF0000
#define WIN_24BPP_MASK_GREEN 0x0000FF00
#define WIN_24BPP_MASK_BLUE 0x000000FF
#define WIN_MAX_KEYS_PER_KEY 4
#define NONAMELESSUNION
2003-11-14 17:48:57 +01:00
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
2003-11-14 17:48:57 +01:00
#include <errno.h>
2005-05-25 14:14:29 +02:00
#define HANDLE void *
2003-11-14 17:48:57 +01:00
#include <pthread.h>
2005-05-25 14:14:29 +02:00
#undef HANDLE
2003-11-14 17:48:57 +01:00
#ifdef HAVE_MMAP
2003-11-14 17:48:57 +01:00
#include <sys/mman.h>
#ifndef MAP_FILE
#define MAP_FILE 0
#endif /* MAP_FILE */
#endif /* HAVE_MMAP */
2003-11-14 17:48:57 +01:00
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xos.h>
#include <X11/Xprotostr.h>
2003-11-14 17:48:57 +01:00
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "pixmap.h"
#include "region.h"
#include "gcstruct.h"
#include "colormap.h"
#include "colormapst.h"
#include "miscstruct.h"
#include "servermd.h"
#include "windowstr.h"
#include "mi.h"
#include "micmap.h"
#include "mifillarc.h"
#include "mifpoly.h"
#include "input.h"
#include "mipointer.h"
2004-06-21 15:19:32 +02:00
#include "X11/keysym.h"
2003-11-14 17:48:57 +01:00
#include "micoord.h"
#include "miline.h"
#include "shadow.h"
#include "fb.h"
#include "mipict.h"
#include "picturestr.h"
#ifdef RANDR
#include "randrstr.h"
#endif
/*
* Windows headers
*/
#include "winms.h"
#include "winresource.h"
2003-11-14 17:48:57 +01:00
/*
* Define Windows constants
*/
#define WM_TRAYICON (WM_USER + 1000)
#define WM_INIT_SYS_MENU (WM_USER + 1001)
#define WM_GIVEUP (WM_USER + 1002)
2004-06-21 15:19:32 +02:00
/* Local includes */
2003-11-14 17:48:57 +01:00
#include "winwindow.h"
2004-06-21 15:19:32 +02:00
#include "winmsg.h"
2003-11-14 17:48:57 +01:00
/*
* Debugging macros
*/
#if CYGDEBUG
#define DEBUG_MSG(str,...) \
if (fDebugProcMsg) \
{ \
char *pszTemp; \
int iLength; \
if (asprintf (&pszTemp, str, ##__VA_ARGS__) != -1) { \
MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \
free (pszTemp); \
} \
2003-11-14 17:48:57 +01:00
}
#else
#define DEBUG_MSG(str,...)
#endif
#if CYGDEBUG
2003-11-14 17:48:57 +01:00
#define DEBUG_FN_NAME(str) PTSTR szFunctionName = str
#else
#define DEBUG_FN_NAME(str)
#endif
#if CYGDEBUG || YES
#define DEBUGVARS BOOL fDebugProcMsg = FALSE
#else
#define DEBUGVARS
#endif
#if CYGDEBUG || YES
#define DEBUGPROC_MSG fDebugProcMsg = TRUE
#else
#define DEBUGPROC_MSG
#endif
2004-06-21 15:19:32 +02:00
#define PROFILEPOINT(point,thresh)\
{\
static unsigned int PROFPT##point = 0;\
if (++PROFPT##point % thresh == 0)\
ErrorF (#point ": PROFILEPOINT hit %u times\n", PROFPT##point);\
}
#define DEFINE_ATOM_HELPER(func,atom_name) \
static Atom func (void) { \
static int generation; \
static Atom atom; \
if (generation != serverGeneration) { \
generation = serverGeneration; \
atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \
} \
return atom; \
}
2003-11-14 17:48:57 +01:00
/*
* Typedefs for engine dependent function pointers
*/
typedef Bool (*winAllocateFBProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef void (*winFreeFBProcPtr) (ScreenPtr);
typedef void (*winShadowUpdateProcPtr) (ScreenPtr, shadowBufPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winInitScreenProcPtr) (ScreenPtr);
api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon May 14 15:16:11 2012 -0700 xfree86: Bump video ABI to 13.0 The ABI was broken by changes to convert from screen index numbers to ScreenPtr / ScrnInfoPtr in various structures and function signatures. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 10:56:57 2012 +0100 xf86: xf86ClearEntityListForScreen should take a pScrn When adding GPU screens this make life easier. (also fix comment, as pointed out by Alan) Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com> commit afee8b5ab4501597ecc1ade34124d7ca227ab055 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 07:07:32 2012 +0100 xf86i2c: add pscrn for drivers to use This just adds a pScrn pointer into the struct for the drivers to use instead of scrnIndex. Mostly scrnIndex is used for logging, but some drivers use it to lookup xf86Screens, so let them stash a pScrn instead. Removing the scrnIndex is a bit more involved and I'm not sure its worth the effort. Doing i2c in the X server is legacy code as far as I'm concerned. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit ea5092f1f679691d187f1eee9427e6057beec56e Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 19:25:20 2012 +0100 dix/gc: consolidate GC object creation in one place The standard GC create and scratch GC create were 90% the same really, and I have a need in the future for creating GC objects without the other bits, so wanted to avoid a third copy. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 10:24:06 2012 +0100 xf86: add a define to denote the new non-index interfaces are being used This can be used by drivers to provide compatible APIs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 15:09:12 2012 +0100 dix: make Create/Free scratch pixmaps take a ScreenPtr While technically an API/ABI change I doubt anyone uses it, but it helps in splitting screens up. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:57:55 2012 +0100 xf86/xv: remove scrnIndexfrom xf86FindXvOptions. Move this interface to taking an ScrnInfoPtr. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:53:59 2012 +0100 xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) stop passing indices into this function. v2: drop flags argument. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 58824e414f35682435f15bfe6c4b656bd90b9235 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:48:09 2012 +0100 xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:18:59 2012 +0100 xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. v2: drop the blockData/wakeupData args as per ajax's suggestion., fix docs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 790d003de20fb47674420a24dadd92412d78620d Author: Dave Airlie <airlied@gmail.com> Date: Wed Apr 11 09:53:14 2012 +0100 xf86/common: remove some more pScrn->pScreen uses remove some more conversions that appeared after api cleanups. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:34:53 2012 +0100 ddc: change API to take ScrnInfoPtr (v2) This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. v2: address Alan's comments about dropping DDC2Init parameter. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:31:26 2012 +0100 vbe: don't use index for VBEInterpretPanelID (API) Remove use of xf86screens from vbe module. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:25:11 2012 +0100 int10/vbe: don't use xf86Screens. (ABI) (v3) Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. v2: address Alan's comment to fix struct alignment. v3: squash in all the int10 fixes, test the vm86 code builds, after comments by Keith. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 23cca612b4fb5efc33683c7624b803b457387e3d Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:30:18 2012 +0100 xserver: drop index argument to ScreenInit (ABI/API) (v2) This drops the index argument, its the same as pScreen->myNum, and its the last major index abuse I can find. v2: address Alan's review - update docs, fix xwin/xnest/darwin Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:23:01 2012 +0100 xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) This migrates PointerMoved from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:20:46 2012 +0100 xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) This migrates the PMEvent from index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:18:30 2012 +0100 xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:14:11 2012 +0100 xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 51e5f90ada929d6b23176090badbb42fdb3fa550 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:11:09 2012 +0100 xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 94f1f21d17e86f96d4a54292a399160950087675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:02:11 2012 +0100 xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:59:46 2012 +0100 xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. v2: drop flags. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:50:37 2012 +0100 xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. v2: drop flags args. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:41:27 2012 +0100 xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) Another index->pScrn conversion. v2: drop flags arg. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:35:41 2012 +0100 xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. v2: drop flags args as suggested by Keith, fix docs. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 14:22:18 +02:00
typedef Bool (*winCloseScreenProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winInitVisualsProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winAdjustVideoModeProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winCreateBoundingWindowProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winFinishScreenInitProcPtr) (int, ScreenPtr, int, char **);
2003-11-14 17:48:57 +01:00
typedef Bool (*winBltExposedRegionsProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winBltExposedWindowRegionProcPtr) (ScreenPtr, WindowPtr);
typedef Bool (*winActivateAppProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winRedrawScreenProcPtr) (ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
typedef Bool (*winRealizeInstalledPaletteProcPtr) (ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
typedef Bool (*winInstallColormapProcPtr) (ColormapPtr pColormap);
2003-11-14 17:48:57 +01:00
typedef Bool (*winStoreColorsProcPtr) (ColormapPtr pmap,
int ndef, xColorItem * pdefs);
2003-11-14 17:48:57 +01:00
typedef Bool (*winCreateColormapProcPtr) (ColormapPtr pColormap);
2003-11-14 17:48:57 +01:00
typedef Bool (*winDestroyColormapProcPtr) (ColormapPtr pColormap);
2003-11-14 17:48:57 +01:00
typedef Bool (*winCreatePrimarySurfaceProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winReleasePrimarySurfaceProcPtr) (ScreenPtr);
2003-11-14 17:48:57 +01:00
typedef Bool (*winCreateScreenResourcesProc) (ScreenPtr);
2004-06-21 15:19:32 +02:00
2003-11-14 17:48:57 +01:00
/*
* Pixmap privates
*/
typedef struct {
HBITMAP hBitmap;
void *pbBits;
BITMAPINFOHEADER *pbmih;
BOOL owned;
2003-11-14 17:48:57 +01:00
} winPrivPixmapRec, *winPrivPixmapPtr;
/*
* Colormap privates
*/
typedef struct {
HPALETTE hPalette;
LPDIRECTDRAWPALETTE lpDDPalette;
RGBQUAD rgbColors[WIN_NUM_PALETTE_ENTRIES];
PALETTEENTRY peColors[WIN_NUM_PALETTE_ENTRIES];
2003-11-14 17:48:57 +01:00
} winPrivCmapRec, *winPrivCmapPtr;
2003-11-14 17:48:57 +01:00
/*
2004-06-21 15:19:32 +02:00
* Windows Cursor handling.
*/
2004-06-21 15:19:32 +02:00
typedef struct {
/* from GetSystemMetrics */
int sm_cx;
int sm_cy;
BOOL visible;
HCURSOR handle;
QueryBestSizeProcPtr QueryBestSize;
miPointerSpriteFuncPtr spriteFuncs;
2004-06-21 15:19:32 +02:00
} winCursorRec;
2003-11-14 17:48:57 +01:00
/*
* Resize modes
*/
typedef enum {
resizeDefault = -1,
resizeNotAllowed,
resizeWithScrollbars,
resizeWithRandr
} winResizeMode;
2003-11-14 17:48:57 +01:00
/*
* Screen information structure that we need before privates are available
* in the server startup sequence.
*/
typedef struct {
ScreenPtr pScreen;
/* Did the user specify a height and width? */
Bool fUserGaveHeightAndWidth;
DWORD dwScreen;
int iMonitor;
HMONITOR hMonitor;
DWORD dwUserWidth;
DWORD dwUserHeight;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwPaddedWidth;
/* Did the user specify a screen position? */
Bool fUserGavePosition;
DWORD dwInitialX;
DWORD dwInitialY;
/*
* dwStride is the number of whole pixels that occupy a scanline,
* including those pixels that are not displayed. This is basically
* a rounding up of the width.
*/
DWORD dwStride;
/* Offset of the screen in the window when using scrollbars */
DWORD dwXOffset;
DWORD dwYOffset;
DWORD dwBPP;
DWORD dwDepth;
DWORD dwRefreshRate;
char *pfb;
DWORD dwEngine;
DWORD dwEnginePreferred;
DWORD dwClipUpdatesNBoxes;
2004-06-21 15:19:32 +02:00
#ifdef XWIN_EMULATEPSEUDO
Bool fEmulatePseudo;
2004-06-21 15:19:32 +02:00
#endif
Bool fFullScreen;
Bool fDecoration;
Bool fRootless;
Bool fMultiWindow;
Bool fCompositeWM;
Bool fMultiMonitorOverride;
Bool fMultipleMonitors;
Bool fLessPointer;
winResizeMode iResizeMode;
Bool fNoTrayIcon;
int iE3BTimeout;
/* Windows (Alt+F4) and Unix (Ctrl+Alt+Backspace) Killkey */
Bool fUseWinKillKey;
Bool fUseUnixKillKey;
Bool fIgnoreInput;
/* Did the user explicitly set this screen? */
Bool fExplicitScreen;
/* Icons for screen window */
HICON hIcon;
HICON hIconSm;
2003-11-14 17:48:57 +01:00
} winScreenInfo, *winScreenInfoPtr;
/*
* Screen privates
*/
typedef struct _winPrivScreenRec {
winScreenInfoPtr pScreenInfo;
2003-11-14 17:48:57 +01:00
Bool fEnabled;
Bool fClosed;
Bool fActive;
Bool fBadDepth;
2003-11-14 17:48:57 +01:00
int iDeltaZ;
int iDeltaV;
2003-11-14 17:48:57 +01:00
int iConnectedClients;
2004-06-21 15:19:32 +02:00
CloseScreenProcPtr CloseScreen;
2003-11-14 17:48:57 +01:00
DWORD dwRedMask;
DWORD dwGreenMask;
DWORD dwBlueMask;
DWORD dwBitsPerRGB;
2003-11-14 17:48:57 +01:00
DWORD dwModeKeyStates;
2003-11-14 17:48:57 +01:00
/* Handle to icons that must be freed */
HICON hiconNotifyIcon;
/* Palette management */
ColormapPtr pcmapInstalled;
2003-11-14 17:48:57 +01:00
/* Pointer to the root visual so we only have to look it up once */
VisualPtr pRootVisual;
2003-11-14 17:48:57 +01:00
/* 3 button emulation variables */
int iE3BCachedPress;
Bool fE3BFakeButton2Sent;
2003-11-14 17:48:57 +01:00
/* Privates used by shadow fb GDI engine */
HBITMAP hbmpShadow;
HDC hdcScreen;
HDC hdcShadow;
HWND hwndScreen;
BITMAPINFOHEADER *pbmih;
/* Privates used by shadow fb DirectDraw Nonlocking engine */
LPDIRECTDRAW pdd;
LPDIRECTDRAW4 pdd4;
LPDIRECTDRAWSURFACE4 pddsShadow4;
LPDIRECTDRAWSURFACE4 pddsPrimary4;
LPDIRECTDRAWCLIPPER pddcPrimary;
BOOL fRetryCreateSurface;
2003-11-14 17:48:57 +01:00
/* Privates used by multi-window */
pthread_t ptWMProc;
pthread_t ptXMsgProc;
void *pWMInfo;
Bool fRootWindowShown;
2003-11-14 17:48:57 +01:00
/* Privates used for any module running in a seperate thread */
pthread_mutex_t pmServerStarted;
Bool fServerStarted;
/* Engine specific functions */
winAllocateFBProcPtr pwinAllocateFB;
winFreeFBProcPtr pwinFreeFB;
winShadowUpdateProcPtr pwinShadowUpdate;
winInitScreenProcPtr pwinInitScreen;
winCloseScreenProcPtr pwinCloseScreen;
winInitVisualsProcPtr pwinInitVisuals;
winAdjustVideoModeProcPtr pwinAdjustVideoMode;
winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
winFinishScreenInitProcPtr pwinFinishScreenInit;
winBltExposedRegionsProcPtr pwinBltExposedRegions;
winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion;
winActivateAppProcPtr pwinActivateApp;
winRedrawScreenProcPtr pwinRedrawScreen;
winRealizeInstalledPaletteProcPtr pwinRealizeInstalledPalette;
winInstallColormapProcPtr pwinInstallColormap;
winStoreColorsProcPtr pwinStoreColors;
winCreateColormapProcPtr pwinCreateColormap;
winDestroyColormapProcPtr pwinDestroyColormap;
winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface;
winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface;
winCreateScreenResourcesProc pwinCreateScreenResources;
/* Window Procedures for Rootless mode */
CreateWindowProcPtr CreateWindow;
DestroyWindowProcPtr DestroyWindow;
PositionWindowProcPtr PositionWindow;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
ValidateTreeProcPtr ValidateTree;
PostValidateTreeProcPtr PostValidateTree;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
ClipNotifyProcPtr ClipNotify;
RestackWindowProcPtr RestackWindow;
ReparentWindowProcPtr ReparentWindow;
ResizeWindowProcPtr ResizeWindow;
MoveWindowProcPtr MoveWindow;
SetShapeProcPtr SetShape;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
winCursorRec cursor;
Add Windows-DRI extension If windowsdriproto headers are available, build a Windows-DRI extension, which supports requests to enable local clients to directly render GL to a Windows drawable: - a query to check if WGL is being used on a screen - a query to map a fbconfigID to a native pixelformatindex - a query to map a drawable to a native handle Windows-DRI can only be useful if we are using WGL, so make an note if WGL is active on a screen. Make validGlxDrawable() public Adjust glxWinSetPixelFormat() so it doesn't require a context, just a screen and config. That enables factoring out the deferred drawable creation code as glxWinDeferredCreateDrawable() Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a file mapping, so they exist in memory which can be shared with the direct rendering process. Currently, this file mapping is accessed by a name generated from the XID. This will not be unique across multiple server instances. It would perhaps be better, although more complicated, to use an anonymous file mapping, and then duplicate the handle for the direct rendering process. Use glxWinDeferredCreateDrawable() to ensure the native handle exists for the Windows-DRI query to map a drawable to native handle. v2: Various printf format warning fixes v3: Fix format warnings on x86 Move some uninteresting windows-dri output to debug log level v4: check for windowsdriproto when --enable-windowsdri use windowsdriproto_CFLAGS Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-07-24 13:29:41 +02:00
Bool fNativeGlActive;
2003-11-14 17:48:57 +01:00
} winPrivScreenRec;
typedef struct {
void *value;
XID id;
} WindowIDPairRec, *WindowIDPairPtr;
2003-11-14 17:48:57 +01:00
/*
* Extern declares for general global variables
*/
#include "winglobals.h"
extern winScreenInfo *g_ScreenInfo;
extern miPointerScreenFuncRec g_winPointerCursorFuncs;
extern DWORD g_dwEvents;
#ifdef HAS_DEVWINDOWS
extern int g_fdMessageQueue;
#endif
extern DevPrivateKeyRec g_iScreenPrivateKeyRec;
#define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec)
extern DevPrivateKeyRec g_iCmapPrivateKeyRec;
#define g_iCmapPrivateKey (&g_iCmapPrivateKeyRec)
extern DevPrivateKeyRec g_iGCPrivateKeyRec;
#define g_iGCPrivateKey (&g_iGCPrivateKeyRec)
extern DevPrivateKeyRec g_iPixmapPrivateKeyRec;
#define g_iPixmapPrivateKey (&g_iPixmapPrivateKeyRec)
extern DevPrivateKeyRec g_iWindowPrivateKeyRec;
#define g_iWindowPrivateKey (&g_iWindowPrivateKeyRec)
extern unsigned long g_ulServerGeneration;
extern DWORD g_dwEnginesSupported;
extern HINSTANCE g_hInstance;
extern int g_copyROP[];
extern int g_patternROP[];
extern const char *g_pszQueryHost;
extern DeviceIntPtr g_pwinPointer;
extern DeviceIntPtr g_pwinKeyboard;
2003-11-14 17:48:57 +01:00
/*
* Extern declares for dynamically loaded library function pointers
2003-11-14 17:48:57 +01:00
*/
extern FARPROC g_fpDirectDrawCreate;
extern FARPROC g_fpDirectDrawCreateClipper;
2003-11-14 17:48:57 +01:00
/*
* Screen privates macros
*/
#define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey))
2003-11-14 17:48:57 +01:00
#define winSetScreenPriv(pScreen,v) \
dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v)
2003-11-14 17:48:57 +01:00
#define winScreenPriv(pScreen) \
winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen)
/*
* Colormap privates macros
*/
#define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \
dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey))
2003-11-14 17:48:57 +01:00
#define winSetCmapPriv(pCmap,v) \
dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v)
2003-11-14 17:48:57 +01:00
#define winCmapPriv(pCmap) \
winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap)
/*
* GC privates macros
*/
#define winGetGCPriv(pGC) ((winPrivGCPtr) \
dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey))
2003-11-14 17:48:57 +01:00
#define winSetGCPriv(pGC,v) \
dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v)
2003-11-14 17:48:57 +01:00
#define winGCPriv(pGC) \
winPrivGCPtr pGCPriv = winGetGCPriv(pGC)
/*
* Pixmap privates macros
*/
#define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \
dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey))
2003-11-14 17:48:57 +01:00
#define winSetPixmapPriv(pPixmap,v) \
dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v)
2003-11-14 17:48:57 +01:00
#define winPixmapPriv(pPixmap) \
winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap)
/*
* Window privates macros
*/
#define winGetWindowPriv(pWin) ((winPrivWinPtr) \
dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey))
2003-11-14 17:48:57 +01:00
#define winSetWindowPriv(pWin,v) \
dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v)
2003-11-14 17:48:57 +01:00
#define winWindowPriv(pWin) \
winPrivWinPtr pWinPriv = winGetWindowPriv(pWin)
/*
* wrapper macros
*/
#define _WIN_WRAP(priv, real, mem, func) {\
priv->mem = real->mem; \
real->mem = func; \
}
#define _WIN_UNWRAP(priv, real, mem) {\
real->mem = priv->mem; \
}
#define WIN_WRAP(mem, func) _WIN_WRAP(pScreenPriv, pScreen, mem, func)
#define WIN_UNWRAP(mem) _WIN_UNWRAP(pScreenPriv, pScreen, mem)
2003-11-14 17:48:57 +01:00
/*
* BEGIN DDX and DIX Function Prototypes
*/
/*
* winallpriv.c
*/
Bool
winAllocatePrivates(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
Bool
winInitCmapPrivates(ColormapPtr pCmap, int i);
2003-11-14 17:48:57 +01:00
Bool
winAllocateCmapPrivates(ColormapPtr pCmap);
2003-11-14 17:48:57 +01:00
/*
* winblock.c
*/
void
winBlockHandler(ScreenPtr pScreen, void *pTimeout);
2003-11-14 17:48:57 +01:00
/*
* winclipboardinit.c
*/
Bool
winInitClipboard(void);
void
winClipboardShutdown(void);
2003-11-14 17:48:57 +01:00
/*
* wincmap.c
*/
void
winSetColormapFunctions(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
Bool
winCreateDefColormap(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
/*
* wincreatewnd.c
*/
Bool
winCreateBoundingWindowFullScreen(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
Bool
winCreateBoundingWindowWindowed(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
/*
* windialogs.c
*/
void
winDisplayExitDialog(winPrivScreenPtr pScreenPriv);
void
winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv);
2004-06-21 15:19:32 +02:00
void
winDisplayAboutDialog(winPrivScreenPtr pScreenPriv);
2003-11-14 17:48:57 +01:00
/*
* winengine.c
*/
void
winDetectSupportedEngines(void);
2003-11-14 17:48:57 +01:00
Bool
winSetEngine(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
Bool
winGetDDProcAddresses(void);
2003-11-14 17:48:57 +01:00
void
winReleaseDDProcAddresses(void);
2003-11-14 17:48:57 +01:00
/*
* winerror.c
*/
2004-06-21 15:19:32 +02:00
#ifdef DDXOSVERRORF
2003-11-14 17:48:57 +01:00
void
OsVendorVErrorF(const char *pszFormat, va_list va_args)
_X_ATTRIBUTE_PRINTF(1, 0);
2004-06-21 15:19:32 +02:00
#endif
void
winMessageBoxF(const char *pszError, UINT uType, ...)
_X_ATTRIBUTE_PRINTF(1, 3);
2003-11-14 17:48:57 +01:00
/*
2004-06-21 15:19:32 +02:00
* winglobals.c
2003-11-14 17:48:57 +01:00
*/
void
winInitializeGlobals(void);
2003-11-14 17:48:57 +01:00
2004-06-21 15:19:32 +02:00
/*
* winkeybd.c
*/
2003-11-14 17:48:57 +01:00
int
winTranslateKey(WPARAM wParam, LPARAM lParam);
2003-11-14 17:48:57 +01:00
int
winKeybdProc(DeviceIntPtr pDeviceInt, int iState);
2003-11-14 17:48:57 +01:00
void
winInitializeModeKeyStates(void);
2003-11-14 17:48:57 +01:00
void
winRestoreModeKeyStates(void);
2003-11-14 17:48:57 +01:00
Bool
winIsFakeCtrl_L(UINT message, WPARAM wParam, LPARAM lParam);
2003-11-14 17:48:57 +01:00
void
winKeybdReleaseKeys(void);
2003-11-14 17:48:57 +01:00
void
winSendKeyEvent(DWORD dwKey, Bool fDown);
2003-11-14 17:48:57 +01:00
BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
void
winFixShiftKeys(int iScanCode);
2003-11-14 17:48:57 +01:00
/*
2004-06-21 15:19:32 +02:00
* winkeyhook.c
2003-11-14 17:48:57 +01:00
*/
Bool
winInstallKeyboardHookLL(void);
2003-11-14 17:48:57 +01:00
2004-06-21 15:19:32 +02:00
void
winRemoveKeyboardHookLL(void);
2003-11-14 17:48:57 +01:00
/*
* winmisc.c
*/
CARD8
winCountBits(DWORD dw);
2003-11-14 17:48:57 +01:00
Bool
winUpdateFBPointer(ScreenPtr pScreen, void *pbits);
2003-11-14 17:48:57 +01:00
/*
* winmouse.c
*/
int
winMouseProc(DeviceIntPtr pDeviceInt, int iState);
2003-11-14 17:48:57 +01:00
int
winMouseWheel(int *iTotalDeltaZ, int iDeltaZ, int iButtonUp, int iButtonDown);
2003-11-14 17:48:57 +01:00
void
winMouseButtonsSendEvent(int iEventType, int iButton);
2003-11-14 17:48:57 +01:00
int
winMouseButtonsHandle(ScreenPtr pScreen,
int iEventType, int iButton, WPARAM wParam);
2003-11-14 17:48:57 +01:00
void
winEnqueueMotion(int x, int y);
2003-11-14 17:48:57 +01:00
/*
* winscrinit.c
*/
Bool
api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon May 14 15:16:11 2012 -0700 xfree86: Bump video ABI to 13.0 The ABI was broken by changes to convert from screen index numbers to ScreenPtr / ScrnInfoPtr in various structures and function signatures. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 10:56:57 2012 +0100 xf86: xf86ClearEntityListForScreen should take a pScrn When adding GPU screens this make life easier. (also fix comment, as pointed out by Alan) Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com> commit afee8b5ab4501597ecc1ade34124d7ca227ab055 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 24 07:07:32 2012 +0100 xf86i2c: add pscrn for drivers to use This just adds a pScrn pointer into the struct for the drivers to use instead of scrnIndex. Mostly scrnIndex is used for logging, but some drivers use it to lookup xf86Screens, so let them stash a pScrn instead. Removing the scrnIndex is a bit more involved and I'm not sure its worth the effort. Doing i2c in the X server is legacy code as far as I'm concerned. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit ea5092f1f679691d187f1eee9427e6057beec56e Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 19:25:20 2012 +0100 dix/gc: consolidate GC object creation in one place The standard GC create and scratch GC create were 90% the same really, and I have a need in the future for creating GC objects without the other bits, so wanted to avoid a third copy. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 10:24:06 2012 +0100 xf86: add a define to denote the new non-index interfaces are being used This can be used by drivers to provide compatible APIs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 15:09:12 2012 +0100 dix: make Create/Free scratch pixmaps take a ScreenPtr While technically an API/ABI change I doubt anyone uses it, but it helps in splitting screens up. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:57:55 2012 +0100 xf86/xv: remove scrnIndexfrom xf86FindXvOptions. Move this interface to taking an ScrnInfoPtr. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:53:59 2012 +0100 xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) stop passing indices into this function. v2: drop flags argument. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 58824e414f35682435f15bfe6c4b656bd90b9235 Author: Dave Airlie <airlied@redhat.com> Date: Wed May 23 14:48:09 2012 +0100 xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:18:59 2012 +0100 xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. v2: drop the blockData/wakeupData args as per ajax's suggestion., fix docs. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 790d003de20fb47674420a24dadd92412d78620d Author: Dave Airlie <airlied@gmail.com> Date: Wed Apr 11 09:53:14 2012 +0100 xf86/common: remove some more pScrn->pScreen uses remove some more conversions that appeared after api cleanups. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:34:53 2012 +0100 ddc: change API to take ScrnInfoPtr (v2) This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. v2: address Alan's comments about dropping DDC2Init parameter. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:31:26 2012 +0100 vbe: don't use index for VBEInterpretPanelID (API) Remove use of xf86screens from vbe module. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 16:25:11 2012 +0100 int10/vbe: don't use xf86Screens. (ABI) (v3) Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. v2: address Alan's comment to fix struct alignment. v3: squash in all the int10 fixes, test the vm86 code builds, after comments by Keith. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 23cca612b4fb5efc33683c7624b803b457387e3d Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:30:18 2012 +0100 xserver: drop index argument to ScreenInit (ABI/API) (v2) This drops the index argument, its the same as pScreen->myNum, and its the last major index abuse I can find. v2: address Alan's review - update docs, fix xwin/xnest/darwin Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:23:01 2012 +0100 xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) This migrates PointerMoved from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:20:46 2012 +0100 xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) This migrates the PMEvent from index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:18:30 2012 +0100 xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:14:11 2012 +0100 xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 51e5f90ada929d6b23176090badbb42fdb3fa550 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:11:09 2012 +0100 xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 94f1f21d17e86f96d4a54292a399160950087675 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 15:02:11 2012 +0100 xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:59:46 2012 +0100 xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. v2: drop flags. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:50:37 2012 +0100 xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. v2: drop flags args. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:41:27 2012 +0100 xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) Another index->pScrn conversion. v2: drop flags arg. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:35:41 2012 +0100 xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. v2: drop flags args as suggested by Keith, fix docs. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 14:22:18 +02:00
winScreenInit(ScreenPtr pScreen, int argc, char **argv);
2003-11-14 17:48:57 +01:00
Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
2003-11-14 17:48:57 +01:00
/*
* winshadddnl.c
*/
Bool
winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
/*
* winshadgdi.c
*/
Bool
winSetEngineFunctionsShadowGDI(ScreenPtr pScreen);
2003-11-14 17:48:57 +01:00
/*
* winwakeup.c
*/
void
winWakeupHandler(ScreenPtr pScreen, int iResult);
2003-11-14 17:48:57 +01:00
/*
* winwindow.c
*/
Bool
winCreateWindowRootless(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winDestroyWindowRootless(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winPositionWindowRootless(WindowPtr pWindow, int x, int y);
2003-11-14 17:48:57 +01:00
Bool
winChangeWindowAttributesRootless(WindowPtr pWindow, unsigned long mask);
2003-11-14 17:48:57 +01:00
Bool
winUnmapWindowRootless(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winMapWindowRootless(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
void
winSetShapeRootless(WindowPtr pWindow, int kind);
2003-11-14 17:48:57 +01:00
/*
* winmultiwindowshape.c
*/
void
winReshapeMultiWindow(WindowPtr pWin);
void
winSetShapeMultiWindow(WindowPtr pWindow, int kind);
void
winUpdateRgnMultiWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
/*
* winmultiwindowwindow.c
*/
Bool
winCreateWindowMultiWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winDestroyWindowMultiWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winPositionWindowMultiWindow(WindowPtr pWindow, int x, int y);
2003-11-14 17:48:57 +01:00
Bool
winChangeWindowAttributesMultiWindow(WindowPtr pWindow, unsigned long mask);
2003-11-14 17:48:57 +01:00
Bool
winUnmapWindowMultiWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
Bool
winMapWindowMultiWindow(WindowPtr pWindow);
2003-11-14 17:48:57 +01:00
void
winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent);
2003-11-14 17:48:57 +01:00
void
winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib);
2003-11-14 17:48:57 +01:00
void
winReorderWindowsMultiWindow(void);
void
winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w,
unsigned int h, WindowPtr pSib);
2004-06-21 15:19:32 +02:00
void
winMoveWindowMultiWindow(WindowPtr pWin, int x, int y,
WindowPtr pSib, VTKind kind);
void
winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt,
RegionPtr oldRegion);
PixmapPtr
winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint);
Bool
winDestroyPixmapMultiwindow(PixmapPtr pPixmap);
Bool
winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap,
int width,
int height,
int depth,
int bitsPerPixel, int devKind, void *pPixData);
XID
winGetWindowID(WindowPtr pWin);
2004-06-21 15:19:32 +02:00
int
winAdjustXWindow(WindowPtr pWin, HWND hwnd);
2004-06-21 15:19:32 +02:00
/*
* winmultiwindowwndproc.c
*/
LRESULT CALLBACK
winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
/*
* wintrayicon.c
*/
void
winInitNotifyIcon(winPrivScreenPtr pScreenPriv);
void
winDeleteNotifyIcon(winPrivScreenPtr pScreenPriv);
LRESULT
winHandleIconMessage(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam,
winPrivScreenPtr pScreenPriv);
2003-11-14 17:48:57 +01:00
/*
* winwndproc.c
*/
LRESULT CALLBACK
winWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
2003-11-14 17:48:57 +01:00
2004-06-21 15:19:32 +02:00
/*
* winwindowswm.c
*/
void
winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg,
Window window, int x, int y, int w, int h);
2004-06-21 15:19:32 +02:00
void
winWindowsWMExtensionInit(void);
2004-06-21 15:19:32 +02:00
/*
* wincursor.c
*/
Bool
winInitCursor(ScreenPtr pScreen);
2004-06-21 15:19:32 +02:00
/*
* winprocarg.c
*/
void
winInitializeScreens(int maxscreens);
/*
* winrandr.c
*/
Bool
winRandRInit(ScreenPtr pScreen);
void
winDoRandRScreenSetSize(ScreenPtr pScreen,
CARD16 width,
CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
/*
* winmsgwindow.c
*/
Bool
winCreateMsgWindowThread(void);
/*
* winos.c
*/
void
winOS(void);
2003-11-14 17:48:57 +01:00
/*
* END DDX and DIX Function Prototypes
*/
#endif /* _WIN_H_ */