yolobs-studio/plugins/mac-capture/window-utils.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
838 B
C
Raw Normal View History

2016-02-23 23:16:51 +00:00
#import <CoreGraphics/CGWindow.h>
#import <Cocoa/Cocoa.h>
#include <util/threading.h>
#include <obs-module.h>
struct cocoa_window {
2019-09-22 21:19:10 +00:00
CGWindowID window_id;
2020-05-27 20:57:19 +00:00
int owner_pid;
2016-02-23 23:16:51 +00:00
pthread_mutex_t name_lock;
2019-09-22 21:19:10 +00:00
NSString *owner_name;
NSString *window_name;
2016-02-23 23:16:51 +00:00
uint64_t next_search_time;
};
typedef struct cocoa_window *cocoa_window_t;
NSArray *enumerate_cocoa_windows(void);
2020-10-01 20:15:25 +00:00
NSArray *filter_nonzero_kcgwindowlayer_sources(NSArray *windows_arr);
2016-02-23 23:16:51 +00:00
bool find_window(cocoa_window_t cw, obs_data_t *settings, bool force);
void init_window(cocoa_window_t cw, obs_data_t *settings);
void destroy_window(cocoa_window_t cw);
void update_window(cocoa_window_t cw, obs_data_t *settings);
void window_defaults(obs_data_t *settings);
void add_window_properties(obs_properties_t *props);
void show_window_properties(obs_properties_t *props, bool show);