~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to include/gtk-2.0/gtk/gtktestutils.h

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 
22
#error "Only <gtk/gtk.h> can be included directly."
 
23
#endif
 
24
 
 
25
#ifndef __GTK_TEST_UTILS_H__
 
26
#define __GTK_TEST_UTILS_H__
 
27
 
 
28
G_BEGIN_DECLS
 
29
 
 
30
/* --- Gtk+ Test Utility API --- */
 
31
void            gtk_test_init                   (int            *argcp,
 
32
                                                 char         ***argvp,
 
33
                                                 ...);
 
34
void            gtk_test_register_all_types     (void);
 
35
const GType*    gtk_test_list_all_types         (guint          *n_types);
 
36
GtkWidget*      gtk_test_find_widget            (GtkWidget      *widget,
 
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);
 
49
double          gtk_test_slider_get_value       (GtkWidget      *widget);
 
50
gboolean        gtk_test_spin_button_click      (GtkSpinButton  *spinner,
 
51
                                                 guint           button,
 
52
                                                 gboolean        upwards);
 
53
gboolean        gtk_test_widget_click           (GtkWidget      *widget,
 
54
                                                 guint           button,
 
55
                                                 GdkModifierType modifiers);
 
56
gboolean        gtk_test_widget_send_key        (GtkWidget      *widget,
 
57
                                                 guint           keyval,
 
58
                                                 GdkModifierType modifiers);
 
59
/* operate on GtkEntry, GtkText, GtkTextView or GtkLabel */
 
60
void            gtk_test_text_set               (GtkWidget      *widget,
 
61
                                                 const gchar    *string);
 
62
gchar*          gtk_test_text_get               (GtkWidget      *widget);
 
63
 
 
64
/* --- Gtk+ Test low-level API --- */
 
65
GtkWidget*      gtk_test_find_sibling           (GtkWidget      *base_widget,
 
66
                                                 GType           widget_type);
 
67
GtkWidget*      gtk_test_find_label             (GtkWidget      *widget,
 
68
                                                 const gchar    *label_pattern);
 
69
G_END_DECLS
 
70
 
 
71
#endif /* __GTK_TEST_UTILS_H__ */