-static void draw_frame( GtkWidget *widget, wxWindowGTK *win )
-{
- // wxUniversal widgets draw the borders and scrollbars themselves
-#ifndef __WXUNIVERSAL__
- if (!win->m_hasVMT)
- return;
-
- int dx = 0;
- int dy = 0;
- if (GTK_WIDGET_NO_WINDOW (widget))
- {
- dx += widget->allocation.x;
- dy += widget->allocation.y;
- }
-
- int x = dx;
- int y = dy;
-
- int dw = 0;
- int dh = 0;
- if (win->m_hasScrolling)
- {
- GetScrollbarWidth(widget, dw, dh);
-
- if (win->GetLayoutDirection() == wxLayout_RightToLeft)
- {
- // This is actually wrong for old GTK+ version
- // which do not display the scrollbar on the
- // left side in RTL
- x += dw;
- }
- }
-
- int w = widget->allocation.width-dw;
- int h = widget->allocation.height-dh;
-
- if (win->HasFlag(wxRAISED_BORDER))
- {
- gtk_paint_shadow (widget->style,
- widget->window,
- GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- NULL, NULL, NULL, // FIXME: No clipping?
- x, y, w, h );
- return;
- }
-
- if (win->HasFlag(wxSUNKEN_BORDER))
- {
- gtk_paint_shadow (widget->style,
- widget->window,
- GTK_STATE_NORMAL,
- GTK_SHADOW_IN,
- NULL, NULL, NULL, // FIXME: No clipping?
- x, y, w, h );
- return;
- }
-
- if (win->HasFlag(wxSIMPLE_BORDER))
- {
- GdkGC *gc;
- gc = gdk_gc_new( widget->window );
- gdk_gc_set_foreground( gc, &widget->style->black );
- gdk_draw_rectangle( widget->window, gc, FALSE, x, y, w-1, h-1 );
- g_object_unref (gc);
- return;
- }
-#endif // __WXUNIVERSAL__
-}
-
-//-----------------------------------------------------------------------------
-// "expose_event" of m_widget
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static gboolean
-gtk_window_own_expose_callback( GtkWidget *widget,
- GdkEventExpose *gdk_event,
- wxWindowGTK *win )
-{
- if (gdk_event->count == 0)
- draw_frame(widget, win);
- return false;
-}
-}
-