| libgxim Reference Manual | ||||
|---|---|---|---|---|
#define G_XIM_PROTOCOL_ERROR #define g_xim_protocol_n_pad4 (_n_) #define G_XIM_OPCODE_KEY (_m_,_n_) GXimProtocolIface; GXimProtocolPrivate; GXimProtocolQueueNode; enum GXimProtocolError; void g_xim_protocol_init (GXimProtocol *proto); void g_xim_protocol_dispose (GObject *object); void g_xim_protocol_finalize (GObject *object); GXimProtocolPrivate* g_xim_protocol_get_private (GXimProtocol *proto); GQuark g_xim_protocol_get_error_quark (void); gboolean g_xim_protocol_process_event (GXimProtocol *proto, GdkEventClient *event, GError **error); gboolean g_xim_protocol_translate (GXimProtocol *proto, gpointer data, gssize length, GError **error); gboolean g_xim_protocol_send_packets (GXimProtocol *proto, const gchar *data, gsize length); gsize g_xim_protocol_send_vformat (GXimProtocol *proto, GCancellable *cancellable, GError **error, guint n_params, va_list args); gsize g_xim_protocol_send_format (GXimProtocol *proto, GCancellable *cancellable, GError **error, guint n_params, ...); gboolean g_xim_protocol_send (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, guint n_params, ...); gboolean g_xim_protocol_send_with_list (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, GSList *types, GSList *values); gboolean g_xim_protocol_start_queue (GXimProtocol *proto); GXimProtocolQueueNode* g_xim_protocol_end_queue (GXimProtocol *proto); void g_xim_protocol_cancel_queue (GXimProtocol *proto); gboolean g_xim_protocol_is_queued (GXimProtocol *proto); gboolean g_xim_protocol_read_vformat (GXimProtocol *proto, GDataInputStream *stream, GCancellable *cancellable, GError **error, guint n_params, va_list args); gboolean g_xim_protocol_read_format (GXimProtocol *proto, GDataInputStream *stream, GCancellable *cancellable, GError **error, guint n_params, ...); gboolean g_xim_protocol_wait_for_reply (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, GError **error); gboolean g_xim_protocol_raise_parser_error (GXimProtocol *proto, guint major_opcode, guint minor_opcode, guint imid, guint icid); void g_xim_protocol_add_protocol (GXimProtocol *proto, GXimProtocolClosure *closure); void g_xim_protocol_remove_protocol (GXimProtocol *proto, GXimProtocolClosure *closure); void g_xim_protocol_remove_protocol_by_id (GXimProtocol *proto, guint8 major_opcode, guint8 minor_opcode); GXimProtocolClosure* g_xim_protocol_lookup_protocol_by_name (GXimProtocol *proto, const gchar *name); GXimProtocolClosure* g_xim_protocol_lookup_protocol_by_id (GXimProtocol *proto, guint8 major_opcode, guint8 minor_opcode); gulong g_xim_protocol_connect_closure_by_id (GXimProtocol *proto, guint8 major_opcode, guint8 minor_opcode, GCallback func, gpointer data); gulong g_xim_protocol_connect_closure_by_name (GXimProtocol *proto, const gchar *signal_name, GCallback func, gpointer data); GSList* g_xim_protocol_get_extensions (GXimProtocol *proto); gboolean (*GXimProtocolClosureFunc) (GXimProtocolClosure *closure, GXimProtocol *proto, GDataInputStream *stream, GError **error, gpointer user_data); GXimProtocolClosure; GXimProtocolClosure* g_xim_protocol_closure_new (guint8 major_opcode, guint8 minor_opcode, const gchar *name, gboolean is_an_extension); void g_xim_protocol_closure_free (gpointer data, GClosure *closure); gboolean g_xim_protocol_closure_is_an_extension (GXimProtocolClosure *closure); void g_xim_protocol_closure_set_marshal (GXimProtocolClosure *closure, GXimProtocolClosureFunc func, gpointer data); void g_xim_protocol_closure_add_signal (GXimProtocolClosure *closure, GClosureMarshal marshaller, guint n_params, ...); gulong g_xim_protocol_closure_connect (GXimProtocolClosure *closure, GCallback func, gpointer data); void g_xim_protocol_closure_disconnect (GXimProtocolClosure *closure, gulong id); gboolean g_xim_protocol_closure_emit_signal (GXimProtocolClosure *closure, GXimProtocol *proto, ...); gsize g_xim_attr_put_attribute_to_stream (GXimProtocol *proto, GXimAttr *attr, guint attribute_id, GCancellable *cancellable, GError **error); gpointer g_xim_attr_get_attribute_from_stream (GXimProtocol *proto, GXimAttr *attr, GDataInputStream *stream, GCancellable *cancellable, GError **error);
#define G_XIM_OPCODE_KEY(_m_,_n_) GUINT_TO_POINTER ((_m_) << 8 | ((_n_) & 0xff))
|
|
|
typedef struct {
GTypeInterface parent_iface;
GXimMessage *message;
GdkAtom atom_xim_protocol;
GdkAtom atom_xim_moredata;
} GXimProtocolIface;
An interface of XIM protocol.
GTypeInterface |
|
GXimMessage * |
a GXimMessage. |
GdkAtom |
|
GdkAtom |
typedef struct {
GOutputStream *base_send_ostream;
GOutputStream *base_recv_ostream;
GDataOutputStream *send_ostream;
GDataOutputStream *recv_ostream;
GHashTable *proto_table__named_index;
GHashTable *proto_table__id_index;
GQueue *markerq;
GQueue *syncableq;
GQueue *sendq;
gulong base_signal_ids[LAST_XIM_EVENTS];
gulong signal_ids[LAST_XIM_EVENTS];
GDataStreamByteOrder byte_order;
gboolean is_disconnected;
/* XXX: workaround for failing to get the number of bytes written */
gssize n_sent;
gssize n_received;
} GXimProtocolPrivate;
typedef struct {
gchar *data;
gsize length;
guint16 major_opcode;
guint16 minor_opcode;
guint16 imid;
guint16 icid;
gboolean is_sent;
} GXimProtocolQueueNode;
typedef enum {
G_XIM_PROTOCOL_ERROR_BEGIN = 128,
G_XIM_PROTOCOL_ERROR_UNKNOWN_ENDIAN,
G_XIM_PROTOCOL_ERROR_INVALID_PACKETS_RECEIVED,
G_XIM_PROTOCOL_ERROR_DELIVERY_FAILURE,
G_XIM_PROTOCOL_ERROR_NO_PARSER,
G_XIM_PROTOCOL_ERROR_NO_DATA,
} GXimProtocolError;
GXimProtocolPrivate* g_xim_protocol_get_private (GXimProtocol *proto);
|
|
Returns : |
gboolean g_xim_protocol_process_event (GXimProtocol *proto, GdkEventClient *event, GError **error);
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_translate (GXimProtocol *proto, gpointer data, gssize length, GError **error);
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_send_packets (GXimProtocol *proto, const gchar *data, gsize length);
|
|
|
|
|
|
Returns : |
gsize g_xim_protocol_send_vformat (GXimProtocol *proto, GCancellable *cancellable, GError **error, guint n_params, va_list args);
|
|
|
|
|
|
|
|
|
|
Returns : |
gsize g_xim_protocol_send_format (GXimProtocol *proto, GCancellable *cancellable, GError **error, guint n_params, ...);
|
|
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_send (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, guint n_params, ...);
|
|
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_send_with_list (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, GSList *types, GSList *values);
|
|
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_start_queue (GXimProtocol *proto);
|
|
Returns : |
GXimProtocolQueueNode* g_xim_protocol_end_queue (GXimProtocol *proto);
|
|
Returns : |
gboolean g_xim_protocol_is_queued (GXimProtocol *proto);
|
|
Returns : |
gboolean g_xim_protocol_read_vformat (GXimProtocol *proto, GDataInputStream *stream, GCancellable *cancellable, GError **error, guint n_params, va_list args);
|
|
|
|
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_read_format (GXimProtocol *proto, GDataInputStream *stream, GCancellable *cancellable, GError **error, guint n_params, ...);
|
|
|
|
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_wait_for_reply (GXimProtocol *proto, GXimOpcode major_opcode, guint8 minor_opcode, GError **error);
|
|
|
|
|
|
|
|
Returns : |
gboolean g_xim_protocol_raise_parser_error (GXimProtocol *proto, guint major_opcode, guint minor_opcode, guint imid, guint icid);
|
|
|
|
|
|
|
|
|
|
Returns : |
void g_xim_protocol_add_protocol (GXimProtocol *proto,
GXimProtocolClosure *closure);
|
|
|
void g_xim_protocol_remove_protocol (GXimProtocol *proto,
GXimProtocolClosure *closure);
|
|
|
void g_xim_protocol_remove_protocol_by_id
(GXimProtocol *proto,
guint8 major_opcode,
guint8 minor_opcode);
|
|
|
|
|
GXimProtocolClosure* g_xim_protocol_lookup_protocol_by_name (GXimProtocol *proto, const gchar *name);
|
|
|
|
Returns : |
GXimProtocolClosure* g_xim_protocol_lookup_protocol_by_id (GXimProtocol *proto, guint8 major_opcode, guint8 minor_opcode);
|
|
|
|
|
|
Returns : |
gulong g_xim_protocol_connect_closure_by_id (GXimProtocol *proto, guint8 major_opcode, guint8 minor_opcode, GCallback func, gpointer data);
|
|
|
|
|
|
|
|
|
|
Returns : |
gulong g_xim_protocol_connect_closure_by_name (GXimProtocol *proto, const gchar *signal_name, GCallback func, gpointer data);
|
|
|
|
|
|
|
|
Returns : |
GSList* g_xim_protocol_get_extensions (GXimProtocol *proto);
|
|
Returns : |
gboolean (*GXimProtocolClosureFunc) (GXimProtocolClosure *closure, GXimProtocol *proto, GDataInputStream *stream, GError **error, gpointer user_data);
|
|
|
|
|
|
|
|
|
|
Returns : |
typedef struct {
GCClosure closure;
GClosureMarshal signal_marshaller;
guint n_params;
GType *param_types;
GSList *signal_handlers;
gchar *name;
union {
GXimOpcode v1;
guint8 v2;
} major_opcode;
guint8 minor_opcode;
gboolean is_an_extension;
} GXimProtocolClosure;
GXimProtocolClosure* g_xim_protocol_closure_new (guint8 major_opcode, guint8 minor_opcode, const gchar *name, gboolean is_an_extension);
|
|
|
|
|
|
|
|
Returns : |
void g_xim_protocol_closure_free (gpointer data, GClosure *closure);
|
|
|
gboolean g_xim_protocol_closure_is_an_extension (GXimProtocolClosure *closure);
|
|
Returns : |
void g_xim_protocol_closure_set_marshal (GXimProtocolClosure *closure, GXimProtocolClosureFunc func, gpointer data);
|
|
|
|
|
void g_xim_protocol_closure_add_signal (GXimProtocolClosure *closure, GClosureMarshal marshaller, guint n_params, ...);
|
|
|
|
|
|
|
gulong g_xim_protocol_closure_connect (GXimProtocolClosure *closure, GCallback func, gpointer data);
|
|
|
|
|
|
Returns : |
void g_xim_protocol_closure_disconnect (GXimProtocolClosure *closure, gulong id);
|
|
|
gboolean g_xim_protocol_closure_emit_signal (GXimProtocolClosure *closure, GXimProtocol *proto, ...);
|
|
|
|
|
|
Returns : |
gsize g_xim_attr_put_attribute_to_stream (GXimProtocol *proto, GXimAttr *attr, guint attribute_id, GCancellable *cancellable, GError **error);
|
|
|
|
|
|
|
|
|
|
Returns : |
gpointer g_xim_attr_get_attribute_from_stream (GXimProtocol *proto, GXimAttr *attr, GDataInputStream *stream, GCancellable *cancellable, GError **error);
|
|
|
|
|
|
|
|
|
|
Returns : |