os_window_android.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (c) 2012-2014 Daniele Bartolini and individual contributors.
  3. * License: https://github.com/taylor001/crown/blob/master/LICENSE
  4. */
  5. #pragma once
  6. #include <sys/types.h>
  7. #include <android/native_window.h>
  8. #include <android/native_window_jni.h>
  9. namespace crown
  10. {
  11. class OsWindow
  12. {
  13. public:
  14. /// Stub method, does nothing under Android.
  15. OsWindow();
  16. ~OsWindow();
  17. /// Stub method, does nothing under Android.
  18. void show();
  19. /// Stub method, does nothing under Android.
  20. void hide();
  21. /// Returns the size in pixel of the window.
  22. void get_size(uint32_t& width, uint32_t& height);
  23. /// Returns always (0, 0) under Android.
  24. void get_position(uint32_t& x, uint32_t& y);
  25. /// Stub method, does nothing under Android.
  26. void resize(uint32_t width, uint32_t height);
  27. /// Stub method, does nothing under Android.
  28. void move(uint32_t x, uint32_t y);
  29. /// Stub method, does nothing under Android.
  30. void minimize();
  31. /// Stub method, does nothing under Android.
  32. void restore();
  33. /// Returns always false.
  34. bool is_resizable() const;
  35. /// Stub method, does nothing under Android.
  36. void set_resizable(bool resizeable);
  37. /// Stub method, does nothing under Android.
  38. void show_cursor(bool show);
  39. /// Stub method, does nothing under Android.
  40. void get_cursor_xy(int32_t& x, int32_t& y);
  41. /// Stub method, does nothing under Android.
  42. void set_cursor_xy(int32_t x, int32_t y);
  43. /// Returns always NULL under Android.
  44. char* title();
  45. /// Stub method, does nothing under Android.
  46. void set_title(const char* title);
  47. /// Stub method, does nothing under Android.
  48. void frame();
  49. public:
  50. uint32_t m_x;
  51. uint32_t m_y;
  52. uint32_t m_width;
  53. uint32_t m_height;
  54. };
  55. } // namespace crown