X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1efb5db8961ac308d16ed3ae7930bd0b48c0520e..27ea6757f36b847e94fc9003c34d5768c341aa13:/include/wx/gtk/private.h diff --git a/include/wx/gtk/private.h b/include/wx/gtk/private.h index b754ea5178..bad72b53f2 100644 --- a/include/wx/gtk/private.h +++ b/include/wx/gtk/private.h @@ -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);