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

« back to all changes in this revision

Viewing changes to bus/server.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 __SERVER_H_
23
 
#define __SERVER_H_
 
22
#ifndef __BUS_SERVER_H_
 
23
#define __BUS_SERVER_H_
24
24
 
25
25
#include <ibus.h>
26
 
#include "dbusimpl.h"
27
 
#include "ibusimpl.h"
28
 
 
29
 
/*
30
 
 * Type macros.
31
 
 */
32
 
 
33
 
/* define GOBJECT macros */
34
 
#define BUS_TYPE_SERVER             \
35
 
    (bus_server_get_type ())
36
 
#define BUS_SERVER(obj)             \
37
 
    (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_SERVER, BusServer))
38
 
#define BUS_SERVER_CLASS(klass)     \
39
 
    (G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_SERVER, BusServerClass))
40
 
#define BUS_IS_SERVER(obj)          \
41
 
    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_SERVER))
42
 
#define BUS_IS_SERVER_CLASS(klass)  \
43
 
    (G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_SERVER))
44
 
#define BUS_SERVER_GET_CLASS(obj)   \
45
 
    (G_TYPE_INSTANCE_GET_CLASS ((obj), BUS_TYPE_SERVER, BusServerClass))
46
 
#define BUS_DEFAULT_SERVER          \
47
 
    (bus_server_get_default ())
48
26
 
49
27
G_BEGIN_DECLS
50
28
 
51
 
typedef struct _BusServer BusServer;
52
 
typedef struct _BusServerClass BusServerClass;
53
 
 
54
 
struct _BusServer {
55
 
    IBusServer parent;
56
 
 
57
 
    /* instance members */
58
 
    GMainLoop *loop;
59
 
 
60
 
    BusDBusImpl *dbus;
61
 
    BusIBusImpl *ibus;
62
 
 
63
 
};
64
 
 
65
 
struct _BusServerClass {
66
 
  IBusServerClass parent;
67
 
 
68
 
  /* class members */
69
 
};
70
 
 
71
 
GType            bus_server_get_type        (void);
72
 
BusServer       *bus_server_get_default     (void);
73
 
gboolean         bus_server_listen          (BusServer  *server);
74
 
void             bus_server_run             (BusServer  *server);
75
 
void             bus_server_quit            (BusServer  *server);
 
29
/**
 
30
 * bus_server_init:
 
31
 *
 
32
 * Initialize GDBus server and write the server address to a file, which is (usually) in ~/.config/ibus/bus/.
 
33
 * Note that the function does not call g_main_loop_run.
 
34
 */
 
35
void         bus_server_init        (void);
 
36
 
 
37
/**
 
38
 * bus_server_run:
 
39
 *
 
40
 * Enter the glib main loop. You have to call bus_server_init before calling this function.
 
41
 */
 
42
void         bus_server_run         (void);
 
43
 
 
44
/**
 
45
 * bus_server_quit:
 
46
 *
 
47
 * Quit the glib main loop.
 
48
 */
 
49
void         bus_server_quit        (void);
 
50
 
 
51
/**
 
52
 * bus_server_get_address:
 
53
 * @returns: The server address, e.g. "unix:abstract=/tmp/dbus-aEUnr11L,guid=8b343aaa69eabb9b282dce6f4cdbb4aa"
 
54
 *
 
55
 * Get the server address. This function might return NULL if it is called before initializing the server by
 
56
 * calling bus_server_init.
 
57
 */
 
58
const gchar *bus_server_get_address (void);
76
59
 
77
60
G_END_DECLS
78
61
#endif
79