mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
Remove deprecated GtkStyle functions
This commit is contained in:
parent
165fd5903f
commit
8ac9a0e67f
736
gtk/gtkstyle.c
736
gtk/gtkstyle.c
@ -32,7 +32,6 @@
|
||||
#include "gtkgc.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
#include "gtkrc.h"
|
||||
#include "gtkspinbutton.h"
|
||||
#include "gtkstyle.h"
|
||||
@ -828,35 +827,6 @@ gtk_style_detach (GtkStyle *style)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_ref:
|
||||
* @style: a #GtkStyle.
|
||||
* @returns: @style.
|
||||
*
|
||||
* Increase the reference count of @style.
|
||||
*
|
||||
* Deprecated: 2.0: use g_object_ref() instead.
|
||||
*/
|
||||
GtkStyle*
|
||||
gtk_style_ref (GtkStyle *style)
|
||||
{
|
||||
return (GtkStyle *) g_object_ref (style);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_unref:
|
||||
* @style: a #GtkStyle.
|
||||
*
|
||||
* Decrease the reference count of @style.
|
||||
*
|
||||
* Deprecated: 2.0: use g_object_unref() instead.
|
||||
*/
|
||||
void
|
||||
gtk_style_unref (GtkStyle *style)
|
||||
{
|
||||
g_object_unref (style);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_style_realize (GtkStyle *style,
|
||||
GdkColormap *colormap)
|
||||
@ -948,515 +918,6 @@ gtk_style_lookup_color (GtkStyle *style,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_hline:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @x1: the starting x coordinate
|
||||
* @x2: the ending x coordinate
|
||||
* @y: the y coordinate
|
||||
*
|
||||
* Draws a horizontal line from (@x1, @y) to (@x2, @y) in @window
|
||||
* using the given style and state.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_hline() instead.
|
||||
**/
|
||||
void
|
||||
gtk_draw_hline (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_hline (style, window, state_type, NULL, NULL, NULL, x1, x2, y);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_draw_vline:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @y1_: the starting y coordinate
|
||||
* @y2_: the ending y coordinate
|
||||
* @x: the x coordinate
|
||||
*
|
||||
* Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @window
|
||||
* using the given style and state.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_vline() instead.
|
||||
**/
|
||||
void
|
||||
gtk_draw_vline (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_vline (style, window, state_type, NULL, NULL, NULL, y1_, y2_, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_shadow:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @x: x origin of the rectangle
|
||||
* @y: y origin of the rectangle
|
||||
* @width: width of the rectangle
|
||||
* @height: width of the rectangle
|
||||
*
|
||||
* Draws a shadow around the given rectangle in @window
|
||||
* using the given style and state and shadow type.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_shadow() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_shadow (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_shadow (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_polygon:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @points: an array of #GdkPoint<!-- -->s
|
||||
* @npoints: length of @points
|
||||
* @fill: %TRUE if the polygon should be filled
|
||||
*
|
||||
* Draws a polygon on @window with the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_polygon() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_polygon (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GdkPoint *points,
|
||||
gint npoints,
|
||||
gboolean fill)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE (style));
|
||||
g_return_if_fail (GTK_STYLE_GET_CLASS (style)->draw_polygon != NULL);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_polygon (style, window, state_type, shadow_type, NULL, NULL, NULL, points, npoints, fill);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_arrow:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @arrow_type: the type of arrow to draw
|
||||
* @fill: %TRUE if the arrow tip should be filled
|
||||
* @x: x origin of the rectangle to draw the arrow in
|
||||
* @y: y origin of the rectangle to draw the arrow in
|
||||
* @width: width of the rectangle to draw the arrow in
|
||||
* @height: height of the rectangle to draw the arrow in
|
||||
*
|
||||
* Draws an arrow in the given rectangle on @window using the given
|
||||
* parameters. @arrow_type determines the direction of the arrow.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_arrow() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_arrow (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_arrow (style, window, state_type, shadow_type, NULL, NULL, NULL, arrow_type, fill, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_diamond:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the rectangle to draw the diamond in
|
||||
* @y: y origin of the rectangle to draw the diamond in
|
||||
* @width: width of the rectangle to draw the diamond in
|
||||
* @height: height of the rectangle to draw the diamond in
|
||||
*
|
||||
* Draws a diamond in the given rectangle on @window using the given
|
||||
* parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_diamond() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_diamond (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_diamond (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_string:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @x: x origin
|
||||
* @y: y origin
|
||||
* @string: the string to draw
|
||||
*
|
||||
* Draws a text string on @window with the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_layout() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_string (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_string (style, window, state_type, NULL, NULL, NULL, x, y, string);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_box:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the box
|
||||
* @y: y origin of the box
|
||||
* @width: the width of the box
|
||||
* @height: the height of the box
|
||||
*
|
||||
* Draws a box on @window with the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_box() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_box (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_box (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_flat_box:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the box
|
||||
* @y: y origin of the box
|
||||
* @width: the width of the box
|
||||
* @height: the height of the box
|
||||
*
|
||||
* Draws a flat box on @window with the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_flat_box() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_flat_box (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_flat_box (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_check:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the rectangle to draw the check in
|
||||
* @y: y origin of the rectangle to draw the check in
|
||||
* @width: the width of the rectangle to draw the check in
|
||||
* @height: the height of the rectangle to draw the check in
|
||||
*
|
||||
* Draws a check button indicator in the given rectangle on @window with
|
||||
* the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_check() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_check (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_check (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_option:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the rectangle to draw the option in
|
||||
* @y: y origin of the rectangle to draw the option in
|
||||
* @width: the width of the rectangle to draw the option in
|
||||
* @height: the height of the rectangle to draw the option in
|
||||
*
|
||||
* Draws a radio button indicator in the given rectangle on @window with
|
||||
* the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_option() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_option (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_option (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_tab:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: the type of shadow to draw
|
||||
* @x: x origin of the rectangle to draw the tab in
|
||||
* @y: y origin of the rectangle to draw the tab in
|
||||
* @width: the width of the rectangle to draw the tab in
|
||||
* @height: the height of the rectangle to draw the tab in
|
||||
*
|
||||
* Draws an option menu tab (i.e. the up and down pointing arrows)
|
||||
* in the given rectangle on @window using the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_tab() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_tab (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_tab (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_shadow_gap:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @x: x origin of the rectangle
|
||||
* @y: y origin of the rectangle
|
||||
* @width: width of the rectangle
|
||||
* @height: width of the rectangle
|
||||
* @gap_side: side in which to leave the gap
|
||||
* @gap_x: starting position of the gap
|
||||
* @gap_width: width of the gap
|
||||
*
|
||||
* Draws a shadow around the given rectangle in @window
|
||||
* using the given style and state and shadow type, leaving a
|
||||
* gap in one side.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_shadow_gap() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_shadow_gap (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_shadow_gap (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height, gap_side, gap_x, gap_width);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_box_gap:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @x: x origin of the rectangle
|
||||
* @y: y origin of the rectangle
|
||||
* @width: width of the rectangle
|
||||
* @height: width of the rectangle
|
||||
* @gap_side: side in which to leave the gap
|
||||
* @gap_x: starting position of the gap
|
||||
* @gap_width: width of the gap
|
||||
*
|
||||
* Draws a box in @window using the given style and state and shadow type,
|
||||
* leaving a gap in one side.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_box_gap() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_box_gap (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_box_gap (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height, gap_side, gap_x, gap_width);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_extension:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @x: x origin of the extension
|
||||
* @y: y origin of the extension
|
||||
* @width: width of the extension
|
||||
* @height: width of the extension
|
||||
* @gap_side: the side on to which the extension is attached
|
||||
*
|
||||
* Draws an extension, i.e. a notebook tab.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_extension() instead.
|
||||
**/
|
||||
void
|
||||
gtk_draw_extension (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_extension (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height, gap_side);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_focus:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @x: the x origin of the rectangle around which to draw a focus indicator
|
||||
* @y: the y origin of the rectangle around which to draw a focus indicator
|
||||
* @width: the width of the rectangle around which to draw a focus indicator
|
||||
* @height: the height of the rectangle around which to draw a focus indicator
|
||||
*
|
||||
* Draws a focus indicator around the given rectangle on @window using the
|
||||
* given style.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_focus() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_focus (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_focus (style, window, GTK_STATE_NORMAL, NULL, NULL, NULL, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_slider:
|
||||
* @style: a #GtkStyle
|
||||
@ -1489,68 +950,6 @@ gtk_draw_slider (GtkStyle *style,
|
||||
GTK_STYLE_GET_CLASS (style)->draw_slider (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height, orientation);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_handle:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @shadow_type: type of shadow to draw
|
||||
* @x: x origin of the handle
|
||||
* @y: y origin of the handle
|
||||
* @width: with of the handle
|
||||
* @height: height of the handle
|
||||
* @orientation: the orientation of the handle
|
||||
*
|
||||
* Draws a handle as used in #GtkHandleBox and #GtkPaned.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_handle() instead.
|
||||
**/
|
||||
void
|
||||
gtk_draw_handle (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_handle (style, window, state_type, shadow_type, NULL, NULL, NULL, x, y, width, height, orientation);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_expander:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @x: the x position to draw the expander at
|
||||
* @y: the y position to draw the expander at
|
||||
* @expander_style: the style to draw the expander in
|
||||
*
|
||||
* Draws an expander as used in #GtkTreeView.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_expander() instead.
|
||||
**/
|
||||
void
|
||||
gtk_draw_expander (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
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);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_expander (style, window, state_type,
|
||||
NULL, NULL, NULL,
|
||||
x, y, expander_style);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_layout:
|
||||
* @style: a #GtkStyle
|
||||
@ -1581,42 +980,6 @@ gtk_draw_layout (GtkStyle *style,
|
||||
x, y, layout);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_draw_resize_grip:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @edge: the edge in which to draw the resize grip
|
||||
* @x: the x origin of the rectangle in which to draw the resize grip
|
||||
* @y: the y origin of the rectangle in which to draw the resize grip
|
||||
* @width: the width of the rectangle in which to draw the resize grip
|
||||
* @height: the height of the rectangle in which to draw the resize grip
|
||||
*
|
||||
* Draws a resize grip in the given rectangle on @window using the given
|
||||
* parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_resize_grip() instead.
|
||||
*/
|
||||
void
|
||||
gtk_draw_resize_grip (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GdkWindowEdge edge,
|
||||
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_resize_grip != NULL);
|
||||
|
||||
GTK_STYLE_GET_CLASS (style)->draw_resize_grip (style, window, state_type,
|
||||
NULL, NULL, NULL,
|
||||
edge,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_style_set_background:
|
||||
* @style: a #GtkStyle
|
||||
@ -3468,12 +2831,6 @@ option_menu_get_props (GtkWidget *widget,
|
||||
GtkRequisition *tmp_size = NULL;
|
||||
GtkBorder *tmp_spacing = NULL;
|
||||
|
||||
if (GTK_IS_OPTION_MENU (widget))
|
||||
gtk_widget_style_get (widget,
|
||||
"indicator-size", &tmp_size,
|
||||
"indicator-spacing", &tmp_spacing,
|
||||
NULL);
|
||||
|
||||
if (tmp_size)
|
||||
{
|
||||
*indicator_size = *tmp_size;
|
||||
@ -6130,43 +5487,6 @@ gtk_paint_diamond (GtkStyle *style,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_paint_string:
|
||||
* @style: a #GtkStyle
|
||||
* @window: a #GdkWindow
|
||||
* @state_type: a state
|
||||
* @area: (allow-none): clip rectangle, or %NULL if the
|
||||
* output should not be clipped
|
||||
* @widget: (allow-none): the widget
|
||||
* @detail: (allow-none): a style detail
|
||||
* @x: x origin
|
||||
* @y: y origin
|
||||
* @string: the string to draw
|
||||
*
|
||||
* Draws a text string on @window with the given parameters.
|
||||
*
|
||||
* Deprecated: 2.0: Use gtk_paint_layout() instead.
|
||||
*/
|
||||
void
|
||||
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,
|
||||
(GdkRectangle *) area, widget, detail,
|
||||
x, y, string);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_paint_box:
|
||||
* @style: a #GtkStyle
|
||||
@ -6894,62 +6214,6 @@ gtk_style_get_font_internal (GtkStyle *style)
|
||||
return style->private_font;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_get_font:
|
||||
* @style: a #GtkStyle
|
||||
*
|
||||
* Gets the #GdkFont to use for the given style. This is
|
||||
* meant only as a replacement for direct access to @style->font
|
||||
* and should not be used in new code. New code should
|
||||
* use @style->font_desc instead.
|
||||
*
|
||||
* Return value: the #GdkFont for the style. This font is owned
|
||||
* by the style; if you want to keep around a copy, you must
|
||||
* call gdk_font_ref().
|
||||
**/
|
||||
GdkFont *
|
||||
gtk_style_get_font (GtkStyle *style)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_STYLE (style), NULL);
|
||||
|
||||
return gtk_style_get_font_internal (style);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_set_font:
|
||||
* @style: a #GtkStyle.
|
||||
* @font: (allow-none): a #GdkFont, or %NULL to use the #GdkFont corresponding
|
||||
* to style->font_desc.
|
||||
*
|
||||
* Sets the #GdkFont to use for a given style. This is
|
||||
* meant only as a replacement for direct access to style->font
|
||||
* and should not be used in new code. New code should
|
||||
* use style->font_desc instead.
|
||||
**/
|
||||
void
|
||||
gtk_style_set_font (GtkStyle *style,
|
||||
GdkFont *font)
|
||||
{
|
||||
GdkFont *old_font;
|
||||
|
||||
g_return_if_fail (GTK_IS_STYLE (style));
|
||||
|
||||
old_font = style->private_font;
|
||||
|
||||
style->private_font = font;
|
||||
if (font)
|
||||
gdk_font_ref (font);
|
||||
|
||||
if (old_font)
|
||||
gdk_font_unref (old_font);
|
||||
|
||||
if (style->private_font_desc)
|
||||
{
|
||||
pango_font_description_free (style->private_font_desc);
|
||||
style->private_font_desc = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct _CursorInfo CursorInfo;
|
||||
|
||||
struct _CursorInfo
|
||||
|
194
gtk/gtkstyle.h
194
gtk/gtkstyle.h
@ -443,16 +443,6 @@ GtkStyle* gtk_style_copy (GtkStyle *style);
|
||||
GtkStyle* gtk_style_attach (GtkStyle *style,
|
||||
GdkWindow *window) G_GNUC_WARN_UNUSED_RESULT;
|
||||
void gtk_style_detach (GtkStyle *style);
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
GtkStyle* gtk_style_ref (GtkStyle *style);
|
||||
void gtk_style_unref (GtkStyle *style);
|
||||
|
||||
GdkFont * gtk_style_get_font (GtkStyle *style);
|
||||
void gtk_style_set_font (GtkStyle *style,
|
||||
GdkFont *font);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
void gtk_style_set_background (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type);
|
||||
@ -480,170 +470,6 @@ GdkPixbuf* gtk_style_render_icon (GtkStyle *style,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail);
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
void gtk_draw_hline (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gint x1,
|
||||
gint x2,
|
||||
gint y);
|
||||
void gtk_draw_vline (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gint y1_,
|
||||
gint y2_,
|
||||
gint x);
|
||||
void gtk_draw_shadow (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_polygon (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GdkPoint *points,
|
||||
gint npoints,
|
||||
gboolean fill);
|
||||
void gtk_draw_arrow (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkArrowType arrow_type,
|
||||
gboolean fill,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_diamond (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_box (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_flat_box (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_check (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_option (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_tab (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_shadow_gap (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
void gtk_draw_box_gap (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
void gtk_draw_extension (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side);
|
||||
void gtk_draw_focus (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_draw_slider (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
void gtk_draw_handle (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
void gtk_draw_expander (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkExpanderStyle expander_style);
|
||||
void gtk_draw_layout (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gboolean use_text,
|
||||
gint x,
|
||||
gint y,
|
||||
PangoLayout *layout);
|
||||
void gtk_draw_resize_grip (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
GdkWindowEdge edge,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
void gtk_paint_hline (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
@ -909,26 +735,6 @@ void _gtk_style_shade (const GdkColor *a,
|
||||
GdkColor *b,
|
||||
gdouble k);
|
||||
|
||||
/* deprecated */
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
#define gtk_style_apply_default_pixmap(s,gw,st,a,x,y,w,h) gtk_style_apply_default_background (s,gw,1,st,a,x,y,w,h)
|
||||
void gtk_draw_string (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gint x,
|
||||
gint y,
|
||||
const gchar *string);
|
||||
void 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);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
void gtk_draw_insertion_cursor (GtkWidget *widget,
|
||||
GdkDrawable *drawable,
|
||||
const GdkRectangle *area,
|
||||
|
Loading…
Reference in New Issue
Block a user