Re: Splash screen border



Laurent,

Splash Window is a regular window. In X terms it translates to a window
which has "override_redirect" attribute set to 1, so window managers don't
put an ornament around it.

Gtk Windows are not really your regular windows, they are far more complicated,
and usually consist of few X Windows.

On Fri, Sep 26, 2003 at 08:46:09PM +0200, Laurent Houdusse wrote:
Thanks for this code but the created window is a standard window
so what is the interest?


-----Message d'origine-----
De : gtk-app-devel-list-admin gnome org
[mailto:gtk-app-devel-list-admin gnome org]De la part de Gregory Merchan
Envoye : vendredi 26 septembre 2003 00:48
A : gtk-app-devel-list gnome org
Objet : Re: Splash screen border


On Thu, Sep 25, 2003 at 10:03:46PM +0200, Laurent Houdusse wrote:
Hi!

I'm a newbie with GTK
So i try to create a splashscreen white background with a thin border
black
(1 pixel)

It's Ok for the background but i don't know how to do for the thin
border????

See my code:

It's missing a the most important line:

 gtk_window_set_type_hint (GTK_WINDOW (window),
                           GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);


Use that and the code should be as simple as:

GtkWidget *
make_a_splashscreen_to_annoy_the_user (void)
{
 GtkWidget *window;
 GtkWidget *image;

 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 gtk_window_set_type_hint (GTK_WINDOW (window),
                           GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);

 image = gtk_image_new_from_file (PATH_TO_YOUR_PROPERLY_SIZED_IMAGE);
 gtk_container_add (GTK_CONTAINER (window), image);
 gtk_widget_show (image);

 return window;
}


Cheers,
Greg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]