]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/private.h
fix for sf bug 1448153: Widgets sample hangs on Japanese radio label
[wxWidgets.git] / include / wx / gtk / private.h
index b754ea5178caee6b753bfa9e7352c23532b49710..bad72b53f2507c048804c912eade0425c5024c11 100644 (file)
@@ -53,6 +53,35 @@ void gtk_window_set_policy (GtkWindow *window,
 
 G_END_DECLS
 
+//-----------------------------------------------------------------------------
+// idle system
+//-----------------------------------------------------------------------------
+
+extern void wxapp_install_idle_handler();
+extern bool g_isIdle;
+
+//-----------------------------------------------------------------------------
+// Convenience class for g_freeing a gchar* on scope exit automatically
+//-----------------------------------------------------------------------------
+
+class wxGtkString
+{
+public:
+    explicit wxGtkString(gchar *s) : m_str(s) { }
+    ~wxGtkString() { g_free(m_str); }
+
+    operator gchar *() const { return m_str; }
+
+private:
+    gchar *m_str;
+
+    DECLARE_NO_COPY_CLASS(wxGtkString)
+};
+
+//-----------------------------------------------------------------------------
+// GTK+ scroll types -> wxEventType
+//-----------------------------------------------------------------------------
+
 // translate a GTK+ scroll type to a wxEventType
 inline wxEventType GtkScrollTypeToWx(guint scrollType)
 {
@@ -89,6 +118,11 @@ inline wxEventType GtkScrollWinTypeToWx(guint scrollType)
             wxEVT_SCROLLWIN_TOP - wxEVT_SCROLL_TOP;
 }
 
+
+//-----------------------------------------------------------------------------
+// Misc. functions
+//-----------------------------------------------------------------------------
+
 // Needed for implementing e.g. combobox on wxGTK within a modal dialog.
 void wxAddGrab(wxWindow* window);
 void wxRemoveGrab(wxWindow* window);