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:
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#if wxUSE_GLCANVAS
|
#if wxUSE_GLCANVAS
|
||||||
|
|
||||||
|
#define wxGLCanvasName _T("GLCanvas")
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
#include "wx/msw/glcanvas.h"
|
#include "wx/msw/glcanvas.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#elif defined(__WXMOTIF__)
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 17/8/98
|
// Created: 17/8/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||||
@@ -65,15 +65,15 @@ class WXDLLEXPORT wxGLContext: public wxObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
|
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
|
||||||
wxGLContext(
|
wxGLContext(
|
||||||
bool WXUNUSED(isRGB), wxWindow *win,
|
bool WXUNUSED(isRGB), wxWindow *win,
|
||||||
const wxPalette& WXUNUSED(palette),
|
const wxPalette& WXUNUSED(palette),
|
||||||
const wxGLContext *other /* for sharing display lists */
|
const wxGLContext *other /* for sharing display lists */
|
||||||
);
|
);
|
||||||
~wxGLContext();
|
~wxGLContext();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
void SetupPixelFormat();
|
void SetupPixelFormat();
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
wxPalette m_palette;
|
wxPalette m_palette;
|
||||||
wxWindow* m_window;
|
wxWindow* m_window;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_CLASS(wxGLContext)
|
DECLARE_CLASS(wxGLContext)
|
||||||
};
|
};
|
||||||
@@ -110,51 +110,52 @@ public:
|
|||||||
m_vi = (void*) NULL;
|
m_vi = (void*) NULL;
|
||||||
m_exposed = FALSE;
|
m_exposed = FALSE;
|
||||||
}
|
}
|
||||||
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
|
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
bool Create( wxWindow *parent,
|
bool Create( wxWindow *parent,
|
||||||
const wxGLContext *shared = (wxGLContext*)NULL,
|
const wxGLContext *shared = (wxGLContext*)NULL,
|
||||||
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0,
|
||||||
int *attribList = (int*) NULL,
|
const wxString& name = wxGLCanvasName,
|
||||||
const wxPalette& palette = wxNullPalette );
|
int *attribList = (int*) NULL,
|
||||||
|
const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
~wxGLCanvas();
|
~wxGLCanvas();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
void OnInternalIdle();
|
void OnInternalIdle();
|
||||||
|
|
||||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
wxGLContext *m_glContext,
|
wxGLContext *m_glContext,
|
||||||
*m_sharedContext;
|
*m_sharedContext;
|
||||||
wxGLCanvas *m_sharedContextOf;
|
wxGLCanvas *m_sharedContextOf;
|
||||||
@@ -162,10 +163,10 @@ public:
|
|||||||
bool m_canFreeVi;
|
bool m_canFreeVi;
|
||||||
GtkWidget *m_glWidget;
|
GtkWidget *m_glWidget;
|
||||||
bool m_exposed;
|
bool m_exposed;
|
||||||
|
|
||||||
// returns an XVisualInfo* based on desired GL attributes;
|
// returns an XVisualInfo* based on desired GL attributes;
|
||||||
// returns NULL if an appropriate visual is not found. The
|
// 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.
|
// the returned structure.
|
||||||
static void* ChooseGLVisual(int *attribList);
|
static void* ChooseGLVisual(int *attribList);
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 17/8/98
|
// Created: 17/8/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||||
@@ -65,15 +65,15 @@ class WXDLLEXPORT wxGLContext: public wxObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
|
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
|
||||||
wxGLContext(
|
wxGLContext(
|
||||||
bool WXUNUSED(isRGB), wxWindow *win,
|
bool WXUNUSED(isRGB), wxWindow *win,
|
||||||
const wxPalette& WXUNUSED(palette),
|
const wxPalette& WXUNUSED(palette),
|
||||||
const wxGLContext *other /* for sharing display lists */
|
const wxGLContext *other /* for sharing display lists */
|
||||||
);
|
);
|
||||||
~wxGLContext();
|
~wxGLContext();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
void SetupPixelFormat();
|
void SetupPixelFormat();
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
GtkWidget *m_widget;
|
GtkWidget *m_widget;
|
||||||
wxPalette m_palette;
|
wxPalette m_palette;
|
||||||
wxWindow* m_window;
|
wxWindow* m_window;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_CLASS(wxGLContext)
|
DECLARE_CLASS(wxGLContext)
|
||||||
};
|
};
|
||||||
@@ -110,51 +110,52 @@ public:
|
|||||||
m_vi = (void*) NULL;
|
m_vi = (void*) NULL;
|
||||||
m_exposed = FALSE;
|
m_exposed = FALSE;
|
||||||
}
|
}
|
||||||
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
|
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0, const wxString& name = wxGLCanvasName,
|
||||||
int *attribList = (int*) NULL,
|
int *attribList = (int*) NULL,
|
||||||
const wxPalette& palette = wxNullPalette );
|
const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
bool Create( wxWindow *parent,
|
bool Create( wxWindow *parent,
|
||||||
const wxGLContext *shared = (wxGLContext*)NULL,
|
const wxGLContext *shared = (wxGLContext*)NULL,
|
||||||
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
||||||
wxWindowID id = -1,
|
wxWindowID id = -1,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0, const wxString& name = "GLCanvas",
|
long style = 0,
|
||||||
int *attribList = (int*) NULL,
|
const wxString& name = wxGLCanvasName,
|
||||||
const wxPalette& palette = wxNullPalette );
|
int *attribList = (int*) NULL,
|
||||||
|
const wxPalette& palette = wxNullPalette );
|
||||||
|
|
||||||
~wxGLCanvas();
|
~wxGLCanvas();
|
||||||
|
|
||||||
void SetCurrent();
|
void SetCurrent();
|
||||||
void SetColour(const char *colour);
|
void SetColour(const wxChar *colour);
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
void OnInternalIdle();
|
void OnInternalIdle();
|
||||||
|
|
||||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
wxGLContext *m_glContext,
|
wxGLContext *m_glContext,
|
||||||
*m_sharedContext;
|
*m_sharedContext;
|
||||||
wxGLCanvas *m_sharedContextOf;
|
wxGLCanvas *m_sharedContextOf;
|
||||||
@@ -162,10 +163,10 @@ public:
|
|||||||
bool m_canFreeVi;
|
bool m_canFreeVi;
|
||||||
GtkWidget *m_glWidget;
|
GtkWidget *m_glWidget;
|
||||||
bool m_exposed;
|
bool m_exposed;
|
||||||
|
|
||||||
// returns an XVisualInfo* based on desired GL attributes;
|
// returns an XVisualInfo* based on desired GL attributes;
|
||||||
// returns NULL if an appropriate visual is not found. The
|
// 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.
|
// the returned structure.
|
||||||
static void* ChooseGLVisual(int *attribList);
|
static void* ChooseGLVisual(int *attribList);
|
||||||
|
|
||||||
|
@@ -80,8 +80,6 @@ public:
|
|||||||
wxWindow* m_window;
|
wxWindow* m_window;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define wxGLCanvasName _T("GLCanvas")
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxGLCanvas: public wxWindow
|
class WXDLLEXPORT wxGLCanvas: public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxGLCanvas)
|
DECLARE_CLASS(wxGLCanvas)
|
||||||
|
@@ -121,7 +121,7 @@ void wxGLContext::SetCurrent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLContext::SetColour(const char *colour)
|
void wxGLContext::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
float r = 0.0;
|
float r = 0.0;
|
||||||
float g = 0.0;
|
float g = 0.0;
|
||||||
@@ -441,7 +441,7 @@ void wxGLCanvas::SetCurrent()
|
|||||||
m_glContext->SetCurrent();
|
m_glContext->SetCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour( const char *colour )
|
void wxGLCanvas::SetColour( const wxChar *colour )
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->SetColour( colour );
|
m_glContext->SetColour( colour );
|
||||||
|
@@ -121,7 +121,7 @@ void wxGLContext::SetCurrent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLContext::SetColour(const char *colour)
|
void wxGLContext::SetColour(const wxChar *colour)
|
||||||
{
|
{
|
||||||
float r = 0.0;
|
float r = 0.0;
|
||||||
float g = 0.0;
|
float g = 0.0;
|
||||||
@@ -441,7 +441,7 @@ void wxGLCanvas::SetCurrent()
|
|||||||
m_glContext->SetCurrent();
|
m_glContext->SetCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGLCanvas::SetColour( const char *colour )
|
void wxGLCanvas::SetColour( const wxChar *colour )
|
||||||
{
|
{
|
||||||
if (m_glContext)
|
if (m_glContext)
|
||||||
m_glContext->SetColour( colour );
|
m_glContext->SetColour( colour );
|
||||||
|
Reference in New Issue
Block a user