c_api_application.h - Engine C API Reference

c_api_application.h
  1. #pragma once
  2. #include "c_api_types.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. struct ApplicationCApi
  7. {
  8. unsigned (*num_worlds) ();
  9. WorldPtr (*world) (unsigned index);
  10. WorldPtr (*new_world) (ConstWorldConfigPtr optional);
  11. WorldPtr (*main_world) ();
  12. void (*release_world) (WorldPtr);
  13. void (*render_world) (WorldPtr, ConstCameraPtr, ConstViewportPtr, ConstShadingEnvironmentPtr, ConstWindowPtr optional);
  14. CApiWorldConfig (*get_default_world_settings) ();
  15. const char* (*build) ();
  16. const char* (*platform) ();
  17. const char* (*build_identifier) ();
  18. const char* (*sysinfo) ();
  19. ConstConfigRootPtr (*settings_root) ();
  20. ViewportPtr (*create_viewport) (WorldPtr, unsigned viewport_template_name_id32);
  21. void (*destroy_viewport) (WorldPtr, ViewportPtr);
  22. unsigned (*can_get) (uint64_t type_id64, uint64_t name_id64);
  23. void (*quit) (int exit_code);
  24. double (*time_since_launch) ();
  25. void (*sleep) (unsigned milliseconds);
  26. void (*set_time_step_policy) (const struct TimeStepPolicyWrapper* const policies, unsigned num_policies);
  27. struct TimeStepPolicyWrapper (*get_time_step_policy) (enum TimeStepPolicyType type);
  28. /* The argv strings will be returned through the MultipleStringsBuffer you provide.
  29. The function call returns the total number of bytes required to store all argv in the buffer. */
  30. unsigned (*argv) (struct MultipleStringsBuffer* const out_result, unsigned buffer_size);
  31. };
  32. #ifdef __cplusplus
  33. }
  34. #endif