#include "wx/bitmap.h"
#include "wx/fontutil.h"
+// FIXME: Use GtkImage instead of GtkPixmap. Don't use gtk_container_border_width
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
#include "wx/gtk/private.h"
#include "wx/gtk/win_gtk.h"
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
extern "C" {
static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
GtkNotebookPage *WXUNUSED(page),
- gint page,
+ guint page,
wxNotebook *notebook )
{
// are you trying to call SetSelection() from a notebook event handler?
//-----------------------------------------------------------------------------
extern "C" {
-static gint
+static void
gtk_notebook_realized_callback( GtkWidget * WXUNUSED(widget), wxWindow *win )
{
if (g_isIdle)
/* GTK 1.2 up to version 1.2.5 is broken so that we have to call a queue_resize
here in order to make repositioning before showing to take effect. */
gtk_widget_queue_resize( win->m_widget );
-
- return FALSE;
}
}
//-----------------------------------------------------------------------------
extern "C" {
-static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxNotebook *notebook )
+static gboolean
+gtk_notebook_key_press_callback( GtkWidget *widget,
+ GdkEventKey *gdk_event,
+ wxNotebook *notebook )
{
if (g_isIdle)
wxapp_install_idle_handler();
{
/* Case 2) or 4). There is already an image in the gtkhbox. Let's find it */
- GList *child = gtk_container_children(GTK_CONTAINER(nb_page->m_box));
+ GList *child = gtk_container_get_children(GTK_CONTAINER(nb_page->m_box));
while (child)
{
if (GTK_IS_PIXMAP(child->data))
size_t i = 0;
GtkNotebook * notebook = GTK_NOTEBOOK(m_widget);
- if (gtk_notebook_get_scrollable(notebook));
+ if (gtk_notebook_get_scrollable(notebook))
i = g_list_position( notebook->children, notebook->first_tab );
for ( ; i < count; i++ )
{
GtkWidget *pixmap = NULL;
- GList *children = gtk_container_children(GTK_CONTAINER(box));
+ GList *children = gtk_container_get_children(GTK_CONTAINER(box));
for ( GList *child = children; child; child = child->next )
{
if ( GTK_IS_PIXMAP(child->data) )