diff options
Diffstat (limited to 'xkb/xkbtext.c')
-rw-r--r-- | xkb/xkbtext.c | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index 4983e2b9e..d08c91589 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -40,10 +40,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include <X11/extensions/XKBstr.h> +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include <xkbsrv.h> -#include <X11/extensions/XKBgeom.h> +#include "xkbgeom.h" /***====================================================================***/ @@ -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); |