obs-studio/plugins/win-capture/window-helpers.h
jp9000 bf166c07f4 win-capture: Blacklist specific executables from game capture
Prevents the common problem of injecting in to certain processes and
getting the hook DLL "stuck":
- windows explorer
- steam
- battle.net
- gog galaxy
- skype
- uplay
- origin
- microsoft visual studio
- task manager
- league of legends lobby window
- windows 10 system settings window
2016-07-30 13:04:53 -07:00

36 lines
828 B
C

#pragma once
#include <util/dstr.h>
enum window_priority {
WINDOW_PRIORITY_CLASS,
WINDOW_PRIORITY_TITLE,
WINDOW_PRIORITY_EXE,
};
enum window_search_mode {
INCLUDE_MINIMIZED,
EXCLUDE_MINIMIZED
};
extern bool get_window_exe(struct dstr *name, HWND window);
extern void get_window_title(struct dstr *name, HWND hwnd);
extern void get_window_class(struct dstr *class, HWND hwnd);
typedef bool (*add_window_cb)(const char *title, const char *class,
const char *exe);
extern void fill_window_list(obs_property_t *p, enum window_search_mode mode,
add_window_cb callback);
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);