Example #1
0
static int
ProcAppleDRIDispatch (
    register ClientPtr client
)
{
    REQUEST(xReq);

    switch (stuff->data)
    {
    case X_AppleDRIQueryVersion:
        return ProcAppleDRIQueryVersion(client);
    case X_AppleDRIQueryDirectRenderingCapable:
        return ProcAppleDRIQueryDirectRenderingCapable(client);
    }

    if (!LocalClient(client))
        return DRIErrorBase + AppleDRIClientNotLocal;

    switch (stuff->data)
    {
    case X_AppleDRIAuthConnection:
        return ProcAppleDRIAuthConnection(client);
    case X_AppleDRICreateSurface:
        return ProcAppleDRICreateSurface(client);
    case X_AppleDRIDestroySurface:
        return ProcAppleDRIDestroySurface(client);
    case X_AppleDRICreatePixmap:
	return ProcAppleDRICreatePixmap(client);
    case X_AppleDRIDestroyPixmap:
	return ProcAppleDRIDestroyPixmap(client);

    default:
        return BadRequest;
    }
}
Example #2
0
static int
SProcAppleDRICreateSurface(register ClientPtr client)
{
    REQUEST(xAppleDRICreateSurfaceReq);
    swaps(&stuff->length);
    swapl(&stuff->screen);
    swapl(&stuff->drawable);
    swapl(&stuff->client_id);
    return ProcAppleDRICreateSurface(client);
}