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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6429fedf1d1f28dd4375f23a4874920db7df15a3ad1b8385ae97332315f9031
4
- data.tar.gz: 2697a99cd838afd93bf2af09c9a5d32e94ca596685149d53cab3735249b4d8f4
3
+ metadata.gz: fb18e38b4326918bda4d126cbfea4917a5b34931185e20536402aa0c5854bfb2
4
+ data.tar.gz: f6b1d04f8c067cb23dd837aebc7557f7df65bbd4f90f909b06b0e41c70d24a1b
5
5
  SHA512:
6
- metadata.gz: 4cdd3cd1510626f4ae76f0ed65005e3d934d6ce6dfb35a490ec3e2293be6fe2b740427f7add14642c6566769d8d688e6f64f866ca1dbdb7442d6e025739e1bd2
7
- data.tar.gz: 7ca9097dbfecace2f6bdbfb42674d2d8ec8ae52751dc2a1e4b79ec04415ffc7d1deb71c3e0e220c22399751c241789a8c063a428a34f3299460540be716707b4
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
- WKWebView *webView;
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 = [[WKWebView alloc] initWithFrame:contentRect configuration:config];
179
+ webView = [[CocoaWKWebView alloc] initWithFrame:contentRect configuration:config];
167
180
 
168
181
  // Enable autoresizing
169
182
  [webView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cocoawebview
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
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.0
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-01 00:00:00.000000000 Z
10
+ date: 2025-07-03 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Webview ruby binding for macOS
13
13
  email: