Commit a9dd3529 authored by Matthias Clasen's avatar Matthias Clasen Committed by Emmanuele Bassi
Browse files

gdk: Some more tweaks of the docs

parent e82d090b
......@@ -281,13 +281,13 @@ _gdk_cairo_surface_extents (cairo_surface_t *surface,
* gdk_cairo_region_create_from_surface:
* @surface: a cairo surface
*
* Creates region that describes covers the area where the given
* Creates region that covers the area where the given
* @surface is more than 50% opaque.
*
* This function takes into account device offsets that might be
* set with cairo_surface_set_device_offset().
*
* Returns: A #cairo_region_t; must be freed with cairo_region_destroy()
* Returns: A `cairo_region_t`; must be freed with cairo_region_destroy()
*/
cairo_region_t *
gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
......
......@@ -21,8 +21,9 @@
* GdkDevicePad:
*
* `GdkDevicePad` is an interface implemented by devices of type
* %GDK_SOURCE_TABLET_PAD, it allows querying the features provided
* by the pad device.
* %GDK_SOURCE_TABLET_PAD
*
* It allows querying the features provided by the pad device.
*
* Tablet pads may contain one or more groups, each containing a subset
* of the buttons/rings/strips available. [method@Gdk.DevicePad.get_n_groups]
......
This diff is collapsed.
......@@ -301,13 +301,15 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
* @width: The width of the region to draw
* @height: The height of the region to draw
*
* This is the main way to draw GL content in GTK. It takes a render buffer ID
* (@source_type == #GL_RENDERBUFFER) or a texture id (@source_type == #GL_TEXTURE)
* and draws it onto @cr with an OVER operation, respecting the current clip.
* The top left corner of the rectangle specified by @x, @y, @width and @height
* will be drawn at the current (0,0) position of the cairo_t.
* The main way to draw GL content in GTK.
*
* This will work for *all* cairo_t, as long as @surface is realized, but the
* It takes a render buffer ID (@source_type == #GL_RENDERBUFFER) or a texture
* id (@source_type == #GL_TEXTURE) and draws it onto @cr with an OVER operation,
* respecting the current clip. The top left corner of the rectangle specified
* by @x, @y, @width and @height will be drawn at the current (0,0) position of
* the `cairo_t`.
*
* This will work for *all* `cairo_t`, as long as @surface is realized, but the
* fallback implementation that reads back the pixels from the buffer may be
* used in the general case. In the case of direct drawing to a surface with
* no special effects applied to @cr it will however use a more efficient
......
......@@ -135,8 +135,9 @@ gdk_keymap_class_init (GdkKeymapClass *klass)
* GdkKeymap::direction-changed:
* @keymap: the object on which the signal is emitted
*
* The ::direction-changed signal gets emitted when the direction
* of the keymap changes. See gdk_keymap_get_direction().
* Emitted when the direction of the keymap changes.
*
* See gdk_keymap_get_direction().
*/
signals[DIRECTION_CHANGED] =
g_signal_new (g_intern_static_string ("direction-changed"),
......@@ -147,6 +148,7 @@ gdk_keymap_class_init (GdkKeymapClass *klass)
NULL,
G_TYPE_NONE,
0);
/**
* GdkKeymap::keys-changed:
* @keymap: the object on which the signal is emitted
......@@ -305,6 +307,7 @@ gdk_keyval_is_lower (guint keyval)
* @keymap: a #GdkKeymap
*
* Returns the direction of effective layout of the keymap.
*
* The direction of a layout is the direction of the majority of its
* symbols. See pango_unichar_direction().
*
......@@ -678,6 +681,7 @@ gdk_keyval_from_name (const char *keyval_name)
* @upper: (out): return location for uppercase version of @symbol
*
* Obtains the upper- and lower-case versions of the keyval @symbol.
*
* Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc.
*/
void
......
......@@ -880,7 +880,7 @@ static const struct {
* gdk_keyval_to_unicode:
* @keyval: a GDK key symbol
*
* Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
* Convert from a GDK key symbol to the corresponding Unicode
* character.
*
* Note that the conversion does not take the current locale
......@@ -888,8 +888,8 @@ static const struct {
* keyvals, such as %GDK_KEY_KP_Decimal.
*
* Returns: the corresponding unicode character, or 0 if there
* is no corresponding character.
**/
* is no corresponding character.
*/
guint32
gdk_keyval_to_unicode (guint keyval)
{
......@@ -1682,14 +1682,13 @@ static const struct {
/**
* gdk_unicode_to_keyval:
* @wc: a ISO10646 encoded character
*
* Convert from a ISO10646 character to a key symbol.
*
* @wc: a Unicode character
*
* Convert from a Unicode character to a key symbol.
*
* Returns: the corresponding GDK key symbol, if one exists.
* or, if there is no corresponding symbol,
* wc | 0x01000000
**/
* or, if there is no corresponding symbol, wc | 0x01000000
*/
guint
gdk_unicode_to_keyval (guint32 wc)
{
......
......@@ -90,31 +90,32 @@ layout_iter_get_line_clip_region (PangoLayoutIter *iter,
/**
* gdk_pango_layout_line_get_clip_region: (skip)
* @line: a #PangoLayoutLine
* @line: a `PangoLayoutLine`
* @x_origin: X pixel where you intend to draw the layout line with this clip
* @y_origin: baseline pixel where you intend to draw the layout line with this clip
* @index_ranges: (array): array of byte indexes into the layout,
* where even members of array are start indexes and odd elements
* are end indexes
* @n_ranges: number of ranges in @index_ranges, i.e. half the size of @index_ranges
*
*
* Obtains a clip region which contains the areas where the given
* ranges of text would be drawn. @x_origin and @y_origin are the top left
* position of the layout. @index_ranges
* should contain ranges of bytes in the layout’s text. The clip
* region will include space to the left or right of the line (to the
* layout bounding box) if you have indexes above or below the indexes
* contained inside the line. This is to draw the selection all the way
* to the side of the layout. However, the clip region is in line coordinates,
* not layout coordinates.
* ranges of text would be drawn.
*
* @x_origin and @y_origin are the top left position of the layout.
* @index_ranges should contain ranges of bytes in the layout’s text.
* The clip region will include space to the left or right of the line
* (to the layout bounding box) if you have indexes above or below the
* indexes contained inside the line. This is to draw the selection all
* the way to the side of the layout. However, the clip region is in line
* coordinates, not layout coordinates.
*
* Note that the regions returned correspond to logical extents of the text
* ranges, not ink extents. So the drawn line may in fact touch areas out of
* the clip region. The clip region is mainly useful for highlightling parts
* of text, such as when text is selected.
*
*
* Returns: a clip region containing the given ranges
**/
*/
cairo_region_t*
gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
int x_origin,
......@@ -141,24 +142,25 @@ gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
/**
* gdk_pango_layout_get_clip_region: (skip)
* @layout: a #PangoLayout
* @layout: a `PangoLayout`
* @x_origin: X pixel where you intend to draw the layout with this clip
* @y_origin: Y pixel where you intend to draw the layout with this clip
* @index_ranges: array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes
* @n_ranges: number of ranges in @index_ranges, i.e. half the size of @index_ranges
*
*
* Obtains a clip region which contains the areas where the given ranges
* of text would be drawn. @x_origin and @y_origin are the top left point
* to center the layout. @index_ranges should contain
* ranges of bytes in the layout’s text.
*
* of text would be drawn.
*
* @x_origin and @y_origin are the top left point to center the layout.
* @index_ranges should contain ranges of bytes in the layout’s text.
*
* Note that the regions returned correspond to logical extents of the text
* ranges, not ink extents. So the drawn layout may in fact touch areas out of
* the clip region. The clip region is mainly useful for highlightling parts
* of text, such as when text is selected.
*
*
* Returns: a clip region containing the given ranges
**/
*/
cairo_region_t*
gdk_pango_layout_get_clip_region (PangoLayout *layout,
int x_origin,
......
......@@ -30,17 +30,6 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
/**
* SECTION:pixbufs
* @Short_description: Functions for obtaining pixbufs
* @Title: GdkPixbuf Interaction
*
* Pixbufs are client-side images. For details on how to create
* and manipulate pixbufs, see the #GdkPixbuf API documentation.
*
* The functions described here allow to obtain pixbufs from
* #GdkSurfaces and cairo surfaces.
*/
static cairo_format_t
gdk_cairo_format_for_content (cairo_content_t content)
......@@ -157,9 +146,10 @@ convert_no_alpha (guchar *dest_data,
* @width: Width in pixels of region to get
* @height: Height in pixels of region to get
*
* Transfers image data from a #cairo_surface_t and converts it to an RGB(A)
* representation inside a #GdkPixbuf. This allows you to efficiently read
* individual pixels from cairo surfaces.
* Transfers image data from a `cairo_surface_t` and converts it
* to a `GdkPixbuf`.
*
* This allows you to efficiently read individual pixels from cairo surfaces.
*
* This function will create an RGB pixbuf with 8 bits per channel.
* The pixbuf will contain an alpha channel if the @surface contains one.
......@@ -227,11 +217,13 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
/**
* gdk_pixbuf_get_from_texture:
* @texture: a #GdkTexture
* @texture: a `GdkTexture`
*
* Creates a new pixbuf from @texture.
*
* Creates a new pixbuf from @texture. This should generally not be used
* in newly written code as later stages will almost certainly convert
* the pixbuf back into a texture to draw it on screen.
* This should generally not be used in newly written code as later
* stages will almost certainly convert the pixbuf back into a texture
* to draw it on screen.
*
* Returns: (transfer full) (nullable): a new #GdkPixbuf or %NULL
* in case of an error
......
......@@ -148,9 +148,11 @@ typedef enum
* @GDK_HYPER_MASK: the Hyper modifier
* @GDK_META_MASK: the Meta modifier
*
* A set of bit-flags to indicate the state of modifier keys and mouse buttons
* in various event types. Typical modifier keys are Shift, Control, Meta,
* Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
* Flags to indicate the state of modifier keys and mouse buttons
* in events.
*
* Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose,
* Apple, CapsLock or ShiftLock.
*
* Note that GDK may add internal values to events which include values outside
* of this enumeration. Your code should preserve and ignore them. You can use
......@@ -178,7 +180,7 @@ typedef enum
/**
* GDK_MODIFIER_MASK:
*
* A mask covering all entries in #GdkModifierType.
* A mask covering all entries in `GdkModifierType`.
*/
#define GDK_MODIFIER_MASK (GDK_SHIFT_MASK|GDK_LOCK_MASK|GDK_CONTROL_MASK| \
GDK_ALT_MASK|GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK| \
......@@ -194,7 +196,7 @@ typedef enum
* @GDK_GL_ERROR_COMPILATION_FAILED: The shader compilation failed
* @GDK_GL_ERROR_LINK_FAILED: The shader linking failed
*
* Error enumeration for #GdkGLContext.
* Error enumeration for `GdkGLContext`.
*/
typedef enum {
GDK_GL_ERROR_NOT_AVAILABLE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment