GDK Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <gdk/gdk.h> gint gdk_input_add_full (gint source
,GdkInputCondition condition
,GdkInputFunction function
,gpointer data
,GDestroyNotify destroy
); enum GdkInputCondition; void (*GdkInputFunction) (gpointer data
,gint source
,GdkInputCondition condition
); void (*GdkDestroyNotify) (gpointer data
); gint gdk_input_add (gint source
,GdkInputCondition condition
,GdkInputFunction function
,gpointer data
); void gdk_input_remove (gint tag
);
The functions in this section are used to establish callbacks when some condition becomes true for a file descriptor. They are currently just wrappers around the IO Channel facility.
gint gdk_input_add_full (gint source
,GdkInputCondition condition
,GdkInputFunction function
,gpointer data
,GDestroyNotify destroy
);
gdk_input_add_full
is deprecated and should not be used in newly-written code. Use g_io_add_watch_full()
on a GIOChannel
Establish a callback when a condition becomes true on a file descriptor.
|
a file descriptor. |
|
the condition. |
|
the callback function. |
|
callback data passed to function . |
|
callback function to call with data when the input
handler is removed. |
Returns : |
a tag that can later be used as an argument to
gdk_input_remove() . |
typedef enum { GDK_INPUT_READ = 1 << 0, GDK_INPUT_WRITE = 1 << 1, GDK_INPUT_EXCEPTION = 1 << 2 } GdkInputCondition;
A set of bit flags used to specify conditions for which
an input callback will be triggered. The three members
of this enumeration correspond to the readfds
,
writefds
, and exceptfds
arguments to the
select
system call.
the file descriptor has become available for reading. (Or, as is standard in Unix, a socket or pipe was closed at the other end; this is the case if a subsequent read on the file descriptor returns a count of zero.) | |
the file descriptor has become available for writing. | |
an exception was raised on the file descriptor. |
void (*GdkInputFunction) (gpointer data
,gint source
,GdkInputCondition condition
);
A callback function that will be called when some condition occurs.
|
the user data passed to gdk_input_add() or gdk_input_add_full() . |
|
the source where the condition occurred. |
|
the triggering condition. |
void (*GdkDestroyNotify) (gpointer data
);
GdkDestroyNotify
is deprecated and should not be used in newly-written code.
A callback function called when a piece of user data is
no longer being stored by GDK. Will typically free the
structure or object that data
points to.
|
the user data. |
gint gdk_input_add (gint source
,GdkInputCondition condition
,GdkInputFunction function
,gpointer data
);
gdk_input_add
is deprecated and should not be used in newly-written code. Use g_io_add_watch()
on a GIOChannel
Establish a callback when a condition becomes true on a file descriptor.
|
a file descriptor. |
|
the condition. |
|
the callback function. |
|
callback data passed to function . |
Returns : |
a tag that can later be used as an argument to
gdk_input_remove() . |
void gdk_input_remove (gint tag
);
gdk_input_remove
is deprecated and should not be used in newly-written code.
Remove a callback added with gdk_input_add()
or
gdk_input_add_full()
.
|
the tag returned when the callback was set up. |