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
    "GdkAtom":
    Proxy("Gdk.Types.Gdk_Atom"),
    "GVariantType":
    Proxy("Glib.Variant.Gvariant_Type"),
    "GVariantType*":
    Proxy("Glib.Variant.Gvariant_Type"),
    "GVariantIter":
    Proxy("Glib.Variant.Gvariant_Iter"),

    # Proper generation of lists
    "GdkEventSequence":
    Proxy("Gdk.Event.Gdk_Event_Sequence"),

    # Specific to this binding generator (referenced from binding.xml)
    "VisualList":
    List("Gdk.Visual.Gdk_Visual_List.Glist"),
    "ObjectList":
    List("Glib.Object.Object_Simple_List.Glist"),
    "ObjectSList":
    List("Glib.Object.Object_List.GSlist"),
    "StringList":
    List("Gtk.Enums.String_List.Glist"),
    "StringSList":
    List("Gtk.Enums.String_SList.GSlist"),
    "TreePathList":
    List("Gtk.Tree_Model.Gtk_Tree_Path_List.Glist"),
    "TextTagList":
    List("Gtk.Text_Tag.Text_Tag_List.GSlist"),
    "DeviceList":
    List("Gdk.Device.Device_List.Glist"),
    "gpointer":