#define wxGTK_CONV_BACK(s) wxConvLocal.cWC2WX( (wxConvUTF8.cMB2WC( s ) ) )
#endif
+// Some deprecated GTK+ prototypes we still use often
+// FIXME: Don't use them if possible.
+G_BEGIN_DECLS
+
+// Should use gtk_image_new, but the mask seems to be handled different,
+// and we need to migrate
+GtkWidget* gtk_pixmap_new (GdkPixmap *pixmap,
+ GdkBitmap *mask);
+
+// Deprecated since GTK+-1.3.7:
+// Trivial wrapper around gtk_window_move, with some side effects we seem to rely on
+void gtk_widget_set_uposition (GtkWidget *widget,
+ gint x,
+ gint y);
+
+// We rely on the allow_shrink parameter in one place
+void gtk_window_set_policy (GtkWindow *window,
+ gint allow_shrink,
+ gint allow_grow,
+ gint auto_shrink);
+
+G_END_DECLS
+
// translate a GTK+ scroll type to a wxEventType
inline wxEventType GtkScrollTypeToWx(guint scrollType)
{
#if wxUSE_CHECKLISTBOX
#include "wx/checklst.h"
+
+// FIXME: We use GtkList to implement wxListBox
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
#include <gdk/gdk.h>
#include "wx/choice.h"
#include "wx/arrstr.h"
+// FIXME: We use GtkOptionMenu which has been deprecated since GTK+ 2.3.0 in
+// favour of GtkComboBox.
+// Later use GtkComboBox if GTK+ runtime version is new enough.
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
#include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED
+// We use GtkCombo which has been deprecated since GTK+ 2.3.0
+// in favour of GtkComboBox for <GTK2.4 runtime
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
#include "wx/intl.h"
#include "wx/checklst.h"
#include "wx/settings.h"
+
+// FIXME: Use GtkTreeView/GtkListModel instead?
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
#if wxUSE_TOOLTIPS
#include "wx/tooltip.h"
#endif
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
//-----------------------------------------------------------------------------
#include "wx/bitmap.h"
#include "wx/fontutil.h"
+// FIXME: Use GtkImage instead of GtkPixmap. Don't use gtk_container_border_width
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
#include "wx/fontutil.h"
#include "wx/toplevel.h"
+// Using gtk_list_new, which is deprecated since GTK2
+// Using gtk_object_sink, which is deprecated since GTK+-2.9.0
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkprivate.h>
#include "wx/frame.h"
-#include <glib.h>
+// FIXME: Use GtkImage instead of GtkPixmap. Use the new toolbar API for when gtk runtime is new enough?
+// Beware that the new and old toolbar API may not be mixed in usage.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
// ----------------------------------------------------------------------------
#if wxUSE_TOGGLEBTN
+// FIXME: Use GtkImage instead of GtkPixmap.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
extern void wxapp_install_idle_handler();
gtk_tooltips_disable( ss_tooltips );
}
+G_BEGIN_DECLS
+void gtk_tooltips_set_delay (GtkTooltips *tooltips,
+ guint delay);
+G_END_DECLS
+
void wxToolTip::SetDelay( long msecs )
{
if (!ss_tooltips)
return;
+ // FIXME: This is a deprecated function and might not even have an effect.
+ // Try to not use it, after which remove the prototype above.
gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
}
#include "wx/math.h"
#include <ctype.h>
+// FIXME: Due to a hack we use GtkCombo in here, which is deprecated since gtk2.3.0
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
#include <gdk/gdkprivate.h>
#include <gdk/gdkkeysyms.h>