'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.
This commit is contained in:
@@ -159,11 +159,12 @@ add_animation (const GtkWidget *widget, gdouble stop_time)
|
||||
static gboolean
|
||||
update_animation_info (gpointer key, gpointer value, gpointer user_data)
|
||||
{
|
||||
(void) user_data;
|
||||
|
||||
AnimationInfo *animation_info = value;
|
||||
AnimationInfo *animation_info;
|
||||
GtkWidget *widget = key;
|
||||
|
||||
animation_info = value;
|
||||
(void) user_data;
|
||||
|
||||
g_assert ((widget != NULL) && (animation_info != NULL));
|
||||
|
||||
/* remove the widget from the hash table if it is not drawable */
|
||||
@@ -217,9 +218,10 @@ animation_timeout_handler (gpointer data)
|
||||
static void
|
||||
on_checkbox_toggle (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
AnimationInfo *animation_info;
|
||||
(void) data;
|
||||
|
||||
AnimationInfo *animation_info = lookup_animation_info (widget);
|
||||
animation_info = lookup_animation_info (widget);
|
||||
|
||||
if (animation_info != NULL)
|
||||
{
|
||||
|
||||
@@ -945,12 +945,12 @@ clearlooks_draw_menubar0 (cairo_t *cr,
|
||||
const MenuBarParameters *menubar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) params;
|
||||
(void) menubar;
|
||||
|
||||
/* const CairoColor *light = &colors->shade[0]; */
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
|
||||
(void) params;
|
||||
(void) menubar;
|
||||
|
||||
cairo_set_line_width (cr, 1);
|
||||
cairo_translate (cr, x, y+0.5);
|
||||
|
||||
@@ -972,12 +972,12 @@ clearlooks_draw_menubar2 (cairo_t *cr,
|
||||
const MenuBarParameters *menubar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) params;
|
||||
(void) menubar;
|
||||
|
||||
CairoColor lower;
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
(void) params;
|
||||
(void) menubar;
|
||||
|
||||
ge_shade_color (&colors->bg[0], 0.96, &lower);
|
||||
|
||||
cairo_translate (cr, x, y);
|
||||
@@ -1316,10 +1316,10 @@ clearlooks_draw_separator (cairo_t *cr,
|
||||
const SeparatorParameters *separator,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
CairoColor hilight;
|
||||
CairoColor color = colors->shade[3];
|
||||
CairoColor hilight;
|
||||
|
||||
(void) widget;
|
||||
ge_shade_color (&color, 1.4, &hilight);
|
||||
|
||||
cairo_save (cr);
|
||||
@@ -1432,11 +1432,12 @@ clearlooks_draw_toolbar (cairo_t *cr,
|
||||
const ToolbarParameters *toolbar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
CairoColor light;
|
||||
const CairoColor *dark;
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
|
||||
(void) widget;
|
||||
dark = &colors->shade[3];
|
||||
ge_shade_color (fill, 1.1, &light);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
@@ -1575,13 +1576,13 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
|
||||
const ScrollBarParameters *scrollbar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
const CairoColor *bg = &colors->shade[2];
|
||||
const CairoColor *border = &colors->shade[5];
|
||||
const CairoColor *bg;
|
||||
CairoColor bg_shade;
|
||||
cairo_pattern_t *pattern;
|
||||
cairo_pattern_t *pattern;
|
||||
const CairoColor *border = &colors->shade[5];
|
||||
|
||||
(void) widget;
|
||||
bg = &colors->shade[2];
|
||||
ge_shade_color (bg, 0.95, &bg_shade);
|
||||
|
||||
cairo_set_line_width (cr, 1);
|
||||
@@ -1809,11 +1810,11 @@ clearlooks_draw_statusbar (cairo_t *cr,
|
||||
const WidgetParameters *widget,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
CairoColor hilight;
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
|
||||
(void) widget;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
CairoColor hilight;
|
||||
|
||||
ge_shade_color (dark, 1.4, &hilight);
|
||||
|
||||
@@ -1837,9 +1838,9 @@ clearlooks_draw_menu_frame (cairo_t *cr,
|
||||
const WidgetParameters *widget,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
const CairoColor *border = &colors->shade[5];
|
||||
(void) widget;
|
||||
|
||||
const CairoColor *border = &colors->shade[5];
|
||||
cairo_translate (cr, x, y);
|
||||
cairo_set_line_width (cr, 1);
|
||||
/*
|
||||
@@ -1924,15 +1925,15 @@ clearlooks_draw_resize_grip (cairo_t *cr,
|
||||
const ResizeGripParameters *grip,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
const CairoColor *dark = &colors->shade[4];
|
||||
CairoColor hilight;
|
||||
int lx, ly;
|
||||
int x_down;
|
||||
int y_down;
|
||||
int dots;
|
||||
|
||||
const CairoColor *dark = &colors->shade[4];
|
||||
|
||||
(void) widget;
|
||||
|
||||
ge_shade_color (dark, 1.5, &hilight);
|
||||
|
||||
/* The number of dots fitting into the area. Just hardcoded to 4 right now. */
|
||||
@@ -1996,17 +1997,18 @@ clearlooks_draw_radiobutton (cairo_t *cr,
|
||||
const CheckboxParameters *checkbox,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *border;
|
||||
const CairoColor *dot;
|
||||
CairoColor shadow;
|
||||
CairoColor highlight;
|
||||
cairo_pattern_t *pt;
|
||||
gboolean inconsistent;
|
||||
|
||||
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
|
||||
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
|
||||
draw_bullet |= inconsistent;
|
||||
|
||||
|
||||
@@ -1088,13 +1088,16 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
|
||||
const ToolbarParameters *toolbar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
CairoColor light;
|
||||
const CairoColor *dark;
|
||||
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
dark = &colors->shade[3];
|
||||
|
||||
(void) widget;
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
CairoColor light;
|
||||
|
||||
ge_shade_color (fill, 1.1, &light);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
@@ -1232,9 +1235,6 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
|
||||
const CheckboxParameters *checkbox,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *border;
|
||||
const CairoColor *dot;
|
||||
CairoColor shadow;
|
||||
@@ -1243,6 +1243,9 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
|
||||
gboolean inconsistent;
|
||||
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
|
||||
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
|
||||
draw_bullet |= inconsistent;
|
||||
|
||||
|
||||
@@ -790,10 +790,10 @@ clearlooks_gummy_draw_separator (cairo_t *cr,
|
||||
const SeparatorParameters *separator,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
CairoColor color = colors->shade[3];
|
||||
CairoColor hilight;
|
||||
CairoColor color = colors->shade[3];
|
||||
|
||||
(void) widget;
|
||||
ge_shade_color (&color, 1.3, &hilight);
|
||||
|
||||
cairo_save (cr);
|
||||
@@ -1162,11 +1162,14 @@ clearlooks_gummy_draw_toolbar (cairo_t *cr,
|
||||
const ToolbarParameters *toolbar,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) widget;
|
||||
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
CairoColor light;
|
||||
const CairoColor *dark;
|
||||
const CairoColor *fill = &colors->bg[GTK_STATE_NORMAL];
|
||||
|
||||
(void) widget;
|
||||
|
||||
dark = &colors->shade[3];
|
||||
|
||||
ge_shade_color (fill, toolbar->style == 1 ? 1.1 : 1.05, &light);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
@@ -1302,12 +1305,12 @@ clearlooks_gummy_draw_statusbar (cairo_t *cr,
|
||||
const WidgetParameters *widget,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
CairoColor hilight;
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
|
||||
(void) widget;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *dark = &colors->shade[3];
|
||||
CairoColor hilight;
|
||||
|
||||
ge_shade_color (dark, 1.3, &hilight);
|
||||
|
||||
cairo_set_line_width (cr, 1);
|
||||
@@ -1331,9 +1334,6 @@ clearlooks_gummy_draw_radiobutton (cairo_t *cr,
|
||||
const CheckboxParameters *checkbox,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
const CairoColor *border;
|
||||
const CairoColor *dot;
|
||||
CairoColor shadow;
|
||||
@@ -1342,6 +1342,9 @@ clearlooks_gummy_draw_radiobutton (cairo_t *cr,
|
||||
gboolean inconsistent;
|
||||
gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
|
||||
|
||||
(void) width;
|
||||
(void) height;
|
||||
|
||||
inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
|
||||
draw_bullet |= inconsistent;
|
||||
|
||||
|
||||
@@ -173,9 +173,9 @@ clearlooks_gtk2_rc_parse_boolean (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
gboolean *retval)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
token = g_scanner_get_next_token(scanner);
|
||||
|
||||
token = g_scanner_get_next_token(scanner);
|
||||
@@ -198,10 +198,10 @@ clearlooks_gtk2_rc_parse_color(GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
GdkColor *color)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
|
||||
/* Skip 'blah_color' */
|
||||
token = g_scanner_get_next_token(scanner);
|
||||
|
||||
@@ -217,10 +217,10 @@ clearlooks_gtk2_rc_parse_double (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
gdouble *val)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
|
||||
/* Skip 'blah' */
|
||||
token = g_scanner_get_next_token(scanner);
|
||||
|
||||
@@ -242,10 +242,10 @@ clearlooks_gtk2_rc_parse_int (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
guint8 *progressbarstyle)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
|
||||
/* Skip 'sunkenmenubar' */
|
||||
token = g_scanner_get_next_token(scanner);
|
||||
|
||||
@@ -267,10 +267,10 @@ clearlooks_gtk2_rc_parse_style (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
ClearlooksStyles *style)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
|
||||
g_assert (CL_NUM_STYLES == CL_STYLE_GUMMY + 1); /* so that people don't forget ;-) */
|
||||
|
||||
/* Skip 'style' */
|
||||
@@ -308,10 +308,10 @@ clearlooks_gtk2_rc_parse_dummy (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
gchar *name)
|
||||
{
|
||||
(void) settings;
|
||||
|
||||
guint token;
|
||||
|
||||
(void) settings;
|
||||
|
||||
/* Skip option */
|
||||
token = g_scanner_get_next_token (scanner);
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user