static gboolean gtk_css_matcher_widget_path_has_name (const GtkCssMatcher *matcher, /*interned*/ const char *name) { const GtkWidgetPath *siblings; siblings = gtk_widget_path_iter_get_siblings (matcher->path.path, matcher->path.index); if (siblings && matcher->path.sibling_index != gtk_widget_path_iter_get_sibling_index (matcher->path.path, matcher->path.index)) { const char *path_name = gtk_widget_path_iter_get_object_name (siblings, matcher->path.sibling_index); if (path_name == NULL) path_name = g_type_name (gtk_widget_path_iter_get_object_type (siblings, matcher->path.sibling_index)); return path_name == name; } else { const char *path_name = gtk_widget_path_iter_get_object_name (matcher->path.path, matcher->path.index); if (path_name == NULL) path_name = g_type_name (gtk_widget_path_iter_get_object_type (matcher->path.path, matcher->path.index)); return path_name == name; } }
static gboolean gtk_css_matcher_widget_path_has_type (const GtkCssMatcher *matcher, GType type) { const GtkWidgetPath *siblings; siblings = gtk_widget_path_iter_get_siblings (matcher->path.path, matcher->path.index); if (siblings && matcher->path.sibling_index != gtk_widget_path_iter_get_sibling_index (matcher->path.path, matcher->path.index)) return g_type_is_a (gtk_widget_path_iter_get_object_type (siblings, matcher->path.sibling_index), type); else return g_type_is_a (gtk_widget_path_iter_get_object_type (matcher->path.path, matcher->path.index), type); }
static VALUE rg_iter_get_object_type(VALUE self, VALUE pos) { return GTYPE2CLASS(gtk_widget_path_iter_get_object_type(_SELF(self), NUM2INT(pos))); }