acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
os.h
1#pragma once
2
3
4
5#include <stdarg.h>
6#include <wchar.h>
7
8#include "cross_win_gdi.h"
9#include "acme/operating_system/window.h"
10
11#define _fileno fileno
12#define _unlink unlink
13
14
15#define WAIT_FAILED ((::u32 ) 0xFFFFFFFFL)
16#define WAIT_OBJECT_0 ((::u32 ) STATUS_WAIT_0 + 0)
17
18#define WAIT_ABANDONED ((::u32 ) STATUS_ABANDONED_WAIT_0 + 0)
19#define WAIT_ABANDONED_0 ((::u32 ) STATUS_ABANDONED_WAIT_0 + 0)
20
21#define WAIT_IO_COMPLETION STATUS_USER_APC
22
23// based on Windows implementation and also a good limit for iterations with nanosleep and multiple locks in objects up to MAXIMUM_WAIT_OBJECTS in a single call
24#define MAXIMUM_WAIT_OBJECTS 64
25
26
27::operating_system::window get_capture();
28::operating_system::window set_mouse_capture(const ::operating_system::window & operatingsystemwindow);
29::i32_bool release_mouse_capture();
30::operating_system::window set_keyboard_focus(const ::operating_system::window & operatingsystemwindow);
31::operating_system::window get_keyboard_focus();
32::operating_system::window get_active_window();
33::operating_system::window set_active_window(const ::operating_system::window & operatingsystemwindow);
34
35
36::i32_rectangle get_main_screen_rectangle();
37
38
39::i32 GetScreenRect(::i32_rectangle * prectangle, ::i32 iMonitor);
40
41
42::i32 GetScreenCount();
43
44::i32 GetWorkspaceRect(::i32_rectangle * prectangle, ::i32 iMonitor);
45
46
47::i32 GetWorkspaceCount();
48
49
50::i32_bool set_foreground_window(const ::operating_system::window & operatingsystemwindow);
51::i32_bool BringWindowToTop(const ::operating_system::window & operatingsystemwindow);
52
53void ns_redraw_window(const ::operating_system::window & operatingsystemwindow);
54
55
56
57