Markup fixes.

* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.

        * gdk-pixbuf-io.c: Markup fixes.

        * gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
        gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
        gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
        gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
        gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
        gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
        gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
        gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
        gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
        gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
        gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
        gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
        gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
        gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
        gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
This commit is contained in:
Matthias Clasen 2001-12-13 19:51:24 +00:00
parent fe655f3919
commit fc4a6b955d
49 changed files with 451 additions and 396 deletions

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,7 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org> Thu Dec 13 20:37:27 2001 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try * gtk/gtktreeview.c (gtk_tree_view_button_press): do not try

View File

@ -1,3 +1,23 @@
2001-12-13 Matthias Clasen <matthiasc@poet.de>
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-12 Matthias Clasen <matthiasc@poet.de> 2001-12-12 Matthias Clasen <matthiasc@poet.de>
* gtk/tmpl/gtklist.sgml: Markup fixes. * gtk/tmpl/gtklist.sgml: Markup fixes.

View File

@ -34,6 +34,8 @@ Scaling pixbufs and scaling and compositing pixbufs
as calling gdk_pixbuf_scale(). as calling gdk_pixbuf_scale().
</para> </para>
<example>
<title>Handling an expose event.</title>
<programlisting> <programlisting>
gboolean gboolean
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
@ -62,10 +64,11 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE; return TRUE;
} }
</programlisting> </programlisting>
</example>
<!-- ##### SECTION See_Also ##### --> <!-- ##### SECTION See_Also ##### -->
<para> <para>
GdkRGB <link linkend="gdk-GdkRGB">GdkRGB</link>.
</para> </para>
<!-- ##### ENUM GdkInterpType ##### --> <!-- ##### ENUM GdkInterpType ##### -->

View File

@ -22,10 +22,9 @@ X reference documentation. A X Logical Font Description (XLFD)
consists of a sequence of fields separated (and surrounded by) '-' consists of a sequence of fields separated (and surrounded by) '-'
characters. For example, Adobe Helvetica Bold 12 pt, has the characters. For example, Adobe Helvetica Bold 12 pt, has the
full description: full description:
<informalexample><programlisting>
<programlisting>
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1" "-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
</programlisting> </programlisting></informalexample>
</para> </para>
<para> <para>
@ -122,10 +121,9 @@ When specifying a font via a X logical Font Description,
'*' can be used as a wildcard to match any portion of '*' can be used as a wildcard to match any portion of
the XLFD. For instance, the above example could the XLFD. For instance, the above example could
also be specified as also be specified as
<informalexample><programlisting>
<programlisting>
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1" "-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
</programlisting> </programlisting></informalexample>
It is generally a good idea to use wildcards for any It is generally a good idea to use wildcards for any
portion of the XLFD that your program does not care portion of the XLFD that your program does not care

View File

@ -92,7 +92,7 @@ set on all X windows created by the application to point to the leader window.
See the X Session Management Library documentation for more information on See the X Session Management Library documentation for more information on
session management and the Inter-Client Communication Conventions Manual session management and the Inter-Client Communication Conventions Manual
(ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property. (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
(Both documents are part of the X Windows distribution.) (Both documents are part of the X Window System distribution.)
</para> </para>
@sm_client_id: the client id assigned by the session manager when the @sm_client_id: the client id assigned by the session manager when the
@ -104,7 +104,7 @@ connection was opened, or %NULL to remove the property.
Exits the application using the <function>exit()</function> system call. Exits the application using the <function>exit()</function> system call.
</para> </para>
<para> <para>
This routine is provided mainly for backwards compatability, since it used to This routine is provided mainly for backwards compatibility, since it used to
perform tasks necessary to exit the application cleanly. Those tasks are now perform tasks necessary to exit the application cleanly. Those tasks are now
performed in a function which is automatically called on exit (via the use performed in a function which is automatically called on exit (via the use
of g_atexit()). of g_atexit()).
@ -346,14 +346,14 @@ avoid the X error in any other way.
<example> <example>
<title>Trapping an X error.</title> <title>Trapping an X error.</title>
<programlisting> <programlisting>
gdk_error_trap_push (); gdk_error_trap_push (<!>);
/* ... Call the X function which may cause an error here ... */ /* ... Call the X function which may cause an error here ... */
/* Flush the X queue to catch errors now. */ /* Flush the X queue to catch errors now. */
gdk_flush (); gdk_flush (<!>);
if (gdk_error_trap_pop ()) if (gdk_error_trap_pop (<!>))
{ {
/* ... Handle the error here ... */ /* ... Handle the error here ... */
} }

View File

@ -59,7 +59,7 @@ Calculates the intersection of two rectangles.
@src1: a #GdkRectangle. @src1: a #GdkRectangle.
@src2: a #GdkRectangle. @src2: a #GdkRectangle.
@dest: the intersection of @src1 and @src2. @dest: the intersection of @src1 and @src2.
@Returns: TRUE if the rectangles intersect. @Returns: %TRUE if the rectangles intersect.
<!-- ##### FUNCTION gdk_rectangle_union ##### --> <!-- ##### FUNCTION gdk_rectangle_union ##### -->
@ -161,32 +161,32 @@ Returns the smallest rectangle which includes the entire #GdkRegion.
<!-- ##### FUNCTION gdk_region_empty ##### --> <!-- ##### FUNCTION gdk_region_empty ##### -->
<para> <para>
Returns TRUE if the #GdkRegion is empty. Returns %TRUE if the #GdkRegion is empty.
</para> </para>
@region: a #GdkRegion. @region: a #GdkRegion.
@Returns: TRUE if @region is empty. @Returns: %TRUE if @region is empty.
<!-- ##### FUNCTION gdk_region_equal ##### --> <!-- ##### FUNCTION gdk_region_equal ##### -->
<para> <para>
Returns TRUE if the two regions are the same. Returns %TRUE if the two regions are the same.
</para> </para>
@region1: a #GdkRegion. @region1: a #GdkRegion.
@region2: a #GdkRegion. @region2: a #GdkRegion.
@Returns: TRUE if @region1 and @region2 are equal. @Returns: %TRUE if @region1 and @region2 are equal.
<!-- ##### FUNCTION gdk_region_point_in ##### --> <!-- ##### FUNCTION gdk_region_point_in ##### -->
<para> <para>
Returns TRUE if a point is in a region. Returns %TRUE if a point is in a region.
</para> </para>
@region: a #GdkRegion. @region: a #GdkRegion.
@x: the x coordinate of a point. @x: the x coordinate of a point.
@y: the y coordinate of a point. @y: the y coordinate of a point.
@Returns: TRUE if the point is in @region. @Returns: %TRUE if the point is in @region.
<!-- ##### FUNCTION gdk_region_rect_in ##### --> <!-- ##### FUNCTION gdk_region_rect_in ##### -->
@ -196,8 +196,8 @@ Tests whether a rectangle is within a region.
@region: a #GdkRegion. @region: a #GdkRegion.
@rect: a #GdkRectangle. @rect: a #GdkRectangle.
@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or @Returns: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside, %GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
outside, or partly inside the #GdkRegion, respectively. outside, or partly inside the #GdkRegion, respectively.

View File

@ -7,7 +7,7 @@ renders RGB, grayscale, or indexed image data to a #GdkDrawable
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
GdkRgb is a low-level module which renders RGB, grayscale, and indexed GdkRGB is a low-level module which renders RGB, grayscale, and indexed
colormap images to a #GdkDrawable. It does this as efficiently as colormap images to a #GdkDrawable. It does this as efficiently as
possible, handling issues such as colormaps, visuals, dithering, possible, handling issues such as colormaps, visuals, dithering,
temporary buffers, and so on. Most code should use the higher-level temporary buffers, and so on. Most code should use the higher-level
@ -20,14 +20,15 @@ GdkRGB allocates a color cube to use when rendering images. You can
set the threshold for installing colormaps with set the threshold for installing colormaps with
gdk_rgb_set_min_colors(). The default is 5x5x5 (125). If a colorcube gdk_rgb_set_min_colors(). The default is 5x5x5 (125). If a colorcube
of this size or larger can be allocated in the default colormap, then of this size or larger can be allocated in the default colormap, then
that's done. Otherwise, GdkRgb creates its own private colormap. that's done. Otherwise, GdkRGB creates its own private colormap.
Setting it to 0 means that it always tries to use the default Setting it to 0 means that it always tries to use the default
colormap, and setting it to 216 means that it always creates a private colormap, and setting it to 216 means that it always creates a private
one if it cannot allocate the 6x6x6 colormap in the default. If you one if it cannot allocate the 6x6x6 colormap in the default. If you
always want a private colormap (to avoid consuming too many colormap always want a private colormap (to avoid consuming too many colormap
entries for other apps, say), you can use gdk_rgb_set_install(TRUE). entries for other apps, say), you can use
<literal>gdk_rgb_set_install(TRUE)</literal>.
Setting the value greater than 216 exercises a bug in older versions Setting the value greater than 216 exercises a bug in older versions
of GdkRgb. Note, however, that setting it to 0 doesn't let you get of GdkRGB. Note, however, that setting it to 0 doesn't let you get
away with ignoring the colormap and visual - a colormap is always away with ignoring the colormap and visual - a colormap is always
created in grayscale and direct color modes, and the visual is changed created in grayscale and direct color modes, and the visual is changed
in cases where a "better" visual than the default is available. in cases where a "better" visual than the default is available.
@ -57,7 +58,7 @@ main (int argc, char *argv[])
gtk_init (&amp;argc, &amp;argv); gtk_init (&amp;argc, &amp;argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
darea = gtk_drawing_area_new (); darea = gtk_drawing_area_new (<!>);
gtk_widget_set_size_request (darea, IMAGE_WIDTH, IMAGE_HEIGHT); gtk_widget_set_size_request (darea, IMAGE_WIDTH, IMAGE_HEIGHT);
gtk_container_add (GTK_CONTAINER (window), darea); gtk_container_add (GTK_CONTAINER (window), darea);
gtk_signal_connect (GTK_OBJECT (darea), "expose-event", gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
@ -76,7 +77,7 @@ main (int argc, char *argv[])
} }
} }
gtk_main (); gtk_main (<!>);
return 0; return 0;
} }
@ -99,7 +100,7 @@ on_darea_expose (GtkWidget *widget,
<varlistentry> <varlistentry>
<term>#GdkColor</term> <term>#GdkColor</term>
<listitem><para>The underlying Gdk mechanism for allocating <listitem><para>The underlying GDK mechanism for allocating
colors.</para></listitem> colors.</para></listitem>
</varlistentry> </varlistentry>
@ -122,7 +123,7 @@ This function no longer does anything at all. It's completely useless
<!-- ##### FUNCTION gdk_draw_rgb_image ##### --> <!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
<para> <para>
Draws an RGB image in the drawable. This is the core GdkRgb Draws an RGB image in the drawable. This is the core GdkRGB
function, and likely the only one you will need to use. function, and likely the only one you will need to use.
</para> </para>
@ -143,7 +144,7 @@ the pixel (x + i, y + j) is colored with red value @rgb_buf[@j *
</para> </para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow). @drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context (all Gdk drawing operations require one; its @gc: The graphics context (all GDK drawing operations require one; its
contents are ignored). contents are ignored).
@x: The x coordinate of the top-left corner in the drawable. @x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable. @y: The y coordinate of the top-left corner in the drawable.
@ -271,8 +272,7 @@ start of the next.
<!-- ##### ENUM GdkRgbDither ##### --> <!-- ##### ENUM GdkRgbDither ##### -->
<para> <para>
Selects whether or not GdkRGB applies dithering
Selects whether or not GdkRgb applies dithering
to the image on display. There are three values: to the image on display. There are three values:
</para> </para>
@ -300,7 +300,7 @@ only.
</itemizedlist> </itemizedlist>
<para> <para>
Since GdkRgb currently only handles images with 8 bits per component, Since GdkRGB currently only handles images with 8 bits per component,
dithering on 24 bit per pixel displays is a moot point. dithering on 24 bit per pixel displays is a moot point.
</para> </para>
@ -380,9 +380,9 @@ a #GdkColor struct.
<!-- ##### FUNCTION gdk_rgb_set_install ##### --> <!-- ##### FUNCTION gdk_rgb_set_install ##### -->
<para> <para>
If @install is TRUE, directs GdkRgb to always install a new "private" If @install is %TRUE, directs GdkRGB to always install a new "private"
colormap rather than trying to find a best fit with the colors already colormap rather than trying to find a best fit with the colors already
allocated. Ordinarily, GdkRgb will install a colormap only if a allocated. Ordinarily, GdkRGB will install a colormap only if a
sufficient cube cannot be allocated. sufficient cube cannot be allocated.
</para> </para>
@ -391,13 +391,13 @@ A private colormap has more colors, leading to better quality display,
but also leads to the dreaded "colormap flashing" effect. but also leads to the dreaded "colormap flashing" effect.
</para> </para>
@install: TRUE to set install mode. @install: %TRUE to set install mode.
<!-- ##### FUNCTION gdk_rgb_set_min_colors ##### --> <!-- ##### FUNCTION gdk_rgb_set_min_colors ##### -->
<para> <para>
Sets the minimum number of colors for the color cube. Generally, Sets the minimum number of colors for the color cube. Generally,
GdkRgb tries to allocate the largest color cube it can. If it can't GdkRGB tries to allocate the largest color cube it can. If it can't
allocate a color cube at least as large as @min_colors, it installs a allocate a color cube at least as large as @min_colors, it installs a
private colormap. private colormap.
</para> </para>
@ -407,14 +407,14 @@ private colormap.
<!-- ##### FUNCTION gdk_rgb_get_visual ##### --> <!-- ##### FUNCTION gdk_rgb_get_visual ##### -->
<para> <para>
Gets a "preferred visual" chosen by GdkRgb. In previous versions of Gets a "preferred visual" chosen by GdkRGB. In previous versions of
GDK, this was the only visual GdkRgb could use for rendering. In GDK, this was the only visual GdkRGB could use for rendering. In
current versions, it's simply the visual GdkRgb would have chosen as current versions, it's simply the visual GdkRGB would have chosen as
the optimal one in those previous versions. GdkRgb can now render to the optimal one in those previous versions. GdkRGB can now render to
drawables with any visual. drawables with any visual.
</para> </para>
@Returns: The #GdkVisual chosen by GdkRgb. @Returns: The #GdkVisual chosen by GdkRGB.
<!-- ##### FUNCTION gdk_rgb_get_colormap ##### --> <!-- ##### FUNCTION gdk_rgb_get_colormap ##### -->
@ -427,22 +427,22 @@ drawables with any visual.
<!-- ##### MACRO gdk_rgb_get_cmap ##### --> <!-- ##### MACRO gdk_rgb_get_cmap ##### -->
<para> <para>
Gets the colormap set by GdkRgb. This colormap and the corresponding Gets the colormap set by GdkRGB. This colormap and the corresponding
visual should be used when creating windows that will be drawn in by GdkRgb. visual should be used when creating windows that will be drawn in by GdkRGB.
</para> </para>
@Returns: The #GdkColormap set by GdkRgb. @Returns: The #GdkColormap set by GdkRGB.
<!-- ##### FUNCTION gdk_rgb_ditherable ##### --> <!-- ##### FUNCTION gdk_rgb_ditherable ##### -->
<para> <para>
Determine whether the visual is ditherable. This function may be Determines whether the visual is ditherable. This function may be
useful for presenting a user interface choice to the user about which useful for presenting a user interface choice to the user about which
dither mode is desired; if the display is not ditherable, it may make dither mode is desired; if the display is not ditherable, it may make
sense to gray out or hide the corresponding UI widget. sense to gray out or hide the corresponding UI widget.
</para> </para>
@Returns: TRUE if the visual is ditherable. @Returns: %TRUE if the visual is ditherable.
<!-- ##### FUNCTION gdk_rgb_set_verbose ##### --> <!-- ##### FUNCTION gdk_rgb_set_verbose ##### -->
@ -450,6 +450,6 @@ sense to gray out or hide the corresponding UI widget.
Sets the "verbose" flag. This is generally only useful for debugging. Sets the "verbose" flag. This is generally only useful for debugging.
</para> </para>
@verbose: TRUE if verbose messages are desired. @verbose: %TRUE if verbose messages are desired.

View File

@ -57,7 +57,7 @@ The <type>GdkVisual</type> structure contains information about
a particular visual. a particular visual.
</para> </para>
<figure float="1" id="rgbmask"> <example id="rgbmask">
<title>Constructing a pixel value from components</title> <title>Constructing a pixel value from components</title>
<programlisting> <programlisting>
guint guint
@ -69,7 +69,7 @@ pixel_from_rgb (GdkVisual *visual,
((r >> (16 - visual->blue_prec)) << visual->blue_shift); ((r >> (16 - visual->blue_prec)) << visual->blue_shift);
} }
</programlisting> </programlisting>
</figure> </example>
@parent_instance: inherited portion from #GObject @parent_instance: inherited portion from #GObject
@type: The type of this visual. @type: The type of this visual.

View File

@ -111,7 +111,7 @@ the "character grid" will be allowed.
<para> <para>
Here's an example of how the terminal example would be implemented, assuming Here's an example of how the terminal example would be implemented, assuming
a terminal area widget called "terminal" and a toplevel window "toplevel": a terminal area widget called "terminal" and a toplevel window "toplevel":
<programlisting> <informalexample><programlisting>
GdkGeometry hints; GdkGeometry hints;
hints.base_width = terminal->char_width; hints.base_width = terminal->char_width;
@ -127,7 +127,7 @@ a terminal area widget called "terminal" and a toplevel window "toplevel":
GDK_HINT_RESIZE_INC | GDK_HINT_RESIZE_INC |
GDK_HINT_MIN_SIZE | GDK_HINT_MIN_SIZE |
GDK_HINT_BASE_SIZE); GDK_HINT_BASE_SIZE);
</programlisting> </programlisting></informalexample>
</para> </para>
<para> <para>

View File

@ -3,7 +3,6 @@
<!entity % local.notation.class "| PNG"> <!entity % local.notation.class "| PNG">
<!entity hash "#"> <!entity hash "#">
<!entity empty "">
<!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml"> <!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml">
<!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml"> <!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml">
<!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml"> <!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml">

View File

@ -43,7 +43,7 @@ though it is almost always used to display just one accelerator key.
GtkAccelGroup *accel_group; GtkAccelGroup *accel_group;
/* Create a #GtkAccelGroup and add it to the window. */ /* Create a #GtkAccelGroup and add it to the window. */
accel_group = gtk_accel_group_new (); accel_group = gtk_accel_group_new (<!>);
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
/* Create the menu item using the convenience function. */ /* Create the menu item using the convenience function. */
@ -51,9 +51,9 @@ though it is almost always used to display just one accelerator key.
gtk_widget_show (save_item); gtk_widget_show (save_item);
gtk_container_add (GTK_CONTAINER (menu), save_item); gtk_container_add (GTK_CONTAINER (menu), save_item);
/* Now add the accelerator to the #GtkMenuItem. Note that since we called /* Now add the accelerator to the GtkMenuItem. Note that since we called
gtk_menu_item_new_with_label() to create the #GtkMenuItem the gtk_menu_item_new_with_label(<!>) to create the GtkMenuItem the
#GtkAccelLabel is automatically set up to display the #GtkMenuItem GtkAccelLabel is automatically set up to display the GtkMenuItem
accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */ accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */
gtk_widget_add_accelerator (save_item, "activate", accel_group, gtk_widget_add_accelerator (save_item, "activate", accel_group,
GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);

View File

@ -34,7 +34,8 @@ the entry field to the last or first item in the list, respectively.
</para> </para>
<example id="gtkcombo-simple-example"> <example id="gtkcombo-simple-example">
<title>Creating a #GtkCombo widget with simple text items.</title> <title>Creating a <structname>GtkCombo</structname> widget with simple text
items.</title>
<programlisting> <programlisting>
GtkWidget *combo; GtkWidget *combo;
GList *items = NULL; GList *items = NULL;
@ -45,19 +46,19 @@ the entry field to the last or first item in the list, respectively.
items = g_list_append (items, "Fourth Item"); items = g_list_append (items, "Fourth Item");
items = g_list_append (items, "Fifth Item"); items = g_list_append (items, "Fifth Item");
combo = gtk_combo_new (); combo = gtk_combo_new (<!>);
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items); gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
</programlisting> </programlisting>
</example> </example>
<example> <example>
<title>Creating a #GtkCombo widget with a complex item.</title> <title>Creating a <structname>GtkCombo</structname> widget with a complex item.</title>
<programlisting> <programlisting>
GtkWidget *combo, *item, *hbox, *arrow, *label; GtkWidget *combo, *item, *hbox, *arrow, *label;
combo = gtk_combo_new (); combo = gtk_combo_new (<!>);
item = gtk_list_item_new (); item = gtk_list_item_new (<!>);
gtk_widget_show (item); gtk_widget_show (item);
/* You can put almost anything into the GtkListItem widget. Here we will use /* You can put almost anything into the GtkListItem widget. Here we will use

View File

@ -14,7 +14,7 @@ require extensive effort on the user's part.
</para> </para>
<para> <para>
Gtk+ treats a dialog as a window split vertically. The top section is a GTK+ treats a dialog as a window split vertically. The top section is a
#GtkVBox, and is where widgets such as a #GtkLabel or a #GtkEntry should #GtkVBox, and is where widgets such as a #GtkLabel or a #GtkEntry should
be packed. The bottom area is known as the be packed. The bottom area is known as the
<structfield>action_area</structfield>. This is generally used for <structfield>action_area</structfield>. This is generally used for
@ -31,7 +31,8 @@ buttons.
<para> <para>
If 'dialog' is a newly created dialog, the two primary areas of the window If 'dialog' is a newly created dialog, the two primary areas of the window
can be accessed as GTK_DIALOG(dialog)->vbox and GTK_DIALOG(dialog)->action_area, can be accessed as <literal>GTK_DIALOG(dialog)->vbox</literal> and
<literal>GTK_DIALOG(dialog)->action_area</literal>,
as can be seen from the example, below. as can be seen from the example, below.
</para> </para>
@ -40,7 +41,7 @@ A 'modal' dialog (that is, one which freezes the rest of the application from
user input), can be created by calling gtk_window_set_modal() on the dialog. Use user input), can be created by calling gtk_window_set_modal() on the dialog. Use
the GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new() into a the GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new() into a
#GtkWindow. When using gtk_dialog_new_with_buttons() you can also pass the #GtkWindow. When using gtk_dialog_new_with_buttons() you can also pass the
GTK_DIALOG_MODAL flag to make a dialog modal. #GTK_DIALOG_MODAL flag to make a dialog modal.
</para> </para>
<para> <para>
@ -51,7 +52,7 @@ gtk_dialog_add_action_widget(), clicking the button will emit a signal called
meaning to positive response IDs; these are entirely user-defined. But for meaning to positive response IDs; these are entirely user-defined. But for
convenience, you can use the response IDs in the #GtkResponseType enumeration convenience, you can use the response IDs in the #GtkResponseType enumeration
(these all have values less than zero). If a dialog receives a delete event, the (these all have values less than zero). If a dialog receives a delete event, the
"response" signal will be emitted with a response ID of GTK_RESPONSE_NONE. "response" signal will be emitted with a response ID of #GTK_RESPONSE_NONE.
</para> </para>
@ -67,14 +68,14 @@ For the simple dialog in the following example, in reality you'd probably use
#GtkMessageDialog to save yourself some effort. But you'd need to create the #GtkMessageDialog to save yourself some effort. But you'd need to create the
dialog contents manually if you had more than a simple message in the dialog. dialog contents manually if you had more than a simple message in the dialog.
<example> <example>
<title>Simple #GtkDialog usage.</title> <title>Simple <structname>GtkDialog</structname> usage.</title>
<programlisting> <programlisting>
/* Function to open a dialog box displaying the message provided. */ /* Function to open a dialog box displaying the message provided. */
void quick_message(#gchar *message) { void quick_message (gchar *message) {
#GtkWidget *dialog, *label; GtkWidget *dialog, *label;
/* Create the widgets */ /* Create the widgets */
@ -166,7 +167,7 @@ gtk_window_set_title(). See the #GtkWindow section for more).
<!-- ##### FUNCTION gtk_dialog_new ##### --> <!-- ##### FUNCTION gtk_dialog_new ##### -->
<para> <para>
Creates a new dialog box. Widgets should not be packed into this #GtkWindow Creates a new dialog box. Widgets should not be packed into this #GtkWindow
directly, but into the vbox and action_area, as described above. directly, but into the @vbox and @action_area, as described above.
</para> </para>
@Returns: a new #GtkDialog. @Returns: a new #GtkDialog.
@ -284,7 +285,7 @@ directly, but into the vbox and action_area, as described above.
<para> <para>
Emitted when an action widget is clicked, the dialog receives a delete event, or Emitted when an action widget is clicked, the dialog receives a delete event, or
the application programmer calls gtk_dialog_response(). On a delete event, the the application programmer calls gtk_dialog_response(). On a delete event, the
response ID is GTK_RESPONSE_NONE. Otherwise, it depends on which action widget response ID is #GTK_RESPONSE_NONE. Otherwise, it depends on which action widget
was clicked. was clicked.
</para> </para>

View File

@ -48,6 +48,8 @@ As this example demonstrates, an expose handler should
draw only the pixels within the requested area and draw only the pixels within the requested area and
should draw or clear all these pixels. should draw or clear all these pixels.
</para> </para>
<example>
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
<programlisting> <programlisting>
gboolean gboolean
expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data) expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
@ -68,11 +70,12 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE; return TRUE;
} }
[...] [...]
GtkWidget *drawing_area = gtk_drawing_area_new (); GtkWidget *drawing_area = gtk_drawing_area_new (<!>);
gtk_drawing_area_size (GTK_DRAWING_AREA (drawing_area), gtk_drawing_area_size (GTK_DRAWING_AREA (drawing_area),
100, 100); 100, 100);
gtk_signal_connect (GTK_OBJECT (drawing_area), gtk_signal_connect (GTK_OBJECT (drawing_area),
</programlisting> </programlisting>
</example>
<!-- ##### SECTION See_Also ##### --> <!-- ##### SECTION See_Also ##### -->
<para> <para>
@ -81,14 +84,14 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
<!-- ##### STRUCT GtkDrawingArea ##### --> <!-- ##### STRUCT GtkDrawingArea ##### -->
<para> <para>
The #GtkDrawingArea-struct struct contains private data only, and The #GtkDrawingArea struct contains private data only, and
should be accessed using the functions below. should be accessed using the functions below.
</para> </para>
<!-- ##### FUNCTION gtk_drawing_area_new ##### --> <!-- ##### FUNCTION gtk_drawing_area_new ##### -->
<para> <para>
Create a new drawing area. Creates a new drawing area.
</para> </para>
@Returns: a new #GtkDrawingArea @Returns: a new #GtkDrawingArea
@ -96,7 +99,7 @@ Create a new drawing area.
<!-- ##### FUNCTION gtk_drawing_area_size ##### --> <!-- ##### FUNCTION gtk_drawing_area_size ##### -->
<para> <para>
Set the size that the drawing area will request Sets the size that the drawing area will request
in response to a "size_request" signal. The in response to a "size_request" signal. The
drawing area may actually be allocated a size drawing area may actually be allocated a size
larger than this depending on how it is packed larger than this depending on how it is packed

View File

@ -22,7 +22,7 @@ the following handler to "insert_text", an application
can convert all entry into a widget into uppercase. can convert all entry into a widget into uppercase.
<example> <example>
<title> Forcing entry to uppercase </title> <title>Forcing entry to uppercase.</title>
<programlisting> <programlisting>
#include &lt;ctype.h&gt; #include &lt;ctype.h&gt;
@ -36,8 +36,8 @@ insert_text_handler (GtkEditable *editable,
int i; int i;
gchar *result = g_new (gchar, length); gchar *result = g_new (gchar, length);
for (i=0; i&lt;length; i++) for (i = 0; i &lt; length; i++)
result[i] = islower(text[i]) ? toupper(text[i]) : text[i]; result[i] = islower (text[i]) ? toupper (text[i]) : text[i];
gtk_signal_handler_block_by_func (GTK_OBJECT (editable), gtk_signal_handler_block_by_func (GTK_OBJECT (editable),
GTK_SIGNAL_FUNC (insert_text_handler), GTK_SIGNAL_FUNC (insert_text_handler),
@ -120,7 +120,7 @@ Gets the current selection bounds, if there is a selection.
<!-- ##### FUNCTION gtk_editable_insert_text ##### --> <!-- ##### FUNCTION gtk_editable_insert_text ##### -->
<para> <para>
Insert text at a given position. Inserts text at a given position.
</para> </para>
@editable: a #GtkEditable widget. @editable: a #GtkEditable widget.
@ -134,7 +134,7 @@ Insert text at a given position.
<!-- ##### FUNCTION gtk_editable_delete_text ##### --> <!-- ##### FUNCTION gtk_editable_delete_text ##### -->
<para> <para>
Delete a sequence of characters. The characters that Deletes a sequence of characters. The characters that
are deleted are those characters at positions from are deleted are those characters at positions from
@start_pos up to, but not including @end_pos. If @start_pos up to, but not including @end_pos. If
@end_pos is negative, then the the characters deleted @end_pos is negative, then the the characters deleted

View File

@ -6,7 +6,12 @@ prompt the user for a file or directory name.
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
GtkFileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed. #GtkFileSelection should be used to retrieve file or directory names from
the user. It will create a new dialog window containing a directory list,
and a file list corresponding to the current working directory. The filesystem
can be navigated using the directory list or the drop-down history menu.
Alternatively, the TAB key can be used to navigate using filename
completion - common in text based editors such as emacs and jed.
</para> </para>
<para> <para>
File selection dialogs are created with a call to gtk_file_selection_new(). File selection dialogs are created with a call to gtk_file_selection_new().
@ -24,7 +29,7 @@ Simple file operations; create directory, delete file, and rename file, are avai
</para> </para>
<para> <para>
<example> <example>
<title>Getting a filename from the user</title> <title>Getting a filename from the user.</title>
<programlisting> <programlisting>
/* The file selection widget and the string to store the chosen filename */ /* The file selection widget and the string to store the chosen filename */
@ -32,26 +37,26 @@ Simple file operations; create directory, delete file, and rename file, are avai
GtkWidget *file_selector; GtkWidget *file_selector;
gchar *selected_filename; gchar *selected_filename;
void store_filename(GtkFileSelection *selector, gpointer user_data) { void store_filename (GtkFileSelection *selector, gpointer user_data) {
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector)); selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
} }
void create_file_selection(void) { void create_file_selection (void) {
/* Create the selector */ /* Create the selector */
file_selector = gtk_file_selection_new("Please select a file for editing."); file_selector = gtk_file_selection_new ("Please select a file for editing.");
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
"clicked", GTK_SIGNAL_FUNC (store_filename), NULL); "clicked", GTK_SIGNAL_FUNC (store_filename), NULL);
/* Ensure that the dialog box is destroyed when the user clicks a button. */ /* Ensure that the dialog box is destroyed when the user clicks a button. */
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->ok_button), gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
"clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
(gpointer) file_selector); (gpointer) file_selector);
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION(file_selector)->cancel_button), gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
"clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
(gpointer) file_selector); (gpointer) file_selector);

View File

@ -85,7 +85,7 @@ Sets the currently-selected font.
@fontsel: a #GtkFontSelection. @fontsel: a #GtkFontSelection.
@fontname: a fontname. @fontname: a fontname.
@Returns: TRUE if the font was found. @Returns: %TRUE if the font was found.
<!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### --> <!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### -->

View File

@ -87,7 +87,7 @@ Gets the currently-selected font.
</para> </para>
@fsd: a #GtkFontSelectionDialog. @fsd: a #GtkFontSelectionDialog.
@Returns: the currently-selected font, or NULL if no font is selected. @Returns: the currently-selected font, or %NULL if no font is selected.
<!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### --> <!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### -->
@ -96,7 +96,7 @@ Gets the currently-selected font name.
</para> </para>
@fsd: a #GtkFontSelectionDialog. @fsd: a #GtkFontSelectionDialog.
@Returns: the currently-selected font name, or NULL if no font is selected. @Returns: the currently-selected font name, or %NULL if no font is selected.
<!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### --> <!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### -->
@ -106,7 +106,7 @@ Sets the currently-selected font.
@fsd: a #GtkFontSelectionDialog. @fsd: a #GtkFontSelectionDialog.
@fontname: a fontname. @fontname: a fontname.
@Returns: TRUE if the font was found. @Returns: %TRUE if the font was found.
<!-- ##### FUNCTION gtk_font_selection_dialog_get_preview_text ##### --> <!-- ##### FUNCTION gtk_font_selection_dialog_get_preview_text ##### -->

View File

@ -11,10 +11,10 @@ can be displayed as an image; most typically, you would load a
#GdkPixbuf ("pixel buffer") from a file, and then display that. #GdkPixbuf ("pixel buffer") from a file, and then display that.
There's a convenience function to do this, gtk_image_new_from_file(), There's a convenience function to do this, gtk_image_new_from_file(),
used as follows: used as follows:
<programlisting> <informalexample><programlisting>
GtkWidget *image; GtkWidget *image;
image = gtk_image_new_from_file ("myfile.png"); image = gtk_image_new_from_file ("myfile.png");
</programlisting> </programlisting></informalexample>
If the file isn't loaded successfully, the image will contain a If the file isn't loaded successfully, the image will contain a
"broken image" icon similar to that used in many web browsers. "broken image" icon similar to that used in many web browsers.
If you want to handle errors in loading the file yourself, If you want to handle errors in loading the file yourself,
@ -36,8 +36,9 @@ align it (center, left, right) and add padding to it, using
so by default does not receive events. If you want to receive events so by default does not receive events. If you want to receive events
on the image, such as button clicks, place the image inside a on the image, such as button clicks, place the image inside a
#GtkEventBox, then connect to the event signals on the event box. #GtkEventBox, then connect to the event signals on the event box.
For example, here is some code that handles button press events <example>
on a #GtkImage: <title>Handling button press events on a
<structname>GtkImage</structname>.</title>
<programlisting> <programlisting>
static void static void
button_press_callback (GtkWidget *event_box, button_press_callback (GtkWidget *event_box,
@ -63,7 +64,7 @@ on a #GtkImage:
image = gtk_image_new_from_file ("myfile.png"); image = gtk_image_new_from_file ("myfile.png");
event_box = gtk_event_box_new (); event_box = gtk_event_box_new (<!>);
gtk_container_add (GTK_CONTAINER (event_box), image); gtk_container_add (GTK_CONTAINER (event_box), image);
@ -75,6 +76,7 @@ on a #GtkImage:
return image; return image;
} }
</programlisting> </programlisting>
</example>
</para> </para>
<para> <para>
When handling events on the event box, keep in mind that coordinates When handling events on the event box, keep in mind that coordinates
@ -328,33 +330,33 @@ functions), but they will all return %NULL values.
<!-- ##### FUNCTION gtk_image_new ##### --> <!-- ##### FUNCTION gtk_image_new ##### -->
<para> <para>
Creates the new GtkImage using the value and the mask. Creates the new #GtkImage using the value and the mask.
</para> </para>
@Returns: the GtkImage @Returns: the #GtkImage
<!-- # Unused Parameters # --> <!-- # Unused Parameters # -->
@val: @val:
@mask: a GDKBitmap that indicates which parts of the image should be transparent. @mask: a #GdkBitmap that indicates which parts of the image should be transparent.
<!-- ##### FUNCTION gtk_image_set ##### --> <!-- ##### FUNCTION gtk_image_set ##### -->
<para> <para>
Sets the GtkImage Sets the #GtkImage.
</para> </para>
@image: a #GdkPixmap @image: a #GdkPixmap
@val: @val:
@mask: a GDKBitmap that indicates which parts of the image should be transparent. @mask: a #GdkBitmap that indicates which parts of the image should be transparent.
<!-- ##### FUNCTION gtk_image_get ##### --> <!-- ##### FUNCTION gtk_image_get ##### -->
<para> <para>
Gets the GtkImage Gets the #GtkImage.
</para> </para>
@image: a #GdkPixmap @image: a #GdkPixmap
@val: @val:
@mask: a GDKBitmap that indicates which parts of the image should be transparent. @mask: a #GdkBitmap that indicates which parts of the image should be transparent.
<!-- ##### ARG GtkImage:pixbuf ##### --> <!-- ##### ARG GtkImage:pixbuf ##### -->

View File

@ -45,13 +45,13 @@ to the main loop and await more user input.
</para> </para>
<example> <example>
<title>Typical <function>main</function> function for a GTK application</title> <title>Typical <function>main</function> function for a GTK+ application</title>
<programlisting> <programlisting>
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
/* Initialize i18n support */ /* Initialize i18n support */
gtk_set_locale (&empty;); gtk_set_locale (<!>);
/* Initialize the widget set */ /* Initialize the widget set */
gtk_init (&amp;argc, &amp;argv); gtk_init (&amp;argc, &amp;argv);
@ -66,7 +66,7 @@ main (int argc, char **argv)
gtk_widget_show_all (mainwin); gtk_widget_show_all (mainwin);
/* Enter the main event loop, and wait for user interaction */ /* Enter the main event loop, and wait for user interaction */
gtk_main (&empty;); gtk_main (<!>);
/* The user lost interest */ /* The user lost interest */
return 0; return 0;
@ -111,7 +111,7 @@ functions such as g_signal_connect().
<!-- ##### FUNCTION gtk_init ##### --> <!-- ##### FUNCTION gtk_init ##### -->
<para> <para>
Call this function before using any other GTK functions in your GUI Call this function before using any other GTK+ functions in your GUI
applications. It will initialize everything needed to operate the toolkit and applications. It will initialize everything needed to operate the toolkit and
parses some standard command line options. <parameter>argc</parameter> and parses some standard command line options. <parameter>argc</parameter> and
<parameter>argv</parameter> are adjusted accordingly so your own code will <parameter>argv</parameter> are adjusted accordingly so your own code will
@ -122,8 +122,7 @@ never see those standard arguments.
<para> <para>
This function will terminate your program if it was unable to initialize This function will terminate your program if it was unable to initialize
the GUI for some reason. If you want your program to fall back to a the GUI for some reason. If you want your program to fall back to a
textual interface you want to call <function>gtk_init_check</function> textual interface you want to call gtk_init_check() instead.
instead.
</para> </para>
</note> </note>
@ -158,7 +157,7 @@ with the user - for example a curses or command line interface.
<para> <para>
Terminates the program and returns the given exit code to the caller. Terminates the program and returns the given exit code to the caller.
This function will shut down the GUI and free all resources allocated This function will shut down the GUI and free all resources allocated
for GTK. for GTK+.
</para> </para>
@error_code: Return value to pass to the caller. This is dependend on the @error_code: Return value to pass to the caller. This is dependend on the
@ -173,12 +172,12 @@ and invoke timeouts etc. while doing some time intensive computation.
</para> </para>
<example> <example>
<title>Updating the GUI during a long computation</title> <title>Updating the GUI during a long computation.</title>
<programlisting> <programlisting>
/* computation going on */ /* computation going on */
... ...
while (gtk_events_pending (&empty;)) while (gtk_events_pending (<!>))
gtk_main_iteration (&empty;); gtk_main_iteration (<!>);
... ...
/* computation continued */ /* computation continued */
</programlisting> </programlisting>
@ -341,7 +340,7 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (win), but); gtk_container_add (GTK_CONTAINER (win), but);
gtk_widget_show_all (win); gtk_widget_show_all (win);
gtk_main (&empty;); gtk_main (<!>);
return 0; return 0;
} }
</programlisting> </programlisting>

View File

@ -32,8 +32,8 @@ can pop up a menu when the 3rd mouse button is pressed.
<title>Connecting the popup signal handler.</title> <title>Connecting the popup signal handler.</title>
<programlisting> <programlisting>
/* connect our handler which will popup the menu */ /* connect our handler which will popup the menu */
gtk_signal_connect_object(GTK_OBJECT(window), "button_press_event", gtk_signal_connect_object (GTK_OBJECT (window), "button_press_event",
GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT(menu)); GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT (menu));
</programlisting> </programlisting>
</example> </example>
@ -41,7 +41,7 @@ can pop up a menu when the 3rd mouse button is pressed.
<title>Signal handler which displays a popup menu.</title> <title>Signal handler which displays a popup menu.</title>
<programlisting> <programlisting>
static gint static gint
my_popup_handler(GtkWidget *widget, GdkEvent *event) my_popup_handler (GtkWidget *widget, GdkEvent *event)
{ {
GtkMenu *menu; GtkMenu *menu;
GdkEventButton *event_button; GdkEventButton *event_button;
@ -78,7 +78,7 @@ my_popup_handler(GtkWidget *widget, GdkEvent *event)
<!-- ##### STRUCT GtkMenu ##### --> <!-- ##### STRUCT GtkMenu ##### -->
<para> <para>
The #GtkMenu-struct struct contains private data only, and The #GtkMenu struct contains private data only, and
should be accessed using the functions below. should be accessed using the functions below.
</para> </para>
@ -145,7 +145,7 @@ Moves a #GtkMenuItem to a new position within the #GtkMenu.
<para> <para>
Displays a menu and makes it available for selection. Applications can use Displays a menu and makes it available for selection. Applications can use
this function to display context-sensitive menus, and will typically supply this function to display context-sensitive menus, and will typically supply
NULL for the @parent_menu_shell, @parent_menu_item, @func and @data %NULL for the @parent_menu_shell, @parent_menu_item, @func and @data
parameters. The default menu positioning function will position the menu parameters. The default menu positioning function will position the menu
at the current pointer position. at the current pointer position.
</para> </para>
@ -265,7 +265,7 @@ or reattached.
</para> </para>
@menu: a #GtkMenu. @menu: a #GtkMenu.
@torn_off: If TRUE, menu is displayed as a tearoff menu. @torn_off: If %TRUE, menu is displayed as a tearoff menu.
<!-- ##### FUNCTION gtk_menu_attach_to_widget ##### --> <!-- ##### FUNCTION gtk_menu_attach_to_widget ##### -->

View File

@ -15,11 +15,11 @@ from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
<para> <para>
The easiest way to do a modal message dialog is to use gtk_dialog_run(), though The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
you can also pass in the GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
makes the dialog modal and waits for the user to respond to it. gtk_dialog_run() makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
returns when any dialog button is clicked. returns when any dialog button is clicked.
<example> <example>
<title>Modal #GtkMessageDialog</title> <title>A modal dialog.</title>
<programlisting> <programlisting>
dialog = gtk_message_dialog_new (main_application_window, dialog = gtk_message_dialog_new (main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
@ -36,7 +36,7 @@ returns when any dialog button is clicked.
<para> <para>
You might do a non-modal #GtkMessageDialog as follows: You might do a non-modal #GtkMessageDialog as follows:
<example> <example>
<title>Non-modal #GtkMessageDialog</title> <title>A non-modal dialog.</title>
<programlisting> <programlisting>
dialog = gtk_message_dialog_new (main_application_window, dialog = gtk_message_dialog_new (main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
@ -77,7 +77,7 @@ The type of message being displayed in the dialog.
<!-- ##### ENUM GtkButtonsType ##### --> <!-- ##### ENUM GtkButtonsType ##### -->
<para> <para>
Prebuilt sets of buttons for the dialog. If Prebuilt sets of buttons for the dialog. If
none of these choices are appropriate, simply use GTK_BUTTONS_NONE none of these choices are appropriate, simply use %GTK_BUTTONS_NONE
then call gtk_dialog_add_buttons(). then call gtk_dialog_add_buttons().
</para> </para>

View File

@ -2,7 +2,7 @@
GtkObject GtkObject
<!-- ##### SECTION Short_Description ##### --> <!-- ##### SECTION Short_Description ##### -->
The base class of the Gtk type hierarchy. The base class of the GTK+ type hierarchy.
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<refsect2> <refsect2>
@ -28,22 +28,22 @@ sunk (has no floating reference).
<para> <para>
When you add a widget to its parent container, the parent container When you add a widget to its parent container, the parent container
will do this: will do this:
<programlisting> <informalexample><programlisting>
g_object_ref (G_OBJECT (child_widget)); g_object_ref (G_OBJECT (child_widget));
gtk_object_sink (GTK_OBJECT (child_widget)); gtk_object_sink (GTK_OBJECT (child_widget));
</programlisting> </programlisting></informalexample>
This means that the container now owns a reference to the child widget (since This means that the container now owns a reference to the child widget (since
it called g_object_ref()), and the child widget has no floating reference. it called g_object_ref()), and the child widget has no floating reference.
</para> </para>
<para> <para>
The purpose of the floating reference is to keep the child widget alive The purpose of the floating reference is to keep the child widget alive
until you add it to a parent container: until you add it to a parent container:
<programlisting> <informalexample><programlisting>
button = gtk_button_new (); button = gtk_button_new (<!>);
/* button has one floating reference to keep it alive */ /* button has one floating reference to keep it alive */
gtk_container_add (GTK_CONTAINER (container), button); gtk_container_add (GTK_CONTAINER (container), button);
/* button has one non-floating reference owned by the container */ /* button has one non-floating reference owned by the container */
</programlisting> </programlisting></informalexample>
</para> </para>
<para> <para>
#GtkWindow is a special case, because GTK+ itself will ref/sink it on creation. #GtkWindow is a special case, because GTK+ itself will ref/sink it on creation.
@ -291,11 +291,11 @@ Sets properties on an object. Deprecated in favor of g_object_set().
<para> <para>
<informalexample> <informalexample>
<programlisting> <programlisting>
void set_box_properties(GtkBox* box) void set_box_properties (GtkBox* box)
{ {
gtk_object_set(GTK_OBJECT(box), "homogeneous", TRUE, gtk_object_set (GTK_OBJECT (box), "homogeneous", TRUE,
"spacing", 8, "spacing", 8,
NULL); NULL);
} }
</programlisting> </programlisting>
</informalexample> </informalexample>
@ -389,7 +389,7 @@ pointer. This function sets it.
This function is equivalent to: This function is equivalent to:
<informalexample> <informalexample>
<programlisting> <programlisting>
gtk_object_set_data(object, "user_data", data); gtk_object_set_data (object, "user_data", data);
</programlisting> </programlisting>
</informalexample> </informalexample>
</para> </para>

View File

@ -6,7 +6,7 @@ Base class for widgets with two adjustable panes
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
GtkPaned is the base class for widgets with two panes, #GtkPaned is the base class for widgets with two panes,
arranged either horizontally (#GtkHPaned) or arranged either horizontally (#GtkHPaned) or
vertically (#GtkVPaned). Child widgets are vertically (#GtkVPaned). Child widgets are
added to the panes of the widget with added to the panes of the widget with
@ -21,7 +21,7 @@ child widgets and a small handle that the user
can drag to adjust the division. It does not can drag to adjust the division. It does not
draw any relief around the children or around draw any relief around the children or around
the separator. (The space in which the separator the separator. (The space in which the separator
is called the gutter). Often, it is useful is called the gutter.) Often, it is useful
to put each child inside a #GtkFrame with the to put each child inside a #GtkFrame with the
shadow type set to %GTK_SHADOW_IN so that the shadow type set to %GTK_SHADOW_IN so that the
gutter appears as a ridge. gutter appears as a ridge.
@ -33,7 +33,7 @@ Each child has two options that can be set,
or shrink along with the paned widget. If @shrink or shrink along with the paned widget. If @shrink
is true, then when that child can be made smaller is true, then when that child can be made smaller
than it's requisition by the user. Setting @shrink than it's requisition by the user. Setting @shrink
to FALSE allows the application to set a minimum to %FALSE allows the application to set a minimum
size. If @resize is false for both children, then size. If @resize is false for both children, then
this is treated as if @resize is true for both this is treated as if @resize is true for both
children. children.
@ -45,11 +45,11 @@ gtk_paned_set_position().
</para> </para>
<example> <example>
<title> Creating a paned widget with minimum sizes </title> <title>Creating a paned widget with minimum sizes.</title>
<programlisting> <programlisting>
GtkWidget *hpaned = gtk_hpaned_new(); GtkWidget *hpaned = gtk_hpaned_new (<!>);
GtkWidget *frame1 = gtk_frame_new(NULL); GtkWidget *frame1 = gtk_frame_new (NULL);
GtkWidget *frame2 = gtk_frame_new(NULL); GtkWidget *frame2 = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN); gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
@ -75,12 +75,9 @@ gtk_widget_set_usize (frame1, 50, -1);
<!-- ##### FUNCTION gtk_paned_add1 ##### --> <!-- ##### FUNCTION gtk_paned_add1 ##### -->
<para> <para>
Add a child to the top or left pane with Adds a child to the top or left pane with
default parameters. This is equivalent default parameters. This is equivalent
to to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
<programlisting>
gtk_paned_pack1(paned, child, FALSE, TRUE);
</programlisting>
</para> </para>
@paned: a paned widget @paned: a paned widget
@ -89,11 +86,9 @@ gtk_paned_pack1(paned, child, FALSE, TRUE);
<!-- ##### FUNCTION gtk_paned_add2 ##### --> <!-- ##### FUNCTION gtk_paned_add2 ##### -->
<para> <para>
Add a child to the bottom or right pane with default Adds a child to the bottom or right pane with default
parameters. This is equivalent to parameters. This is equivalent to
<programlisting> <literal>gtk_paned_pack2(paned, child, TRUE, TRUE)</literal>.
gtk_paned_pack2(paned, child, TRUE, TRUE);
</programlisting>
</para> </para>
@paned: a paned widget @paned: a paned widget
@ -102,14 +97,14 @@ gtk_paned_pack2(paned, child, TRUE, TRUE);
<!-- ##### MACRO gtk_paned_handle_size ##### --> <!-- ##### MACRO gtk_paned_handle_size ##### -->
<para> <para>
Old name for gtk_paned_set_handle_size() Old name for gtk_paned_set_handle_size().
</para> </para>
<!-- ##### MACRO gtk_paned_gutter_size ##### --> <!-- ##### MACRO gtk_paned_gutter_size ##### -->
<para> <para>
Old name for gtk_paned_set_gutter_size() Old name for gtk_paned_set_gutter_size().
</para> </para>
@p: @p:
@ -118,7 +113,7 @@ Old name for gtk_paned_set_gutter_size()
<!-- ##### FUNCTION gtk_paned_pack1 ##### --> <!-- ##### FUNCTION gtk_paned_pack1 ##### -->
<para> <para>
Add a child to the top or left pane. Adds a child to the top or left pane.
</para> </para>
@paned: a paned widget @paned: a paned widget
@ -129,7 +124,7 @@ Add a child to the top or left pane.
<!-- ##### FUNCTION gtk_paned_pack2 ##### --> <!-- ##### FUNCTION gtk_paned_pack2 ##### -->
<para> <para>
Add a child to the bottom or right pane. Adds a child to the bottom or right pane.
</para> </para>
@paned: a paned widget @paned: a paned widget
@ -140,7 +135,7 @@ Add a child to the bottom or right pane.
<!-- ##### MACRO gtk_paned_set_gutter_size ##### --> <!-- ##### MACRO gtk_paned_set_gutter_size ##### -->
<para> <para>
In older versions of Gtk, this function used to set the width of the In older versions of GTK+, this function used to set the width of the
gutter (the area between the two panes). It does nothing now. gutter (the area between the two panes). It does nothing now.
</para> </para>

View File

@ -69,7 +69,7 @@ Gets the current #GdkPixmap and #GdkBitmap mask.
</para> </para>
@pixmap: a #GtkPixmap. @pixmap: a #GtkPixmap.
@build: set to TRUE if an extra pixmap should be automatically created to use @build: set to %TRUE if an extra pixmap should be automatically created to use
when the pixmap is insensitive. when the pixmap is insensitive.

View File

@ -128,7 +128,7 @@ complete.
</para> </para>
@progress: a #GtkProgress. @progress: a #GtkProgress.
@activity_mode: a boolean, TRUE for activity mode. @activity_mode: a boolean, %TRUE for activity mode.
<!-- ##### FUNCTION gtk_progress_get_current_text ##### --> <!-- ##### FUNCTION gtk_progress_get_current_text ##### -->

View File

@ -40,26 +40,26 @@ To remove a #GtkRadioButton from one group and make it part of a new one, use gt
<title>How to create a group of two radio buttons.</title> <title>How to create a group of two radio buttons.</title>
<programlisting> <programlisting>
void create_radio_buttons(void) { void create_radio_buttons (void) {
GtkWidget *window, *radio1, *radio2, *box, *entry; GtkWidget *window, *radio1, *radio2, *box, *entry;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
box = gtk_vbox_new(TRUE, 2); box = gtk_vbox_new (TRUE, 2);
/* Create a radio button with a #GtkEntry widget */ /* Create a radio button with a GtkEntry widget */
radio1 = gtk_radio_button_new(NULL); radio1 = gtk_radio_button_new (NULL);
entry = gtk_entry_new(); entry = gtk_entry_new (<!>);
gtk_container_add(GTK_CONTAINER(radio1), entry); gtk_container_add (GTK_CONTAINER (radio1), entry);
/* Create a radio button with a label */ /* Create a radio button with a label */
radio2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON(radio1), radio2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (radio1),
"I'm the second radio button."); "I'm the second radio button.");
/* Pack them into a box, then show all the widgets */ /* Pack them into a box, then show all the widgets */
gtk_box_pack_start (GTK_BOX (box), radio1, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (box), radio1, TRUE, TRUE, 2);
gtk_box_pack_start(GTK_BOX(box), radio2, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (box), radio2, TRUE, TRUE, 2);
gtk_container_add(GTK_CONTAINER(window), box); gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show_all (window); gtk_widget_show_all (window);
return; return;
} }
@ -93,7 +93,7 @@ Creates a new #GtkRadioButton. To be of any practical value, a widget should
then be packed into the radio button. then be packed into the radio button.
</para> </para>
@group: an existing radio button group, or NULL if you are creating a new group. @group: an existing radio button group, or %NULL if you are creating a new group.
@Returns: a new radio button. @Returns: a new radio button.
@ -112,7 +112,7 @@ with gtk_radio_button_new(), a widget should be packed into the radio button.
Creates a new #GtkRadioButton with a text label. Creates a new #GtkRadioButton with a text label.
</para> </para>
@group: an existing radio button group, or NULL if you are creating a new @group: an existing radio button group, or %NULL if you are creating a new
group. group.
@label: the text label to display next to the radio button. @label: the text label to display next to the radio button.
@Returns: a new radio button. @Returns: a new radio button.

View File

@ -48,9 +48,9 @@ attaches them to particular widgets. The attachment is done
by the <literal>widget</literal>, <literal>widget_class</literal>, by the <literal>widget</literal>, <literal>widget_class</literal>,
and <literal>class</literal> declarations. As an example and <literal>class</literal> declarations. As an example
of such a statement: of such a statement:
<programlisting> <informalexample><programlisting>
widget "mywindow.*.GtkEntry" style "my-entry-class" widget "mywindow.*.GtkEntry" style "my-entry-class"
</programlisting> </programlisting></informalexample>
attaches the style <literal>"my-entry-class"</literal> attaches the style <literal>"my-entry-class"</literal>
to all widgets whose <firstterm>widget class</firstterm> to all widgets whose <firstterm>widget class</firstterm>
matches the <firstterm>pattern</firstterm> matches the <firstterm>pattern</firstterm>
@ -63,7 +63,7 @@ any character, while <literal>"*"</literal> matches
zero or more of any character. The three types of zero or more of any character. The three types of
matching are against the widget path, the matching are against the widget path, the
<firstterm>class path</firstterm> and the class <firstterm>class path</firstterm> and the class
heirarchy. Both the widget and the class paths consists of a hierarchy. Both the widget and the class paths consists of a
<literal>"."</literal> separated list of all the <literal>"."</literal> separated list of all the
parents of the widget and the widget itself from parents of the widget and the widget itself from
outermost to innermost. The difference is that in outermost to innermost. The difference is that in
@ -76,23 +76,17 @@ for the widget path, the class name is always used.
So, if you have a <classname>GtkEntry</classname> named So, if you have a <classname>GtkEntry</classname> named
<literal>"myentry"</literal>, inside of a of a window <literal>"myentry"</literal>, inside of a of a window
named <literal>"mywindow"</literal>, then the named <literal>"mywindow"</literal>, then the
widget path is: widget path is: <literal>"mwindow.GtkHBox.myentry"</literal>
<programlisting> while the class path is: <literal>"GtkWindow.GtkHBox.GtkEntry"</literal>.
"mwindow.GtkHBox.myentry"
</programlisting>
while the class path is:
<programlisting>
"GtkWindow.GtkHBox.GtkEntry"
</programlisting>
</para> </para>
<para> <para>
Matching against class is a little different. The pattern Matching against class is a little different. The pattern
match is done against all class names in the widgets match is done against all class names in the widgets
class heirarchy (not the layout heirarchy) in sequence, so the class hierarchy (not the layout hierarchy) in sequence, so the
pattern: pattern:
<programlisting> <informalexample><programlisting>
class "GtkButton" style "my-style" class "GtkButton" style "my-style"
</programlisting> </programlisting></informalexample>
will match not just <classname>GtkButton</classname> widgets, will match not just <classname>GtkButton</classname> widgets,
but also <classname>GtkToggleButton</classname> and but also <classname>GtkToggleButton</classname> and
<classname>GtkCheckButton</classname> widgets, since <classname>GtkCheckButton</classname> widgets, since
@ -125,7 +119,7 @@ The possible toplevel declarations are:
<replaceable>name</replaceable></literal></term> <replaceable>name</replaceable></literal></term>
<listitem> <listitem>
<para>Specify a style or binding set for a particular <para>Specify a style or binding set for a particular
branch of the inheritance heirarchy.</para> branch of the inheritance hierarchy.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -355,33 +349,33 @@ direction, state, and size. The <literal>*</literal> character can be used as a
wildcard, and if direction/state/size are omitted they default to wildcard, and if direction/state/size are omitted they default to
<literal>*</literal>. So for example, the following specifies different icons to <literal>*</literal>. So for example, the following specifies different icons to
use for left-to-right and right-to-left languages: use for left-to-right and right-to-left languages:
<programlisting> <informalexample><programlisting>
stock["my-stock-item"] = stock["my-stock-item"] =
{ {
{ "itemltr.png", LTR, *, * }, { "itemltr.png", LTR, *, * },
{ "itemrtl.png", RTL, *, * } { "itemrtl.png", RTL, *, * }
} }
</programlisting> </programlisting></informalexample>
This could be abbreviated as follows: This could be abbreviated as follows:
<programlisting> <informalexample><programlisting>
stock["my-stock-item"] = stock["my-stock-item"] =
{ {
{ "itemltr.png", LTR }, { "itemltr.png", LTR },
{ "itemrtl.png", RTL } { "itemrtl.png", RTL }
} }
</programlisting> </programlisting></informalexample>
</para> </para>
<para> <para>
You can specify custom icons for specific sizes, as follows: You can specify custom icons for specific sizes, as follows:
<programlisting> <informalexample><programlisting>
stock["my-stock-item"] = stock["my-stock-item"] =
{ {
{ "itemmenusize.png", *, *, "gtk-menu" }, { "itemmenusize.png", *, *, "gtk-menu" },
{ "itemtoolbarsize.png", *, *, "gtk-large-toolbar" } { "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */ { "itemgeneric.png" } /* implicit *, *, * as a fallback */
} }
</programlisting> </programlisting></informalexample>
The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>, The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,
<literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>, <literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,
<literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applications <literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applications
@ -390,14 +384,14 @@ can define other sizes.
<para> <para>
It's also possible to use custom icons for a given state, for example: It's also possible to use custom icons for a given state, for example:
<programlisting> <informalexample><programlisting>
stock["my-stock-item"] = stock["my-stock-item"] =
{ {
{ "itemprelight.png", *, PRELIGHT }, { "itemprelight.png", *, PRELIGHT },
{ "iteminsensitive.png", *, INSENSITIVE }, { "iteminsensitive.png", *, INSENSITIVE },
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */ { "itemgeneric.png" } /* implicit *, *, * as a fallback */
} }
</programlisting> </programlisting></informalexample>
</para> </para>
<para> <para>
@ -418,7 +412,7 @@ taken on particular key presses. The form of a binding
set declaration is: set declaration is:
</para> </para>
<programlisting> <informalexample><programlisting>
binding <replaceable>name</replaceable> { binding <replaceable>name</replaceable> {
bind <replaceable>key</replaceable> { bind <replaceable>key</replaceable> {
<replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...) <replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
@ -426,7 +420,7 @@ binding <replaceable>name</replaceable> {
} }
... ...
} }
</programlisting> </programlisting></informalexample>
<para> <para>
<replaceable>key</replaceable> is a string consisting of a <replaceable>key</replaceable> is a string consisting of a
@ -634,11 +628,11 @@ specific portions of a RC file.
<!-- ##### FUNCTION gtk_rc_add_widget_name_style ##### --> <!-- ##### FUNCTION gtk_rc_add_widget_name_style ##### -->
<para> <para>
Add a RcStyle that will be looked up by a match against Adds a RcStyle that will be looked up by a match against
the widget's pathname. This is equivalent to a: the widget's pathname. This is equivalent to a:
<programlisting> <literal>
widget PATTERN style STYLE widget PATTERN style STYLE
</programlisting> </literal>
statement in a RC file. statement in a RC file.
</para> </para>
@ -648,12 +642,11 @@ statement in a RC file.
<!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### --> <!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### -->
<para> <para>
Add a RcStyle that will be looked up by a match against Adds a RcStyle that will be looked up by a match against
the widget's class pathname. This is equivalent to a: the widget's class pathname. This is equivalent to a:
<literal>
<programlisting>
widget_class PATTERN style STYLE widget_class PATTERN style STYLE
</programlisting> </literal>
statement in a RC file. statement in a RC file.
</para> </para>
@ -663,11 +656,11 @@ statement in a RC file.
<!-- ##### FUNCTION gtk_rc_add_class_style ##### --> <!-- ##### FUNCTION gtk_rc_add_class_style ##### -->
<para> <para>
Add a RcStyle that will be looked up by a matching against Adds a RcStyle that will be looked up by a matching against
the class heirarchy of the widget. This is equivalent to a: the class hierarchy of the widget. This is equivalent to a:
<programlisting> <literal>
class PATTERN style STYLE class PATTERN style STYLE
</programlisting> </literal>
statement in a RC file. statement in a RC file.
</para> </para>
@ -677,7 +670,7 @@ statement in a RC file.
<!-- ##### FUNCTION gtk_rc_parse ##### --> <!-- ##### FUNCTION gtk_rc_parse ##### -->
<para> <para>
Parse a given resource file. Parses a given resource file.
</para> </para>
@filename: the filename of a file to parse. @filename: the filename of a file to parse.
@ -685,7 +678,7 @@ Parse a given resource file.
<!-- ##### FUNCTION gtk_rc_parse_string ##### --> <!-- ##### FUNCTION gtk_rc_parse_string ##### -->
<para> <para>
Parse resource information directly from a string. Parses resource information directly from a string.
</para> </para>
@rc_string: a string to parse. @rc_string: a string to parse.
@ -825,11 +818,11 @@ itself.)
<!-- ##### FUNCTION gtk_rc_style_new ##### --> <!-- ##### FUNCTION gtk_rc_style_new ##### -->
<para> <para>
Create a new #GtkRcStyle with no fields set and Creates a new #GtkRcStyle with no fields set and
a reference count of 1. a reference count of 1.
</para> </para>
@Returns: the newly create #GtkRcStyle @Returns: the newly-created #GtkRcStyle
<!-- ##### FUNCTION gtk_rc_style_copy ##### --> <!-- ##### FUNCTION gtk_rc_style_copy ##### -->
@ -843,7 +836,7 @@ a reference count of 1.
<!-- ##### FUNCTION gtk_rc_style_ref ##### --> <!-- ##### FUNCTION gtk_rc_style_ref ##### -->
<para> <para>
Increment the reference count of a #GtkRcStyle. Increments the reference count of a #GtkRcStyle.
</para> </para>
@rc_style: a #GtkRcStyle @rc_style: a #GtkRcStyle
@ -851,8 +844,8 @@ Increment the reference count of a #GtkRcStyle.
<!-- ##### FUNCTION gtk_rc_style_unref ##### --> <!-- ##### FUNCTION gtk_rc_style_unref ##### -->
<para> <para>
Decrement the reference count of a #GtkRcStyle and Decrements the reference count of a #GtkRcStyle and
free if the result is 0. frees if the result is 0.
</para> </para>
@rc_style: a #GtkRcStyle @rc_style: a #GtkRcStyle

View File

@ -115,7 +115,7 @@ signal handler which returns an allocated string representing @value.
That string will then be used to display the scale's value. That string will then be used to display the scale's value.
Here's an example signal handler which displays a value 1.0 as Here's an example signal handler which displays a value 1.0 as
with "-->1.0<--". with "-->1.0<--".
<programlisting> <informalexample><programlisting>
static gchar* static gchar*
format_value_callback (GtkScale *scale, format_value_callback (GtkScale *scale,
gdouble value) gdouble value)
@ -123,7 +123,7 @@ format_value_callback (GtkScale *scale,
return g_strdup_printf ("-->%0.*g<--", return g_strdup_printf ("-->%0.*g<--",
gtk_scale_get_digits (scale), value); gtk_scale_get_digits (scale), value);
} }
</programlisting> </programlisting></informalexample>
</para> </para>
@scale: the object which received the signal. @scale: the object which received the signal.

View File

@ -82,7 +82,7 @@ selection handling code.
<!-- ##### FUNCTION gtk_target_list_new ##### --> <!-- ##### FUNCTION gtk_target_list_new ##### -->
<para> <para>
Create a new #GtkTargetList from an array of #GtkTargetEntry. Creates a new #GtkTargetList from an array of #GtkTargetEntry.
</para> </para>
@targets: Pointer to an array of #GtkTargetEntry @targets: Pointer to an array of #GtkTargetEntry
@ -92,7 +92,7 @@ Create a new #GtkTargetList from an array of #GtkTargetEntry.
<!-- ##### FUNCTION gtk_target_list_ref ##### --> <!-- ##### FUNCTION gtk_target_list_ref ##### -->
<para> <para>
Increase the reference count of a #GtkTargetList by one. Increases the reference count of a #GtkTargetList by one.
</para> </para>
@list: a #GtkTargetList @list: a #GtkTargetList
@ -100,7 +100,7 @@ Increase the reference count of a #GtkTargetList by one.
<!-- ##### FUNCTION gtk_target_list_unref ##### --> <!-- ##### FUNCTION gtk_target_list_unref ##### -->
<para> <para>
Decrease the reference count of a #GtkTargetList by one. Decreases the reference count of a #GtkTargetList by one.
If the resulting reference count is zero, free the list. If the resulting reference count is zero, free the list.
</para> </para>
@ -109,7 +109,7 @@ If the resulting reference count is zero, free the list.
<!-- ##### FUNCTION gtk_target_list_add ##### --> <!-- ##### FUNCTION gtk_target_list_add ##### -->
<para> <para>
Add another target to a #GtkTargetList Adds another target to a #GtkTargetList.
</para> </para>
@list: a #GtkTargetList @list: a #GtkTargetList
@ -120,7 +120,7 @@ Add another target to a #GtkTargetList
<!-- ##### FUNCTION gtk_target_list_add_table ##### --> <!-- ##### FUNCTION gtk_target_list_add_table ##### -->
<para> <para>
Add a table of #GtkTargetEntry into a target list Adds a table of #GtkTargetEntry into a target list.
</para> </para>
@list: a #GtkTargetList @list: a #GtkTargetList
@ -130,7 +130,7 @@ Add a table of #GtkTargetEntry into a target list
<!-- ##### FUNCTION gtk_target_list_remove ##### --> <!-- ##### FUNCTION gtk_target_list_remove ##### -->
<para> <para>
Remove a target from a target list Removes a target from a target list.
</para> </para>
@list: a #GtkTargetList @list: a #GtkTargetList
@ -139,7 +139,7 @@ Remove a target from a target list
<!-- ##### FUNCTION gtk_target_list_find ##### --> <!-- ##### FUNCTION gtk_target_list_find ##### -->
<para> <para>
Look up a given target in a #GtkTargetList Looks up a given target in a #GtkTargetList.
</para> </para>
@list: a #GtkTargetList @list: a #GtkTargetList
@ -150,7 +150,7 @@ Look up a given target in a #GtkTargetList
<!-- ##### FUNCTION gtk_selection_owner_set ##### --> <!-- ##### FUNCTION gtk_selection_owner_set ##### -->
<para> <para>
Claim ownership of a given selection for a particular widget, Claims ownership of a given selection for a particular widget,
or, if @widget is %NULL, release ownership of the selection. or, if @widget is %NULL, release ownership of the selection.
</para> </para>
@ -162,7 +162,7 @@ or, if @widget is %NULL, release ownership of the selection.
<!-- ##### FUNCTION gtk_selection_add_target ##### --> <!-- ##### FUNCTION gtk_selection_add_target ##### -->
<para> <para>
Add specified target to the list of supported targets for a Adds specified target to the list of supported targets for a
given widget and selection. given widget and selection.
</para> </para>
@ -174,7 +174,7 @@ given widget and selection.
<!-- ##### FUNCTION gtk_selection_add_targets ##### --> <!-- ##### FUNCTION gtk_selection_add_targets ##### -->
<para> <para>
Add a table of targets to the list of supported targets Adds a table of targets to the list of supported targets
for a given widget and selection. for a given widget and selection.
</para> </para>
@ -195,7 +195,7 @@ for a given widget and selection.
<!-- ##### FUNCTION gtk_selection_convert ##### --> <!-- ##### FUNCTION gtk_selection_convert ##### -->
<para> <para>
Request the contents of a selection. When received, Requests the contents of a selection. When received,
a "selection_received" signal will be generated. a "selection_received" signal will be generated.
</para> </para>
@ -203,17 +203,17 @@ a "selection_received" signal will be generated.
@selection: Which selection to get @selection: Which selection to get
@target: Form of information desired (e.g., STRING) @target: Form of information desired (e.g., STRING)
@time: Time of request (usually of triggering event) @time: Time of request (usually of triggering event)
In emergency, you could use GDK_CURRENT_TIME In emergency, you could use #GDK_CURRENT_TIME
@Returns: TRUE if requested succeeded. FALSE if we could not process @Returns: %TRUE if requested succeeded. %FALSE if we could not process
request. (e.g., there was already a request in process for request. (e.g., there was already a request in process for
this widget). this widget).
<!-- ##### FUNCTION gtk_selection_data_set ##### --> <!-- ##### FUNCTION gtk_selection_data_set ##### -->
<para> <para>
Store new data into a GtkSelectionData object. Should Stores new data into a GtkSelectionData object. Should
_only_ by called from a selection handler callback. <emphasis>only</emphasis> by called from a selection handler callback.
Null terminates the stored data. zero-terminates the stored data.
</para> </para>
@selection_data: @selection_data:
@ -276,7 +276,7 @@ called by applications.
<!-- ##### FUNCTION gtk_selection_data_copy ##### --> <!-- ##### FUNCTION gtk_selection_data_copy ##### -->
<para> <para>
Make a copy of a #GtkSelection data structure and its Makes a copy of a #GtkSelection data structure and its
data. data.
</para> </para>
@ -286,7 +286,7 @@ data.
<!-- ##### FUNCTION gtk_selection_data_free ##### --> <!-- ##### FUNCTION gtk_selection_data_free ##### -->
<para> <para>
Free a #GtkSelectionData structure returned from Frees a #GtkSelectionData structure returned from
gtk_selection_data_copy(). gtk_selection_data_copy().
</para> </para>

View File

@ -31,7 +31,7 @@ from being run.)
</para> </para>
<para> <para>
Signals are used by everyone, but they are only Signals are used by everyone, but they are only
created on a per class basis-- so you should not call created on a per class basis -- so you should not call
call gtk_signal_new() unless you are writing call gtk_signal_new() unless you are writing
a new #GtkObject type. However, if you want to make a new signal a new #GtkObject type. However, if you want to make a new signal
for an existing type, you may use gtk_object_class_user_signal_new() for an existing type, you may use gtk_object_class_user_signal_new()
@ -64,7 +64,7 @@ Functions that want to notify the user of certain actions,
<listitem><para>A class method, e.g. GtkButton::clicked. <listitem><para>A class method, e.g. GtkButton::clicked.
More precisely it is a unique class-branch/signal-name pair. More precisely it is a unique class-branch/signal-name pair.
This means you may not define a signal handler for a class which This means you may not define a signal handler for a class which
derives from GtkButton that is called clicked, derives from #GtkButton that is called clicked,
but it is okay to share signals names if they are separate in but it is okay to share signals names if they are separate in
the class tree. the class tree.
</para></listitem> </para></listitem>
@ -234,12 +234,12 @@ to the signal.
<!-- ##### FUNCTION gtk_signal_new ##### --> <!-- ##### FUNCTION gtk_signal_new ##### -->
<para> <para>
Create a new signal type. (This is usually done in the Creates a new signal type. (This is usually done in the
class initializer.) class initializer.)
</para> </para>
@name: the event name for the signal, e.g. "clicked". @name: the event name for the signal, e.g. "clicked".
@signal_flags: a combination of GTK_RUN flags @signal_flags: a combination of #GTK_RUN flags
specifying detail of when the default handler is to be invoked. specifying detail of when the default handler is to be invoked.
You should at least specify #GTK_RUN_FIRST You should at least specify #GTK_RUN_FIRST
or #GTK_RUN_LAST. or #GTK_RUN_LAST.
@ -253,10 +253,10 @@ of GtkArgs and the native calling convention. Usually they
are identified just by the type of arguments they take: are identified just by the type of arguments they take:
for example, gtk_marshal_BOOL__STRING() describes a marshaller for example, gtk_marshal_BOOL__STRING() describes a marshaller
which takes a string and returns a boolean value. which takes a string and returns a boolean value.
@return_val: the type of return value, or GTK_TYPE_NONE for a signal @return_val: the type of return value, or #GTK_TYPE_NONE for a signal
without a return value. without a return value.
@n_args: @n_args:
@Varargs: a list of GTK_TYPE_*, one for each parameter. @Varargs: a list of #GTK_TYPE_*, one for each parameter.
@Returns: the signal id. @Returns: the signal id.
<!-- # Unused Parameters # --> <!-- # Unused Parameters # -->
@nparams: the number of parameter the handlers may take. @nparams: the number of parameter the handlers may take.
@ -264,7 +264,7 @@ without a return value.
<!-- ##### FUNCTION gtk_signal_newv ##### --> <!-- ##### FUNCTION gtk_signal_newv ##### -->
<para> <para>
Create a new signal type. (This is usually done in a Creates a new signal type. (This is usually done in a
class initializer.) class initializer.)
</para> </para>
<para> <para>
@ -274,11 +274,11 @@ following the arguments. Otherwise the same as gtk_signal_new().
@name: the name of the signal to create. @name: the name of the signal to create.
@signal_flags: see gtk_signal_new(). @signal_flags: see gtk_signal_new().
@object_type: the type of GtkObject to associate the signal with. @object_type: the type of #GtkObject to associate the signal with.
@function_offset: how many bytes the function pointer is in @function_offset: how many bytes the function pointer is in
the class structure for this type. the class structure for this type.
@marshaller: @marshaller:
@return_val: the type of the return value, or GTK_TYPE_NONE if @return_val: the type of the return value, or #GTK_TYPE_NONE if
you don't want a return value. you don't want a return value.
@n_args: @n_args:
@args: @args:
@ -306,19 +306,19 @@ It also tries the ancestors of the given type.
<!-- ##### MACRO gtk_signal_name ##### --> <!-- ##### MACRO gtk_signal_name ##### -->
<para> <para>
Given the signal's identifier, find its name. Given the signal's identifier, finds its name.
</para> </para>
<para> <para>
Two different signals may have the same name, if they have differing types. Two different signals may have the same name, if they have differing types.
</para> </para>
@signal_id: the signal's identifying number. @signal_id: the signal's identifying number.
@Returns: the signal name, or NULL if the signal number was invalid. @Returns: the signal name, or %NULL if the signal number was invalid.
<!-- ##### FUNCTION gtk_signal_emit ##### --> <!-- ##### FUNCTION gtk_signal_emit ##### -->
<para> <para>
Emit a signal. This causes the default handler and user-defined Emits a signal. This causes the default handler and user-defined
handlers to be run. handlers to be run.
</para> </para>
<para> <para>
@ -327,7 +327,7 @@ Here is what gtk_signal_emit() does:
<para> <para>
1. Calls the default handler and the user-connected handlers. 1. Calls the default handler and the user-connected handlers.
The default handler will be called first if The default handler will be called first if
GTK_RUN_FIRST is set, and last if GTK_RUN_LAST is set. #GTK_RUN_FIRST is set, and last if #GTK_RUN_LAST is set.
</para> </para>
<para> <para>
2. Calls all handlers connected with the "after" flag set. 2. Calls all handlers connected with the "after" flag set.
@ -341,7 +341,7 @@ by a pointer to the return type, if any.
<!-- ##### FUNCTION gtk_signal_emit_by_name ##### --> <!-- ##### FUNCTION gtk_signal_emit_by_name ##### -->
<para> <para>
Emit a signal. This causes the default handler and user-connected Emits a signal. This causes the default handler and user-connected
handlers to be run. handlers to be run.
</para> </para>
@ -353,7 +353,7 @@ by a pointer to the return type, if any.
<!-- ##### FUNCTION gtk_signal_emitv ##### --> <!-- ##### FUNCTION gtk_signal_emitv ##### -->
<para> <para>
Emit a signal. This causes the default handler and user-connected Emits a signal. This causes the default handler and user-connected
handlers to be run. This differs from gtk_signal_emit() by taking handlers to be run. This differs from gtk_signal_emit() by taking
an array of GtkArgs instead of using C's varargs mechanism. an array of GtkArgs instead of using C's varargs mechanism.
</para> </para>
@ -368,7 +368,7 @@ followed by one which is a pointer to the return type.
<!-- ##### FUNCTION gtk_signal_emitv_by_name ##### --> <!-- ##### FUNCTION gtk_signal_emitv_by_name ##### -->
<para> <para>
Emit a signal by name. This causes the default handler and user-connected Emits a signal by name. This causes the default handler and user-connected
handlers to be run. This differs from gtk_signal_emit() by taking handlers to be run. This differs from gtk_signal_emit() by taking
an array of GtkArgs instead of using C's varargs mechanism. an array of GtkArgs instead of using C's varargs mechanism.
</para> </para>
@ -417,13 +417,13 @@ except it will lookup the signal id for you.
<!-- ##### MACRO gtk_signal_connect ##### --> <!-- ##### MACRO gtk_signal_connect ##### -->
<para> <para>
Attach a function pointer and user data to a signal for Attaches a function pointer and user data to a signal for
a particular object. a particular object.
</para> </para>
<para> <para>
The GtkSignalFunction takes a <StructName>GtkObject</StructName> as its first parameter. The #GtkSignalFunction takes a #GtkObject as its first parameter.
It will be the same object as the one you're connecting It will be the same object as the one you're connecting
the hook to. The func_data will be passed as the last parameter the hook to. The @func_data will be passed as the last parameter
to the hook. to the hook.
</para> </para>
<para> <para>
@ -438,18 +438,18 @@ as parameter to your function:
</para> </para>
<informalexample> <informalexample>
<programlisting> <programlisting>
static void button_clicked_int(GtkButton* button, gpointer func_data) static void button_clicked_int (GtkButton* button, gpointer func_data)
{ {
g_print("button pressed: %d\n", GPOINTER_TO_INT(func_data)); g_print ("button pressed: %d\n", GPOINTER_TO_INT (func_data));
} }
/* By calling this function, you will make the g_print above /* By calling this function, you will make the g_print above
* execute, printing the number passed as `to_print'. */ * execute, printing the number passed as `to_print'. */
static void attach_print_signal(GtkButton* button, gint to_print) static void attach_print_signal (GtkButton* button, gint to_print)
{ {
gtk_signal_connect(GTK_OBJECT(button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC(button_clicked_int), GTK_SIGNAL_FUNC (button_clicked_int),
GINT_TO_POINTER(to_print)); GINT_TO_POINTER (to_print));
} }
</programlisting> </programlisting>
</informalexample> </informalexample>
@ -469,7 +469,7 @@ is getting pressed, this is that button.
<!-- ##### MACRO gtk_signal_connect_after ##### --> <!-- ##### MACRO gtk_signal_connect_after ##### -->
<para> <para>
Attach a function pointer and user data to a signal Attaches a function pointer and user data to a signal
so that this handler will be called after the other handlers. so that this handler will be called after the other handlers.
</para> </para>
@ -502,7 +502,7 @@ some widget, you could write:
</para> </para>
<informalexample> <informalexample>
<programlisting> <programlisting>
gtk_signal_connect_object(button, "clicked", gtk_widget_show, window); gtk_signal_connect_object (button, "clicked", gtk_widget_show, window);
</programlisting> </programlisting>
</informalexample> </informalexample>
@ -522,7 +522,7 @@ really pass any gpointer as the #slot_object .)
<!-- ##### MACRO gtk_signal_connect_object_after ##### --> <!-- ##### MACRO gtk_signal_connect_object_after ##### -->
<para> <para>
Attach a signal hook to a signal, passing in an alternate Attaches a signal hook to a signal, passing in an alternate
object as the first parameter, and guaranteeing object as the first parameter, and guaranteeing
that the default handler and all normal that the default handler and all normal
handlers are called first. handlers are called first.
@ -542,7 +542,7 @@ handlers are called first.
<!-- ##### FUNCTION gtk_signal_connect_full ##### --> <!-- ##### FUNCTION gtk_signal_connect_full ##### -->
<para> <para>
Attach a function pointer and user data to a signal with Attaches a function pointer and user data to a signal with
more control. more control.
</para> </para>
@ -575,7 +575,7 @@ c++ or other languages' calling conventions.)
<!-- ##### FUNCTION gtk_signal_connect_while_alive ##### --> <!-- ##### FUNCTION gtk_signal_connect_while_alive ##### -->
<para> <para>
Attach a function pointer and another GtkObject to a signal. Attaches a function pointer and another #GtkObject to a signal.
</para> </para>
<para> <para>
This function takes an object whose "destroy" signal This function takes an object whose "destroy" signal
@ -588,7 +588,7 @@ It is a little less efficient though.
(Instead you may call gtk_signal_disconnect_by_data(), if you want (Instead you may call gtk_signal_disconnect_by_data(), if you want
to explicitly delete all attachments to this object. This to explicitly delete all attachments to this object. This
is perhaps not recommended since it could be confused is perhaps not recommended since it could be confused
with an integer masquerading as a pointer (through GINT_AS_POINTER).) with an integer masquerading as a pointer (through GINT_TO_POINTER()).)
</para> </para>
@object: the object that emits the signal. @object: the object that emits the signal.
@ -628,7 +628,7 @@ should signal the removal of this signal.
<!-- ##### MACRO gtk_signal_disconnect ##### --> <!-- ##### MACRO gtk_signal_disconnect ##### -->
<para> <para>
Destroy a user-defined handler connection. Destroys a user-defined handler connection.
</para> </para>
@object: the object which the handler pertains to. @object: the object which the handler pertains to.
@ -637,7 +637,7 @@ Destroy a user-defined handler connection.
<!-- ##### MACRO gtk_signal_disconnect_by_func ##### --> <!-- ##### MACRO gtk_signal_disconnect_by_func ##### -->
<para> <para>
Destroy all connections for a particular object, with Destroys all connections for a particular object, with
the given function-pointer and user-data. the given function-pointer and user-data.
</para> </para>
@ -652,7 +652,7 @@ the given function-pointer and user-data.
<!-- ##### MACRO gtk_signal_disconnect_by_data ##### --> <!-- ##### MACRO gtk_signal_disconnect_by_data ##### -->
<para> <para>
Destroy all connections for a particular object, with Destroys all connections for a particular object, with
the given user-data. the given user-data.
</para> </para>
@ -665,7 +665,7 @@ the given user-data.
<!-- ##### MACRO gtk_signal_handler_block ##### --> <!-- ##### MACRO gtk_signal_handler_block ##### -->
<para> <para>
Prevent an user-defined handler from being invoked. All other Prevents a user-defined handler from being invoked. All other
signal processing will go on as normal, but this particular signal processing will go on as normal, but this particular
handler will ignore it. handler will ignore it.
</para> </para>
@ -676,7 +676,7 @@ handler will ignore it.
<!-- ##### MACRO gtk_signal_handler_block_by_func ##### --> <!-- ##### MACRO gtk_signal_handler_block_by_func ##### -->
<para> <para>
Prevent a user-defined handler from being invoked, by reference to Prevents a user-defined handler from being invoked, by reference to
the user-defined handler's function pointer and user data. (It may result in the user-defined handler's function pointer and user data. (It may result in
multiple hooks being blocked, if you've called connect multiple times.) multiple hooks being blocked, if you've called connect multiple times.)
</para> </para>
@ -692,7 +692,7 @@ multiple hooks being blocked, if you've called connect multiple times.)
<!-- ##### MACRO gtk_signal_handler_block_by_data ##### --> <!-- ##### MACRO gtk_signal_handler_block_by_data ##### -->
<para> <para>
Prevent all user-defined handlers with a certain user data from being invoked. Prevents all user-defined handlers with a certain user data from being invoked.
</para> </para>
@object: the object which emits the signal we want to block. @object: the object which emits the signal we want to block.
@ -704,7 +704,7 @@ Prevent all user-defined handlers with a certain user data from being invoked.
<!-- ##### MACRO gtk_signal_handler_unblock ##### --> <!-- ##### MACRO gtk_signal_handler_unblock ##### -->
<para> <para>
Undo a block, by connection id. Note that undoing a block doesn't Undoes a block, by connection id. Note that undoing a block doesn't
necessarily make the hook callable, because if you block a necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice. hook twice, you must unblock it twice.
</para> </para>
@ -716,7 +716,7 @@ gtk_signal_connect(), etc.
<!-- ##### MACRO gtk_signal_handler_unblock_by_func ##### --> <!-- ##### MACRO gtk_signal_handler_unblock_by_func ##### -->
<para> <para>
Undo a block, by function pointer and data. Undoes a block, by function pointer and data.
Note that undoing a block doesn't Note that undoing a block doesn't
necessarily make the hook callable, because if you block a necessarily make the hook callable, because if you block a
hook twice, you must unblock it twice. hook twice, you must unblock it twice.
@ -733,7 +733,7 @@ hook twice, you must unblock it twice.
<!-- ##### MACRO gtk_signal_handler_unblock_by_data ##### --> <!-- ##### MACRO gtk_signal_handler_unblock_by_data ##### -->
<para> <para>
Undo block(s), to all signals for a particular object Undoes block(s), to all signals for a particular object
with a particular user-data pointer with a particular user-data pointer
</para> </para>

View File

@ -24,11 +24,11 @@ the socket must have been realized, and for hence,
have been added to its parent. have been added to its parent.
<example> <example>
<title> Obtaining the XID of a socket </title> <title>Obtaining the XID of a socket.</title>
<programlisting> <programlisting>
#include &lt;gdk/gdkx.h&gt; #include &lt;gdk/gdkx.h&gt;
GtkWidget *socket = gtk_socket_new(); GtkWidget *socket = gtk_socket_new (<!>);
gtk_widget_show (socket); gtk_widget_show (socket);
gtk_container_add (GTK_CONTAINER (parent), socket); gtk_container_add (GTK_CONTAINER (parent), socket);
@ -52,7 +52,7 @@ consequence being that the plug will appear as a
separate toplevel window. You can check if the plug separate toplevel window. You can check if the plug
has been created by examining the has been created by examining the
<StructField>plug_window</StructField> field of the <StructField>plug_window</StructField> field of the
#GtkSocket structure. If this field is non-NULL, #GtkSocket structure. If this field is non-%NULL,
then the plug has been successfully created inside then the plug has been successfully created inside
of the socket. of the socket.
</para> </para>

View File

@ -6,14 +6,19 @@ retrieve an integer or floating-point number from the user.
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
A #GtkSpinButton is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a #GtkEntry, #GtkSpinButton allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range. A #GtkSpinButton is an ideal way to allow the user to set the value of some
attribute. Rather than having to directly type a number into a #GtkEntry,
#GtkSpinButton allows the user to click on one of two arrows to increment or
decrement the displayed value. A value can still be typed in, with the bonus
that it can be checked to ensure it is in a given range.
</para> </para>
<para> <para>
The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the #GtkAdjustment section for more details about an adjustment's properties. The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the
#GtkAdjustment section for more details about an adjustment's properties.
</para> </para>
<para> <para>
<example> <example>
<title>Using a GtkSpinButton to get an integer.</title> <title>Using a <structname>GtkSpinButton</structname> to get an integer.</title>
<programlisting> <programlisting>
/* Provides a function to retrieve an integer value from a GtkSpinButton /* Provides a function to retrieve an integer value from a GtkSpinButton
@ -24,19 +29,19 @@ gint grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
return gtk_spin_button_get_value_as_int (a_spinner); return gtk_spin_button_get_value_as_int (a_spinner);
} }
void create_integer_spin_button(void) { void create_integer_spin_button (void) {
GtkWidget *window, *spinner; GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj; GtkAdjustment *spinner_adj;
spinner_adj = (GtkAdjustment *) gtk_adjustment_new(50.0, 0.0, 100.0, 1.0, 5.0, 5.0); spinner_adj = (GtkAdjustment *) gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5); gtk_container_set_border_width (GTK_CONTAINER (window), 5);
/* creates the spinner, with no decimal places */ /* creates the spinner, with no decimal places */
spinner = gtk_spin_button_new (spinner_adj, 1.0, 0); spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
gtk_container_add (GTK_CONTAINER(window), spinner); gtk_container_add (GTK_CONTAINER (window), spinner);
gtk_widget_show_all (window); gtk_widget_show_all (window);
return; return;
@ -48,7 +53,7 @@ void create_integer_spin_button(void) {
<para> <para>
<example> <example>
<title>Using a GtkSpinButton to get a floating point value.</title> <title>Using a <structname>GtkSpinButton</structname> to get a floating point value.</title>
<programlisting> <programlisting>
/* Provides a function to retrieve a floating point value from a /* Provides a function to retrieve a floating point value from a
@ -59,19 +64,19 @@ gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
return gtk_spin_button_get_value_as_float (a_spinner); return gtk_spin_button_get_value_as_float (a_spinner);
} }
void create_floating_spin_button(void) { void create_floating_spin_button (void) {
GtkWidget *window, *spinner; GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj; GtkAdjustment *spinner_adj;
spinner_adj = (GtkAdjustment *) gtk_adjustment_new(2.500, 0.0, 5.0, 0.001, 0.1, 0.1); spinner_adj = (GtkAdjustment *) gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5); gtk_container_set_border_width (GTK_CONTAINER (window), 5);
/* creates the spinner, with three decimal places */ /* creates the spinner, with three decimal places */
spinner = gtk_spin_button_new (spinner_adj, 0.001, 3); spinner = gtk_spin_button_new (spinner_adj, 0.001, 3);
gtk_container_add (GTK_CONTAINER(window), spinner); gtk_container_add (GTK_CONTAINER (window), spinner);
gtk_widget_show_all (window); gtk_widget_show_all (window);
return; return;
@ -93,7 +98,9 @@ void create_floating_spin_button(void) {
<!-- ##### STRUCT GtkSpinButton ##### --> <!-- ##### STRUCT GtkSpinButton ##### -->
<para> <para>
<structfield>entry</structfield> is the #GtkEntry part of the #GtkSpinButton widget, and can be used accordingly. All other fields contain private data and should only be modified using the functions below. <structfield>entry</structfield> is the #GtkEntry part of the #GtkSpinButton
widget, and can be used accordingly. All other fields contain private data
and should only be modified using the functions below.
</para> </para>

View File

@ -6,7 +6,7 @@ Pack widgets in regular patterns.
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
The GtkTable functions allow the programmer to arrange widgets in rows and The #GtkTable functions allow the programmer to arrange widgets in rows and
columns, making it easy to align many widgets next to each other, columns, making it easy to align many widgets next to each other,
horizontally and vertically. horizontally and vertically.
</para> </para>
@ -46,7 +46,7 @@ table will resize themselves to the size of the largest widget in the table.
<!-- ##### STRUCT GtkTable ##### --> <!-- ##### STRUCT GtkTable ##### -->
<para> <para>
The GtkTable structure holds the data for the actual table itself. The <structname>GtkTable</structname> structure holds the data for the actual table itself.
<structfield>children</structfield> is a #GList of all the widgets the table contains. <structfield>rows</structfield> and <structfield>columns</structfield> are pointers to #GtkTableRowCol structures, which contain the default spacing and expansion details for the #GtkTable's rows and columns, respectively. <structfield>children</structfield> is a #GList of all the widgets the table contains. <structfield>rows</structfield> and <structfield>columns</structfield> are pointers to #GtkTableRowCol structures, which contain the default spacing and expansion details for the #GtkTable's rows and columns, respectively.
</para> </para>
@ -108,7 +108,7 @@ must both be in the range 0 .. 65535.
@rows: The number of rows the new table should have. @rows: The number of rows the new table should have.
@columns: The number of columns the new table should have. @columns: The number of columns the new table should have.
@homogeneous: If set to TRUE, all table cells are resized to the size of the cell @homogeneous: If set to %TRUE, all table cells are resized to the size of the cell
containing the largest widget. containing the largest widget.
@Returns: A pointer to the the newly created table widget. @Returns: A pointer to the the newly created table widget.
@ -158,7 +158,7 @@ As there are many options associated with gtk_table_attach(), this convenience f
<!-- ##### FUNCTION gtk_table_set_row_spacing ##### --> <!-- ##### FUNCTION gtk_table_set_row_spacing ##### -->
<para> <para>
changes the space between a given table row and its surrounding rows. Changes the space between a given table row and its surrounding rows.
</para> </para>
@table: a #GtkTable containing the row whose properties you wish to change. @table: a #GtkTable containing the row whose properties you wish to change.
@ -168,7 +168,7 @@ changes the space between a given table row and its surrounding rows.
<!-- ##### FUNCTION gtk_table_set_col_spacing ##### --> <!-- ##### FUNCTION gtk_table_set_col_spacing ##### -->
<para> <para>
alters the amount of space between a given table column and the adjacent columns. Alters the amount of space between a given table column and the adjacent columns.
</para> </para>
@table: a #GtkTable. @table: a #GtkTable.
@ -178,7 +178,7 @@ alters the amount of space between a given table column and the adjacent columns
<!-- ##### FUNCTION gtk_table_set_row_spacings ##### --> <!-- ##### FUNCTION gtk_table_set_row_spacings ##### -->
<para> <para>
sets the space between every row in @table equal to @spacing. Sets the space between every row in @table equal to @spacing.
</para> </para>
@table: a #GtkTable. @table: a #GtkTable.
@ -187,7 +187,7 @@ sets the space between every row in @table equal to @spacing.
<!-- ##### FUNCTION gtk_table_set_col_spacings ##### --> <!-- ##### FUNCTION gtk_table_set_col_spacings ##### -->
<para> <para>
sets the space between every column in @table equal to @spacing. Sets the space between every column in @table equal to @spacing.
</para> </para>
@table: a #GtkTable. @table: a #GtkTable.
@ -196,12 +196,12 @@ sets the space between every column in @table equal to @spacing.
<!-- ##### FUNCTION gtk_table_set_homogeneous ##### --> <!-- ##### FUNCTION gtk_table_set_homogeneous ##### -->
<para> <para>
changes the homogenous property of table cells. Ie. whether all cells are an equal size or not. Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
</para> </para>
@table: The GtkTable you wish to set the homogeneous properties of. @table: The #GtkTable you wish to set the homogeneous properties of.
@homogeneous: Set to TRUE to ensure all table cells are the same size. Set @homogeneous: Set to %TRUE to ensure all table cells are the same size. Set
to FALSE if this is not your desired behaviour. to %FALSE if this is not your desired behaviour.
<!-- ##### FUNCTION gtk_table_get_default_row_spacing ##### --> <!-- ##### FUNCTION gtk_table_get_default_row_spacing ##### -->
@ -253,26 +253,26 @@ to FALSE if this is not your desired behaviour.
<!-- ##### ARG GtkTable:n-rows ##### --> <!-- ##### ARG GtkTable:n-rows ##### -->
<para> <para>
set or retrieve the number of rows in a table. Sets or retrieves the number of rows in a table.
</para> </para>
<!-- ##### ARG GtkTable:n-columns ##### --> <!-- ##### ARG GtkTable:n-columns ##### -->
<para> <para>
set or retrieve the number of columnsin a table. Sets or retrieves the number of columns in a table.
</para> </para>
<!-- ##### ARG GtkTable:column-spacing ##### --> <!-- ##### ARG GtkTable:column-spacing ##### -->
<para> <para>
set or retrieve the number of pixels of space between each column. Sets or retrieves the number of pixels of space between columns.
</para> </para>
<!-- ##### ARG GtkTable:row-spacing ##### --> <!-- ##### ARG GtkTable:row-spacing ##### -->
<para> <para>
set or retrieve the number of pixels of space between each row. Sets or retrieves the number of pixels of space between rows.
</para> </para>
<!-- ##### ARG GtkTable:homogeneous ##### --> <!-- ##### ARG GtkTable:homogeneous ##### -->
<para> <para>
whether each cell in the table should be the same size or not. Whether each cell in the table should be the same size or not.
</para> </para>

View File

@ -131,11 +131,11 @@ Emitted when a widget is selected during a query.
@tip_text: the widget's tooltip. @tip_text: the widget's tooltip.
@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()). @tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()).
@event: the button press or button release event. @event: the button press or button release event.
@Returns: TRUE if the query should be stopped. @Returns: %TRUE if the query should be stopped.
<!-- ##### ARG GtkTipsQuery:emit-always ##### --> <!-- ##### ARG GtkTipsQuery:emit-always ##### -->
<para> <para>
TRUE if the widget-entered and widget-selected signals are emitted even when %TRUE if the widget-entered and widget-selected signals are emitted even when
the widget has no tooltip set. the widget has no tooltip set.
</para> </para>

View File

@ -25,28 +25,28 @@ gtk_toggle_button_get_active().
To simply switch the state of a toggle button, use gtk_toggle_button_toggled. To simply switch the state of a toggle button, use gtk_toggle_button_toggled.
</para> </para>
<example> <example>
<title>Creating two #GtkToggleButton widgets.</title> <title>Creating two <structname>GtkToggleButton</structname> widgets.</title>
<programlisting> <programlisting>
void make_toggles(void) { void make_toggles (void) {
GtkWidget *dialog, *toggle1, *toggle2; GtkWidget *dialog, *toggle1, *toggle2;
dialog = gtk_dialog_new(); dialog = gtk_dialog_new (<!>);
toggle1 = gtk_toggle_button_new_with_label("Hi, i'm a toggle button."); toggle1 = gtk_toggle_button_new_with_label ("Hi, i'm a toggle button.");
/* Makes this toggle button invisible */ /* Makes this toggle button invisible */
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
gtk_signal_connect (GTK_OBJECT (toggle1), "toggled", gtk_signal_connect (GTK_OBJECT (toggle1), "toggled",
GTK_SIGNAL_FUNC (output_state), NULL); GTK_SIGNAL_FUNC (output_state), NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
toggle1, FALSE, FALSE, 2); toggle1, FALSE, FALSE, 2);
toggle2 = gtk_toggle_button_new_with_label("Hi, i'm another toggle button."); toggle2 = gtk_toggle_button_new_with_label ("Hi, i'm another toggle button.");
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle2), FALSE);
gtk_signal_connect (GTK_OBJECT (toggle2), "toggled", gtk_signal_connect (GTK_OBJECT (toggle2), "toggled",
GTK_SIGNAL_FUNC (output_state), NULL); GTK_SIGNAL_FUNC (output_state), NULL);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->action_area), gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
toggle2, FALSE, FALSE, 2); toggle2, FALSE, FALSE, 2);
gtk_widget_show_all (dialog); gtk_widget_show_all (dialog);
@ -107,11 +107,11 @@ Creates a new toggle button with a text label.
<!-- ##### FUNCTION gtk_toggle_button_set_mode ##### --> <!-- ##### FUNCTION gtk_toggle_button_set_mode ##### -->
<para> <para>
Determines whether or not the toggle button is drawn on screen. The default mode is FALSE, which results in the button being displayed. To make the button invisible, set <structfield>draw_indicator</structfield> to TRUE. Determines whether or not the toggle button is drawn on screen. The default mode is %FALSE, which results in the button being displayed. To make the button invisible, set <structfield>draw_indicator</structfield> to %TRUE.
</para> </para>
@toggle_button: a #GtkToggleButton. @toggle_button: a #GtkToggleButton.
@draw_indicator: TRUE or FALSE. @draw_indicator: %TRUE or %FALSE.
<!-- ##### FUNCTION gtk_toggle_button_get_mode ##### --> <!-- ##### FUNCTION gtk_toggle_button_get_mode ##### -->
@ -125,7 +125,7 @@ Determines whether or not the toggle button is drawn on screen. The default mode
<!-- ##### MACRO gtk_toggle_button_set_state ##### --> <!-- ##### MACRO gtk_toggle_button_set_state ##### -->
<para> <para>
This is a deprecated macro, and is only maintained for compatability reasons. This is a deprecated macro, and is only maintained for compatibility reasons.
</para> </para>
@ -142,8 +142,8 @@ application ever to call this function.
<!-- ##### FUNCTION gtk_toggle_button_get_active ##### --> <!-- ##### FUNCTION gtk_toggle_button_get_active ##### -->
<para> <para>
Queries a #GtkToggleButton and returns it's current state. Returns TRUE if Queries a #GtkToggleButton and returns it's current state. Returns %TRUE if
the toggle button is pressed in and FALSE if it is raised. the toggle button is pressed in and %FALSE if it is raised.
</para> </para>
@toggle_button: a #GtkToggleButton. @toggle_button: a #GtkToggleButton.
@ -152,13 +152,13 @@ the toggle button is pressed in and FALSE if it is raised.
<!-- ##### FUNCTION gtk_toggle_button_set_active ##### --> <!-- ##### FUNCTION gtk_toggle_button_set_active ##### -->
<para> <para>
Sets the status of the toggle button. Set to TRUE if you want the Sets the status of the toggle button. Set to %TRUE if you want the
GtkToggleButton to be 'pressed in', and FALSE to raise it. GtkToggleButton to be 'pressed in', and %FALSE to raise it.
This action causes the toggled signal to be emitted. This action causes the toggled signal to be emitted.
</para> </para>
@toggle_button: a #GtkToggleButton. @toggle_button: a #GtkToggleButton.
@is_active: TRUE or FALSE. @is_active: %TRUE or %FALSE.
<!-- ##### FUNCTION gtk_toggle_button_get_inconsistent ##### --> <!-- ##### FUNCTION gtk_toggle_button_get_inconsistent ##### -->
@ -199,7 +199,7 @@ Sets whether the toggle button should be pressed in or not.
<!-- ##### ARG GtkToggleButton:draw-indicator ##### --> <!-- ##### ARG GtkToggleButton:draw-indicator ##### -->
<para> <para>
A value of TRUE causes the toggle button to be invisible. FALSE displays it A value of %TRUE causes the toggle button to be invisible. %FALSE displays it.
again. again.
</para> </para>

View File

@ -20,13 +20,13 @@ To assign a tip to a particular #GtkWidget, gtk_tooltips_set_tip() is used.
<note> <note>
<para> <para>
Tooltips can only be set on widgets which have their own X window. Tooltips can only be set on widgets which have their own X window.
To check if a widget has its own window use 'GTK_WIDGET_NO_WINDOW (widget)'. To check if a widget has its own window use <literal>GTK_WIDGET_NO_WINDOW (widget)</literal>.
To add a tooltip to a widget that doesn't have its own window, place the To add a tooltip to a widget that doesn't have its own window, place the
widget inside a #GtkEventBox and add a tooltip to that instead. widget inside a #GtkEventBox and add a tooltip to that instead.
</para> </para>
</note> </note>
<para> <para>
The default appearance of all tooltips in a program is determined by the current gtk theme that the user has selected. The default appearance of all tooltips in a program is determined by the current GTK+ theme that the user has selected.
</para> </para>
<para> <para>
Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using gtk_tooltips_data_get(). Information about the tooltip (if any) associated with an arbitrary widget can be retrieved using gtk_tooltips_data_get().
@ -38,28 +38,28 @@ Information about the tooltip (if any) associated with an arbitrary widget can b
GtkWidget *load_button, *save_button, *hbox; GtkWidget *load_button, *save_button, *hbox;
GtkTooltips *button_bar_tips; GtkTooltips *button_bar_tips;
button_bar_tips = gtk_tooltips_new(); button_bar_tips = gtk_tooltips_new (<!>);
/* Create the buttons and pack them into a #GtkHBox */ /* Create the buttons and pack them into a GtkHBox */
hbox = gtk_hbox_new(TRUE, 2); hbox = gtk_hbox_new (TRUE, 2);
load_button = gtk_button_new_with_label("Load a file"); load_button = gtk_button_new_with_label ("Load a file");
gtk_box_pack_start(GTK_BOX (hbox), load_button, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
gtk_widget_show(load_button); gtk_widget_show (load_button);
save_button = gtk_button_new_with_label("Save a file"); save_button = gtk_button_new_with_label ("Save a file");
gtk_box_pack_start(GTK_BOX (hbox), save_button, TRUE, TRUE, 2); gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
gtk_widget_show(save_button); gtk_widget_show (save_button);
gtk_widget_show(hbox); gtk_widget_show (hbox);
/* Add the tips */ /* Add the tips */
gtk_tooltips_set_tip(GTK_TOOLTIPS (button_bar_tips), load_button, gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), load_button,
"Load a new document into this window", "Load a new document into this window",
"Requests the filename of a document. "Requests the filename of a document.
This will then be loaded into the current This will then be loaded into the current
window, replacing the contents of whatever window, replacing the contents of whatever
is already loaded."); is already loaded.");
gtk_tooltips_set_tip(GTK_TOOLTIPS (button_bar_tips), save_button, gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), save_button,
"Saves the current document to a file", "Saves the current document to a file",
"If you have saved the document previously, "If you have saved the document previously,
then the new version will be saved over the then the new version will be saved over the
@ -149,7 +149,7 @@ Retrieves any #GtkTooltipsData previously associated with the given widget.
</para> </para>
@widget: a #GtkWidget. @widget: a #GtkWidget.
@Returns: a #GtkTooltipsData struct, or NULL if the widget has no tooltip. @Returns: a #GtkTooltipsData struct, or %NULL if the widget has no tooltip.
<!-- ##### FUNCTION gtk_tooltips_force_window ##### --> <!-- ##### FUNCTION gtk_tooltips_force_window ##### -->

View File

@ -55,13 +55,13 @@ attempts. There are really only two reasonable ways to call this function:
<orderedlist> <orderedlist>
<listitem> <listitem>
<para> <para>
<literal>gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE)</literal> <literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE)</literal>
means that the window is user-resizable. means that the window is user-resizable.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, TRUE)</literal> <literal>gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE)</literal>
means that the window's size is program-controlled, and should simply match means that the window's size is program-controlled, and should simply match
the current size request of the window's children. the current size request of the window's children.
</para> </para>
@ -74,15 +74,15 @@ be resized by users.
<para> <para>
The basic ugly truth of this function is that it should be simply: The basic ugly truth of this function is that it should be simply:
<programlisting> <programlisting>
void gtk_window_set_resizable(GtkWidget* window, gboolean setting); void gtk_window_set_resizable (GtkWidget* window, gboolean setting);
</programlisting> </programlisting>
...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you ...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you
should use instead of gtk_window_set_policy(). should use instead of gtk_window_set_policy().
</para> </para>
<para> <para>
If set to TRUE, the @allow_grow parameter allows the user to expand the window If set to %TRUE, the @allow_grow parameter allows the user to expand the window
beyond the size request of its child widgets. If @allow_grow is TRUE, be sure to beyond the size request of its child widgets. If @allow_grow is %TRUE, be sure to
check that your child widgets work properly as the window is resized. check that your child widgets work properly as the window is resized.
</para> </para>
@ -93,22 +93,22 @@ window will expand to contain them. However, normally the toplevel will not
shrink to fit the size request of its children if it's too large; the shrink to fit the size request of its children if it's too large; the
@auto_shrink parameter causes the window to shrink when child widgets have too @auto_shrink parameter causes the window to shrink when child widgets have too
much space. @auto_shrink is normally used with the second of the two window much space. @auto_shrink is normally used with the second of the two window
policies mentioned above. That is, set @auto_shrink to TRUE if you want the policies mentioned above. That is, set @auto_shrink to %TRUE if you want the
window to have a fixed, always-optimal size determined by your program. window to have a fixed, always-optimal size determined by your program.
</para> </para>
<para> <para>
Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are Note that @auto_shrink doesn't do anything if @allow_shrink and @allow_grow are
both set to FALSE. both set to %FALSE.
</para> </para>
<para> <para>
Neither of the two suggested window policies set the @allow_shrink paramter to Neither of the two suggested window policies set the @allow_shrink parameter to
TRUE. If @allow_shrink is TRUE, the user can shrink the window so that its %TRUE. If @allow_shrink is %TRUE, the user can shrink the window so that its
children do not receive their full size request; this is basically a bad thing, children do not receive their full size request; this is basically a bad thing,
because most widgets will look wrong if this happens. Furthermore GTK+ has a because most widgets will look wrong if this happens. Furthermore GTK+ has a
tendency to re-expand the window if size is recalculated for any reason. The tendency to re-expand the window if size is recalculated for any reason. The
upshot is that @allow_shrink should always be set to FALSE. upshot is that @allow_shrink should always be set to %FALSE.
</para> </para>
<para> <para>
@ -165,7 +165,7 @@ it's larger
<!-- ##### MACRO gtk_window_position ##### --> <!-- ##### MACRO gtk_window_position ##### -->
<para> <para>
Deperecated alias for gtk_window_set_position(). Deprecated alias for gtk_window_set_position().
</para> </para>

View File

@ -1,3 +1,7 @@
2001-12-12 Matthias Clasen <matthiasc@poet.de>
* gdk-pixbuf-io.c: Markup fixes.
2001-12-12 Matthias Clasen <matthiasc@poet.de> 2001-12-12 Matthias Clasen <matthiasc@poet.de>
* Makefile.am (INCLUDES): Define G_LOG_DOMAIN. (#66412) * Makefile.am (INCLUDES): Define G_LOG_DOMAIN. (#66412)

View File

@ -523,10 +523,10 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size,
* @error: Return location for an error * @error: Return location for an error
* *
* Creates a new pixbuf by loading an image from a file. The file format is * Creates a new pixbuf by loading an image from a file. The file format is
* detected automatically. If NULL is returned, then @error will be set. * detected automatically. If %NULL is returned, then @error will be set.
* Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. * Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.
* *
* Return value: A newly-created pixbuf with a reference count of 1, or NULL if * Return value: A newly-created pixbuf with a reference count of 1, or %NULL if
* any of several error conditions occurred: the file could not be opened, * any of several error conditions occurred: the file could not be opened,
* there was no loader for the file's format, there was not enough memory to * there was no loader for the file's format, there was not enough memory to
* allocate the image buffer, or the image file contained invalid data. * allocate the image buffer, or the image file contained invalid data.
@ -739,17 +739,16 @@ gdk_pixbuf_real_save (GdkPixbuf *pixbuf,
* @Varargs: list of key-value save options * @Varargs: list of key-value save options
* *
* Saves pixbuf to a file in @type, which is currently "jpeg" or * Saves pixbuf to a file in @type, which is currently "jpeg" or
* "png". If @error is set, FALSE will be returned. Possible errors include * "png". If @error is set, %FALSE will be returned. Possible errors include
* those in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain. * those in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain.
* *
* The variable argument list should be NULL-terminated; if not empty, * The variable argument list should be %NULL-terminated; if not empty,
* it should contain pairs of strings that modify the save * it should contain pairs of strings that modify the save
* parameters. For example: * parameters. For example:
* * <informalexample><programlisting>
* <programlisting>
* gdk_pixbuf_save (pixbuf, handle, "jpeg", &error, * gdk_pixbuf_save (pixbuf, handle, "jpeg", &error,
* "quality", "100", NULL); * "quality", "100", NULL);
* </programlisting> * </programlisting></informalexample>
* *
* Currently only few parameters exist. JPEG images can be saved with a * Currently only few parameters exist. JPEG images can be saved with a
* "quality" parameter; its value should be in the range [0,100]. * "quality" parameter; its value should be in the range [0,100].
@ -795,12 +794,12 @@ gdk_pixbuf_save (GdkPixbuf *pixbuf,
* @pixbuf: pointer to GdkPixbuf. * @pixbuf: pointer to GdkPixbuf.
* @filename: Name of file to save. * @filename: Name of file to save.
* @type: name of file format. * @type: name of file format.
* @option_keys: name of options to set, NULL-terminated * @option_keys: name of options to set, %NULL-terminated
* @option_values: values for named options * @option_values: values for named options
* @error: return location for error, or NULL * @error: return location for error, or %NULL
* *
* Saves pixbuf to a file in @type, which is currently "jpeg" or "png". * Saves pixbuf to a file in @type, which is currently "jpeg" or "png".
* If @error is set, FALSE will be returned. See gdk_pixbuf_save () for more * If @error is set, %FALSE will be returned. See gdk_pixbuf_save () for more
* details. * details.
* *
* Return value: whether an error was set * Return value: whether an error was set

View File

@ -385,7 +385,7 @@ gtk_dialog_new_empty (const gchar *title,
* so the first button in the list will be the leftmost button in the dialog. * so the first button in the list will be the leftmost button in the dialog.
* *
* Here's a simple example: * Here's a simple example:
* <programlisting> * <informalexample><programlisting>
* GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog", * GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
* main_app_window, * main_app_window,
* GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, * GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
@ -394,7 +394,7 @@ gtk_dialog_new_empty (const gchar *title,
* GTK_STOCK_CANCEL, * GTK_STOCK_CANCEL,
* GTK_RESPONSE_REJECT, * GTK_RESPONSE_REJECT,
* NULL); * NULL);
* </programlisting> * </programlisting></informalexample>
* *
* Return value: a new #GtkDialog * Return value: a new #GtkDialog
**/ **/
@ -618,8 +618,8 @@ gtk_dialog_add_buttons (GtkDialog *dialog,
* @response_id: a response ID * @response_id: a response ID
* @setting: %TRUE for sensitive * @setting: %TRUE for sensitive
* *
* Calls gtk_widget_set_sensitive (widget, @setting) for each * Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
* widget in the dialog's action area with the given @response_id. * for each widget in the dialog's action area with the given @response_id.
* A convenient way to sensitize/desensitize dialog buttons. * A convenient way to sensitize/desensitize dialog buttons.
**/ **/
void void
@ -850,19 +850,19 @@ run_destroy_handler (GtkDialog *dialog, gpointer data)
* destroying the dialog if you wish to do so. * destroying the dialog if you wish to do so.
* *
* Typical usage of this function might be: * Typical usage of this function might be:
* <programlisting> * <informalexample><programlisting>
* gint result = gtk_dialog_run (GTK_DIALOG (dialog)); * gint result = gtk_dialog_run (GTK_DIALOG (dialog));
* switch (result) * switch (result)
* { * {
* case GTK_RESPONSE_ACCEPT: * case GTK_RESPONSE_ACCEPT:
* do_application_specific_something (); * do_application_specific_something (<!>);
* break; * break;
* default: * default:
* do_nothing_since_dialog_was_cancelled (); * do_nothing_since_dialog_was_cancelled (<!>);
* break; * break;
* } * }
* gtk_widget_destroy (dialog); * gtk_widget_destroy (dialog);
* </programlisting> * </programlisting></informalexample>
* *
* Return value: response ID * Return value: response ID
**/ **/

View File

@ -457,10 +457,10 @@ gtk_rc_add_default_file (const gchar *filename)
/** /**
* gtk_rc_set_default_files: * gtk_rc_set_default_files:
* @filenames: A %NULL terminated list of filenames. * @filenames: A %NULL-terminated list of filenames.
* *
* Sets the list of files that GTK+ will read at the * Sets the list of files that GTK+ will read at the
* end of gtk_init() * end of gtk_init().
**/ **/
void void
gtk_rc_set_default_files (gchar **filenames) gtk_rc_set_default_files (gchar **filenames)
@ -490,12 +490,11 @@ gtk_rc_set_default_files (gchar **filenames)
* gtk_rc_get_default_files: * gtk_rc_get_default_files:
* *
* Retrieves the current list of RC files that will be parsed * Retrieves the current list of RC files that will be parsed
* at the end of gtk_init() * at the end of gtk_init().
* *
* Return value: A NULL terminated array of filenames. This memory * Return value: A %NULL-terminated array of filenames. This memory
* is owned by GTK+ and must not be freed by the application. * is owned by GTK+ and must not be freed by the application.
* If you want to store this information, you should make a * If you want to store this information, you should make a copy.
* copy.
**/ **/
gchar ** gchar **
gtk_rc_get_default_files (void) gtk_rc_get_default_files (void)
@ -1029,7 +1028,7 @@ gtk_rc_style_new (void)
* gtk_rc_style_copy: * gtk_rc_style_copy:
* @orig: the style to copy * @orig: the style to copy
* *
* Make a copy of the specified #GtkRcStyle. This function * Makes a copy of the specified #GtkRcStyle. This function
* will correctly copy an rc style that is a member of a class * will correctly copy an rc style that is a member of a class
* derived from #GtkRcStyle. * derived from #GtkRcStyle.
* *
@ -1272,7 +1271,7 @@ gtk_rc_reset_widgets (GtkRcContext *context)
* @force_load: load whether or not anything changed * @force_load: load whether or not anything changed
* *
* If the modification time on any previously read file * If the modification time on any previously read file
* for the given GtkSettings has changed, discard all style information * for the given #GtkSettings has changed, discard all style information
* and then reread all previously read RC files. * and then reread all previously read RC files.
* *
* Return value: %TRUE if the files were reread. * Return value: %TRUE if the files were reread.
@ -1496,7 +1495,7 @@ gtk_rc_get_style (GtkWidget *widget)
* @widget_path: the widget path to use when looking up the style, or %NULL * @widget_path: the widget path to use when looking up the style, or %NULL
* @class_path: the class path to use when looking up the style, or %NULL * @class_path: the class path to use when looking up the style, or %NULL
* @type: a type that will be used along with parent types of this type * @type: a type that will be used along with parent types of this type
* when matching against class styles, or G_TYPE_NONE * when matching against class styles, or #G_TYPE_NONE
* *
* Creates up a #GtkStyle from styles defined in a RC file by providing * Creates up a #GtkStyle from styles defined in a RC file by providing
* the raw components used in matching. This function may be useful * the raw components used in matching. This function may be useful
@ -1505,16 +1504,15 @@ gtk_rc_get_style (GtkWidget *widget)
* would be items inside a GNOME canvas widget. * would be items inside a GNOME canvas widget.
* *
* The action of gtk_rc_get_style() is similar to: * The action of gtk_rc_get_style() is similar to:
* * <informalexample><programlisting>
* <programlisting>
* gtk_widget_path (widget, NULL, &amp;path, NULL); * gtk_widget_path (widget, NULL, &amp;path, NULL);
* gtk_widget_class_path (widget, NULL, &amp;class_path, NULL); * gtk_widget_class_path (widget, NULL, &amp;class_path, NULL);
* gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path, * gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path,
* G_OBJECT_TYPE (widget)); * G_OBJECT_TYPE (widget));
* </programlisting> * </programlisting></informalexample>
* *
* Return value: A style created by matching with the supplied paths, * Return value: A style created by matching with the supplied paths,
* or %NULL if nothign matching was specified and the default style should * or %NULL if nothing matching was specified and the default style should
* be used. The returned value is owned by GTK+ as part of an internal cache, * be used. The returned value is owned by GTK+ as part of an internal cache,
* so you must call g_object_ref() on the returned value if you want to * so you must call g_object_ref() on the returned value if you want to
* keep a reference to it. * keep a reference to it.
@ -2689,7 +2687,7 @@ gtk_rc_check_pixmap_dir (const gchar *dir, const gchar *pixmap_file)
* If the file is not found, it outputs a warning message using * If the file is not found, it outputs a warning message using
* g_warning() and returns %NULL. * g_warning() and returns %NULL.
* *
* Return value: * Return value: the filename.
**/ **/
gchar* gchar*
gtk_rc_find_pixmap_in_path (GtkSettings *settings, gtk_rc_find_pixmap_in_path (GtkSettings *settings,

View File

@ -1831,7 +1831,7 @@ gtk_widget_unmap (GtkWidget *widget)
* @widget: a #GtkWidget * @widget: a #GtkWidget
* *
* Creates the GDK (windowing system) resources associated with a * Creates the GDK (windowing system) resources associated with a
* widget. For example, widget->window will be created when a widget * widget. For example, @widget->window will be created when a widget
* is realized. Normally realization happens implicitly; if you show * is realized. Normally realization happens implicitly; if you show
* a widget and all its parent containers, then the widget will be * a widget and all its parent containers, then the widget will be
* realized and mapped automatically. * realized and mapped automatically.
@ -1907,7 +1907,7 @@ gtk_widget_realize (GtkWidget *widget)
* *
* This function is only useful in widget implementations. * This function is only useful in widget implementations.
* Causes a widget to be unrealized (frees all GDK resources * Causes a widget to be unrealized (frees all GDK resources
* associated with the widget, such as widget->window). * associated with the widget, such as @widget->window).
* *
**/ **/
void void
@ -2711,8 +2711,8 @@ gtk_widget_remove_accelerator (GtkWidget *widget,
* Lists the closures used by @widget for accelerator group connections * Lists the closures used by @widget for accelerator group connections
* with gtk_accel_group_connect_by_path() or gtk_accel_group_connect(). * with gtk_accel_group_connect_by_path() or gtk_accel_group_connect().
* The closures can be used to monitor accelerator changes on @widget, * The closures can be used to monitor accelerator changes on @widget,
* by connecting to the ::accel_changed signal of the #GtkAccelGroup * by connecting to the ::accel_changed signal of the #GtkAccelGroup of a
* of a closure which can be found out with gtk_accel_group_from_accel_closure(). * closure which can be found out with gtk_accel_group_from_accel_closure().
*/ */
GList* GList*
gtk_widget_list_accel_closures (GtkWidget *widget) gtk_widget_list_accel_closures (GtkWidget *widget)
@ -3255,7 +3255,7 @@ gtk_widget_intersect (GtkWidget *widget,
* gtk_widget_region_intersect: * gtk_widget_region_intersect:
* @widget: a #GtkWidget * @widget: a #GtkWidget
* @region: a #GdkRegion, in the same coordinate system as * @region: a #GdkRegion, in the same coordinate system as
* widget->allocation. That is, relative to @widget->window * @widget->allocation. That is, relative to @widget->window
* for %NO_WINDOW widgets; relative to the parent window * for %NO_WINDOW widgets; relative to the parent window
* of @widget->window for widgets with their own window. * of @widget->window for widgets with their own window.
* @returns: A newly allocated region holding the intersection of @widget * @returns: A newly allocated region holding the intersection of @widget
@ -4319,7 +4319,7 @@ gtk_widget_get_pango_context (GtkWidget *widget)
* *
* Creates a new #PangoContext with the appropriate colormap, * Creates a new #PangoContext with the appropriate colormap,
* font description, and base direction for drawing text for * font description, and base direction for drawing text for
* this widget. See also gtk_widget_get_pango_context() * this widget. See also gtk_widget_get_pango_context().
* *
* Return value: the new #PangoContext * Return value: the new #PangoContext
**/ **/
@ -4609,7 +4609,7 @@ gtk_widget_child_focus (GtkWidget *widget,
* *
* *
* Sets the position of a widget. The funny "u" in the name comes from * Sets the position of a widget. The funny "u" in the name comes from
* the "user position" hint specified by the X window system, and * the "user position" hint specified by the X Window System, and
* exists for legacy reasons. This function doesn't work if a widget * exists for legacy reasons. This function doesn't work if a widget
* is inside a container; it's only really useful on #GtkWindow. * is inside a container; it's only really useful on #GtkWindow.
* *
@ -5076,7 +5076,7 @@ gtk_widget_get_visual (GtkWidget *widget)
* gtk_widget_get_settings: * gtk_widget_get_settings:
* @widget: a #GtkWidget * @widget: a #GtkWidget
* *
* Get the settings object holding the settings (global property * Gets the settings object holding the settings (global property
* settings, RC file information, etc) used for this widget. * settings, RC file information, etc) used for this widget.
* *
* Return value: the relevant #GtkSettings object * Return value: the relevant #GtkSettings object
@ -5282,15 +5282,15 @@ gtk_widget_get_composite_name (GtkWidget *widget)
* the corresponding gtk_widget_pop_composite_child() call. * the corresponding gtk_widget_pop_composite_child() call.
* *
* Here is a simple example: * Here is a simple example:
* <programlisting> * <informalexample><programlisting>
* gtk_widget_push_composite_child (); * gtk_widget_push_composite_child (<!>);
* scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment); * scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
* gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar"); * gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
* gtk_widget_pop_composite_child (); * gtk_widget_pop_composite_child (<!>);
* gtk_widget_set_parent (scrolled_window->hscrollbar, * gtk_widget_set_parent (scrolled_window->hscrollbar,
* GTK_WIDGET (scrolled_window)); * GTK_WIDGET (scrolled_window));
* gtk_widget_ref (scrolled_window->hscrollbar); * gtk_widget_ref (scrolled_window->hscrollbar);
* </programlisting> * </programlisting></informalexample>
**/ **/
void void
gtk_widget_push_composite_child (void) gtk_widget_push_composite_child (void)
@ -5901,7 +5901,7 @@ gtk_widget_shape_info_destroy (GtkWidgetShapeInfo *info)
* @offset_x: X position of shape mask with respect to @window. * @offset_x: X position of shape mask with respect to @window.
* @offset_y: Y position of shape mask with respect to @window. * @offset_y: Y position of shape mask with respect to @window.
* *
* Sets a shape for this widget's gdk window. This allows for * Sets a shape for this widget's GDK window. This allows for
* transparent windows etc., see gdk_window_shape_combine_mask() * transparent windows etc., see gdk_window_shape_combine_mask()
* for more information. * for more information.
**/ **/