2014-10-17 04:01:18 -07:00
|
|
|
#pragma once
|
|
|
|
|
2014-11-10 01:33:08 -08:00
|
|
|
#include <util/dstr.h>
|
|
|
|
|
2014-10-17 04:01:18 -07:00
|
|
|
enum window_priority {
|
|
|
|
WINDOW_PRIORITY_CLASS,
|
|
|
|
WINDOW_PRIORITY_TITLE,
|
|
|
|
WINDOW_PRIORITY_EXE,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum window_search_mode {
|
|
|
|
INCLUDE_MINIMIZED,
|
2019-06-22 22:13:45 -07:00
|
|
|
EXCLUDE_MINIMIZED,
|
2014-10-17 04:01:18 -07:00
|
|
|
};
|
|
|
|
|
2014-11-10 01:33:08 -08:00
|
|
|
extern bool get_window_exe(struct dstr *name, HWND window);
|
2016-07-30 11:24:39 -07:00
|
|
|
extern void get_window_title(struct dstr *name, HWND hwnd);
|
|
|
|
extern void get_window_class(struct dstr *class, HWND hwnd);
|
2016-10-31 01:46:18 -07:00
|
|
|
extern bool is_uwp_window(HWND hwnd);
|
|
|
|
extern HWND get_uwp_actual_window(HWND parent);
|
2014-11-10 01:33:08 -08:00
|
|
|
|
2016-07-30 12:49:05 -07:00
|
|
|
typedef bool (*add_window_cb)(const char *title, const char *class,
|
2019-06-22 22:13:45 -07:00
|
|
|
const char *exe);
|
2016-07-30 12:49:05 -07:00
|
|
|
|
|
|
|
extern void fill_window_list(obs_property_t *p, enum window_search_mode mode,
|
2019-06-22 22:13:45 -07:00
|
|
|
add_window_cb callback);
|
2014-10-17 04:01:18 -07:00
|
|
|
|
2019-06-22 22:13:45 -07:00
|
|
|
extern void build_window_strings(const char *str, char **class, char **title,
|
|
|
|
char **exe);
|
2014-10-17 04:01:18 -07:00
|
|
|
|
|
|
|
extern HWND find_window(enum window_search_mode mode,
|
2019-06-22 22:13:45 -07:00
|
|
|
enum window_priority priority, const char *class,
|
|
|
|
const char *title, const char *exe);
|
2019-11-27 16:42:49 -08:00
|
|
|
extern HWND find_window_top_level(enum window_search_mode mode,
|
|
|
|
enum window_priority priority,
|
|
|
|
const char *class, const char *title,
|
|
|
|
const char *exe);
|