]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/winapi/include/boost/detail/winapi/shell.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / winapi / include / boost / detail / winapi / shell.hpp
1 // shell.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_SHELL_HPP_
9 #define BOOST_DETAIL_WINAPI_SHELL_HPP_
10
11 #include <boost/detail/winapi/basic_types.hpp>
12 #include <boost/detail/winapi/limits.hpp>
13 #if defined( BOOST_USE_WINDOWS_H )
14 #include <shellapi.h>
15 #endif
16
17 #ifdef BOOST_HAS_PRAGMA_ONCE
18 #pragma once
19 #endif
20
21 #if !defined( BOOST_USE_WINDOWS_H )
22 extern "C" {
23
24 BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HICON);
25
26 #if !defined( BOOST_NO_ANSI_APIS )
27 struct _SHFILEINFOA;
28 #endif
29 struct _SHFILEINFOW;
30
31 #if !defined( BOOST_NO_ANSI_APIS )
32 BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_PTR_ WINAPI SHGetFileInfoA(
33 boost::detail::winapi::LPCSTR_ pszPath,
34 boost::detail::winapi::DWORD_ dwFileAttributes,
35 ::_SHFILEINFOA *psfinsigned,
36 boost::detail::winapi::UINT_ cbFileInfons,
37 boost::detail::winapi::UINT_ uFlags);
38 #endif
39
40 BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_PTR_ WINAPI SHGetFileInfoW(
41 boost::detail::winapi::LPCWSTR_ pszPath,
42 boost::detail::winapi::DWORD_ dwFileAttributes,
43 ::_SHFILEINFOW *psfinsigned,
44 boost::detail::winapi::UINT_ cbFileInfons,
45 boost::detail::winapi::UINT_ uFlags);
46
47 } // extern "C"
48 #endif // !defined( BOOST_USE_WINDOWS_H )
49
50 namespace boost {
51 namespace detail {
52 namespace winapi {
53
54 typedef ::HICON HICON_;
55
56 #if defined( BOOST_USE_WINDOWS_H )
57
58 const DWORD_ SHGFI_ICON_ = SHGFI_ICON;
59 const DWORD_ SHGFI_DISPLAYNAME_ = SHGFI_DISPLAYNAME;
60 const DWORD_ SHGFI_TYPENAME_ = SHGFI_TYPENAME;
61 const DWORD_ SHGFI_ATTRIBUTES_ = SHGFI_ATTRIBUTES;
62 const DWORD_ SHGFI_ICONLOCATION_ = SHGFI_ICONLOCATION;
63 const DWORD_ SHGFI_EXETYPE_ = SHGFI_EXETYPE;
64 const DWORD_ SHGFI_SYSICONINDEX_ = SHGFI_SYSICONINDEX;
65 const DWORD_ SHGFI_LINKOVERLAY_ = SHGFI_LINKOVERLAY;
66 const DWORD_ SHGFI_SELECTED_ = SHGFI_SELECTED;
67 const DWORD_ SHGFI_ATTR_SPECIFIED_ = SHGFI_ATTR_SPECIFIED;
68 const DWORD_ SHGFI_LARGEICON_ = SHGFI_LARGEICON;
69 const DWORD_ SHGFI_SMALLICON_ = SHGFI_SMALLICON;
70 const DWORD_ SHGFI_OPENICON_ = SHGFI_OPENICON;
71 const DWORD_ SHGFI_SHELLICONSIZE_ = SHGFI_SHELLICONSIZE;
72 const DWORD_ SHGFI_PIDL_ = SHGFI_PIDL;
73 const DWORD_ SHGFI_USEFILEATTRIBUTES_ = SHGFI_USEFILEATTRIBUTES;
74
75 #else // defined( BOOST_USE_WINDOWS_H )
76
77 const DWORD_ SHGFI_ICON_ = 0x000000100;
78 const DWORD_ SHGFI_DISPLAYNAME_ = 0x000000200;
79 const DWORD_ SHGFI_TYPENAME_ = 0x000000400;
80 const DWORD_ SHGFI_ATTRIBUTES_ = 0x000000800;
81 const DWORD_ SHGFI_ICONLOCATION_ = 0x000001000;
82 const DWORD_ SHGFI_EXETYPE_ = 0x000002000;
83 const DWORD_ SHGFI_SYSICONINDEX_ = 0x000004000;
84 const DWORD_ SHGFI_LINKOVERLAY_ = 0x000008000;
85 const DWORD_ SHGFI_SELECTED_ = 0x000010000;
86 const DWORD_ SHGFI_ATTR_SPECIFIED_ = 0x000020000;
87 const DWORD_ SHGFI_LARGEICON_ = 0x000000000;
88 const DWORD_ SHGFI_SMALLICON_ = 0x000000001;
89 const DWORD_ SHGFI_OPENICON_ = 0x000000002;
90 const DWORD_ SHGFI_SHELLICONSIZE_ = 0x000000004;
91 const DWORD_ SHGFI_PIDL_ = 0x000000008;
92 const DWORD_ SHGFI_USEFILEATTRIBUTES_ = 0x000000010;
93
94 #endif // defined( BOOST_USE_WINDOWS_H )
95
96 // These constants are only declared for _WIN32_IE >= 0x0500. We don't set IE version
97 // and 5.0 is the default version since NT4 SP6, so just define the constants unconditionally.
98 const DWORD_ SHGFI_ADDOVERLAYS_ = 0x000000020;
99 const DWORD_ SHGFI_OVERLAYINDEX_ = 0x000000040;
100
101 typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SHFILEINFOA {
102 HICON_ hIcon;
103 int iIcon;
104 DWORD_ dwAttributes;
105 CHAR_ szDisplayName[MAX_PATH_];
106 CHAR_ szTypeName[80];
107 } SHFILEINFOA_;
108
109 typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SHFILEINFOW {
110 HICON_ hIcon;
111 int iIcon;
112 DWORD_ dwAttributes;
113 WCHAR_ szDisplayName[MAX_PATH_];
114 WCHAR_ szTypeName[80];
115 } SHFILEINFOW_;
116
117 #if !defined( BOOST_NO_ANSI_APIS )
118
119 BOOST_FORCEINLINE DWORD_PTR_ SHGetFileInfoA(LPCSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOA_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
120 {
121 return ::SHGetFileInfoA(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOA* >(psfinsigned), cbFileInfons, uFlags);
122 }
123
124 BOOST_FORCEINLINE DWORD_PTR_ sh_get_file_info(LPCSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOA_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
125 {
126 return ::SHGetFileInfoA(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOA* >(psfinsigned), cbFileInfons, uFlags);
127 }
128
129 #endif // BOOST_NO_ANSI_APIS
130
131 BOOST_FORCEINLINE DWORD_PTR_ SHGetFileInfoW(LPCWSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOW_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
132 {
133 return ::SHGetFileInfoW(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOW* >(psfinsigned), cbFileInfons, uFlags);
134 }
135
136 BOOST_FORCEINLINE DWORD_PTR_ sh_get_file_info(LPCWSTR_ pszPath, DWORD_ dwFileAttributes, SHFILEINFOW_* psfinsigned, UINT_ cbFileInfons, UINT_ uFlags)
137 {
138 return ::SHGetFileInfoW(pszPath, dwFileAttributes, reinterpret_cast< ::_SHFILEINFOW* >(psfinsigned), cbFileInfons, uFlags);
139 }
140
141 }
142 }
143 }
144
145 #endif // BOOST_DETAIL_WINAPI_SHELL_HPP_