/usr/include/ibus-1.0/ibusservice.h is in libibus-1.0-dev 1.5.9-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/* vim:set et sts=4: */
/* ibus - The Input Bus
* Copyright (C) 2008-2013 Peng Huang <shawn.p.huang@gmail.com>
* Copyright (C) 2008-2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*/
#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION)
#error "Only <ibus.h> can be included directly"
#endif
#ifndef __IBUS_SERVICE_H_
#define __IBUS_SERVICE_H_
/**
* SECTION: ibusservice
* @short_description: IBus service back-end.
* @stability: Stable
*
* An IBusService is a base class for services.
*/
#include <gio/gio.h>
#include "ibusobject.h"
/*
* Type macros.
*/
/* define GOBJECT macros */
#define IBUS_TYPE_SERVICE \
(ibus_service_get_type ())
#define IBUS_SERVICE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERVICE, IBusService))
#define IBUS_SERVICE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_SERVICE, IBusServiceClass))
#define IBUS_IS_SERVICE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_SERVICE))
#define IBUS_IS_SERVICE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_SERVICE))
#define IBUS_SERVICE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_SERVICE, IBusServiceClass))
G_BEGIN_DECLS
typedef struct _IBusService IBusService;
typedef struct _IBusServiceClass IBusServiceClass;
typedef struct _IBusServicePrivate IBusServicePrivate;
/**
* IBusService:
*
* An opaque data type representing an IBusService.
*/
struct _IBusService {
/*< private >*/
IBusObject parent;
IBusServicePrivate *priv;
};
struct _IBusServiceClass {
/*< private >*/
IBusObjectClass parent;
/*< public >*/
/* virtual functions */
void (* service_method_call)
(IBusService *service,
GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
GVariant *parameters,
GDBusMethodInvocation
*invocation);
GVariant * (* service_get_property)
(IBusService *service,
GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *property_name,
GError **error);
gboolean (* service_set_property)
(IBusService *service,
GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *property_name,
GVariant *value,
GError **error);
/*< private >*/
GArray *interfaces;
/* padding */
gpointer pdummy[4];
};
GType ibus_service_get_type (void);
/**
* ibus_service_new:
* @path: Object path.
* @returns: A newly allocated IBusService
*
* New an IBusService.
*/
IBusService *ibus_service_new (GDBusConnection *connection,
const gchar *path);
/**
* ibus_service_get_object_path:
* @service: An IBusService.
* @returns: The object path of @service
*
* Returns the object path of an IBusService.
*/
const gchar *ibus_service_get_object_path (IBusService *service);
/**
* ibus_service_get_connection:
* @service: An IBusService.
* @returns: (transfer none): A #GDBusConnection of an #IBusService instance.
*
* Returns a connections.
*/
GDBusConnection *ibus_service_get_connection (IBusService *service);
/**
* ibus_service_register:
* @service: An IBusService.
* @connection: A GDBusConnection the service will be registered to.
* @error: Return location for error or NULL.
* @returns: TRUE if the service was registered, FALSE otherwise.
*
* Registers service to a connection.
*/
gboolean ibus_service_register (IBusService *service,
GDBusConnection *connection,
GError **error);
/**
* ibus_service_unregister:
* @service: An IBusService.
* @connection: A GDBusConnection the service was registered with.
*
* Unregisters service from a connection.
*/
void ibus_service_unregister (IBusService *service,
GDBusConnection *connection);
/**
* ibus_service_send_signal:
* @service: An IBusService.
* @interface: The interface the signal is emitted from.
* @name: Name of the signal.
* @first_arg_type: Type of first argument.
* @...: Rest of arguments, NULL to mark the end.
* @returns: TRUE if succeed; FALSE otherwise.
*
* Send signal to all the IBusConnections of an IBusService.
*
* see_also: g_dbus_connection_emit_signal()
*/
gboolean ibus_service_emit_signal (IBusService *service,
const gchar *dest_bus_name,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
GError **error);
/**
* ibus_service_class_add_interfaces:
* @klass: An IBusServiceClass.
* @xml_data: The introspection xml data.
*
* Set the interface introspection information with the service class.
*/
gboolean ibus_service_class_add_interfaces
(IBusServiceClass *klass,
const gchar *xml_data);
G_END_DECLS
#endif
|