Exemplo n.º 1
0
    def register_types(self, adapkg):
        """If we are going to generate some enumerations in the package, we
           need to register them now, so that all places where the enumeration
           is referenced have the proper full name.

           adapkg is the name of the Ada package.
        """

        if self.node:
            for enum in self.node.findall("enum"):
                Enum.register_ada_decl(pkg=adapkg,
                                       ctype=enum.get("ctype"),
                                       ada=enum.get("ada", None))
            for rec in self.node.findall("record"):
                Record.register_ada_record(pkg=adapkg,
                                           ctype=rec.get("ctype"),
                                           ada=rec.get("ada", None))
            for rec in self.node.findall("list"):
                List.register_ada_list(pkg=adapkg,
                                       ctype=rec.get("ctype"),
                                       ada=rec.get("ada", None))
            for rec in self.node.findall("slist"):
                List.register_ada_list(pkg=adapkg,
                                       ctype=rec.get("ctype"),
                                       ada=rec.get("ada", None),
                                       single=True)
Exemplo n.º 2
0
    def register_types(self, adapkg):
        """If we are going to generate some enumerations in the package, we
           need to register them now, so that all places where the enumeration
           is referenced have the proper full name.

           adapkg is the name of the Ada package.
        """

        if self.node:
            for enum in self.node.findall("enum"):
                Enum.register_ada_decl(pkg=adapkg,
                                       ctype=enum.get("ctype"),
                                       ada=enum.get("ada", None))
            for rec in self.node.findall("record"):
                Record.register_ada_record(
                    pkg=adapkg,
                    ctype=rec.get("ctype"),
                    ada=rec.get("ada", None))
            for rec in self.node.findall("list"):
                List.register_ada_list(
                    pkg=adapkg,
                    ctype=rec.get("ctype"),
                    ada=rec.get("ada", None))
            for rec in self.node.findall("slist"):
                List.register_ada_list(
                    pkg=adapkg,
                    ctype=rec.get("ctype"),
                    ada=rec.get("ada", None),
                    single=True)
Exemplo n.º 3
0
    Proxy("Gssize"),
    "gunichar":
    Proxy("Gunichar"),
    "gchar":
    Proxy("Gchar"),
    "guchar":
    Proxy("Guchar"),
    "GAppInfo":
    Proxy("Glib.GApp_Info"),

    # These should not be necessary, but if we don't put them the gnerated
    # binding is wrong (for instance we end up passing Gdk_Event_Record as
    # parameters to functions, or Gdk_RGBA directly to C)
    "GdkRGBA":
    Record(
        "Gdk.RGBA.Gdk_RGBA",  # impose casing
        "Gdk.RGBA.Property_RGBA"),
    "GdkRGBA*":
    Proxy("Gdk.RGBA.Gdk_RGBA", "Gdk.RGBA.Property_RGBA",
          "Gdk.RGBA.Gdk_RGBA_Or_Null"),
    "GdkEvent*":
    Proxy("Gdk.Event.Gdk_Event", ""),
    "GIOChannel*":
    Proxy("Glib.IOChannel.Giochannel", ""),
    "cairo_t*":
    Proxy("Cairo.Cairo_Context"),
    "cairo_format_t":
    Proxy("Cairo.Cairo_Format"),
    "cairo_rectangle_int_t*":
    Proxy("Cairo.Region.Cairo_Rectangle_Int"),
    "cairo_content_t":