-
Notifications
You must be signed in to change notification settings - Fork 100
/
nk.yml
106 lines (102 loc) · 4.02 KB
/
nk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
GENERATOR:
PackageName: nk
PackageDescription: "Package nk provides Go bindings for nuklear.h — a small ANSI C gui library."
PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
Includes: ["nk.h"]
Options:
SafeStrings: true
StructAccessors: true
PARSER:
IncludePaths: ["/usr/include", "/usr/local/include"]
SourcesPaths: ["nk/nuklear.h", "nk/nk.h"]
Defines:
NK_INCLUDE_FIXED_TYPES: 1
NK_INCLUDE_STANDARD_IO: 1
NK_INCLUDE_DEFAULT_ALLOCATOR: 1
NK_INCLUDE_FONT_BAKING: 1
NK_INCLUDE_DEFAULT_FONT: 1
NK_INCLUDE_VERTEX_BUFFER_OUTPUT: 1
TRANSLATOR:
ConstRules:
defines: expand
enum: expand
MemTips:
- {target: "draw_begin$", self: raw}
- {target: "draw_end$", self: raw}
- {target: "item_getter$", self: raw}
- {target: "value_getter$", self: raw}
- {target: "_user", self: bind}
- {target: "_draw_vertex_layout_element", self: bind}
- {target: "_convert_config", self: bind}
- {target: "nk_plugin_", self: bind}
- {target: "nk_text_width_f", self: bind}
- {target: "nk_query_font_glyph_f", self: bind}
- {target: "nk_", self: raw}
TypeTips:
function:
- {target: _(hsv|rgb)_bv$, tips: [plain,plain,plain,0]}
- {target: _(hsv|rgb)a_bv$, tips: [plain,plain,plain,0]}
- {target: _(hsv|rgb)_b$, tips: [plain,plain,plain,0]}
- {target: _(hsv|rgb)a_b$, tips: [plain,plain,plain,0]}
PtrTips:
function:
- {target: "_color_fv$", tips: [arr,0]}
- {target: "_color_dv$", tips: [arr,0]}
- {target: "_color_hex_rgba$", tips: [arr,0]}
- {target: "_color_hex_rgb$", tips: [arr,0]}
- {target: "_color_hsv_iv$", tips: [arr,0]}
- {target: "_color_hsv_bv$", tips: [arr,0]}
- {target: "_color_hsv_fv$", tips: [arr,0]}
- {target: "_color_hsva_iv$", tips: [arr,0]}
- {target: "_color_hsva_bv$", tips: [arr,0]}
- {target: "_color_hsva_fv$", tips: [arr,0]}
- {target: "_edit_string$", tips: [ref,0,arr,ref,0,0]}
- {target: "_edit_string_zero_terminated$", tips: [ref,0,arr,0,0]}
- {target: "_font_atlas_add_from_memory$", tips: [ref,ref,size,0,ref]}
- {target: "_convert$", tips: [ref,ref,ref,ref,ref]}
- {target: "^nk_style_from_table$", tips: [sref,arr]}
- {target: "^nk_stroke_polygon$", tips: [sref,arr,size,0,0]}
- {target: "^nk_stroke_polyline$", tips: [sref,arr,size,0,0]}
- {target: "^nk_fill_polygon$", tips: [sref,arr,size,0,0]}
- {target: "^nk_draw_text$", tips: [sref,0,0,0,sref,sref,sref]}
- {target: "nk_", tips: [sref,sref,sref,sref]} # defaults
Rules:
global:
- {transform: lower}
- {action: accept, from: "^nk_"}
- {transform: export}
const:
- {action: accept, from: "(?i)^nk_"}
- {action: replace, from: "(?i)^nk_", to: _}
- {action: ignore, from: _INT8}
- {action: ignore, from: _UINT8}
- {action: ignore, from: _INT16}
- {action: ignore, from: _UINT16}
- {action: ignore, from: _INT32}
- {action: ignore, from: _UINT32}
- {action: ignore, from: _SIZE_TYPE}
- {action: ignore, from: _POINTER_TYPE}
- {action: ignore, from: _API}
- {action: ignore, from: _INTERN}
- {action: ignore, from: _STORAGE}
- {action: ignore, from: _GLOBAL}
- {action: ignore, from: _VERTEX_LAYOUT_END}
- {action: replace, from: ^_command_, to: _command_type_}
- {action: replace, from: "_rgb$", to: _color_format_RGB}
- {action: replace, from: "_rgba$", to: _color_format_RGBA}
function:
# - {action: ignore, from: "(?i)nk_str"}
- {action: ignore, from: "_plot_function$"}
- {action: ignore, from: "_combo_callback$"}
- {action: ignore, from: "_combobox_callback$"}
- {action: ignore, from: "_input_glyph$"}
- {action: ignore, from: "_draw_list_clear$"}
type:
- {action: replace, from: "^Nk_", to: _}
- {action: replace, from: "_t$"}
private:
- {transform: unexport}
post-global:
- {action: replace, from: _$}
- {load: snakecase}