Basically this is a duplicate of the GDK input facilities, without the features gtkg does not use.
The intent here is to break the GDK dependency but retain the same behavior, to avoid disturbing too much of the existing code.
#include "common.h"
#include "inputevt.h"
#include "misc.h"
#include "walloc.h"
#include "tm.h"
#include "bit_array.h"
#include "override.h"
Data Structures | |
| struct | inputevt_relay_t |
| The relay structure is used as a bridge to provide GDK-compatible input condition flags. More... | |
| struct | relay_list |
Defines | |
| #define | USE_POLL 1 |
| #define | READ_CONDITION (G_IO_IN | G_IO_PRI) |
| #define | WRITE_CONDITION (G_IO_OUT) |
| #define | EXCEPTION_CONDITION (G_IO_ERR | G_IO_HUP | G_IO_NVAL) |
| #define | CASE(x) case x: return #x |
Typedefs | |
| typedef relay_list | relay_list_t |
Functions | |
| const gchar * | inputevt_cond_to_string (inputevt_cond_t cond) |
| size_t | inputevt_data_available (void) |
| void | inputevt_relay_destroy (gpointer data) |
| Frees the relay structure when its time comes. | |
| gboolean | inputevt_dispatch (GIOChannel *source, GIOCondition condition, gpointer data) |
| Relays the event to the registered handler function. | |
| guint | inputevt_add_source_with_glib (inputevt_relay_t *relay) |
| guint | inputevt_add_source (inputevt_relay_t *relay) |
| void | inputevt_remove (guint id) |
| void | inputevt_init (void) |
| guint | inputevt_add (gint fd, inputevt_cond_t cond, inputevt_handler_t handler, gpointer data) |
| This emulates the GDK input interface. | |
| void | inputevt_close (void) |
| Performs module cleanup. | |
Variables | |
| const inputevt_handler_t | zero_handler |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
This emulates the GDK input interface. A replacement for gdk_input_add(). Behaves exactly the same, except destroy notification has been removed (since gtkg does not use it). |
|
|
|
|
|
|
|
|
Performs module cleanup.
|
|
|
|
|
|
|
|
||||||||||||||||
|
Relays the event to the registered handler function. The input condition flags are properly mapped before being passed on. |
|
|
|
|
|
Frees the relay structure when its time comes.
|
|
|
|
|
|
|
1.3.9.1