cocoawebview 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/ext/cocoawebview/cocoawebview.m +15 -2
- data/lib/cocoawebview/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb18e38b4326918bda4d126cbfea4917a5b34931185e20536402aa0c5854bfb2
|
4
|
+
data.tar.gz: f6b1d04f8c067cb23dd837aebc7557f7df65bbd4f90f909b06b0e41c70d24a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2992271022820a0f681f75e5e420f6a1307f3c9a3f91bb1b32384e6d4191e820579b4e504aa1017263ff81da740065320a36012fb8713c54b4f9fcc2783dc5b5
|
7
|
+
data.tar.gz: 966c3b7365ff87a3287e6d9749a38946084ddf59d6f29e31a5d6e23a8d14a5c3e88c6eb9bc3cd2427fc085a53f900bd19ab93124841882523e5f605f7d6db2e0
|
@@ -25,6 +25,19 @@ VALUE webview_center(VALUE self);
|
|
25
25
|
VALUE webview_is_visible(VALUE self);
|
26
26
|
VALUE webview_set_topmost(VALUE self, VALUE topmost);
|
27
27
|
|
28
|
+
@interface CocoaWKWebView : WKWebView
|
29
|
+
@property (nonatomic, strong) NSEvent *lastMouseDownEvent;
|
30
|
+
@end
|
31
|
+
|
32
|
+
@implementation CocoaWKWebView
|
33
|
+
|
34
|
+
- (void)mouseDown:(NSEvent *)event {
|
35
|
+
self.lastMouseDownEvent = event;
|
36
|
+
[super mouseDown:event];
|
37
|
+
}
|
38
|
+
@end
|
39
|
+
|
40
|
+
|
28
41
|
@interface AppDelegate : NSObject <NSApplicationDelegate> {
|
29
42
|
VALUE app;
|
30
43
|
}
|
@@ -42,7 +55,7 @@ VALUE webview_set_topmost(VALUE self, VALUE topmost);
|
|
42
55
|
@end
|
43
56
|
|
44
57
|
@interface CocoaWebview : NSWindow <WKScriptMessageHandler> {
|
45
|
-
|
58
|
+
CocoaWKWebView *webView;
|
46
59
|
VALUE rb_cocoawebview;
|
47
60
|
BOOL showDevTool;
|
48
61
|
BOOL shouldMoveTitleButtons;
|
@@ -163,7 +176,7 @@ VALUE webview_set_topmost(VALUE self, VALUE topmost);
|
|
163
176
|
|
164
177
|
// Create the WKWebView with the configuration
|
165
178
|
NSRect contentRect = [[window contentView] bounds];
|
166
|
-
webView = [[
|
179
|
+
webView = [[CocoaWKWebView alloc] initWithFrame:contentRect configuration:config];
|
167
180
|
|
168
181
|
// Enable autoresizing
|
169
182
|
[webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
data/lib/cocoawebview/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoawebview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy Jeff
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-03 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Webview ruby binding for macOS
|
13
13
|
email:
|