1/* GTK - The GIMP Toolkit
2 * Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __GTK_WIDGET_PATH_H__
19#define __GTK_WIDGET_PATH_H__
20
21#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gtk/gtk.h> can be included directly."
23#endif
24
25#include <glib-object.h>
26#include <gdk/gdk.h>
27#include <gtk/gtkenums.h>
28#include <gtk/gtktypes.h>
29
30G_BEGIN_DECLS
31
32#define GTK_TYPE_WIDGET_PATH (gtk_widget_path_get_type ())
33
34GDK_AVAILABLE_IN_ALL
35GType gtk_widget_path_get_type (void) G_GNUC_CONST;
36GDK_AVAILABLE_IN_ALL
37GtkWidgetPath * gtk_widget_path_new (void);
38
39GDK_AVAILABLE_IN_ALL
40GtkWidgetPath * gtk_widget_path_copy (const GtkWidgetPath *path);
41GDK_AVAILABLE_IN_3_2
42GtkWidgetPath * gtk_widget_path_ref (GtkWidgetPath *path);
43GDK_AVAILABLE_IN_3_2
44void gtk_widget_path_unref (GtkWidgetPath *path);
45GDK_AVAILABLE_IN_ALL
46void gtk_widget_path_free (GtkWidgetPath *path);
47
48GDK_AVAILABLE_IN_3_2
49char * gtk_widget_path_to_string (const GtkWidgetPath *path);
50GDK_AVAILABLE_IN_ALL
51gint gtk_widget_path_length (const GtkWidgetPath *path);
52
53GDK_AVAILABLE_IN_ALL
54gint gtk_widget_path_append_type (GtkWidgetPath *path,
55 GType type);
56GDK_AVAILABLE_IN_ALL
57void gtk_widget_path_prepend_type (GtkWidgetPath *path,
58 GType type);
59GDK_AVAILABLE_IN_3_2
60gint gtk_widget_path_append_with_siblings(GtkWidgetPath *path,
61 GtkWidgetPath *siblings,
62 guint sibling_index);
63/* gtk_widget_path_append_for_widget() is declared in gtkwidget.c */
64GDK_AVAILABLE_IN_3_2
65gint gtk_widget_path_append_for_widget (GtkWidgetPath *path,
66 GtkWidget *widget);
67
68GDK_AVAILABLE_IN_ALL
69GType gtk_widget_path_iter_get_object_type (const GtkWidgetPath *path,
70 gint pos);
71GDK_AVAILABLE_IN_ALL
72void gtk_widget_path_iter_set_object_type (GtkWidgetPath *path,
73 gint pos,
74 GType type);
75GDK_AVAILABLE_IN_3_20
76const char * gtk_widget_path_iter_get_object_name (const GtkWidgetPath *path,
77 gint pos);
78GDK_AVAILABLE_IN_3_20
79void gtk_widget_path_iter_set_object_name (GtkWidgetPath *path,
80 gint pos,
81 const char *name);
82GDK_AVAILABLE_IN_ALL
83const GtkWidgetPath *
84 gtk_widget_path_iter_get_siblings (const GtkWidgetPath *path,
85 gint pos);
86GDK_AVAILABLE_IN_ALL
87guint gtk_widget_path_iter_get_sibling_index(const GtkWidgetPath *path,
88 gint pos);
89
90GDK_AVAILABLE_IN_ALL
91const gchar * gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
92 gint pos);
93GDK_AVAILABLE_IN_ALL
94void gtk_widget_path_iter_set_name (GtkWidgetPath *path,
95 gint pos,
96 const gchar *name);
97GDK_AVAILABLE_IN_ALL
98gboolean gtk_widget_path_iter_has_name (const GtkWidgetPath *path,
99 gint pos,
100 const gchar *name);
101GDK_AVAILABLE_IN_ALL
102gboolean gtk_widget_path_iter_has_qname (const GtkWidgetPath *path,
103 gint pos,
104 GQuark qname);
105GDK_AVAILABLE_IN_3_14
106GtkStateFlags gtk_widget_path_iter_get_state (const GtkWidgetPath *path,
107 gint pos);
108GDK_AVAILABLE_IN_3_14
109void gtk_widget_path_iter_set_state (GtkWidgetPath *path,
110 gint pos,
111 GtkStateFlags state);
112
113GDK_AVAILABLE_IN_ALL
114void gtk_widget_path_iter_add_class (GtkWidgetPath *path,
115 gint pos,
116 const gchar *name);
117GDK_AVAILABLE_IN_ALL
118void gtk_widget_path_iter_remove_class (GtkWidgetPath *path,
119 gint pos,
120 const gchar *name);
121GDK_AVAILABLE_IN_ALL
122void gtk_widget_path_iter_clear_classes (GtkWidgetPath *path,
123 gint pos);
124GDK_AVAILABLE_IN_ALL
125GSList * gtk_widget_path_iter_list_classes (const GtkWidgetPath *path,
126 gint pos);
127GDK_AVAILABLE_IN_ALL
128gboolean gtk_widget_path_iter_has_class (const GtkWidgetPath *path,
129 gint pos,
130 const gchar *name);
131GDK_AVAILABLE_IN_ALL
132gboolean gtk_widget_path_iter_has_qclass (const GtkWidgetPath *path,
133 gint pos,
134 GQuark qname);
135
136GDK_DEPRECATED_IN_3_14
137void gtk_widget_path_iter_add_region (GtkWidgetPath *path,
138 gint pos,
139 const gchar *name,
140 GtkRegionFlags flags);
141GDK_DEPRECATED_IN_3_14
142void gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
143 gint pos,
144 const gchar *name);
145GDK_DEPRECATED_IN_3_14
146void gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
147 gint pos);
148
149GDK_DEPRECATED_IN_3_14
150GSList * gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
151 gint pos);
152
153GDK_DEPRECATED_IN_3_14
154gboolean gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
155 gint pos,
156 const gchar *name,
157 GtkRegionFlags *flags);
158GDK_DEPRECATED_IN_3_14
159gboolean gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
160 gint pos,
161 GQuark qname,
162 GtkRegionFlags *flags);
163
164GDK_AVAILABLE_IN_ALL
165GType gtk_widget_path_get_object_type (const GtkWidgetPath *path);
166
167GDK_AVAILABLE_IN_ALL
168gboolean gtk_widget_path_is_type (const GtkWidgetPath *path,
169 GType type);
170GDK_AVAILABLE_IN_ALL
171gboolean gtk_widget_path_has_parent (const GtkWidgetPath *path,
172 GType type);
173
174
175G_END_DECLS
176
177#endif /* __GTK_WIDGET_PATH_H__ */
178