-// GTK+ 2.0 compatibility define is broken when used from C++ as it
-// casts enum to int implicitly
-#ifdef __WXGTK20__
- #undef gtk_signal_disconnect_by_func
- #define gtk_signal_disconnect_by_func(object,func,data) \
- gtk_signal_compat_matched((object), (func), (data), \
- (GSignalMatchType)(G_SIGNAL_MATCH_FUNC | \
- G_SIGNAL_MATCH_DATA), 0)
-#endif
-
-// child is not a member of GTK_BUTTON() any more in GTK+ 2.0
-#ifdef __WXGTK20__
- #define BUTTON_CHILD(w) GTK_BIN((w))->child
-#else
- #define BUTTON_CHILD(w) GTK_BUTTON((w))->child
-#endif
-
-// event_window has disappeared from GtkToggleButton in GTK+ 2.0
-#ifdef __WXGTK20__
- #define TOGGLE_BUTTON_EVENT_WIN(w) GTK_BUTTON((w))->event_window
-#else
- #define TOGGLE_BUTTON_EVENT_WIN(w) GTK_TOGGLE_BUTTON((w))->event_window
-#endif
-
-// gtk_editable_{copy|cut|paste}_clipboard() had an extra argument under
-// previous GTK+ versions but no more
-#if defined(__WXGTK20__) || (GTK_MINOR_VERSION > 0)
- #define DUMMY_CLIPBOARD_ARG
-#else
- #define DUMMY_CLIPBOARD_ARG ,0
-#endif
-
-// _GtkEditable is now private
-#ifdef __WXGTK20__
- #define GET_EDITABLE_POS(w) gtk_editable_get_position(GTK_EDITABLE(w))
- #define SET_EDITABLE_POS(w, pos) \
- gtk_editable_set_position(GTK_EDITABLE(w), (pos))
-#else
- #define GET_EDITABLE_POS(w) GTK_EDITABLE((w))->current_pos
- #define SET_EDITABLE_POS(w, pos) \
- GTK_EDITABLE((w))->current_pos = (pos)
-#endif
+ // convert the text between the given encoding and UTF-8 used by wxGTK
+ extern WXDLLIMPEXP_CORE wxCharBuffer
+ wxConvertToGTK(const wxString& s,
+ wxFontEncoding enc = wxFONTENCODING_SYSTEM);