]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // show_window.hpp --------------------------------------------------------------// |
2 | ||
3 | // Copyright 2016 Klemens D. Morgenstern | |
4 | ||
5 | // Distributed under the Boost Software License, Version 1.0. | |
6 | // See http://www.boost.org/LICENSE_1_0.txt | |
7 | ||
8 | #ifndef BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_ | |
9 | #define BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_ | |
10 | ||
11 | #include <boost/detail/winapi/basic_types.hpp> | |
12 | #include <boost/predef/platform.h> | |
13 | ||
14 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
15 | #pragma once | |
16 | #endif | |
17 | ||
18 | #if BOOST_PLAT_WINDOWS_DESKTOP | |
19 | ||
20 | #if !defined( BOOST_USE_WINDOWS_H ) | |
21 | extern "C" { | |
22 | BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HWND); | |
23 | ||
24 | BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ShowWindow( | |
25 | HWND hWnd, | |
26 | int nCmdShow); | |
27 | ||
28 | BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI ShowWindowAsync( | |
29 | HWND hWnd, | |
30 | int nCmdShow); | |
31 | } | |
32 | #endif // BOOST_USE_WINDOWS_H | |
33 | ||
34 | namespace boost { | |
35 | namespace detail { | |
36 | namespace winapi { | |
37 | ||
38 | typedef ::HWND HWND_; | |
39 | using ::ShowWindow; | |
40 | using ::ShowWindowAsync; | |
41 | ||
42 | #if defined( BOOST_USE_WINDOWS_H ) && !defined( NOSHOWWINDOW ) | |
43 | ||
44 | const DWORD_ SW_HIDE_ = SW_HIDE; | |
45 | const DWORD_ SW_SHOWNORMAL_ = SW_SHOWNORMAL; | |
46 | const DWORD_ SW_NORMAL_ = SW_NORMAL; | |
47 | const DWORD_ SW_SHOWMINIMIZED_ = SW_SHOWMINIMIZED; | |
48 | const DWORD_ SW_SHOWMAXIMIZED_ = SW_SHOWMAXIMIZED; | |
49 | const DWORD_ SW_MAXIMIZE_ = SW_MAXIMIZE; | |
50 | const DWORD_ SW_SHOWNOACTIVATE_ = SW_SHOWNOACTIVATE; | |
51 | const DWORD_ SW_SHOW_ = SW_SHOW; | |
52 | const DWORD_ SW_MINIMIZE_ = SW_MINIMIZE; | |
53 | const DWORD_ SW_SHOWMINNOACTIVE_ = SW_SHOWMINNOACTIVE; | |
54 | const DWORD_ SW_SHOWNA_ = SW_SHOWNA; | |
55 | const DWORD_ SW_RESTORE_ = SW_RESTORE; | |
56 | const DWORD_ SW_SHOWDEFAULT_ = SW_SHOWDEFAULT; | |
57 | const DWORD_ SW_FORCEMINIMIZE_ = SW_FORCEMINIMIZE; | |
58 | const DWORD_ SW_MAX_ = SW_MAX; | |
59 | const DWORD_ HIDE_WINDOW_ = HIDE_WINDOW; | |
60 | const DWORD_ SHOW_OPENWINDOW_ = SHOW_OPENWINDOW; | |
61 | const DWORD_ SHOW_ICONWINDOW_ = SHOW_ICONWINDOW; | |
62 | const DWORD_ SHOW_FULLSCREEN_ = SHOW_FULLSCREEN; | |
63 | const DWORD_ SHOW_OPENNOACTIVATE_ = SHOW_OPENNOACTIVATE; | |
64 | const DWORD_ SW_PARENTCLOSING_ = SW_PARENTCLOSING; | |
65 | const DWORD_ SW_OTHERZOOM_ = SW_OTHERZOOM; | |
66 | const DWORD_ SW_PARENTOPENING_ = SW_PARENTOPENING; | |
67 | const DWORD_ SW_OTHERUNZOOM_ = SW_OTHERUNZOOM; | |
68 | ||
69 | #else | |
70 | ||
71 | const DWORD_ SW_HIDE_ = 0; | |
72 | const DWORD_ SW_SHOWNORMAL_ = 1; | |
73 | const DWORD_ SW_NORMAL_ = 1; | |
74 | const DWORD_ SW_SHOWMINIMIZED_ = 2; | |
75 | const DWORD_ SW_SHOWMAXIMIZED_ = 3; | |
76 | const DWORD_ SW_MAXIMIZE_ = 3; | |
77 | const DWORD_ SW_SHOWNOACTIVATE_ = 4; | |
78 | const DWORD_ SW_SHOW_ = 5; | |
79 | const DWORD_ SW_MINIMIZE_ = 6; | |
80 | const DWORD_ SW_SHOWMINNOACTIVE_ = 7; | |
81 | const DWORD_ SW_SHOWNA_ = 8; | |
82 | const DWORD_ SW_RESTORE_ = 9; | |
83 | const DWORD_ SW_SHOWDEFAULT_ = 10; | |
84 | const DWORD_ SW_FORCEMINIMIZE_ = 11; | |
85 | const DWORD_ SW_MAX_ = 11; | |
86 | const DWORD_ HIDE_WINDOW_ = 0; | |
87 | const DWORD_ SHOW_OPENWINDOW_ = 1; | |
88 | const DWORD_ SHOW_ICONWINDOW_ = 2; | |
89 | const DWORD_ SHOW_FULLSCREEN_ = 3; | |
90 | const DWORD_ SHOW_OPENNOACTIVATE_ = 4; | |
91 | const DWORD_ SW_PARENTCLOSING_ = 1; | |
92 | const DWORD_ SW_OTHERZOOM_ = 2; | |
93 | const DWORD_ SW_PARENTOPENING_ = 3; | |
94 | const DWORD_ SW_OTHERUNZOOM_ = 4; | |
95 | ||
96 | #endif | |
97 | ||
98 | } | |
99 | ||
100 | } | |
101 | } | |
102 | ||
103 | #endif // BOOST_PLAT_WINDOWS_DESKTOP | |
104 | ||
105 | #endif // BOOST_DETAIL_WINAPI_SHOW_WINDOW_HPP_ |