Commit 1d3f6b30 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

API: Rename gtk_cairo_paint_*() to gtk_paint_*()

Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
parent 70e6aba0
......@@ -514,7 +514,7 @@ gtk_rotated_bin_draw (GtkWidget *widget,
{
gdk_drawable_get_size (bin->offscreen_window, &width, &height);
gtk_cairo_paint_flat_box (gtk_widget_get_style (widget), cr,
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0, width, height);
......
......@@ -424,7 +424,7 @@ gtk_mirror_bin_draw (GtkWidget *widget,
{
gdk_drawable_get_size (bin->offscreen_window, &width, &height);
gtk_cairo_paint_flat_box (gtk_widget_get_style (widget), cr,
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0, width, height);
......
......@@ -458,7 +458,7 @@ gtk_accel_label_draw (GtkWidget *widget,
y += get_first_baseline (label_layout) - get_first_baseline (accel_layout) - allocation.y;
gtk_cairo_paint_layout (gtk_widget_get_style (widget),
gtk_paint_layout (gtk_widget_get_style (widget),
cr,
gtk_widget_get_state (widget),
FALSE,
......
......@@ -364,7 +364,7 @@ gtk_arrow_draw (GtkWidget *widget,
shadow_type = GTK_SHADOW_ETCHED_IN;
}
gtk_cairo_paint_arrow (gtk_widget_get_style (widget), cr,
gtk_paint_arrow (gtk_widget_get_style (widget), cr,
state, shadow_type,
widget, "arrow",
effective_arrow_type, TRUE,
......
......@@ -1571,7 +1571,7 @@ _gtk_button_paint (GtkButton *button,
if (gtk_widget_has_default (widget) &&
GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL)
{
gtk_cairo_paint_box (style, cr,
gtk_paint_box (style, cr,
GTK_STATE_NORMAL, GTK_SHADOW_IN,
widget, "buttondefault",
x, y, width, height);
......@@ -1599,7 +1599,7 @@ _gtk_button_paint (GtkButton *button,
if (button->relief != GTK_RELIEF_NONE || button->depressed ||
gtk_widget_get_state(widget) == GTK_STATE_PRELIGHT)
gtk_cairo_paint_box (style, cr,
gtk_paint_box (style, cr,
state_type,
shadow_type, widget, "button",
x, y, width, height);
......@@ -1637,7 +1637,7 @@ _gtk_button_paint (GtkButton *button,
y += child_displacement_y;
}
gtk_cairo_paint_focus (style, cr,
gtk_paint_focus (style, cr,
gtk_widget_get_state (widget),
widget, "button",
x, y, width, height);
......
......@@ -2343,7 +2343,7 @@ calendar_paint_header (GtkCalendar *calendar, cairo_t *cr)
max_month_width = priv->max_month_width;
max_year_width = priv->max_year_width;
gtk_cairo_paint_shadow (style, cr,
gtk_paint_shadow (style, cr,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
widget, "calendar",
0, 0, header_width, priv->header_h);
......@@ -2814,7 +2814,7 @@ calendar_paint_day (GtkCalendar *calendar,
else
state = GTK_STATE_NORMAL;
gtk_cairo_paint_focus (style, cr,
gtk_paint_focus (style, cr,
state, widget, "calendar-day",
day_rect.x, day_rect.y,
day_rect.width, day_rect.height);
......@@ -2889,12 +2889,12 @@ calendar_paint_arrow (GtkCalendar *calendar,
gdk_drawable_get_size (window, &width, &height);
if (arrow == ARROW_MONTH_LEFT || arrow == ARROW_YEAR_LEFT)
gtk_cairo_paint_arrow (style, cr, state,
gtk_paint_arrow (style, cr, state,
GTK_SHADOW_OUT, widget, "calendar",
GTK_ARROW_LEFT, TRUE,
width/2 - 3, height/2 - 4, 8, 8);
else
gtk_cairo_paint_arrow (style, cr, state,
gtk_paint_arrow (style, cr, state,
GTK_SHADOW_OUT, widget, "calendar",
GTK_ARROW_RIGHT, TRUE,
width/2 - 4, height/2 - 4, 8, 8);
......@@ -2913,7 +2913,7 @@ gtk_calendar_draw (GtkWidget *widget,
if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
{
gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
gtk_paint_shadow (gtk_widget_get_style (widget), cr,
gtk_widget_get_state (widget), GTK_SHADOW_IN,
widget, "calendar",
0, 0,
......
......@@ -557,7 +557,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
* but some engines don't paint anything with that detail for
* non-GtkProgressBar widgets.
*/
gtk_cairo_paint_box (style,
gtk_paint_box (style,
cr,
GTK_STATE_NORMAL, GTK_SHADOW_IN,
widget, NULL,
......@@ -604,7 +604,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
clip.y = bar_position;
}
gtk_cairo_paint_box (style,
gtk_paint_box (style,
cr,
GTK_STATE_SELECTED, GTK_SHADOW_OUT,
widget, "bar",
......@@ -633,7 +633,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
gdk_cairo_rectangle (cr, &clip);
cairo_clip (cr);
gtk_cairo_paint_layout (style, cr,
gtk_paint_layout (style, cr,
GTK_STATE_SELECTED,
FALSE, widget, "progressbar",
x_pos, y_pos,
......@@ -658,7 +658,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
gdk_cairo_rectangle (cr, &clip);
cairo_clip (cr);
gtk_cairo_paint_layout (style, cr,
gtk_paint_layout (style, cr,
GTK_STATE_NORMAL,
FALSE, widget, "progressbar",
x_pos, y_pos,
......@@ -684,7 +684,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell,
gdk_cairo_rectangle (cr, &clip);
cairo_clip (cr);
gtk_cairo_paint_layout (style, cr,
gtk_paint_layout (style, cr,
GTK_STATE_NORMAL,
FALSE, widget, "progressbar",
x_pos, y_pos,
......
......@@ -371,7 +371,7 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr,
state = GTK_STATE_PRELIGHT;
}
gtk_cairo_paint_spinner (gtk_widget_get_style (widget),
gtk_paint_spinner (gtk_widget_get_style (widget),
cr,
state,
widget,
......
......@@ -1754,7 +1754,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
else if (priv->wrap_width == -1)
pango_layout_set_width (layout, -1);
gtk_cairo_paint_layout (gtk_widget_get_style (widget),
gtk_paint_layout (gtk_widget_get_style (widget),
cr,
state,
TRUE,
......
......@@ -374,7 +374,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
if (priv->radio)
{
gtk_cairo_paint_option (gtk_widget_get_style (widget),
gtk_paint_option (gtk_widget_get_style (widget),
cr,
state, shadow,
widget, "cellradio",
......@@ -384,7 +384,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
}
else
{
gtk_cairo_paint_check (gtk_widget_get_style (widget),
gtk_paint_check (gtk_widget_get_style (widget),
cr,
state, shadow,
widget, "cellcheck",
......
......@@ -163,7 +163,7 @@ gtk_check_button_paint (GtkWidget *widget,
GtkAllocation child_allocation;
gtk_widget_get_allocation (child, &child_allocation);
gtk_cairo_paint_focus (style, cr, state,
gtk_paint_focus (style, cr, state,
widget, "checkbutton",
child_allocation.x - allocation.x - focus_width - focus_pad,
child_allocation.y - allocation.y - focus_width - focus_pad,
......@@ -172,7 +172,7 @@ gtk_check_button_paint (GtkWidget *widget,
}
else
{
gtk_cairo_paint_focus (style, cr, state,
gtk_paint_focus (style, cr, state,
widget, "checkbutton",
border_width,
border_width,
......@@ -420,7 +420,7 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
if (gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
{
gtk_cairo_paint_flat_box (style, cr, GTK_STATE_PRELIGHT,
gtk_paint_flat_box (style, cr, GTK_STATE_PRELIGHT,
GTK_SHADOW_ETCHED_OUT,
widget, "checkbutton",
border_width, border_width,
......@@ -428,7 +428,7 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
allocation.height - (2 * border_width));
}
gtk_cairo_paint_check (style, cr,
gtk_paint_check (style, cr,
state_type, shadow_type,
widget, "checkbutton",
x, y, indicator_size, indicator_size);
......
......@@ -519,14 +519,14 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
if (priv->draw_as_radio)
{
gtk_cairo_paint_option (style, cr,
gtk_paint_option (style, cr,
state_type, shadow_type,
widget, "option",
x, y, indicator_size, indicator_size);
}
else
{
gtk_cairo_paint_check (style, cr,
gtk_paint_check (style, cr,
state_type, shadow_type,
widget, "check",
x, y, indicator_size, indicator_size);
......
......@@ -2494,7 +2494,7 @@ gtk_combo_box_draw (GtkWidget *widget,
if (priv->shadow_type != GTK_SHADOW_NONE)
{
gtk_cairo_paint_shadow (gtk_widget_get_style (widget),
gtk_paint_shadow (gtk_widget_get_style (widget),
cr,
GTK_STATE_NORMAL, priv->shadow_type,
widget, "combobox",
......
......@@ -349,7 +349,7 @@ gtk_drag_highlight_draw (GtkWidget *widget,
int width = gtk_widget_get_allocated_width (widget);
int height = gtk_widget_get_allocated_height (widget);
gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
gtk_paint_shadow (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
widget, "dnd",
0, 0, width, height);
......
......@@ -1109,7 +1109,7 @@ gtk_drag_highlight_draw (GtkWidget *widget,
int width = gtk_widget_get_allocated_width (widget);
int height = gtk_widget_get_allocated_height (widget);
gtk_cairo_paint_shadow (gtk_widget_get_style (widget), cr,
gtk_paint_shadow (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
widget, "dnd",
0, 0, width, height);
......
......@@ -3307,7 +3307,7 @@ gtk_entry_draw_frame (GtkWidget *widget,
state = gtk_widget_has_focus (widget) ?
GTK_STATE_ACTIVE : gtk_widget_get_state (widget);
gtk_cairo_paint_shadow (style, cr,
gtk_paint_shadow (style, cr,
state, priv->shadow_type,
widget, "entry", x, y, width, height);
......@@ -3321,7 +3321,7 @@ gtk_entry_draw_frame (GtkWidget *widget,
width += 2 * priv->focus_width;
height += 2 * priv->focus_width;
gtk_cairo_paint_focus (style, cr,
gtk_paint_focus (style, cr,
gtk_widget_get_state (widget),
widget, "entry",
0, 0, width, height);
......@@ -3439,7 +3439,7 @@ gtk_entry_draw_progress (GtkWidget *widget,
if (!gtk_widget_get_sensitive (widget))
state = GTK_STATE_INSENSITIVE;
gtk_cairo_paint_box (gtk_widget_get_style (widget), cr,
gtk_paint_box (gtk_widget_get_style (widget), cr,
state, GTK_SHADOW_OUT,
widget, "entry-progress",
x, y,
......@@ -3474,7 +3474,7 @@ gtk_entry_draw (GtkWidget *widget,
gdk_window_get_position (entry->text_area, &x, &y);
cairo_translate (cr, x, y);
gtk_cairo_paint_flat_box (style, cr,
gtk_paint_flat_box (style, cr,
state, GTK_SHADOW_NONE,
widget, "entry_bg",
0, 0, width, height);
......@@ -3509,7 +3509,7 @@ gtk_entry_draw (GtkWidget *widget,
gdk_window_get_position (icon_info->window, &x, &y);
cairo_translate (cr, x, y);
gtk_cairo_paint_flat_box (style, cr,
gtk_paint_flat_box (style, cr,
state, GTK_SHADOW_NONE,
widget, "entry_bg",
0, 0, width, height);
......
......@@ -568,7 +568,7 @@ gtk_event_box_draw (GtkWidget *widget,
{
if (gtk_widget_get_has_window (widget) &&
!gtk_widget_get_app_paintable (widget))
gtk_cairo_paint_flat_box (gtk_widget_get_style (widget),
gtk_paint_flat_box (gtk_widget_get_style (widget),
cr,
gtk_widget_get_state (widget),
GTK_SHADOW_NONE,
......
......@@ -767,7 +767,7 @@ gtk_expander_paint_prelight (GtkExpander *expander, cairo_t *cr)
area.height = MAX (area.height, expander_size + 2 * expander_spacing);
area.height += !interior_focus ? (focus_width + focus_pad) * 2 : 0;
gtk_cairo_paint_flat_box (gtk_widget_get_style (widget),
gtk_paint_flat_box (gtk_widget_get_style (widget),
cr,
GTK_STATE_PRELIGHT,
GTK_SHADOW_ETCHED_OUT,
......@@ -797,7 +797,7 @@ gtk_expander_paint (GtkExpander *expander, cairo_t *cr)
gtk_expander_paint_prelight (expander, cr);
}
gtk_cairo_paint_expander (gtk_widget_get_style (widget),
gtk_paint_expander (gtk_widget_get_style (widget),
cr,
state,
widget,
......@@ -886,7 +886,7 @@ gtk_expander_paint_focus (GtkExpander *expander,
height = rect.height + 2 * focus_pad;
}
gtk_cairo_paint_focus (gtk_widget_get_style (widget),
gtk_paint_focus (gtk_widget_get_style (widget),
cr,
gtk_widget_get_state (widget),
widget, "expander",
......
......@@ -890,7 +890,7 @@ completion_feedback_window_draw_cb (GtkWidget *widget,
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (data);
gtk_cairo_paint_flat_box (gtk_widget_get_style (chooser_entry->completion_feedback_window),
gtk_paint_flat_box (gtk_widget_get_style (chooser_entry->completion_feedback_window),
cr,
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
......
......@@ -617,12 +617,12 @@ gtk_frame_draw (GtkWidget *widget,
x2 = style->xthickness + (priv->child_allocation.width - priv->label_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_SIDE_PAD;
/* If the label is completely over or under the frame we can omit the gap */
if (priv->label_yalign == 0.0 || priv->label_yalign == 1.0)
gtk_cairo_paint_shadow (style, cr,
gtk_paint_shadow (style, cr,
state, priv->shadow_type,
widget, "frame",
x, y, width, height);
else
gtk_cairo_paint_shadow_gap (style, cr,
gtk_paint_shadow_gap (style, cr,
state, priv->shadow_type,
widget, "frame",
x, y, width, height,
......@@ -630,7 +630,7 @@ gtk_frame_draw (GtkWidget *widget,
x2, priv->label_allocation.width + 2 * LABEL_PAD);
}
else
gtk_cairo_paint_shadow (style, cr,
gtk_paint_shadow (style, cr,
state, priv->shadow_type,
widget, "frame",
x, y, width, height);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment