void XFixesExtensionInit(void) { ExtensionEntry *extEntry; XFixesClientPrivateIndex = AllocateClientPrivateIndex (); if (!AllocateClientPrivate (XFixesClientPrivateIndex, sizeof (XFixesClientRec))) return; if (!AddCallback (&ClientStateCallback, XFixesClientCallback, 0)) return; if (XFixesSelectionInit() && XFixesCursorInit () && XFixesRegionInit () && (extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents, XFixesNumberErrors, ProcXFixesDispatch, SProcXFixesDispatch, XFixesResetProc, StandardMinorOpcode)) != 0) { XFixesReqCode = (unsigned char)extEntry->base; XFixesEventBase = extEntry->eventBase; XFixesErrorBase = extEntry->errorBase; EventSwapVector[XFixesEventBase + XFixesSelectionNotify] = (EventSwapPtr) SXFixesSelectionNotifyEvent; EventSwapVector[XFixesEventBase + XFixesCursorNotify] = (EventSwapPtr) SXFixesCursorNotifyEvent; } }
void XFree86MiscExtensionInit(void) { ExtensionEntry* extEntry; DEBUG_P("XFree86MiscExtensionInit"); if (!xf86GetModInDevEnabled()) return; /* * Allocate a client private index to hold the client's version * information. */ if (MiscGeneration != serverGeneration) { MiscClientPrivateIndex = AllocateClientPrivateIndex(); /* * Allocate 0 length, and use the private to hold a pointer to our * MiscPrivRec. */ if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) { ErrorF("XFree86MiscExtensionInit: " "AllocateClientPrivate failed\n"); return; } MiscGeneration = serverGeneration; } if ( (extEntry = AddExtension(XF86MISCNAME, XF86MiscNumberEvents, XF86MiscNumberErrors, ProcXF86MiscDispatch, SProcXF86MiscDispatch, XF86MiscResetProc, StandardMinorOpcode))) { #if 0 XF86MiscReqCode = (unsigned char)extEntry->base; #endif miscErrorBase = extEntry->errorBase; } }
void XFree86DGAExtensionInit(INITARGS) { ExtensionEntry* extEntry; if ((extEntry = AddExtension(XF86DGANAME, XF86DGANumberEvents, XF86DGANumberErrors, ProcXDGADispatch, SProcXDGADispatch, XDGAResetProc, StandardMinorOpcode))) { int i; for(i = 0; i < MAXSCREENS; i++) DGAClients[i] = NULL; DGAReqCode = (unsigned char)extEntry->base; DGAErrorBase = extEntry->errorBase; DGAEventBase = extEntry->eventBase; for (i = KeyPress; i <= MotionNotify; i++) SetCriticalEvent (DGAEventBase + i); } /* * Allocate a client private index to hold the client's version * information. */ if (DGAGeneration != serverGeneration) { DGAClientPrivateIndex = AllocateClientPrivateIndex(); /* * Allocate 0 length, and use the private to hold a pointer to * our DGAPrivRec. */ if (!AllocateClientPrivate(DGAClientPrivateIndex, 0)) { ErrorF("XFree86DGAExtensionInit: AllocateClientPrivate failed\n"); return; } DGAGeneration = serverGeneration; } }
void CompositeExtensionInit (void) { ExtensionEntry *extEntry; int s; CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow); if (!CompositeClientWindowType) return; CompositeClientSubwindowsType = CreateNewResourceType (FreeCompositeClientSubwindows); if (!CompositeClientSubwindowsType) return; CompositeClientOverlayType = CreateNewResourceType (FreeCompositeClientOverlay); if (!CompositeClientOverlayType) return; CompositeClientPrivateIndex = AllocateClientPrivateIndex (); if (!AllocateClientPrivate (CompositeClientPrivateIndex, sizeof (CompositeClientRec))) return; if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0)) return; extEntry = AddExtension (COMPOSITE_NAME, 0, 0, ProcCompositeDispatch, SProcCompositeDispatch, CompositeResetProc, StandardMinorOpcode); if (!extEntry) return; CompositeReqCode = (CARD8) extEntry->base; for (s = 0; s < screenInfo.numScreens; s++) if (!compScreenInit (screenInfo.screens[s])) return; miRegisterRedirectBorderClipProc (compSetRedirectBorderClip, compGetRedirectBorderClip); }
void DamageExtensionInit(void) { ExtensionEntry *extEntry; int s; for (s = 0; s < screenInfo.numScreens; s++) DamageSetup (screenInfo.screens[s]); DamageExtType = CreateNewResourceType (FreeDamageExt); if (!DamageExtType) return; DamageExtWinType = CreateNewResourceType (FreeDamageExtWin); if (!DamageExtWinType) return; DamageClientPrivateIndex = AllocateClientPrivateIndex (); if (!AllocateClientPrivate (DamageClientPrivateIndex, sizeof (DamageClientRec))) return; if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0)) return; if ((extEntry = AddExtension(DAMAGE_NAME, XDamageNumberEvents, XDamageNumberErrors, ProcDamageDispatch, SProcDamageDispatch, DamageResetProc, StandardMinorOpcode)) != 0) { DamageReqCode = (unsigned char)extEntry->base; DamageEventBase = extEntry->eventBase; DamageErrorBase = extEntry->errorBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; } }