[PATCH] xkbactions.h

Enrico Weigelt weigelt at metux.de
Thu Jun 8 05:20:49 PDT 2006


Hi folks,

this little patch moves out some typedefs and #define from 
xkbActions.c into an separate header file.

This is one of the little code cleanups as Greg suggested,
and I need it for further works (move the xf86 dependent xkb 
handling to hw/xfree86/).

The changes are minimal and at my site it compiles cleanly,
so I hope we soon could get into the tree.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
 	http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
	http://patches.metux.de/
---------------------------------------------------------------------
-------------- next part --------------
diff -ruN xorg-server-1.0.99.902.orig/xkb/Makefile.am xorg-server-1.0.99.902/xkb/Makefile.am
--- xorg-server-1.0.99.902.orig/xkb/Makefile.am	Thu Jun  8 12:56:43 2006
+++ xorg-server-1.0.99.902/xkb/Makefile.am	Thu Jun  8 12:58:46 2006
@@ -45,7 +45,7 @@
                     $(X11_SRCS)
 libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c
 
-EXTRA_DIST = xkb.h xkbDflts.h
+EXTRA_DIST = xkb.h xkbDflts.h xkbactions.h
 
 xkbcompileddir = $(XKB_COMPILED_DIR)
 dist_xkbcompiled_DATA = README.compiled
diff -ruN xorg-server-1.0.99.902.orig/xkb/xkbActions.c xorg-server-1.0.99.902/xkb/xkbActions.c
--- xorg-server-1.0.99.902.orig/xkb/xkbActions.c	Thu Jun  8 12:56:43 2006
+++ xorg-server-1.0.99.902/xkb/xkbActions.c	Thu Jun  8 12:59:19 2006
@@ -41,6 +41,7 @@
 #include "inputstr.h"
 #include <X11/extensions/XKBsrv.h>
 #include "xkb.h"
+#include "xkbactions.h"
 #include <ctype.h>
 
 static unsigned int _xkbServerGeneration;
@@ -236,25 +237,6 @@
 
 /***====================================================================***/
 
-#define	SYNTHETIC_KEYCODE	1
-#define	BTN_ACT_FLAG		0x100
-
-typedef struct _XkbFilter {
-	CARD16			  keycode;
-	CARD8			  what;
-	CARD8			  active;
-	CARD8			  filterOthers;
-	CARD32			  priv;
-	XkbAction		  upAction;
-	int			(*filter)(
-					XkbSrvInfoPtr 		/* xkbi */,
-					struct _XkbFilter *	/* filter */,
-					unsigned		/* keycode */,
-					XkbAction *		/* action */
-				  );
-	struct _XkbFilter	 *next;
-} XkbFilterRec,*XkbFilterPtr;
-
 static int
 _XkbFilterSetState(	XkbSrvInfoPtr	xkbi,
 			XkbFilterPtr	filter,
@@ -301,10 +283,6 @@
     return 1;
 }
 
-#define	LATCH_KEY_DOWN	1
-#define	LATCH_PENDING	2
-#define	NO_LATCH	3
-
 static int
 _XkbFilterLatchState(	XkbSrvInfoPtr	xkbi,
 			XkbFilterPtr	filter,
@@ -443,9 +421,6 @@
     return 1;
 }
 
-#define	ISO_KEY_DOWN		0
-#define	NO_ISO_LOCK		1
-
 static int
 _XkbFilterISOLock(	XkbSrvInfoPtr	xkbi,
 			XkbFilterPtr	filter,
diff -ruN xorg-server-1.0.99.902.orig/xkb/xkbactions.h xorg-server-1.0.99.902/xkb/xkbactions.h
--- xorg-server-1.0.99.902.orig/xkb/xkbactions.h	Thu Jan  1 01:00:00 1970
+++ xorg-server-1.0.99.902/xkb/xkbactions.h	Thu Jun  8 12:58:10 2006
@@ -0,0 +1,44 @@
+
+#ifndef __XKBACTIONS_H
+#define __XKBACTIONS_H
+
+#define NEED_EVENTS 1
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/keysym.h>
+#include "misc.h"
+#include "inputstr.h"
+#include <X11/extensions/XKBsrv.h>
+#include "xkb.h"
+#include <ctype.h>
+
+#define	SYNTHETIC_KEYCODE	1
+#define	BTN_ACT_FLAG		0x100
+
+typedef struct _XkbFilter {
+	CARD16			  keycode;
+	CARD8			  what;
+	CARD8			  active;
+	CARD8			  filterOthers;
+	CARD32			  priv;
+	XkbAction		  upAction;
+	int			(*filter)(
+					XkbSrvInfoPtr 		/* xkbi */,
+					struct _XkbFilter *	/* filter */,
+					unsigned		/* keycode */,
+					XkbAction *		/* action */
+				  );
+	struct _XkbFilter	 *next;
+} XkbFilterRec,*XkbFilterPtr;
+
+#define	LATCH_KEY_DOWN	1
+#define	LATCH_PENDING	2
+#define	NO_LATCH	3
+
+#define	ISO_KEY_DOWN		0
+#define	NO_ISO_LOCK		1
+
+//static	int		szFilters = 0;
+//static	XkbFilterPtr	filters = NULL;
+
+#endif
diff -ruN xorg-server-1.0.99.902.orig/xkb/Makefile.am xorg-server-1.0.99.902/xkb/Makefile.am
--- xorg-server-1.0.99.902.orig/xkb/Makefile.am	Thu Jun  8 13:22:40 2006
+++ xorg-server-1.0.99.902/xkb/Makefile.am	Fri Jun  2 12:39:54 2006
@@ -45,7 +45,7 @@
                     $(X11_SRCS)
 libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c
 
-EXTRA_DIST = xkb.h xkbDflts.h xkbactions.h
+EXTRA_DIST = xkb.h xkbDflts.h
 
 xkbcompileddir = $(XKB_COMPILED_DIR)
 dist_xkbcompiled_DATA = README.compiled


More information about the xorg mailing list