mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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:
parent
fe655f3919
commit
fc4a6b955d
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): do not try
|
||||
|
@ -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>
|
||||
|
||||
* gtk/tmpl/gtklist.sgml: Markup fixes.
|
||||
|
@ -34,6 +34,8 @@ Scaling pixbufs and scaling and compositing pixbufs
|
||||
as calling gdk_pixbuf_scale().
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Handling an expose event.</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
@ -62,10 +64,11 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
GdkRGB
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkInterpType ##### -->
|
||||
|
@ -22,10 +22,9 @@ X reference documentation. A X Logical Font Description (XLFD)
|
||||
consists of a sequence of fields separated (and surrounded by) '-'
|
||||
characters. For example, Adobe Helvetica Bold 12 pt, has the
|
||||
full description:
|
||||
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</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
|
||||
the XLFD. For instance, the above example could
|
||||
also be specified as
|
||||
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
|
||||
It is generally a good idea to use wildcards for any
|
||||
portion of the XLFD that your program does not care
|
||||
|
@ -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
|
||||
session management and the Inter-Client Communication Conventions Manual
|
||||
(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>
|
||||
|
||||
@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.
|
||||
</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
|
||||
performed in a function which is automatically called on exit (via the use
|
||||
of g_atexit()).
|
||||
@ -346,14 +346,14 @@ avoid the X error in any other way.
|
||||
<example>
|
||||
<title>Trapping an X error.</title>
|
||||
<programlisting>
|
||||
gdk_error_trap_push ();
|
||||
gdk_error_trap_push (<!>);
|
||||
|
||||
/* ... Call the X function which may cause an error here ... */
|
||||
|
||||
/* 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 ... */
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ Calculates the intersection of two rectangles.
|
||||
@src1: a #GdkRectangle.
|
||||
@src2: a #GdkRectangle.
|
||||
@dest: the intersection of @src1 and @src2.
|
||||
@Returns: TRUE if the rectangles intersect.
|
||||
@Returns: %TRUE if the rectangles intersect.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
|
||||
@ -161,32 +161,32 @@ Returns the smallest rectangle which includes the entire #GdkRegion.
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_empty ##### -->
|
||||
<para>
|
||||
Returns TRUE if the #GdkRegion is empty.
|
||||
Returns %TRUE if the #GdkRegion is empty.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@Returns: TRUE if @region is empty.
|
||||
@Returns: %TRUE if @region is empty.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_equal ##### -->
|
||||
<para>
|
||||
Returns TRUE if the two regions are the same.
|
||||
Returns %TRUE if the two regions are the same.
|
||||
</para>
|
||||
|
||||
@region1: 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 ##### -->
|
||||
<para>
|
||||
Returns TRUE if a point is in a region.
|
||||
Returns %TRUE if a point is in a region.
|
||||
</para>
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@x: the x 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 ##### -->
|
||||
@ -196,8 +196,8 @@ Tests whether a rectangle is within a region.
|
||||
|
||||
@region: a #GdkRegion.
|
||||
@rect: a #GdkRectangle.
|
||||
@Returns: GDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or
|
||||
GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
|
||||
@Returns: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
|
||||
%GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
|
||||
outside, or partly inside the #GdkRegion, respectively.
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ renders RGB, grayscale, or indexed image data to a #GdkDrawable
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<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
|
||||
possible, handling issues such as colormaps, visuals, dithering,
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
created in grayscale and direct color modes, and the visual is changed
|
||||
in cases where a "better" visual than the default is available.
|
||||
@ -57,7 +58,7 @@ main (int argc, char *argv[])
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
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_container_add (GTK_CONTAINER (window), darea);
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
|
||||
@ -76,7 +77,7 @@ main (int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
gtk_main ();
|
||||
gtk_main (<!>);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -99,7 +100,7 @@ on_darea_expose (GtkWidget *widget,
|
||||
|
||||
<varlistentry>
|
||||
<term>#GdkColor</term>
|
||||
<listitem><para>The underlying Gdk mechanism for allocating
|
||||
<listitem><para>The underlying GDK mechanism for allocating
|
||||
colors.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@ -122,7 +123,7 @@ This function no longer does anything at all. It's completely useless
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -143,7 +144,7 @@ the pixel (x + i, y + j) is colored with red value @rgb_buf[@j *
|
||||
</para>
|
||||
|
||||
@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).
|
||||
@x: The x 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 ##### -->
|
||||
<para>
|
||||
|
||||
Selects whether or not GdkRgb applies dithering
|
||||
Selects whether or not GdkRGB applies dithering
|
||||
to the image on display. There are three values:
|
||||
</para>
|
||||
|
||||
@ -300,7 +300,7 @@ only.
|
||||
</itemizedlist>
|
||||
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -380,9 +380,9 @@ a #GdkColor struct.
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_set_install ##### -->
|
||||
<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
|
||||
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.
|
||||
</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.
|
||||
</para>
|
||||
|
||||
@install: TRUE to set install mode.
|
||||
@install: %TRUE to set install mode.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_set_min_colors ##### -->
|
||||
<para>
|
||||
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
|
||||
private colormap.
|
||||
</para>
|
||||
@ -407,14 +407,14 @@ private colormap.
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_get_visual ##### -->
|
||||
<para>
|
||||
Gets a "preferred visual" chosen by GdkRgb. In previous versions of
|
||||
GDK, this was the only visual GdkRgb could use for rendering. In
|
||||
current versions, it's simply the visual GdkRgb would have chosen as
|
||||
the optimal one in those previous versions. GdkRgb can now render to
|
||||
Gets a "preferred visual" chosen by GdkRGB. In previous versions of
|
||||
GDK, this was the only visual GdkRGB could use for rendering. In
|
||||
current versions, it's simply the visual GdkRGB would have chosen as
|
||||
the optimal one in those previous versions. GdkRGB can now render to
|
||||
drawables with any visual.
|
||||
</para>
|
||||
|
||||
@Returns: The #GdkVisual chosen by GdkRgb.
|
||||
@Returns: The #GdkVisual chosen by GdkRGB.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_get_colormap ##### -->
|
||||
@ -427,22 +427,22 @@ drawables with any visual.
|
||||
|
||||
<!-- ##### MACRO gdk_rgb_get_cmap ##### -->
|
||||
<para>
|
||||
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.
|
||||
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.
|
||||
</para>
|
||||
|
||||
@Returns: The #GdkColormap set by GdkRgb.
|
||||
@Returns: The #GdkColormap set by GdkRGB.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_rgb_ditherable ##### -->
|
||||
<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
|
||||
dither mode is desired; if the display is not ditherable, it may make
|
||||
sense to gray out or hide the corresponding UI widget.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if the visual is ditherable.
|
||||
@Returns: %TRUE if the visual is ditherable.
|
||||
|
||||
|
||||
<!-- ##### 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.
|
||||
</para>
|
||||
|
||||
@verbose: TRUE if verbose messages are desired.
|
||||
@verbose: %TRUE if verbose messages are desired.
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ The <type>GdkVisual</type> structure contains information about
|
||||
a particular visual.
|
||||
</para>
|
||||
|
||||
<figure float="1" id="rgbmask">
|
||||
<example id="rgbmask">
|
||||
<title>Constructing a pixel value from components</title>
|
||||
<programlisting>
|
||||
guint
|
||||
@ -69,7 +69,7 @@ pixel_from_rgb (GdkVisual *visual,
|
||||
((r >> (16 - visual->blue_prec)) << visual->blue_shift);
|
||||
}
|
||||
</programlisting>
|
||||
</figure>
|
||||
</example>
|
||||
|
||||
@parent_instance: inherited portion from #GObject
|
||||
@type: The type of this visual.
|
||||
|
@ -111,7 +111,7 @@ the "character grid" will be allowed.
|
||||
<para>
|
||||
Here's an example of how the terminal example would be implemented, assuming
|
||||
a terminal area widget called "terminal" and a toplevel window "toplevel":
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
GdkGeometry hints;
|
||||
|
||||
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_MIN_SIZE |
|
||||
GDK_HINT_BASE_SIZE);
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -3,7 +3,6 @@
|
||||
<!entity % local.notation.class "| PNG">
|
||||
|
||||
<!entity hash "#">
|
||||
<!entity empty "">
|
||||
<!entity GtkAccelLabel SYSTEM "sgml/gtkaccellabel.sgml">
|
||||
<!entity GtkAdjustment SYSTEM "sgml/gtkadjustment.sgml">
|
||||
<!entity GtkAlignment SYSTEM "sgml/gtkalignment.sgml">
|
||||
|
@ -43,7 +43,7 @@ though it is almost always used to display just one accelerator key.
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
/* 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);
|
||||
|
||||
/* 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_container_add (GTK_CONTAINER (menu), save_item);
|
||||
|
||||
/* Now add the accelerator to the #GtkMenuItem. Note that since we called
|
||||
gtk_menu_item_new_with_label() to create the #GtkMenuItem the
|
||||
#GtkAccelLabel is automatically set up to display the #GtkMenuItem
|
||||
/* Now add the accelerator to the GtkMenuItem. Note that since we called
|
||||
gtk_menu_item_new_with_label(<!>) to create the GtkMenuItem the
|
||||
GtkAccelLabel is automatically set up to display the GtkMenuItem
|
||||
accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. */
|
||||
gtk_widget_add_accelerator (save_item, "activate", accel_group,
|
||||
GDK_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
@ -34,7 +34,8 @@ the entry field to the last or first item in the list, respectively.
|
||||
</para>
|
||||
|
||||
<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>
|
||||
GtkWidget *combo;
|
||||
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, "Fifth Item");
|
||||
|
||||
combo = gtk_combo_new ();
|
||||
combo = gtk_combo_new (<!>);
|
||||
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
|
||||
</programlisting>
|
||||
</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>
|
||||
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);
|
||||
|
||||
/* You can put almost anything into the GtkListItem widget. Here we will use
|
||||
|
@ -14,7 +14,7 @@ require extensive effort on the user's part.
|
||||
</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
|
||||
be packed. The bottom area is known as the
|
||||
<structfield>action_area</structfield>. This is generally used for
|
||||
@ -31,7 +31,8 @@ buttons.
|
||||
|
||||
<para>
|
||||
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.
|
||||
</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
|
||||
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
|
||||
GTK_DIALOG_MODAL flag to make a dialog modal.
|
||||
#GTK_DIALOG_MODAL flag to make a dialog modal.
|
||||
</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
|
||||
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
|
||||
"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>
|
||||
|
||||
|
||||
@ -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
|
||||
dialog contents manually if you had more than a simple message in the dialog.
|
||||
<example>
|
||||
<title>Simple #GtkDialog usage.</title>
|
||||
<title>Simple <structname>GtkDialog</structname> usage.</title>
|
||||
<programlisting>
|
||||
|
||||
/* 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 */
|
||||
|
||||
@ -166,7 +167,7 @@ gtk_window_set_title(). See the #GtkWindow section for more).
|
||||
<!-- ##### FUNCTION gtk_dialog_new ##### -->
|
||||
<para>
|
||||
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>
|
||||
|
||||
@Returns: a new #GtkDialog.
|
||||
@ -284,7 +285,7 @@ directly, but into the vbox and action_area, as described above.
|
||||
<para>
|
||||
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
|
||||
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.
|
||||
</para>
|
||||
|
||||
|
@ -48,6 +48,8 @@ As this example demonstrates, an expose handler should
|
||||
draw only the pixels within the requested area and
|
||||
should draw or clear all these pixels.
|
||||
</para>
|
||||
<example>
|
||||
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
@ -68,11 +70,12 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
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),
|
||||
100, 100);
|
||||
gtk_signal_connect (GTK_OBJECT (drawing_area),
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@ -81,14 +84,14 @@ expose_event (GdkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
|
||||
<!-- ##### STRUCT GtkDrawingArea ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_drawing_area_new ##### -->
|
||||
<para>
|
||||
Create a new drawing area.
|
||||
Creates a new drawing area.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GtkDrawingArea
|
||||
@ -96,7 +99,7 @@ Create a new drawing area.
|
||||
|
||||
<!-- ##### FUNCTION gtk_drawing_area_size ##### -->
|
||||
<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
|
||||
drawing area may actually be allocated a size
|
||||
larger than this depending on how it is packed
|
||||
|
@ -22,7 +22,7 @@ the following handler to "insert_text", an application
|
||||
can convert all entry into a widget into uppercase.
|
||||
|
||||
<example>
|
||||
<title> Forcing entry to uppercase </title>
|
||||
<title>Forcing entry to uppercase.</title>
|
||||
<programlisting>
|
||||
#include <ctype.h>
|
||||
|
||||
@ -36,8 +36,8 @@ insert_text_handler (GtkEditable *editable,
|
||||
int i;
|
||||
gchar *result = g_new (gchar, length);
|
||||
|
||||
for (i=0; i<length; i++)
|
||||
result[i] = islower(text[i]) ? toupper(text[i]) : text[i];
|
||||
for (i = 0; i < length; i++)
|
||||
result[i] = islower (text[i]) ? toupper (text[i]) : text[i];
|
||||
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (editable),
|
||||
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 ##### -->
|
||||
<para>
|
||||
Insert text at a given position.
|
||||
Inserts text at a given position.
|
||||
</para>
|
||||
|
||||
@editable: a #GtkEditable widget.
|
||||
@ -134,7 +134,7 @@ Insert text at a given position.
|
||||
|
||||
<!-- ##### FUNCTION gtk_editable_delete_text ##### -->
|
||||
<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
|
||||
@start_pos up to, but not including @end_pos. If
|
||||
@end_pos is negative, then the the characters deleted
|
||||
|
@ -6,7 +6,12 @@ prompt the user for a file or directory name.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<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>
|
||||
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>
|
||||
<example>
|
||||
<title>Getting a filename from the user</title>
|
||||
<title>Getting a filename from the user.</title>
|
||||
<programlisting>
|
||||
|
||||
/* 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;
|
||||
gchar *selected_filename;
|
||||
|
||||
void store_filename(GtkFileSelection *selector, gpointer user_data) {
|
||||
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION(file_selector));
|
||||
void store_filename (GtkFileSelection *selector, gpointer user_data) {
|
||||
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 */
|
||||
|
||||
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);
|
||||
|
||||
/* 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),
|
||||
(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),
|
||||
(gpointer) file_selector);
|
||||
|
||||
|
@ -85,7 +85,7 @@ Sets the currently-selected font.
|
||||
|
||||
@fontsel: a #GtkFontSelection.
|
||||
@fontname: a fontname.
|
||||
@Returns: TRUE if the font was found.
|
||||
@Returns: %TRUE if the font was found.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### -->
|
||||
|
@ -87,7 +87,7 @@ Gets the currently-selected font.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
@ -96,7 +96,7 @@ Gets the currently-selected font name.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
@ -106,7 +106,7 @@ Sets the currently-selected font.
|
||||
|
||||
@fsd: a #GtkFontSelectionDialog.
|
||||
@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 ##### -->
|
||||
|
@ -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.
|
||||
There's a convenience function to do this, gtk_image_new_from_file(),
|
||||
used as follows:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *image;
|
||||
image = gtk_image_new_from_file ("myfile.png");
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
If the file isn't loaded successfully, the image will contain a
|
||||
"broken image" icon similar to that used in many web browsers.
|
||||
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
|
||||
on the image, such as button clicks, place the image inside a
|
||||
#GtkEventBox, then connect to the event signals on the event box.
|
||||
For example, here is some code that handles button press events
|
||||
on a #GtkImage:
|
||||
<example>
|
||||
<title>Handling button press events on a
|
||||
<structname>GtkImage</structname>.</title>
|
||||
<programlisting>
|
||||
static void
|
||||
button_press_callback (GtkWidget *event_box,
|
||||
@ -63,7 +64,7 @@ on a #GtkImage:
|
||||
|
||||
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);
|
||||
|
||||
@ -75,6 +76,7 @@ on a #GtkImage:
|
||||
return image;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
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 ##### -->
|
||||
<para>
|
||||
Creates the new GtkImage using the value and the mask.
|
||||
Creates the new #GtkImage using the value and the mask.
|
||||
</para>
|
||||
|
||||
@Returns: the GtkImage
|
||||
@Returns: the #GtkImage
|
||||
<!-- # Unused Parameters # -->
|
||||
@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 ##### -->
|
||||
<para>
|
||||
Sets the GtkImage
|
||||
Sets the #GtkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GdkPixmap
|
||||
@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 ##### -->
|
||||
<para>
|
||||
Gets the GtkImage
|
||||
Gets the #GtkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GdkPixmap
|
||||
@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 ##### -->
|
||||
|
@ -45,13 +45,13 @@ to the main loop and await more user input.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Typical <function>main</function> function for a GTK application</title>
|
||||
<title>Typical <function>main</function> function for a GTK+ application</title>
|
||||
<programlisting>
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
/* Initialize i18n support */
|
||||
gtk_set_locale (∅);
|
||||
gtk_set_locale (<!>);
|
||||
|
||||
/* Initialize the widget set */
|
||||
gtk_init (&argc, &argv);
|
||||
@ -66,7 +66,7 @@ main (int argc, char **argv)
|
||||
gtk_widget_show_all (mainwin);
|
||||
|
||||
/* Enter the main event loop, and wait for user interaction */
|
||||
gtk_main (∅);
|
||||
gtk_main (<!>);
|
||||
|
||||
/* The user lost interest */
|
||||
return 0;
|
||||
@ -111,7 +111,7 @@ functions such as g_signal_connect().
|
||||
|
||||
<!-- ##### FUNCTION gtk_init ##### -->
|
||||
<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
|
||||
parses some standard command line options. <parameter>argc</parameter> and
|
||||
<parameter>argv</parameter> are adjusted accordingly so your own code will
|
||||
@ -122,8 +122,7 @@ never see those standard arguments.
|
||||
<para>
|
||||
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
|
||||
textual interface you want to call <function>gtk_init_check</function>
|
||||
instead.
|
||||
textual interface you want to call gtk_init_check() instead.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@ -158,7 +157,7 @@ with the user - for example a curses or command line interface.
|
||||
<para>
|
||||
Terminates the program and returns the given exit code to the caller.
|
||||
This function will shut down the GUI and free all resources allocated
|
||||
for GTK.
|
||||
for GTK+.
|
||||
</para>
|
||||
|
||||
@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>
|
||||
|
||||
<example>
|
||||
<title>Updating the GUI during a long computation</title>
|
||||
<title>Updating the GUI during a long computation.</title>
|
||||
<programlisting>
|
||||
/* computation going on */
|
||||
...
|
||||
while (gtk_events_pending (∅))
|
||||
gtk_main_iteration (∅);
|
||||
while (gtk_events_pending (<!>))
|
||||
gtk_main_iteration (<!>);
|
||||
...
|
||||
/* computation continued */
|
||||
</programlisting>
|
||||
@ -341,7 +340,7 @@ main (int argc, char **argv)
|
||||
gtk_container_add (GTK_CONTAINER (win), but);
|
||||
|
||||
gtk_widget_show_all (win);
|
||||
gtk_main (∅);
|
||||
gtk_main (<!>);
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
|
@ -32,8 +32,8 @@ can pop up a menu when the 3rd mouse button is pressed.
|
||||
<title>Connecting the popup signal handler.</title>
|
||||
<programlisting>
|
||||
/* connect our handler which will popup the menu */
|
||||
gtk_signal_connect_object(GTK_OBJECT(window), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT(menu));
|
||||
gtk_signal_connect_object (GTK_OBJECT (window), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (my_popup_handler), GTK_OBJECT (menu));
|
||||
</programlisting>
|
||||
</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>
|
||||
<programlisting>
|
||||
static gint
|
||||
my_popup_handler(GtkWidget *widget, GdkEvent *event)
|
||||
my_popup_handler (GtkWidget *widget, GdkEvent *event)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GdkEventButton *event_button;
|
||||
@ -78,7 +78,7 @@ my_popup_handler(GtkWidget *widget, GdkEvent *event)
|
||||
|
||||
<!-- ##### STRUCT GtkMenu ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -145,7 +145,7 @@ Moves a #GtkMenuItem to a new position within the #GtkMenu.
|
||||
<para>
|
||||
Displays a menu and makes it available for selection. Applications can use
|
||||
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
|
||||
at the current pointer position.
|
||||
</para>
|
||||
@ -265,7 +265,7 @@ or reattached.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
|
@ -15,11 +15,11 @@ from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
|
||||
|
||||
<para>
|
||||
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()
|
||||
returns when any dialog button is clicked.
|
||||
<example>
|
||||
<title>Modal #GtkMessageDialog</title>
|
||||
<title>A modal dialog.</title>
|
||||
<programlisting>
|
||||
dialog = gtk_message_dialog_new (main_application_window,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
@ -36,7 +36,7 @@ returns when any dialog button is clicked.
|
||||
<para>
|
||||
You might do a non-modal #GtkMessageDialog as follows:
|
||||
<example>
|
||||
<title>Non-modal #GtkMessageDialog</title>
|
||||
<title>A non-modal dialog.</title>
|
||||
<programlisting>
|
||||
dialog = gtk_message_dialog_new (main_application_window,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
@ -77,7 +77,7 @@ The type of message being displayed in the dialog.
|
||||
<!-- ##### ENUM GtkButtonsType ##### -->
|
||||
<para>
|
||||
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().
|
||||
</para>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
GtkObject
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
The base class of the Gtk type hierarchy.
|
||||
The base class of the GTK+ type hierarchy.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<refsect2>
|
||||
@ -28,22 +28,22 @@ sunk (has no floating reference).
|
||||
<para>
|
||||
When you add a widget to its parent container, the parent container
|
||||
will do this:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
g_object_ref (G_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
|
||||
it called g_object_ref()), and the child widget has no floating reference.
|
||||
</para>
|
||||
<para>
|
||||
The purpose of the floating reference is to keep the child widget alive
|
||||
until you add it to a parent container:
|
||||
<programlisting>
|
||||
button = gtk_button_new ();
|
||||
<informalexample><programlisting>
|
||||
button = gtk_button_new (<!>);
|
||||
/* button has one floating reference to keep it alive */
|
||||
gtk_container_add (GTK_CONTAINER (container), button);
|
||||
/* button has one non-floating reference owned by the container */
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
#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>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
void set_box_properties(GtkBox* box)
|
||||
void set_box_properties (GtkBox* box)
|
||||
{
|
||||
gtk_object_set(GTK_OBJECT(box), "homogeneous", TRUE,
|
||||
"spacing", 8,
|
||||
NULL);
|
||||
gtk_object_set (GTK_OBJECT (box), "homogeneous", TRUE,
|
||||
"spacing", 8,
|
||||
NULL);
|
||||
}
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
@ -389,7 +389,7 @@ pointer. This function sets it.
|
||||
This function is equivalent to:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gtk_object_set_data(object, "user_data", data);
|
||||
gtk_object_set_data (object, "user_data", data);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
@ -6,7 +6,7 @@ Base class for widgets with two adjustable panes
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<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
|
||||
vertically (#GtkVPaned). Child widgets are
|
||||
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
|
||||
draw any relief around the children or around
|
||||
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
|
||||
shadow type set to %GTK_SHADOW_IN so that the
|
||||
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
|
||||
is true, then when that child can be made smaller
|
||||
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
|
||||
this is treated as if @resize is true for both
|
||||
children.
|
||||
@ -45,11 +45,11 @@ gtk_paned_set_position().
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title> Creating a paned widget with minimum sizes </title>
|
||||
<title>Creating a paned widget with minimum sizes.</title>
|
||||
<programlisting>
|
||||
GtkWidget *hpaned = gtk_hpaned_new();
|
||||
GtkWidget *frame1 = gtk_frame_new(NULL);
|
||||
GtkWidget *frame2 = gtk_frame_new(NULL);
|
||||
GtkWidget *hpaned = gtk_hpaned_new (<!>);
|
||||
GtkWidget *frame1 = 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 (frame2), GTK_SHADOW_IN);
|
||||
|
||||
@ -75,12 +75,9 @@ gtk_widget_set_usize (frame1, 50, -1);
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_add1 ##### -->
|
||||
<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
|
||||
to
|
||||
<programlisting>
|
||||
gtk_paned_pack1(paned, child, FALSE, TRUE);
|
||||
</programlisting>
|
||||
to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
|
||||
</para>
|
||||
|
||||
@paned: a paned widget
|
||||
@ -89,11 +86,9 @@ gtk_paned_pack1(paned, child, FALSE, TRUE);
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_add2 ##### -->
|
||||
<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
|
||||
<programlisting>
|
||||
gtk_paned_pack2(paned, child, TRUE, TRUE);
|
||||
</programlisting>
|
||||
<literal>gtk_paned_pack2(paned, child, TRUE, TRUE)</literal>.
|
||||
</para>
|
||||
|
||||
@paned: a paned widget
|
||||
@ -102,14 +97,14 @@ gtk_paned_pack2(paned, child, TRUE, TRUE);
|
||||
|
||||
<!-- ##### MACRO gtk_paned_handle_size ##### -->
|
||||
<para>
|
||||
Old name for gtk_paned_set_handle_size()
|
||||
Old name for gtk_paned_set_handle_size().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO gtk_paned_gutter_size ##### -->
|
||||
<para>
|
||||
Old name for gtk_paned_set_gutter_size()
|
||||
Old name for gtk_paned_set_gutter_size().
|
||||
</para>
|
||||
|
||||
@p:
|
||||
@ -118,7 +113,7 @@ Old name for gtk_paned_set_gutter_size()
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_pack1 ##### -->
|
||||
<para>
|
||||
Add a child to the top or left pane.
|
||||
Adds a child to the top or left pane.
|
||||
</para>
|
||||
|
||||
@paned: a paned widget
|
||||
@ -129,7 +124,7 @@ Add a child to the top or left pane.
|
||||
|
||||
<!-- ##### FUNCTION gtk_paned_pack2 ##### -->
|
||||
<para>
|
||||
Add a child to the bottom or right pane.
|
||||
Adds a child to the bottom or right pane.
|
||||
</para>
|
||||
|
||||
@paned: a paned widget
|
||||
@ -140,7 +135,7 @@ Add a child to the bottom or right pane.
|
||||
|
||||
<!-- ##### MACRO gtk_paned_set_gutter_size ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
|
@ -69,7 +69,7 @@ Gets the current #GdkPixmap and #GdkBitmap mask.
|
||||
</para>
|
||||
|
||||
@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.
|
||||
|
||||
|
||||
|
@ -128,7 +128,7 @@ complete.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
|
@ -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>
|
||||
<programlisting>
|
||||
|
||||
void create_radio_buttons(void) {
|
||||
void create_radio_buttons (void) {
|
||||
|
||||
GtkWidget *window, *radio1, *radio2, *box, *entry;
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
box = gtk_vbox_new(TRUE, 2);
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
box = gtk_vbox_new (TRUE, 2);
|
||||
|
||||
/* Create a radio button with a #GtkEntry widget */
|
||||
radio1 = gtk_radio_button_new(NULL);
|
||||
entry = gtk_entry_new();
|
||||
gtk_container_add(GTK_CONTAINER(radio1), entry);
|
||||
/* Create a radio button with a GtkEntry widget */
|
||||
radio1 = gtk_radio_button_new (NULL);
|
||||
entry = gtk_entry_new (<!>);
|
||||
gtk_container_add (GTK_CONTAINER (radio1), entry);
|
||||
|
||||
|
||||
/* 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.");
|
||||
|
||||
/* 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), radio2, TRUE, TRUE, 2);
|
||||
gtk_container_add(GTK_CONTAINER(window), box);
|
||||
gtk_box_pack_start (GTK_BOX (box), radio2, TRUE, TRUE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show_all (window);
|
||||
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.
|
||||
</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.
|
||||
|
||||
|
||||
@ -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.
|
||||
</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.
|
||||
@label: the text label to display next to the radio button.
|
||||
@Returns: a new radio button.
|
||||
|
@ -48,9 +48,9 @@ attaches them to particular widgets. The attachment is done
|
||||
by the <literal>widget</literal>, <literal>widget_class</literal>,
|
||||
and <literal>class</literal> declarations. As an example
|
||||
of such a statement:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
widget "mywindow.*.GtkEntry" style "my-entry-class"
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
attaches the style <literal>"my-entry-class"</literal>
|
||||
to all widgets whose <firstterm>widget class</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
|
||||
matching are against the widget path, the
|
||||
<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
|
||||
parents of the widget and the widget itself from
|
||||
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
|
||||
<literal>"myentry"</literal>, inside of a of a window
|
||||
named <literal>"mywindow"</literal>, then the
|
||||
widget path is:
|
||||
<programlisting>
|
||||
"mwindow.GtkHBox.myentry"
|
||||
</programlisting>
|
||||
while the class path is:
|
||||
<programlisting>
|
||||
"GtkWindow.GtkHBox.GtkEntry"
|
||||
</programlisting>
|
||||
widget path is: <literal>"mwindow.GtkHBox.myentry"</literal>
|
||||
while the class path is: <literal>"GtkWindow.GtkHBox.GtkEntry"</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Matching against class is a little different. The pattern
|
||||
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:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
class "GtkButton" style "my-style"
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
will match not just <classname>GtkButton</classname> widgets,
|
||||
but also <classname>GtkToggleButton</classname> and
|
||||
<classname>GtkCheckButton</classname> widgets, since
|
||||
@ -125,7 +119,7 @@ The possible toplevel declarations are:
|
||||
<replaceable>name</replaceable></literal></term>
|
||||
<listitem>
|
||||
<para>Specify a style or binding set for a particular
|
||||
branch of the inheritance heirarchy.</para>
|
||||
branch of the inheritance hierarchy.</para>
|
||||
</listitem>
|
||||
</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
|
||||
<literal>*</literal>. So for example, the following specifies different icons to
|
||||
use for left-to-right and right-to-left languages:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemltr.png", LTR, *, * },
|
||||
{ "itemrtl.png", RTL, *, * }
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
This could be abbreviated as follows:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemltr.png", LTR },
|
||||
{ "itemrtl.png", RTL }
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can specify custom icons for specific sizes, as follows:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemmenusize.png", *, *, "gtk-menu" },
|
||||
{ "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
|
||||
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,
|
||||
<literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,
|
||||
<literal>"gtk-button"</literal>, <literal>"gtk-dialog"</literal>. Applications
|
||||
@ -390,14 +384,14 @@ can define other sizes.
|
||||
|
||||
<para>
|
||||
It's also possible to use custom icons for a given state, for example:
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
stock["my-stock-item"] =
|
||||
{
|
||||
{ "itemprelight.png", *, PRELIGHT },
|
||||
{ "iteminsensitive.png", *, INSENSITIVE },
|
||||
{ "itemgeneric.png" } /* implicit *, *, * as a fallback */
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -418,7 +412,7 @@ taken on particular key presses. The form of a binding
|
||||
set declaration is:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
binding <replaceable>name</replaceable> {
|
||||
bind <replaceable>key</replaceable> {
|
||||
<replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
|
||||
@ -426,7 +420,7 @@ binding <replaceable>name</replaceable> {
|
||||
}
|
||||
...
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>
|
||||
<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 ##### -->
|
||||
<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:
|
||||
<programlisting>
|
||||
<literal>
|
||||
widget PATTERN style STYLE
|
||||
</programlisting>
|
||||
</literal>
|
||||
statement in a RC file.
|
||||
</para>
|
||||
|
||||
@ -648,12 +642,11 @@ statement in a RC file.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_add_widget_class_style ##### -->
|
||||
<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:
|
||||
|
||||
<programlisting>
|
||||
<literal>
|
||||
widget_class PATTERN style STYLE
|
||||
</programlisting>
|
||||
</literal>
|
||||
statement in a RC file.
|
||||
</para>
|
||||
|
||||
@ -663,11 +656,11 @@ statement in a RC file.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_add_class_style ##### -->
|
||||
<para>
|
||||
Add a RcStyle that will be looked up by a matching against
|
||||
the class heirarchy of the widget. This is equivalent to a:
|
||||
<programlisting>
|
||||
Adds a RcStyle that will be looked up by a matching against
|
||||
the class hierarchy of the widget. This is equivalent to a:
|
||||
<literal>
|
||||
class PATTERN style STYLE
|
||||
</programlisting>
|
||||
</literal>
|
||||
statement in a RC file.
|
||||
</para>
|
||||
|
||||
@ -677,7 +670,7 @@ statement in a RC file.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_parse ##### -->
|
||||
<para>
|
||||
Parse a given resource file.
|
||||
Parses a given resource file.
|
||||
</para>
|
||||
|
||||
@filename: the filename of a file to parse.
|
||||
@ -685,7 +678,7 @@ Parse a given resource file.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_parse_string ##### -->
|
||||
<para>
|
||||
Parse resource information directly from a string.
|
||||
Parses resource information directly from a string.
|
||||
</para>
|
||||
|
||||
@rc_string: a string to parse.
|
||||
@ -825,11 +818,11 @@ itself.)
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_style_new ##### -->
|
||||
<para>
|
||||
Create a new #GtkRcStyle with no fields set and
|
||||
Creates a new #GtkRcStyle with no fields set and
|
||||
a reference count of 1.
|
||||
</para>
|
||||
|
||||
@Returns: the newly create #GtkRcStyle
|
||||
@Returns: the newly-created #GtkRcStyle
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_style_copy ##### -->
|
||||
@ -843,7 +836,7 @@ a reference count of 1.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_style_ref ##### -->
|
||||
<para>
|
||||
Increment the reference count of a #GtkRcStyle.
|
||||
Increments the reference count of a #GtkRcStyle.
|
||||
</para>
|
||||
|
||||
@rc_style: a #GtkRcStyle
|
||||
@ -851,8 +844,8 @@ Increment the reference count of a #GtkRcStyle.
|
||||
|
||||
<!-- ##### FUNCTION gtk_rc_style_unref ##### -->
|
||||
<para>
|
||||
Decrement the reference count of a #GtkRcStyle and
|
||||
free if the result is 0.
|
||||
Decrements the reference count of a #GtkRcStyle and
|
||||
frees if the result is 0.
|
||||
</para>
|
||||
|
||||
@rc_style: a #GtkRcStyle
|
||||
|
@ -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.
|
||||
Here's an example signal handler which displays a value 1.0 as
|
||||
with "-->1.0<--".
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
static gchar*
|
||||
format_value_callback (GtkScale *scale,
|
||||
gdouble value)
|
||||
@ -123,7 +123,7 @@ format_value_callback (GtkScale *scale,
|
||||
return g_strdup_printf ("-->%0.*g<--",
|
||||
gtk_scale_get_digits (scale), value);
|
||||
}
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
@scale: the object which received the signal.
|
||||
|
@ -82,7 +82,7 @@ selection handling code.
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_new ##### -->
|
||||
<para>
|
||||
Create a new #GtkTargetList from an array of #GtkTargetEntry.
|
||||
Creates a new #GtkTargetList from an array of #GtkTargetEntry.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
<para>
|
||||
Increase the reference count of a #GtkTargetList by one.
|
||||
Increases the reference count of a #GtkTargetList by one.
|
||||
</para>
|
||||
|
||||
@list: a #GtkTargetList
|
||||
@ -100,7 +100,7 @@ Increase the reference count of a #GtkTargetList by one.
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_unref ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -109,7 +109,7 @@ If the resulting reference count is zero, free the list.
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add ##### -->
|
||||
<para>
|
||||
Add another target to a #GtkTargetList
|
||||
Adds another target to a #GtkTargetList.
|
||||
</para>
|
||||
|
||||
@list: a #GtkTargetList
|
||||
@ -120,7 +120,7 @@ Add another target to a #GtkTargetList
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_table ##### -->
|
||||
<para>
|
||||
Add a table of #GtkTargetEntry into a target list
|
||||
Adds a table of #GtkTargetEntry into a target list.
|
||||
</para>
|
||||
|
||||
@list: a #GtkTargetList
|
||||
@ -130,7 +130,7 @@ Add a table of #GtkTargetEntry into a target list
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_remove ##### -->
|
||||
<para>
|
||||
Remove a target from a target list
|
||||
Removes a target from a target list.
|
||||
</para>
|
||||
|
||||
@list: a #GtkTargetList
|
||||
@ -139,7 +139,7 @@ Remove a target from a target list
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_find ##### -->
|
||||
<para>
|
||||
Look up a given target in a #GtkTargetList
|
||||
Looks up a given target in a #GtkTargetList.
|
||||
</para>
|
||||
|
||||
@list: a #GtkTargetList
|
||||
@ -150,7 +150,7 @@ Look up a given target in a #GtkTargetList
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_owner_set ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -162,7 +162,7 @@ or, if @widget is %NULL, release ownership of the selection.
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_add_target ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -174,7 +174,7 @@ given widget and selection.
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_add_targets ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -195,7 +195,7 @@ for a given widget and selection.
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_convert ##### -->
|
||||
<para>
|
||||
Request the contents of a selection. When received,
|
||||
Requests the contents of a selection. When received,
|
||||
a "selection_received" signal will be generated.
|
||||
</para>
|
||||
|
||||
@ -203,17 +203,17 @@ a "selection_received" signal will be generated.
|
||||
@selection: Which selection to get
|
||||
@target: Form of information desired (e.g., STRING)
|
||||
@time: Time of request (usually of triggering event)
|
||||
In emergency, you could use GDK_CURRENT_TIME
|
||||
@Returns: TRUE if requested succeeded. FALSE if we could not process
|
||||
In emergency, you could use #GDK_CURRENT_TIME
|
||||
@Returns: %TRUE if requested succeeded. %FALSE if we could not process
|
||||
request. (e.g., there was already a request in process for
|
||||
this widget).
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_set ##### -->
|
||||
<para>
|
||||
Store new data into a GtkSelectionData object. Should
|
||||
_only_ by called from a selection handler callback.
|
||||
Null terminates the stored data.
|
||||
Stores new data into a GtkSelectionData object. Should
|
||||
<emphasis>only</emphasis> by called from a selection handler callback.
|
||||
zero-terminates the stored data.
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@ -276,7 +276,7 @@ called by applications.
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_copy ##### -->
|
||||
<para>
|
||||
Make a copy of a #GtkSelection data structure and its
|
||||
Makes a copy of a #GtkSelection data structure and its
|
||||
data.
|
||||
</para>
|
||||
|
||||
@ -286,7 +286,7 @@ data.
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_free ##### -->
|
||||
<para>
|
||||
Free a #GtkSelectionData structure returned from
|
||||
Frees a #GtkSelectionData structure returned from
|
||||
gtk_selection_data_copy().
|
||||
</para>
|
||||
|
||||
|
@ -31,7 +31,7 @@ from being run.)
|
||||
</para>
|
||||
<para>
|
||||
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
|
||||
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()
|
||||
@ -64,7 +64,7 @@ Functions that want to notify the user of certain actions,
|
||||
<listitem><para>A class method, e.g. GtkButton::clicked.
|
||||
More precisely it is a unique class-branch/signal-name pair.
|
||||
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
|
||||
the class tree.
|
||||
</para></listitem>
|
||||
@ -234,12 +234,12 @@ to the signal.
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_new ##### -->
|
||||
<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.)
|
||||
</para>
|
||||
|
||||
@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.
|
||||
You should at least specify #GTK_RUN_FIRST
|
||||
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:
|
||||
for example, gtk_marshal_BOOL__STRING() describes a marshaller
|
||||
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.
|
||||
@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.
|
||||
<!-- # Unused Parameters # -->
|
||||
@nparams: the number of parameter the handlers may take.
|
||||
@ -264,7 +264,7 @@ without a return value.
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_newv ##### -->
|
||||
<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.)
|
||||
</para>
|
||||
<para>
|
||||
@ -274,11 +274,11 @@ following the arguments. Otherwise the same as gtk_signal_new().
|
||||
|
||||
@name: the name of the signal to create.
|
||||
@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
|
||||
the class structure for this type.
|
||||
@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.
|
||||
@n_args:
|
||||
@args:
|
||||
@ -306,19 +306,19 @@ It also tries the ancestors of the given type.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_name ##### -->
|
||||
<para>
|
||||
Given the signal's identifier, find its name.
|
||||
Given the signal's identifier, finds its name.
|
||||
</para>
|
||||
<para>
|
||||
Two different signals may have the same name, if they have differing types.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
<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.
|
||||
</para>
|
||||
<para>
|
||||
@ -327,7 +327,7 @@ Here is what gtk_signal_emit() does:
|
||||
<para>
|
||||
1. Calls the default handler and the user-connected handlers.
|
||||
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>
|
||||
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 ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -353,7 +353,7 @@ by a pointer to the return type, if any.
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_emitv ##### -->
|
||||
<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
|
||||
an array of GtkArgs instead of using C's varargs mechanism.
|
||||
</para>
|
||||
@ -368,7 +368,7 @@ followed by one which is a pointer to the return type.
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_emitv_by_name ##### -->
|
||||
<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
|
||||
an array of GtkArgs instead of using C's varargs mechanism.
|
||||
</para>
|
||||
@ -417,13 +417,13 @@ except it will lookup the signal id for you.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_connect ##### -->
|
||||
<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.
|
||||
</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
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
@ -438,18 +438,18 @@ as parameter to your function:
|
||||
</para>
|
||||
<informalexample>
|
||||
<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
|
||||
* 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_FUNC(button_clicked_int),
|
||||
GINT_TO_POINTER(to_print));
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (button_clicked_int),
|
||||
GINT_TO_POINTER (to_print));
|
||||
}
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
@ -469,7 +469,7 @@ is getting pressed, this is that button.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_connect_after ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -502,7 +502,7 @@ some widget, you could write:
|
||||
</para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gtk_signal_connect_object(button, "clicked", gtk_widget_show, window);
|
||||
gtk_signal_connect_object (button, "clicked", gtk_widget_show, window);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
@ -522,7 +522,7 @@ really pass any gpointer as the #slot_object .)
|
||||
|
||||
<!-- ##### MACRO gtk_signal_connect_object_after ##### -->
|
||||
<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
|
||||
that the default handler and all normal
|
||||
handlers are called first.
|
||||
@ -542,7 +542,7 @@ handlers are called first.
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_connect_full ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
@ -575,7 +575,7 @@ c++ or other languages' calling conventions.)
|
||||
|
||||
<!-- ##### FUNCTION gtk_signal_connect_while_alive ##### -->
|
||||
<para>
|
||||
Attach a function pointer and another GtkObject to a signal.
|
||||
Attaches a function pointer and another #GtkObject to a signal.
|
||||
</para>
|
||||
<para>
|
||||
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
|
||||
to explicitly delete all attachments to this object. This
|
||||
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>
|
||||
|
||||
@object: the object that emits the signal.
|
||||
@ -628,7 +628,7 @@ should signal the removal of this signal.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_disconnect ##### -->
|
||||
<para>
|
||||
Destroy a user-defined handler connection.
|
||||
Destroys a user-defined handler connection.
|
||||
</para>
|
||||
|
||||
@object: the object which the handler pertains to.
|
||||
@ -637,7 +637,7 @@ Destroy a user-defined handler connection.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_disconnect_by_func ##### -->
|
||||
<para>
|
||||
Destroy all connections for a particular object, with
|
||||
Destroys all connections for a particular object, with
|
||||
the given function-pointer and user-data.
|
||||
</para>
|
||||
|
||||
@ -652,7 +652,7 @@ the given function-pointer and user-data.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_disconnect_by_data ##### -->
|
||||
<para>
|
||||
Destroy all connections for a particular object, with
|
||||
Destroys all connections for a particular object, with
|
||||
the given user-data.
|
||||
</para>
|
||||
|
||||
@ -665,7 +665,7 @@ the given user-data.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_handler_block ##### -->
|
||||
<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
|
||||
handler will ignore it.
|
||||
</para>
|
||||
@ -676,7 +676,7 @@ handler will ignore it.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_handler_block_by_func ##### -->
|
||||
<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
|
||||
multiple hooks being blocked, if you've called connect multiple times.)
|
||||
</para>
|
||||
@ -692,7 +692,7 @@ multiple hooks being blocked, if you've called connect multiple times.)
|
||||
|
||||
<!-- ##### MACRO gtk_signal_handler_block_by_data ##### -->
|
||||
<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>
|
||||
|
||||
@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 ##### -->
|
||||
<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
|
||||
hook twice, you must unblock it twice.
|
||||
</para>
|
||||
@ -716,7 +716,7 @@ gtk_signal_connect(), etc.
|
||||
|
||||
<!-- ##### MACRO gtk_signal_handler_unblock_by_func ##### -->
|
||||
<para>
|
||||
Undo a block, by function pointer and data.
|
||||
Undoes a block, by function pointer and data.
|
||||
Note that undoing a block doesn't
|
||||
necessarily make the hook callable, because if you block a
|
||||
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 ##### -->
|
||||
<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
|
||||
</para>
|
||||
|
||||
|
@ -24,11 +24,11 @@ the socket must have been realized, and for hence,
|
||||
have been added to its parent.
|
||||
|
||||
<example>
|
||||
<title> Obtaining the XID of a socket </title>
|
||||
<title>Obtaining the XID of a socket.</title>
|
||||
<programlisting>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
GtkWidget *socket = gtk_socket_new();
|
||||
GtkWidget *socket = gtk_socket_new (<!>);
|
||||
gtk_widget_show (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
|
||||
has been created by examining 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
|
||||
of the socket.
|
||||
</para>
|
||||
|
@ -6,14 +6,19 @@ retrieve an integer or floating-point number from the user.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<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>
|
||||
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>
|
||||
<example>
|
||||
<title>Using a GtkSpinButton to get an integer.</title>
|
||||
<title>Using a <structname>GtkSpinButton</structname> to get an integer.</title>
|
||||
<programlisting>
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
void create_integer_spin_button(void) {
|
||||
void create_integer_spin_button (void) {
|
||||
|
||||
GtkWidget *window, *spinner;
|
||||
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);
|
||||
|
||||
/* creates the spinner, with no decimal places */
|
||||
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);
|
||||
return;
|
||||
@ -48,7 +53,7 @@ void create_integer_spin_button(void) {
|
||||
|
||||
<para>
|
||||
<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>
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
void create_floating_spin_button(void) {
|
||||
void create_floating_spin_button (void) {
|
||||
|
||||
GtkWidget *window, *spinner;
|
||||
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);
|
||||
|
||||
/* creates the spinner, with three decimal places */
|
||||
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);
|
||||
return;
|
||||
@ -93,7 +98,9 @@ void create_floating_spin_button(void) {
|
||||
|
||||
<!-- ##### STRUCT GtkSpinButton ##### -->
|
||||
<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>
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ Pack widgets in regular patterns.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<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,
|
||||
horizontally and vertically.
|
||||
</para>
|
||||
@ -46,7 +46,7 @@ table will resize themselves to the size of the largest widget in the table.
|
||||
|
||||
<!-- ##### STRUCT GtkTable ##### -->
|
||||
<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.
|
||||
</para>
|
||||
@ -108,7 +108,7 @@ must both be in the range 0 .. 65535.
|
||||
|
||||
@rows: The number of rows 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.
|
||||
@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 ##### -->
|
||||
<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>
|
||||
|
||||
@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 ##### -->
|
||||
<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>
|
||||
|
||||
@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 ##### -->
|
||||
<para>
|
||||
sets the space between every row in @table equal to @spacing.
|
||||
Sets the space between every row in @table equal to @spacing.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable.
|
||||
@ -187,7 +187,7 @@ sets the space between every row in @table equal to @spacing.
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_col_spacings ##### -->
|
||||
<para>
|
||||
sets the space between every column in @table equal to @spacing.
|
||||
Sets the space between every column in @table equal to @spacing.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable.
|
||||
@ -196,12 +196,12 @@ sets the space between every column in @table equal to @spacing.
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_homogeneous ##### -->
|
||||
<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>
|
||||
|
||||
@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
|
||||
to FALSE if this is not your desired behaviour.
|
||||
@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
|
||||
to %FALSE if this is not your desired behaviour.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_default_row_spacing ##### -->
|
||||
@ -253,26 +253,26 @@ to FALSE if this is not your desired behaviour.
|
||||
|
||||
<!-- ##### ARG GtkTable:n-rows ##### -->
|
||||
<para>
|
||||
set or retrieve the number of rows in a table.
|
||||
Sets or retrieves the number of rows in a table.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:n-columns ##### -->
|
||||
<para>
|
||||
set or retrieve the number of columnsin a table.
|
||||
Sets or retrieves the number of columns in a table.
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:column-spacing ##### -->
|
||||
<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>
|
||||
|
||||
<!-- ##### ARG GtkTable:row-spacing ##### -->
|
||||
<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>
|
||||
|
||||
<!-- ##### ARG GtkTable:homogeneous ##### -->
|
||||
<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>
|
||||
|
||||
|
@ -131,11 +131,11 @@ Emitted when a widget is selected during a query.
|
||||
@tip_text: the widget's tooltip.
|
||||
@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()).
|
||||
@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 ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
|
@ -25,28 +25,28 @@ gtk_toggle_button_get_active().
|
||||
To simply switch the state of a toggle button, use gtk_toggle_button_toggled.
|
||||
</para>
|
||||
<example>
|
||||
<title>Creating two #GtkToggleButton widgets.</title>
|
||||
<title>Creating two <structname>GtkToggleButton</structname> widgets.</title>
|
||||
<programlisting>
|
||||
|
||||
void make_toggles(void) {
|
||||
void make_toggles (void) {
|
||||
GtkWidget *dialog, *toggle1, *toggle2;
|
||||
|
||||
dialog = gtk_dialog_new();
|
||||
toggle1 = gtk_toggle_button_new_with_label("Hi, i'm a toggle button.");
|
||||
dialog = gtk_dialog_new (<!>);
|
||||
toggle1 = gtk_toggle_button_new_with_label ("Hi, i'm a toggle button.");
|
||||
|
||||
/* Makes this toggle button invisible */
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (toggle1), TRUE);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (toggle1), "toggled",
|
||||
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);
|
||||
|
||||
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_signal_connect (GTK_OBJECT (toggle2), "toggled",
|
||||
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);
|
||||
|
||||
gtk_widget_show_all (dialog);
|
||||
@ -107,11 +107,11 @@ Creates a new toggle button with a text label.
|
||||
|
||||
<!-- ##### FUNCTION gtk_toggle_button_set_mode ##### -->
|
||||
<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>
|
||||
|
||||
@toggle_button: a #GtkToggleButton.
|
||||
@draw_indicator: TRUE or FALSE.
|
||||
@draw_indicator: %TRUE or %FALSE.
|
||||
|
||||
|
||||
<!-- ##### 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 ##### -->
|
||||
<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>
|
||||
|
||||
|
||||
@ -142,8 +142,8 @@ application ever to call this function.
|
||||
|
||||
<!-- ##### FUNCTION gtk_toggle_button_get_active ##### -->
|
||||
<para>
|
||||
Queries a #GtkToggleButton and returns it's current state. Returns TRUE if
|
||||
the toggle button is pressed in and FALSE if it is raised.
|
||||
Queries a #GtkToggleButton and returns it's current state. Returns %TRUE if
|
||||
the toggle button is pressed in and %FALSE if it is raised.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
<para>
|
||||
Sets the status of the toggle button. Set to TRUE if you want the
|
||||
GtkToggleButton to be 'pressed in', and FALSE to raise it.
|
||||
Sets the status of the toggle button. Set to %TRUE if you want the
|
||||
GtkToggleButton to be 'pressed in', and %FALSE to raise it.
|
||||
This action causes the toggled signal to be emitted.
|
||||
</para>
|
||||
|
||||
@toggle_button: a #GtkToggleButton.
|
||||
@is_active: TRUE or FALSE.
|
||||
@is_active: %TRUE or %FALSE.
|
||||
|
||||
|
||||
<!-- ##### 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 ##### -->
|
||||
<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.
|
||||
</para>
|
||||
|
||||
|
@ -20,13 +20,13 @@ To assign a tip to a particular #GtkWidget, gtk_tooltips_set_tip() is used.
|
||||
<note>
|
||||
<para>
|
||||
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
|
||||
widget inside a #GtkEventBox and add a tooltip to that instead.
|
||||
</para>
|
||||
</note>
|
||||
<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>
|
||||
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;
|
||||
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 */
|
||||
hbox = gtk_hbox_new(TRUE, 2);
|
||||
/* Create the buttons and pack them into a GtkHBox */
|
||||
hbox = gtk_hbox_new (TRUE, 2);
|
||||
|
||||
load_button = gtk_button_new_with_label("Load a file");
|
||||
gtk_box_pack_start(GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
|
||||
gtk_widget_show(load_button);
|
||||
load_button = gtk_button_new_with_label ("Load a file");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
|
||||
gtk_widget_show (load_button);
|
||||
|
||||
save_button = gtk_button_new_with_label("Save a file");
|
||||
gtk_box_pack_start(GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
|
||||
gtk_widget_show(save_button);
|
||||
gtk_widget_show(hbox);
|
||||
save_button = gtk_button_new_with_label ("Save a file");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
|
||||
gtk_widget_show (save_button);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* 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",
|
||||
"Requests the filename of a document.
|
||||
This will then be loaded into the current
|
||||
window, replacing the contents of whatever
|
||||
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",
|
||||
"If you have saved the document previously,
|
||||
then the new version will be saved over the
|
||||
@ -149,7 +149,7 @@ Retrieves any #GtkTooltipsData previously associated with the given widget.
|
||||
</para>
|
||||
|
||||
@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 ##### -->
|
||||
|
@ -55,13 +55,13 @@ attempts. There are really only two reasonable ways to call this function:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<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.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<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
|
||||
the current size request of the window's children.
|
||||
</para>
|
||||
@ -74,15 +74,15 @@ be resized by users.
|
||||
<para>
|
||||
The basic ugly truth of this function is that it should be simply:
|
||||
<programlisting>
|
||||
void gtk_window_set_resizable(GtkWidget* window, gboolean setting);
|
||||
void gtk_window_set_resizable (GtkWidget* window, gboolean setting);
|
||||
</programlisting>
|
||||
...which is why GTK+ 2.0 introduces gtk_window_set_resizable(), which you
|
||||
should use instead of gtk_window_set_policy().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
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
|
||||
check that your child widgets work properly as the window is resized.
|
||||
</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
|
||||
@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
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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>
|
||||
Neither of the two suggested window policies set the @allow_shrink paramter to
|
||||
TRUE. If @allow_shrink is TRUE, the user can shrink the window so that its
|
||||
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
|
||||
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
|
||||
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>
|
||||
@ -165,7 +165,7 @@ it's larger
|
||||
|
||||
<!-- ##### MACRO gtk_window_position ##### -->
|
||||
<para>
|
||||
Deperecated alias for gtk_window_set_position().
|
||||
Deprecated alias for gtk_window_set_position().
|
||||
</para>
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
||||
* Makefile.am (INCLUDES): Define G_LOG_DOMAIN. (#66412)
|
||||
|
@ -523,10 +523,10 @@ _gdk_pixbuf_get_module (guchar *buffer, guint size,
|
||||
* @error: Return location for an error
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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,
|
||||
* 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.
|
||||
@ -739,17 +739,16 @@ gdk_pixbuf_real_save (GdkPixbuf *pixbuf,
|
||||
* @Varargs: list of key-value save options
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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
|
||||
* parameters. For example:
|
||||
*
|
||||
* <programlisting>
|
||||
* <informalexample><programlisting>
|
||||
* gdk_pixbuf_save (pixbuf, handle, "jpeg", &error,
|
||||
* "quality", "100", NULL);
|
||||
* </programlisting>
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
* Currently only few parameters exist. JPEG images can be saved with a
|
||||
* "quality" parameter; its value should be in the range [0,100].
|
||||
@ -795,12 +794,12 @@ gdk_pixbuf_save (GdkPixbuf *pixbuf,
|
||||
* @pixbuf: pointer to GdkPixbuf.
|
||||
* @filename: Name of file to save.
|
||||
* @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
|
||||
* @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".
|
||||
* 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.
|
||||
*
|
||||
* Return value: whether an error was set
|
||||
|
@ -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.
|
||||
*
|
||||
* Here's a simple example:
|
||||
* <programlisting>
|
||||
* <informalexample><programlisting>
|
||||
* GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
|
||||
* main_app_window,
|
||||
* GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
@ -394,7 +394,7 @@ gtk_dialog_new_empty (const gchar *title,
|
||||
* GTK_STOCK_CANCEL,
|
||||
* GTK_RESPONSE_REJECT,
|
||||
* NULL);
|
||||
* </programlisting>
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
* Return value: a new #GtkDialog
|
||||
**/
|
||||
@ -618,8 +618,8 @@ gtk_dialog_add_buttons (GtkDialog *dialog,
|
||||
* @response_id: a response ID
|
||||
* @setting: %TRUE for sensitive
|
||||
*
|
||||
* Calls gtk_widget_set_sensitive (widget, @setting) for each
|
||||
* widget in the dialog's action area with the given @response_id.
|
||||
* Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
|
||||
* for each widget in the dialog's action area with the given @response_id.
|
||||
* A convenient way to sensitize/desensitize dialog buttons.
|
||||
**/
|
||||
void
|
||||
@ -850,19 +850,19 @@ run_destroy_handler (GtkDialog *dialog, gpointer data)
|
||||
* destroying the dialog if you wish to do so.
|
||||
*
|
||||
* Typical usage of this function might be:
|
||||
* <programlisting>
|
||||
* <informalexample><programlisting>
|
||||
* gint result = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
* switch (result)
|
||||
* {
|
||||
* case GTK_RESPONSE_ACCEPT:
|
||||
* do_application_specific_something ();
|
||||
* do_application_specific_something (<!>);
|
||||
* break;
|
||||
* default:
|
||||
* do_nothing_since_dialog_was_cancelled ();
|
||||
* do_nothing_since_dialog_was_cancelled (<!>);
|
||||
* break;
|
||||
* }
|
||||
* gtk_widget_destroy (dialog);
|
||||
* </programlisting>
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
* Return value: response ID
|
||||
**/
|
||||
|
26
gtk/gtkrc.c
26
gtk/gtkrc.c
@ -457,10 +457,10 @@ gtk_rc_add_default_file (const gchar *filename)
|
||||
|
||||
/**
|
||||
* 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
|
||||
* end of gtk_init()
|
||||
* end of gtk_init().
|
||||
**/
|
||||
void
|
||||
gtk_rc_set_default_files (gchar **filenames)
|
||||
@ -490,12 +490,11 @@ gtk_rc_set_default_files (gchar **filenames)
|
||||
* gtk_rc_get_default_files:
|
||||
*
|
||||
* 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.
|
||||
* If you want to store this information, you should make a
|
||||
* copy.
|
||||
* If you want to store this information, you should make a copy.
|
||||
**/
|
||||
gchar **
|
||||
gtk_rc_get_default_files (void)
|
||||
@ -1029,7 +1028,7 @@ gtk_rc_style_new (void)
|
||||
* gtk_rc_style_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
|
||||
* derived from #GtkRcStyle.
|
||||
*
|
||||
@ -1272,7 +1271,7 @@ gtk_rc_reset_widgets (GtkRcContext *context)
|
||||
* @force_load: load whether or not anything changed
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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
|
||||
* @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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* The action of gtk_rc_get_style() is similar to:
|
||||
*
|
||||
* <programlisting>
|
||||
* <informalexample><programlisting>
|
||||
* gtk_widget_path (widget, NULL, &path, NULL);
|
||||
* gtk_widget_class_path (widget, NULL, &class_path, NULL);
|
||||
* gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path,
|
||||
* G_OBJECT_TYPE (widget));
|
||||
* </programlisting>
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
* 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,
|
||||
* so you must call g_object_ref() on the returned value if you want to
|
||||
* 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
|
||||
* g_warning() and returns %NULL.
|
||||
*
|
||||
* Return value:
|
||||
* Return value: the filename.
|
||||
**/
|
||||
gchar*
|
||||
gtk_rc_find_pixmap_in_path (GtkSettings *settings,
|
||||
|
@ -1831,7 +1831,7 @@ gtk_widget_unmap (GtkWidget *widget)
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* 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
|
||||
* a widget and all its parent containers, then the widget will be
|
||||
* realized and mapped automatically.
|
||||
@ -1907,7 +1907,7 @@ gtk_widget_realize (GtkWidget *widget)
|
||||
*
|
||||
* This function is only useful in widget implementations.
|
||||
* 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
|
||||
@ -2711,8 +2711,8 @@ gtk_widget_remove_accelerator (GtkWidget *widget,
|
||||
* Lists the closures used by @widget for accelerator group connections
|
||||
* with gtk_accel_group_connect_by_path() or gtk_accel_group_connect().
|
||||
* The closures can be used to monitor accelerator changes on @widget,
|
||||
* by connecting to the ::accel_changed signal of the #GtkAccelGroup
|
||||
* of a closure which can be found out with gtk_accel_group_from_accel_closure().
|
||||
* by connecting to the ::accel_changed signal of the #GtkAccelGroup of a
|
||||
* closure which can be found out with gtk_accel_group_from_accel_closure().
|
||||
*/
|
||||
GList*
|
||||
gtk_widget_list_accel_closures (GtkWidget *widget)
|
||||
@ -3255,7 +3255,7 @@ gtk_widget_intersect (GtkWidget *widget,
|
||||
* gtk_widget_region_intersect:
|
||||
* @widget: a #GtkWidget
|
||||
* @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
|
||||
* of @widget->window for widgets with their own window.
|
||||
* @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,
|
||||
* 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
|
||||
**/
|
||||
@ -4609,7 +4609,7 @@ gtk_widget_child_focus (GtkWidget *widget,
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* 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:
|
||||
* @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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Here is a simple example:
|
||||
* <programlisting>
|
||||
* gtk_widget_push_composite_child ();
|
||||
* <informalexample><programlisting>
|
||||
* gtk_widget_push_composite_child (<!>);
|
||||
* scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
|
||||
* 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 (scrolled_window));
|
||||
* gtk_widget_ref (scrolled_window->hscrollbar);
|
||||
* </programlisting>
|
||||
* </programlisting></informalexample>
|
||||
**/
|
||||
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_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()
|
||||
* for more information.
|
||||
**/
|
||||
|
Loading…
Reference in New Issue
Block a user