2014-10-09 09:16:51 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "gtkgears.h"
|
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
static void
|
|
|
|
quit_cb (GtkWidget *widget,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
gboolean *done = data;
|
|
|
|
|
|
|
|
*done = TRUE;
|
|
|
|
|
|
|
|
g_main_context_wakeup (NULL);
|
|
|
|
}
|
|
|
|
|
2014-10-09 09:16:51 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
GtkWidget *window, *fixed, *gears, *spinner;
|
2020-02-10 03:24:47 +00:00
|
|
|
gboolean done = FALSE;
|
2014-10-09 09:16:51 +00:00
|
|
|
|
2016-12-28 13:53:22 +00:00
|
|
|
gtk_init ();
|
2014-10-09 09:16:51 +00:00
|
|
|
|
2020-02-14 19:55:36 +00:00
|
|
|
window = gtk_window_new ();
|
2014-10-09 09:16:51 +00:00
|
|
|
gtk_window_set_title (GTK_WINDOW (window), "Test GL/gtk inter-blending");
|
|
|
|
gtk_window_set_default_size (GTK_WINDOW (window), 250, 250);
|
2020-02-10 03:24:47 +00:00
|
|
|
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
2014-10-09 09:16:51 +00:00
|
|
|
|
|
|
|
fixed = gtk_fixed_new ();
|
2020-05-02 21:26:54 +00:00
|
|
|
gtk_window_set_child (GTK_WINDOW (window), fixed);
|
2014-10-09 09:16:51 +00:00
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 90, 80);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 100, 80);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 110, 80);
|
|
|
|
|
|
|
|
|
|
|
|
gears = gtk_gears_new ();
|
|
|
|
gtk_widget_set_size_request (gears, 70, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), gears, 60, 100);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 90, 110);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 100, 110);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 110, 110);
|
|
|
|
|
|
|
|
|
|
|
|
gears = gtk_gears_new ();
|
|
|
|
gtk_widget_set_size_request (gears, 70, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), gears, 60, 130);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 90, 150);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 100, 150);
|
|
|
|
|
|
|
|
spinner = gtk_spinner_new ();
|
|
|
|
gtk_spinner_start (GTK_SPINNER (spinner));
|
|
|
|
gtk_widget_set_size_request (spinner, 50, 50);
|
|
|
|
gtk_fixed_put (GTK_FIXED (fixed), spinner, 110, 150);
|
|
|
|
|
2022-11-29 12:06:33 +00:00
|
|
|
gtk_window_present (GTK_WINDOW (window));
|
2014-10-09 09:16:51 +00:00
|
|
|
|
2020-02-10 03:24:47 +00:00
|
|
|
while (!done)
|
|
|
|
g_main_context_iteration (NULL, TRUE);
|
2014-10-09 09:16:51 +00:00
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|