Ardour  9.0-pre0-582-g084a23a80d
gtktestutils.h
Go to the documentation of this file.
1 /* Gtk+ testing utilities
2  * Copyright (C) 2007 Imendio AB
3  * Authors: Tim Janik
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef __GTK_TEST_UTILS_H__
22 #define __GTK_TEST_UTILS_H__
23 
24 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25 #error "Only <gtk/gtk.h> can be included directly."
26 #endif
27 
28 G_BEGIN_DECLS
29 
30 /* --- Gtk+ Test Utility API --- */
31 void gtk_test_init (int *argcp,
32  char ***argvp,
33  ...);
35 const GType* gtk_test_list_all_types (guint *n_types);
37  const gchar *label_pattern,
38  GType widget_type);
39 GtkWidget* gtk_test_create_widget (GType widget_type,
40  const gchar *first_property_name,
41  ...);
42 GtkWidget* gtk_test_create_simple_window (const gchar *window_title,
43  const gchar *dialog_text);
44 GtkWidget* gtk_test_display_button_window (const gchar *window_title,
45  const gchar *dialog_text,
46  ...); /* NULL terminated list of (label, &int) pairs */
47 void gtk_test_slider_set_perc (GtkWidget *widget, /* GtkRange-alike */
48  double percentage);
51  guint button,
52  gboolean upwards);
53 gboolean gtk_test_widget_click (GtkWidget *widget,
54  guint button,
55  GdkModifierType modifiers);
57  guint keyval,
58  GdkModifierType modifiers);
59 /* operate on GtkEntry, GtkText, GtkTextView or GtkLabel */
61  const gchar *string);
62 gchar* gtk_test_text_get (GtkWidget *widget);
63 
64 /* --- Gtk+ Test low-level API --- */
66  GType widget_type);
68  const gchar *label_pattern);
69 G_END_DECLS
70 
71 #endif /* __GTK_TEST_UTILS_H__ */
GdkModifierType
Definition: gdktypes.h:127
gboolean gtk_test_widget_click(GtkWidget *widget, guint button, GdkModifierType modifiers)
void gtk_test_slider_set_perc(GtkWidget *widget, double percentage)
double gtk_test_slider_get_value(GtkWidget *widget)
const GType * gtk_test_list_all_types(guint *n_types)
gboolean gtk_test_spin_button_click(GtkSpinButton *spinner, guint button, gboolean upwards)
GtkWidget * gtk_test_find_widget(GtkWidget *widget, const gchar *label_pattern, GType widget_type)
void gtk_test_register_all_types(void)
GtkWidget * gtk_test_create_simple_window(const gchar *window_title, const gchar *dialog_text)
GtkWidget * gtk_test_create_widget(GType widget_type, const gchar *first_property_name,...)
GtkWidget * gtk_test_display_button_window(const gchar *window_title, const gchar *dialog_text,...)
gchar * gtk_test_text_get(GtkWidget *widget)
GtkWidget * gtk_test_find_label(GtkWidget *widget, const gchar *label_pattern)
GtkWidget * gtk_test_find_sibling(GtkWidget *base_widget, GType widget_type)
gboolean gtk_test_widget_send_key(GtkWidget *widget, guint keyval, GdkModifierType modifiers)
G_BEGIN_DECLS void gtk_test_init(int *argcp, char ***argvp,...)
void gtk_test_text_set(GtkWidget *widget, const gchar *string)