diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-08-27 17:07:53 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-08-27 17:07:53 +0100 |
commit | 909fcf4b2df24e4c0794c9af2c00ae9476040548 (patch) | |
tree | fea50a6403aaa95178c34595176fefdeb8a64f88 /libs/clearlooks-newer/clearlooks_style.c | |
parent | 060c56cc3fa05201894d56e30cc36e853a958472 (diff) |
'libs/clearlooks-newer' - Clearlooks needs to be buildable as conventional 'C' but many 'C' compilers require that variables be declared at the top of each function. Move declarations as necessary to accommodate this.
Diffstat (limited to 'libs/clearlooks-newer/clearlooks_style.c')
-rw-r--r-- | libs/clearlooks-newer/clearlooks_style.c | 80 |
1 files changed, 45 insertions, 35 deletions
diff --git a/libs/clearlooks-newer/clearlooks_style.c b/libs/clearlooks-newer/clearlooks_style.c index f1b46a5426..d1ac8d5d39 100644 --- a/libs/clearlooks-newer/clearlooks_style.c +++ b/libs/clearlooks-newer/clearlooks_style.c @@ -956,14 +956,14 @@ clearlooks_style_draw_slider (DRAW_ARGS, GtkOrientation orientation) static void clearlooks_style_draw_option (DRAW_ARGS) { - (void) detail; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); const ClearlooksColors *colors; WidgetParameters params; CheckboxParameters checkbox; cairo_t *cr; + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + (void) detail; + CHECK_ARGS SANITIZE_SIZE @@ -1019,14 +1019,17 @@ clearlooks_style_draw_vline (GtkStyle *style, gint y2, gint x) { + const ClearlooksColors *colors; + SeparatorParameters separator; + cairo_t *cr; + + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + (void) state_type; (void) widget; (void) detail; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - const ClearlooksColors *colors; - SeparatorParameters separator = { FALSE }; - cairo_t *cr; + + separator.horizontal = FALSE; CHECK_ARGS @@ -1053,13 +1056,13 @@ clearlooks_style_draw_hline (GtkStyle *style, gint x2, gint y) { - (void) state_type; - (void) widget; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); const ClearlooksColors *colors; cairo_t *cr; SeparatorParameters separator; + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + + (void) state_type; + (void) widget; CHECK_ARGS @@ -1136,13 +1139,14 @@ clearlooks_style_draw_resize_grip (GtkStyle *style, gint width, gint height) { - (void) detail; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; + ClearlooksColors *colors; cairo_t *cr; WidgetParameters params; ResizeGripParameters grip; + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + + (void) detail; + colors = &clearlooks_style->colors; CHECK_ARGS SANITIZE_SIZE @@ -1164,14 +1168,15 @@ clearlooks_style_draw_resize_grip (GtkStyle *style, static void clearlooks_style_draw_tab (DRAW_ARGS) { - (void) shadow_type; - (void) detail; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; + ClearlooksColors *colors; WidgetParameters params; ArrowParameters arrow; cairo_t *cr; + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + + (void) shadow_type; + (void) detail; + colors = &clearlooks_style->colors; CHECK_ARGS SANITIZE_SIZE @@ -1202,15 +1207,18 @@ clearlooks_style_draw_arrow (GtkStyle *style, gint width, gint height) { + ClearlooksColors *colors; + WidgetParameters params; + ArrowParameters arrow; + cairo_t *cr; + ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); + (void) shadow; (void) detail; (void) fill; - - ClearlooksStyle *clearlooks_style = CLEARLOOKS_STYLE (style); - ClearlooksColors *colors = &clearlooks_style->colors; - WidgetParameters params; - ArrowParameters arrow; - cairo_t *cr = ge_gdk_drawable_to_cairo (window, area); + + cr = ge_gdk_drawable_to_cairo (window, area); + colors = &clearlooks_style->colors; CHECK_ARGS SANITIZE_SIZE @@ -1475,10 +1483,9 @@ clearlooks_style_draw_layout (GtkStyle * style, GtkWidget * widget, const gchar * detail, gint x, gint y, PangoLayout * layout) { - (void) detail; - GdkGC *gc; + (void) detail; g_return_if_fail (GTK_IS_STYLE (style)); g_return_if_fail (window != NULL); @@ -1525,17 +1532,20 @@ clearlooks_style_draw_render_icon (GtkStyle *style, GtkWidget *widget, const char *detail) { - (void) direction; - (void) detail; - - int width = 1; - int height = 1; + int width; + int height; GdkPixbuf *scaled; GdkPixbuf *stated; GdkPixbuf *base_pixbuf; GdkScreen *screen; GtkSettings *settings; - + + width = 1; + height = 1; + + (void) direction; + (void) detail; + /* Oddly, style can be NULL in this function, because * GtkIconSet can be used without a style and if so * it uses this function. |