~ubuntu-branches/ubuntu/quantal/ibus/quantal

« back to all changes in this revision

Viewing changes to bus/registry.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry Warsaw
  • Date: 2011-08-11 17:00:57 UTC
  • mfrom: (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110811170057-6dmbfs4s3cchzl7x
Tags: 1.3.99.20110419-1ubuntu1
* Merge with Debian unstable.  Remaining Ubuntu changes:
  - Indicator support:
    + Add 05_appindicator.patch: Use an indicator rather than a notification
      icon.
    + debian/control: Recommend python-appindicator.
  - debian/control: Install im-switch instead of im-config by default.
  - debian/README.source: Removed, it was outdated and no longer correct
  - debian/patches/01_ubuntu_desktop: Fix "Desktop entry needs the
    X-Ubuntu-Gettext-Domain key"  (LP: #457632)
  - debian/patches/02_title_update.patch: Rename "IBus Preferences" to
    "Keyboard Input Methods"
  - debian/patches/06_locale_parser.patch: Cherry-picked from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
20
 * Boston, MA 02111-1307, USA.
21
21
 */
22
 
#ifndef __REGISTRY_H_
23
 
#define __REGISTRY_H_
 
22
#ifndef __BUS_REGISTRY_H_
 
23
#define __BUS_REGISTRY_H_
24
24
 
25
25
#include <ibus.h>
26
 
#include "factoryproxy.h"
 
26
#include "component.h"
27
27
 
28
28
/*
29
29
 * Type macros.
48
48
typedef struct _BusRegistry BusRegistry;
49
49
typedef struct _BusRegistryClass BusRegistryClass;
50
50
 
51
 
struct _BusRegistry {
52
 
    IBusObject parent;
53
 
 
54
 
    /* instance members */
55
 
    GList *observed_paths;
56
 
    GList *components;
57
 
 
58
 
    GHashTable *engine_table;
59
 
    GList *active_engines;
60
 
 
61
 
 
62
 
#ifdef G_THREADS_ENABLED
63
 
    GThread *thread;
64
 
    gboolean thread_running;
65
 
    GMutex  *mutex;
66
 
    GCond   *cond;
67
 
    gboolean changed;
68
 
#endif
69
 
};
70
 
 
71
 
struct _BusRegistryClass {
72
 
    IBusObjectClass parent;
73
 
 
74
 
    /* class members */
75
 
};
76
 
 
77
51
GType            bus_registry_get_type          (void);
78
52
BusRegistry     *bus_registry_new               (void);
 
53
 
 
54
/**
 
55
 * bus_registry_get_components:
 
56
 * @returns: a list of BusComponent objects. The caller has to call g_list_free for the returned list.
 
57
 */
79
58
GList           *bus_registry_get_components    (BusRegistry    *registry);
 
59
 
 
60
/**
 
61
 * bus_registry_get_components:
 
62
 * @returns: a list of all IBusEngineDesc objects available. The caller has to call g_list_free for the returned list.
 
63
 */
80
64
GList           *bus_registry_get_engines       (BusRegistry    *registry);
 
65
 
 
66
/**
 
67
 * bus_registry_get_components:
 
68
 * @language: a language name like 'ja'
 
69
 * @returns: a list of IBusEngineDesc objects for the language. The caller has to call g_list_free for the returned list.
 
70
 */
81
71
GList           *bus_registry_get_engines_by_language
82
72
                                                (BusRegistry    *registry,
83
73
                                                 const gchar    *language);
 
74
 
 
75
/**
 
76
 * bus_registry_stop_all_components:
 
77
 *
 
78
 * Terminate all component processes.
 
79
 */
84
80
void             bus_registry_stop_all_components
85
81
                                                (BusRegistry    *registry);
86
82
 
87
 
IBusComponent   *bus_registry_lookup_component_by_name
 
83
/**
 
84
 * bus_registry_lookup_component_by_name:
 
85
 * @name: a component name such as 'org.freedesktop.IBus.Panel' and 'com.google.IBus.Mozc'
 
86
 * @returns: a BusComponent object, or NULL if such component is not found.
 
87
 */
 
88
BusComponent    *bus_registry_lookup_component_by_name
88
89
                                                (BusRegistry    *registry,
89
90
                                                 const gchar    *name);
 
91
 
 
92
/**
 
93
 * bus_registry_find_engine_by_name:
 
94
 * @name: an engine name like 'pinyin'
 
95
 * @returns: an IBusEngineDesc object, or NULL if not found.
 
96
 */
90
97
IBusEngineDesc  *bus_registry_find_engine_by_name
91
98
                                                (BusRegistry    *registry,
92
99
                                                 const gchar    *name);
93
 
BusFactoryProxy *bus_registry_name_owner_changed(BusRegistry    *registry,
 
100
 
 
101
/**
 
102
 * bus_registry_name_owner_changed:
 
103
 * @name: a unique or well-known name like ":1.1", "org.freedesktop.IBus.Config", "com.google.IBus.Mozc".
 
104
 * @old_name: a unique name like ":1.1", or empty string "" when the client is started.
 
105
 * @new_name: a unique name like ":1.1", or empty string "" when the client is stopped.
 
106
 *
 
107
 * Handle the "name-owner-changed" glib signal from dbusimpl. If a component is stopped, remove a BusFactoryProxy object from the
 
108
 * bus for the component. If a component is started, create a new BusFactoryProxy object for the bus.
 
109
 */
 
110
void             bus_registry_name_owner_changed
 
111
                                                (BusRegistry    *registry,
94
112
                                                 const gchar    *name,
95
113
                                                 const gchar    *old_name,
96
114
                                                 const gchar    *new_name);
 
115
 
97
116
#ifdef G_THREADS_ENABLED
98
117
void             bus_registry_start_monitor_changes
99
118
                                                (BusRegistry    *registry);