Unicode compilation fixes for wxGTK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-02 21:23:13 +00:00
parent 8f92c81ebd
commit d056288d67
6 changed files with 74 additions and 72 deletions

View File

@@ -5,6 +5,8 @@
#if wxUSE_GLCANVAS
#define wxGLCanvasName _T("GLCanvas")
#if defined(__WXMSW__)
#include "wx/msw/glcanvas.h"
#elif defined(__WXMOTIF__)

View File

@@ -6,7 +6,7 @@
// Created: 17/8/98
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(__APPLE__)
@@ -65,15 +65,15 @@ class WXDLLEXPORT wxGLContext: public wxObject
{
public:
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
wxGLContext(
bool WXUNUSED(isRGB), wxWindow *win,
wxGLContext(
bool WXUNUSED(isRGB), wxWindow *win,
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
~wxGLContext();
void SetCurrent();
void SetColour(const char *colour);
void SetColour(const wxChar *colour);
void SwapBuffers();
void SetupPixelFormat();
@@ -91,7 +91,7 @@ public:
GtkWidget *m_widget;
wxPalette m_palette;
wxWindow* m_window;
private:
DECLARE_CLASS(wxGLContext)
};
@@ -110,51 +110,52 @@ public:
m_vi = (void*) NULL;
m_exposed = FALSE;
}
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxWindowID id = -1,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxWindowID id = -1,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
~wxGLCanvas();
void SetCurrent();
void SetColour(const char *colour);
void SetColour(const wxChar *colour);
void SwapBuffers();
void OnSize(wxSizeEvent& event);
void OnInternalIdle();
inline wxGLContext* GetContext() const { return m_glContext; }
inline wxGLContext* GetContext() const { return m_glContext; }
// implementation
wxGLContext *m_glContext,
*m_sharedContext;
wxGLCanvas *m_sharedContextOf;
@@ -162,10 +163,10 @@ public:
bool m_canFreeVi;
GtkWidget *m_glWidget;
bool m_exposed;
// returns an XVisualInfo* based on desired GL attributes;
// returns NULL if an appropriate visual is not found. The
// caller is reponsible for using XFree() to deallocate
// caller is reponsible for using XFree() to deallocate
// the returned structure.
static void* ChooseGLVisual(int *attribList);

View File

@@ -6,7 +6,7 @@
// Created: 17/8/98
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(__APPLE__)
@@ -65,15 +65,15 @@ class WXDLLEXPORT wxGLContext: public wxObject
{
public:
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
wxGLContext(
bool WXUNUSED(isRGB), wxWindow *win,
wxGLContext(
bool WXUNUSED(isRGB), wxWindow *win,
const wxPalette& WXUNUSED(palette),
const wxGLContext *other /* for sharing display lists */
);
~wxGLContext();
void SetCurrent();
void SetColour(const char *colour);
void SetColour(const wxChar *colour);
void SwapBuffers();
void SetupPixelFormat();
@@ -91,7 +91,7 @@ public:
GtkWidget *m_widget;
wxPalette m_palette;
wxWindow* m_window;
private:
DECLARE_CLASS(wxGLContext)
};
@@ -110,51 +110,52 @@ public:
m_vi = (void*) NULL;
m_exposed = FALSE;
}
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
wxWindowID id = -1,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
wxWindowID id = -1,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0, const wxString& name = "GLCanvas",
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
bool Create( wxWindow *parent,
const wxGLContext *shared = (wxGLContext*)NULL,
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxGLCanvasName,
int *attribList = (int*) NULL,
const wxPalette& palette = wxNullPalette );
~wxGLCanvas();
void SetCurrent();
void SetColour(const char *colour);
void SetColour(const wxChar *colour);
void SwapBuffers();
void OnSize(wxSizeEvent& event);
void OnInternalIdle();
inline wxGLContext* GetContext() const { return m_glContext; }
inline wxGLContext* GetContext() const { return m_glContext; }
// implementation
wxGLContext *m_glContext,
*m_sharedContext;
wxGLCanvas *m_sharedContextOf;
@@ -162,10 +163,10 @@ public:
bool m_canFreeVi;
GtkWidget *m_glWidget;
bool m_exposed;
// returns an XVisualInfo* based on desired GL attributes;
// returns NULL if an appropriate visual is not found. The
// caller is reponsible for using XFree() to deallocate
// caller is reponsible for using XFree() to deallocate
// the returned structure.
static void* ChooseGLVisual(int *attribList);

View File

@@ -80,8 +80,6 @@ public:
wxWindow* m_window;
};
#define wxGLCanvasName _T("GLCanvas")
class WXDLLEXPORT wxGLCanvas: public wxWindow
{
DECLARE_CLASS(wxGLCanvas)

View File

@@ -121,7 +121,7 @@ void wxGLContext::SetCurrent()
}
}
void wxGLContext::SetColour(const char *colour)
void wxGLContext::SetColour(const wxChar *colour)
{
float r = 0.0;
float g = 0.0;
@@ -441,7 +441,7 @@ void wxGLCanvas::SetCurrent()
m_glContext->SetCurrent();
}
void wxGLCanvas::SetColour( const char *colour )
void wxGLCanvas::SetColour( const wxChar *colour )
{
if (m_glContext)
m_glContext->SetColour( colour );

View File

@@ -121,7 +121,7 @@ void wxGLContext::SetCurrent()
}
}
void wxGLContext::SetColour(const char *colour)
void wxGLContext::SetColour(const wxChar *colour)
{
float r = 0.0;
float g = 0.0;
@@ -441,7 +441,7 @@ void wxGLCanvas::SetCurrent()
m_glContext->SetCurrent();
}
void wxGLCanvas::SetColour( const char *colour )
void wxGLCanvas::SetColour( const wxChar *colour )
{
if (m_glContext)
m_glContext->SetColour( colour );