[gtk/ebassi/gidocgen] glshader: Add property annotations



commit 1d87108f6e6d50de247a749a3dfe74817225de20
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 25 06:59:13 2021 -0500

    glshader: Add property annotations
    
    Connect properties, getters, and setters with annotations

 gsk/gskglshader.c | 20 +++++++++-----------
 gsk/gskglshader.h |  5 -----
 2 files changed, 9 insertions(+), 16 deletions(-)
---
diff --git a/gsk/gskglshader.c b/gsk/gskglshader.c
index fcb1bda007..a2cbd68ab7 100644
--- a/gsk/gskglshader.c
+++ b/gsk/gskglshader.c
@@ -17,9 +17,7 @@
  */
 
 /**
- * SECTION:gskglshader
- * @Title: GskGLShader
- * @Short_description: Fragment shaders for GSK
+ * GskGLShader:
  *
  * A `GskGLShader` is a snippet of GLSL that is meant to run in the
  * fragment shader of the rendering pipeline.
@@ -440,7 +438,7 @@ gsk_gl_shader_class_init (GskGLShaderClass *klass)
   object_class->constructed = gsk_gl_shader_constructed;
 
   /**
-   * GskGLShader:sourcecode:
+   * GskGLShader:sourcecode: (attributes org.gtk.Property.get=gsk_gl_shader_get_source)
    *
    * The source code for the shader, as a `GBytes`.
    */
@@ -454,7 +452,7 @@ gsk_gl_shader_class_init (GskGLShaderClass *klass)
                         G_PARAM_STATIC_STRINGS);
 
   /**
-   * GskGLShader:resource:
+   * GskGLShader:resource: (attributes org.gtk.Property.get=gsk_gl_shader_get_resource)
    *
    * Resource containing the source code for the shader.
    *
@@ -481,9 +479,9 @@ gsk_gl_shader_init (GskGLShader *shader)
 
 /**
  * gsk_gl_shader_new_from_bytes:
- * @sourcecode: GLSL sourcecode for the shader, as a #GBytes
+ * @sourcecode: GLSL sourcecode for the shader, as a `GBytes`
  *
- * Creates a #GskGLShader that will render pixels using the specified code.
+ * Creates a `GskGLShader` that will render pixels using the specified code.
  *
  * Returns: (transfer full): A new `GskGLShader`
  */
@@ -518,8 +516,8 @@ gsk_gl_shader_new_from_resource (const char *resource_path)
 
 /**
  * gsk_gl_shader_compile:
- * @shader: a #GskGLShader
- * @renderer: a #GskRenderer
+ * @shader: a `GskGLShader`
+ * @renderer: a `GskRenderer`
  * @error: location to store error in
  *
  * Tries to compile the @shader for the given @renderer.
@@ -555,7 +553,7 @@ gsk_gl_shader_compile (GskGLShader  *shader,
 
 
 /**
- * gsk_gl_shader_get_source:
+ * gsk_gl_shader_get_source: (attributes org.gtk.Method.get_property=sourcecode)
  * @shader: a `GskGLShader`
  *
  * Gets the GLSL sourcecode being used to render this shader.
@@ -571,7 +569,7 @@ gsk_gl_shader_get_source (GskGLShader *shader)
 }
 
 /**
- * gsk_gl_shader_get_resource:
+ * gsk_gl_shader_get_resource: (attributes org.gtk.Method.get_property=resource)
  * @shader: a `GskGLShader`
  *
  * Gets the resource path for the GLSL sourcecode being used
diff --git a/gsk/gskglshader.h b/gsk/gskglshader.h
index 2e98e5cb12..8327d13832 100644
--- a/gsk/gskglshader.h
+++ b/gsk/gskglshader.h
@@ -41,11 +41,6 @@ typedef struct _GskShaderArgsBuilder GskShaderArgsBuilder;
 
 #define GSK_TYPE_GL_SHADER (gsk_gl_shader_get_type ())
 
-/**
- * GskGLShader:
- *
- * An object representing a GL shader program.
- */
 GDK_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (GskGLShader, gsk_gl_shader, GSK, GL_SHADER, GObject)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]