]> git.saurik.com Git - wxWidgets.git/commitdiff
Nuke GTK1 from include/gtk
authorMart Raudsepp <leio@gentoo.org>
Sun, 22 Jan 2006 21:00:19 +0000 (21:00 +0000)
committerMart Raudsepp <leio@gentoo.org>
Sun, 22 Jan 2006 21:00:19 +0000 (21:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/bitmap.h
include/wx/gtk/checkbox.h
include/wx/gtk/dcclient.h
include/wx/gtk/font.h
include/wx/gtk/menu.h
include/wx/gtk/pen.h
include/wx/gtk/private.h
include/wx/gtk/textctrl.h
include/wx/gtk/win_gtk.h
include/wx/gtk/window.h

index 0e74b7a631e1ea3ef8aa2a4ef70988d049bb80fd..33ec0f68bee8b1eda2074d35686f0de68b680f3f 100644 (file)
@@ -17,9 +17,7 @@
 #include "wx/palette.h"
 #include "wx/gdiobj.h"
 
-#ifdef __WXGTK20__
 typedef struct _GdkPixbuf GdkPixbuf;
-#endif
 
 class WXDLLEXPORT wxPixelDataBase;
 
@@ -118,17 +116,13 @@ public:
     void SetDepth( int depth );
     void SetPixmap( GdkPixmap *pixmap );
     void SetBitmap( GdkBitmap *bitmap );
-#ifdef __WXGTK20__
     void SetPixbuf(GdkPixbuf *pixbuf);
-#endif
 
     GdkPixmap *GetPixmap() const;
     GdkBitmap *GetBitmap() const;
     bool HasPixmap() const;
-#ifdef __WXGTK20__
     bool HasPixbuf() const;
     GdkPixbuf *GetPixbuf() const;
-#endif
 
     // Basically, this corresponds to Win32 StretchBlt()
     wxBitmap Rescale( int clipx, int clipy, int clipwidth, int clipheight, int width, int height );
@@ -149,7 +143,6 @@ private:
     bool CreateFromImageAsBitmap(const wxImage& image);
     bool CreateFromImageAsPixmap(const wxImage& image);
 
-#ifdef __WXGTK20__
     bool CreateFromImageAsPixbuf(const wxImage& image);
 
     enum Representation
@@ -162,7 +155,6 @@ private:
     void PurgeOtherRepresentations(Representation keep);
 
     friend class wxMemoryDC;
-#endif
     friend class wxBitmapHandler;
 
 private:
index 555a708d26956d024700e6c9173dc4cc92a6fbe4..e48a04893834c61d3a3b645f3a62e20ea4d4be5b 100644 (file)
@@ -43,7 +43,7 @@ public:
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
-    
+
     // implementation
     // --------------
 
@@ -59,10 +59,8 @@ public:
 protected:
     virtual wxSize DoGetBestSize() const;
 
-#ifdef __WXGTK20__
     void DoSet3StateValue(wxCheckBoxState state);
     wxCheckBoxState DoGet3StateValue() const;
-#endif
 
 private:
     DECLARE_DYNAMIC_CLASS(wxCheckBox)
index 4cc62a0e4c00dfd18622ccf5b90535356a9f704d..700668aa317c1e74d27b177fbca4a89c8f33f28b 100644 (file)
@@ -116,11 +116,9 @@ public:
     wxRegion      m_paintClippingRegion;
 
     // PangoContext stuff for GTK 2.0
-#ifdef __WXGTK20__
     PangoContext *m_context;
     PangoLayout *m_layout;
     PangoFontDescription *m_fontdesc;
-#endif
 
     void SetUpDC();
     void Destroy();
index 2d12659dc4a970b23260a0e3abfde9c814179203..c14e0fc8cffb5dee4a4fbe452f32061b18ff5669 100644 (file)
@@ -97,10 +97,6 @@ public:
     // implementation from now on
     void Unshare();
 
-#ifndef __WXGTK20__
-    GdkFont* GetInternalFont(float scale = 1.0) const;
-#endif
-
     // no data :-)
 
 protected:
index 9a2d3a80f91a5dfe66836bb0be7291638e19b5e1..0f010fab164ad2b0864c9d352d175fbed719cacd 100644 (file)
@@ -44,9 +44,6 @@ public:
     // common part of Append and Insert
     bool GtkAppend(wxMenu *menu, const wxString& title, int pos=-1);
 
-#ifndef __WXGTK20__
-    GtkAccelGroup   *m_accel;
-#endif
     GtkWidget       *m_menubar;
     long             m_style;
     wxWindow        *m_invokingWindow;
index 2c6b707d734d7703d811d0e7ccf8df037d254e40..38ae0b9a98418927dfc5a576960662d4488e003a 100644 (file)
 
 class WXDLLIMPEXP_CORE wxPen;
 
-#if defined(__WXGTK127__) || defined(__WXGTK20__)
 typedef    gint8 wxGTKDash;
-#else
-typedef    gchar wxGTKDash;
-#endif
 
 //-----------------------------------------------------------------------------
 // wxPen
index 3fe0527aaae79277674269049327b1d36325ddea..d8fd0125f8a6d473da7279fe1a668dd0445b612d 100644 (file)
@@ -23,7 +23,6 @@
     #define GTK_CHECK_VERSION(a, b, c) 0
 #endif
 
-#ifdef __WXGTK20__
 #if wxUSE_UNICODE
     #define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s)
     #define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s)
     #define wxGTK_CONV(s) wxConvUTF8.cWC2MB( wxConvLocal.cWX2WC(s) )
     #define wxGTK_CONV_BACK(s)  wxConvLocal.cWC2WX( (wxConvUTF8.cMB2WC( s ) ) )
 #endif
-#else
-    #define wxGTK_CONV(s) s.c_str()
-    #define wxGTK_CONV_BACK(s) s
-#endif
-
 
+// FIXME: Make gtk2 only, so no macros needed - MR
 // 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
+#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)
 
 // 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
+#define BUTTON_CHILD(w) GTK_BIN((w))->child
 
 // 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
+#define TOGGLE_BUTTON_EVENT_WIN(w) GTK_BUTTON((w))->event_window
 
 // gtk_editable_{copy|cut|paste}_clipboard() had an extra argument under
 // previous GTK+ versions but no more
 #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
+#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))
 
 // this GtkNotebook struct field has been renamed
-#ifdef __WXGTK20__
-    #define NOTEBOOK_PANEL(nb)  GTK_NOTEBOOK(nb)->event_window
-#else
-    #define NOTEBOOK_PANEL(nb)  GTK_NOTEBOOK(nb)->panel
-#endif
+#define NOTEBOOK_PANEL(nb)  GTK_NOTEBOOK(nb)->event_window
 
-#ifdef __WXGTK20__
-    #define SCROLLBAR_CBACK_ARG
-    #define GET_SCROLL_TYPE(w)   GTK_SCROLL_JUMP
-#else
-    #define SCROLLBAR_CBACK_ARG
-    #define GET_SCROLL_TYPE(w)   GTK_RANGE((w))->scroll_type
-#endif
+#define SCROLLBAR_CBACK_ARG
+#define GET_SCROLL_TYPE(w)   GTK_SCROLL_JUMP
 
 // translate a GTK+ scroll type to a wxEventType
 inline wxEventType GtkScrollTypeToWx(guint scrollType)
@@ -135,10 +105,8 @@ inline wxEventType GtkScrollWinTypeToWx(guint scrollType)
 void wxAddGrab(wxWindow* window);
 void wxRemoveGrab(wxWindow* window);
 
-#ifdef __WXGTK20__
 // Escapes string so that it is valid Pango markup XML string:
 WXDLLIMPEXP_CORE wxString wxEscapeStringForPangoMarkup(const wxString& str);
-#endif
 
 // The declaration for gtk_icon_size_lookup was accidentally ifdefed out in
 // GTK+ 2.1.0 which Sun seem to have shipped with some versions of JDS
index 7e54c5f218466b2d1f1582cae9a3110dd5abcd8e..29add9c07ab4b268d1ef0c9c09bc6bfa79bb5fda 100644 (file)
@@ -86,7 +86,6 @@ public:
 
     virtual void ShowPosition(long pos);
 
-#ifdef __WXGTK20__
     virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const;
     virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
                                             wxTextCoord *col,
@@ -94,7 +93,6 @@ public:
     {
         return wxTextCtrlBase::HitTest(pt, col, row);
     }
-#endif // __WXGTK20__
 
     // Clipboard operations
     virtual void Copy();
@@ -145,12 +143,7 @@ public:
     void CalculateScrollbar();
     void OnInternalIdle();
 
-#ifdef __WXGTK20__
     void SetUpdateFont(bool WXUNUSED(update)) { }
-#else // !__WXGTK20__
-    void SetUpdateFont(bool update) { m_updateFont = update; }
-    void UpdateFontIfNeeded();
-#endif // __WXGTK20__/!__WXGTK20__
 
     void SetModified() { m_modified = true; }
 
@@ -196,10 +189,8 @@ protected:
     // override this and return true.
     virtual bool UseGTKStyleBase() const { return true; }
 
-#ifdef __WXGTK20__
     // has the control been frozen by Freeze()?
     bool IsFrozen() const { return m_frozenness > 0; }
-#endif
 
 private:
     // change the font for everything in this control
@@ -210,12 +201,8 @@ private:
 
     bool        m_modified:1;
     bool        m_vScrollbarVisible:1;
-#ifndef __WXGTK20__
-    bool        m_updateFont:1;
-#endif // !__WXGTK20__
     bool        m_ignoreNextUpdate:1;
 
-#ifdef __WXGTK20__
     // Our text buffer. Convenient, and holds the buffer while using
     // a dummy one when m_frozenness > 0
     GtkTextBuffer *m_buffer;
@@ -227,7 +214,6 @@ private:
     void OnUrlMouseEvent(wxMouseEvent&);
     GdkCursor *m_gdkHandCursor;
     GdkCursor *m_gdkXTermCursor;
-#endif
 
     DECLARE_EVENT_TABLE()
     DECLARE_DYNAMIC_CLASS(wxTextCtrl)
index 1ade9a1ae647b912c497ff135a1f66bb77b8fde5..81f0ecebb94aa20949908ad8e61ed8a05265896f 100644 (file)
@@ -19,9 +19,6 @@ extern "C" {
 #include <gdk/gdkx.h>
 #include <gtk/gtkcontainer.h>
 #include <gtk/gtkadjustment.h>
-#ifndef __WXGTK20__
-#include <gtk/gtkfeatures.h>
-#endif
 
 #include "wx/dlimpexp.h"
 
index e3ea31dc2f88faef943ec84611537f3fde6b7899..53a89a0c53a73b1871a73a702c213b053c0817d4 100644 (file)
@@ -108,10 +108,8 @@ public:
     virtual void SetDropTarget( wxDropTarget *dropTarget );
 #endif // wxUSE_DRAG_AND_DROP
 
-#ifdef __WXGTK20__
     virtual void AddChild( wxWindowBase *child );
     virtual void RemoveChild( wxWindowBase *child );
-#endif
 
     // implementation
     // --------------
@@ -160,10 +158,8 @@ public:
     virtual bool IsOwnGtkWindow( GdkWindow *window );
     void ConnectWidget( GtkWidget *widget );
 
-#ifdef __WXGTK20__
     // Returns the default context which usually is anti-aliased
     PangoContext   *GtkGetPangoDefaultContext();
-#endif
 
 #if wxUSE_TOOLTIPS
     virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip );
@@ -201,21 +197,7 @@ public:
     // this widget will be queried for GTK's focus events
     GtkWidget           *m_focusWidget;
 
-#ifdef __WXGTK20__
     wxGtkIMData         *m_imData;
-#else // GTK 1
-#ifdef HAVE_XIM
-    // XIM support for wxWidgets
-    GdkIC               *m_ic;
-    GdkICAttr           *m_icattr;
-#endif // HAVE_XIM
-#endif // GTK 2/1
-
-#ifndef __WXGTK20__
-    // The area to be cleared (and not just refreshed)
-    // We cannot make this distinction under GTK 2.0.
-    wxRegion             m_clearRegion;
-#endif
 
     // scrolling stuff
     GtkAdjustment       *m_hAdjust,*m_vAdjust;
@@ -234,10 +216,8 @@ public:
     bool                 m_hasFocus:1;          // true if == FindFocus()
     bool                 m_isScrolling:1;       // dragging scrollbar thumb?
     bool                 m_clipPaintRegion:1;   // true after ScrollWindow()
-#ifdef __WXGTK20__
     bool                 m_dirtyTabOrder:1;     // tab order changed, GTK focus
                                                 // chain needs update
-#endif
     bool                 m_needsStyleChange:1;  // May not be able to change
                                                 // background style until OnIdle
 
@@ -269,12 +249,10 @@ protected:
     // common part of all ctors (not virtual because called from ctor)
     void Init();
 
-#ifdef __WXGTK20__
     virtual void DoMoveInTabOrder(wxWindow *win, MoveKind move);
 
     // Copies m_children tab order to GTK focus chain:
     void RealizeTabOrder();
-#endif
 
     // Called by ApplyWidgetStyle (which is called by SetFont() and
     // SetXXXColour etc to apply style changed to native widgets) to create