Adding missing debian changelog. Modyfying hildon-banner to allow creation with null...
[hildon] / tests / check_utils.c
1 /*
2  * Copyright (C) 2006 Nokia Corporation.
3  *
4  * Contact: Luc Pionchon <luc.pionchon@nokia.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation; either version 2.1 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  *
21  */
22 #include <gtk/gtkmain.h>
23
24 #include "check_utils.h"
25 #include "hildon-window.h"
26
27 /**
28  * Creates a window of a fixed, well known size
29  */
30 GtkWidget *
31 create_test_window ()
32 {
33   GtkWidget *window = NULL;
34
35   window = hildon_window_new ();
36   /*  gtk_window_resize (GTK_WINDOW (window), TEST_WINDOW_WIDTH, TEST_WINDOW_HEIGHT);  */
37
38   return window;
39 }
40
41 /**
42  * Wrapper to gtk_widget_show, that call to gtk_events_pending serving events.
43  */
44 void show_test_window(GtkWidget * window)
45 {
46   
47   gtk_widget_show (window);
48
49   while (gtk_events_pending ())
50     {
51       gtk_main_iteration ();
52     }
53 }
54
55 /**
56  * Wrapper to gtk_widget_show_all, that call to gtk_events_pending serving events.
57  */
58 void show_all_test_window(GtkWidget * window)
59 {
60
61   gtk_widget_show_all (window);
62
63   while (gtk_events_pending ())
64     {
65       gtk_main_iteration ();
66     }
67 }