|
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_PROP_LIST_H_
|
|
Packit Service |
1d8f1c |
#define __IBUS_PROP_LIST_H_
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* SECTION: ibusproplist
|
|
Packit Service |
1d8f1c |
* @Title: IBusPropList
|
|
Packit Service |
1d8f1c |
* @Short_description: An #IBusProperty container.
|
|
Packit Service |
1d8f1c |
* @Stability: Stable
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* See_also: #IBusProperty, #IBusEngine
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
#include "ibusserializable.h"
|
|
Packit Service |
1d8f1c |
#include "ibusproperty.h"
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
G_BEGIN_DECLS
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/*
|
|
Packit Service |
1d8f1c |
* Type macros.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
/* define IBusPropList macros */
|
|
Packit Service |
1d8f1c |
#define IBUS_TYPE_PROP_LIST \
|
|
Packit Service |
1d8f1c |
(ibus_prop_list_get_type ())
|
|
Packit Service |
1d8f1c |
#define IBUS_PROP_LIST(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROP_LIST, IBusPropList))
|
|
Packit Service |
1d8f1c |
#define IBUS_PROP_LIST_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_PROP_LIST, IBusPropListClass))
|
|
Packit Service |
1d8f1c |
#define IBUS_IS_PROP_LIST(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PROP_LIST))
|
|
Packit Service |
1d8f1c |
#define IBUS_IS_PROP_LIST_CLASS(klass) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROP_LIST))
|
|
Packit Service |
1d8f1c |
#define IBUS_PROP_LIST_GET_CLASS(obj) \
|
|
Packit Service |
1d8f1c |
(G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROP_LIST, IBusPropListClass))
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/* FIXME: https://mail.gnome.org/archives/gtk-doc-list/2015-July/msg00004.html
|
|
Packit Service |
1d8f1c |
* If ibusproperty.h and ibusproplist.h includes each other,
|
|
Packit Service |
1d8f1c |
* gtk-doc build outputs several warnings:
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* # cd html && gtkdoc-mkhtml ibus ../ibus-docs.sgml
|
|
Packit Service |
1d8f1c |
* ../ibus-docs.sgml:4: element refentry: validity error : ID IBusPropList
|
|
Packit Service |
1d8f1c |
* already defined
|
|
Packit Service |
1d8f1c |
* ../ibus-docs.sgml:172: element refsect2: validity error : ID
|
|
Packit Service |
1d8f1c |
* IBusPropListClass already defined
|
|
Packit Service |
1d8f1c |
* Warning: multiple "IDs" for constraint linkend: IBusPropList.
|
|
Packit Service |
1d8f1c |
* Warning: multiple "IDs" for constraint linkend: IBusPropList.
|
|
Packit Service |
1d8f1c |
* Warning: multiple "IDs" for constraint linkend: IBusPropListClass.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
#ifndef __PROPLIST_DEFINED
|
|
Packit Service |
1d8f1c |
#define __PROPLIST_DEFINED
|
|
Packit Service |
1d8f1c |
typedef struct _IBusPropList IBusPropList;
|
|
Packit Service |
1d8f1c |
typedef struct _IBusPropListClass IBusPropListClass;
|
|
Packit Service |
1d8f1c |
#endif
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* IBusPropList:
|
|
Packit Service |
1d8f1c |
* @properties: GArray that holds IBusProperties.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* An array of IBusProperties.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
struct _IBusPropList {
|
|
Packit Service |
1d8f1c |
IBusSerializable parent;
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/*< public >*/
|
|
Packit Service |
1d8f1c |
GArray *properties;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* IBusPropListClass:
|
|
Packit Service |
1d8f1c |
* @parent: The parent class.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Class structure for #IBusPropList.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
struct _IBusPropListClass {
|
|
Packit Service |
1d8f1c |
IBusSerializableClass parent;
|
|
Packit Service |
1d8f1c |
};
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
GType ibus_prop_list_get_type ();
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* ibus_prop_list_new:
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Create a new #IBusPropList.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Returns: A newly allocated #IBusPropList.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
IBusPropList *ibus_prop_list_new ();
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* ibus_prop_list_append:
|
|
Packit Service |
1d8f1c |
* @prop_list: An IBusPropList.
|
|
Packit Service |
1d8f1c |
* @prop: IBusProperty to be append to @prop_list.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Append an IBusProperty to an IBusPropList, and increase reference.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
void ibus_prop_list_append (IBusPropList *prop_list,
|
|
Packit Service |
1d8f1c |
IBusProperty *prop);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* ibus_prop_list_get:
|
|
Packit Service |
1d8f1c |
* @prop_list: An IBusPropList.
|
|
Packit Service |
1d8f1c |
* @index: Index of an IBusPropList.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Gets #IBusProperty at given index. Borrowed reference.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Returns: (transfer none): #IBusProperty at given index, %NULL if no such
|
|
Packit Service |
1d8f1c |
* #IBusProperty.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
IBusProperty *ibus_prop_list_get (IBusPropList *prop_list,
|
|
Packit Service |
1d8f1c |
guint index);
|
|
Packit Service |
1d8f1c |
|
|
Packit Service |
1d8f1c |
/**
|
|
Packit Service |
1d8f1c |
* ibus_prop_list_update_property:
|
|
Packit Service |
1d8f1c |
* @prop_list: An IBusPropList.
|
|
Packit Service |
1d8f1c |
* @prop: IBusProperty to be update.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Update an IBusProperty in IBusPropList.
|
|
Packit Service |
1d8f1c |
*
|
|
Packit Service |
1d8f1c |
* Returns: %TRUE if succeeded, %FALSE otherwise.
|
|
Packit Service |
1d8f1c |
*/
|
|
Packit Service |
1d8f1c |
gboolean ibus_prop_list_update_property
|
|
Packit Service |
1d8f1c |
(IBusPropList *prop_list,
|
|
Packit Service |
1d8f1c |
IBusProperty *prop);
|
|
Packit Service |
1d8f1c |
G_END_DECLS
|
|
Packit Service |
1d8f1c |
#endif
|