add the mouse plugin
This commit is contained in:
parent
6dd06740e9
commit
fa405398a1
4 changed files with 53 additions and 0 deletions
|
@ -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
|
||||
|
|
6
plugins/mouse/.cvsignore
Normal file
6
plugins/mouse/.cvsignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
mouse.lo
|
||||
mouse.la
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
17
plugins/mouse/Makefile.am
Normal file
17
plugins/mouse/Makefile.am
Normal file
|
@ -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 .\#*
|
29
plugins/mouse/mouse.c
Normal file
29
plugins/mouse/mouse.c
Normal file
|
@ -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);
|
||||
}
|
Loading…
Reference in a new issue