]> Dogcows Code - chaz/openbox/commitdiff
add the mouse plugin
authorDana Jansens <danakj@orodu.net>
Tue, 18 Mar 2003 20:09:07 +0000 (20:09 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 18 Mar 2003 20:09:07 +0000 (20:09 +0000)
configure.ac
plugins/mouse/.cvsignore [new file with mode: 0644]
plugins/mouse/Makefile.am [new file with mode: 0644]
plugins/mouse/mouse.c [new file with mode: 0644]

index 6953f152367e7ebf2dd96a61ecd52390dfdfdbbc..1206cee593ea76be1c62a3488090e955892038b7 100644 (file)
@@ -63,6 +63,7 @@ AC_CONFIG_FILES([Makefile po/Makefile.in
                engines/openbox/Makefile
                plugins/Makefile
                plugins/keyboard/Makefile
+               plugins/mouse/Makefile
                doc/Makefile
                doc/doxygen/Makefile
                data/Makefile
diff --git a/plugins/mouse/.cvsignore b/plugins/mouse/.cvsignore
new file mode 100644 (file)
index 0000000..e76ce20
--- /dev/null
@@ -0,0 +1,6 @@
+mouse.lo
+mouse.la
+Makefile
+Makefile.in
+.libs
+.deps
diff --git a/plugins/mouse/Makefile.am b/plugins/mouse/Makefile.am
new file mode 100644 (file)
index 0000000..d2ead23
--- /dev/null
@@ -0,0 +1,17 @@
+plugindir=$(libdir)/openbox/plugins
+
+CPPFLAGS=$(XFT_CFLAGS) $(GLIB_CFLAGS) @CPPFLAGS@ \
+-DPLUGINDIR=\"$(plugindir)\" \
+-DG_LOG_DOMAIN=\"Plugin-Mouse\"
+
+plugin_LTLIBRARIES=mouse.la
+
+mouse_la_LDFLAGS=-module -avoid-version
+mouse_la_SOURCES=mouse.c
+
+noinst_HEADERS=
+
+MAINTAINERCLEANFILES= Makefile.in
+
+distclean-local:
+       $(RM) *\~ *.orig *.rej .\#*
diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c
new file mode 100644 (file)
index 0000000..7b129c8
--- /dev/null
@@ -0,0 +1,29 @@
+#include "../../kernel/dispatch.h"
+#include <glib.h>
+
+void my_powerful_function() {}
+
+static void event(ObEvent *e, void *foo)
+{
+    switch (e->type) {
+    case Event_X_ButtonPress:
+        break;
+    case Event_X_ButtonRelease:
+        break;
+    case Event_X_MotionNotify:
+        break;
+    default:
+        g_assert_not_reached();
+    }
+}
+
+void plugin_startup()
+{
+    dispatch_register(Event_X_ButtonPress | Event_X_ButtonRelease |
+                      Event_X_MotionNotify, (EventHandler)event, NULL);
+}
+
+void plugin_shutdown()
+{
+    dispatch_register(0, (EventHandler)event, NULL);
+}
This page took 0.030197 seconds and 4 git commands to generate.