summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2014-01-27 12:12:55 -0500
committerWilliam Jon McCann <william.jon.mccann@gmail.com>2014-01-29 12:45:49 -0500
commit768bc44081550be18ee19697ed36b5f92298ef11 (patch)
tree8a0600c37dd2cc07fb00426c76922d3e3f1085e5 /gdk
parenta74ea0770dfc3c7feaa156ab26c26b44162d1820 (diff)
downloadgtk+-768bc44081550be18ee19697ed36b5f92298ef11.tar.gz
docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdk.c12
-rw-r--r--gdk/gdkapplaunchcontext.c6
-rw-r--r--gdk/gdkdisplay.c4
-rw-r--r--gdk/gdkdisplaymanager.c8
-rw-r--r--gdk/gdkevents.h18
-rw-r--r--gdk/gdkkeys.c8
-rw-r--r--gdk/gdkpango.c4
-rw-r--r--gdk/gdkwindow.h4
-rw-r--r--gdk/wayland/gdkwindow-wayland.c6
9 files changed, 28 insertions, 42 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index a1fee6c476..3bc27f5ef2 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -502,8 +502,7 @@ gdk_init (int *argc, char ***argv)
*
* A minimal main program for a threaded GTK+ application
* looks like:
- * <informalexample>
- * <programlisting role="C">
+ * |[
* int
* main (int argc, char *argv[])
* {
@@ -522,8 +521,7 @@ gdk_init (int *argc, char ***argv)
*
* return 0;
* }
- * </programlisting>
- * </informalexample>
+ * ]|
*
* Callbacks require a bit of attention. Callbacks from GTK+ signals
* are made within the GTK+ lock. However callbacks from GLib (timeouts,
@@ -534,8 +532,7 @@ gdk_init (int *argc, char ***argv)
*
* Erik Mouw contributed the following code example to
* illustrate how to use threads within GTK+ programs.
- * <informalexample>
- * <programlisting role="C">
+ * |[
* /<!---->*-------------------------------------------------------------------------
* * Filename: gtk-thread.c
* * Version: 0.99.1
@@ -672,8 +669,7 @@ gdk_init (int *argc, char ***argv)
*
* return 0;
* }
- * </programlisting>
- * </informalexample>
+ * ]|
*
* Unfortunately, all of the above documentation holds with the X11
* backend only. With the Win32 or Quartz backends, GDK and GTK+ calls
diff --git a/gdk/gdkapplaunchcontext.c b/gdk/gdkapplaunchcontext.c
index 3fbcf72416..bfad9ba28a 100644
--- a/gdk/gdkapplaunchcontext.c
+++ b/gdk/gdkapplaunchcontext.c
@@ -36,8 +36,7 @@
* screen or workspace.
* <example>
* <title>Launching an application</title>
- * <informalexample>
- * <programlisting>
+ * |[
* GdkAppLaunchContext *context;
*
* context = gdk_display_get_app_launch_context (display);
@@ -49,8 +48,7 @@
* g_warning ("Launching failed: %s\n", error->message);
*
* g_object_unref (context);
- * </programlisting>
- * </informalexample>
+ * ]|
* </example>
*/
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 6e9bd20487..a29c1061da 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -2115,7 +2115,7 @@ static GQueue gdk_error_traps = G_QUEUE_INIT;
*
* <example>
* <title>Trapping an X error</title>
- * <programlisting>
+ * |[
* gdk_error_trap_push (<!-- -->);
*
* // ... Call the X function which may cause an error here ...
@@ -2125,7 +2125,7 @@ static GQueue gdk_error_traps = G_QUEUE_INIT;
* {
* // ... Handle the error here ...
* }
- * </programlisting>
+ * ]|
* </example>
*/
void
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
index 94f857eb52..2262722d31 100644
--- a/gdk/gdkdisplaymanager.c
+++ b/gdk/gdkdisplaymanager.c
@@ -87,7 +87,7 @@
*
* <example id="backend-specific">
* <title>Backend-specific code</title>
- * <programlisting>
+ * |[
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
@@ -103,7 +103,7 @@
* else
* #endif
* g_error ("Unsupported GDK backend");
- * </programlisting>
+ * ]|
* </example>
*/
@@ -225,9 +225,9 @@ static const gchar *allowed_backends;
* By default, GDK tries all included backends.
*
* For example,
- * <programlisting>
+ * |[
* gdk_set_allowed_backends ("wayland,quartz,*");
- * </programlisting>
+ * ]|
* instructs GDK to try the Wayland backend first,
* followed by the Quartz backend, and then all
* others.
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 8425466e23..d3209b7a75 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -1142,36 +1142,30 @@ 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:
- * <informalexample>
- * <programlisting>
+ * |[
* GdkEvent *event;
* GdkEventType type;
*
* type = event->type;
- * </programlisting>
- * </informalexample>
+ * ]|
*
* To access other fields of the event, the pointer to the event
* 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:
- * <informalexample>
- * <programlisting>
+ * |[
* GdkEvent *event;
* gdouble x;
*
* x = ((GdkEventButton*)event)->x;
- * </programlisting>
- * </informalexample>
+ * ]|
* or:
- * <informalexample>
- * <programlisting>
+ * |[
* GdkEvent *event;
* gdouble x;
*
* x = event->button.x;
- * </programlisting>
- * </informalexample>
+ * ]|
*/
union _GdkEvent
{
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index f29303f3ac..1573f9204a 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -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>
- * <informalexample><programlisting>
+ * |[
* &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,
@@ -512,18 +512,18 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
* if (keyval == GDK_PLUS &&
* (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
* &sol;* Control was pressed *&sol;
- * </programlisting></informalexample>
+ * ]|
* <para>
* An older interpretation @consumed_modifiers was that it contained
* all modifiers that might affect the translation of the key;
* this allowed accelerators to be stored with irrelevant consumed
* modifiers, by doing:</para>
- * <informalexample><programlisting>
+ * |[
* &sol;* XXX Don't do this XXX *&sol;
* if (keyval == accel_keyval &&
* (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
* &sol;* Accelerator was pressed *&sol;
- * </programlisting></informalexample>
+ * ]|
* <para>
* However, this did not work if multi-modifier combinations were
* used in the keymap, since, for instance, <literal>&lt;Control&gt;</literal>
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index ca5745beb2..68a21cb9e0 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -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 -->
- * <programlisting>
+ * |[
* #define RADIUS 100
* #define N_WORDS 10
* #define FONT "Sans Bold 18"
@@ -116,7 +116,7 @@
*
* g_object_unref (layout);
* g_object_unref (context);
- * </programlisting>
+ * ]|
* </example>
* <figure>
* <title>Output of <xref linkend="rotated-example"/></title>
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 6bb66dbc15..adf2d42df9 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -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":
*
- * <informalexample><programlisting><![CDATA[
+ * |[
* GdkGeometry hints;
*
* hints.base_width = terminal->char_width;
@@ -437,7 +437,7 @@ struct _GdkWindowAttr
* GDK_HINT_RESIZE_INC |
* GDK_HINT_MIN_SIZE |
* GDK_HINT_BASE_SIZE);
- * ]]></programlisting></informalexample>
+ * ]|
*
* The other useful fields are the @min_aspect and @max_aspect fields; these
* contain a width/height ratio as a floating point number. If a geometry widget
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 2b4325b00c..9ebb3b3933 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -2275,8 +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:
*
- * <informalexample>
- * <programlisting>
+ * |[
* static void
* widget_realize_cb (GtkWidget *widget)
* {
@@ -2297,8 +2296,7 @@ gdk_wayland_window_get_wl_surface (GdkWindow *window)
* {
* g_signal_connect (window, "realize", G_CALLBACK (widget_realize_cb), NULL);
* }
- * </programlisting>
- * </informalexample>
+ * ]|
*
* Since: 3.10
*/