X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68567a967bc8afd37a40cb9a7ee5021b9ee6cd96..daebb84bff054d3833baca58a5dc506de56c64a1:/src/gtk/glcanvas.cpp diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index dd566c8f30..98d32c753f 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gtk/glcanvas.cpp +// Name: src/gtk/glcanvas.cpp // Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK // Author: Robert Roebling // Modified by: @@ -12,8 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/setup.h" - #if wxUSE_GLCANVAS #include "wx/glcanvas.h" @@ -31,6 +29,7 @@ extern "C" } #include "wx/gtk/win_gtk.h" +#include "wx/gtk/private.h" // DLL options compatibility check: #include "wx/build.h" @@ -47,12 +46,6 @@ int wxGLCanvas::m_glxVersion = 0; //--------------------------------------------------------------------------- XVisualInfo *g_vi = (XVisualInfo*) NULL; -//----------------------------------------------------------------------------- -// idle system -//----------------------------------------------------------------------------- - -extern void wxapp_install_idle_handler(); -extern bool g_isIdle; //--------------------------------------------------------------------------- // wxGLContext @@ -403,7 +396,6 @@ bool wxGLCanvas::Create( wxWindow *parent, colormap = gdk_colormap_new( visual, TRUE ); gtk_widget_push_colormap( colormap ); - gtk_widget_push_visual( visual ); wxWindow::Create( parent, id, pos, size, style, name ); m_glWidget = m_wxwindow; @@ -413,21 +405,21 @@ bool wxGLCanvas::Create( wxWindow *parent, gtk_pizza_set_clear( GTK_PIZZA(m_wxwindow), FALSE ); - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "realize", - GTK_SIGNAL_FUNC(gtk_glwindow_realized_callback), (gpointer) this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "map", - GTK_SIGNAL_FUNC(gtk_glwindow_map_callback), (gpointer) this ); - - gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event", - GTK_SIGNAL_FUNC(gtk_glwindow_expose_callback), (gpointer)this ); - - gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate", - GTK_SIGNAL_FUNC(gtk_glcanvas_size_callback), (gpointer)this ); + g_signal_connect (m_wxwindow, "realize", + G_CALLBACK (gtk_glwindow_realized_callback), + this); + g_signal_connect (m_wxwindow, "map", + G_CALLBACK (gtk_glwindow_map_callback), + this); + g_signal_connect (m_wxwindow, "expose_event", + G_CALLBACK (gtk_glwindow_expose_callback), + this); + g_signal_connect (m_widget, "size_allocate", + G_CALLBACK (gtk_glcanvas_size_callback), + this); if (gtk_check_version(2,2,0) != NULL) { - gtk_widget_pop_visual(); gtk_widget_pop_colormap(); }