[gtk/ngl-is-the-new-gl: 4/5] Maintain abi




commit 7a1644bc972d407ee2a106ccff7d11cad100b243
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 7 00:50:27 2021 -0400

    Maintain abi
    
    Keep gsk_ngl_renderer_new and gsk_ngl_renderer_get_type,
    since they were part of the abi in 4.2, and in an
    installed header.
    
    Fixes: #4318

 gsk/gl/gskglrenderer.c | 21 +++++++++++++++++++++
 gsk/gl/gskglrenderer.h |  4 ++++
 2 files changed, 25 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index e5613709a7..7d0eebfaa7 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -320,3 +320,24 @@ gsk_gl_renderer_try_compile_gl_shader (GskGLRenderer  *renderer,
 
   return program != NULL;
 }
+
+GType
+gsk_ngl_renderer_get_type (void)
+{
+  return gsk_gl_renderer_get_type ();
+}
+
+/**
+ * gsk_ngl_renderer_new:
+ *
+ * Same as gsk_gl_renderer_new().
+ *
+ * Returns: (transfer full): a new GL renderer
+ *
+ * Deprecated: 4.4: Use gsk_gl_renderer_new()
+ */
+GskRenderer *
+gsk_ngl_renderer_new (void)
+{
+  return gsk_gl_renderer_new ();
+}
diff --git a/gsk/gl/gskglrenderer.h b/gsk/gl/gskglrenderer.h
index 50fa134d2d..818848479f 100644
--- a/gsk/gl/gskglrenderer.h
+++ b/gsk/gl/gskglrenderer.h
@@ -41,6 +41,10 @@ GType        gsk_gl_renderer_get_type (void) G_GNUC_CONST;
 GDK_AVAILABLE_IN_4_2
 GskRenderer *gsk_gl_renderer_new      (void);
 
+GDK_DEPRECATED_IN_4_4_FOR (gsk_gl_renderer_get_type)
+GType        gsk_ngl_renderer_get_type (void) G_GNUC_CONST;
+GDK_DEPRECATED_IN_4_4_FOR (gsk_gl_renderer_new)
+GskRenderer *gsk_ngl_renderer_new      (void);
 G_END_DECLS
 
 #endif /* __GSK_GL_RENDERER__ */


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