This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via 040f8cdfb686e243d75d7c4e27c36b495d76656f (commit) from fb50f1facaec877cd3b8a71f6d621648ebc0f451 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/040f8cdfb686e243d75d7c4e27c36b495d766...
commit 040f8cdfb686e243d75d7c4e27c36b495d76656f Author: Cyril Hrubis metan@ucw.cz Date: Mon Oct 24 17:46:32 2011 +0200
Added input driver desctructor + typedef.
diff --git a/include/input/GP_InputDriverLinux.h b/include/input/GP_InputDriverLinux.h index ed70c15..ea5b370 100644 --- a/include/input/GP_InputDriverLinux.h +++ b/include/input/GP_InputDriverLinux.h @@ -31,7 +31,7 @@
#include <stdint.h>
-struct GP_InputDriverLinux { +typedef struct GP_InputDriverLinux { /* fd */ int fd; @@ -51,11 +51,19 @@ struct GP_InputDriverLinux { int abs_press_max;
uint8_t abs_flag; -}; +} GP_InputDriverLinux;
+/* + * Initalize and allocate input driver. + */ struct GP_InputDriverLinux *GP_InputDriverLinuxOpen(const char *path);
/* + * Close the fd, free memory. + */ +void GP_InputDriverLinuxClose(struct GP_InputDriverLinux *self); + +/* * Called when there are data ready on input device. * * May or may not generate GP_Event. diff --git a/libs/input/GP_InputDriverLinux.c b/libs/input/GP_InputDriverLinux.c index a0f4ddf..05557dd 100644 --- a/libs/input/GP_InputDriverLinux.c +++ b/libs/input/GP_InputDriverLinux.c @@ -142,6 +142,15 @@ struct GP_InputDriverLinux *GP_InputDriverLinuxOpen(const char *path) return ret; }
+void GP_InputDriverLinuxClose(struct GP_InputDriverLinux *self) +{ + GP_DEBUG(1, "Closing input device"); + print_name(self->fd); + + close(self->fd); + free(self); +} + static void input_rel(struct GP_InputDriverLinux *self, struct input_event *ev) { GP_DEBUG(4, "Relative event");
-----------------------------------------------------------------------
Summary of changes: include/input/GP_InputDriverLinux.h | 12 ++++++++++-- libs/input/GP_InputDriverLinux.c | 9 +++++++++ 2 files changed, 19 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.