test-eel-background.c 857 Bytes
Newer Older
1 2 3 4 5 6 7 8
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */

#include <eel/eel-background.h>
#include <gtk/gtk.h>

#define PATTERNS_DIR "/gnome-source/eel/data/patterns"

int
9 10
main  (int   argc,
       char *argv[])
11
{
12 13 14
    GtkWidget *window;
    EelBackground *background;
    char *image_uri;
15

16
    gtk_init (&argc, &argv);
17

18 19 20
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    g_signal_connect (window, "destroy",
                      gtk_main_quit, NULL);
21

22
    background = eel_get_widget_background (window);
23

24 25
    eel_background_set_color (background,
                              "red-blue:h");
26

27
    image_uri = g_filename_to_uri (PATTERNS_DIR "/50s.png", NULL, NULL);
28 29

#if 1
30
    eel_background_set_image_uri (background, image_uri);
31
#endif
32
    g_free (image_uri);
33 34


35 36
    gtk_widget_show_all (window);
    gtk_main ();
37

38
    return 0;
39
}