summaryrefslogtreecommitdiff
path: root/xkb/xkbtext.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-02-03 23:43:18 +1100
committerDaniel Stone <daniel@fooishbar.org>2008-02-17 22:52:07 +0200
commit1332343910a1880854bae21a790cff198855cd24 (patch)
tree0cc6b9746171f7eea6ee5b122cebd829addfd928 /xkb/xkbtext.c
parent534fc5140b039a8c98ab715d0a6740d513b41209 (diff)
XKB: Remove usage of client-side types
Since we're no longer sharing with Xlib, don't pass Displays and XPointers everywhere.
Diffstat (limited to 'xkb/xkbtext.c')
-rw-r--r--xkb/xkbtext.c56
1 files changed, 27 insertions, 29 deletions
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index 1520a9f58..d08c91589 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -69,11 +69,11 @@ char *rtrn;
/***====================================================================***/
char *
-XkbAtomText(Display *dpy,Atom atm,unsigned format)
+XkbAtomText(Atom atm,unsigned format)
{
char *rtrn,*tmp;
- tmp= XkbAtomGetString(dpy,atm);
+ tmp= XkbAtomGetString(atm);
if (tmp!=NULL) {
int len;
len= strlen(tmp)+1;
@@ -101,7 +101,7 @@ char *rtrn,*tmp;
/***====================================================================***/
char *
-XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format)
+XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format)
{
register int len;
register Atom *vmodNames;
@@ -116,7 +116,7 @@ char numBuf[20];
if (ndx>=XkbNumVirtualMods)
tmp= "illegal";
else if (vmodNames&&(vmodNames[ndx]!=None))
- tmp= XkbAtomGetString(dpy,vmodNames[ndx]);
+ tmp= XkbAtomGetString(vmodNames[ndx]);
if (tmp==NULL)
sprintf(tmp=numBuf,"%d",ndx);
@@ -135,8 +135,7 @@ char numBuf[20];
}
char *
-XkbVModMaskText( Display * dpy,
- XkbDescPtr xkb,
+XkbVModMaskText( XkbDescPtr xkb,
unsigned modMask,
unsigned mask,
unsigned format)
@@ -163,7 +162,7 @@ char *str,buf[BUFFER_SIZE];
char *tmp;
for (i=0,bit=1;i<XkbNumVirtualMods;i++,bit<<=1) {
if (mask&bit) {
- tmp= XkbVModIndexText(dpy,xkb,i,format);
+ tmp= XkbVModIndexText(xkb,i,format);
len= strlen(tmp)+1+(str==buf?0:1);
if (format==XkbCFile)
len+= 4;
@@ -667,13 +666,13 @@ register int len;
/*ARGSUSED*/
static Bool
-CopyNoActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
+CopyNoActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int*sz)
{
return True;
}
static Bool
-CopyModActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyModActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int* sz)
{
XkbModAction * act;
@@ -686,7 +685,7 @@ unsigned tmp;
TryCopyStr(buf,"modMapMods",sz);
else if (act->real_mods || tmp) {
TryCopyStr(buf,
- XkbVModMaskText(dpy,xkb,act->real_mods,tmp,XkbXKBFile),
+ XkbVModMaskText(xkb,act->real_mods,tmp,XkbXKBFile),
sz);
}
else TryCopyStr(buf,"none",sz);
@@ -701,7 +700,7 @@ unsigned tmp;
/*ARGSUSED*/
static Bool
-CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyGroupActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbGroupAction * act;
@@ -726,7 +725,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyMovePtrArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
{
XkbPtrAction * act;
int x,y;
@@ -751,7 +750,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyPtrBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
{
XkbPtrBtnAction * act;
char tbuf[32];
@@ -785,7 +784,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopySetPtrDfltArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbPtrDfltAction * act;
@@ -803,7 +802,7 @@ char tbuf[32];
}
static Bool
-CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyISOLockArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
{
XkbISOAction * act;
char tbuf[64];
@@ -831,7 +830,7 @@ char tbuf[64];
TryCopyStr(buf,"+",sz);
}
if (tmp)
- TryCopyStr(buf,XkbVModMaskText(dpy,xkb,0,tmp,XkbXKBFile),sz);
+ TryCopyStr(buf,XkbVModMaskText(xkb,0,tmp,XkbXKBFile),sz);
}
else TryCopyStr(buf,"none",sz);
}
@@ -865,7 +864,7 @@ char tbuf[64];
/*ARGSUSED*/
static Bool
-CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopySwitchScreenArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbSwitchScreenAction * act;
@@ -884,7 +883,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,
+CopySetLockControlsArgs(XkbDescPtr xkb,XkbAction *action,
char *buf,int *sz)
{
XkbCtrlsAction * act;
@@ -971,7 +970,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyActionMessageArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbMessageAction * act;
@@ -998,7 +997,7 @@ char tbuf[32];
}
static Bool
-CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyRedirectKeyArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbRedirectKeyAction * act;
@@ -1022,19 +1021,19 @@ unsigned vmods,vmods_mask;
return True;
if ((act->mods_mask==XkbAllModifiersMask)&&
(vmods_mask==XkbAllVirtualModsMask)) {
- tmp= XkbVModMaskText(dpy,xkb,act->mods,vmods,XkbXKBFile);
+ tmp= XkbVModMaskText(xkb,act->mods,vmods,XkbXKBFile);
TryCopyStr(buf,",mods=",sz);
TryCopyStr(buf,tmp,sz);
}
else {
if ((act->mods_mask&act->mods)||(vmods_mask&vmods)) {
- tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&act->mods,
+ tmp= XkbVModMaskText(xkb,act->mods_mask&act->mods,
vmods_mask&vmods,XkbXKBFile);
TryCopyStr(buf,",mods= ",sz);
TryCopyStr(buf,tmp,sz);
}
if ((act->mods_mask&(~act->mods))||(vmods_mask&(~vmods))) {
- tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&(~act->mods),
+ tmp= XkbVModMaskText(xkb,act->mods_mask&(~act->mods),
vmods_mask&(~vmods),XkbXKBFile);
TryCopyStr(buf,",clearMods= ",sz);
TryCopyStr(buf,tmp,sz);
@@ -1045,7 +1044,7 @@ unsigned vmods,vmods_mask;
/*ARGSUSED*/
static Bool
-CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,
+CopyDeviceBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,
int *sz)
{
XkbDeviceBtnAction * act;
@@ -1078,7 +1077,7 @@ char tbuf[32];
/*ARGSUSED*/
static Bool
-CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
+CopyOtherArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz)
{
XkbAnyAction * act;
char tbuf[32];
@@ -1096,7 +1095,6 @@ char tbuf[32];
}
typedef Bool (*actionCopy)(
- Display * /* dpy */,
XkbDescPtr /* xkb */,
XkbAction * /* action */,
char * /* buf */,
@@ -1128,7 +1126,7 @@ static actionCopy copyActionArgs[XkbSA_NumActions] = {
#define ACTION_SZ 256
char *
-XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format)
+XkbActionText(XkbDescPtr xkb,XkbAction *action,unsigned format)
{
char buf[ACTION_SZ],*tmp;
int sz;
@@ -1145,8 +1143,8 @@ int sz;
sprintf(buf,"%s(",XkbActionTypeText(action->type,XkbXKBFile));
sz= ACTION_SZ-strlen(buf)+2; /* room for close paren and NULL */
if (action->type<(unsigned)XkbSA_NumActions)
- (*copyActionArgs[action->type])(dpy,xkb,action,buf,&sz);
- else CopyOtherArgs(dpy,xkb,action,buf,&sz);
+ (*copyActionArgs[action->type])(xkb,action,buf,&sz);
+ else CopyOtherArgs(xkb,action,buf,&sz);
TryCopyStr(buf,")",&sz);
}
tmp= tbGetBuffer(strlen(buf)+1);