dc-capture.h 776 B

123456789101112131415161718192021222324252627282930313233343536
  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,
  23. uint32_t width, uint32_t height, bool cursor,
  24. bool compatibility);
  25. extern void dc_capture_free(struct dc_capture *capture);
  26. extern void dc_capture_capture(struct dc_capture *capture, HWND window);
  27. extern void dc_capture_render(struct dc_capture *capture,
  28. bool texcoords_centered);