Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

inputevt.c File Reference


Detailed Description

Input I/O notification.

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.

Author:
ko (ko-@wanadoo.fr)
Date:
2002
Author:
Christian Biere
Date:
2005

#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


Define Documentation

#define CASE  )     case x: return #x
 

#define EXCEPTION_CONDITION   (G_IO_ERR | G_IO_HUP | G_IO_NVAL)
 

#define READ_CONDITION   (G_IO_IN | G_IO_PRI)
 

#define USE_POLL   1
 

#define WRITE_CONDITION   (G_IO_OUT)
 


Typedef Documentation

typedef struct relay_list relay_list_t
 


Function Documentation

guint inputevt_add gint  fd,
inputevt_cond_t  cond,
inputevt_handler_t  handler,
gpointer  data
 

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).

guint inputevt_add_source inputevt_relay_t relay  )  [static]
 

guint inputevt_add_source_with_glib inputevt_relay_t relay  )  [static]
 

void inputevt_close void   ) 
 

Performs module cleanup.

const gchar* inputevt_cond_to_string inputevt_cond_t  cond  ) 
 

size_t inputevt_data_available void   ) 
 

gboolean inputevt_dispatch GIOChannel *  source,
GIOCondition  condition,
gpointer  data
[static]
 

Relays the event to the registered handler function.

The input condition flags are properly mapped before being passed on.

void inputevt_init void   ) 
 

void inputevt_relay_destroy gpointer  data  )  [static]
 

Frees the relay structure when its time comes.

void inputevt_remove guint  id  ) 
 


Variable Documentation

const inputevt_handler_t zero_handler [static]
 


Generated on Sat Jun 30 17:53:28 2007 for gtk-gnutella by  doxygen 1.3.9.1