]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Support interface aliases
authorLuca Bruno <lucabru@src.gnome.org>
Mon, 31 Mar 2014 21:44:57 +0000 (23:44 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 31 Mar 2014 21:44:57 +0000 (23:44 +0200)
vala/valagirparser.vala
vapi/cogl-pango-1.0.vapi

index e1f4f9dbd819da3c54d7c998fb2442a892a82972..a50879dcd0f9b8bea3af819817e89330c51d72ee 100644 (file)
@@ -3352,6 +3352,16 @@ public class Vala.GirParser : CodeVisitor {
                        cl.comment = alias.comment;
                        cl.external = true;
                        alias.symbol = cl;
+               } else if (type_sym is Interface) {
+                       // this is not a correct alias, but what can we do otherwise?
+                       var iface = new Interface (alias.name, alias.source_reference);
+                       iface.access = SymbolAccessibility.PUBLIC;
+                       if (base_type != null) {
+                               iface.add_prerequisite (base_type);
+                       }
+                       iface.comment = alias.comment;
+                       iface.external = true;
+                       alias.symbol = iface;
                } else if (type_sym is Delegate) {
                        var orig = (Delegate) type_sym;
                        if (base_node != null) {
index 20e0ae51eef3b473ddb2573b3e8d4d0ab6aa6184..689e2a08bc19eab75cd308e9cf5e2c5b19f0d849 100644 (file)
@@ -2,18 +2,6 @@
 
 [CCode (cprefix = "CoglPango", gir_namespace = "CoglPango", gir_version = "1.0", lower_case_cprefix = "cogl_pango_")]
 namespace CoglPango {
-       [CCode (cheader_filename = "cogl-pango/cogl-pango.h")]
-       public class FontMap : Pango.FontMap {
-               [CCode (has_construct_function = false)]
-               protected FontMap ();
-               public static void clear_glyph_cache (Pango.CairoFontMap font_map);
-               public static Pango.Context create_context (Pango.CairoFontMap font_map);
-               public static unowned Pango.Renderer get_renderer (Pango.CairoFontMap font_map);
-               public static Cogl.Bool get_use_mipmapping (Pango.CairoFontMap font_map);
-               public static Pango.FontMap @new ();
-               public static void set_resolution (Pango.CairoFontMap font_map, double dpi);
-               public static void set_use_mipmapping (Pango.CairoFontMap font_map, Cogl.Bool value);
-       }
        [CCode (cheader_filename = "cogl-pango/cogl-pango.h", type_id = "cogl_pango_renderer_get_type ()")]
        public class Renderer : Pango.Renderer {
                [CCode (has_construct_function = false)]
@@ -21,6 +9,16 @@ namespace CoglPango {
                public void* context { construct; }
        }
        [CCode (cheader_filename = "cogl-pango/cogl-pango.h")]
+       public interface FontMap : Pango.CairoFontMap, GLib.Object {
+               public static void clear_glyph_cache (CoglPango.FontMap font_map);
+               public static Pango.Context create_context (CoglPango.FontMap font_map);
+               public static unowned Pango.Renderer get_renderer (CoglPango.FontMap font_map);
+               public static Cogl.Bool get_use_mipmapping (CoglPango.FontMap font_map);
+               public static Pango.FontMap @new ();
+               public static void set_resolution (CoglPango.FontMap font_map, double dpi);
+               public static void set_use_mipmapping (CoglPango.FontMap font_map, Cogl.Bool value);
+       }
+       [CCode (cheader_filename = "cogl-pango/cogl-pango.h")]
        public static void ensure_glyph_cache_for_layout (Pango.Layout layout);
        [CCode (cheader_filename = "cogl-pango/cogl-pango.h")]
        [Deprecated (since = "1.16")]