From 885b6d8a75fe2d2b98e71c9f86b39cedb5ba369d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Sun, 16 May 2010 00:44:58 +0200 Subject: [PATCH] Move documentation to inline comments: GtkStyle --- docs/reference/gtk/tmpl/.gitignore | 1 + docs/reference/gtk/tmpl/gtkstyle.sgml | 647 -------------------------- gtk/gtkstyle.c | 20 + gtk/gtkstyle.h | 16 + 4 files changed, 37 insertions(+), 647 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkstyle.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index d1700d03f9..c4ff36f506 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -11,6 +11,7 @@ gtkrecentaction.sgml gtkscalebutton.sgml gtkseparator.sgml gtkseparatormenuitem.sgml +gtkstyle.sgml gtktesting.sgml gtktextiter.sgml gtktoggleaction.sgml diff --git a/docs/reference/gtk/tmpl/gtkstyle.sgml b/docs/reference/gtk/tmpl/gtkstyle.sgml deleted file mode 100644 index b8f2dce560..0000000000 --- a/docs/reference/gtk/tmpl/gtkstyle.sgml +++ /dev/null @@ -1,647 +0,0 @@ - -Styles - - -Functions for drawing widget parts - - - - - - - - - - - - - - - - - - - -Returns whether the style is attached to a window. - - -@style: a #GtkStyle. - - - - - - - -@fg: -@bg: -@light: -@dark: -@mid: -@text: -@base: -@text_aa: -@black: -@white: -@font_desc: -@xthickness: -@ythickness: -@fg_gc: -@bg_gc: -@light_gc: -@dark_gc: -@mid_gc: -@text_gc: -@base_gc: -@text_aa_gc: -@black_gc: -@white_gc: -@bg_pixmap: - - - - - - -@style: the object which received the signal. - - - - - - -@style: the object which received the signal. - - - - - - -@void: -@Returns: - - - - - - - -@style: -@Returns: - - - - - - - -@style: -@window: -@Returns: - - - - - - - -@style: - - - - - - - -@style: -@window: -@state_type: - - - - - - - -@style: -@window: -@set_bg: -@state_type: -@area: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@color_name: -@color: -@Returns: - - - - - - - -@style: -@source: -@direction: -@state: -@size: -@widget: -@detail: -@Returns: - - - - - - - -@style: -@widget_type: -@property_name: -@value: - - - - - - - -@style: -@widget_type: -@first_property_name: -@var_args: - - - - - - - -@style: -@widget_type: -@first_property_name: -@Varargs: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@arrow_type: -@fill: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@x1: -@x2: -@y: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@points: -@n_points: -@fill: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@gap_side: -@gap_x: -@gap_width: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: -@orientation: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@step: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@shadow_type: -@area: -@widget: -@detail: -@x: -@y: -@width: -@height: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@y1_: -@y2_: -@x: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@x: -@y: -@expander_style: - - - - - - - -@style: -@window: -@state_type: -@use_text: -@area: -@widget: -@detail: -@x: -@y: -@layout: - - - - - - - -@style: -@window: -@state_type: -@area: -@widget: -@detail: -@edge: -@x: -@y: -@width: -@height: - - - - - - - -@widget: -@drawable: -@area: -@location: -@is_primary: -@direction: -@draw_arrow: - - - - -A struct that specifies a border around a rectangular area that can -be of different width on each side. - - -@left: The width of the left border. -@right: The width of the right border. -@top: The width of the top border. -@bottom: The width of the bottom border. - - - - - - -@void: -@Returns: - - - - - - - -@border_: -@Returns: - - - - - - - -@border_: - - - - - - - -@type_name: -@property_name: -@origin: -@value: - - - - - - -@pspec: -@rc_string: -@property_value: -@Returns: - - diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 53c4711f90..8a1c8cc970 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -43,6 +43,26 @@ #include "gtkalias.h" #include "gtkspinner.h" + +/** + * SECTION:gtkstyle + * @Short_description: An object that hold style information for widgets + * @Title: GtkStyle + * + * A #GtkStyle object encapsulates the information that provides the look and + * feel for a widget. Each #GtkWidget has an associated #GTkStyle object that + * is used when rendering that widget. Also, a #GtkStyle holds information for + * the five possible widget states though not every widget supports all five + * states; see #GtkStateType. + * + * Usually the #GtkStyle for a widget is the same as the default style that is + * set by GTK+ and modified the theme engine. + * + * Usually applications should not need to use or modify the #GtkStyle of their + * widgets. + */ + + #define LIGHTNESS_MULT 1.3 #define DARKNESS_MULT 0.7 diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h index 141cbcc379..dd8890002e 100644 --- a/gtk/gtkstyle.h +++ b/gtk/gtkstyle.h @@ -68,6 +68,12 @@ typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec, */ typedef struct _GtkWidget GtkWidget; +/** + * GTK_STYLE_ATTACHED: + * @style: a #GtkStyle. + * + * Returns whether the style is attached to a window. + */ #define GTK_STYLE_ATTACHED(style) (GTK_STYLE (style)->attach_count > 0) struct _GtkStyle @@ -429,6 +435,16 @@ struct _GtkStyleClass void (*_gtk_reserved11) (void); }; +/** + * GtkBorder: + * @left: The width of the left border. + * @right: The width of the right border. + * @top: The width of the top border. + * @bottom: The width of the bottom border. + * + * A struct that specifies a border around a rectangular area that can + * be of different width on each side. + */ struct _GtkBorder { gint left;