Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

231 rinda
7.6 KiB

  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  26. #error "Only <gtk/gtk.h> can be included directly."
  27. #endif
  28. #ifndef __GTK_MAIN_H__
  29. #define __GTK_MAIN_H__
  30. #include <gdk/gdk.h>
  31. #include <gtk/gtkwidget.h>
  32. #ifdef G_PLATFORM_WIN32
  33. #include <gtk/gtkbox.h>
  34. #include <gtk/gtkwindow.h>
  35. #endif
  36. G_BEGIN_DECLS
  37. /* Priorities for redrawing and resizing
  38. */
  39. #define GTK_PRIORITY_RESIZE (G_PRIORITY_HIGH_IDLE + 10)
  40. #ifndef GTK_DISABLE_DEPRECATED
  41. /* Use GDK_PRIORITY_REDRAW */
  42. #define GTK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20)
  43. /* Deprecated. Use G_PRIORITY #define's instead
  44. */
  45. #define GTK_PRIORITY_HIGH G_PRIORITY_HIGH
  46. #define GTK_PRIORITY_INTERNAL GTK_PRIORITY_REDRAW
  47. #define GTK_PRIORITY_DEFAULT G_PRIORITY_DEFAULT_IDLE
  48. #define GTK_PRIORITY_LOW G_PRIORITY_LOW
  49. #endif /* GTK_DISABLE_DEPRECATED */
  50. typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget,
  51. GdkEventKey *event,
  52. gpointer func_data);
  53. /* Gtk version.
  54. */
  55. #ifdef G_PLATFORM_WIN32
  56. #ifdef GTK_COMPILATION
  57. #define GTKMAIN_C_VAR __declspec(dllexport)
  58. #else
  59. #define GTKMAIN_C_VAR extern __declspec(dllimport)
  60. #endif
  61. #else
  62. #define GTKMAIN_C_VAR extern
  63. #endif
  64. GTKMAIN_C_VAR const guint gtk_major_version;
  65. GTKMAIN_C_VAR const guint gtk_minor_version;
  66. GTKMAIN_C_VAR const guint gtk_micro_version;
  67. GTKMAIN_C_VAR const guint gtk_binary_age;
  68. GTKMAIN_C_VAR const guint gtk_interface_age;
  69. const gchar* gtk_check_version (guint required_major,
  70. guint required_minor,
  71. guint required_micro);
  72. /* Initialization, exit, mainloop and miscellaneous routines
  73. */
  74. gboolean gtk_parse_args (int *argc,
  75. char ***argv);
  76. void gtk_init (int *argc,
  77. char ***argv);
  78. gboolean gtk_init_check (int *argc,
  79. char ***argv);
  80. gboolean gtk_init_with_args (int *argc,
  81. char ***argv,
  82. const char *parameter_string,
  83. GOptionEntry *entries,
  84. const char *translation_domain,
  85. GError **error);
  86. GOptionGroup *gtk_get_option_group (gboolean open_default_display);
  87. #ifdef G_PLATFORM_WIN32
  88. /* Variants that are used to check for correct struct packing
  89. * when building GTK+-using code.
  90. */
  91. void gtk_init_abi_check (int *argc,
  92. char ***argv,
  93. int num_checks,
  94. size_t sizeof_GtkWindow,
  95. size_t sizeof_GtkBox);
  96. gboolean gtk_init_check_abi_check (int *argc,
  97. char ***argv,
  98. int num_checks,
  99. size_t sizeof_GtkWindow,
  100. size_t sizeof_GtkBox);
  101. #define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
  102. #define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
  103. #endif
  104. #ifndef GTK_DISABLE_DEPRECATED
  105. void gtk_exit (gint error_code);
  106. #endif /* GTK_DISABLE_DEPRECATED */
  107. void gtk_disable_setlocale (void);
  108. gchar * gtk_set_locale (void);
  109. PangoLanguage *gtk_get_default_language (void);
  110. gboolean gtk_events_pending (void);
  111. /* The following is the event func GTK+ registers with GDK
  112. * we expose it mainly to allow filtering of events between
  113. * GDK and GTK+.
  114. */
  115. void gtk_main_do_event (GdkEvent *event);
  116. void gtk_main (void);
  117. guint gtk_main_level (void);
  118. void gtk_main_quit (void);
  119. gboolean gtk_main_iteration (void);
  120. /* gtk_main_iteration() calls gtk_main_iteration_do(TRUE) */
  121. gboolean gtk_main_iteration_do (gboolean blocking);
  122. gboolean gtk_true (void) G_GNUC_CONST;
  123. gboolean gtk_false (void) G_GNUC_CONST;
  124. void gtk_grab_add (GtkWidget *widget);
  125. GtkWidget* gtk_grab_get_current (void);
  126. void gtk_grab_remove (GtkWidget *widget);
  127. void gtk_init_add (GtkFunction function,
  128. gpointer data);
  129. void gtk_quit_add_destroy (guint main_level,
  130. GtkObject *object);
  131. guint gtk_quit_add (guint main_level,
  132. GtkFunction function,
  133. gpointer data);
  134. guint gtk_quit_add_full (guint main_level,
  135. GtkFunction function,
  136. GtkCallbackMarshal marshal,
  137. gpointer data,
  138. GDestroyNotify destroy);
  139. void gtk_quit_remove (guint quit_handler_id);
  140. void gtk_quit_remove_by_data (gpointer data);
  141. #ifndef GTK_DISABLE_DEPRECATED
  142. guint gtk_timeout_add (guint32 interval,
  143. GtkFunction function,
  144. gpointer data);
  145. guint gtk_timeout_add_full (guint32 interval,
  146. GtkFunction function,
  147. GtkCallbackMarshal marshal,
  148. gpointer data,
  149. GDestroyNotify destroy);
  150. void gtk_timeout_remove (guint timeout_handler_id);
  151. guint gtk_idle_add (GtkFunction function,
  152. gpointer data);
  153. guint gtk_idle_add_priority (gint priority,
  154. GtkFunction function,
  155. gpointer data);
  156. guint gtk_idle_add_full (gint priority,
  157. GtkFunction function,
  158. GtkCallbackMarshal marshal,
  159. gpointer data,
  160. GDestroyNotify destroy);
  161. void gtk_idle_remove (guint idle_handler_id);
  162. void gtk_idle_remove_by_data (gpointer data);
  163. guint gtk_input_add_full (gint source,
  164. GdkInputCondition condition,
  165. GdkInputFunction function,
  166. GtkCallbackMarshal marshal,
  167. gpointer data,
  168. GDestroyNotify destroy);
  169. void gtk_input_remove (guint input_handler_id);
  170. #endif /* GTK_DISABLE_DEPRECATED */
  171. guint gtk_key_snooper_install (GtkKeySnoopFunc snooper,
  172. gpointer func_data);
  173. void gtk_key_snooper_remove (guint snooper_handler_id);
  174. GdkEvent* gtk_get_current_event (void);
  175. guint32 gtk_get_current_event_time (void);
  176. gboolean gtk_get_current_event_state (GdkModifierType *state);
  177. GtkWidget* gtk_get_event_widget (GdkEvent *event);
  178. /* Private routines internal to GTK+
  179. */
  180. void gtk_propagate_event (GtkWidget *widget,
  181. GdkEvent *event);
  182. gboolean _gtk_boolean_handled_accumulator (GSignalInvocationHint *ihint,
  183. GValue *return_accu,
  184. const GValue *handler_return,
  185. gpointer dummy);
  186. gchar *_gtk_get_lc_ctype (void);
  187. G_END_DECLS
  188. #endif /* __GTK_MAIN_H__ */