dc-capture.h 760 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. gs_texture_t *extra_texture;
  8. bool texture_written;
  9. int x, y;
  10. uint32_t width;
  11. uint32_t height;
  12. bool compatibility;
  13. HDC hdc;
  14. HBITMAP bmp, old_bmp;
  15. BYTE *bits;
  16. bool capture_cursor;
  17. bool cursor_captured;
  18. bool cursor_hidden;
  19. CURSORINFO ci;
  20. bool valid;
  21. };
  22. extern void dc_capture_init(struct dc_capture *capture, int x, int y, 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, bool texcoords_centered);