Docs: use // for comments in examples

Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
This commit is contained in:
Matthias Clasen
2014-02-14 23:34:22 -05:00
parent e179c65da0
commit c779b42476
39 changed files with 179 additions and 171 deletions

View File

@ -673,14 +673,14 @@ gdk_threads_dispatch_free (gpointer data)
* static gboolean
* idle_callback (gpointer data)
* {
* /* gdk_threads_enter(); would be needed for g_idle_add() */
* // gdk_threads_enter(); would be needed for g_idle_add()
*
* SomeWidget *self = data;
* /* do stuff with self */
* // do stuff with self
*
* self->idle_id = 0;
*
* /* gdk_threads_leave(); would be needed for g_idle_add() */
* // gdk_threads_leave(); would be needed for g_idle_add()
* return FALSE;
* }
*
@ -688,7 +688,7 @@ gdk_threads_dispatch_free (gpointer data)
* some_widget_do_stuff_later (SomeWidget *self)
* {
* self->idle_id = gdk_threads_add_idle (idle_callback, self)
* /* using g_idle_add() here would require thread protection in the callback */
* // using g_idle_add() here would require thread protection in the callback
* }
*
* static void
@ -780,7 +780,7 @@ gdk_threads_add_idle (GSourceFunc function,
* {
* SomeWidget *self = data;
*
* /* do stuff with self */
* // do stuff with self
*
* self->timeout_id = 0;
*

View File

@ -91,14 +91,14 @@
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /* make X11-specific calls here */
* // make X11-specific calls here
* }
* else
* #endif
* #ifdef GDK_WINDOWING_QUARTZ
* if (GDK_IS_QUARTZ_DISPLAY (display))
* {
* /* make Quartz-specific calls here */
* // make Quartz-specific calls here
* }
* else
* #endif

View File

@ -1678,11 +1678,11 @@ gdk_event_get_source_device (const GdkEvent *event)
*
* |[<!-- language="C" -->
* {
* /&ast; motion_event handler &ast;/
* // motion_event handler
* x = motion_event->x;
* y = motion_event->y;
* /&ast; handle (x,y) motion &ast;/
* gdk_event_request_motions (motion_event); /&ast; handles is_hint events &ast;/
* // handle (x,y) motion
* gdk_event_request_motions (motion_event); // handles is_hint events
* }
* ]|
*

View File

@ -501,14 +501,14 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
* `<Control>plus` accelerator `<Shift>` should be masked out.
*
* |[<!-- language="C" -->
* /&ast; We want to ignore irrelevant modifiers like ScrollLock &ast;/;
* // We want to ignore irrelevant modifiers like ScrollLock
* #define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
* gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
* event->state, event->group,
* &keyval, NULL, NULL, &consumed);
* if (keyval == GDK_PLUS &&
* (event->state & ~consumed & ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
* /&ast; Control was pressed &ast;/
* // Control was pressed
* ]|
*
* An older interpretation @consumed_modifiers was that it contained
@ -516,10 +516,10 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
* this allowed accelerators to be stored with irrelevant consumed
* modifiers, by doing:
* |[<!-- language="C" -->
* /&ast; XXX Dont do this XXX &ast;/
* // XXX Dont do this XXX
* if (keyval == accel_keyval &&
* (event->state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed))
* /&ast; Accelerator was pressed &ast;/
* // Accelerator was pressed
* ]|
*
* However, this did not work if multi-modifier combinations were

View File

@ -52,14 +52,14 @@
* #ifdef GDK_WINDOWING_WAYLAND
* if (GDK_IS_WAYLAND_DISPLAY (display))
* {
* /&ast; make Wayland-specific calls here &ast;/
* // make Wayland-specific calls here
* }
* else
* #endif
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* // make X11-specific calls here
* }
* else
* #endif

View File

@ -64,14 +64,14 @@
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* // make X11-specific calls here
* }
* else
* #endif
* #ifdef GDK_WINDOWING_QUARTZ
* if (GDK_IS_QUARTZ_DISPLAY (display))
* {
* /&ast; make Quartz-specific calls here &ast/
* // make Quartz-specific calls here
* }
* else
* #endif