janela 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/bin/janela.mjs +271 -0
- package/package.json +43 -0
- package/runtime/janela.ts +193 -0
- package/shim/wvshim.cc +201 -0
- package/templates/index.html +48 -0
- package/templates/janela.conf.json +10 -0
- package/templates/main.ts +37 -0
- package/vendor-webview/LICENSE +22 -0
- package/vendor-webview/core/include/webview/api.h +251 -0
- package/vendor-webview/core/include/webview/backends.hh +40 -0
- package/vendor-webview/core/include/webview/c_api_impl.hh +258 -0
- package/vendor-webview/core/include/webview/detail/backends/cocoa_webkit.hh +626 -0
- package/vendor-webview/core/include/webview/detail/backends/gtk_webkitgtk.hh +355 -0
- package/vendor-webview/core/include/webview/detail/backends/win32_edge.hh +909 -0
- package/vendor-webview/core/include/webview/detail/basic_result.hh +119 -0
- package/vendor-webview/core/include/webview/detail/engine_base.hh +382 -0
- package/vendor-webview/core/include/webview/detail/exceptions.hh +42 -0
- package/vendor-webview/core/include/webview/detail/json.hh +337 -0
- package/vendor-webview/core/include/webview/detail/native_library.hh +170 -0
- package/vendor-webview/core/include/webview/detail/optional.hh +118 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSApplication.hh +107 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSBundle.hh +56 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSEvent.hh +71 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSInvocation.hh +66 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSMethodSignature.hh +52 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSNotification.hh +51 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSNumber.hh +53 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSObject.hh +51 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSOpenPanel.hh +71 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSPoint.hh +53 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSRect.hh +53 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSSavePanel.hh +52 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSSize.hh +53 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSString.hh +87 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSURL.hh +63 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSURLRequest.hh +52 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSValue.hh +56 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSView.hh +91 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/NSWindow.hh +137 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/cocoa.hh +59 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/cocoa/types.hh +49 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/objc/Class.hh +55 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/objc/autoreleasepool.hh +70 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/objc/invoke.hh +75 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/objc/memory.hh +57 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/objc/objc.hh +47 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKOpenPanelParameters.hh +57 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKScriptMessage.hh +51 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKUserContentController.hh +61 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKUserScript.hh +71 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKWebView.hh +108 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/WKWebViewConfiguration.hh +60 -0
- package/vendor-webview/core/include/webview/detail/platform/darwin/webkit/webkit.hh +46 -0
- package/vendor-webview/core/include/webview/detail/platform/linux/gtk/compat.hh +137 -0
- package/vendor-webview/core/include/webview/detail/platform/linux/webkitgtk/compat.hh +142 -0
- package/vendor-webview/core/include/webview/detail/platform/linux/webkitgtk/dmabuf.hh +167 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/com_init_wrapper.hh +126 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/dpi.hh +161 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/dwmapi.hh +67 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/iid.hh +78 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/ntdll.hh +58 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/reg_key.hh +135 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/shcore.hh +59 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/theme.hh +76 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/user32.hh +90 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/version.hh +151 -0
- package/vendor-webview/core/include/webview/detail/platform/windows/webview2/loader.hh +391 -0
- package/vendor-webview/core/include/webview/detail/user_script.hh +76 -0
- package/vendor-webview/core/include/webview/detail/utility/string.hh +99 -0
- package/vendor-webview/core/include/webview/errors.h +67 -0
- package/vendor-webview/core/include/webview/errors.hh +85 -0
- package/vendor-webview/core/include/webview/json_deprecated.hh +61 -0
- package/vendor-webview/core/include/webview/macros.h +123 -0
- package/vendor-webview/core/include/webview/types.h +81 -0
- package/vendor-webview/core/include/webview/types.hh +48 -0
- package/vendor-webview/core/include/webview/version.h +67 -0
- package/vendor-webview/core/include/webview/webview.h +32 -0
- package/vendor-webview/core/include/webview.h +15 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSRECT_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSRECT_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include <CoreGraphics/CoreGraphics.h>
|
|
36
|
+
|
|
37
|
+
namespace webview {
|
|
38
|
+
namespace detail {
|
|
39
|
+
namespace cocoa {
|
|
40
|
+
|
|
41
|
+
using NSRect = CGRect;
|
|
42
|
+
|
|
43
|
+
constexpr inline NSRect NSRectMake(CGFloat x, CGFloat y, CGFloat w, CGFloat h) {
|
|
44
|
+
return CGRectMake(x, y, w, h);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
} // namespace cocoa
|
|
48
|
+
} // namespace detail
|
|
49
|
+
} // namespace webview
|
|
50
|
+
|
|
51
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
52
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
53
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSRECT_HH
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSSAVEPANEL_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSSAVEPANEL_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
#include "NSApplication.hh"
|
|
37
|
+
|
|
38
|
+
namespace webview {
|
|
39
|
+
namespace detail {
|
|
40
|
+
namespace cocoa {
|
|
41
|
+
|
|
42
|
+
inline NSModalResponse NSSavePanel_runModal(id self) {
|
|
43
|
+
return objc::msg_send<NSModalResponse>(self, objc::selector("runModal"));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
} // namespace cocoa
|
|
47
|
+
} // namespace detail
|
|
48
|
+
} // namespace webview
|
|
49
|
+
|
|
50
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
51
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
52
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSSAVEPANEL_HH
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSSIZE_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSSIZE_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include <CoreGraphics/CoreGraphics.h>
|
|
36
|
+
|
|
37
|
+
namespace webview {
|
|
38
|
+
namespace detail {
|
|
39
|
+
namespace cocoa {
|
|
40
|
+
|
|
41
|
+
using NSSize = CGSize;
|
|
42
|
+
|
|
43
|
+
constexpr inline NSSize NSSizeMake(CGFloat w, CGFloat h) {
|
|
44
|
+
return CGSizeMake(w, h);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
} // namespace cocoa
|
|
48
|
+
} // namespace detail
|
|
49
|
+
} // namespace webview
|
|
50
|
+
|
|
51
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
52
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
53
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSSIZE_HH
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSSTRING_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSSTRING_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
|
|
37
|
+
#include <string>
|
|
38
|
+
|
|
39
|
+
namespace webview {
|
|
40
|
+
namespace detail {
|
|
41
|
+
namespace cocoa {
|
|
42
|
+
|
|
43
|
+
enum NSStringEncoding : NSUInteger {
|
|
44
|
+
NSASCIIStringEncoding = 1,
|
|
45
|
+
NSUTF8StringEncoding = 4
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
inline bool NSString_hasSuffix(id self, id suffix) {
|
|
49
|
+
return static_cast<bool>(
|
|
50
|
+
objc::msg_send<BOOL>(self, objc::selector("hasSuffix:"), suffix));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
inline id NSString_alloc() {
|
|
54
|
+
return objc::msg_send<id>(objc::get_class("NSString"),
|
|
55
|
+
objc::selector("alloc"));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
inline id NSString_initWithBytes(id self, const void *bytes, NSUInteger length,
|
|
59
|
+
NSStringEncoding encoding) {
|
|
60
|
+
return objc::msg_send<id>(self,
|
|
61
|
+
objc::selector("initWithBytes:length:encoding:"),
|
|
62
|
+
bytes, length, encoding);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
inline id NSString_stringWithUTF8String(const char *utf8_string) {
|
|
66
|
+
return objc::msg_send<id>(objc::get_class("NSString"),
|
|
67
|
+
objc::selector("stringWithUTF8String:"),
|
|
68
|
+
utf8_string);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
inline id NSString_stringWithUTF8String(const std::string &utf8_string) {
|
|
72
|
+
return objc::autorelease(NSString_initWithBytes(
|
|
73
|
+
NSString_alloc(), utf8_string.data(),
|
|
74
|
+
static_cast<NSUInteger>(utf8_string.size()), NSUTF8StringEncoding));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
inline const char *NSString_get_UTF8String(id self) {
|
|
78
|
+
return objc::msg_send<const char *>(self, objc::selector("UTF8String"));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
} // namespace cocoa
|
|
82
|
+
} // namespace detail
|
|
83
|
+
} // namespace webview
|
|
84
|
+
|
|
85
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
86
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
87
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSSTRING_HH
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSURL_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSURL_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
#include "NSString.hh"
|
|
37
|
+
|
|
38
|
+
#include <string>
|
|
39
|
+
|
|
40
|
+
namespace webview {
|
|
41
|
+
namespace detail {
|
|
42
|
+
namespace cocoa {
|
|
43
|
+
|
|
44
|
+
inline id NSURL_URLWithString(id string) {
|
|
45
|
+
return objc::msg_send<id>(objc::get_class("NSURL"),
|
|
46
|
+
objc::selector("URLWithString:"), string);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
inline id NSURL_URLWithString(const char *string) {
|
|
50
|
+
return NSURL_URLWithString(NSString_stringWithUTF8String(string));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
inline id NSURL_URLWithString(const std::string &string) {
|
|
54
|
+
return NSURL_URLWithString(NSString_stringWithUTF8String(string));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
} // namespace cocoa
|
|
58
|
+
} // namespace detail
|
|
59
|
+
} // namespace webview
|
|
60
|
+
|
|
61
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
62
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
63
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSURL_HH
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSURLREQUEST_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSURLREQUEST_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
|
|
37
|
+
namespace webview {
|
|
38
|
+
namespace detail {
|
|
39
|
+
namespace cocoa {
|
|
40
|
+
|
|
41
|
+
inline id NSURLRequest_requestWithURL(id url) {
|
|
42
|
+
return objc::msg_send<id>(objc::get_class("NSURLRequest"),
|
|
43
|
+
objc::selector("requestWithURL:"), url);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
} // namespace cocoa
|
|
47
|
+
} // namespace detail
|
|
48
|
+
} // namespace webview
|
|
49
|
+
|
|
50
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
51
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
52
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSURLREQUEST_HH
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSVALUE_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSVALUE_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
|
|
37
|
+
namespace webview {
|
|
38
|
+
namespace detail {
|
|
39
|
+
namespace cocoa {
|
|
40
|
+
|
|
41
|
+
inline id NSValue_valueWithPointer(const void *pointer) {
|
|
42
|
+
return objc::msg_send<id>(objc::get_class("NSValue"),
|
|
43
|
+
objc::selector("valueWithPointer:"), pointer);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
inline void NSValue_getValue(id self, void *value, NSUInteger size) {
|
|
47
|
+
objc::msg_send<void>(self, objc::selector("getValue:size:"), value, size);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
} // namespace cocoa
|
|
51
|
+
} // namespace detail
|
|
52
|
+
} // namespace webview
|
|
53
|
+
|
|
54
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
55
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
56
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSVALUE_HH
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSVIEW_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSVIEW_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
#include "NSRect.hh"
|
|
37
|
+
|
|
38
|
+
namespace webview {
|
|
39
|
+
namespace detail {
|
|
40
|
+
namespace cocoa {
|
|
41
|
+
|
|
42
|
+
enum NSAutoresizingMaskOptions : NSUInteger {
|
|
43
|
+
NSViewMinXMargin = 1,
|
|
44
|
+
NSViewWidthSizable = 2,
|
|
45
|
+
NSViewMaxXMargin = 4,
|
|
46
|
+
NSViewMinYMargin = 8,
|
|
47
|
+
NSViewHeightSizable = 16,
|
|
48
|
+
NSViewMaxYMargin = 32
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
inline id NSView_alloc() {
|
|
52
|
+
return objc::msg_send<id>(objc::get_class("NSView"), objc::selector("alloc"));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
inline id NSView_initWithFrame(id self, NSRect frame_rect) {
|
|
56
|
+
return objc::msg_send<id>(self, objc::selector("initWithFrame:"), frame_rect);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
inline id NSView_withFrame(NSRect frame_rect) {
|
|
60
|
+
return objc::autorelease(NSView_initWithFrame(NSView_alloc(), frame_rect));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
inline void NSView_set_autoresizesSubviews(id self, bool resizes) {
|
|
64
|
+
objc::msg_send<void>(self, objc::selector("setAutoresizesSubviews:"),
|
|
65
|
+
static_cast<BOOL>(resizes));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
inline void NSView_addSubview(id self, id subview) {
|
|
69
|
+
objc::msg_send<void>(self, objc::selector("addSubview:"), subview);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
inline NSRect NSView_get_bounds(id self) {
|
|
73
|
+
return objc::msg_send_stret<NSRect>(self, objc::selector("bounds"));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
inline void NSView_set_frame(id self, NSRect frame) {
|
|
77
|
+
objc::msg_send<void>(self, objc::selector("setFrame:"), frame);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
inline void NSView_set_autoresizingMask(id self,
|
|
81
|
+
NSAutoresizingMaskOptions mask) {
|
|
82
|
+
objc::msg_send<void>(self, objc::selector("setAutoresizingMask:"), mask);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
} // namespace cocoa
|
|
86
|
+
} // namespace detail
|
|
87
|
+
} // namespace webview
|
|
88
|
+
|
|
89
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
90
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
91
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSVIEW_HH
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2017 Serge Zaitsev
|
|
5
|
+
* Copyright (c) 2022 Steffen André Langnes
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#ifndef WEBVIEW_PLATFORM_DARWIN_COCOA_NSWINDOW_HH
|
|
27
|
+
#define WEBVIEW_PLATFORM_DARWIN_COCOA_NSWINDOW_HH
|
|
28
|
+
|
|
29
|
+
#if defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
30
|
+
|
|
31
|
+
#include "../../../../macros.h"
|
|
32
|
+
|
|
33
|
+
#if defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
34
|
+
|
|
35
|
+
#include "../objc/objc.hh"
|
|
36
|
+
#include "NSRect.hh"
|
|
37
|
+
#include "NSSize.hh"
|
|
38
|
+
|
|
39
|
+
#include <string>
|
|
40
|
+
|
|
41
|
+
namespace webview {
|
|
42
|
+
namespace detail {
|
|
43
|
+
namespace cocoa {
|
|
44
|
+
|
|
45
|
+
enum NSBackingStoreType : NSUInteger { NSBackingStoreBuffered = 2 };
|
|
46
|
+
|
|
47
|
+
enum NSWindowStyleMask : NSUInteger {
|
|
48
|
+
NSWindowStyleMaskTitled = 1,
|
|
49
|
+
NSWindowStyleMaskClosable = 2,
|
|
50
|
+
NSWindowStyleMaskMiniaturizable = 4,
|
|
51
|
+
NSWindowStyleMaskResizable = 8
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
inline id NSWindow_alloc() {
|
|
55
|
+
return objc::msg_send<id>(objc::get_class("NSWindow"),
|
|
56
|
+
objc::selector("alloc"));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
inline id NSWindow_initWithContentRect(id self, NSRect content_rect,
|
|
60
|
+
NSWindowStyleMask style,
|
|
61
|
+
NSBackingStoreType backing_store_type,
|
|
62
|
+
bool defer) {
|
|
63
|
+
return objc::msg_send<id>(
|
|
64
|
+
self, objc::selector("initWithContentRect:styleMask:backing:defer:"),
|
|
65
|
+
content_rect, style, backing_store_type, static_cast<BOOL>(defer));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
inline id NSWindow_withContentRect(NSRect content_rect, NSWindowStyleMask style,
|
|
69
|
+
NSBackingStoreType backing_store_type,
|
|
70
|
+
bool defer) {
|
|
71
|
+
return objc::autorelease(NSWindow_initWithContentRect(
|
|
72
|
+
NSWindow_alloc(), content_rect, style, backing_store_type, defer));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
inline void NSWindow_close(id self) {
|
|
76
|
+
objc::msg_send<void>(self, objc::selector("close"));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
inline NSRect NSWindow_get_frame(id self) {
|
|
80
|
+
return objc::msg_send_stret<NSRect>(self, objc::selector("frame"));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
inline void NSWindow_setFrame(id self, NSRect frame_rect, bool display,
|
|
84
|
+
bool animate) {
|
|
85
|
+
objc::msg_send<void>(self, objc::selector("setFrame:display:animate:"),
|
|
86
|
+
frame_rect, static_cast<BOOL>(display),
|
|
87
|
+
static_cast<BOOL>(animate));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
inline void NSWindow_set_styleMask(id self, NSWindowStyleMask style) {
|
|
91
|
+
objc::msg_send<void>(self, objc::selector("setStyleMask:"), style);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
inline void NSWindow_set_title(id self, const std::string &title) {
|
|
95
|
+
objc::autoreleasepool arp;
|
|
96
|
+
objc::msg_send<void>(
|
|
97
|
+
self, objc::selector("setTitle:"),
|
|
98
|
+
objc::msg_send<id>(objc::get_class("NSString"),
|
|
99
|
+
objc::selector("stringWithUTF8String:"),
|
|
100
|
+
title.c_str()));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
inline void NSWindow_makeKeyAndOrderFront(id self, id sender = nullptr) {
|
|
104
|
+
objc::msg_send<void>(self, objc::selector("makeKeyAndOrderFront:"), sender);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
inline void NSWindow_set_contentView(id self, id view) {
|
|
108
|
+
objc::msg_send<void>(self, objc::selector("setContentView:"), view);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
inline id NSWindow_get_contentView(id self) {
|
|
112
|
+
return objc::msg_send<id>(self, objc::selector("contentView"));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
inline void NSWindow_set_delegate(id self, id delegate) {
|
|
116
|
+
objc::msg_send<void>(self, objc::selector("setDelegate:"), delegate);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
inline void NSWindow_center(id self) {
|
|
120
|
+
objc::msg_send<void>(self, objc::selector("center"));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
inline void NSWindow_set_contentMinSize(id self, NSSize size) {
|
|
124
|
+
objc::msg_send<void>(self, objc::selector("setContentMinSize:"), size);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
inline void NSWindow_set_contentMaxSize(id self, NSSize size) {
|
|
128
|
+
objc::msg_send<void>(self, objc::selector("setContentMaxSize:"), size);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
} // namespace cocoa
|
|
132
|
+
} // namespace detail
|
|
133
|
+
} // namespace webview
|
|
134
|
+
|
|
135
|
+
#endif // defined(WEBVIEW_PLATFORM_DARWIN) && defined(WEBVIEW_COCOA)
|
|
136
|
+
#endif // defined(__cplusplus) && !defined(WEBVIEW_HEADER)
|
|
137
|
+
#endif // WEBVIEW_PLATFORM_DARWIN_COCOA_NSWINDOW_HH
|