[PATCH 1/3] dix: Prepare dix to embrace input handling duties

Fernando Carrijo fcarrijo.lists at gmail.com
Tue Aug 31 12:00:12 PDT 2010


From: Fernando Carrijo <fcarrijo at freedesktop.org>

Signed-off-by: Fernando Carrijo <fcarrijo at freedesktop.org>
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 dix/Makefile.am        |    1 +
 dix/inputhandler.c     |   58 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/Makefile.am    |    1 +
 include/inputhandler.h |   46 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 106 insertions(+), 0 deletions(-)
 create mode 100644 dix/inputhandler.c
 create mode 100644 include/inputhandler.h

diff --git a/dix/Makefile.am b/dix/Makefile.am
index 5e2dad7..b9d73fb 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -27,6 +27,7 @@ libdix_la_SOURCES = 	\
 	glyphcurs.c	\
 	grabs.c		\
 	initatoms.c	\
+	inputhandler.c	\
 	inpututils.c	\
 	pixmap.c	\
 	privates.c	\
diff --git a/dix/inputhandler.c b/dix/inputhandler.c
new file mode 100644
index 0000000..b6dd9e9
--- /dev/null
+++ b/dix/inputhandler.c
@@ -0,0 +1,58 @@
+#include "inputhandler.h"
+
+IHPtr InputHandlers = NULL;
+
+static pointer
+addInputHandler(int fd, InputHandlerProc proc, pointer data)
+{
+    return NULL;
+}
+
+pointer
+AddInputHandler(int fd, InputHandlerProc proc, pointer data)
+{
+    return NULL;
+}
+
+pointer
+AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
+{
+    return NULL;
+}
+
+static void
+removeInputHandler(IHPtr ih)
+{
+}
+
+int
+RemoveInputHandler(pointer handler)
+{
+    return 0;
+}
+
+int
+RemoveGeneralHandler(pointer handler)
+{
+    return 0;
+}
+
+void
+DisableInputHandler(pointer handler)
+{
+}
+
+void
+DisableGeneralHandler(pointer handler)
+{
+}
+
+void
+EnableInputHandler(pointer handler)
+{
+}
+
+void
+EnableGeneralHandler(pointer handler)
+{
+}
diff --git a/include/Makefile.am b/include/Makefile.am
index 2c1a84c..ebba9df 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -27,6 +27,7 @@ sdk_HEADERS =		\
 	gcstruct.h	\
 	globals.h	\
 	input.h		\
+	inputhandler.h	\
 	inputstr.h	\
 	inputthread.h	\
 	list.h		\
diff --git a/include/inputhandler.h b/include/inputhandler.h
new file mode 100644
index 0000000..b8d0d79
--- /dev/null
+++ b/include/inputhandler.h
@@ -0,0 +1,46 @@
+#ifndef INPUT_HANDLER_H
+#define INPUT_HANDLER_H
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include "misc.h"
+
+typedef void (*InputHandlerProc)(int fd, pointer data);
+
+typedef struct x_IHRec {
+    int			fd;
+    InputHandlerProc	ihproc;
+    pointer		data;
+    Bool		enabled;
+    struct x_IHRec *	next;
+} IHRec, *IHPtr;
+
+extern IHPtr InputHandlers;
+
+extern pointer
+AddInputHandler(int /* fd */, InputHandlerProc /* proc */, pointer /* data */);
+
+extern pointer
+AddGeneralHandler(int /* fd */, InputHandlerProc /* proc */, pointer /* data */);
+
+extern int
+RemoveInputHandler(pointer /* handler */);
+
+extern int
+RemoveGeneralHandler(pointer /* handler */);
+
+extern void
+DisableInputHandler(pointer /* handler */);
+
+extern void
+DisableGeneralHandler(pointer /* handler */);
+
+extern void
+EnableInputHandler(pointer /* handler */);
+
+extern void
+EnableGeneralHandler(pointer /* handler */);
+
+#endif /* INPUT_HANDLER_H */
-- 
1.7.0.4



More information about the xorg-devel mailing list