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 <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone
2008-12-26 18:38:25 +11:00
parent 40877c6680
commit 08363c5830
10 changed files with 223 additions and 554 deletions

View File

@@ -53,6 +53,7 @@ SOFTWARE.
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#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*/);