+type typedef = {
+ td_loc : Camlp4.PreCast.Loc.t;
+ td_name : string;
+ td_type : ptype;
+}
+(** A typedef. *)
+
+type enum = {
+ en_loc : Camlp4.PreCast.Loc.t;
+ en_name : string;
+ en_identifiers : string array;
+}
+(** An enum. *)
+
+type struct_decl = {
+ sd_loc : Camlp4.PreCast.Loc.t;
+ sd_name : string;
+ sd_identifiers : string array;
+ sd_fields : ptype array;
+}
+(** A struct declaration. *)
+
+type union = {
+ un_loc : Camlp4.PreCast.Loc.t;
+ un_name : string;
+ un_identifiers : string array;
+ un_fields : ptype array;
+}
+(** A qualified union declaration. *)
+
+type api = {
+ api_typedefs : typedef Wrappi_utils.StringMap.t;
+ api_enums : enum Wrappi_utils.StringMap.t;
+ api_structs : struct_decl Wrappi_utils.StringMap.t;
+ api_unions : union Wrappi_utils.StringMap.t;
+ api_entry_points : entry_point Wrappi_utils.StringMap.t;
+}
+(** This single structure describes the whole API. Each map is from
+ name of thing -> thing. *)
+
+val iter_typedefs : api -> (typedef -> unit) -> unit
+val iter_enums : api -> (enum -> unit) -> unit
+val iter_structs : api -> (struct_decl -> unit) -> unit
+val iter_unions : api -> (union -> unit) -> unit
+val iter_entry_points : api -> (entry_point -> unit) -> unit
+(** For convenience, iteration always presents the objects in name order. *)
+
+val string_of_ptype : ptype -> string
+val string_of_rtype : rtype -> string