File: test-eel-background.c

package info (click to toggle)
nautilus 2.30.1-2squeeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 43,560 kB
  • ctags: 12,722
  • sloc: ansic: 136,761; sh: 10,260; makefile: 1,029; xml: 607; perl: 170; awk: 138
file content (38 lines) | stat: -rw-r--r-- 767 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* -*- 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
main  (int argc, char *argv[])
{
	GtkWidget *window;
	EelBackground *background;
	char *image_uri;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	g_signal_connect (window, "destroy",
			    gtk_main_quit, NULL);

	background = eel_get_widget_background (window);

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

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

#if 1
	eel_background_set_image_uri (background, image_uri);
#endif
	g_free (image_uri);


	gtk_widget_show_all (window);
	gtk_main ();

	return 0;
}