Exemplo n.º 1
0
static void
set_cursor (GladeProject *project,
            GdkCursor    *gdk_cursor)
{
  GList *list;

  for (list = (GList *) glade_project_get_objects (project);
       list; list = list->next)
    {
      GObject *object = list->data;

      if (GTK_IS_WIDGET (object) &&
          gtk_widget_get_has_window (GTK_WIDGET (object)))
        {
          set_cursor_recurse (GTK_WIDGET (object), gdk_cursor);
        }
    }
}
Exemplo n.º 2
0
static void
set_cursor_recurse (GtkWidget * widget, GdkCursor * gdk_cursor)
{
  GList *children, *list;

  if (!gtk_widget_get_visible (widget) || !gtk_widget_get_realized (widget))
    return;

  gdk_window_set_cursor (gtk_widget_get_window (widget), gdk_cursor);

  if (GTK_IS_CONTAINER (widget) &&
      (children =
       glade_util_container_get_all_children (GTK_CONTAINER (widget))) != NULL)
    {
      for (list = children; list; list = list->next)
        {
          set_cursor_recurse (GTK_WIDGET (list->data), gdk_cursor);
        }
      g_list_free (children);
    }
}
Exemplo n.º 3
0
static void
set_cursor (GdkCursor *gdk_cursor)
{
	GladeProject *project;
	GList        *list, *projects;

	for (projects = glade_app_get_projects ();
	     projects; projects = projects->next)
	{
		project = projects->data;

		for (list = (GList *) glade_project_get_objects (project); 
		     list; list = list->next)
		{
			GObject *object = list->data;

			if (GTK_IS_WINDOW (object))
			{
				set_cursor_recurse (GTK_WIDGET (object), gdk_cursor);
			}
		}
	}
}
Exemplo n.º 4
0
static void
set_cursor_recurse (GtkWidget *widget, 
		    GdkCursor *gdk_cursor)
{
	GList *children, *list;

	if (!GTK_WIDGET_VISIBLE (widget) || 
	    !GTK_WIDGET_REALIZED (widget))
		return;

	gdk_window_set_cursor (widget->window, gdk_cursor);

	if (GTK_IS_CONTAINER (widget) &&
	    (children = 
	     glade_util_container_get_all_children (GTK_CONTAINER (widget))) != NULL)
	{
		for (list = children; list; list = list->next)
		{
			set_cursor_recurse (GTK_WIDGET (list->data), gdk_cursor);
		}
		g_list_free (children);
	}
}