remove unnecessary GTK declarations from defs.h, move things only used once to the place that needs them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -30,8 +30,8 @@ public:
|
||||
virtual ~wxMask();
|
||||
|
||||
// implementation
|
||||
GdkBitmap *m_bitmap;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
GdkPixmap* m_bitmap;
|
||||
GdkPixmap* GetBitmap() const;
|
||||
|
||||
protected:
|
||||
virtual void FreeData();
|
||||
|
@@ -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*);
|
||||
}
|
||||
|
||||
|
@@ -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; }
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#ifndef _WX_GTK_PEN_H_
|
||||
#define _WX_GTK_PEN_H_
|
||||
|
||||
typedef gint8 wxGTKDash;
|
||||
typedef signed char wxGTKDash;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPen
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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*);
|
||||
}
|
||||
|
||||
|
@@ -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; }
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
typedef struct _GtkList GtkList;
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxSortedArrayString;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -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
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -11,6 +11,10 @@
|
||||
#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
|
||||
|
@@ -207,7 +207,7 @@ bool wxMask::InitFromMonoBitmap(const wxBitmap& bitmap)
|
||||
return true;
|
||||
}
|
||||
|
||||
GdkBitmap *wxMask::GetBitmap() const
|
||||
GdkPixmap* wxMask::GetBitmap() const
|
||||
{
|
||||
return m_bitmap;
|
||||
}
|
||||
|
@@ -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 ) );
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user