summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/migrating-GtkColorButton.sgml
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-11-05 06:07:44 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-11-05 06:07:44 +0000
commitd882420be63f1979ff89a8e99be0f0791a45a0ff (patch)
treee8069e3f37b5b626c7921b914fbb0f8f20434a70 /docs/reference/gtk/migrating-GtkColorButton.sgml
parent9222438f4ff3c0eaca27e99048022f3e19ba6c30 (diff)
downloadgdk-pixbuf-d882420be63f1979ff89a8e99be0f0791a45a0ff.tar.gz
Markup fixes.
2004-11-04 Matthias Clasen <mclasen@redhat.com> * gtk/tmpl/gtkaboutdialog.sgml: * gtk/migrating-GtkColorButton.sgml: * gtk/migrating-GtkIconView.sgml: * gtk/migrating-GtkAboutDialog.sgml: Markup fixes.
Diffstat (limited to 'docs/reference/gtk/migrating-GtkColorButton.sgml')
-rw-r--r--docs/reference/gtk/migrating-GtkColorButton.sgml30
1 files changed, 18 insertions, 12 deletions
diff --git a/docs/reference/gtk/migrating-GtkColorButton.sgml b/docs/reference/gtk/migrating-GtkColorButton.sgml
index 183b50d00..8bc79c824 100644
--- a/docs/reference/gtk/migrating-GtkColorButton.sgml
+++ b/docs/reference/gtk/migrating-GtkColorButton.sgml
@@ -4,14 +4,18 @@
<para>
Since version 2.6, GTK+ provides the <link linkend="GtkColorButton">GtkColorButton</link>
- widget as a replacement for the GnomeColorPicker widget in the libgnomeui library.
+ widget as a replacement for the <structname>GnomeColorPicker</structname>
+ widget in the libgnomeui
+ library.
</para>
<para>
- Porting an application from GnomeColorPicker to <link linkend="GtkColorButton">GtkColorButton</link>
- is very simple. <link linkend="GtkColorButton">GtkColorButton</link> doesn't support dithering
- (since it is rarely needed on modern hardware), and it doesn't have setters and getters to set the
- color from floating point or integer components. So instead of
+ Porting an application from <structname>GnomeColorPicker</structname> to
+ <structname>GtkColorButton</structname> is very simple.
+ <structname>GtkColorButton</structname> doesn't support dithering
+ (since it is rarely needed on modern hardware), and it doesn't have
+ setters and getters to set the color from floating point or integer
+ components. So instead of
<informalexample><programlisting>
guint red, green, blue, alpha;
/* ... */
@@ -21,14 +25,16 @@
<informalexample><programlisting>
GdkColor color;
- color.red = red << 8;
- color.green = green << 8;
- color.blue = blue << 8;
- gtk_color_button_set_color (color_picker, &color);
- gtk_color_button_set_alpha (color_picker, alpha << 8);
+ color.red = red &lt;&lt; 8;
+ color.green = green &lt;&lt; 8;
+ color.blue = blue &lt;&lt; 8;
+ gtk_color_button_set_color (color_picker, &amp;color);
+ gtk_color_button_set_alpha (color_picker, alpha &lt;&lt; 8);
</programlisting></informalexample>
- and similarly for the setters taking other number formats. For gnome_color_picker_set_i16() no conversion
- is needed, for gome_color_picker_set_d(), you need to convert the color components like this:
+ and similarly for the setters taking other number formats. For
+ <function>gnome_color_picker_set_i16()</function> no conversion is needed,
+ for <function>gnome_color_picker_set_d()</function>, you need to convert
+ the color components like this:
<informalexample><programlisting>
color.red = (guint16) (red * 65535.0 + 0.5);
color.green = (guint16) (green * 65535.0 + 0.5);