docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
This commit is contained in:
@ -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" -->
|
||||
* {
|
||||
* /* motion_event handler */
|
||||
* 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><Control>plus</literal> accelerator <Shift> should
|
||||
* be masked out.
|
||||
* </para>
|
||||
* |[
|
||||
* |[<!-- language="C" -->
|
||||
* /* 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,
|
||||
@ -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" -->
|
||||
* /* XXX Don't do this XXX */
|
||||
* if (keyval == accel_keyval &&
|
||||
* (event->state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~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)
|
||||
* {
|
||||
|
||||
Reference in New Issue
Block a user