1706f2543Smrg 2706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 3706f2543Smrg#include <dix-config.h> 4706f2543Smrg#endif 5706f2543Smrg 6706f2543Smrg#ifdef HAVE_XORG_CONFIG_H 7706f2543Smrg#include <xorg-config.h> 8706f2543Smrg#endif 9706f2543Smrg 10706f2543Smrg#include <stdio.h> 11706f2543Smrg#include <X11/X.h> 12706f2543Smrg#include "windowstr.h" 13706f2543Smrg#define XKBSRV_NEED_FILE_FUNCS 14706f2543Smrg#include <xkbsrv.h> 15706f2543Smrg 16706f2543Smrg#include "os.h" 17706f2543Smrg#include "xf86.h" 18706f2543Smrg 19706f2543Smrgint 20706f2543SmrgXkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act) 21706f2543Smrg{ 22706f2543Smrg XkbAnyAction *xf86act = &(act->any); 23706f2543Smrg char msgbuf[XkbAnyActionDataSize+1]; 24706f2543Smrg 25706f2543Smrg if (xf86act->type == XkbSA_XFree86Private) { 26706f2543Smrg memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); 27706f2543Smrg msgbuf[XkbAnyActionDataSize]= '\0'; 28706f2543Smrg if (strcasecmp(msgbuf, "-vmode")==0) 29706f2543Smrg xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); 30706f2543Smrg else if (strcasecmp(msgbuf, "+vmode")==0) 31706f2543Smrg xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); 32706f2543Smrg } 33706f2543Smrg 34706f2543Smrg return 0; 35706f2543Smrg} 36