Make this compile with gtk+ 1.3.1... not sure what the "casting"
(class assignment) of the widget styles are for, but I used _G_TYPE_IGC anyway... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -274,11 +274,23 @@ gdk_window_warp_pointer (GdkWindow *window,
|
|||||||
gint x,
|
gint x,
|
||||||
gint y)
|
gint y)
|
||||||
{
|
{
|
||||||
|
#ifndef __WXGTK20__
|
||||||
GdkWindowPrivate *priv;
|
GdkWindowPrivate *priv;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
window = GDK_ROOT_PARENT();
|
window = GDK_ROOT_PARENT();
|
||||||
|
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
if (!GDK_WINDOW_DESTROYED(window))
|
||||||
|
{
|
||||||
|
XWarpPointer (GDK_WINDOW_XDISPLAY(window),
|
||||||
|
None, /* not source window -> move from anywhere */
|
||||||
|
GDK_WINDOW_XID(window), /* dest window */
|
||||||
|
0, 0, 0, 0, /* not source window -> move from anywhere */
|
||||||
|
x, y );
|
||||||
|
}
|
||||||
|
#else
|
||||||
priv = (GdkWindowPrivate*) window;
|
priv = (GdkWindowPrivate*) window;
|
||||||
|
|
||||||
if (!priv->destroyed)
|
if (!priv->destroyed)
|
||||||
@@ -289,6 +301,7 @@ gdk_window_warp_pointer (GdkWindow *window,
|
|||||||
0, 0, 0, 0, /* not source window -> move from anywhere */
|
0, 0, 0, 0, /* not source window -> move from anywhere */
|
||||||
x, y );
|
x, y );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -339,16 +352,16 @@ static void draw_frame( GtkWidget *widget, wxWindow *win )
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -2151,7 +2164,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
|
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
scroll_class->scrollbar_spacing = 0;
|
scroll_class->scrollbar_spacing = 0;
|
||||||
|
|
||||||
gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
|
gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
|
||||||
@@ -2640,16 +2653,16 @@ void wxWindow::DoSetClientSize( int width, int height )
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -2702,16 +2715,16 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -3212,7 +3225,12 @@ GtkStyle *wxWindow::GetWidgetStyle()
|
|||||||
if (m_widgetStyle)
|
if (m_widgetStyle)
|
||||||
{
|
{
|
||||||
GtkStyle *remake = gtk_style_copy( m_widgetStyle );
|
GtkStyle *remake = gtk_style_copy( m_widgetStyle );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
/* FIXME: is this necessary? */
|
||||||
|
_G_TYPE_IGC(remake, GtkObjectClass) = _G_TYPE_IGC(m_widgetStyle, GtkObjectClass);
|
||||||
|
#else
|
||||||
remake->klass = m_widgetStyle->klass;
|
remake->klass = m_widgetStyle->klass;
|
||||||
|
#endif
|
||||||
|
|
||||||
gtk_style_unref( m_widgetStyle );
|
gtk_style_unref( m_widgetStyle );
|
||||||
m_widgetStyle = remake;
|
m_widgetStyle = remake;
|
||||||
@@ -3225,7 +3243,12 @@ GtkStyle *wxWindow::GetWidgetStyle()
|
|||||||
def = gtk_widget_get_default_style();
|
def = gtk_widget_get_default_style();
|
||||||
|
|
||||||
m_widgetStyle = gtk_style_copy( def );
|
m_widgetStyle = gtk_style_copy( def );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
/* FIXME: is this necessary? */
|
||||||
|
_G_TYPE_IGC(m_widgetStyle, GtkObjectClass) = _G_TYPE_IGC(def, GtkObjectClass);
|
||||||
|
#else
|
||||||
m_widgetStyle->klass = def->klass;
|
m_widgetStyle->klass = def->klass;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_widgetStyle;
|
return m_widgetStyle;
|
||||||
|
@@ -274,11 +274,23 @@ gdk_window_warp_pointer (GdkWindow *window,
|
|||||||
gint x,
|
gint x,
|
||||||
gint y)
|
gint y)
|
||||||
{
|
{
|
||||||
|
#ifndef __WXGTK20__
|
||||||
GdkWindowPrivate *priv;
|
GdkWindowPrivate *priv;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
window = GDK_ROOT_PARENT();
|
window = GDK_ROOT_PARENT();
|
||||||
|
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
if (!GDK_WINDOW_DESTROYED(window))
|
||||||
|
{
|
||||||
|
XWarpPointer (GDK_WINDOW_XDISPLAY(window),
|
||||||
|
None, /* not source window -> move from anywhere */
|
||||||
|
GDK_WINDOW_XID(window), /* dest window */
|
||||||
|
0, 0, 0, 0, /* not source window -> move from anywhere */
|
||||||
|
x, y );
|
||||||
|
}
|
||||||
|
#else
|
||||||
priv = (GdkWindowPrivate*) window;
|
priv = (GdkWindowPrivate*) window;
|
||||||
|
|
||||||
if (!priv->destroyed)
|
if (!priv->destroyed)
|
||||||
@@ -289,6 +301,7 @@ gdk_window_warp_pointer (GdkWindow *window,
|
|||||||
0, 0, 0, 0, /* not source window -> move from anywhere */
|
0, 0, 0, 0, /* not source window -> move from anywhere */
|
||||||
x, y );
|
x, y );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -339,16 +352,16 @@ static void draw_frame( GtkWidget *widget, wxWindow *win )
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -2151,7 +2164,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
|
GtkScrolledWindow *scrolledWindow = GTK_SCROLLED_WINDOW(m_widget);
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
scroll_class->scrollbar_spacing = 0;
|
scroll_class->scrollbar_spacing = 0;
|
||||||
|
|
||||||
gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
|
gtk_scrolled_window_set_policy( scrolledWindow, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
|
||||||
@@ -2640,16 +2653,16 @@ void wxWindow::DoSetClientSize( int width, int height )
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -2702,16 +2715,16 @@ void wxWindow::DoGetClientSize( int *width, int *height ) const
|
|||||||
GtkRequisition vscroll_req;
|
GtkRequisition vscroll_req;
|
||||||
vscroll_req.width = 2;
|
vscroll_req.width = 2;
|
||||||
vscroll_req.height = 2;
|
vscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->vscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->vscrollbar) )->size_request )
|
||||||
(scroll_window->vscrollbar, &vscroll_req );
|
(scroll_window->vscrollbar, &vscroll_req );
|
||||||
|
|
||||||
GtkRequisition hscroll_req;
|
GtkRequisition hscroll_req;
|
||||||
hscroll_req.width = 2;
|
hscroll_req.width = 2;
|
||||||
hscroll_req.height = 2;
|
hscroll_req.height = 2;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(scroll_window->hscrollbar)->klass )->size_request )
|
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(scroll_window->hscrollbar) )->size_request )
|
||||||
(scroll_window->hscrollbar, &hscroll_req );
|
(scroll_window->hscrollbar, &hscroll_req );
|
||||||
|
|
||||||
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT(m_widget)->klass );
|
GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS( GTK_OBJECT_GET_CLASS(m_widget) );
|
||||||
|
|
||||||
if (scroll_window->vscrollbar_visible)
|
if (scroll_window->vscrollbar_visible)
|
||||||
{
|
{
|
||||||
@@ -3212,7 +3225,12 @@ GtkStyle *wxWindow::GetWidgetStyle()
|
|||||||
if (m_widgetStyle)
|
if (m_widgetStyle)
|
||||||
{
|
{
|
||||||
GtkStyle *remake = gtk_style_copy( m_widgetStyle );
|
GtkStyle *remake = gtk_style_copy( m_widgetStyle );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
/* FIXME: is this necessary? */
|
||||||
|
_G_TYPE_IGC(remake, GtkObjectClass) = _G_TYPE_IGC(m_widgetStyle, GtkObjectClass);
|
||||||
|
#else
|
||||||
remake->klass = m_widgetStyle->klass;
|
remake->klass = m_widgetStyle->klass;
|
||||||
|
#endif
|
||||||
|
|
||||||
gtk_style_unref( m_widgetStyle );
|
gtk_style_unref( m_widgetStyle );
|
||||||
m_widgetStyle = remake;
|
m_widgetStyle = remake;
|
||||||
@@ -3225,7 +3243,12 @@ GtkStyle *wxWindow::GetWidgetStyle()
|
|||||||
def = gtk_widget_get_default_style();
|
def = gtk_widget_get_default_style();
|
||||||
|
|
||||||
m_widgetStyle = gtk_style_copy( def );
|
m_widgetStyle = gtk_style_copy( def );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
/* FIXME: is this necessary? */
|
||||||
|
_G_TYPE_IGC(m_widgetStyle, GtkObjectClass) = _G_TYPE_IGC(def, GtkObjectClass);
|
||||||
|
#else
|
||||||
m_widgetStyle->klass = def->klass;
|
m_widgetStyle->klass = def->klass;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_widgetStyle;
|
return m_widgetStyle;
|
||||||
|
Reference in New Issue
Block a user