summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/gtk/gtk3drawing.c
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/gtk/gtk3drawing.c')
-rw-r--r--WebCore/platform/gtk/gtk3drawing.c126
1 files changed, 0 insertions, 126 deletions
diff --git a/WebCore/platform/gtk/gtk3drawing.c b/WebCore/platform/gtk/gtk3drawing.c
index 880eb6d..d3bdd56 100644
--- a/WebCore/platform/gtk/gtk3drawing.c
+++ b/WebCore/platform/gtk/gtk3drawing.c
@@ -178,20 +178,6 @@ ensure_scrollbar_widget()
}
static gint
-ensure_scale_widget()
-{
- if (!gParts->hScaleWidget) {
- gParts->hScaleWidget = gtk_hscale_new(NULL);
- setup_widget_prototype(gParts->hScaleWidget);
- }
- if (!gParts->vScaleWidget) {
- gParts->vScaleWidget = gtk_vscale_new(NULL);
- setup_widget_prototype(gParts->vScaleWidget);
- }
- return MOZ_GTK_SUCCESS;
-}
-
-static gint
ensure_entry_widget()
{
if (!gParts->entryWidget) {
@@ -848,82 +834,6 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
}
static gint
-moz_gtk_scale_paint(cairo_t* cr, GdkRectangle* rect,
- GtkWidgetState* state, GtkOrientation flags,
- GtkTextDirection direction)
-{
- gint x = 0, y = 0;
- GtkStateType state_type = ConvertGtkState(state);
- GtkStyle* style;
- GtkWidget* widget;
-
- ensure_scale_widget();
- widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
- gtk_widget_set_direction(widget, direction);
-
- style = gtk_widget_get_style(widget);
-
- if (flags == GTK_ORIENTATION_HORIZONTAL) {
- x = XTHICKNESS(style);
- y++;
- }
- else {
- x++;
- y = YTHICKNESS(style);
- }
-
- gtk_style_apply_default_background(style, cr, gtk_widget_get_window (widget),
- GTK_STATE_NORMAL,
- rect->x, rect->y,
- rect->width, rect->height);
-
- gtk_paint_box(style, cr, GTK_STATE_ACTIVE, GTK_SHADOW_IN,
- widget, "trough", rect->x + x, rect->y + y,
- rect->width - 2*x, rect->height - 2*y);
-
- if (state->focused)
- gtk_paint_focus(style, cr, state_type, widget, "trough",
- rect->x, rect->y, rect->width, rect->height);
-
- return MOZ_GTK_SUCCESS;
-}
-
-static gint
-moz_gtk_scale_thumb_paint(cairo_t* cr, GdkRectangle* rect,
- GtkWidgetState* state, GtkOrientation flags,
- GtkTextDirection direction)
-{
- GtkStateType state_type = ConvertGtkState(state);
- GtkStyle* style;
- GtkWidget* widget;
- gint thumb_width, thumb_height, x, y;
-
- ensure_scale_widget();
- widget = ((flags == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
- gtk_widget_set_direction(widget, direction);
-
- style = gtk_widget_get_style(widget);
-
- /* determine the thumb size, and position the thumb in the center in the opposite axis */
- if (flags == GTK_ORIENTATION_HORIZONTAL) {
- moz_gtk_get_scalethumb_metrics(GTK_ORIENTATION_HORIZONTAL, &thumb_width, &thumb_height);
- x = rect->x;
- y = rect->y + (rect->height - thumb_height) / 2;
- }
- else {
- moz_gtk_get_scalethumb_metrics(GTK_ORIENTATION_VERTICAL, &thumb_height, &thumb_width);
- x = rect->x + (rect->width - thumb_width) / 2;
- y = rect->y;
- }
-
- gtk_paint_slider(style, cr, state_type, GTK_SHADOW_OUT,
- widget, (flags == GTK_ORIENTATION_HORIZONTAL) ? "hscale" : "vscale",
- x, y, thumb_width, thumb_height, flags);
-
- return MOZ_GTK_SUCCESS;
-}
-
-static gint
moz_gtk_entry_paint(cairo_t* cr, GdkRectangle* rect,
GtkWidgetState* state, GtkWidget* widget,
GtkTextDirection direction)
@@ -1227,14 +1137,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
ensure_progress_widget();
w = gParts->progresWidget;
break;
- case MOZ_GTK_SCALE_HORIZONTAL:
- ensure_scale_widget();
- w = gParts->hScaleWidget;
- break;
- case MOZ_GTK_SCALE_VERTICAL:
- ensure_scale_widget();
- w = gParts->vScaleWidget;
- break;
/* These widgets have no borders, since they are not containers. */
case MOZ_GTK_CHECKBUTTON:
case MOZ_GTK_RADIOBUTTON:
@@ -1243,8 +1145,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
case MOZ_GTK_SCROLLBAR_TRACK_VERTICAL:
case MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL:
case MOZ_GTK_SCROLLBAR_THUMB_VERTICAL:
- case MOZ_GTK_SCALE_THUMB_HORIZONTAL:
- case MOZ_GTK_SCALE_THUMB_VERTICAL:
case MOZ_GTK_PROGRESS_CHUNK:
*left = *top = *right = *bottom = 0;
return MOZ_GTK_SUCCESS;
@@ -1261,22 +1161,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
}
gint
-moz_gtk_get_scalethumb_metrics(GtkOrientation orient, gint* thumb_length, gint* thumb_height)
-{
- GtkWidget* widget;
-
- ensure_scale_widget();
- widget = ((orient == GTK_ORIENTATION_HORIZONTAL) ? gParts->hScaleWidget : gParts->vScaleWidget);
-
- gtk_widget_style_get (widget,
- "slider_length", thumb_length,
- "slider_width", thumb_height,
- NULL);
-
- return MOZ_GTK_SUCCESS;
-}
-
-gint
moz_gtk_get_scrollbar_metrics(MozGtkScrollbarMetrics *metrics)
{
ensure_scrollbar_widget();
@@ -1340,16 +1224,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, cairo_t* cr,
case MOZ_GTK_SCROLLED_WINDOW:
return moz_gtk_scrolled_window_paint(cr, rect, state);
break;
- case MOZ_GTK_SCALE_HORIZONTAL:
- case MOZ_GTK_SCALE_VERTICAL:
- return moz_gtk_scale_paint(cr, rect, state,
- (GtkOrientation) flags, direction);
- break;
- case MOZ_GTK_SCALE_THUMB_HORIZONTAL:
- case MOZ_GTK_SCALE_THUMB_VERTICAL:
- return moz_gtk_scale_thumb_paint(cr, rect, state,
- (GtkOrientation) flags, direction);
- break;
case MOZ_GTK_ENTRY:
ensure_entry_widget();
return moz_gtk_entry_paint(cr, rect, state,