GtkColorButton: trivial doc and formatting fixes

This commit is contained in:
Matthias Clasen
2011-01-03 17:18:43 -05:00
parent 55016f72f2
commit 86a7ae67bc
2 changed files with 142 additions and 146 deletions

View File

@ -52,9 +52,9 @@
* @Title: GtkColorButton * @Title: GtkColorButton
* @See_also: #GtkColorSelectionDialog, #GtkFontButton * @See_also: #GtkColorSelectionDialog, #GtkFontButton
* *
* The #GtkColorButton is a button which displays the currently selected color * The #GtkColorButton is a button which displays the currently selected
* an allows to open a color selection dialog to change the color. It is suitable * color an allows to open a color selection dialog to change the color.
* widget for selecting a color in a preference dialog. * It is suitable widget for selecting a color in a preference dialog.
*/ */
@ -219,7 +219,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
GTK_PARAM_READWRITE)); GTK_PARAM_READWRITE));
/** /**
* GtkColorButton::rgba * GtkColorButton:rgba:
* *
* The RGBA color. * The RGBA color.
* *
@ -240,7 +240,8 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
* *
* The ::color-set signal is emitted when the user selects a color. * The ::color-set signal is emitted when the user selects a color.
* When handling this signal, use gtk_color_button_get_color() and * When handling this signal, use gtk_color_button_get_color() and
* gtk_color_button_get_alpha() to find out which color was just selected. * gtk_color_button_get_alpha() (or gtk_color_button_get_rgba()) to
* find out which color was just selected.
* *
* Note that this signal is only emitted when the <emphasis>user</emphasis> * Note that this signal is only emitted when the <emphasis>user</emphasis>
* changes the color. If you need to react to programmatic color changes * changes the color. If you need to react to programmatic color changes
@ -522,13 +523,15 @@ gtk_color_button_finalize (GObject *object)
/** /**
* gtk_color_button_new: * gtk_color_button_new:
* *
* Creates a new color button. This returns a widget in the form of * Creates a new color button.
* a small button containing a swatch representing the current selected
* color. When the button is clicked, a color-selection dialog will open,
* allowing the user to select a color. The swatch will be updated to reflect
* the new color when the user finishes.
* *
* Returns: a new color button. * This returns a widget in the form of a small button containing
* a swatch representing the current selected color. When the button
* is clicked, a color-selection dialog will open, allowing the user
* to select a color. The swatch will be updated to reflect the new
* color when the user finishes.
*
* Returns: a new color button
* *
* Since: 2.4 * Since: 2.4
*/ */
@ -540,11 +543,11 @@ gtk_color_button_new (void)
/** /**
* gtk_color_button_new_with_color: * gtk_color_button_new_with_color:
* @color: A #GdkColor to set the current color with. * @color: A #GdkColor to set the current color with
* *
* Creates a new color button. * Creates a new color button.
* *
* Returns: a new color button. * Returns: a new color button
* *
* Since: 2.4 * Since: 2.4
*/ */
@ -556,7 +559,7 @@ gtk_color_button_new_with_color (const GdkColor *color)
/** /**
* gtk_color_button_new_with_rgba: * gtk_color_button_new_with_rgba:
* @rgba: A #GdkRGBA to set the current color with. * @rgba: A #GdkRGBA to set the current color with
* *
* Creates a new color button. * Creates a new color button.
* *
@ -674,13 +677,13 @@ gtk_color_button_clicked (GtkButton *button)
/** /**
* gtk_color_button_set_color: * gtk_color_button_set_color:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @color: A #GdkColor to set the current color with. * @color: A #GdkColor to set the current color with
* *
* Sets the current color to be @color. * Sets the current color to be @color.
* *
* Since: 2.4 * Since: 2.4
**/ */
void void
gtk_color_button_set_color (GtkColorButton *color_button, gtk_color_button_set_color (GtkColorButton *color_button,
const GdkColor *color) const GdkColor *color)
@ -701,13 +704,13 @@ gtk_color_button_set_color (GtkColorButton *color_button,
/** /**
* gtk_color_button_set_alpha: * gtk_color_button_set_alpha:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @alpha: an integer between 0 and 65535. * @alpha: an integer between 0 and 65535
* *
* Sets the current opacity to be @alpha. * Sets the current opacity to be @alpha.
* *
* Since: 2.4 * Since: 2.4
**/ */
void void
gtk_color_button_set_alpha (GtkColorButton *color_button, gtk_color_button_set_alpha (GtkColorButton *color_button,
guint16 alpha) guint16 alpha)
@ -724,13 +727,13 @@ gtk_color_button_set_alpha (GtkColorButton *color_button,
/** /**
* gtk_color_button_get_color: * gtk_color_button_get_color:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @color: (out): a #GdkColor to fill in with the current color. * @color: (out): a #GdkColor to fill in with the current color
* *
* Sets @color to be the current color in the #GtkColorButton widget. * Sets @color to be the current color in the #GtkColorButton widget.
* *
* Since: 2.4 * Since: 2.4
**/ */
void void
gtk_color_button_get_color (GtkColorButton *color_button, gtk_color_button_get_color (GtkColorButton *color_button,
GdkColor *color) GdkColor *color)
@ -744,14 +747,14 @@ gtk_color_button_get_color (GtkColorButton *color_button,
/** /**
* gtk_color_button_get_alpha: * gtk_color_button_get_alpha:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* *
* Returns the current alpha value. * Returns the current alpha value.
* *
* Return value: an integer between 0 and 65535. * Return value: an integer between 0 and 65535
* *
* Since: 2.4 * Since: 2.4
**/ */
guint16 guint16
gtk_color_button_get_alpha (GtkColorButton *color_button) gtk_color_button_get_alpha (GtkColorButton *color_button)
{ {
@ -762,13 +765,13 @@ gtk_color_button_get_alpha (GtkColorButton *color_button)
/** /**
* gtk_color_button_set_rgba: * gtk_color_button_set_rgba:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @rgba: a #GdkRGBA to set the current color with * @rgba: a #GdkRGBA to set the current color with
* *
* Sets the current color to be @rgba. * Sets the current color to be @rgba.
* *
* Since: 3.0 * Since: 3.0
**/ */
void void
gtk_color_button_set_rgba (GtkColorButton *color_button, gtk_color_button_set_rgba (GtkColorButton *color_button,
const GdkRGBA *rgba) const GdkRGBA *rgba)
@ -783,13 +786,13 @@ gtk_color_button_set_rgba (GtkColorButton *color_button,
/** /**
* gtk_color_button_get_rgba: * gtk_color_button_get_rgba:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @rgba: (out): a #GdkRGBA to fill in with the current color * @rgba: (out): a #GdkRGBA to fill in with the current color
* *
* Sets @rgba to be the current color in the #GtkColorButton widget. * Sets @rgba to be the current color in the #GtkColorButton widget.
* *
* Since: 3.0 * Since: 3.0
**/ */
void void
gtk_color_button_get_rgba (GtkColorButton *color_button, gtk_color_button_get_rgba (GtkColorButton *color_button,
GdkRGBA *rgba) GdkRGBA *rgba)
@ -802,8 +805,8 @@ gtk_color_button_get_rgba (GtkColorButton *color_button,
/** /**
* gtk_color_button_set_use_alpha: * gtk_color_button_set_use_alpha:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* @use_alpha: %TRUE if color button should use alpha channel, %FALSE if not. * @use_alpha: %TRUE if color button should use alpha channel, %FALSE if not
* *
* Sets whether or not the color button should use the alpha channel. * Sets whether or not the color button should use the alpha channel.
* *
@ -829,11 +832,11 @@ gtk_color_button_set_use_alpha (GtkColorButton *color_button,
/** /**
* gtk_color_button_get_use_alpha: * gtk_color_button_get_use_alpha:
* @color_button: a #GtkColorButton. * @color_button: a #GtkColorButton
* *
* Does the color selection dialog use the alpha channel? * Does the color selection dialog use the alpha channel ?
* *
* Returns: %TRUE if the color sample uses alpha channel, %FALSE if not. * Returns: %TRUE if the color sample uses alpha channel, %FALSE if not
* *
* Since: 2.4 * Since: 2.4
*/ */
@ -849,7 +852,7 @@ gtk_color_button_get_use_alpha (GtkColorButton *color_button)
/** /**
* gtk_color_button_set_title: * gtk_color_button_set_title:
* @color_button: a #GtkColorButton * @color_button: a #GtkColorButton
* @title: String containing new window title. * @title: String containing new window title
* *
* Sets the title for the color selection dialog. * Sets the title for the color selection dialog.
* *

View File

@ -42,12 +42,6 @@
G_BEGIN_DECLS G_BEGIN_DECLS
/* The GtkColorButton widget is a simple color picker in a button.
* The button displays a sample of the currently selected color. When
* the user clicks on the button, a color selection dialog pops up.
* The color picker emits the "color_set" signal when the color is set.
*/
#define GTK_TYPE_COLOR_BUTTON (gtk_color_button_get_type ()) #define GTK_TYPE_COLOR_BUTTON (gtk_color_button_get_type ())
#define GTK_COLOR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_BUTTON, GtkColorButton)) #define GTK_COLOR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_BUTTON, GtkColorButton))
#define GTK_COLOR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_BUTTON, GtkColorButtonClass)) #define GTK_COLOR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_BUTTON, GtkColorButtonClass))
@ -93,7 +87,6 @@ guint16 gtk_color_button_get_alpha (GtkColorButton *color_button);
void gtk_color_button_set_use_alpha (GtkColorButton *color_button, void gtk_color_button_set_use_alpha (GtkColorButton *color_button,
gboolean use_alpha); gboolean use_alpha);
gboolean gtk_color_button_get_use_alpha (GtkColorButton *color_button); gboolean gtk_color_button_get_use_alpha (GtkColorButton *color_button);
void gtk_color_button_set_rgba (GtkColorButton *color_button, void gtk_color_button_set_rgba (GtkColorButton *color_button,
const GdkRGBA *rgba); const GdkRGBA *rgba);
void gtk_color_button_get_rgba (GtkColorButton *color_button, void gtk_color_button_get_rgba (GtkColorButton *color_button,