1
0

obs-nix-platform.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /******************************************************************************
  2. Copyright (C) 2019 by Jason Francis <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ******************************************************************************/
  14. #pragma once
  15. #include "util/c99defs.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. enum obs_nix_platform_type {
  20. OBS_NIX_PLATFORM_X11_GLX OBS_DEPRECATED,
  21. OBS_NIX_PLATFORM_X11_EGL,
  22. OBS_NIX_PLATFORM_WAYLAND,
  23. };
  24. /**
  25. * Sets the Unix platform.
  26. * @param platform The platform to select.
  27. */
  28. EXPORT void obs_set_nix_platform(enum obs_nix_platform_type platform);
  29. /**
  30. * Gets the host platform.
  31. */
  32. EXPORT enum obs_nix_platform_type obs_get_nix_platform(void);
  33. /**
  34. * Sets the host platform's display connection.
  35. * @param display The host display connection.
  36. */
  37. EXPORT void obs_set_nix_platform_display(void *display);
  38. /**
  39. * Gets the host platform's display connection.
  40. */
  41. EXPORT void *obs_get_nix_platform_display(void);
  42. #ifdef __cplusplus
  43. }
  44. #endif