|
Packit Service |
1d8f1c |
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
|
Packit Service |
1d8f1c |
/* vim:set et sts=4: */
|
|
Packit Service |
1d8f1c |
/* ibus - The Input Bus
|
|
Packit Service |
1d8f1c |
* Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit Service |
1d8f1c |
* Copyright (C) 2008-2013 Red Hat, Inc.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
1d8f1c |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
1d8f1c |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
1d8f1c |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
1d8f1c |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
1d8f1c |
* Lesser General Public License for more details.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
1d8f1c |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
1d8f1c |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit Service |
1d8f1c |
* USA
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION)
|
|
Packit Service |
1d8f1c |
#error "Only <ibus.h> can be included directly"
|
|
Packit Service |
1d8f1c |
#endif
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#ifndef __IBUS_PROXY_H_
|
|
Packit Service |
1d8f1c |
#define __IBUS_PROXY_H_
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* SECTION: ibusproxy
|
|
Packit Service |
1d8f1c |
* @short_description: Base proxy object.
|
|
Packit Service |
1d8f1c |
* @stability: Stable
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* An IBusProxy is the base of all proxy objects,
|
|
Packit Service |
1d8f1c |
* which communicate the corresponding #IBusServices on the other end of
|
|
Packit Service |
1d8f1c |
* IBusConnection.
|
|
Packit Service |
1d8f1c |
* For example, IBus clients (such as editors, web browsers) invoke the proxy
|
|
Packit Service |
1d8f1c |
* object,
|
|
Packit Service |
1d8f1c |
* IBusInputContext to communicate with the InputContext service of the
|
|
Packit Service |
1d8f1c |
* ibus-daemon.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Almost all services have corresponding proxies, except very simple services.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#include <gio/gio.h>
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/*
|
|
Packit Service |
1d8f1c |
* Type macros.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/* define GOBJECT macros */
|
|
Packit Service |
1d8f1c |
#define IBUS_TYPE_PROXY \
|
|
Packit Service |
1d8f1c |
(ibus_proxy_get_type ())
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROXY, IBusProxy))
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_PROXY, IBusProxyClass))
|
|
Packit Service |
1d8f1c |
#define IBUS_IS_PROXY(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PROXY))
|
|
Packit Service |
1d8f1c |
#define IBUS_IS_PROXY_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROXY))
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_GET_CLASS(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROXY, IBusProxyClass))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
G_BEGIN_DECLS
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
typedef struct _IBusProxy IBusProxy;
|
|
Packit Service |
1d8f1c |
typedef struct _IBusProxyClass IBusProxyClass;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_FLAGS(obj) (IBUS_PROXY (obj)->flags)
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS (obj) |= (flag)); }G_STMT_END
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS (obj) &= ~(flag)); }G_STMT_END
|
|
Packit Service |
1d8f1c |
#define IBUS_PROXY_DESTROYED(obj) (IBUS_PROXY_FLAGS (obj) & IBUS_DESTROYED)
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* IBusProxy:
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* An opaque data type representing an IBusProxy.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
struct _IBusProxy {
|
|
Packit Service |
1d8f1c |
GDBusProxy parent;
|
|
Packit Service |
1d8f1c |
/* instance members */
|
|
Packit Service |
1d8f1c |
guint32 flags;
|
|
Packit Service |
1d8f1c |
gboolean own;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
struct _IBusProxyClass {
|
|
Packit Service |
1d8f1c |
GDBusProxyClass parent;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/* class members */
|
|
Packit Service |
1d8f1c |
void (* destroy) (IBusProxy *proxy);
|
|
Packit Service |
1d8f1c |
/*< private >*/
|
|
Packit Service |
1d8f1c |
/* padding */
|
|
Packit Service |
1d8f1c |
gpointer pdummy[7];
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GType ibus_proxy_get_type (void);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* ibus_proxy_destroy:
|
|
Packit Service |
1d8f1c |
* @proxy: An #IBusProxy
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Dispose the proxy object. If the dbus connection is alive and the own
|
|
Packit Service |
1d8f1c |
* variable above is TRUE (which is the default),
|
|
Packit Service |
1d8f1c |
* org.freedesktop.IBus.Service.Destroy method will be called.
|
|
Packit Service |
1d8f1c |
* Note that "destroy" signal might be emitted when ibus_proxy_destroy is
|
|
Packit Service |
1d8f1c |
* called or the underlying dbus connection for the proxy is terminated.
|
|
Packit Service |
1d8f1c |
* In the callback of the destroy signal, you might have to call something
|
|
Packit Service |
1d8f1c |
* like 'g_object_unref(the_proxy);'.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
void ibus_proxy_destroy (IBusProxy *proxy);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
G_END_DECLS
|
|
Packit Service |
1d8f1c |
#endif
|
|
Packit Service |
1d8f1c |
|