From: Luca Bruno Date: Mon, 31 Mar 2014 21:44:57 +0000 (+0200) Subject: girparser: Support interface aliases X-Git-Tag: 0.25.1~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b556bfe84ce5ad659e2e944a010a9d5c927a7b6;p=thirdparty%2Fvala.git girparser: Support interface aliases --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index e1f4f9dbd..a50879dcd 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -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) { diff --git a/vapi/cogl-pango-1.0.vapi b/vapi/cogl-pango-1.0.vapi index 20e0ae51e..689e2a08b 100644 --- a/vapi/cogl-pango-1.0.vapi +++ b/vapi/cogl-pango-1.0.vapi @@ -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")]