summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-04-16 19:15:30 +0300
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 15:08:55 +1100
commitf062e90a95f9b7ae5458ef2100615e8ace9b66a7 (patch)
tree3a75bce36e2a95e085a268186c8a268bddd9bccf /include
parentcf6a2fc2bd94b392cfea120444d5e032d26f1d37 (diff)
Input: Remove modifierKeyMap
Since modifierKeyMap is generated from modifierMap, just remove it, and only generate it when we need to send the modifier map to the client. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r--include/exevents.h10
-rw-r--r--include/input.h22
-rw-r--r--include/inputstr.h2
3 files changed, 16 insertions, 18 deletions
diff --git a/include/exevents.h b/include/exevents.h
index 2504baf04..8ddfbf9e8 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -31,6 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define EXEVENTS_H
#include <X11/extensions/XIproto.h>
+#include "inputstr.h"
/**
* Attached to the devPrivates of each client. Specifies the version number as
@@ -136,15 +137,6 @@ extern _X_EXPORT int SetButtonMapping (
int /* nElts */,
BYTE * /* map */);
-extern _X_EXPORT int SetModifierMapping(
- ClientPtr /* client */,
- DeviceIntPtr /* dev */,
- int /* len */,
- int /* rlen */,
- int /* numKeyPerModifier */,
- KeyCode * /* inputMap */,
- KeyClassPtr * /* k */);
-
extern _X_EXPORT void SendDeviceMappingNotify(
ClientPtr /* client, */,
CARD8 /* request, */,
diff --git a/include/input.h b/include/input.h
index db75f6c78..a38dbfac0 100644
--- a/include/input.h
+++ b/include/input.h
@@ -222,6 +222,15 @@ typedef struct _InputOption {
struct _InputOption *next;
} InputOption;
+/* Key has been run through all input processing and events sent to clients. */
+#define KEY_PROCESSED 1
+/* Key has not been fully processed, no events have been sent. */
+#define KEY_POSTED 2
+
+extern void set_key_down(DeviceIntPtr pDev, int key_code, int type);
+extern void set_key_up(DeviceIntPtr pDev, int key_code, int type);
+extern int key_is_down(DeviceIntPtr pDev, int key_code, int type);
+
extern _X_EXPORT void InitCoreDevices(void);
extern _X_EXPORT DeviceIntPtr AddInputDevice(
@@ -373,13 +382,6 @@ extern _X_EXPORT Bool BadDeviceMap(
unsigned /*high*/,
XID* /*errval*/);
-extern _X_EXPORT Bool AllModifierKeysAreUp(
- DeviceIntPtr /*device*/,
- CARD8* /*map1*/,
- int /*per1*/,
- CARD8* /*map2*/,
- int /*per2*/);
-
extern _X_EXPORT void NoteLedState(
DeviceIntPtr /*keybd*/,
int /*led*/,
@@ -498,6 +500,12 @@ extern _X_EXPORT int AllocMasterDevice(ClientPtr client,
extern _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from,
DeviceIntPtr to);
+/* Helper functions. */
+extern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
+ KeyCode **modkeymap, int *max_keys_per_mod);
+extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
+ int max_keys_per_mod);
+
/* Implemented by the DDX. */
extern _X_EXPORT int NewInputDeviceRequest(
InputOption *options,
diff --git a/include/inputstr.h b/include/inputstr.h
index 7ff8dcbbb..cdd68d593 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -137,11 +137,9 @@ typedef struct _GrabRec {
typedef struct _KeyClassRec {
CARD8 down[DOWN_LENGTH];
CARD8 postdown[DOWN_LENGTH];
- KeyCode *modifierKeyMap;
KeySymsRec curKeySyms;
int modifierKeyCount[8];
CARD8 modifierMap[MAP_LENGTH];
- CARD8 maxKeysPerModifier;
struct _XkbSrvInfo *xkbInfo;
} KeyClassRec, *KeyClassPtr;