From 08363c5830bdea34012dcd954b45ccfdc79a3a7e Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 26 Dec 2008 18:38:25 +1100 Subject: Input: Overhaul keyboard initialisation process XkbInitKeyboardDeviceStruct is now the only valid keyboard initialisation: all the details are hidden behind here. This now makes it impossible to supply a core keymap at startup. If dev->key is valid, dev->key->xkbInfo->desc is also valid. Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer --- include/input.h | 16 +++------------- include/xkbsrv.h | 33 +++++++++++---------------------- 2 files changed, 14 insertions(+), 35 deletions(-) (limited to 'include') diff --git a/include/input.h b/include/input.h index cf546e076..db75f6c78 100644 --- a/include/input.h +++ b/include/input.h @@ -53,6 +53,7 @@ SOFTWARE. #include #include #include "window.h" /* for WindowPtr */ +#include "xkbrules.h" #define DEVICE_INIT 0 #define DEVICE_ON 1 @@ -268,11 +269,6 @@ extern _X_EXPORT Bool SetKeySymsMap( KeySymsPtr /*dst*/, KeySymsPtr /*src*/); -extern _X_EXPORT Bool InitKeyClassDeviceStruct( - DeviceIntPtr /*device*/, - KeySymsPtr /*pKeySyms*/, - CARD8 /*pModifiers*/[]); - extern _X_EXPORT Bool InitButtonClassDeviceStruct( DeviceIntPtr /*device*/, int /*numButtons*/, @@ -304,11 +300,6 @@ typedef void (*KbdCtrlProcPtr)( DeviceIntPtr /*device*/, KeybdCtrl * /*ctrl*/); -extern _X_EXPORT Bool InitKbdFeedbackClassDeviceStruct( - DeviceIntPtr /*device*/, - BellProcPtr /*bellProc*/, - KbdCtrlProcPtr /*controlProc*/); - typedef void (*PtrCtrlProcPtr)( DeviceIntPtr /*device*/, PtrCtrl * /*ctrl*/); @@ -363,9 +354,8 @@ extern _X_EXPORT Bool InitPointerDeviceStruct( int /*numAxes*/); extern _X_EXPORT Bool InitKeyboardDeviceStruct( - DevicePtr /*device*/, - KeySymsPtr /*pKeySyms*/, - CARD8 /*pModifiers*/[], + DeviceIntPtr /*device*/, + XkbRMLVOSet * /*rmlvo*/, BellProcPtr /*bellProc*/, KbdCtrlProcPtr /*controlProc*/); diff --git a/include/xkbsrv.h b/include/xkbsrv.h index af87d8fa5..a28967c22 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -54,6 +54,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "xkbstr.h" +#include "xkbrules.h" #include "inputstr.h" typedef struct _XkbInterest { @@ -870,31 +871,18 @@ extern _X_EXPORT void XkbClearAllLatchesAndLocks( XkbEventCausePtr /* cause */ ); +extern _X_EXPORT void XkbGetRulesDflts( + XkbRMLVOSet * /* rmlvo */ +); + extern _X_EXPORT void XkbSetRulesDflts( - char * /* rulesFile */, - char * /* model */, - char * /* layout */, - char * /* variant */, - char * /* options */ + XkbRMLVOSet * /* rmlvo */ ); extern _X_EXPORT void XkbDeleteRulesDflts( void ); -extern _X_EXPORT void XkbInitDevice( - DeviceIntPtr /* pXDev */ -); - -extern _X_EXPORT Bool XkbInitKeyboardDeviceStruct( - DeviceIntPtr /* pXDev */, - XkbComponentNamesPtr /* pNames */, - KeySymsPtr /* pSyms */, - CARD8 /* pMods */[], - BellProcPtr /* bellProc */, - KbdCtrlProcPtr /* ctrlProc */ -); - extern _X_EXPORT int SProcXkbDispatch( ClientPtr /* client */ ); @@ -922,10 +910,6 @@ extern _X_EXPORT Status XkbChangeKeycodeRange( XkbChangesPtr /* changes */ ); -extern _X_EXPORT int XkbFinishDeviceInit( - DeviceIntPtr /* pXDev */ -); - extern _X_EXPORT void XkbFreeSrvLedInfo( XkbSrvLedInfoPtr /* sli */ ); @@ -1021,6 +1005,11 @@ extern _X_EXPORT Bool XkbDDXNamesFromRules( XkbComponentNamesPtr /* names */ ); +extern _X_EXPORT XkbDescPtr XkbCompileKeymap( + DeviceIntPtr /* dev */, + XkbRMLVOSet * /* rmlvo */ +); + _XFUNCPROTOEND #define XkbAtomGetString(s) NameForAtom(s) -- cgit v1.2.3