/usr/include/ibus-1.0/ibuscomponent.h is in libibus-1.0-dev 1.5.17-3ubuntu4.
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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/* vim:set et sts=4: */
/* bus - The Input Bus
* Copyright (C) 2008-2015 Peng Huang <shawn.p.huang@gmail.com>
* Copyright (C) 2008-2015 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_COMPONENT_H_
#define __IBUS_COMPONENT_H_
/**
* SECTION: ibuscomponent
* @short_description: Component (executable) specification.
* @title: IBusComponent
* @stability: Stable
*
* An IBusComponent is an executable program.
* It provides services such as user interface, configuration,
* and input method engine (IME).
*
* It is recommended that IME developers provide
* a component XML file and
* load the XML file by ibus_component_new_from_file().
*
* The format of a component XML file is described at
* <ulink url="https://github.com/ibus/ibus/wiki/DevXML">https://github.com/ibus/ibus/wiki/DevXML</ulink>
*/
#include "ibusserializable.h"
#include "ibusobservedpath.h"
#include "ibusenginedesc.h"
#include "ibusxml.h"
/*
* Type macros.
*/
/* define GOBJECT macros */
#define IBUS_TYPE_COMPONENT \
(ibus_component_get_type ())
#define IBUS_COMPONENT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_COMPONENT, IBusComponent))
#define IBUS_COMPONENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_COMPONENT, IBusComponentClass))
#define IBUS_IS_COMPONENT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_COMPONENT))
#define IBUS_IS_COMPONENT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_COMPONENT))
#define IBUS_COMPONENT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_COMPONENT, IBusComponentClass))
G_BEGIN_DECLS
typedef struct _IBusComponent IBusComponent;
typedef struct _IBusComponentClass IBusComponentClass;
typedef struct _IBusComponentPrivate IBusComponentPrivate;
/**
* IBusComponent:
*
* An IBusComponent stores component information.
* You can get extended values with g_object_get_properties.
*/
struct _IBusComponent {
/*< private >*/
IBusSerializable parent;
IBusComponentPrivate *priv;
/* instance members */
/*< public >*/
/*< private >*/
/* padding */
gpointer pdummy[7]; // We can add 7 pointers without breaking the ABI.
};
struct _IBusComponentClass {
IBusSerializableClass parent;
/* class members */
};
GType ibus_component_get_type (void);
/**
* ibus_component_new:
* @name: Name of the component.
* @description: Detailed description of component.
* @version: Component version.
* @license: Distribution license of this component.
* @author: Author(s) of the component.
* @homepage: Homepage of the component.
* @command_line: path to component executable.
* @textdomain: Domain name for dgettext()
*
* Creates a new #IBusComponent.
*
* Returns: A newly allocated #IBusComponent.
*/
IBusComponent *ibus_component_new (const gchar *name,
const gchar *description,
const gchar *version,
const gchar *license,
const gchar *author,
const gchar *homepage,
const gchar *command_line,
const gchar *textdomain);
/**
* ibus_component_new_varargs:
* @first_property_name: Name of the first property.
* @...: the NULL-terminated arguments of the properties and values.
*
* Creates a new #IBusComponent.
* ibus_component_new_varargs() supports the va_list format.
* name property is required. e.g.
* IBusComponent *component = ibus_component_new_varargs ("name", "ibus-foo",
* "command_line", "/usr/libexec/ibus-engine-foo --ibus",
* NULL)
*
* Returns: A newly allocated #IBusComponent.
*/
IBusComponent *ibus_component_new_varargs (const gchar *first_property_name,
...);
/**
* ibus_component_new_from_xml_node:
* @node: Root node of component XML tree.
*
* Creates a new #IBusComponent from an XML tree.
*
* Returns: A newly allocated #IBusComponent.
*/
IBusComponent *ibus_component_new_from_xml_node
(XMLNode *node);
/**
* ibus_component_new_from_file:
* @filename: An XML file that contains component information.
*
* Creates a new #IBusComponent from an XML file.
* Note that a component file usually contains engine descriptions,
* if it does, ibus_engine_desc_new_from_xml_node() will be called
* to load the engine descriptions.
*
* Returns: A newly allocated #IBusComponent.
*/
IBusComponent *ibus_component_new_from_file (const gchar *filename);
/**
* ibus_component_get_name:
* @component: An #IBusComponent
*
* Gets the name property in #IBusComponent. It should not be freed.
*
* Returns: name property in #IBusComponent
*/
const gchar *ibus_component_get_name (IBusComponent *component);
/**
* ibus_component_get_description:
* @component: An #IBusComponent
*
* Gets the description property in #IBusComponent. It should not be freed.
*
* Returns: description property in #IBusComponent
*/
const gchar *ibus_component_get_description (IBusComponent *component);
/**
* ibus_component_get_version:
* @component: An #IBusComponent
*
* Gets the version property in #IBusComponent. It should not be freed.
*
* Returns: version property in #IBusComponent
*/
const gchar *ibus_component_get_version (IBusComponent *component);
/**
* ibus_component_get_license:
* @component: An #IBusComponent
*
* Gets the license property in #IBusComponent. It should not be freed.
*
* Returns: license property in #IBusComponent
*/
const gchar *ibus_component_get_license (IBusComponent *component);
/**
* ibus_component_get_author:
* @component: An #IBusComponent
*
* Gets the author property in #IBusComponent. It should not be freed.
*
* Returns: author property in #IBusComponent
*/
const gchar *ibus_component_get_author (IBusComponent *component);
/**
* ibus_component_get_homepage:
* @component: An #IBusComponent
*
* Gets the homepage property in #IBusComponent. It should not be freed.
*
* Returns: homepage property in #IBusComponent
*/
const gchar *ibus_component_get_homepage (IBusComponent *component);
/**
* ibus_component_get_exec:
* @component: An #IBusComponent
*
* Gets the exec property in #IBusComponent. It should not be freed.
*
* Returns: exec property in #IBusComponent
*/
const gchar *ibus_component_get_exec (IBusComponent *component);
/**
* ibus_component_get_textdomain:
* @component: An #IBusComponent
*
* Gets the textdomain property in #IBusComponent. It should not be freed.
*
* Returns: textdomain property in #IBusComponent
*/
const gchar *ibus_component_get_textdomain (IBusComponent *component);
/**
* ibus_component_add_observed_path:
* @component: An #IBusComponent
* @path: Observed path to be added.
* @access_fs: %TRUE for filling the file status; %FALSE otherwise.
*
* Add an observed path to #IBusComponent.
*/
void ibus_component_add_observed_path
(IBusComponent *component,
const gchar *path,
gboolean access_fs);
/**
* ibus_component_add_engine:
* @component: An #IBusComponent
* @engine: A description of an engine.
*
* Add an engine to #IBusComponent according to the description in @engine.
*/
void ibus_component_add_engine (IBusComponent *component,
IBusEngineDesc *engine);
/**
* ibus_component_get_engines:
* @component: An #IBusComponent.
*
* Gets the engines of this component.
*
* Returns: (transfer container) (element-type IBusEngineDesc):
* A newly allocated GList that contains engines.
*/
GList *ibus_component_get_engines (IBusComponent *component);
/**
* ibus_component_output:
* @component: An #IBusComponent.
* @output: GString that holds the result.
* @indent: level of indent.
*
* Output #IBusComponent as an XML-formatted string.
* The output string can be then shown on the screen or written to file.
*/
void ibus_component_output (IBusComponent *component,
GString *output,
gint indent);
/**
* ibus_component_output_engines:
* @component: An #IBusComponent.
* @output: GString that holds the result.
* @indent: level of indent.
*
* Output engine description as an XML-formatted string.
* The output string can be then shown on the screen or written to file.
*/
void ibus_component_output_engines (IBusComponent *component,
GString *output,
gint indent);
/**
* ibus_component_check_modification:
* @component: An #IBusComponent.
*
* Check whether the observed paths of component is modified.
*
* Returns: %TRUE if at least one of the observed paths is modified;
* %FALSE otherwise.
*/
gboolean ibus_component_check_modification
(IBusComponent *component);
/**
* ibus_component_get_observed_paths:
* @component: An #IBusComponent.
*
* Gets the observed paths of this component.
*
* Returns: (transfer container) (element-type IBusObservedPath): A
* newly allocated GList that contains observed paths.
*/
GList *ibus_component_get_observed_paths
(IBusComponent *component);
G_END_DECLS
#endif
|