acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
_.h
1#pragma once
2
3
4#include "_c.h"
5#include "acme/parallelization/types.h"
6
7
8#include "acme/operating_system/window.h"
9
10
11// #undef USUAL_OPERATING_SYSTEM_SUPPRESSIONS
12// #include "acme/_operating_system.h"
13// #include <windowsx.h>
14
15//#include <Tlhelp32.h>
16
17
18namespace windows
19{
20
21
22 CLASS_DECL_ACME ::i32 message_box(
23 const ::operating_system::window & operatingsystemwindow,
24 const ::scoped_string & scopedstrMessage,
25 const ::scoped_string & scopedstrCaption,
26 ::u32 uType);
27
28
29
30} // namespace windows
31
32
33// inline HWND as_hwnd(::acme::windowing::window * pacmewindowingwindow)
34// {
35//
36// return (HWND)oswindow;
37//
38// }
39//
40//
41// inline oswindow as_oswindow(HWND hwnd)
42// {
43//
44// return (oswindow)hwnd;
45//
46// }
47
48
49CLASS_DECL_ACME void attach_thread_input_to_main_thread(bool bAttach);
50
51
52CLASS_DECL_ACME bool process_modules(string_array_base & stra, const ::process_identifier & processidentifier);
53
54
55CLASS_DECL_ACME bool load_modules_diff(string_array_base & straOld, string_array_base & straNew, const ::scoped_string & scopedstrExceptDir);
56
57
58//CLASS_DECL_ACME bool check_msys2_at_c_msys64(::particle* pparticle);
59
60
61//namespace windows
62//{
63//
64//
65// CLASS_DECL_ACME bool for_each_process_module(DWORD dwProcess, ::function < bool(const MODULEENTRY32 & moduleentry32) > & function);
66//
67//
68// CLASS_DECL_ACME bool for_each_process_identifier(::function < bool(::process_identifier processidentifier) > & function);
69//
70//
71//} // namespace windows
72
73
74#include "acme/operating_system/message.h"
75
76
77// CLASS_DECL_ACME ::operating_system::window as_operating_system_window(HWND hwnd);
78// CLASS_DECL_ACME HWND as_HWND(const ::operating_system::window & operatingsystemwindow);
79
80
81/*
82 * GetWindow() Constants
83 */
84#define WIN32_GW_HWNDFIRST 0
85#define WIN32_GW_HWNDLAST 1
86#define WIN32_GW_HWNDNEXT 2
87#define WIN32_GW_HWNDPREV 3
88#define WIN32_GW_OWNER 4
89#define WIN32_GW_CHILD 5
90#if(WINVER <= 0x0400)
91#define WIN32_GW_MAX 5
92#else
93#define WIN32_GW_ENABLEDPOPUP 6
94#define WIN32_GW_MAX 6
95#endif
96
97
98namespace windows
99{
100
101 CLASS_DECL_ACME ::string get_window_text_timeout(const ::operating_system::window & operatingsystemwindow, const class time & timeSendMessageMax = 1_s);
102
103 CLASS_DECL_ACME ::operating_system::window child_at(const ::operating_system::window & operatingsystemwindow, iptr i);
104
105 CLASS_DECL_ACME hinstance hinstance_from_function(void *pFunc);
106
107 CLASS_DECL_ACME bool get_window_rect(const ::operating_system::window & operatingsystemwindow, ::i32_rectangle & rectangle);
108
109 CLASS_DECL_ACME ::i32_rectangle get_window_rect(const ::operating_system::window & operatingsystemwindow);
110
111 CLASS_DECL_ACME ::operating_system::window get_window(const ::operating_system::window & operatingsystemwindowCommand, ::i32 iGetWindowCommand);
112
113 CLASS_DECL_ACME ::iptr get_window_long(const ::operating_system::window & operatingsystemwindow, ::i32 iGetWindowLong);
114
115 CLASS_DECL_ACME ::itask get_window_thread_id(const ::operating_system::window & operatingsystemwindow);
116
117 CLASS_DECL_ACME ::itask get_window_thread_process_id(const ::operating_system::window & operatingsystemwindow, ::process_identifier & processidentifier);
118
119 CLASS_DECL_ACME ::process_identifier get_window_process_id(const ::operating_system::window & operatingsystemwindow);
120
121 CLASS_DECL_ACME ::operating_system::window get_foreground_window();
122
123 CLASS_DECL_ACME ::comparable_array_base<::operating_system::window> findWindowsByClass(const ::string_array_base & straClassNames);
124
125 // Find first of windows that name contain the string.
126 // It is not case sensitive.
127 CLASS_DECL_ACME ::operating_system::window findFirstWindowByName(const ::scoped_string & scopedstrWindowName);
128
129
130} // namespace windows
131
132
133CLASS_DECL_ACME RECT as_RECT(const ::i32_rectangle & rectangle);
134
135