gdnative.c.tmpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {{ $view := . -}}
  2. // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
  3. // Copyright © 2017 - William Edwards
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. #include "gdnative.gen.h"
  17. #include <gdnative/aabb.h>
  18. #include <gdnative/array.h>
  19. #include <gdnative/basis.h>
  20. #include <gdnative/color.h>
  21. #include <gdnative/dictionary.h>
  22. #include <gdnative/gdnative.h>
  23. #include <gdnative/node_path.h>
  24. #include <gdnative/plane.h>
  25. #include <gdnative/pool_arrays.h>
  26. #include <gdnative/quat.h>
  27. #include <gdnative/rect2.h>
  28. #include <gdnative/rid.h>
  29. #include <gdnative/string.h>
  30. #include <gdnative/string_name.h>
  31. #include <gdnative/transform.h>
  32. #include <gdnative/transform2d.h>
  33. #include <gdnative/variant.h>
  34. #include <gdnative/vector2.h>
  35. #include <gdnative/vector3.h>
  36. #include <gdnative_api_struct.gen.h>
  37. /*------------------------------------------------------------------------------
  38. // This file was autogenerated by PimPam GDNative-Go binding tools
  39. // Please do not modify this file, any change will be lost
  40. //----------------------------------------------------------------------------*/
  41. {{/* Define the Core API */}}
  42. /* GDNative {{ $view.API.Type }} {{ $view.API.Version.Major }}.{{ $view.API.Version.Minor }} */
  43. {{ range $i, $api := $view.API.API -}}
  44. {{ $api.ReturnType }} go_{{ $api.Name }}(godot_gdnative_{{ $view.StructType }}_api_struct * p_api{{ if ($view.HasArgs $api.Arguments) }}, {{ end }}{{ range $j, $arg := $api.Arguments }}{{ index $arg 0 }} {{ index $arg 1 }}{{ if ($view.NotLastElement $j $api.Arguments) }}, {{ end }}{{ end }}) {
  45. {{ if ($view.NotVoid $api.ReturnType) }}return {{ end }}p_api->{{ $api.Name }}({{ range $j, $arg := $api.Arguments }}{{ index $arg 1 }}{{ if ($view.NotLastElement $j $api.Arguments) }}, {{ end }}{{ end }});
  46. }
  47. {{ end -}}