dc-capture.h 812 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #define WIN32_LEAN_AND_MEAN
  3. #include <windows.h>
  4. #include <obs-module.h>
  5. struct dc_capture {
  6. gs_texture_t *texture;
  7. bool texture_written;
  8. int x, y;
  9. uint32_t width;
  10. uint32_t height;
  11. bool compatibility;
  12. HDC hdc;
  13. HBITMAP bmp, old_bmp;
  14. BYTE *bits;
  15. bool capture_cursor;
  16. bool cursor_captured;
  17. bool cursor_hidden;
  18. CURSORINFO ci;
  19. bool valid;
  20. };
  21. extern void dc_capture_init(struct dc_capture *capture, int x, int y,
  22. uint32_t width, uint32_t height, bool cursor,
  23. bool compatibility);
  24. extern void dc_capture_free(struct dc_capture *capture);
  25. extern void dc_capture_capture(struct dc_capture *capture, HWND window);
  26. extern void dc_capture_render(struct dc_capture *capture, gs_effect_t *effect);