25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

72 satır
3.8 KiB

  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. #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  21. #error "Only <gtk/gtk.h> can be included directly."
  22. #endif
  23. #ifndef __GTK_TEST_UTILS_H__
  24. #define __GTK_TEST_UTILS_H__
  25. G_BEGIN_DECLS
  26. /* --- Gtk+ Test Utility API --- */
  27. void gtk_test_init (int *argcp,
  28. char ***argvp,
  29. ...);
  30. void gtk_test_register_all_types (void);
  31. const GType* gtk_test_list_all_types (guint *n_types);
  32. GtkWidget* gtk_test_find_widget (GtkWidget *widget,
  33. const gchar *label_pattern,
  34. GType widget_type);
  35. GtkWidget* gtk_test_create_widget (GType widget_type,
  36. const gchar *first_property_name,
  37. ...);
  38. GtkWidget* gtk_test_create_simple_window (const gchar *window_title,
  39. const gchar *dialog_text);
  40. GtkWidget* gtk_test_display_button_window (const gchar *window_title,
  41. const gchar *dialog_text,
  42. ...); /* NULL terminated list of (label, &int) pairs */
  43. void gtk_test_slider_set_perc (GtkWidget *widget, /* GtkRange-alike */
  44. double percentage);
  45. double gtk_test_slider_get_value (GtkWidget *widget);
  46. gboolean gtk_test_spin_button_click (GtkSpinButton *spinner,
  47. guint button,
  48. gboolean upwards);
  49. gboolean gtk_test_widget_click (GtkWidget *widget,
  50. guint button,
  51. GdkModifierType modifiers);
  52. gboolean gtk_test_widget_send_key (GtkWidget *widget,
  53. guint keyval,
  54. GdkModifierType modifiers);
  55. /* operate on GtkEntry, GtkText, GtkTextView or GtkLabel */
  56. void gtk_test_text_set (GtkWidget *widget,
  57. const gchar *string);
  58. gchar* gtk_test_text_get (GtkWidget *widget);
  59. /* --- Gtk+ Test low-level API --- */
  60. GtkWidget* gtk_test_find_sibling (GtkWidget *base_widget,
  61. GType widget_type);
  62. GtkWidget* gtk_test_find_label (GtkWidget *widget,
  63. const gchar *label_pattern);
  64. G_END_DECLS
  65. #endif /* __GTK_TEST_UTILS_H__ */