GXimConnection

GXimConnection — Base class for XIM connection

Synopsis

                    GXimConnection;
struct              GXimConnectionClass;
gboolean            g_xim_connection_cmd_auth_ng        (GXimConnection *conn);
gboolean            g_xim_connection_cmd_error          (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid,
                                                         GXimErrorMask flag,
                                                         GXimErrorCode error_code,
                                                         guint16 detail,
                                                         const gchar *error_message);
gboolean            g_xim_connection_cmd_forward_event  (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid,
                                                         guint16 flag,
                                                         GdkEvent *event);
gboolean            g_xim_connection_cmd_sync_reply     (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid);
void                g_xim_connection_setup              (GXimConnection *conn);

Object Hierarchy

  GObject
   +----GXimConnection
         +----GXimClientConnection
         +----GXimServerConnection

Implemented Interfaces

GXimConnection implements GXimTransport and GXimProtocol.

Properties

  "proto-signals"            gpointer              : Read / Write / Construct Only

Description

GXimConnection provides a common facility to deal with XIM protocol events after the connection established.

Details

GXimConnection

typedef struct _GXimConnection GXimConnection;

An abstract implementation of connection class


struct GXimConnectionClass

struct GXimConnectionClass {
	GObjectClass  parent_class;
};


g_xim_connection_cmd_auth_ng ()

gboolean            g_xim_connection_cmd_auth_ng        (GXimConnection *conn);

Sends XIM_AUTH_NG to the opposite direction on the connection. which would respond the authentication request as error.

This is asynchronous event so it doesn't ensure if the client really receives this event.

conn :

a GXimConnection.

Returns :

TRUE to be sent the event successfully.

g_xim_connection_cmd_error ()

gboolean            g_xim_connection_cmd_error          (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid,
                                                         GXimErrorMask flag,
                                                         GXimErrorCode error_code,
                                                         guint16 detail,
                                                         const gchar *error_message);

Sends XIM_ERROR to the opposite direction on the connection. which would respond a request as error.

This is asynchronous event so it doesn't ensure if the client really receives this event.

conn :

a GXimConnection.

imid :

input-method ID

icid :

input-context ID

flag :

a flag to validate the parameters, which should be GXimErrorMask.

error_code :

error code returned by XIM protocol events.

detail :

unused in XIM protocol but just reserved.

error_message :

error message which should be more human readable.

Returns :

TRUE to be sent the event successfully.

g_xim_connection_cmd_forward_event ()

gboolean            g_xim_connection_cmd_forward_event  (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid,
                                                         guint16 flag,
                                                         GdkEvent *event);

Sends XIM_FORWARD_EVENT to the opposite direction on the connection. which would notify the key event or respond XIM_FORWARD_EVENT.

conn :

a GXimConnection.

imid :

input-method ID

icid :

input-context ID

flag :

a flag to give additional requests, which is GXimEventFlags.

event :

the GdkEvent which send to the opposite direction on the connection.

Returns :

TRUE to be sent the event successfully.

g_xim_connection_cmd_sync_reply ()

gboolean            g_xim_connection_cmd_sync_reply     (GXimConnection *conn,
                                                         guint16 imid,
                                                         guint16 icid);

Sends XIM_SYNC_REPLY to the opposite direction on the connection. which would respond XIM_SYNC or any synchronous requests.

conn :

a GXimConnection.

imid :

input-method ID

icid :

input-context ID

Returns :

TRUE to be sent the event successfully.

g_xim_connection_setup ()

void                g_xim_connection_setup              (GXimConnection *conn);

Configures conn to get it working. this is a helper function since GXimConnection is an abstract class. if you have any connection class being inherited from GXimConnection, you will have to invoke this function in appropriate timing.

conn :

a GXimConnection.

Property Details

The "proto-signals" property

  "proto-signals"            gpointer              : Read / Write / Construct Only

a GSList contains GXimLazySignalConnector to connected the signals when the connection is configured.

See Also

GXimProtocol, GXimTransport