GtkWidgetPath: Make API more consistent.
This commit is contained in:
@ -379,7 +379,7 @@ compare_selector_element (GtkWidgetPath *path,
|
|||||||
{
|
{
|
||||||
GType type;
|
GType type;
|
||||||
|
|
||||||
type = gtk_widget_path_get_element_type (path, index);
|
type = gtk_widget_path_iter_get_widget_type (path, index);
|
||||||
|
|
||||||
if (!g_type_is_a (type, elem->type))
|
if (!g_type_is_a (type, elem->type))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -436,7 +436,7 @@ compare_selector_element (GtkWidgetPath *path,
|
|||||||
const gchar *name, *path_name;
|
const gchar *name, *path_name;
|
||||||
|
|
||||||
name = g_quark_to_string (elem->name);
|
name = g_quark_to_string (elem->name);
|
||||||
path_name = gtk_widget_path_get_element_name (path, index);
|
path_name = gtk_widget_path_iter_get_name (path, index);
|
||||||
|
|
||||||
if (!path_name ||
|
if (!path_name ||
|
||||||
strcmp (path_name, name) != 0)
|
strcmp (path_name, name) != 0)
|
||||||
|
@ -132,8 +132,8 @@ gtk_widget_path_prepend_type (GtkWidgetPath *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gtk_widget_path_get_element_type (const GtkWidgetPath *path,
|
gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,
|
||||||
guint pos)
|
guint pos)
|
||||||
{
|
{
|
||||||
GtkPathElement *elem;
|
GtkPathElement *elem;
|
||||||
|
|
||||||
@ -145,9 +145,9 @@ gtk_widget_path_get_element_type (const GtkWidgetPath *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_widget_path_set_element_type (GtkWidgetPath *path,
|
gtk_widget_path_iter_set_widget_type (GtkWidgetPath *path,
|
||||||
guint pos,
|
guint pos,
|
||||||
GType type)
|
GType type)
|
||||||
{
|
{
|
||||||
GtkPathElement *elem;
|
GtkPathElement *elem;
|
||||||
|
|
||||||
@ -160,8 +160,8 @@ gtk_widget_path_set_element_type (GtkWidgetPath *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
G_CONST_RETURN gchar *
|
G_CONST_RETURN gchar *
|
||||||
gtk_widget_path_get_element_name (const GtkWidgetPath *path,
|
gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
|
||||||
guint pos)
|
guint pos)
|
||||||
{
|
{
|
||||||
GtkPathElement *elem;
|
GtkPathElement *elem;
|
||||||
|
|
||||||
@ -173,9 +173,9 @@ gtk_widget_path_get_element_name (const GtkWidgetPath *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_widget_path_set_element_name (GtkWidgetPath *path,
|
gtk_widget_path_iter_set_name (GtkWidgetPath *path,
|
||||||
guint pos,
|
guint pos,
|
||||||
const gchar *name)
|
const gchar *name)
|
||||||
{
|
{
|
||||||
GtkPathElement *elem;
|
GtkPathElement *elem;
|
||||||
|
|
||||||
|
@ -38,17 +38,17 @@ guint gtk_widget_path_length (const GtkWidgetPath *path);
|
|||||||
guint gtk_widget_path_prepend_type (GtkWidgetPath *path,
|
guint gtk_widget_path_prepend_type (GtkWidgetPath *path,
|
||||||
GType type);
|
GType type);
|
||||||
|
|
||||||
GType gtk_widget_path_get_element_type (const GtkWidgetPath*path,
|
GType gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,
|
||||||
guint pos);
|
guint pos);
|
||||||
void gtk_widget_path_set_element_type (GtkWidgetPath *path,
|
void gtk_widget_path_iter_set_widget_type (GtkWidgetPath *path,
|
||||||
guint pos,
|
guint pos,
|
||||||
GType type);
|
GType type);
|
||||||
|
|
||||||
G_CONST_RETURN gchar * gtk_widget_path_get_element_name (const GtkWidgetPath *path,
|
G_CONST_RETURN gchar * gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
|
||||||
guint pos);
|
guint pos);
|
||||||
void gtk_widget_path_set_element_name (GtkWidgetPath *path,
|
void gtk_widget_path_iter_set_name (GtkWidgetPath *path,
|
||||||
guint pos,
|
guint pos,
|
||||||
const gchar *name);
|
const gchar *name);
|
||||||
|
|
||||||
void gtk_widget_path_iter_add_region (GtkWidgetPath *path,
|
void gtk_widget_path_iter_add_region (GtkWidgetPath *path,
|
||||||
guint pos,
|
guint pos,
|
||||||
|
Reference in New Issue
Block a user