gtkwidgetpath.h 8.65 KB
Newer Older
Carlos Garnacho's avatar
Carlos Garnacho committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* GTK - The GIMP Toolkit
 * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
 *
 * 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 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
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
Carlos Garnacho's avatar
Carlos Garnacho committed
16 17
 */

18 19 20
#ifndef __GTK_WIDGET_PATH_H__
#define __GTK_WIDGET_PATH_H__

21 22 23 24
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif

Carlos Garnacho's avatar
Carlos Garnacho committed
25
#include <glib-object.h>
26
#include <gdk/gdk.h>
27
#include <gtk/gtkenums.h>
28
#include <gtk/gtktypes.h>
Carlos Garnacho's avatar
Carlos Garnacho committed
29 30 31

G_BEGIN_DECLS

32
#define GTK_TYPE_WIDGET_PATH (gtk_widget_path_get_type ())
Carlos Garnacho's avatar
Carlos Garnacho committed
33

34
GDK_AVAILABLE_IN_ALL
35
GType           gtk_widget_path_get_type            (void) G_GNUC_CONST;
36
GDK_AVAILABLE_IN_ALL
37
GtkWidgetPath * gtk_widget_path_new                 (void);
Carlos Garnacho's avatar
Carlos Garnacho committed
38

39
GDK_AVAILABLE_IN_ALL
40
GtkWidgetPath * gtk_widget_path_copy                (const GtkWidgetPath *path);
41
GDK_AVAILABLE_IN_3_2
42
GtkWidgetPath * gtk_widget_path_ref                 (GtkWidgetPath       *path);
43
GDK_AVAILABLE_IN_3_2
44
void            gtk_widget_path_unref               (GtkWidgetPath       *path);
45
GDK_AVAILABLE_IN_ALL
46
void            gtk_widget_path_free                (GtkWidgetPath       *path);
Carlos Garnacho's avatar
Carlos Garnacho committed
47

48
GDK_AVAILABLE_IN_3_2
49
char *          gtk_widget_path_to_string           (const GtkWidgetPath *path);
50
GDK_AVAILABLE_IN_ALL
51
gint            gtk_widget_path_length              (const GtkWidgetPath *path);
Carlos Garnacho's avatar
Carlos Garnacho committed
52

53
GDK_AVAILABLE_IN_ALL
54
gint            gtk_widget_path_append_type         (GtkWidgetPath       *path,
55
                                                     GType                type);
56
GDK_AVAILABLE_IN_ALL
57
void            gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
58
                                                     GType                type);
59
GDK_AVAILABLE_IN_3_2
60 61 62
gint            gtk_widget_path_append_with_siblings(GtkWidgetPath       *path,
                                                     GtkWidgetPath       *siblings,
                                                     guint                sibling_index);
63
/* gtk_widget_path_append_for_widget() is declared in gtkwidget.c */
64
GDK_AVAILABLE_IN_3_2
65 66
gint            gtk_widget_path_append_for_widget   (GtkWidgetPath       *path,
                                                     GtkWidget           *widget);
Carlos Garnacho's avatar
Carlos Garnacho committed
67

68
GDK_AVAILABLE_IN_ALL
69 70
GType               gtk_widget_path_iter_get_object_type  (const GtkWidgetPath *path,
                                                           gint                 pos);
71
GDK_AVAILABLE_IN_ALL
72 73 74
void                gtk_widget_path_iter_set_object_type  (GtkWidgetPath       *path,
                                                           gint                 pos,
                                                           GType                type);
75 76 77 78 79 80 81
GDK_AVAILABLE_IN_3_20
const char *        gtk_widget_path_iter_get_object_name  (const GtkWidgetPath *path,
                                                           gint                 pos);
GDK_AVAILABLE_IN_3_20
void                gtk_widget_path_iter_set_object_name  (GtkWidgetPath       *path,
                                                           gint                 pos,
                                                           const char          *name);
82
GDK_AVAILABLE_IN_ALL
83 84 85
const GtkWidgetPath *
                    gtk_widget_path_iter_get_siblings     (const GtkWidgetPath *path,
                                                           gint                 pos);
86
GDK_AVAILABLE_IN_ALL
87 88
guint               gtk_widget_path_iter_get_sibling_index(const GtkWidgetPath *path,
                                                           gint                 pos);
Carlos Garnacho's avatar
Carlos Garnacho committed
89

90
GDK_AVAILABLE_IN_ALL
91
const gchar *          gtk_widget_path_iter_get_name  (const GtkWidgetPath *path,
92
                                                       gint                 pos);
93
GDK_AVAILABLE_IN_ALL
94
void                   gtk_widget_path_iter_set_name  (GtkWidgetPath       *path,
95
                                                       gint                 pos,
96
                                                       const gchar         *name);
97
GDK_AVAILABLE_IN_ALL
98
gboolean               gtk_widget_path_iter_has_name  (const GtkWidgetPath *path,
99
                                                       gint                 pos,
100
                                                       const gchar         *name);
101
GDK_AVAILABLE_IN_ALL
102
gboolean               gtk_widget_path_iter_has_qname (const GtkWidgetPath *path,
103
                                                       gint                 pos,
104
                                                       GQuark               qname);
105 106 107 108 109 110 111
GDK_AVAILABLE_IN_3_14
GtkStateFlags          gtk_widget_path_iter_get_state (const GtkWidgetPath *path,
                                                       gint                 pos);
GDK_AVAILABLE_IN_3_14
void                   gtk_widget_path_iter_set_state (GtkWidgetPath       *path,
                                                       gint                 pos,
                                                       GtkStateFlags        state);
112

113
GDK_AVAILABLE_IN_ALL
114
void     gtk_widget_path_iter_add_class     (GtkWidgetPath       *path,
115
                                             gint                 pos,
116
                                             const gchar         *name);
117
GDK_AVAILABLE_IN_ALL
118
void     gtk_widget_path_iter_remove_class  (GtkWidgetPath       *path,
119
                                             gint                 pos,
120
                                             const gchar         *name);
121
GDK_AVAILABLE_IN_ALL
122
void     gtk_widget_path_iter_clear_classes (GtkWidgetPath       *path,
123
                                             gint                 pos);
124
GDK_AVAILABLE_IN_ALL
125
GSList * gtk_widget_path_iter_list_classes  (const GtkWidgetPath *path,
126
                                             gint                 pos);
127
GDK_AVAILABLE_IN_ALL
128
gboolean gtk_widget_path_iter_has_class     (const GtkWidgetPath *path,
129
                                             gint                 pos,
130
                                             const gchar         *name);
131
GDK_AVAILABLE_IN_ALL
132
gboolean gtk_widget_path_iter_has_qclass    (const GtkWidgetPath *path,
133
                                             gint                 pos,
134 135
                                             GQuark               qname);

136
GDK_DEPRECATED_IN_3_14
137
void     gtk_widget_path_iter_add_region    (GtkWidgetPath      *path,
138
                                             gint                pos,
139
                                             const gchar        *name,
140
                                             GtkRegionFlags     flags);
141
GDK_DEPRECATED_IN_3_14
142
void     gtk_widget_path_iter_remove_region (GtkWidgetPath      *path,
143
                                             gint                pos,
144
                                             const gchar        *name);
145
GDK_DEPRECATED_IN_3_14
146
void     gtk_widget_path_iter_clear_regions (GtkWidgetPath      *path,
147
                                             gint                pos);
148

149
GDK_DEPRECATED_IN_3_14
150
GSList * gtk_widget_path_iter_list_regions  (const GtkWidgetPath *path,
151
                                             gint                 pos);
152

153
GDK_DEPRECATED_IN_3_14
154
gboolean gtk_widget_path_iter_has_region    (const GtkWidgetPath *path,
155
                                             gint                 pos,
156
                                             const gchar         *name,
157
                                             GtkRegionFlags      *flags);
158
GDK_DEPRECATED_IN_3_14
159
gboolean gtk_widget_path_iter_has_qregion   (const GtkWidgetPath *path,
160
                                             gint                 pos,
161
                                             GQuark               qname,
162
                                             GtkRegionFlags      *flags);
163

164
GDK_AVAILABLE_IN_ALL
165
GType           gtk_widget_path_get_object_type (const GtkWidgetPath *path);
166

167
GDK_AVAILABLE_IN_ALL
168 169
gboolean        gtk_widget_path_is_type    (const GtkWidgetPath *path,
                                            GType                type);
170
GDK_AVAILABLE_IN_ALL
171 172
gboolean        gtk_widget_path_has_parent (const GtkWidgetPath *path,
                                            GType                type);
Carlos Garnacho's avatar
Carlos Garnacho committed
173

174

Carlos Garnacho's avatar
Carlos Garnacho committed
175 176 177
G_END_DECLS

#endif /* __GTK_WIDGET_PATH_H__ */