Commit 4c8bd8e7 authored by William Jon McCann's avatar William Jon McCann

docs: Identify examples that are C code

https://bugzilla.gnome.org/show_bug.cgi?id=723119
parent 768bc440
......@@ -502,7 +502,7 @@ gdk_init (int *argc, char ***argv)
*
* A minimal main program for a threaded GTK+ application
* looks like:
* |[
* |[<!-- language="C" -->
* int
* main (int argc, char *argv[])
* {
......@@ -532,7 +532,7 @@ gdk_init (int *argc, char ***argv)
*
* Erik Mouw contributed the following code example to
* illustrate how to use threads within GTK+ programs.
* |[
* |[<!-- language="C" -->
* /<!---->*-------------------------------------------------------------------------
* * Filename: gtk-thread.c
* * Version: 0.99.1
......@@ -843,7 +843,7 @@ gdk_threads_dispatch_free (gpointer data)
* running in thread A and accessing @self after it has been finalized
* in thread B:
*
* |[
* |[<!-- language="C" -->
* static gboolean
* idle_callback (gpointer data)
* {
......@@ -949,7 +949,7 @@ gdk_threads_add_idle (GSourceFunc function,
* This variant of g_timeout_add_full() can be thought of a MT-safe version
* for GTK+ widgets for the following use case:
*
* |[
* |[<!-- language="C" -->
* static gboolean timeout_callback (gpointer data)
* {
* SomeWidget *self = data;
......
......@@ -36,7 +36,7 @@
* screen or workspace.
* <example>
* <title>Launching an application</title>
* |[
* |[<!-- language="C" -->
* GdkAppLaunchContext *context;
*
* context = gdk_display_get_app_launch_context (display);
......
......@@ -2115,7 +2115,7 @@ static GQueue gdk_error_traps = G_QUEUE_INIT;
*
* <example>
* <title>Trapping an X error</title>
* |[
* |[<!-- language="C" -->
* gdk_error_trap_push (<!-- -->);
*
* // ... Call the X function which may cause an error here ...
......
......@@ -87,7 +87,7 @@
*
* <example id="backend-specific">
* <title>Backend-specific code</title>
* |[
* |[<!-- language="C" -->
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
......@@ -225,7 +225,7 @@ static const gchar *allowed_backends;
* By default, GDK tries all included backends.
*
* For example,
* |[
* |[<!-- language="C" -->
* gdk_set_allowed_backends ("wayland,quartz,*");
* ]|
* instructs GDK to try the Wayland backend first,
......
......@@ -1676,7 +1676,7 @@ gdk_event_get_source_device (const GdkEvent *event)
* core pointer. Coordinate extraction, processing and requesting more
* motion events from a %GDK_MOTION_NOTIFY event usually works like this:
*
* |[
* |[<!-- language="C" -->
* {
* /&ast; motion_event handler &ast;/
* x = motion_event->x;
......
......@@ -1142,7 +1142,7 @@ struct _GdkEventDND {
* The event type is always the first field in all of the event types, and
* can always be accessed with the following code, no matter what type of
* event it is:
* |[
* |[<!-- language="C" -->
* GdkEvent *event;
* GdkEventType type;
*
......@@ -1153,14 +1153,14 @@ struct _GdkEventDND {
* can be cast to the appropriate event type, or the union member
* name can be used. For example if the event type is %GDK_BUTTON_PRESS
* then the x coordinate of the button press can be accessed with:
* |[
* |[<!-- language="C" -->
* GdkEvent *event;
* gdouble x;
*
* x = ((GdkEventButton*)event)->x;
* ]|
* or:
* |[
* |[<!-- language="C" -->
* GdkEvent *event;
* gdouble x;
*
......
......@@ -503,7 +503,7 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
* <literal>&lt;Control&gt;plus</literal> accelerator &lt;Shift&gt; should
* be masked out.
* </para>
* |[
* |[<!-- language="C" -->
* &sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
* &num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
* gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
......@@ -518,7 +518,7 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
* all modifiers that might affect the translation of the key;
* this allowed accelerators to be stored with irrelevant consumed
* modifiers, by doing:</para>
* |[
* |[<!-- language="C" -->
* &sol;* XXX Don't do this XXX *&sol;
* if (keyval == accel_keyval &&
* (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
......
......@@ -53,7 +53,7 @@
* <title>Draw transformed text with Pango and cairo</title>
* <!-- Note that this example is basically the same as
* demos/gtk-demo/rotated_text.c -->
* |[
* |[<!-- language="C" -->
* #define RADIUS 100
* #define N_WORDS 10
* #define FONT "Sans Bold 18"
......
......@@ -421,7 +421,7 @@ struct _GdkWindowAttr
* Here's an example of how the terminal example would be implemented, assuming
* a terminal area widget called "terminal" and a toplevel window "toplevel":
*
* |[
* |[<!-- language="C" -->
* GdkGeometry hints;
*
* hints.base_width = terminal->char_width;
......
......@@ -49,7 +49,7 @@
* calls by an ifdef as follows. Since GDK may be built with multiple
* backends, you should also check for the backend that is in use (e.g. by
* using the GDK_IS_WAYLAND_DISPLAY() macro).
* |[
* |[<!-- language="C" -->
* #ifdef GDK_WINDOWING_WAYLAND
* if (GDK_IS_WAYLAND_DISPLAY (display))
* {
......
......@@ -2275,7 +2275,7 @@ gdk_wayland_window_get_wl_surface (GdkWindow *window)
* This function should be called before a #GdkWindow is shown. This is
* best done by connecting to the #GtkWidget::realize signal:
*
* |[
* |[<!-- language="C" -->
* static void
* widget_realize_cb (GtkWidget *widget)
* {
......
......@@ -41,7 +41,7 @@
* </para>
* <example>
* <title>A class fragment implementing #GtkActivatable</title>
* |[
* |[<!-- language="C" -->
*
* enum {
* ...
......
......@@ -402,7 +402,7 @@ create_menu_item (GtkAction *action)
* to the group.
*
* A common way to set up a group of radio group is the following:
* |[
* |[<!-- language="C" -->
* GSList *group = NULL;
* GtkRadioAction *action;
*
......@@ -492,7 +492,7 @@ gtk_radio_action_set_group (GtkRadioAction *action,
* and gtk_radio_action_set_group() methods
*
* A common way to set up a group of radio actions is the following:
* |[
* |[<!-- language="C" -->
* GtkRadioAction *action;
* GtkRadioAction *last_action;
*
......
......@@ -607,7 +607,7 @@
* <literal>*</literal>. So for example, the following specifies different icons to
* use for left-to-right and right-to-left languages:
*
* |[
* |[<!-- language="C" -->
* stock["my-stock-item"] =
* {
* { "itemltr.png", LTR, *, * },
......@@ -617,7 +617,7 @@
*
* This could be abbreviated as follows:
*
* |[
* |[<!-- language="C" -->
* stock["my-stock-item"] =
* {
* { "itemltr.png", LTR },
......@@ -627,7 +627,7 @@
*
* You can specify custom icons for specific sizes, as follows:
*
* |[
* |[<!-- language="C" -->
* stock["my-stock-item"] =
* {
* { "itemmenusize.png", *, *, "gtk-menu" },
......@@ -643,7 +643,7 @@
*
* It's also possible to use custom icons for a given state, for example:
*
* |[
* |[<!-- language="C" -->
* stock["my-stock-item"] =
* {
* { "itemprelight.png", *, PRELIGHT },
......@@ -1499,7 +1499,7 @@ gtk_rc_get_style (GtkWidget *widget)
* would be items inside a GNOME canvas widget.
*
* The action of gtk_rc_get_style() is similar to:
* |[
* |[<!-- language="C" -->
* 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),
......
......@@ -483,7 +483,7 @@ static const GtkStockItem builtin_items [] =
* the correct domain when calling dgettext(). This can be useful, e.g.
* when dealing with message contexts:
*
* |[
* |[<!-- language="C" -->
* GtkStockItem items[] = {
* { MY_ITEM1, NC_("odd items", "Item 1"), 0, 0, "odd-item-domain" },
* { MY_ITEM2, NC_("even items", "Item 2"), 0, 0, "even-item-domain" },
......
......@@ -3190,7 +3190,7 @@ queue_update (GtkUIManager *manager)
* UI in an idle function. A typical example where this function is
* useful is to enforce that the menubar and toolbar have been added to
* the main window before showing it:
* |[
* |[<!-- language="C" -->
* gtk_container_add (GTK_CONTAINER (window), vbox);
* g_signal_connect (merge, "add-widget",
* G_CALLBACK (add_widget), vbox);
......
......@@ -51,7 +51,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* from #GtkBox, and set the #GtkOrientable:orientation property to
* %GTK_ORIENTATION_VERTICAL in your instance init function, with a
* call like:
* |[
* |[<!-- language="C" -->
* gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
* GTK_ORIENTATION_VERTICAL);
* ]|
......
......@@ -84,7 +84,7 @@
* application, but in order to ensure proper translation of the title,
* applications should set the title property explicitly when constructing
* a GtkAboutDialog, as shown in the following example:
* |[
* |[<!-- language="C" -->
* gtk_show_about_dialog (NULL,
* "program-name", "ExampleCode",
* "logo", example_logo,
......@@ -1653,7 +1653,7 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about)
* of the language which is currently used in the user interface.
* Using gettext(), a simple way to achieve that is to mark the
* string for translation:
* |[
* |[<!-- language="C" -->
* gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
* ]|
* It is a good idea to use the customary msgid "translator-credits" for this
......
......@@ -67,7 +67,7 @@
* though it is almost always used to display just one accelerator key.
* <example>
* <title>Creating a simple menu item with an accelerator key.</title>
* |[
* |[<!-- language="C" -->
* GtkWidget *save_item;
* GtkAccelGroup *accel_group;
*
......
......@@ -94,7 +94,7 @@
* </figure>
*
* <example id="gtkapplication"><title>A simple application</title>
* |[
* |[<!-- language="C" -->
* <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/bloatpad.c">
* <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
* </xi:include>
......
......@@ -79,7 +79,7 @@
* using gtk_header_bar_set_show_close_button().
*
* <example><title>A GtkApplicationWindow with a menubar</title>
* |[
* |[<!-- language="C" -->
* app = gtk_application_new ();
*
* builder = gtk_builder_new ();
......@@ -103,7 +103,7 @@
* </example>
*
* <example><title>Handling fallback yourself</title>
* |[
* |[<!-- language="C" -->
* <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/sunny.c">
* <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
* </xi:include>
......
......@@ -74,7 +74,7 @@
* of a #GtkTreeModel one would do the following:
* <example>
* <title>Requesting the width of a handful of GtkTreeModel rows</title>
* |[
* |[<!-- language="C" -->
* GtkTreeIter iter;
* gint minimum_width;
* gint natural_width;
......@@ -110,7 +110,7 @@
* take up the full width of the layouting widget would look like:
* <example>
* <title>A typical get_preferred_width(<!-- -->) implementation</title>
* |[
* |[<!-- language="C" -->
* static void
* foo_get_preferred_width (GtkWidget *widget,
* gint *minimum_size,
......@@ -142,7 +142,7 @@
* root level of a #GtkTreeModel one would do the following:
* <example>
* <title>Requesting the height for width of a handful of GtkTreeModel rows</title>
* |[
* |[<!-- language="C" -->
* GtkTreeIter iter;
* gint minimum_height;
* gint natural_height;
......@@ -199,7 +199,7 @@
* runs as follows:
* <example>
* <title>Requesting the width of a handful of GtkTreeModel rows</title>
* |[
* |[<!-- language="C" -->
* GtkAllocation allocation;
* GdkRectangle cell_area = { 0, };
* GtkTreeIter iter;
......@@ -264,7 +264,7 @@
* should be implemented:
* <example>
* <title>Implementing keyboard focus navigation</title>
* |[
* |[<!-- language="C" -->
* static gboolean
* foo_focus (GtkWidget *widget,
* GtkDirectionType direction)
......
......@@ -90,7 +90,7 @@
* to the fact that these widgets internally use a #GtkCellArea.
* The cell area is exposed as a construct-only property by these
* widgets. This means that it is possible to e.g. do
* |[
* |[<!-- language="C" -->
* combo = g_object_new (GTK_TYPE_COMBO_BOX, "cell-area", my_cell_area, NULL);
* ]|
* to use a custom cell area with a combo box. But construct properties
......@@ -100,7 +100,7 @@
* cause the default cell area to be instantiated. In this case, a provided
* construct property value will be ignored (with a warning, to alert
* you to the problem).
* |[
* |[<!-- language="C" -->
* static void
* my_combo_box_init (MyComboBox *b)
* {
......
......@@ -248,7 +248,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
* continue to use the same kind of widget for editing in future
* releases, therefore you should check the type of @editable
* before doing any specific setup, as in the following example:
* |[
* |[<!-- language="C" -->
* static void
* text_editing_started (GtkCellRenderer *cell,
* GtkCellEditable *editable,
......
......@@ -623,7 +623,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
*
* Here's an example signal handler which fetches data from the model and
* displays it in the entry.
* |[
* |[<!-- language="C" -->
* static gchar*
* format_entry_text_callback (GtkComboBox *combo,
* const gchar *path,
......
......@@ -108,7 +108,7 @@
* the container must return the height for its minimum width. This is easily achieved by
* simply calling the reverse apis implemented for itself as follows:
*
* |[
* |[<!-- language="C" -->
* static void
* foo_container_get_preferred_height (GtkWidget *widget, gint *min_height, gint *nat_height)
* {
......@@ -132,7 +132,7 @@
* Similarly, when gtk_widget_get_preferred_width_for_height() is called for a container or widget
* that is height-for-width, it then only needs to return the base minimum width like so:
*
* |[
* |[<!-- language="C" -->
* static void
* foo_container_get_preferred_width_for_height (GtkWidget *widget, gint for_height,
* gint *min_width, gint *nat_width)
......
......@@ -98,7 +98,7 @@
* in the dialog.
* <example>
* <title>Simple GtkDialog usage</title>
* |[
* |[<!-- language="C" -->
* /&ast; Function to open a dialog box displaying the message provided. &ast;/
* void
* quick_message (gchar *message)
......@@ -848,7 +848,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:
* |[
* |[<!-- language="C" -->
* GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog",
* main_app_window,
* GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
......@@ -1227,7 +1227,7 @@ run_destroy_handler (GtkDialog *dialog, gpointer data)
* destroying the dialog if you wish to do so.
*
* Typical usage of this function might be:
* |[
* |[<!-- language="C" -->
* gint result = gtk_dialog_run (GTK_DIALOG (dialog));
* switch (result)
* {
......@@ -1471,7 +1471,7 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog,
*
* Use this function after adding all the buttons to your dialog, as the
* following example shows:
* |[
* |[<!-- language="C" -->
* cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
* _("_Cancel"),
* GTK_RESPONSE_CANCEL);
......
......@@ -1375,7 +1375,7 @@ gtk_drag_dest_set_internal (GtkWidget *widget,
* There's no way to set a default action here, you can use the
* #GtkWidget::drag-motion callback for that. Here's an example which selects
* the action to use depending on whether the control key is pressed or not:
* |[
* |[<!-- language="C" -->
* static void
* drag_motion (GtkWidget *widget,
* GdkDragContext *context,
......
......@@ -77,7 +77,7 @@
*
* <example>
* <title>Simple GtkDrawingArea usage</title>
* |[
* |[<!-- language="C" -->
* gboolean
* draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
* {
......
......@@ -39,7 +39,7 @@
*
* <example>
* <title>Forcing entry to uppercase.</title>
* |[
* |[<!-- language="C" -->
* #include &lt;ctype.h&gt;
*
* void
......
......@@ -7709,7 +7709,7 @@ gtk_entry_get_overwrite_mode (GtkEntry *entry)
*
* This is equivalent to:
*
* |[
* |[<!-- language="C" -->
* gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
* ]|
*
......@@ -7739,7 +7739,7 @@ gtk_entry_get_text (GtkEntry *entry)
*
* This is equivalent to:
*
* |[
* |[<!-- language="C" -->
* gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
* ]|
**/
......@@ -7760,7 +7760,7 @@ gtk_entry_set_max_length (GtkEntry *entry,
*
* This is equivalent to:
*
* |[
* |[<!-- language="C" -->
* gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
* ]|
*
......@@ -7784,7 +7784,7 @@ gtk_entry_get_max_length (GtkEntry *entry)
*
* This is equivalent to:
*
* |[
* |[<!-- language="C" -->
* gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
* ]|
*
......
......@@ -43,7 +43,7 @@
* its expansion state. You should watch this property with a signal
* connection as follows:
* </para>
* |[
* |[<!-- language="C" -->
* expander = gtk_expander_new_with_mnemonic ("_More Options");
* g_signal_connect (expander, "notify::expanded",
* G_CALLBACK (expander_callback), NULL);
......
......@@ -111,7 +111,7 @@
* </para>
* <example id="example-gtkfilechooser-preview">
* <title>Sample Usage</title>
* |[
* |[<!-- language="C" -->
* {
* GtkImage *preview;
*
......@@ -160,7 +160,7 @@
* </para>
* <example id="example-gtkfilechooser-extra">
* <title>Sample Usage</title>
* |[
* |[<!-- language="C" -->
*
* GtkWidget *toggle;
*
......@@ -347,7 +347,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface)
* illustrates this.
* <example id="gtkfilechooser-confirmation">
* <title>Custom confirmation</title>
* |[
* |[<!-- language="C" -->
* static GtkFileChooserConfirmation
* confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
* {
......@@ -742,7 +742,7 @@ gtk_file_chooser_get_filename (GtkFileChooser *chooser)
* a modified version. If you don't have a file name already &mdash; for
* example, if the user just created a new file and is saving it for the first
* time, do not call this function. Instead, use something similar to this:
* |[
* |[<!-- language="C" -->
* if (document_is_new)
* {
* /&ast; the user just created a new document &ast;/
......@@ -1094,7 +1094,7 @@ gtk_file_chooser_get_uri (GtkFileChooser *chooser)
* modified version. If you don't have a file name already &mdash; for example,
* if the user just created a new file and is saving it for the first time, do
* not call this function. Instead, use something similar to this:
* |[
* |[<!-- language="C" -->
* if (document_is_new)
* {
* /&ast; the user just created a new document &ast;/
......@@ -1460,7 +1460,7 @@ gtk_file_chooser_get_files (GtkFileChooser *chooser)
* a file name already &mdash; for example, if the user just created a new
* file and is saving it for the first time, do not call this function.
* Instead, use something similar to this:
* |[
* |[<!-- language="C" -->
* if (document_is_new)
* {
* /&ast; the user just created a new document &ast;/
......
......@@ -72,7 +72,7 @@
*
* <example>
* <title>Create a button to let the user select a file in /etc</title>
* |[
* |[<!-- language="C" -->
* {
* GtkWidget *button;
*
......
......@@ -351,7 +351,7 @@ gtk_file_filter_buildable_custom_tag_end (GtkBuildable *buildable,
* gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(),
* or gtk_file_filter_add_custom(). To create a filter
* that accepts any file, use:
* |[
* |[<!-- language="C" -->
* GtkFileFilter *filter = gtk_file_filter_new ();
* gtk_file_filter_add_pattern (filter, "*");
* ]|
......
......@@ -118,7 +118,7 @@
* so that the icon information is shared with other people
* looking up icons. In the case where the default screen is
* being used, looking up an icon can be as simple as:
* |[
* |[<!-- language="C" -->
* GError *error = NULL;
* GtkIconTheme *icon_theme;
* GdkPixbuf *pixbuf;
......
......@@ -5457,7 +5457,7 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
* To do this, you can use gtk_tree_row_reference_new().
*
* To free the return value, use:
* |[
* |[<!-- language="C" -->
* g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
* ]|
*
......
......@@ -52,7 +52,7 @@
* #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:
* |[
* |[<!-- language="C" -->
* GtkWidget *image;
* image = gtk_image_new_from_file ("myfile.png");
* ]|
......@@ -76,7 +76,7 @@
* #GtkEventBox, then connect to the event signals on the event box.
* <example>
* <title>Handling button press events on a #GtkImage.</title>
* |[
* |[<!-- language="C" -->
* static gboolean
* button_press_callback (GtkWidget *event_box,
* GdkEventButton *event,
......
......@@ -58,7 +58,7 @@
* implements a subclass of #GtkIMContext or #GtkIMContextSimple and exports
* these four functions:
*
* |[
* |[<!-- language="C" -->
* void im_module_init(#GTypeModule *module);
* ]|
* This function should register the #GType of the #GtkIMContext subclass which
......@@ -66,12 +66,12 @@
* that g_type_register_static() cannot be used as the type needs to be
* registered dynamically.
*
* |[
* |[<!-- language="C" -->
* void im_module_exit(void);
* ]|
* Here goes any cleanup code your input method might require on module unload.
*
* |[
* |[<!-- language="C" -->
* void im_module_list(const #GtkIMContextInfo ***contexts, int *n_contexts)
* {
* *contexts = info_list;
......@@ -83,7 +83,7 @@
* pointer to statically defined array of #GtkIMContextInfo items for each
* provided input method.
*
* |[
* |[<!-- language="C" -->
* #GtkIMContext * im_module_create(const #gchar *context_id);
* ]|
* This function should return a pointer to a newly created instance of the
......
......@@ -74,7 +74,7 @@
*
* <example>
* <title>Simple GtkInfoBar usage.</title>
* |[
* |[<!-- language="C" -->
* /&ast; set up info bar &ast;/
* info_bar = gtk_info_bar_new ();
* gtk_widget_set_no_show_all (info_bar, TRUE);
......
......@@ -109,7 +109,7 @@
* using gtk_label_set_mnemonic_widget(). Here's a simple example where
* the label is inside a button:
*
* |[
* |[<!-- language="C" -->
* // Pressing Alt+H will activate this button
* button = gtk_button_new (<!-- -->);
* label = gtk_label_new_with_mnemonic ("_Hello");
......@@ -119,7 +119,7 @@
* There's a convenience function to create buttons with a mnemonic label
* already inside:
*
* |[
* |[<!-- language="C" -->
* // Pressing Alt+H will activate this button
* button = gtk_button_new_with_mnemonic ("_Hello");
* ]|
......@@ -128,7 +128,7 @@
* #GtkEntry, you have to point the label at the entry with
* gtk_label_set_mnemonic_widget():
*
* |[
* |[<!-- language="C" -->
* // Pressing Alt+H will focus the entry
* entry = gtk_entry_new (<!-- -->);
* label = gtk_label_new_with_mnemonic ("_Hello");
......@@ -144,7 +144,7 @@
* linkend="PangoMarkupFormat">markup format</link>.
* Here's how to create a label with a small font:
*
* |[
* |[<!-- language="C" -->
* label = gtk_label_new (NULL);
* gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");
* ]|
......@@ -216,7 +216,7 @@
* way they appear in web browsers, with colored, underlined text. The title
* attribute is displayed as a tooltip on the link. An example looks like this:
*
* |[
* |[<!-- language="C" -->
* gtk_label_set_markup (label, "Go to the <a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website">GTK+ website</a> for more...");
* ]|
*
......@@ -2612,7 +2612,7 @@ gtk_label_set_markup_internal (GtkLabel *label,
* label's text and attribute list based on the parse results. If the @str is
* external data, you may need to escape it with g_markup_escape_text() or
* g_markup_printf_escaped()<!-- -->:
* |[
* |[<!-- language="C" -->
* char *markup;
*
* markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str);
......
......@@ -35,7 +35,7 @@
*
* <example>
* <title>Adding a custom offset on the bar</title>
* |[
* |[<!-- language="C" -->
*
* static GtkWidget *
* create_level_bar (void)
......
......@@ -55,7 +55,7 @@
*
* <example>
* <title>Creating a simple list store.</title>
* |[
* |[<!-- language="C" -->
* enum {
* COLUMN_STRING,
* COLUMN_INT,
......@@ -157,7 +157,7 @@
*
* <example>
* <title>A UI Definition fragment for a list store</title>
* |[
* |[<!-- language="C" -->