int count;
} ScreenSaverSuspensionRec;
-static int ScreenSaverFreeSuspend(pointer /*value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeSuspend(void *value, XID id);
/*
* each screen has a list of clients requesting
CARD32 mask;
} ScreenSaverEventRec;
-static int ScreenSaverFreeEvents(pointer /* value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeEvents(void * value, XID id);
-static Bool setEventMask(ScreenPtr /* pScreen */ ,
- ClientPtr /* client */ ,
- unsigned long /* mask */
- );
+static Bool setEventMask(ScreenPtr pScreen,
+ ClientPtr client,
+ unsigned long mask);
-static unsigned long getEventMask(ScreenPtr /* pScreen */ ,
- ClientPtr /* client */
- );
+static unsigned long getEventMask(ScreenPtr pScreen,
+ ClientPtr client);
/*
* when a client sets the screen saver attributes, a resource is
unsigned long *values;
} ScreenSaverAttrRec, *ScreenSaverAttrPtr;
-static int ScreenSaverFreeAttr(pointer /* value */ ,
- XID /* id */
- );
+static int ScreenSaverFreeAttr(void *value, XID id);
-static void FreeAttrs(ScreenSaverAttrPtr /* pAttr */
- );
+static void FreeAttrs(ScreenSaverAttrPtr pAttr);
-static void FreeScreenAttr(ScreenSaverAttrPtr /* pAttr */
- );
+static void FreeScreenAttr(ScreenSaverAttrPtr pAttr);
static void
- SendScreenSaverNotify(ScreenPtr /* pScreen */ ,
- int /* state */ ,
- Bool /* forced */
- );
+SendScreenSaverNotify(ScreenPtr pScreen,
+ int state,
+ Bool forced);
typedef struct _ScreenSaverScreenPrivate {
ScreenSaverEventPtr events;
Colormap installedMap;
} ScreenSaverScreenPrivateRec, *ScreenSaverScreenPrivatePtr;
-static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr /* pScreen */
- );
+static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr pScreen);
static DevPrivateKeyRec ScreenPrivateKeyRec;
pEv->client = client;
pEv->screen = pScreen;
pEv->resource = FakeClientID(client->index);
- if (!AddResource(pEv->resource, SaverEventType, (pointer) pEv))
+ if (!AddResource(pEv->resource, SaverEventType, (void *) pEv))
return FALSE;
}
pEv->mask = mask;
}
static int
-ScreenSaverFreeEvents(pointer value, XID id)
+ScreenSaverFreeEvents(void *value, XID id)
{
ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value;
ScreenPtr pScreen = pOld->screen;
}
static int
-ScreenSaverFreeAttr(pointer value, XID id)
+ScreenSaverFreeAttr(void *value, XID id)
{
ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value;
ScreenPtr pScreen = pOldAttr->screen;
}
static int
-ScreenSaverFreeSuspend(pointer value, XID id)
+ScreenSaverFreeSuspend(void *value, XID id)
{
ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value;
ScreenSaverSuspensionPtr *prev, this;
DeviceIntPtr dev;
UpdateCurrentTimeIf();
nt_list_for_each_entry(dev, inputInfo.devices, next)
- lastDeviceEventTime[dev->id] = currentTime;
+ NoticeTime(dev, currentTime);
SetScreenSaverTimer();
}
}
int rc;
if (pPriv && pPriv->installedMap != None) {
- rc = dixLookupResourceByType((pointer *) &pCmap, pPriv->installedMap,
+ rc = dixLookupResourceByType((void **) &pCmap, pPriv->installedMap,
RT_COLORMAP, serverClient,
DixUninstallAccess);
if (rc == Success)
mask |= CWBorderPixmap;
}
if (pAttr->pCursor) {
+ CursorPtr cursor;
if (!pWin->optional)
if (!MakeWindowOptional(pWin)) {
FreeResource(pWin->drawable.id, RT_NONE);
return FALSE;
}
- pAttr->pCursor->refcnt++;
+ cursor = RefCursor(pAttr->pCursor);
if (pWin->optional->cursor)
FreeCursor(pWin->optional->cursor, (Cursor) 0);
- pWin->optional->cursor = pAttr->pCursor;
+ pWin->optional->cursor = cursor;
pWin->cursorIsNone = FALSE;
CheckWindowOptionalNeed(pWin);
mask |= CWCursor;
if (i < numInstalled)
return TRUE;
- result = dixLookupResourceByType((pointer *) &pCmap, wantMap, RT_COLORMAP,
+ result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP,
serverClient, DixInstallAccess);
if (result != Success)
return TRUE;
pPriv = GetScreenPrivate(pDraw->pScreen);
UpdateCurrentTime();
- lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds;
+ lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds;
rep = (xScreenSaverQueryInfoReply) {
.type = X_Reply,
if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) {
fOK = FALSE;
for (idepth = 0; idepth < pScreen->numDepths; idepth++) {
- pDepth = (DepthPtr) & pScreen->allowedDepths[idepth];
+ pDepth = (DepthPtr) &pScreen->allowedDepths[idepth];
if ((depth == pDepth->depth) || (depth == 0)) {
for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) {
if (visual == pDepth->vids[ivisual]) {
}
else {
ret =
- dixLookupResourceByType((pointer *) &pPixmap, pixID,
+ dixLookupResourceByType((void **) &pPixmap, pixID,
RT_PIXMAP, client, DixReadAccess);
if (ret == Success) {
if ((pPixmap->drawable.depth != depth) ||
}
else {
ret =
- dixLookupResourceByType((pointer *) &pPixmap, pixID,
+ dixLookupResourceByType((void **) &pPixmap, pixID,
RT_PIXMAP, client, DixReadAccess);
if (ret == Success) {
if ((pPixmap->drawable.depth != depth) ||
break;
case CWColormap:
cmap = (Colormap) * pVlist;
- ret = dixLookupResourceByType((pointer *) &pCmap, cmap, RT_COLORMAP,
+ ret = dixLookupResourceByType((void **) &pCmap, cmap, RT_COLORMAP,
client, DixUseAccess);
if (ret != Success) {
client->errorValue = cmap;
*values++ = None;
}
else {
- ret = dixLookupResourceByType((pointer *) &pCursor, cursorID,
+ ret = dixLookupResourceByType((void **) &pCursor, cursorID,
RT_CURSOR, client, DixUseAccess);
if (ret != Success) {
client->errorValue = cursorID;
goto PatchUp;
}
- pCursor->refcnt++;
- pAttr->pCursor = pCursor;
+ pAttr->pCursor = RefCursor(pCursor);
pAttr->mask &= ~CWCursor;
}
break;
FreeScreenAttr(pPriv->attr);
pPriv->attr = pAttr;
pAttr->resource = FakeClientID(client->index);
- if (!AddResource(pAttr->resource, AttrType, (pointer) pAttr))
+ if (!AddResource(pAttr->resource, AttrType, (void *) pAttr))
return BadAlloc;
return Success;
PatchUp:
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
- status = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ status = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (status != Success)
return (status == BadValue) ? BadDrawable : status;
pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
- status = dixLookupResourceByType((pointer *) &backPix, tmp,
+ status = dixLookupResourceByType((void **) &backPix, tmp,
XRT_PIXMAP, client,
DixReadAccess);
if (status != Success)
pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1));
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
- status = dixLookupResourceByType((pointer *) &bordPix, tmp,
+ status = dixLookupResourceByType((void **) &bordPix, tmp,
XRT_PIXMAP, client,
DixReadAccess);
if (status != Success)
cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1));
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
- status = dixLookupResourceByType((pointer *) &cmap, tmp,
+ status = dixLookupResourceByType((void **) &cmap, tmp,
XRT_COLORMAP, client,
DixReadAccess);
if (status != Success)
PanoramiXRes *draw;
int rc, i;
- rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (rc != Success)
return (rc == BadValue) ? BadDrawable : rc;
this->count = 1;
this->clientResource = FakeClientID(client->index);
- if (!AddResource(this->clientResource, SuspendType, (pointer) this)) {
+ if (!AddResource(this->clientResource, SuspendType, (void *) this)) {
free(this);
return BadAlloc;
}