aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/recorder/windowing.h
diff options
context:
space:
mode:
authorMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-10 10:38:14 +0500
committerMaria Lisina <sekoohaka.sarisan@gmail.com>2026-08-10 10:38:14 +0500
commit6dc1149d078fc3b04a19696bfb7d5d6940372175 (patch)
tree169f7f71e6a292a4ab61a0493000e1add4430f8e /include/recorder/windowing.h
parent6836426ae183b9a7d0ec99c1e147e8ad6edabd92 (diff)
parent80517840f4ae64469721598e8373d81f2e4493dd (diff)
Merge tag '6.0.0' of https://repo.dec05eba.com/gpu-screen-recorder into debian
Diffstat (limited to 'include/recorder/windowing.h')
-rw-r--r--include/recorder/windowing.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/recorder/windowing.h b/include/recorder/windowing.h
new file mode 100644
index 0000000..630f3fe
--- /dev/null
+++ b/include/recorder/windowing.h
@@ -0,0 +1,35 @@
+#ifndef GSR_RECORDER_WINDOWING_H
+#define GSR_RECORDER_WINDOWING_H
+
+#include <stdbool.h>
+#include "../defs.h"
+#include "../egl.h"
+
+#include <X11/Xlib.h>
+
+typedef struct {
+ bool monitor_capture;
+ bool gl_debug;
+ bool listen_to_x11_events;
+} gsr_windowing_params;
+
+typedef struct {
+ Display *display;
+ gsr_window *window;
+ gsr_egl egl;
+ bool egl_loaded;
+ bool card_path_found;
+} gsr_windowing;
+
+/* Returns a |gsr_error| value. Connects to the display server and creates a window */
+int gsr_windowing_init(gsr_windowing *self, const gsr_windowing_params *params);
+/* Returns a |gsr_error| value. Loads opengl and finds the drm card to use */
+int gsr_windowing_load_egl(gsr_windowing *self, const gsr_windowing_params *params);
+void gsr_windowing_deinit(gsr_windowing *self);
+bool gsr_windowing_is_wayland(const gsr_windowing *self);
+
+bool gsr_windowing_is_using_prime_run(void);
+void gsr_windowing_disable_prime_run(void);
+bool monitor_capture_use_drm(const gsr_window *window, gsr_gpu_vendor vendor);
+
+#endif /* GSR_RECORDER_WINDOWING_H */