mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Introduce dixLookupFontable for "FONT or GC" parameters.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
2eab697adb
commit
35761d5f81
5 changed files with 33 additions and 48 deletions
|
|
@ -92,6 +92,7 @@ Author: Adobe Systems Incorporated
|
|||
#include "windowstr.h"
|
||||
#include "dixstruct.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "scrnintstr.h"
|
||||
#define XK_LATIN1
|
||||
#include <X11/keysymdef.h>
|
||||
|
|
@ -235,6 +236,23 @@ dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access)
|
|||
return (rc == BadValue) ? BadGC : rc;
|
||||
}
|
||||
|
||||
int
|
||||
dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
|
||||
{
|
||||
int rc;
|
||||
GC *pGC;
|
||||
client->errorValue = id; /* EITHER font or gc */
|
||||
rc = dixLookupResourceByType((pointer *) pFont, id, RT_FONT, client, access);
|
||||
if (rc != BadValue)
|
||||
return rc;
|
||||
rc = dixLookupResourceByType((pointer *) &pGC, id, RT_GC, client, access);
|
||||
if (rc == BadValue)
|
||||
return BadFont;
|
||||
if (rc == Success)
|
||||
*pFont = pGC->font;
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue