]> git.saurik.com Git - wxWidgets.git/commitdiff
remove unnecessary GTK declarations from defs.h, move things only used once to the...
authorPaul Cornett <paulcor@bullseye.com>
Wed, 7 Sep 2011 16:56:50 +0000 (16:56 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 7 Sep 2011 16:56:50 +0000 (16:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

19 files changed:
include/wx/defs.h
include/wx/gtk/app.h
include/wx/gtk/bitmap.h
include/wx/gtk/control.h
include/wx/gtk/dnd.h
include/wx/gtk/dvrenderer.h
include/wx/gtk/dvrenderers.h
include/wx/gtk/fontpicker.h
include/wx/gtk/pen.h
include/wx/gtk/window.h
include/wx/gtk1/app.h
include/wx/gtk1/control.h
include/wx/gtk1/dnd.h
include/wx/gtk1/listbox.h
include/wx/gtk1/pen.h
include/wx/gtk1/window.h
src/gtk/bitmap.cpp
src/gtk/dataview.cpp
src/gtk/window.cpp

index dfd737e8619dfc16ad5442213ad3f815bfa6db1f..5376facc9d9d0ad97e4449da06827bfdda311b5b 100644 (file)
@@ -3285,52 +3285,45 @@ typedef long            WXPixel; /* safety catch in src/motif/colour.cpp */
 #ifdef __WXGTK__
 
 /* Stand-ins for GLIB types */
-typedef char           gchar;
-typedef signed char    gint8;
-typedef int            gint;
-typedef unsigned       guint;
-typedef unsigned long  gulong;
-typedef void*          gpointer;
 typedef struct _GSList GSList;
 
 /* Stand-ins for GDK types */
 typedef struct _GdkColor        GdkColor;
-typedef struct _GdkColormap     GdkColormap;
-typedef struct _GdkFont         GdkFont;
-typedef struct _GdkGC           GdkGC;
-typedef struct _GdkVisual       GdkVisual;
-
-#ifdef __WXGTK20__
-typedef struct _GdkAtom        *GdkAtom;
-typedef struct _GdkDrawable     GdkWindow;
-typedef struct _GdkDrawable     GdkBitmap;
-typedef struct _GdkDrawable     GdkPixmap;
-#else /*  GTK+ 1.2 */
-typedef gulong                  GdkAtom;
-typedef struct _GdkWindow       GdkWindow;
-typedef struct _GdkWindow       GdkBitmap;
-typedef struct _GdkWindow       GdkPixmap;
-#endif /*  GTK+ 1.2/2.0 */
-
 typedef struct _GdkCursor       GdkCursor;
-typedef struct _GdkRegion       GdkRegion;
 typedef struct _GdkDragContext  GdkDragContext;
 
-#ifdef HAVE_XIM
-typedef struct _GdkIC           GdkIC;
-typedef struct _GdkICAttr       GdkICAttr;
+#if defined(__WXGTK20__)
+    typedef struct _GdkAtom* GdkAtom;
+#else
+    typedef unsigned long GdkAtom;
+#endif
+
+#if !defined(__WXGTK30__)
+    typedef struct _GdkColormap GdkColormap;
+    typedef struct _GdkFont GdkFont;
+    typedef struct _GdkGC GdkGC;
+    typedef struct _GdkRegion GdkRegion;
+#endif
+
+#if defined(__WXGTK30__)
+    typedef struct _GdkWindow GdkWindow;
+#elif defined(__WXGTK20__)
+    typedef struct _GdkDrawable GdkWindow;
+    typedef struct _GdkDrawable GdkPixmap;
+#else
+    typedef struct _GdkWindow GdkWindow;
+    typedef struct _GdkWindow GdkBitmap;
+    typedef struct _GdkWindow GdkPixmap;
 #endif
 
 /* Stand-ins for GTK types */
 typedef struct _GtkWidget         GtkWidget;
 typedef struct _GtkRcStyle        GtkRcStyle;
 typedef struct _GtkAdjustment     GtkAdjustment;
-typedef struct _GtkList           GtkList;
 typedef struct _GtkToolbar        GtkToolbar;
 typedef struct _GtkNotebook       GtkNotebook;
 typedef struct _GtkNotebookPage   GtkNotebookPage;
 typedef struct _GtkAccelGroup     GtkAccelGroup;
-typedef struct _GtkItemFactory    GtkItemFactory;
 typedef struct _GtkSelectionData  GtkSelectionData;
 typedef struct _GtkTextBuffer     GtkTextBuffer;
 typedef struct _GtkRange          GtkRange;
index 0954cd400bb2df6ebb726b54dbae24bf57358c7e..57ff95fbf33a9f762162ee1fdb326ab682878990 100644 (file)
@@ -75,7 +75,7 @@ private:
 #if wxUSE_THREADS
     wxMutex m_idleMutex;
 #endif
-    guint m_idleSourceId;
+    unsigned m_idleSourceId;
 
 #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
     HildonProgram *m_hildonProgram;
index 71f5d5b75c4ed1bd6d30319f8ca10ebe588ba748..560dfa24d0cdd7a330802e0fa68e36ba67f7d475 100644 (file)
@@ -30,8 +30,8 @@ public:
     virtual ~wxMask();
 
     // implementation
-    GdkBitmap   *m_bitmap;
-    GdkBitmap *GetBitmap() const;
+    GdkPixmap* m_bitmap;
+    GdkPixmap* GetBitmap() const;
 
 protected:
     virtual void FreeData();
index 594285f56938a1027e100816cd666288bcc095d4..7e14b84d4bf77769e87b0d06036ab74e8e3c9af9 100644 (file)
@@ -20,7 +20,7 @@ typedef struct _GtkFrame GtkFrame;
 // C-linkage function pointer types for GetDefaultAttributesFromGTKWidget
 extern "C" {
     typedef GtkWidget* (*wxGtkWidgetNew_t)(void);
-    typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const gchar*);
+    typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const char*);
     typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*);
 }
 
index 56fc48de6ab3d7b1825dd1077f1d0e4ad419cec2..66a1c3a75743adb3d8a8002ca13c5a77e8329ab7 100644 (file)
@@ -50,13 +50,13 @@ public:
     GdkDragContext     *m_dragContext;
     GtkWidget          *m_dragWidget;
     GtkSelectionData   *m_dragData;
-    guint               m_dragTime;
+    unsigned            m_dragTime;
     bool                m_firstMotion;     // gdk has no "gdk_drag_enter" event
 
     void GTKSetDragContext( GdkDragContext *dc ) { m_dragContext = dc; }
     void GTKSetDragWidget( GtkWidget *w ) { m_dragWidget = w; }
     void GTKSetDragData( GtkSelectionData *sd ) { m_dragData = sd; }
-    void GTKSetDragTime( guint time ) { m_dragTime = time; }
+    void GTKSetDragTime(unsigned time) { m_dragTime = time; }
 };
 
 //-------------------------------------------------------------------------
index c6ecb397e4b21d679de0139a00996f8676672ce2..1c1bc50d6d00cafe54a1c52899988baf6637d0a0 100644 (file)
@@ -48,7 +48,7 @@ public:
     //
     // it validates the new value and notifies the model about the change by
     // calling GtkOnCellChanged() if it was accepted
-    virtual void GtkOnTextEdited(const gchar *itempath, const wxString& value);
+    virtual void GtkOnTextEdited(const char *itempath, const wxString& value);
 
     GtkCellRenderer* GetGtkHandle() { return m_renderer; }
     void GtkInitHandlers();
index 563d30944dd31e7dd403897a73b3821972c114fc..f833f8edd341247ee679efd1c7c300d9363a84e7 100644 (file)
@@ -303,7 +303,7 @@ public:
     virtual bool GetValue( wxVariant &value ) const;
 
 private:
-    virtual void GtkOnTextEdited(const gchar *itempath, const wxString& str);
+    virtual void GtkOnTextEdited(const char *itempath, const wxString& str);
 };
 
 
index 80376e5de80cf4ec874dbd8db72e13bafa189ba5..0a7cae44665f2d5c161501fca03e4ec14fbfe491 100644 (file)
@@ -52,7 +52,7 @@ protected:
 
 public:     // used by the GTK callback only
 
-    void SetNativeFontInfo(const gchar *gtkdescription)
+    void SetNativeFontInfo(const char *gtkdescription)
         { m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); }
 
 private:
index 4f1a3cf7ed17260fb766cb3f8734cc563c671002..2437073efbe8e4236e4a0266dfc9c7e0da09cb56 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _WX_GTK_PEN_H_
 #define _WX_GTK_PEN_H_
 
-typedef    gint8 wxGTKDash;
+typedef signed char wxGTKDash;
 
 //-----------------------------------------------------------------------------
 // wxPen
index df2e41dc11559b594037cca9c6dcb5d42caf3ed9..8155d2430513128898dcfdad0e86571b36fcbc36 100644 (file)
@@ -370,7 +370,7 @@ protected:
     //
     // This is just a wrapper for g_signal_connect() and returns the handler id
     // just as it does.
-    gulong GTKConnectWidget(const char *signal, void (*callback)());
+    unsigned long GTKConnectWidget(const char *signal, void (*callback)());
 
     // Return true from here if PostCreation() should connect to size_request
     // signal: this is done by default but doesn't work for some native
index c7c2f39e0e1c542e09af0f2e81ca9b9be42e1d67..cd279468ff795cdd5a062732f0f734c72eac73b9 100644 (file)
@@ -14,6 +14,8 @@
 #include "wx/icon.h"
 #include "wx/strconv.h"
 
+typedef struct _GdkVisual GdkVisual;
+
 //-----------------------------------------------------------------------------
 // classes
 //-----------------------------------------------------------------------------
@@ -53,7 +55,7 @@ public:
 
     bool IsInAssert() const { return m_isInAssert; }
 
-    gint            m_idleTag;
+    int             m_idleTag;
     void RemoveIdleTag();
 
     unsigned char  *m_colorCube;
index 79ec3f47afa28901c772dbbca11f8c0a0889d9a1..8815a7e69e706fee5853cd0abe7f6373e4b4dc83 100644 (file)
@@ -31,7 +31,7 @@ typedef struct _GtkFrame GtkFrame;
 // C-linkage function pointer types for GetDefaultAttributesFromGTKWidget
 extern "C" {
     typedef GtkWidget* (*wxGtkWidgetNew_t)(void);
-    typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const gchar*);
+    typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const char*);
     typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*);
 }
 
index 01187d8a4749e293a1efb9fb6880295e9a63169a..8102626aa2a95403dbaa2561f630337473fa487e 100644 (file)
@@ -65,13 +65,13 @@ public:
     GdkDragContext     *m_dragContext;
     GtkWidget          *m_dragWidget;
     GtkSelectionData   *m_dragData;
-    guint               m_dragTime;
+    unsigned            m_dragTime;
     bool                m_firstMotion;     // gdk has no "gdk_drag_enter" event
 
     void SetDragContext( GdkDragContext *dc ) { m_dragContext = dc; }
     void SetDragWidget( GtkWidget *w ) { m_dragWidget = w; }
     void SetDragData( GtkSelectionData *sd ) { m_dragData = sd; }
-    void SetDragTime( guint time ) { m_dragTime = time; }
+    void SetDragTime(unsigned time) { m_dragTime = time; }
 };
 
 //-------------------------------------------------------------------------
index be62c96846a0a3d025de2ee00d79dde6ba8e2746..c9d6a48501f98d83e01a9090af0760227557ec35 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "wx/list.h"
 
+typedef struct _GtkList GtkList;
+
 class WXDLLIMPEXP_FWD_BASE wxSortedArrayString;
 
 //-----------------------------------------------------------------------------
index 97fea928a31962b3eeb0d98a8336d140e7296ebd..724b9b7920a72a82295f6a050b9f9a5beb649269 100644 (file)
@@ -23,9 +23,9 @@
 class WXDLLIMPEXP_FWD_CORE wxPen;
 
 #if defined(__WXGTK127__)
-typedef    gint8 wxGTKDash;
+typedef signed char wxGTKDash;
 #else
-typedef    gchar wxGTKDash;
+typedef char wxGTKDash;
 #endif
 
 //-----------------------------------------------------------------------------
index 8d37e571486dcaab71fd0c2e5aaa508842fe6066..388f06fd91cc210b90fafe933c7eb6248fac1a70 100644 (file)
 #define __GTKWINDOWH__
 
 typedef struct _GtkTooltips GtkTooltips;
+#ifdef HAVE_XIM
+typedef struct _GdkIC GdkIC;
+typedef struct _GdkICAttr GdkICAttr;
+#endif
 
 // helper structure that holds class that holds GtkIMContext object and
 // some additional data needed for key events processing
index a50e8a8e26085d9ed8b0557747489be173b17741..606529c229c965f8d515c5d8883dd98b41a7e943 100644 (file)
@@ -207,7 +207,7 @@ bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap)
     return true;
 }
 
-GdkBitmap *wxMask::GetBitmap() const
+GdkPixmap* wxMask::GetBitmap() const
 {
     return m_bitmap;
 }
index 9c0115e8441c981a0aae3e798082d422d65d2556..a50f37aa30fa29402a6822edbcc7da4af33bab4f 100644 (file)
@@ -2001,7 +2001,7 @@ wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
 }
 
 void
-wxDataViewRenderer::GtkOnTextEdited(const gchar *itempath, const wxString& str)
+wxDataViewRenderer::GtkOnTextEdited(const char *itempath, const wxString& str)
 {
     wxVariant value(str);
     if (!Validate( value ))
@@ -2764,7 +2764,7 @@ wxDataViewChoiceByIndexRenderer::wxDataViewChoiceByIndexRenderer( const wxArrayS
 {
 }
 
-void wxDataViewChoiceByIndexRenderer::GtkOnTextEdited(const gchar *itempath, const wxString& str)
+void wxDataViewChoiceByIndexRenderer::GtkOnTextEdited(const char *itempath, const wxString& str)
 {
     wxVariant value( (long) GetChoices().Index( str ) );
 
index ed6255467389e9201bec58cadabdcb635356c4bf..6834a221eaa16918a478de1a1c600c81e3a411c1 100644 (file)
@@ -2474,7 +2474,7 @@ void wxWindowGTK::PostCreation()
         gtk_widget_show( m_widget );
 }
 
-gulong wxWindowGTK::GTKConnectWidget(const char *signal, void (*callback)())
+unsigned long wxWindowGTK::GTKConnectWidget(const char *signal, void (*callback)())
 {
     return g_signal_connect(m_widget, signal, callback, this);
 }