diff options
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 654 |
1 files changed, 346 insertions, 308 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 5f63f8ff0d..fe122208d8 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1993,15 +1993,15 @@ gtk_style_render_icon (GtkStyle *style, /* Default functions */ void -gtk_style_apply_default_background (GtkStyle *style, - GdkWindow *window, - gboolean set_bg, - GtkStateType state_type, - GdkRectangle *area, - gint x, - gint y, - gint width, - gint height) +gtk_style_apply_default_background (GtkStyle *style, + GdkWindow *window, + gboolean set_bg, + GtkStateType state_type, + const GdkRectangle *area, + gint x, + gint y, + gint width, + gint height) { GdkRectangle new_rect, old_rect; @@ -2056,10 +2056,10 @@ gtk_style_apply_default_background (GtkStyle *style, } } -static GdkPixbuf* +static GdkPixbuf * scale_or_ref (GdkPixbuf *src, - gint width, - gint height) + gint width, + gint height) { if (width == gdk_pixbuf_get_width (src) && height == gdk_pixbuf_get_height (src)) @@ -3383,10 +3383,10 @@ gtk_default_draw_box (GtkStyle *style, } } -static GdkGC* -get_darkened_gc (GdkWindow *window, - GdkColor *color, - gint darken_count) +static GdkGC * +get_darkened_gc (GdkWindow *window, + const GdkColor *color, + gint darken_count) { GdkColor src = *color; GdkColor shaded = *color; @@ -5404,9 +5404,9 @@ gtk_default_draw_resize_grip (GtkStyle *style, } void -_gtk_style_shade (GdkColor *a, - GdkColor *b, - gdouble k) +_gtk_style_shade (const GdkColor *a, + GdkColor *b, + gdouble k) { gdouble red; gdouble green; @@ -5605,21 +5605,23 @@ hls_to_rgb (gdouble *h, * using the given style and state. **/ void -gtk_paint_hline (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x1, - gint x2, - gint y) +gtk_paint_hline (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x1, + gint x2, + gint y) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_hline != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_hline (style, window, state_type, area, widget, detail, x1, x2, y); + + GTK_STYLE_GET_CLASS (style)->draw_hline (style, window, state_type, + (GdkRectangle *) area, widget, detail, + x1, x2, y); } /** @@ -5639,21 +5641,23 @@ gtk_paint_hline (GtkStyle *style, * using the given style and state. */ void -gtk_paint_vline (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint y1_, - gint y2_, - gint x) +gtk_paint_vline (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint y1_, + gint y2_, + gint x) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_vline != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_vline (style, window, state_type, area, widget, detail, y1_, y2_, x); + + GTK_STYLE_GET_CLASS (style)->draw_vline (style, window, state_type, + (GdkRectangle *) area, widget, detail, + y1_, y2_, x); } /** @@ -5675,23 +5679,25 @@ gtk_paint_vline (GtkStyle *style, * using the given style and state and shadow type. */ void -gtk_paint_shadow (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_shadow (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_shadow != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_shadow (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_shadow (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -5711,22 +5717,24 @@ gtk_paint_shadow (GtkStyle *style, * Draws a polygon on @window with the given parameters. */ void -gtk_paint_polygon (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - GdkPoint *points, - gint npoints, - gboolean fill) +gtk_paint_polygon (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + const GdkPoint *points, + gint n_points, + gboolean fill) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_polygon != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_polygon (style, window, state_type, shadow_type, area, widget, detail, points, npoints, fill); + + GTK_STYLE_GET_CLASS (style)->draw_polygon (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + (GdkPoint *) points, n_points, fill); } /** @@ -5750,25 +5758,27 @@ gtk_paint_polygon (GtkStyle *style, * parameters. @arrow_type determines the direction of the arrow. */ void -gtk_paint_arrow (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - GtkArrowType arrow_type, - gboolean fill, - gint x, - gint y, - gint width, - gint height) +gtk_paint_arrow (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + GtkArrowType arrow_type, + gboolean fill, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_arrow != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_arrow (style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_arrow (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + arrow_type, fill, x, y, width, height); } /** @@ -5790,23 +5800,25 @@ gtk_paint_arrow (GtkStyle *style, * parameters. */ void -gtk_paint_diamond (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_diamond (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_diamond != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_diamond (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_diamond (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -5827,21 +5839,23 @@ gtk_paint_diamond (GtkStyle *style, * Deprecated: Use gtk_paint_layout() instead. */ void -gtk_paint_string (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - const gchar *string) +gtk_paint_string (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + const gchar *string) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_string != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_string (style, window, state_type, area, widget, detail, x, y, string); + + GTK_STYLE_GET_CLASS (style)->draw_string (style, window, state_type, + (GdkRectangle *) area, widget, detail, + x, y, string); } /** @@ -5862,23 +5876,25 @@ gtk_paint_string (GtkStyle *style, * Draws a box on @window with the given parameters. */ void -gtk_paint_box (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_box (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_box != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_box (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -5899,23 +5915,25 @@ gtk_paint_box (GtkStyle *style, * Draws a flat box on @window with the given parameters. */ void -gtk_paint_flat_box (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_flat_box (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_flat_box != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_flat_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_flat_box (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -5937,23 +5955,25 @@ gtk_paint_flat_box (GtkStyle *style, * the given parameters. */ void -gtk_paint_check (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_check (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_check != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_check (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_check (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -5975,23 +5995,25 @@ gtk_paint_check (GtkStyle *style, * the given parameters. */ void -gtk_paint_option (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_option (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_option != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_option (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_option (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -6013,23 +6035,25 @@ gtk_paint_option (GtkStyle *style, * in the given rectangle on @window using the given parameters. */ void -gtk_paint_tab (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_tab (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_tab != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_tab (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_tab (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -6055,26 +6079,28 @@ gtk_paint_tab (GtkStyle *style, * gap in one side. */ void -gtk_paint_shadow_gap (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) +gtk_paint_shadow_gap (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkPositionType gap_side, + gint gap_x, + gint gap_width) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_shadow_gap != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_shadow_gap (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width); + + GTK_STYLE_GET_CLASS (style)->draw_shadow_gap (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height, gap_side, gap_x, gap_width); } @@ -6100,26 +6126,28 @@ gtk_paint_shadow_gap (GtkStyle *style, * leaving a gap in one side. */ void -gtk_paint_box_gap (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side, - gint gap_x, - gint gap_width) +gtk_paint_box_gap (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkPositionType gap_side, + gint gap_x, + gint gap_width) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_box_gap != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_box_gap (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width); + + GTK_STYLE_GET_CLASS (style)->draw_box_gap (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height, gap_side, gap_x, gap_width); } /** @@ -6141,24 +6169,26 @@ gtk_paint_box_gap (GtkStyle *style, * Draws an extension, i.e. a notebook tab. **/ void -gtk_paint_extension (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkPositionType gap_side) +gtk_paint_extension (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkPositionType gap_side) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_extension != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_extension (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side); + + GTK_STYLE_GET_CLASS (style)->draw_extension (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height, gap_side); } /** @@ -6179,22 +6209,24 @@ gtk_paint_extension (GtkStyle *style, * given style. */ void -gtk_paint_focus (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height) +gtk_paint_focus (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_focus != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, state_type, area, widget, detail, x, y, width, height); + + GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, state_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height); } /** @@ -6217,24 +6249,26 @@ gtk_paint_focus (GtkStyle *style, * given style and orientation. **/ void -gtk_paint_slider (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation) +gtk_paint_slider (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkOrientation orientation) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_slider != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_slider (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation); + + GTK_STYLE_GET_CLASS (style)->draw_slider (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height, orientation); } /** @@ -6256,24 +6290,26 @@ gtk_paint_slider (GtkStyle *style, * Draws a handle as used in #GtkHandleBox and #GtkPaned. **/ void -gtk_paint_handle (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GtkShadowType shadow_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - gint width, - gint height, - GtkOrientation orientation) +gtk_paint_handle (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + GtkShadowType shadow_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + gint width, + gint height, + GtkOrientation orientation) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_handle != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_handle (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation); + + GTK_STYLE_GET_CLASS (style)->draw_handle (style, window, state_type, shadow_type, + (GdkRectangle *) area, widget, detail, + x, y, width, height, orientation); } /** @@ -6302,22 +6338,23 @@ gtk_paint_handle (GtkStyle *style, * expanded position. **/ void -gtk_paint_expander (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - GtkExpanderStyle expander_style) +gtk_paint_expander (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + GtkExpanderStyle expander_style) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_expander != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_expander (style, window, state_type, area, - widget, detail, x, y, expander_style); + + GTK_STYLE_GET_CLASS (style)->draw_expander (style, window, state_type, + (GdkRectangle *) area, widget, detail, + x, y, expander_style); } /** @@ -6338,23 +6375,24 @@ gtk_paint_expander (GtkStyle *style, * Draws a layout on @window using the given parameters. **/ void -gtk_paint_layout (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - gboolean use_text, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - gint x, - gint y, - PangoLayout *layout) +gtk_paint_layout (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + gboolean use_text, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + gint x, + gint y, + PangoLayout *layout) { g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_layout != NULL); g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); - - GTK_STYLE_GET_CLASS (style)->draw_layout (style, window, state_type, use_text, area, - widget, detail, x, y, layout); + + GTK_STYLE_GET_CLASS (style)->draw_layout (style, window, state_type, use_text, + (GdkRectangle *) area, widget, detail, + x, y, layout); } /** @@ -6376,17 +6414,17 @@ gtk_paint_layout (GtkStyle *style, * parameters. */ void -gtk_paint_resize_grip (GtkStyle *style, - GdkWindow *window, - GtkStateType state_type, - GdkRectangle *area, - GtkWidget *widget, - const gchar *detail, - GdkWindowEdge edge, - gint x, - gint y, - gint width, - gint height) +gtk_paint_resize_grip (GtkStyle *style, + GdkWindow *window, + GtkStateType state_type, + const GdkRectangle *area, + GtkWidget *widget, + const gchar *detail, + GdkWindowEdge edge, + gint x, + gint y, + gint width, + gint height) { g_return_if_fail (GTK_IS_STYLE (style)); @@ -6394,7 +6432,7 @@ gtk_paint_resize_grip (GtkStyle *style, g_return_if_fail (style->depth == gdk_drawable_get_depth (window)); GTK_STYLE_GET_CLASS (style)->draw_resize_grip (style, window, state_type, - area, widget, detail, + (GdkRectangle *) area, widget, detail, edge, x, y, width, height); } @@ -6590,8 +6628,8 @@ style_unrealize_cursor_gcs (GtkStyle *style) } static GdkGC * -make_cursor_gc (GtkWidget *widget, - const gchar *property_name, +make_cursor_gc (GtkWidget *widget, + const gchar *property_name, const GdkColor *fallback) { GdkGCValues gc_values; @@ -6703,12 +6741,12 @@ _gtk_widget_get_cursor_color (GtkWidget *widget, } static void -draw_insertion_cursor (GtkWidget *widget, - GdkDrawable *drawable, - GdkGC *gc, - GdkRectangle *location, - GtkTextDirection direction, - gboolean draw_arrow) +draw_insertion_cursor (GtkWidget *widget, + GdkDrawable *drawable, + GdkGC *gc, + const GdkRectangle *location, + GtkTextDirection direction, + gboolean draw_arrow) { gint stem_width; gint arrow_width; @@ -6787,13 +6825,13 @@ draw_insertion_cursor (GtkWidget *widget, * Since: 2.4 **/ void -gtk_draw_insertion_cursor (GtkWidget *widget, - GdkDrawable *drawable, - GdkRectangle *area, - GdkRectangle *location, - gboolean is_primary, - GtkTextDirection direction, - gboolean draw_arrow) +gtk_draw_insertion_cursor (GtkWidget *widget, + GdkDrawable *drawable, + const GdkRectangle *area, + const GdkRectangle *location, + gboolean is_primary, + GtkTextDirection direction, + gboolean draw_arrow) { GdkGC *gc; |