child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
- gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
+ gtk_widget_get_preferred_size ( (bin->child),
&child_requisition, NULL);
s = sin (bin->angle);
s = sin (bin->angle);
c = cos (bin->angle);
- gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
- &child_requisition, NULL);
+ gtk_widget_get_preferred_size (bin->child,
+ &child_requisition, NULL);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GdkWindow *window;
- gint width, height;
gdouble s, c;
gdouble w, h;
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
/* clip */
- gdk_drawable_get_size (bin->offscreen_window, &width, &height);
- cairo_rectangle (cr, 0, 0, width, height);
+ cairo_rectangle (cr,
+ 0, 0,
+ gdk_window_get_width (bin->offscreen_window),
+ gdk_window_get_height (bin->offscreen_window));
cairo_clip (cr);
/* paint */
cairo_set_source_surface (cr, surface, 0, 0);
}
if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
{
- gdk_drawable_get_size (bin->offscreen_window, &width, &height);
-
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
- 0, 0, width, height);
+ 0, 0,
+ gdk_window_get_width (bin->offscreen_window),
+ gdk_window_get_height (bin->offscreen_window));
if (bin->child)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
- vbox = gtk_vbox_new (0, FALSE);
- scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0, FALSE);
+ scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
+ 0, G_PI/2, 0.01);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
button = gtk_button_new_with_label ("A Button");