Index: sky/engine/bindings/scripts/templates/interface_dart.template |
diff --git a/sky/engine/bindings/scripts/templates/interface_dart.template b/sky/engine/bindings/scripts/templates/interface_dart.template |
index 7576a537c4b52082668a213a10438b9fcbff6df0..d0622c33d23cb7f0206be839de7314f73a3d3910 100644 |
--- a/sky/engine/bindings/scripts/templates/interface_dart.template |
+++ b/sky/engine/bindings/scripts/templates/interface_dart.template |
@@ -19,8 +19,10 @@ part of dart.sky; |
{%- endfor -%} |
{%- endmacro -%} |
+{%- set prefix = "_" if custom_dartcode else "" -%} |
{% if not constructors and not custom_constructors %}abstract {% endif -%} |
-class {{interface_name}} extends {{ parent_interface if parent_interface else 'NativeFieldWrapperClass2' }} { |
+class {{prefix}}{{interface_name}} extends |
+ {{ parent_interface if parent_interface else 'NativeFieldWrapperClass2' }} { |
// Constructors |
{# TODO(eseidel): We only ever have one constructor. #} |
{%- for constructor in constructors + custom_constructors %} |
@@ -38,15 +40,15 @@ class {{interface_name}} extends {{ parent_interface if parent_interface else 'N |
// Attributes |
{% for attribute in attributes %} |
- {{ attribute.dart_type }} get {{ attribute.name }} native "{{interface_name}}_{{ attribute.name }}_Getter"; |
+ {{ attribute.dart_type }} get {{prefix}}{{ attribute.name }} native "{{interface_name}}_{{ attribute.name }}_Getter"; |
{% if not attribute.is_read_only %} |
- void set {{ attribute.name }}({{ attribute.dart_type }} value) native "{{interface_name}}_{{ attribute.name }}_Setter"; |
+ void set {{prefix}}{{ attribute.name }}({{ attribute.dart_type }} value) native "{{interface_name}}_{{ attribute.name }}_Setter"; |
{% endif %} |
{% endfor %} |
// Methods |
{% for method in methods %} |
- {{method.dart_type}} {{method.name}}({{ args_macro(method.arguments)}}) native "{{interface_name}}_{{ method.name }}_Callback"; |
+ {{method.dart_type}} {{prefix}}{{method.name}}({{ args_macro(method.arguments)}}) native "{{interface_name}}_{{ method.name }}_Callback"; |
{% endfor %} |
// Operators |
@@ -57,3 +59,5 @@ class {{interface_name}} extends {{ parent_interface if parent_interface else 'N |
void operator[]=(String name, String value) native "{{interface_name}}___setter___Callback"; |
{% endif %} |
} |
+ |
+{{custom_dartcode}} |