win-capture: Separate window finding source code
Because other capture methods may end up needing to share this code, separate the window finding source code to window-helpers.c and window-helpers.h. This include a function to fill out a property list with windows, a function to find a window based upon priority/title/class/exe, and a function to decode the window title/class/exe strings from a window setting string.
This commit is contained in:
25
plugins/win-capture/window-helpers.h
Normal file
25
plugins/win-capture/window-helpers.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
enum window_priority {
|
||||
WINDOW_PRIORITY_CLASS,
|
||||
WINDOW_PRIORITY_TITLE,
|
||||
WINDOW_PRIORITY_EXE,
|
||||
};
|
||||
|
||||
enum window_search_mode {
|
||||
INCLUDE_MINIMIZED,
|
||||
EXCLUDE_MINIMIZED
|
||||
};
|
||||
|
||||
extern void fill_window_list(obs_property_t *p, enum window_search_mode mode);
|
||||
|
||||
extern void build_window_strings(const char *str,
|
||||
char **class,
|
||||
char **title,
|
||||
char **exe);
|
||||
|
||||
extern HWND find_window(enum window_search_mode mode,
|
||||
enum window_priority priority,
|
||||
const char *class,
|
||||
const char *title,
|
||||
const char *exe);
|
Reference in New Issue
Block a user