Shell.h 780 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <RmlUi/Core/Context.h>
  3. #include <RmlUi/Core/Input.h>
  4. #include <RmlUi/Core/Types.h>
  5. /**
  6. Provides common functionality required for the built-in RmlUi samples.
  7. */
  8. namespace Shell {
  9. // Initializes and sets a custom file interface used for locating the included RmlUi asset files.
  10. bool Initialize();
  11. // Destroys all resources constructed by the shell.
  12. void Shutdown();
  13. // Loads the fonts included with the RmlUi samples.
  14. void LoadFonts();
  15. // Process key down events to handle shortcuts common to all samples.
  16. // @return True if the event is still propagating, false if it was handled here.
  17. bool ProcessKeyDownShortcuts(Rml::Context* context, Rml::Input::KeyIdentifier key, int key_modifier, float native_dp_ratio, bool priority);
  18. } // namespace Shell