diff options
author | marha <marha@users.sourceforge.net> | 2014-07-19 15:12:53 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-19 15:12:53 +0200 |
commit | 61c36feba19d918885022042ea62d068a698c83d (patch) | |
tree | fd351953eb2193fe548e7d0e2dca06b34b7c4f4d /xorg-server/include | |
parent | 3865d60ef607cbb00c819e905e40d3628b8eca29 (diff) | |
parent | d0c30e7945e76ac119f6d867e27137c8a76f7e15 (diff) | |
download | vcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.gz vcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.bz2 vcxsrv-61c36feba19d918885022042ea62d068a698c83d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ir.cpp
xorg-server/config/config.c
xorg-server/include/callback.h
xorg-server/include/colormap.h
xorg-server/include/cursor.h
xorg-server/include/dix.h
xorg-server/include/dixfont.h
xorg-server/include/dixgrabs.h
xorg-server/include/gc.h
xorg-server/include/gcstruct.h
xorg-server/include/input.h
xorg-server/include/os.h
xorg-server/include/pixmap.h
xorg-server/include/property.h
xorg-server/include/resource.h
xorg-server/include/scrnintstr.h
xorg-server/include/window.h
xorg-server/include/xkbsrv.h
xorg-server/mi/mi.h
Diffstat (limited to 'xorg-server/include')
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/callback.h | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/colormap.h | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/cursor.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/dix.h | 69 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/dixfont.h | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/dixgrabs.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/gc.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/gcstruct.h | 38 | ||||
-rw-r--r-- | xorg-server/include/hotplug.h | 69 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/input.h | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/os.h | 52 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/pixmap.h | 14 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/property.h | 36 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/resource.h | 74 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/scrnintstr.h | 116 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/window.h | 20 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/include/xkbsrv.h | 18 |
17 files changed, 314 insertions, 256 deletions
diff --git a/xorg-server/include/callback.h b/xorg-server/include/callback.h index 3529225b4..8a65af88b 100644..100755 --- a/xorg-server/include/callback.h +++ b/xorg-server/include/callback.h @@ -68,16 +68,16 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *); -extern _X_EXPORT Bool AddCallback(CallbackListPtr * /*pcbl */ , - CallbackProcPtr /*callback */ , - void * /*data */ ); +extern _X_EXPORT Bool AddCallback(CallbackListPtr *pcbl, + CallbackProcPtr callback, + void *data); -extern _X_EXPORT Bool DeleteCallback(CallbackListPtr * /*pcbl */ , - CallbackProcPtr /*callback */ , - void * /*data */ ); +extern _X_EXPORT Bool DeleteCallback(CallbackListPtr *pcbl, + CallbackProcPtr callback, + void *data); -extern _X_EXPORT void _CallCallbacks(CallbackListPtr * /*pcbl */ , - void * /*call_data */ ); +extern _X_EXPORT void _CallCallbacks(CallbackListPtr *pcbl, + void *call_data); static inline void CallCallbacks(CallbackListPtr *pcbl, void *call_data) @@ -87,7 +87,7 @@ CallCallbacks(CallbackListPtr *pcbl, void *call_data) _CallCallbacks(pcbl, call_data); } -extern _X_EXPORT void DeleteCallbackList(CallbackListPtr * /*pcbl */ ); +extern _X_EXPORT void DeleteCallbackList(CallbackListPtr *pcbl); extern _X_EXPORT void InitCallbackManager(void); extern _X_EXPORT void DeleteCallbackManager(void); diff --git a/xorg-server/include/colormap.h b/xorg-server/include/colormap.h index 30e508557..b89bbe114 100644..100755 --- a/xorg-server/include/colormap.h +++ b/xorg-server/include/colormap.h @@ -82,14 +82,14 @@ extern _X_EXPORT int CreateColormap(Colormap /*mid */ , int /*alloc */ , int /*client */ ); -extern _X_EXPORT int FreeColormap(void * /*pmap */ , - XID /*mid */ ); +extern _X_EXPORT int FreeColormap(void *pmap, + XID mid); -extern _X_EXPORT int TellLostMap(WindowPtr /*pwin */ , - void * /* Colormap *pmid */ ); +extern _X_EXPORT int TellLostMap(WindowPtr pwin, + void *value); -extern _X_EXPORT int TellGainedMap(WindowPtr /*pwin */ , - void * /* Colormap *pmid */ ); +extern _X_EXPORT int TellGainedMap(WindowPtr pwin, + void *value); extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ , ColormapPtr /*pSrc */ , @@ -126,8 +126,8 @@ extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ , xrgb * /*prgbList */ , ClientPtr client); -extern _X_EXPORT int FreeClientPixels(void * /*pcr */ , - XID /*fakeid */ ); +extern _X_EXPORT int FreeClientPixels(void *pcr, + XID fakeid); extern _X_EXPORT int AllocColorCells(int /*client */ , ColormapPtr /*pmap */ , diff --git a/xorg-server/include/cursor.h b/xorg-server/include/cursor.h index 5e9ed92d4..1e483ac40 100644..100755 --- a/xorg-server/include/cursor.h +++ b/xorg-server/include/cursor.h @@ -68,8 +68,8 @@ extern _X_EXPORT DevScreenPrivateKeyRec cursorScreenDevPriv; extern _X_EXPORT CursorPtr rootCursor; -extern _X_EXPORT int FreeCursor(void * /*pCurs */ , - XID /*cid */ ); +extern _X_EXPORT int FreeCursor(void *pCurs, + XID cid); extern _X_EXPORT CursorPtr RefCursor(CursorPtr /* cursor */); extern _X_EXPORT CursorPtr UnrefCursor(CursorPtr /* cursor */); diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h index 82bb58cbc..61ecc8df2 100644..100755 --- a/xorg-server/include/dix.h +++ b/xorg-server/include/dix.h @@ -147,14 +147,14 @@ extern _X_EXPORT void UpdateCurrentTime(void); extern _X_EXPORT void UpdateCurrentTimeIf(void); -extern _X_EXPORT int dixDestroyPixmap(void * /*value */ , - XID /*pid */ ); +extern _X_EXPORT int dixDestroyPixmap(void *value, + XID pid); -extern _X_EXPORT void InitClient(ClientPtr /*client */ , - int /*i */ , - void * /*ospriv */ ); +extern _X_EXPORT void InitClient(ClientPtr client, + int i, + void *ospriv); -extern _X_EXPORT ClientPtr NextAvailableClient(void * /*ospriv */ ); +extern _X_EXPORT ClientPtr NextAvailableClient(void *ospriv); extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ , unsigned int /*majorCode */ , @@ -203,11 +203,11 @@ extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ , extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ ); -extern _X_EXPORT void BlockHandler(void * /*pTimeout */ , - void * /*pReadmask */ ); +extern _X_EXPORT void BlockHandler(void *pTimeout, + void *pReadmask); -extern _X_EXPORT void WakeupHandler(int /*result */ , - void * /*pReadmask */ ); +extern _X_EXPORT void WakeupHandler(int result, + void *pReadmask); void EnableLimitedSchedulingLatency(void); @@ -215,21 +215,17 @@ void void DisableLimitedSchedulingLatency(void); -typedef void (*WakeupHandlerProcPtr) (void * /* blockData */ , - int /* result */ , - void * /* pReadmask */ ); +typedef void (*WakeupHandlerProcPtr) (void *blockData, + int result, + void *pReadmask); -extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr - /*blockHandler */ , - WakeupHandlerProcPtr - /*wakeupHandler */ , - void * /*blockData */ ); +extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + void *blockData); -extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr - /*blockHandler */ , - WakeupHandlerProcPtr - /*wakeupHandler */ , - void * /*blockData */ ); +extern _X_EXPORT void RemoveBlockAndWakeupHandlers(BlockHandlerProcPtr blockHandler, + WakeupHandlerProcPtr wakeupHandler, + void *blockData); extern _X_EXPORT void InitBlockAndWakeupHandlers(void); @@ -237,22 +233,17 @@ extern _X_EXPORT void ProcessWorkQueue(void); extern _X_EXPORT void ProcessWorkQueueZombies(void); -extern _X_EXPORT Bool QueueWorkProc(Bool (* /*function */ )( - ClientPtr - /*clientUnused */ - , - void * - /*closure */ ), - ClientPtr /*client */ , - void * /*closure */ - ); +extern _X_EXPORT Bool QueueWorkProc(Bool (*function)(ClientPtr clientUnused, + void *closure), + ClientPtr client, + void *closure); -typedef Bool (*ClientSleepProcPtr) (ClientPtr /*client */ , - void * /*closure */ ); +typedef Bool (*ClientSleepProcPtr) (ClientPtr client, + void *closure); -extern _X_EXPORT Bool ClientSleep(ClientPtr /*client */ , - ClientSleepProcPtr /* function */ , - void * /*closure */ ); +extern _X_EXPORT Bool ClientSleep(ClientPtr client, + ClientSleepProcPtr function, + void *closure); #ifndef ___CLIENTSIGNAL_DEFINED___ #define ___CLIENTSIGNAL_DEFINED___ @@ -444,8 +435,8 @@ extern void RecalculateDeliverableEvents(WindowPtr /* pWin */ ); extern _X_EXPORT int -OtherClientGone(void * /* value */ , - XID /* id */ ); +OtherClientGone(void *value, + XID id); extern void DoFocusEvents(DeviceIntPtr /* dev */ , diff --git a/xorg-server/include/dixfont.h b/xorg-server/include/dixfont.h index baa4235e9..48c630539 100644..100755 --- a/xorg-server/include/dixfont.h +++ b/xorg-server/include/dixfont.h @@ -40,9 +40,9 @@ extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe */ ); extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe */ ); -extern _X_EXPORT void FontWakeup(void * /*data */ , - int /*count */ , - void * /*LastSelectMask */ ); +extern _X_EXPORT void FontWakeup(void *data, + int count, + void *LastSelectMask); extern _X_EXPORT int OpenFont(ClientPtr /*client */ , XID /*fid */ , @@ -50,8 +50,8 @@ extern _X_EXPORT int OpenFont(ClientPtr /*client */ , unsigned /*lenfname */ , const char * /*pfontname */ ); -extern _X_EXPORT int CloseFont(void * /*pfont */ , - XID /*fid */ ); +extern _X_EXPORT int CloseFont(void *pfont, + XID fid); typedef struct _xQueryFontReply *xQueryFontReplyPtr; diff --git a/xorg-server/include/dixgrabs.h b/xorg-server/include/dixgrabs.h index 2d8c8584c..3bd80132b 100644..100755 --- a/xorg-server/include/dixgrabs.h +++ b/xorg-server/include/dixgrabs.h @@ -47,8 +47,8 @@ extern GrabPtr CreateGrab(int /* client */ , WindowPtr /* confineTo */ , CursorPtr /* cursor */ ); -extern _X_EXPORT int DeletePassiveGrab(void * /* value */ , - XID /* id */ ); +extern _X_EXPORT int DeletePassiveGrab(void *value, + XID id); extern _X_EXPORT Bool GrabMatchesSecond(GrabPtr /* pFirstGrab */ , GrabPtr /* pSecondGrab */ , diff --git a/xorg-server/include/gc.h b/xorg-server/include/gc.h index 1e69b5c3d..cb2909e29 100644..100755 --- a/xorg-server/include/gc.h +++ b/xorg-server/include/gc.h @@ -112,8 +112,8 @@ extern _X_EXPORT int CopyGC(GCPtr /*pgcSrc */ , GCPtr /*pgcDst */ , BITS32 /*mask */ ); -extern _X_EXPORT int FreeGC(void * /*pGC */ , - XID /*gid */ ); +extern _X_EXPORT int FreeGC(void *pGC, + XID gid); extern _X_EXPORT void FreeGCperDepth(int /*screenNum */ ); diff --git a/xorg-server/include/gcstruct.h b/xorg-server/include/gcstruct.h index 1adea22b5..6358b8cb7 100644..100755 --- a/xorg-server/include/gcstruct.h +++ b/xorg-server/include/gcstruct.h @@ -76,10 +76,10 @@ typedef struct _GCFuncs { void (*DestroyGC) (GCPtr /*pGC */ ); - void (*ChangeClip) (GCPtr /*pGC */ , - int /*type */ , - void * /*pvalue */ , - int /*nrects */ ); + void (*ChangeClip) (GCPtr pGC, + int type, + void *pvalue, + int nrects); void (*DestroyClip) (GCPtr /*pGC */ ); @@ -210,21 +210,21 @@ typedef struct _GCOps { int /*count */ , unsigned short * /*chars */ ); - void (*ImageGlyphBlt) (DrawablePtr /*pDrawable */ , - GCPtr /*pGC */ , - int /*x */ , - int /*y */ , - unsigned int /*nglyph */ , - CharInfoPtr * /*ppci */ , - void * /*pglyphBase */ ); - - void (*PolyGlyphBlt) (DrawablePtr /*pDrawable */ , - GCPtr /*pGC */ , - int /*x */ , - int /*y */ , - unsigned int /*nglyph */ , - CharInfoPtr * /*ppci */ , - void * /*pglyphBase */ ); + void (*ImageGlyphBlt) (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, + void *pglyphBase); + + void (*PolyGlyphBlt) (DrawablePtr pDrawable, + GCPtr pGC, + int x, + int y, + unsigned int nglyph, + CharInfoPtr *ppci, + void *pglyphBase); void (*PushPixels) (GCPtr /*pGC */ , PixmapPtr /*pBitMap */ , diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h index c4268a0c4..6fe76c806 100644 --- a/xorg-server/include/hotplug.h +++ b/xorg-server/include/hotplug.h @@ -32,64 +32,41 @@ extern _X_EXPORT void config_pre_init(void); extern _X_EXPORT void config_init(void); extern _X_EXPORT void config_fini(void); -enum { ODEV_ATTRIB_STRING, ODEV_ATTRIB_INT }; - -struct OdevAttribute { - struct xorg_list member; - int attrib_id; - union { - char *attrib_name; - int attrib_value; - }; - int attrib_type; -}; +/* Bump this each time you add something to the struct + * so that drivers can easily tell what is available + */ +#define ODEV_ATTRIBUTES_VERSION 1 struct OdevAttributes { - struct xorg_list list; -}; + /* path to kernel device node - Linux e.g. /dev/dri/card0 */ + char *path; -/* Note starting with xserver 1.16 this function never fails */ -struct OdevAttributes * -config_odev_allocate_attribute_list(void); + /* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */ + char *syspath; -void -config_odev_free_attribute_list(struct OdevAttributes *attribs); + /* DRI-style bus id */ + char *busid; -/* Note starting with xserver 1.16 this function never fails */ -Bool -config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, - const char *attrib_name); + /* Server managed FD */ + int fd; -char * -config_odev_get_attribute(struct OdevAttributes *attribs, int attrib_id); + /* Major number of the device node pointed to by ODEV_ATTRIB_PATH */ + int major; -/* Note starting with xserver 1.16 this function never fails */ -Bool -config_odev_add_int_attribute(struct OdevAttributes *attribs, int attrib, - int attrib_value); + /* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */ + int minor; + + /* kernel driver name */ + char *driver; +}; -int -config_odev_get_int_attribute(struct OdevAttributes *attribs, int attrib, - int def); +/* Note starting with xserver 1.16 this function never fails */ +struct OdevAttributes * +config_odev_allocate_attributes(void); void config_odev_free_attributes(struct OdevAttributes *attribs); -/* path to kernel device node - Linux e.g. /dev/dri/card0 */ -#define ODEV_ATTRIB_PATH 1 -/* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */ -#define ODEV_ATTRIB_SYSPATH 2 -/* DRI-style bus id */ -#define ODEV_ATTRIB_BUSID 3 -/* Server managed FD */ -#define ODEV_ATTRIB_FD 4 -/* Major number of the device node pointed to by ODEV_ATTRIB_PATH */ -#define ODEV_ATTRIB_MAJOR 5 -/* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */ -#define ODEV_ATTRIB_MINOR 6 -/* kernel driver name */ -#define ODEV_ATTRIB_DRIVER 4 - typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs); void config_odev_probe(config_odev_probe_proc_ptr probe_callback); diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h index af1bfd05e..f3473ec6b 100644..100755 --- a/xorg-server/include/input.h +++ b/xorg-server/include/input.h @@ -314,10 +314,10 @@ extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ , unsigned int /*mode */ , unsigned int /*numAxes */ ); -typedef void (*BellProcPtr) (int /*percent */ , - DeviceIntPtr /*device */ , - void * /*ctrl */ , - int); +typedef void (*BellProcPtr) (int percent, + DeviceIntPtr device, + void *ctrl, + int feedbackClass); typedef void (*KbdCtrlProcPtr) (DeviceIntPtr /*device */ , KeybdCtrl * /*ctrl */ ); diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h index ed7e8806a..43718ce2b 100644..100755 --- a/xorg-server/include/os.h +++ b/xorg-server/include/os.h @@ -141,8 +141,8 @@ extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ , unsigned int /*string_n */ , char * /*auth_string */ ); -extern _X_EXPORT Bool EstablishNewConnections(ClientPtr /*clientUnused */ , - void * /*closure */ ); +extern _X_EXPORT Bool EstablishNewConnections(ClientPtr clientUnused, + void *closure); extern _X_EXPORT void CheckConnections(void); @@ -175,14 +175,14 @@ extern _X_EXPORT Bool AddClientOnOpenFD(int /* fd */ ); extern _X_EXPORT CARD32 GetTimeInMillis(void); extern _X_EXPORT CARD64 GetTimeInMicros(void); -extern _X_EXPORT void AdjustWaitForDelay(void * /*waitTime */ , - unsigned long /*newdelay */ ); +extern _X_EXPORT void AdjustWaitForDelay(void *waitTime, + unsigned long newdelay); typedef struct _OsTimerRec *OsTimerPtr; -typedef CARD32 (*OsTimerCallback) (OsTimerPtr /* timer */ , - CARD32 /* time */ , - void * /* arg */ ); +typedef CARD32 (*OsTimerCallback) (OsTimerPtr timer, + CARD32 time, + void *arg); extern _X_EXPORT void TimerInit(void); @@ -191,11 +191,11 @@ extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */ ); #define TimerAbsolute (1<<0) #define TimerForceOld (1<<1) -extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr /* timer */ , - int /* flags */ , - CARD32 /* millis */ , - OsTimerCallback /* func */ , - void * /* arg */ ); +extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr timer, + int flags, + CARD32 millis, + OsTimerCallback func, + void *arg); extern _X_EXPORT void TimerCheck(void); extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */ ); @@ -212,9 +212,9 @@ extern _X_EXPORT void UseMsg(void); extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []); -extern _X_EXPORT int set_font_authorizations(char ** /* authorizations */ , - int * /*authlen */ , - void * /* client */ ); +extern _X_EXPORT int set_font_authorizations(char **authorizations, + int *authlen, + void *client); #ifndef _HAVE_XALLOC_DECLS #define _HAVE_XALLOC_DECLS @@ -393,18 +393,18 @@ AddHost(ClientPtr /*client */ , const void * /*pAddr */ ); extern _X_EXPORT Bool -ForEachHostInFamily(int /*family */ , - Bool (* /*func */ )( - unsigned char * /* addr */ , - short /* len */ , - void * /* closure */ ), - void * /*closure */ ); +ForEachHostInFamily(int family, + Bool (*func)( + unsigned char *addr, + short len, + void *closure), + void *closure); extern _X_EXPORT int -RemoveHost(ClientPtr /*client */ , - int /*family */ , - unsigned /*length */ , - void * /*pAddr */ ); +RemoveHost(ClientPtr client, + int family, + unsigned length, + void *pAddr); extern _X_EXPORT int GetHosts(void ** /*data */ , @@ -466,7 +466,7 @@ DefineSelf(int /*fd */ , const int /*protocol*/); #if XDMCP extern _X_EXPORT void -AugmentSelf(void * /*from */ , int /*len */ ); +AugmentSelf(void *from, int len); extern _X_EXPORT void RegisterAuthorizations(void); diff --git a/xorg-server/include/pixmap.h b/xorg-server/include/pixmap.h index 12bb94fd1..f3c2c60c0 100644..100755 --- a/xorg-server/include/pixmap.h +++ b/xorg-server/include/pixmap.h @@ -93,13 +93,13 @@ typedef union _PixUnion { #define WindowDrawable(type) \ ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW)) -extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr /*pScreen */ , - int /*width */ , - int /*height */ , - int /*depth */ , - int /*bitsPerPixel */ , - int /*devKind */ , - void * /*pPixData */ ); +extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr pScreen, + int width, + int height, + int depth, + int bitsPerPixel, + int devKind, + void *pPixData); extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ ); diff --git a/xorg-server/include/property.h b/xorg-server/include/property.h index 2e8b54f87..cae44719b 100644..100755 --- a/xorg-server/include/property.h +++ b/xorg-server/include/property.h @@ -57,24 +57,24 @@ extern _X_EXPORT int dixLookupProperty(PropertyPtr * /*result */ , ClientPtr /*pClient */ , Mask /*access_mode */ ); -extern _X_EXPORT int dixChangeWindowProperty(ClientPtr /*pClient */ , - WindowPtr /*pWin */ , - Atom /*property */ , - Atom /*type */ , - int /*format */ , - int /*mode */ , - unsigned long /*len */ , - void * /*value */ , - Bool /*sendevent */ ); - -extern _X_EXPORT int ChangeWindowProperty(WindowPtr /*pWin */ , - Atom /*property */ , - Atom /*type */ , - int /*format */ , - int /*mode */ , - unsigned long /*len */ , - void * /*value */ , - Bool /*sendevent */ ); +extern _X_EXPORT int dixChangeWindowProperty(ClientPtr pClient, + WindowPtr pWin, + Atom property, + Atom type, + int format, + int mode, + unsigned long len, + void *value, + Bool sendevent); + +extern _X_EXPORT int ChangeWindowProperty(WindowPtr pWin, + Atom property, + Atom type, + int format, + int mode, + unsigned long len, + void *value, + Bool sendevent); extern _X_EXPORT int DeleteProperty(ClientPtr /*client */ , WindowPtr /*pWin */ , diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h index ffe02a67e..8ebced3a8 100644..100755 --- a/xorg-server/include/resource.h +++ b/xorg-server/include/resource.h @@ -139,21 +139,21 @@ typedef struct { void *value; } ResourceStateInfoRec; -typedef int (*DeleteType) (void * /*value */ , - XID /*id */ ); +typedef int (*DeleteType) (void *value, + XID id); -typedef void (*FindResType) (void * /*value */ , - XID /*id */ , - void * /*cdata */ ); +typedef void (*FindResType) (void *value, + XID id, + void *cdata); -typedef void (*FindAllRes) (void * /*value */ , - XID /*id */ , - RESTYPE /*type */ , - void * /*cdata */ ); +typedef void (*FindAllRes) (void *value, + XID id, + RESTYPE type, + void *cdata); -typedef Bool (*FindComplexResType) (void * /*value */ , - XID /*id */ , - void * /*cdata */ ); +typedef Bool (*FindComplexResType) (void *value, + XID id, + void *cdata); /* Structure for estimating resource memory usage. Memory usage * consists of space allocated for the resource itself and of @@ -169,16 +169,16 @@ typedef struct { unsigned long refCnt; } ResourceSizeRec, *ResourceSizePtr; -typedef void (*SizeType)(void * /*value*/, - XID /*id*/, - ResourceSizePtr /*size*/); +typedef void (*SizeType)(void *value, + XID id, + ResourceSizePtr size); -extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ , - const char * /*name */ ); +extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType deleteFunc, + const char *name); -typedef void (*FindTypeSubResources)(void * /* value */, - FindAllRes /* func */, - void * /* cdata */); +typedef void (*FindTypeSubResources)(void *value, + FindAllRes func, + void *cdata); extern _X_EXPORT SizeType GetResourceTypeSizeFunc( RESTYPE /*type*/); @@ -203,9 +203,9 @@ extern _X_EXPORT XID FakeClientID(int /*client */ ); #ifdef __APPLE__ #define AddResource Darwin_X_AddResource #endif -extern _X_EXPORT Bool AddResource(XID /*id */ , - RESTYPE /*type */ , - void * /*value */ ); +extern _X_EXPORT Bool AddResource(XID id, + RESTYPE type, + void *value); extern _X_EXPORT void FreeResource(XID /*id */ , RESTYPE /*skipDeleteFuncType */ ); @@ -214,27 +214,27 @@ extern _X_EXPORT void FreeResourceByType(XID /*id */ , RESTYPE /*type */ , Bool /*skipFree */ ); -extern _X_EXPORT Bool ChangeResourceValue(XID /*id */ , - RESTYPE /*rtype */ , - void * /*value */ ); +extern _X_EXPORT Bool ChangeResourceValue(XID id, + RESTYPE rtype, + void *value); -extern _X_EXPORT void FindClientResourcesByType(ClientPtr /*client */ , - RESTYPE /*type */ , - FindResType /*func */ , - void * /*cdata */ ); +extern _X_EXPORT void FindClientResourcesByType(ClientPtr client, + RESTYPE type, + FindResType func, + void *cdata); -extern _X_EXPORT void FindAllClientResources(ClientPtr /*client */ , - FindAllRes /*func */ , - void * /*cdata */ ); +extern _X_EXPORT void FindAllClientResources(ClientPtr client, + FindAllRes func, + void *cdata); /** @brief Iterate through all subresources of a resource. @note The XID argument provided to the FindAllRes function may be 0 for subresources that don't have an XID */ -extern _X_EXPORT void FindSubResources(void * /*resource*/, - RESTYPE /*type*/, - FindAllRes /*func*/, - void * /*cdata*/); +extern _X_EXPORT void FindSubResources(void *resource, + RESTYPE type, + FindAllRes func, + void *cdata); extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ ); diff --git a/xorg-server/include/scrnintstr.h b/xorg-server/include/scrnintstr.h index f6a5ef3aa..024d9e5c2 100644..100755 --- a/xorg-server/include/scrnintstr.h +++ b/xorg-server/include/scrnintstr.h @@ -259,23 +259,23 @@ typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ , int /*major */ , int /*minor */ ); -typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr /*pScreen*/ , - void * /*pTimeout */ , - void * /*pReadmask */ ); +typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen, + void *pTimeout, + void *pReadmask); -typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr /*pScreen*/ , - unsigned long /*result */ , - void * /*pReadMask */ ); +typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr pScreen, + unsigned long result, + void *pReadMask); typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ ); -typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr /*pPixmap */ , - int /*width */ , - int /*height */ , - int /*depth */ , - int /*bitsPerPixel */ , - int /*devKind */ , - void * /*pPixData */ ); +typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr pPixmap, + int width, + int height, + int depth, + int bitsPerPixel, + int devKind, + void *pPixData); typedef PixmapPtr (*GetWindowPixmapProcPtr) (WindowPtr /*pWin */ ); @@ -362,6 +362,96 @@ typedef WindowPtr (*XYToWindowProcPtr)(ScreenPtr pScreen, typedef int (*NameWindowPixmapProcPtr)(WindowPtr, PixmapPtr, CARD32); +/* Wrapping Screen procedures + + There are a few modules in the X server which dynamically add and + remove themselves from various screen procedure call chains. + + For example, the BlockHandler is dynamically modified by: + + * xf86Rotate + * miSprite + * composite + * render (for animated cursors) + + Correctly manipulating this chain is complicated by the fact that + the chain is constructed through a sequence of screen private + structures, each holding the next screen->proc pointer. + + To add a module to a screen->proc chain is fairly simple; just save + the current screen->proc value in the module screen private + and store the module's function in the screen->proc location. + + Removing a screen proc is a bit trickier. It seems like all you + need to do is set the screen->proc pointer back to the value saved + in your screen private. However, if some other module has come + along and wrapped on top of you, then the right place to store the + previous screen->proc value is actually in the wrapping module's + screen private structure(!). Of course, you have no idea what + other module may have wrapped on top, nor could you poke inside + its screen private in any case. + + To make this work, we restrict the unwrapping process to happen + during the invocation of the screen proc itself, and then we + require the screen proc to take some care when manipulating the + screen proc functions pointers. + + The requirements are: + + 1) The screen proc must set the screen->proc pointer back to the + value saved in its screen private before calling outside its + module. + + 2a) If the screen proc wants to be remove itself from the chain, + it must not manipulate screen->proc pointer again before + returning. + + 2b) If the screen proc wants to remain in the chain, it must: + + 2b.1) Re-fetch the screen->proc pointer and store that in + its screen private. This ensures that any changes + to the chain will be preserved. + + 2b.2) Set screen->proc back to itself + + One key requirement here is that these steps must wrap not just + any invocation of the nested screen->proc value, but must nest + essentially any calls outside the current module. This ensures + that other modules can reliably manipulate screen->proc wrapping + using these same rules. + + For example, the animated cursor code in render has two macros, + Wrap and Unwrap. + + #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) + + Unwrap takes the screen private (as), the screen (s) and the + member name (elt), and restores screen->proc to that saved in the + screen private. + + #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) + + Wrap takes the screen private (as), the screen (s), the member + name (elt) and the wrapping function (func). It saves the + current screen->proc value in the screen private, and then sets the + screen->proc to the local wrapping function. + + Within each of these functions, there's a pretty simple pattern: + + Unwrap(as, pScreen, UnrealizeCursor); + + // Do local stuff, including possibly calling down through + // pScreen->UnrealizeCursor + + Wrap(as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor); + + The wrapping block handler is a bit different; it does the Unwrap, + the local operations and then only re-Wraps if the hook is still + required. Unwrap occurrs at the top of each function, just after + entry, and Wrap occurrs at the bottom of each function, just + before returning. + */ + typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; diff --git a/xorg-server/include/window.h b/xorg-server/include/window.h index 175ca5e31..c123728f0 100644..100755 --- a/xorg-server/include/window.h +++ b/xorg-server/include/window.h @@ -72,16 +72,16 @@ struct _Cursor; typedef struct _BackingStore *BackingStorePtr; typedef struct _Window *WindowPtr; -typedef int (*VisitWindowProcPtr) (WindowPtr /*pWin */ , - void * /*data */ ); +typedef int (*VisitWindowProcPtr) (WindowPtr pWin, + void *data); -extern _X_EXPORT int TraverseTree(WindowPtr /*pWin */ , - VisitWindowProcPtr /*func */ , - void * /*data */ ); +extern _X_EXPORT int TraverseTree(WindowPtr pWin, + VisitWindowProcPtr func, + void *data); -extern _X_EXPORT int WalkTree(ScreenPtr /*pScreen */ , - VisitWindowProcPtr /*func */ , - void * /*data */ ); +extern _X_EXPORT int WalkTree(ScreenPtr pScreen, + VisitWindowProcPtr func, + void *data); extern _X_EXPORT Bool CreateRootWindow(ScreenPtr /*pScreen */ ); @@ -108,8 +108,8 @@ extern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ , VisualID /*visual */ , int * /*error */ ); -extern _X_EXPORT int DeleteWindow(void * /*pWin */ , - XID /*wid */ ); +extern _X_EXPORT int DeleteWindow(void *pWin, + XID wid); extern _X_EXPORT int DestroySubwindows(WindowPtr /*pWin */ , ClientPtr /*client */ ); diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h index a1bb62110..a4878fc9e 100644..100755 --- a/xorg-server/include/xkbsrv.h +++ b/xorg-server/include/xkbsrv.h @@ -596,15 +596,15 @@ extern _X_EXPORT void XkbSendCompatMapNotify(DeviceIntPtr /* kbd */ , xkbCompatMapNotify * /* ev */ ); -extern _X_EXPORT void XkbHandleBell(BOOL /* force */ , - BOOL /* eventOnly */ , - DeviceIntPtr /* kbd */ , - CARD8 /* percent */ , - void * /* ctrl */ , - CARD8 /* class */ , - Atom /* name */ , - WindowPtr /* pWin */ , - ClientPtr /* pClient */ +extern _X_EXPORT void XkbHandleBell(BOOL force, + BOOL eventOnly, + DeviceIntPtr kbd, + CARD8 percent, + void *ctrl, + CARD8 class, + Atom name, + WindowPtr pWin, + ClientPtr pClient ); extern _X_EXPORT void XkbSendAccessXNotify(DeviceIntPtr /* kbd */ , |