+
+int
+count_glade_widgets (Class *c)
+{
+ int num = 0;
+ GList *li;
+ for (li = c->nodes; li != NULL; li = li->next) {
+ Node *n = li->data;
+ if (n->type == VARIABLE_NODE) {
+ Variable *v = (Variable *)n;
+ if (v->glade_widget)
+ num++;
+ }
+ }
+ return num;
+}
+
+gboolean
+find_get_type (Class *c)
+{
+ GList *li;
+ for (li = c->nodes; li != NULL; li = li->next) {
+ Node *n = li->data;
+ Method *m = (Method *)n;
+ if (n->type == METHOD_NODE &&
+ strcmp (m->id, "get_type") == 0) {
+ if (m->method != REGULAR_METHOD ||
+ m->scope != PUBLIC_SCOPE ||
+ m->args != NULL) {
+ error_printf (GOB_ERROR, m->line_no,
+ "get_type method must be a "
+ "regular public method with "
+ "no arguments");
+ }
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}