gsk: Clean up docs syntax

Replace leftover gtk-doc syntax (#Type) with backquotes.
This commit is contained in:
Matthias Clasen 2021-05-19 23:40:54 -04:00
parent fff2b3c710
commit 2d266d107b
18 changed files with 67 additions and 68 deletions

View File

@ -4548,11 +4548,10 @@ gsk_gl_renderer_init (GskGLRenderer *self)
/**
* gsk_gl_renderer_new:
*
* Creates a new #GskRenderer using OpenGL. This is the default renderer
* used by GTK.
* Creates a new `GskRenderer` using OpenGL.
*
* Returns: a new GL renderer
**/
*/
GskRenderer *
gsk_gl_renderer_new (void)
{

View File

@ -26,7 +26,7 @@
* GskRenderNodeType:
* @GSK_NOT_A_RENDER_NODE: Error type. No node will ever have this type.
* @GSK_CONTAINER_NODE: A node containing a stack of children
* @GSK_CAIRO_NODE: A node drawing a #cairo_surface_t
* @GSK_CAIRO_NODE: A node drawing a `cairo_surface_t`
* @GSK_COLOR_NODE: A node drawing a single color rectangle
* @GSK_LINEAR_GRADIENT_NODE: A node drawing a linear gradient
* @GSK_REPEATING_LINEAR_GRADIENT_NODE: A node drawing a repeating linear gradient
@ -34,7 +34,7 @@
* @GSK_REPEATING_RADIAL_GRADIENT_NODE: A node drawing a repeating radial gradient
* @GSK_CONIC_GRADIENT_NODE: A node drawing a conic gradient
* @GSK_BORDER_NODE: A node stroking a border around an area
* @GSK_TEXTURE_NODE: A node drawing a #GdkTexture
* @GSK_TEXTURE_NODE: A node drawing a `GdkTexture`
* @GSK_INSET_SHADOW_NODE: A node drawing an inset shadow
* @GSK_OUTSET_SHADOW_NODE: A node drawing an outset shadow
* @GSK_TRANSFORM_NODE: A node that renders its child after applying a matrix transform
@ -158,7 +158,7 @@ typedef enum {
* @GSK_CORNER_BOTTOM_RIGHT: The bottom right corner
* @GSK_CORNER_BOTTOM_LEFT: The bottom left corner
*
* The corner indices used by #GskRoundedRect.
* The corner indices used by `GskRoundedRect`.
*/
typedef enum {
GSK_CORNER_TOP_LEFT,

View File

@ -1166,7 +1166,7 @@ gsk_shader_args_builder_to_args (GskShaderArgsBuilder *builder)
* gsk_shader_args_builder_free_to_args: (skip)
* @builder: a `GskShaderArgsBuilder`
*
* Creates a new #GBytes args from the current state of the
* Creates a new `GBytes` args from the current state of the
* given @builder, and frees the @builder instance.
*
* Any uniforms of the shader that have not been explicitly set

View File

@ -35,7 +35,7 @@ G_BEGIN_DECLS
/**
* GskShaderArgsBuilder:
*
* An object to build the uniforms data for a #GskGLShader.
* An object to build the uniforms data for a `GskGLShader`.
*/
typedef struct _GskShaderArgsBuilder GskShaderArgsBuilder;

View File

@ -245,11 +245,11 @@ gsk_renderer_get_surface (GskRenderer *renderer)
/*< private >
* gsk_renderer_get_root_node:
* @renderer: a #GskRenderer
* @renderer: a `GskRenderer`
*
* Retrieves the #GskRenderNode used by @renderer.
* Retrieves the `GskRenderNode` used by @renderer.
*
* Returns: (transfer none) (nullable): a #GskRenderNode
* Returns: (transfer none) (nullable): a `GskRenderNode`
*/
GskRenderNode *
gsk_renderer_get_root_node (GskRenderer *renderer)
@ -478,9 +478,9 @@ gsk_renderer_render (GskRenderer *renderer,
/*< private >
* gsk_renderer_get_profiler:
* @renderer: a #GskRenderer
* @renderer: a `GskRenderer`
*
* Retrieves a pointer to the GskProfiler instance of the renderer.
* Retrieves a pointer to the `GskProfiler` instance of the renderer.
*
* Returns: (transfer none): the profiler
*/

View File

@ -1370,7 +1370,7 @@ gsk_border_node_get_widths (const GskRenderNode *node)
*
* Retrieves the colors of the border.
*
* Returns: (transfer none): an array of 4 #GdkRGBA structs
* Returns: (transfer none): an array of 4 `GdkRGBA` structs
* for the top, right, bottom and left color of the border
*/
const GdkRGBA *
@ -1383,7 +1383,7 @@ gsk_border_node_get_colors (const GskRenderNode *node)
/**
* gsk_border_node_new:
* @outline: a #GskRoundedRect describing the outline of the border
* @outline: a `GskRoundedRect` describing the outline of the border
* @border_width: (array fixed-size=4): the stroke width of the border on
* the top, right, bottom and left side respectively.
* @border_color: (array fixed-size=4): the color used on the top, right,
@ -1454,7 +1454,7 @@ gsk_border_node_get_uniform_color (const GskRenderNode *self)
/**
* GskTextureNode:
*
* A render node for a #GdkTexture.
* A render node for a `GdkTexture`.
*/
struct _GskTextureNode
{
@ -3575,7 +3575,7 @@ gsk_clip_node_get_child (const GskRenderNode *node)
/**
* gsk_clip_node_get_clip:
* @node: (type GskClipNode): a #GskClipNode
* @node: (type GskClipNode): a `GskClipNode`
*
* Retrieves the clip rectangle for @node.
*
@ -4405,8 +4405,8 @@ font_has_color_glyphs (const PangoFont *font)
/**
* gsk_text_node_new:
* @font: the #PangoFont containing the glyphs
* @glyphs: the #PangoGlyphString to render
* @font: the `PangoFont` containing the glyphs
* @glyphs: the `PangoGlyphString` to render
* @color: the foreground color to render with
* @offset: offset of the baseline
*
@ -5067,7 +5067,7 @@ gsk_gl_shader_node_diff (GskRenderNode *node1,
/**
* gsk_gl_shader_node_new:
* @shader: the #GskGLShader
* @shader: the `GskGLShader`
* @bounds: the rectangle to render the shader into
* @args: Arguments for the uniforms
* @children: (array length=n_children): array of child nodes, these will
@ -5171,7 +5171,7 @@ gsk_gl_shader_node_get_child (const GskRenderNode *node,
*
* Gets shader code for the node.
*
* Returns: (transfer none): the #GskGLShader shader
* Returns: (transfer none): the `GskGLShader` shader
*/
GskGLShader *
gsk_gl_shader_node_get_shader (const GskRenderNode *node)
@ -5187,7 +5187,7 @@ gsk_gl_shader_node_get_shader (const GskRenderNode *node)
*
* Gets args for the node.
*
* Returns: (transfer none): A #GBytes with the uniform arguments
* Returns: (transfer none): A `GBytes` with the uniform arguments
*/
GBytes *
gsk_gl_shader_node_get_args (const GskRenderNode *node)

View File

@ -3019,7 +3019,7 @@ render_node_print (Printer *p,
/**
* gsk_render_node_serialize:
* @node: a #GskRenderNode
* @node: a `GskRenderNode`
*
* Serializes the @node for later deserialization via
* gsk_render_node_deserialize(). No guarantees are made about the format
@ -3031,7 +3031,7 @@ render_node_print (Printer *p,
* The intended use of this functions is testing, benchmarking and debugging.
* The format is not meant as a permanent storage format.
*
* Returns: a #GBytes representing the node.
* Returns: a `GBytes` representing the node.
**/
GBytes *
gsk_render_node_serialize (GskRenderNode *node)

View File

@ -47,7 +47,7 @@ struct _GskRenderNodeClass
/*< private >
* GskRenderNodeTypeInfo:
* @node_type: the render node type in the #GskRenderNodeType enumeration
* @node_type: the render node type in the `GskRenderNodeType` enumeration
* @instance_size: the size of the render node instance
* @instance_init: (nullable): the instance initialization function
* @finalize: (nullable): the instance finalization function; must chain up to the
@ -58,7 +58,7 @@ struct _GskRenderNodeClass
* @diff: (nullable): the function called by gsk_render_node_diff(); if unset,
* gsk_render_node_diff_impossible() will be used
*
* A struction that contains the type information for a #GskRenderNode subclass,
* A struction that contains the type information for a `GskRenderNode` subclass,
* to be used by gsk_render_node_type_register_static().
*/
typedef struct

View File

@ -34,7 +34,7 @@ G_BEGIN_DECLS
* @_w: the width
* @_h: the height
*
* Initializes a #GskRoundedRect when declaring it.
* Initializes a `GskRoundedRect` when declaring it.
* All corner sizes will be initialized to 0.
*/
#define GSK_ROUNDED_RECT_INIT(_x,_y,_w,_h) (GskRoundedRect) { .bounds = GRAPHENE_RECT_INIT(_x,_y,_w,_h), \

View File

@ -96,7 +96,7 @@ gsk_transform_has_class (GskTransform *self,
* the result's category together with &next's category
* @next: (transfer full) (nullable): Next transform to multiply with
*
* Returns: (transfer full): the newly created #GskTransform
* Returns: (transfer full): the newly created `GskTransform`
*/
static gpointer
gsk_transform_alloc (const GskTransformClass *transform_class,
@ -1402,7 +1402,7 @@ gsk_transform_print (GskTransform *self,
/**
* gsk_transform_to_string:
* @self: (nullable): a #GskTransform
* @self: (nullable): a `GskTransform`
*
* Converts a matrix into a string that is suitable for printing.
*
@ -1452,7 +1452,7 @@ gsk_transform_to_matrix (GskTransform *self,
/**
* gsk_transform_to_2d:
* @self: a 2D #GskTransform
* @self: a 2D `GskTransform`
* @out_xx: (out): return location for the xx member
* @out_yx: (out): return location for the yx member
* @out_xy: (out): return location for the xy member
@ -1736,7 +1736,7 @@ gsk_transform_equal (GskTransform *first,
/**
* gsk_transform_get_category:
* @self: (nullable): A #GskTransform
* @self: (nullable): A `GskTransform`
*
* Returns the category this transform belongs to.
*

View File

@ -29,7 +29,7 @@
* @target: the target buffer such as %GL_ARRAY_BUFFER or %GL_UNIFORM_BUFFER
* @element_size: the size of elements within the buffer
*
* Creates a new #GskNglBuffer which can be used to deliver data to shaders
* Creates a new `GskNglBuffer` which can be used to deliver data to shaders
* within a GLSL program. You can use this to store vertices such as with
* %GL_ARRAY_BUFFER or uniform data with %GL_UNIFORM_BUFFER.
*/

View File

@ -633,7 +633,7 @@ gsk_ngl_command_queue_end_draw (GskNglCommandQueue *self)
/**
* gsk_ngl_command_queue_split_draw:
* @self a #GskNglCommandQueue
* @self a `GskNglCommandQueue`
*
* This function is like calling gsk_ngl_command_queue_end_draw() followed by
* a gsk_ngl_command_queue_begin_draw() with the same parameters as a
@ -928,7 +928,7 @@ gsk_ngl_command_queue_sort_batches (GskNglCommandQueue *self)
/**
* gsk_ngl_command_queue_execute:
* @self: a #GskNglCommandQueue
* @self: a `GskNglCommandQueue`
* @surface_height: the height of the backing surface
* @scale_factor: the scale factor of the backing surface
* #scissor: (nullable): the scissor clip if any
@ -1182,7 +1182,7 @@ gsk_ngl_command_queue_begin_frame (GskNglCommandQueue *self)
/**
* gsk_ngl_command_queue_end_frame:
* @self: a #GskNglCommandQueue
* @self: a `GskNglCommandQueue`
*
* This function performs cleanup steps that need to be done after
* a frame has finished. This is not performed as part of the command

View File

@ -129,12 +129,12 @@ typedef struct _GskNglCommandDraw
guint vbo_offset;
/* The offset within the array of uniform changes to be made containing
* @uniform_count #GskNglCommandUniform elements to apply.
* @uniform_count `GskNglCommandUniform` elements to apply.
*/
guint uniform_offset;
/* The offset within the array of bind changes to be made containing
* @bind_count #GskNglCommandBind elements to apply.
* @bind_count `GskNglCommandBind` elements to apply.
*/
guint bind_offset;
} GskNglCommandDraw;

View File

@ -400,7 +400,7 @@ failure:
/**
* gsk_ngl_driver_autorelease_framebuffer:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @framebuffer_id: the id of the OpenGL framebuffer
*
* Marks @framebuffer_id to be deleted when the current frame has cmopleted.
@ -448,14 +448,14 @@ gsk_ngl_driver_new (GskNglCommandQueue *command_queue,
/**
* gsk_ngl_driver_from_shared_context:
* @context: a shared #GdkGLContext retrieved with gdk_gl_context_get_shared_context()
* @context: a shared `GdkGLContext` retrieved with gdk_gl_context_get_shared_context()
* @debug_shaders: if debug information for shaders should be displayed
* @error: location for error information
*
* Retrieves a driver for a shared context. Generally this is shared across all GL
* contexts for a display so that fewer programs are necessary for driving output.
*
* Returns: (transfer full): a #GskNglDriver if successful; otherwise %NULL and
* Returns: (transfer full): a `GskNglDriver` if successful; otherwise %NULL and
* @error is set.
*/
GskNglDriver *
@ -528,8 +528,8 @@ gsk_ngl_driver_compact_atlases (GskNglDriver *self)
/**
* gsk_ngl_driver_begin_frame:
* @self: a #GskNglDriver
* @command_queue: A #GskNglCommandQueue from the renderer
* @self: a `GskNglDriver`
* @command_queue: A `GskNglCommandQueue` from the renderer
*
* Begin a new frame.
*
@ -584,7 +584,7 @@ gsk_ngl_driver_begin_frame (GskNglDriver *self,
/**
* gsk_ngl_driver_end_frame:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
*
* Clean up resources from drawing the current frame.
*
@ -604,7 +604,7 @@ gsk_ngl_driver_end_frame (GskNglDriver *self)
/**
* gsk_ngl_driver_after_frame:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
*
* This function does post-frame cleanup operations.
*
@ -661,7 +661,7 @@ gsk_ngl_driver_get_context (GskNglDriver *self)
/**
* gsk_ngl_driver_cache_texture:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @key: the key for the texture
* @texture_id: the id of the texture to be cached
*
@ -693,13 +693,13 @@ gsk_ngl_driver_cache_texture (GskNglDriver *self,
/**
* gsk_ngl_driver_load_texture:
* @self: a #GdkTexture
* @texture: a #GdkTexture
* @self: a `GdkTexture`
* @texture: a `GdkTexture`
* @min_filter: GL_NEAREST or GL_LINEAR
* @mag_filter: GL_NEAREST or GL_LINEAR
*
* Loads a #GdkTexture by uploading the contents to the GPU when
* necessary. If @texture is a #GdkGLTexture, it can be used without
* Loads a `GdkTexture` by uploading the contents to the GPU when
* necessary. If @texture is a `GdkGLTexture`, it can be used without
* uploading contents to the GPU.
*
* If the texture has already been uploaded and not yet released
@ -807,7 +807,7 @@ gsk_ngl_driver_load_texture (GskNglDriver *self,
/**
* gsk_ngl_driver_create_texture:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @width: the width of the texture
* @height: the height of the texture
* @min_filter: GL_NEAREST or GL_LINEAR
@ -820,7 +820,7 @@ gsk_ngl_driver_load_texture (GskNglDriver *self,
* Use gsk_ngl_driver_release_texture() to release this texture back into
* the pool so it may be reused later in the pipeline.
*
* Returns: a #GskNglTexture which can be returned to the pool with
* Returns: a `GskNglTexture` which can be returned to the pool with
* gsk_ngl_driver_release_texture().
*/
GskNglTexture *
@ -846,8 +846,8 @@ gsk_ngl_driver_create_texture (GskNglDriver *self,
/**
* gsk_ngl_driver_release_texture:
* @self: a #GskNglDriver
* @texture: a #GskNglTexture
* @self: a `GskNglDriver`
* @texture: a `GskNglTexture`
*
* Releases @texture back into the pool so that it can be used later
* in the command stream by future batches. This helps reduce VRAM
@ -876,7 +876,7 @@ gsk_ngl_driver_release_texture (GskNglDriver *self,
/**
* gsk_ngl_driver_create_render_target:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @width: the width for the render target
* @height: the height for the render target
* @min_filter: the min filter to use for the texture
@ -955,8 +955,8 @@ gsk_ngl_driver_create_render_target (GskNglDriver *self,
/**
* gsk_ngl_driver_release_render_target:
* @self: a #GskNglDriver
* @render_target: a #GskNglRenderTarget created with
* @self: a `GskNglDriver`
* @render_target: a `GskNglRenderTarget` created with
* gsk_ngl_driver_create_render_target().
* @release_texture: if the texture should also be released
*
@ -1014,15 +1014,15 @@ gsk_ngl_driver_release_render_target (GskNglDriver *self,
/**
* gsk_ngl_driver_lookup_shader:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @shader: the shader to lookup or load
* @error: a location for a #GError
* @error: a location for a `GError`
*
* Attepts to load @shader from the shader cache.
*
* If it has not been loaded, then it will compile the shader on demand.
*
* Returns: (nullable) (transfer none): a #GskGLShader
* Returns: (nullable) (transfer none): a `GskGLShader`
*/
GskNglProgram *
gsk_ngl_driver_lookup_shader (GskNglDriver *self,

View File

@ -198,7 +198,7 @@ gsk_ngl_driver_get_texture_by_id (GskNglDriver *self,
/**
* gsk_ngl_driver_lookup_texture:
* @self: a #GskNglDriver
* @self: a `GskNglDriver`
* @key: the key for the texture
*
* Looks up a texture in the texture cache by @key.

View File

@ -80,7 +80,7 @@ gsk_ngl_program_init (GskNglProgram *self)
/**
* gsk_ngl_program_add_uniform:
* @self: a #GskNglProgram
* @self: a `GskNglProgram`
* @name: the name of the uniform such as "u_source"
* @key: the identifier to use for the uniform
*
@ -134,7 +134,7 @@ gsk_ngl_program_add_uniform (GskNglProgram *self,
/**
* gsk_ngl_program_delete:
* @self: a #GskNglProgram
* @self: a `GskNglProgram`
*
* Deletes the GLSL program.
*
@ -153,7 +153,7 @@ gsk_ngl_program_delete (GskNglProgram *self)
/**
* gsk_ngl_program_uniforms_added:
* @self: a #GskNglProgram
* @self: a `GskNglProgram`
* @has_attachments: if any uniform is for a bind/texture attachment
*
* This function should be called after all of the uniforms ahve

View File

@ -66,7 +66,7 @@ G_DEFINE_TYPE (GskNglRenderer, gsk_ngl_renderer, GSK_TYPE_RENDERER)
/**
* gsk_ngl_renderer_new:
*
* Creates a new #GskRenderer using the new OpenGL renderer.
* Creates a new `GskRenderer` using the new OpenGL renderer.
*
* Returns: a new NGL renderer
*

View File

@ -519,7 +519,7 @@ gsk_ngl_uniform_state_set_matrix (GskNglUniformState *state,
/**
* gsk_ngl_uniform_state_set_texture:
* @state: a #GskNglUniformState
* @state: a `GskNglUniformState`
* @program: the program id
* @location: the location of the texture
* @texture_slot: a texturing slot such as GL_TEXTURE0
@ -559,7 +559,7 @@ gsk_ngl_uniform_state_set_texture (GskNglUniformState *state,
/**
* gsk_ngl_uniform_state_set_color:
* @state: a #GskNglUniformState
* @state: a `GskNglUniformState`
* @program: a program id > 0
* @location: the uniform location
* @color: a color to set or %NULL for transparent
@ -724,9 +724,9 @@ gsk_ngl_uniform_state_fmix (guint program,
* @info: the uniform info
*
* This function can be used to apply state that was previously recorded
* by the #GskNglUniformState.
* by the `GskNglUniformState`.
*
* It is specifically useful from the GskNglCommandQueue to execute uniform
* It is specifically useful from the `GskNglCommandQueue` to execute uniform
* changes but only when they have changed from the current value.
*/
static inline void