G_DEFINE_TYPE (BusConnection, bus_connection, IBUS_TYPE_OBJECT)
static void
-bus_connection_class_init (BusConnectionClass *klass)
+bus_connection_class_init (BusConnectionClass *class)
{
- IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass);
+ IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class);
ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_connection_destroy;
}
static GQuark
bus_connection_quark (void)
{
- GQuark quark = 0;
+ static GQuark quark = 0;
if (quark == 0) {
quark = g_quark_from_static_string ("BUS_CONNECTION");
}
return TRUE;
}
-gboolean
-bus_connection_remove_match (BusConnection *connection,
- const gchar *rule)
-{
- g_assert (BUS_IS_CONNECTION (connection));
- return FALSE;
-}
-
GDBusConnection *
bus_connection_get_dbus_connection (BusConnection *connection)
{
return connection->connection;
}
-
void
bus_connection_set_filter (BusConnection *connection,
GDBusMessageFilterFunction filter_func,
GList *objects;
GList *connections;
GList *rules;
- gint id;
+ guint id;
GMutex *dispatch_lock;
GList *dispatch_queue;
g_variant_get (parameters, "(&s)", &name);
gboolean has_owner;
- if (name[0] == ':') {
+ if (!g_dbus_is_name (name)) {
+ g_dbus_method_invocation_return_error (invocation,
+ G_DBUS_ERROR,
+ G_DBUS_ERROR_FAILED,
+ "'%s' is not a legal bus name");
+ return;
+ }
+
+ if (g_dbus_is_unique_name (name)) {
has_owner = g_hash_table_lookup (dbus->unique_names, name) != NULL;
}
else {
GVariant *parameters,
GDBusMethodInvocation *invocation)
{
- /* FXIME */
- const gchar *uuid = "FXIME";
+ /* FIXME */
+ const gchar *uuid = "FIXME";
g_dbus_method_invocation_return_value (invocation,
g_variant_new ("(s)", uuid));
}
guint flags = 0;
g_variant_get (parameters, "(&su)", &name, &flags);
- if (name[0] == ':' || !g_dbus_is_name (name)) {
+ if (name == NULL ||
+ !g_dbus_is_name (name) ||
+ g_dbus_is_unique_name (name)) {
g_dbus_method_invocation_return_error (invocation,
G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
"'%s' is not a legal service name.", name);
const gchar *name= NULL;
g_variant_get (parameters, "(&s)", &name);
- if (name[0] == ':' || !g_dbus_is_name (name)) {
+ if (name == NULL ||
+ !g_dbus_is_name (name) ||
+ g_dbus_is_unique_name (name)) {
g_dbus_method_invocation_return_error (invocation,
G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
"'%s' is not a legal service name.", name);
}
-#if 1
-static void
-message_print(GDBusMessage *message)
-{
- switch (g_dbus_message_get_message_type (message)) {
- case G_DBUS_MESSAGE_TYPE_METHOD_CALL:
- g_debug ("From %s to %s, CALL(%u) %s.%s (%s)",
- g_dbus_message_get_sender (message),
- g_dbus_message_get_destination (message),
- g_dbus_message_get_serial (message),
- g_dbus_message_get_interface (message),
- g_dbus_message_get_member (message),
- g_dbus_message_get_signature (message)
- );
- break;
- case G_DBUS_MESSAGE_TYPE_METHOD_RETURN:
- g_debug ("From %s to %s, RETURN(%u) (%s)",
- g_dbus_message_get_sender (message),
- g_dbus_message_get_destination (message),
- g_dbus_message_get_reply_serial (message),
- g_dbus_message_get_signature (message)
- );
- break;
- case G_DBUS_MESSAGE_TYPE_ERROR:
- g_debug ("From %s to %s, ERROR(%u) %s",
- g_dbus_message_get_sender (message),
- g_dbus_message_get_destination (message),
- g_dbus_message_get_reply_serial (message),
- g_dbus_message_get_error_name (message)
- );
- break;
- case G_DBUS_MESSAGE_TYPE_SIGNAL:
- g_debug ("From %s to %s, SIGNAL %s.%s (%s) @ %s",
- g_dbus_message_get_sender (message),
- g_dbus_message_get_destination (message),
- g_dbus_message_get_interface (message),
- g_dbus_message_get_member (message),
- g_dbus_message_get_signature (message),
- g_dbus_message_get_path (message)
- );
- break;
- default:
- break;
- }
-
-}
-#endif
-
static GDBusMessage *
bus_dbus_impl_connection_filter_cb (GDBusConnection *dbus_connection,
GDBusMessage *message,
default:
/* dispatch signal messages by match rule */
bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL);
- message_print (message);
g_object_unref (message);
g_return_val_if_reached (NULL);
}
default:
/* dispatch signal messages by match rule */
bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL);
- message_print (message);
g_object_unref (message);
g_return_val_if_reached (NULL);
}
default:
/* dispatch signal messages by match rule */
bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL);
- message_print (message);
g_object_unref (message);
g_return_val_if_reached (NULL);
}
g_assert (BUS_IS_DBUS_IMPL (dbus));
g_assert (name != NULL);
- if (G_LIKELY (name[0] == ':')) {
+ if (G_LIKELY (g_dbus_is_unique_name (name))) {
return (BusConnection *)g_hash_table_lookup (dbus->unique_names, name);
}
else {
NULL, &error);
if (!retval) {
g_warning ("send error failed: %s.", error->message);
- // message_print (message);
g_error_free (error);
}
}
else {
- /* FIXME can not get destination */
+ /* FIXME What should we do, if can not get destination.
+ * It should not happen */
#if 0
if (g_dbus_message_get_message_type (message) == G_DBUS_MESSAGE_TYPE_METHOD_CALL) {
/* reply an error message, if the destination does not exist */
BusConnection *bus_dbus_impl_get_connection_by_name
(BusDBusImpl *dbus,
const gchar *name);
-/* FIXME */
void bus_dbus_impl_forward_message (BusDBusImpl *dbus,
BusConnection *connection,
GDBusMessage *message);
G_DEFINE_TYPE (BusEngineProxy, bus_engine_proxy, IBUS_TYPE_PROXY)
static void
-bus_engine_proxy_class_init (BusEngineProxyClass *klass)
+bus_engine_proxy_class_init (BusEngineProxyClass *class)
{
- IBUS_PROXY_CLASS (klass)->destroy = bus_engine_proxy_real_destroy;
- G_DBUS_PROXY_CLASS (klass)->g_signal = bus_engine_proxy_g_signal;
+ IBUS_PROXY_CLASS (class)->destroy = bus_engine_proxy_real_destroy;
+ G_DBUS_PROXY_CLASS (class)->g_signal = bus_engine_proxy_g_signal;
/* install signals */
engine_signals[COMMIT_TEXT] =
g_signal_new (I_("commit-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[FORWARD_KEY_EVENT] =
g_signal_new (I_("forward-key-event"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[DELETE_SURROUNDING_TEXT] =
g_signal_new (I_("delete-surrounding-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[UPDATE_PREEDIT_TEXT] =
g_signal_new (I_("update-preedit-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[SHOW_PREEDIT_TEXT] =
g_signal_new (I_("show-preedit-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[HIDE_PREEDIT_TEXT] =
g_signal_new (I_("hide-preedit-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[UPDATE_AUXILIARY_TEXT] =
g_signal_new (I_("update-auxiliary-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[SHOW_AUXILIARY_TEXT] =
g_signal_new (I_("show-auxiliary-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[HIDE_AUXILIARY_TEXT] =
g_signal_new (I_("hide-auxiliary-text"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[UPDATE_LOOKUP_TABLE] =
g_signal_new (I_("update-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[SHOW_LOOKUP_TABLE] =
g_signal_new (I_("show-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[HIDE_LOOKUP_TABLE] =
g_signal_new (I_("hide-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[PAGE_UP_LOOKUP_TABLE] =
g_signal_new (I_("page-up-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[PAGE_DOWN_LOOKUP_TABLE] =
g_signal_new (I_("page-down-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[CURSOR_UP_LOOKUP_TABLE] =
g_signal_new (I_("cursor-up-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[CURSOR_DOWN_LOOKUP_TABLE] =
g_signal_new (I_("cursor-down-lookup-table"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[REGISTER_PROPERTIES] =
g_signal_new (I_("register-properties"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
engine_signals[UPDATE_PROPERTY] =
g_signal_new (I_("update-property"),
- G_TYPE_FROM_CLASS (klass),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
(IBusComponent *component);
BusFactoryProxy *bus_factory_proxy_get_from_engine
(IBusEngineDesc *desc);
-
-#if 0
-const gchar *bus_factory_proxy_get_name (BusFactoryProxy *factory);
-const gchar *bus_factory_proxy_get_lang (BusFactoryProxy *factory);
-const gchar *bus_factory_proxy_get_icon (BusFactoryProxy *factory);
-const gchar *bus_factory_proxy_get_authors (BusFactoryProxy *factory);
-const gchar *bus_factory_proxy_get_credits (BusFactoryProxy *factory);
-#endif
-
G_END_DECLS
#endif
bus_ibus_impl_set_hotkey (ibus, hotkey, value);
}
else {
- /* set defaint trigger */
+ /* set default trigger */
ibus_hotkey_profile_add_hotkey (ibus->hotkey_profile,
IBUS_space,
IBUS_CONTROL_MASK,
GVariant *parameters,
GDBusMethodInvocation *invocation)
{
- /* FIXME */
- g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", "FIXME"));
+ g_dbus_method_invocation_return_value (invocation,
+ g_variant_new ("(s)", bus_server_get_address ()));
}
GVariant *retval = g_dbus_proxy_call_finish ((GDBusProxy *)source,
result, &error);
if (retval != NULL) {
- /* XXX: need check retval is floating? */
+ /* FIXME: need check retval is floating? */
g_dbus_method_invocation_return_value ((GDBusMethodInvocation *)user_data, retval);
g_variant_unref (retval);
}
NULL);
g_free (path);
-
-#if 0
- ibus_service_add_to_connection (IBUS_SERVICE (context),
- IBUS_CONNECTION (connection));
-#endif
-
g_object_ref_sink (connection);
context->connection = connection;
context->client = g_strdup (client);
ibus_set_log_handler(g_verbose);
/* check if ibus-daemon is running in this session */
-#if 0
if (ibus_get_address () != NULL) {
IBusBus *bus = ibus_bus_new ();
g_object_unref (bus);
bus = NULL;
}
-#endif
+
bus_server_init ();
/* FIXME */
if (!single) {
G_DEFINE_TYPE (BusMatchRule, bus_match_rule, IBUS_TYPE_OBJECT)
static void
-bus_match_rule_class_init (BusMatchRuleClass *klass)
+bus_match_rule_class_init (BusMatchRuleClass *class)
{
- IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass);
+ IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class);
ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_match_rule_destroy;
}
goto failed;
}
else if (g_strcmp0 (p->key, "sender") == 0) {
+ if (!g_dbus_is_name (p->value))
+ goto failed;
bus_match_rule_set_sender (rule, p->value);
}
else if (g_strcmp0 (p->key, "interface") == 0) {
+ if (!g_dbus_is_interface_name (p->value))
+ goto failed;
bus_match_rule_set_interface (rule, p->value);
}
else if (g_strcmp0 (p->key, "member") == 0) {
+ if (!g_dbus_is_member_name (p->value))
+ goto failed;
bus_match_rule_set_member (rule, p->value);
}
else if (g_strcmp0 (p->key, "path") == 0) {
bus_match_rule_set_path (rule, p->value);
}
else if (g_strcmp0 (p->key, "destination") == 0) {
+ if (!g_dbus_is_name (p->value))
+ goto failed;
bus_match_rule_set_destination (rule, p->value);
}
else if (strncmp (p->key, "arg", 3) == 0) {
bus_match_rule_match_name (const gchar *name,
const gchar *match_name)
{
- if (name[0] == ':' && match_name[0] != ':') {
+ if (g_dbus_is_unique_name (name) && !g_dbus_is_unique_name (match_name)) {
BusConnection *connection =
bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, match_name);
if (connection == NULL)
G_DEFINE_TYPE (BusRegistry, bus_registry, IBUS_TYPE_OBJECT)
static void
-bus_registry_class_init (BusRegistryClass *klass)
+bus_registry_class_init (BusRegistryClass *class)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+ IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class);
_signals[CHANGED] =
g_signal_new (I_("changed"),
bus_registry_load_in_dir (registry, dirname);
g_free (dirname);
+
#if 0
+ /* FIXME Should we support install some IME in user dir? */
dirname = g_build_filename (g_get_user_data_dir (), "ibus", "component", NULL);
path = ibus_observed_path_new (dirname, TRUE);
static GMainLoop *mainloop = NULL;
static BusDBusImpl *dbus = NULL;
static BusIBusImpl *ibus = NULL;
+static gchar *address = NULL;
static gboolean
bus_new_connection_cb (GDBusServer *server,
g_dbus_server_start (server);
- gchar *address = g_strdup_printf ("%s,guid=%s",
- g_dbus_server_get_client_address (server),
- g_dbus_server_get_guid (server));
+ address = g_strdup_printf ("%s,guid=%s",
+ g_dbus_server_get_client_address (server),
+ g_dbus_server_get_guid (server));
/* write address to file */
ibus_write_address (address);
+}
- g_free (address);
+const gchar *
+bus_server_get_address (void)
+{
+ return address;
}
void
G_BEGIN_DECLS
-void bus_server_init (void);
-void bus_server_run (void);
-void bus_server_quit (void);
+void bus_server_init (void);
+void bus_server_run (void);
+void bus_server_quit (void);
+const gchar *bus_server_get_address (void);
G_END_DECLS
#endif
-
# define IDEBUG(a...)
#endif
/* functions prototype */
-static void bus_test_client_class_init (BusTestClientClass *klass);
+static void bus_test_client_class_init (BusTestClientClass *class);
static void bus_test_client_destroy (IBusObject *object);
/* static methods*/
G_DEFINE_TYPE (BusTestClient, bus_test_client, IBUS_TYPE_OBJECT)
static void
-bus_test_client_class_init (BusTestClientClass *klass)
+bus_test_client_class_init (BusTestClientClass *class)
{
IDEBUG ("%s", __FUNCTION__);
- IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass);
+ IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class);
ibus_object_class->destroy = bus_test_client_destroy;
static GdkWindow *_input_window = NULL;
/* functions prototype */
-static void ibus_im_context_class_init (IBusIMContextClass *klass);
+static void ibus_im_context_class_init (IBusIMContextClass *class);
static void ibus_im_context_init (GObject *obj);
static void ibus_im_context_finalize (GObject *obj);
static void ibus_im_context_reset (GtkIMContext *context);
}
static void
-ibus_im_context_class_init (IBusIMContextClass *klass)
+ibus_im_context_class_init (IBusIMContextClass *class)
{
IDEBUG ("%s", __FUNCTION__);
- GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (klass);
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (class);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (class);
- parent_class = (GtkIMContextClass *) g_type_class_peek_parent (klass);
+ parent_class = (GtkIMContextClass *) g_type_class_peek_parent (class);
im_context_class->reset = ibus_im_context_reset;
im_context_class->focus_in = ibus_im_context_focus_in;
gobject_class->finalize = ibus_im_context_finalize;
_signal_commit_id =
- g_signal_lookup ("commit", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("commit", G_TYPE_FROM_CLASS (class));
g_assert (_signal_commit_id != 0);
_signal_preedit_changed_id =
- g_signal_lookup ("preedit-changed", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("preedit-changed", G_TYPE_FROM_CLASS (class));
g_assert (_signal_preedit_changed_id != 0);
_signal_preedit_start_id =
- g_signal_lookup ("preedit-start", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("preedit-start", G_TYPE_FROM_CLASS (class));
g_assert (_signal_preedit_start_id != 0);
_signal_preedit_end_id =
- g_signal_lookup ("preedit-end", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("preedit-end", G_TYPE_FROM_CLASS (class));
g_assert (_signal_preedit_end_id != 0);
_signal_delete_surrounding_id =
- g_signal_lookup ("delete-surrounding", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("delete-surrounding", G_TYPE_FROM_CLASS (class));
g_assert (_signal_delete_surrounding_id != 0);
_signal_retrieve_surrounding_id =
- g_signal_lookup ("retrieve-surrounding", G_TYPE_FROM_CLASS (klass));
+ g_signal_lookup ("retrieve-surrounding", G_TYPE_FROM_CLASS (class));
g_assert (_signal_retrieve_surrounding_id != 0);
const gchar *ibus_disable_snooper = g_getenv ("IBUS_DISABLE_SNOOPER");
ln -sf /usr/share/misc/config.sub config.sub
ln -sf /usr/share/misc/config.guess config.guess
dh $@ --before auto_configure
- dh_auto_configure -- --enable-static LDFLAGS="-Wl,--as-needed" --enable-key-snooper
+ dh_auto_configure -- --enable-static LDFLAGS="-Wl,--as-needed"
dh $@ --before auto_test
cd po; make ibus10.pot # https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/188690
dh $@ --after auto_test
ibus_component_is_running
ibus_component_get_from_engine
ibus_component_set_restart
->>>>>>> wip.
-<SUBSECTION Standard>
-IBUS_KEYMAP
-IBUS_IS_KEYMAP
-IBUS_TYPE_KEYMAP
-ibus_keymap_get_type
-IBUS_KEYMAP_CLASS
-IBUS_IS_KEYMAP_CLASS
-IBUS_KEYMAP_GET_CLASS
</SECTION>
<SECTION>
};
/* functions prototype */
-static void ibus_config_gconf_class_init (IBusConfigGConfClass *klass);
+static void ibus_config_gconf_class_init (IBusConfigGConfClass *class);
static void ibus_config_gconf_init (IBusConfigGConf *config);
static void ibus_config_gconf_destroy (IBusConfigGConf *config);
static gboolean ibus_config_gconf_set_value (IBusConfigService *config,
G_DEFINE_TYPE (IBusConfigGConf, ibus_config_gconf, IBUS_TYPE_CONFIG_SERVICE)
static void
-ibus_config_gconf_class_init (IBusConfigGConfClass *klass)
+ibus_config_gconf_class_init (IBusConfigGConfClass *class)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
IBUS_OBJECT_CLASS (object_class)->destroy = (IBusObjectDestroyFunc) ibus_config_gconf_destroy;
IBUS_CONFIG_SERVICE_CLASS (object_class)->set_value = ibus_config_gconf_set_value;
};
/* functions prototype */
-static void ibus_config_memconf_class_init (IBusConfigMemconfClass *klass);
+static void ibus_config_memconf_class_init (IBusConfigMemconfClass *class);
static void ibus_config_memconf_init (IBusConfigMemconf *config);
static void ibus_config_memconf_destroy (IBusConfigMemconf *config);
static gboolean ibus_config_memconf_set_value (IBusConfigService *config,
G_DEFINE_TYPE (IBusConfigMemconf, ibus_config_memconf, IBUS_TYPE_CONFIG_SERVICE)
static void
-ibus_config_memconf_class_init (IBusConfigMemconfClass *klass)
+ibus_config_memconf_class_init (IBusConfigMemconfClass *class)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
IBUS_OBJECT_CLASS (object_class)->destroy = (IBusObjectDestroyFunc) ibus_config_memconf_destroy;
IBUS_CONFIG_SERVICE_CLASS (object_class)->set_value = ibus_config_memconf_set_value;
g_type_class_add_private (class, sizeof (IBusBusPrivate));
}
+
#if 0
static gboolean
_connection_ibus_signal_cb (GDBusConnection *connection,
ibus_bus_hello (IBusBus *bus)
{
g_return_val_if_fail (IBUS_IS_BUS (bus), NULL);
- /* FIXME */
+ /* FIXME gdbus connection will say hello by self. */
#if 1
if (bus->priv->connection)
return g_dbus_connection_get_unique_name (bus->priv->connection);
#include "ibusshare.h"
#include "ibusconfigservice.h"
-#define IBUS_CONFIG_SERVICE_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_CONFIG_SERVICE, IBusConfigServicePrivate))
-
enum {
LAST_SIGNAL,
};
class->set_value = ibus_config_service_set_value;
class->get_value = ibus_config_service_get_value;
class->unset_value = ibus_config_service_unset_value;
-
- /* install properties */
- /*
- * g_type_class_add_private (class, sizeof (IBusConfigServicePrivate));
- */
}
static void
ibus_config_service_init (IBusConfigService *config)
{
- /*
- * config->priv = IBUS_CONFIG_SERVICE_GET_PRIVATE (config);
- */
}
static void
GParamSpec *pspec)
{
switch (prop_id) {
- #if 0
- case PROP_CONNECTION:
- ibus_service_add_to_connection ((IBusService *) config,
- g_value_get_object (value));
- break;
- #endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (config, prop_id, pspec);
}
NULL);
}
-#if 0
-static void
-_send_signal (IBusEngine *engine,
- const gchar *name,
- GType first_arg_type,
- ...)
-{
- g_assert (IBUS_IS_ENGINE (engine));
- g_assert (name != NULL);
-
- va_list args;
- const gchar *path;
- IBusEnginePrivate *priv;
-
- priv = IBUS_ENGINE_GET_PRIVATE (engine);
-
- path = ibus_service_get_path ((IBusService *)engine);
-
- va_start (args, first_arg_type);
- ibus_connection_send_signal_valist (priv->connection,
- path,
- IBUS_INTERFACE_ENGINE,
- name,
- first_arg_type,
- args);
- va_end (args);
-}
-#endif
-
IBusEngine *
ibus_engine_new (const gchar *engine_name,
const gchar *object_path,
GParamSpec *pspec)
{
switch (prop_id) {
- #if 0
- case PROP_CONNECTION:
- priv->connection = g_value_get_object (value);
- g_object_ref_sink (priv->connection);
- ibus_service_add_to_connection ((IBusService *) factory,
- priv->connection);
- break;
- #endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (factory, prop_id, pspec);
}
GParamSpec *pspec)
{
switch (prop_id) {
- #if 0
- case PROP_CONNECTION:
- g_value_set_object (value, priv->connection);
- break;
- #endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (factory, prop_id, pspec);
}
class->show_preedit_text = ibus_panel_service_not_implemented;
class->start_setup = ibus_panel_service_not_implemented;
class->state_changed = ibus_panel_service_not_implemented;
-
- /* install properties */
- #if 0
- /**
- * IBusPanelService:connection:
- *
- * Connection of this IBusPanelService.
- */
- g_object_class_install_property (gobject_class,
- PROP_CONNECTION,
- g_param_spec_object ("connection",
- "connection",
- "The connection of service object",
- IBUS_TYPE_CONNECTION,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- #endif
}
static void
GParamSpec *pspec)
{
switch (prop_id) {
- #if 0
- case PROP_CONNECTION:
- ibus_service_add_to_connection ((IBusService *) panel,
- g_value_get_object (value));
- break;
- #endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (panel, prop_id, pspec);
}
GParamSpec *pspec)
{
switch (prop_id) {
- #if 0
- case PROP_CONNECTION:
- break;
- #endif
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (panel, prop_id, pspec);
}
#define IBUS_SERVICE_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_SERVICE, IBusServicePrivate))
-/* XXX */
enum {
LAST_SIGNAL
};