本文整理汇总了C++中dixLookupPrivate函数的典型用法代码示例。如果您正苦于以下问题:C++ dixLookupPrivate函数的具体用法?C++ dixLookupPrivate怎么用?C++ dixLookupPrivate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dixLookupPrivate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VGAarbiterCreateGC
static Bool
VGAarbiterCreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr)dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey);
Bool ret;
SCREEN_PROLOG(CreateGC);
ret = (*pScreen->CreateGC)(pGC);
GC_WRAP(pGC);
SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC);
return ret;
}
示例2: ClientGetPolicyRec
ClientPolicyPtr
ClientGetPolicyRec(ClientPtr client)
{
ClientPolicyPtr rec;
if (!client)
rec = NULL;
else {
rec = (ClientPolicyPtr)dixLookupPrivate(&client->devPrivates,
ClientPrivateKey);
}
return rec;
}
示例3: VGAarbiterSwitchMode
static Bool
VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags)
{
Bool val;
ScreenPtr pScreen = screenInfo.screens[index];
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
&pScreen->devPrivates, VGAarbiterScreenKey);
DPRINT_S("VGAarbiterSwitchMode",index);
VGAGet();
val = (*pScreenPriv->SwitchMode)(index, mode, flags);
VGAPut();
return val;
}
示例4: VGAarbiterEnterVT
static Bool
VGAarbiterEnterVT(int index, int flags)
{
Bool val;
ScreenPtr pScreen = screenInfo.screens[index];
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
&pScreen->devPrivates, VGAarbiterScreenKey);
DPRINT_S("VGAarbiterEnterVT",index);
VGAGet();
val = (*pScreenPriv->EnterVT)(index, flags);
VGAPut();
return val;
}
示例5: VGAarbiterSwitchMode
static Bool
VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
{
Bool val;
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
val = (*pScreenPriv->SwitchMode) (pScrn, mode);
VGAPut();
return val;
}
示例6: glamor_egl_exchange_buffers
_X_EXPORT void
glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(front->drawable.pScreen);
struct glamor_egl_screen_private *glamor_egl =
glamor_egl_get_screen_private(scrn);
EGLImageKHR old_front_image;
EGLImageKHR new_front_image;
glamor_pixmap_exchange_fbos(front, back);
new_front_image =
dixLookupPrivate(&back->devPrivates, glamor_egl_pixmap_private_key);
old_front_image =
dixLookupPrivate(&front->devPrivates, glamor_egl_pixmap_private_key);
dixSetPrivate(&front->devPrivates, glamor_egl_pixmap_private_key,
new_front_image);
dixSetPrivate(&back->devPrivates, glamor_egl_pixmap_private_key,
old_front_image);
glamor_set_pixmap_type(front, GLAMOR_TEXTURE_DRM);
glamor_set_pixmap_type(back, GLAMOR_TEXTURE_DRM);
glamor_egl->front_image = new_front_image;
}
示例7: xf86_reload_cursors
void
xf86_reload_cursors(ScreenPtr screen)
{
ScrnInfoPtr scrn;
xf86CrtcConfigPtr xf86_config;
xf86CursorInfoPtr cursor_info;
CursorPtr cursor;
int x, y;
xf86CursorScreenPtr cursor_screen_priv;
/* initial mode setting will not have set a screen yet.
May be called before the devices are initialised.
*/
if (!screen || !inputInfo.pointer)
return;
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
xf86CursorScreenKey);
/* return if HW cursor is inactive, to avoid displaying two cursors */
if (!cursor_screen_priv || !cursor_screen_priv->isUp)
return;
scrn = xf86ScreenToScrn(screen);
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
/* make sure the cursor code has been initialized */
cursor_info = xf86_config->cursor_info;
if (!cursor_info)
return;
cursor = xf86_config->cursor;
GetSpritePosition(inputInfo.pointer, &x, &y);
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
(*cursor_info->HideCursor) (scrn);
if (cursor) {
void *src =
dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey,
screen);
#ifdef ARGB_CURSOR
if (cursor->bits->argb && cursor_info->LoadCursorARGB)
(*cursor_info->LoadCursorARGB) (scrn, cursor);
else if (src)
#endif
(*cursor_info->LoadCursorImage) (scrn, src);
x += scrn->frameX0 + cursor_screen_priv->HotX;
y += scrn->frameY0 + cursor_screen_priv->HotY;
(*cursor_info->SetCursorPosition) (scrn, x, y);
}
}
示例8: XvDestroyPixmap
static Bool
XvDestroyPixmap(PixmapPtr pPix)
{
Bool status;
ScreenPtr pScreen;
XvScreenPtr pxvs;
XvAdaptorPtr pa;
int na;
XvPortPtr pp;
int np;
pScreen = pPix->drawable.pScreen;
SCREEN_PROLOGUE(pScreen, DestroyPixmap);
pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey);
/* CHECK TO SEE IF THIS PORT IS IN USE */
pa = pxvs->pAdaptors;
na = pxvs->nAdaptors;
while (na--)
{
np = pa->nPorts;
pp = pa->pPorts;
while (np--)
{
if (pp->pDraw == (DrawablePtr)pPix)
{
XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
(void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
pp->pDraw = NULL;
pp->client = NULL;
pp->time = currentTime;
}
pp++;
}
pa++;
}
status = (* pScreen->DestroyPixmap)(pPix);
SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap);
return status;
}
示例9: SecurityClientState
static void
SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
{
NewClientInfoRec *pci = calldata;
SecurityStateRec *state;
SecurityAuthorizationPtr pAuth;
int rc;
state = dixLookupPrivate(&pci->client->devPrivates, stateKey);
switch (pci->client->clientState) {
case ClientStateInitial:
state->trustLevel = XSecurityClientTrusted;
state->authId = None;
state->haveState = TRUE;
break;
case ClientStateRunning:
state->authId = AuthorizationIDOfClient(pci->client);
rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
SecurityAuthorizationResType, serverClient,
DixGetAttrAccess);
if (rc == Success) {
/* it is a generated authorization */
pAuth->refcnt++;
if (pAuth->refcnt == 1 && pAuth->timer)
TimerCancel(pAuth->timer);
state->trustLevel = pAuth->trustLevel;
}
break;
case ClientStateGone:
case ClientStateRetained:
rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
SecurityAuthorizationResType, serverClient,
DixGetAttrAccess);
if (rc == Success) {
/* it is a generated authorization */
pAuth->refcnt--;
if (pAuth->refcnt == 0)
SecurityStartAuthorizationTimer(pAuth);
}
break;
default:
break;
}
}
示例10: VGAarbiterLeaveVT
static void
VGAarbiterLeaveVT(int index, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = screenInfo.screens[index];
VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate(
&pScreen->devPrivates, VGAarbiterScreenKey);
VGAGet(pScreen);
pScrn->LeaveVT = pScreenPriv->LeaveVT;
(*pScreenPriv->LeaveVT)(index, flags);
pScreenPriv->LeaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = VGAarbiterLeaveVT;
VGAPut();
}
示例11: VGAarbiterLeaveVT
static void
VGAarbiterLeaveVT(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
VGAarbiterScreenPtr pScreenPriv =
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
VGAarbiterScreenKey);
VGAGet(pScreen);
pScrn->LeaveVT = pScreenPriv->LeaveVT;
(*pScreenPriv->LeaveVT) (pScrn);
pScreenPriv->LeaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = VGAarbiterLeaveVT;
VGAPut();
}
示例12: XAAEnterVT
static Bool
XAAEnterVT(int index, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[index];
Bool ret;
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
pScrn->EnterVT = pScreenPriv->EnterVT;
ret = ((*pScreenPriv->EnterVT)(index, flags));
pScreenPriv->EnterVT = pScrn->EnterVT;
pScrn->EnterVT = XAAEnterVT;
return ret;
}
示例13: miDCPutBits
static void
miDCPutBits(DrawablePtr pDrawable,
GCPtr sourceGC,
GCPtr maskGC,
int x_org,
int y_org,
unsigned w, unsigned h, unsigned long source, unsigned long mask)
{
miDCScreenPtr pScreenPriv = dixLookupPrivate(&pDrawable->pScreen->devPrivates, miDCScreenKey);
ChangeGCVal gcval;
int x, y;
if (sourceGC->fgPixel != source) {
gcval.val = source;
ChangeGC(NullClient, sourceGC, GCForeground, &gcval);
}
if (sourceGC->serialNumber != pDrawable->serialNumber)
ValidateGC(pDrawable, sourceGC);
if (sourceGC->miTranslate) {
x = pDrawable->x + x_org;
y = pDrawable->y + y_org;
}
else {
x = x_org;
y = y_org;
}
(*sourceGC->ops->PushPixels) (sourceGC, pScreenPriv->sourceBits, pDrawable, w, h,
x, y);
if (maskGC->fgPixel != mask) {
gcval.val = mask;
ChangeGC(NullClient, maskGC, GCForeground, &gcval);
}
if (maskGC->serialNumber != pDrawable->serialNumber)
ValidateGC(pDrawable, maskGC);
if (maskGC->miTranslate) {
x = pDrawable->x + x_org;
y = pDrawable->y + y_org;
}
else {
x = x_org;
y = y_org;
}
(*maskGC->ops->PushPixels) (maskGC, pScreenPriv->maskBits, pDrawable, w, h, x, y);
}
示例14: xf86RegisterFreeBoxCallback
Bool
xf86RegisterFreeBoxCallback(ScreenPtr pScreen,
FreeBoxCallbackProcPtr FreeBoxCallback,
void *devPriv)
{
FBManagerFuncsPtr funcs;
if (xf86FBManagerKey == NULL)
return FALSE;
if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates,
xf86FBManagerKey)))
return FALSE;
return (*funcs->RegisterFreeBoxCallback) (pScreen, FreeBoxCallback,
devPriv);
}
示例15: exaXorgCloseScreen
static Bool
exaXorgCloseScreen (int i, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr)
dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey);
pScreen->CloseScreen = pScreenPriv->SavedCloseScreen;
pScrn->EnableDisableFBAccess = pScreenPriv->SavedEnableDisableFBAccess;
xfree (pScreenPriv->options);
xfree (pScreenPriv);
return pScreen->CloseScreen (i, pScreen);
}