Fix make rpm errors due to ibus-dconf and pygobject override
[platform/upstream/ibus.git] / src / ibusattrlist.h
1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2 /* vim:set et sts=4: */
3 /* IBus - The Input Bus
4  * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
5  * Copyright (C) 2008-2010 Red Hat, Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION)
24 #error "Only <ibus.h> can be included directly"
25 #endif
26
27 /**
28  * SECTION: ibusattrlist
29  * @Title: IBusAttrList
30  * @Short_description: AttrList of IBusText.
31  * @See_also: #IBusAttribute #IBusText
32  * @Stability: Stable
33  *
34  */
35 #ifndef __IBUS_ATTRIBUTE_LIST_H_
36 #define __IBUS_ATTRIBUTE_LIST_H_
37
38 #include "ibusattribute.h"
39
40 G_BEGIN_DECLS
41
42 /*
43  * Type macros.
44  */
45 /* define IBusAttrList macros */
46 #define IBUS_TYPE_ATTR_LIST             \
47     (ibus_attr_list_get_type ())
48 #define IBUS_ATTR_LIST(obj)             \
49     (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrList))
50 #define IBUS_ATTR_LIST_CLASS(klass)     \
51     (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ATTR_LIST, IBusAttrListClass))
52 #define IBUS_IS_ATTR_LIST(obj)          \
53     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ATTR_LIST))
54 #define IBUS_IS_ATTR_LIST_CLASS(klass)  \
55     (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ATTR_LIST))
56 #define IBUS_ATTR_LIST_GET_CLASS(obj)   \
57     (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrListClass))
58
59
60 typedef struct _IBusAttrList IBusAttrList;
61 typedef struct _IBusAttrListClass IBusAttrListClass;
62
63 /**
64  * IBusAttrList:
65  * @attributes: GArray that holds #IBusAttribute.
66  *
67  * Array of IBusAttribute.
68  */
69 struct _IBusAttrList {
70     IBusSerializable parent;
71
72     /*< public >*/
73     GArray *attributes;
74 };
75
76 struct _IBusAttrListClass {
77     IBusSerializableClass parent;
78 };
79
80 /**
81  * ibus_attr_list_get_type:
82  * @returns: GType of IBusAttrList.
83  *
84  * Returns GType of IBusAttrList.
85  */
86 GType                ibus_attr_list_get_type    ();
87
88 /**
89  * ibus_attr_list_new:
90  * @returns: A newly allocated IBusAttrList.
91  *
92  * New an IBusAttrList.
93  */
94 IBusAttrList        *ibus_attr_list_new         ();
95
96 /**
97  * ibus_attr_list_append:
98  * @attr_list: An IBusAttrList instance.
99  * @attr: The IBusAttribute instance to be appended.
100  *
101  * Append an IBusAttribute to IBusAttrList, and increase reference.
102  */
103 void                 ibus_attr_list_append      (IBusAttrList   *attr_list,
104                                                  IBusAttribute  *attr);
105 /**
106  * ibus_attr_list_get:
107  * @attr_list: An IBusAttrList instance.
108  * @index: Index of the @attr_list.
109  * @returns: (transfer none): IBusAttribute at given index, NULL if no such IBusAttribute.
110  *
111  * Returns IBusAttribute at given index. Borrowed reference.
112  */
113 IBusAttribute       *ibus_attr_list_get         (IBusAttrList   *attr_list,
114                                                  guint           index);
115
116 G_END_DECLS
117 #endif
118