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:
10
gdk/gdk.c
10
gdk/gdk.c
@ -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;
|
||||
*
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1678,11 +1678,11 @@ gdk_event_get_source_device (const GdkEvent *event)
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* {
|
||||
* /* motion_event handler */
|
||||
* // motion_event handler
|
||||
* x = motion_event->x;
|
||||
* y = motion_event->y;
|
||||
* /* handle (x,y) motion */
|
||||
* gdk_event_request_motions (motion_event); /* handles is_hint events */
|
||||
* // handle (x,y) motion
|
||||
* gdk_event_request_motions (motion_event); // handles is_hint events
|
||||
* }
|
||||
* ]|
|
||||
*
|
||||
|
||||
@ -501,14 +501,14 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
|
||||
* `<Control>plus` accelerator `<Shift>` should be masked out.
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* /* We want to ignore irrelevant modifiers like ScrollLock */;
|
||||
* // 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)
|
||||
* /* Control was pressed */
|
||||
* // 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" -->
|
||||
* /* XXX Don’t do this XXX */
|
||||
* // XXX Don’t do this XXX
|
||||
* if (keyval == accel_keyval &&
|
||||
* (event->state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed))
|
||||
* /* Accelerator was pressed */
|
||||
* // Accelerator was pressed
|
||||
* ]|
|
||||
*
|
||||
* However, this did not work if multi-modifier combinations were
|
||||
|
||||
@ -52,14 +52,14 @@
|
||||
* #ifdef GDK_WINDOWING_WAYLAND
|
||||
* if (GDK_IS_WAYLAND_DISPLAY (display))
|
||||
* {
|
||||
* /* make Wayland-specific calls here */
|
||||
* // make Wayland-specific calls here
|
||||
* }
|
||||
* else
|
||||
* #endif
|
||||
* #ifdef GDK_WINDOWING_X11
|
||||
* if (GDK_IS_X11_DISPLAY (display))
|
||||
* {
|
||||
* /* make X11-specific calls here */
|
||||
* // make X11-specific calls here
|
||||
* }
|
||||
* else
|
||||
* #endif
|
||||
|
||||
@ -64,14 +64,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 &ast/
|
||||
* // make Quartz-specific calls here
|
||||
* }
|
||||
* else
|
||||
* #endif
|
||||
|
||||
Reference in New Issue
Block a user