cocoawebview 0.4.0 → 0.6.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.
- checksums.yaml +4 -4
- data/ext/cocoawebview/cocoawebview.m +20 -1
- data/lib/cocoawebview/version.rb +1 -1
- data/lib/cocoawebview.rb +4 -0
- 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: 17ab44091cb53d27e1f18d689ffbcac46b653c94ad06e96335dc85b1fc82238c
|
|
4
|
+
data.tar.gz: ec4604b5e8a24b9839c7ff8ee5213d2869b64043f0f2c9e4beafc57ee9324e97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b59a45780e4c7c93ad20e5ee3aaa191dd3991d4a887207cf052491e7e1748f6de17e771bcc0902b0d8cdb30ca681c76c4a72add3b31035e8aa35054602323cf
|
|
7
|
+
data.tar.gz: 5add581b2a0cf749a41d66bd6eee0502b82fcf17b5b62fe87cefcdd9f933a07de48d9e9ec9ab17ba9a2df4eb5d0aa9f56aa99e31ccceed94e6bf1a45053b90c9
|
|
@@ -26,6 +26,7 @@ VALUE webview_center(VALUE self);
|
|
|
26
26
|
VALUE webview_is_visible(VALUE self);
|
|
27
27
|
VALUE webview_set_topmost(VALUE self, VALUE topmost);
|
|
28
28
|
VALUE webview_set_bg(VALUE self, VALUE r, VALUE g, VALUE b, VALUE a);
|
|
29
|
+
VALUE webview_increase_normal_level(VALUE self, VALUE delta);
|
|
29
30
|
|
|
30
31
|
@interface FileDropContainerView : NSView {
|
|
31
32
|
VALUE rb_cocoawebview;
|
|
@@ -105,6 +106,10 @@ VALUE webview_set_bg(VALUE self, VALUE r, VALUE g, VALUE b, VALUE a);
|
|
|
105
106
|
app = a;
|
|
106
107
|
}
|
|
107
108
|
|
|
109
|
+
- (void)applicationWillTerminate:(NSNotification *)notification {
|
|
110
|
+
rb_funcall(app, rb_intern("app_will_exit"), 0);
|
|
111
|
+
}
|
|
112
|
+
|
|
108
113
|
- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag {
|
|
109
114
|
rb_funcall(app, rb_intern("dock_did_click"), 0);
|
|
110
115
|
return YES;
|
|
@@ -123,6 +128,7 @@ VALUE webview_set_bg(VALUE self, VALUE r, VALUE g, VALUE b, VALUE a);
|
|
|
123
128
|
FileDropContainerView *fileDropView;
|
|
124
129
|
int deltaY;
|
|
125
130
|
}
|
|
131
|
+
- (void)increaseNormalLevel:(int)delta;
|
|
126
132
|
- (void)setShouldMoveTitleButtons:(BOOL)flag;
|
|
127
133
|
- (void)setDevTool:(BOOL)flag;
|
|
128
134
|
- (void)setDeltaY:(int)dy;
|
|
@@ -159,6 +165,10 @@ VALUE webview_set_bg(VALUE self, VALUE r, VALUE g, VALUE b, VALUE a);
|
|
|
159
165
|
return self;
|
|
160
166
|
}
|
|
161
167
|
|
|
168
|
+
- (void)increaseNormalLevel:(int)delta {
|
|
169
|
+
[self setLevel:NSNormalWindowLevel + delta];
|
|
170
|
+
}
|
|
171
|
+
|
|
162
172
|
- (void)setDeltaY:(int)dy {
|
|
163
173
|
deltaY = dy;
|
|
164
174
|
}
|
|
@@ -321,7 +331,7 @@ Init_cocoawebview(void)
|
|
|
321
331
|
rb_define_method(rb_mCocoaWebviewClass, "visible?", webview_is_visible, 0);
|
|
322
332
|
rb_define_method(rb_mCocoaWebviewClass, "set_topmost", webview_set_topmost, 1);
|
|
323
333
|
rb_define_method(rb_mCocoaWebviewClass, "set_bg", webview_set_bg, 4);
|
|
324
|
-
|
|
334
|
+
rb_define_method(rb_mCocoaWebviewClass, "increase_normal_level", webview_increase_normal_level, 1);
|
|
325
335
|
}
|
|
326
336
|
|
|
327
337
|
VALUE nsapp_initialize(VALUE self) {
|
|
@@ -538,3 +548,12 @@ VALUE webview_set_bg(VALUE self, VALUE r, VALUE g, VALUE b, VALUE a) {
|
|
|
538
548
|
alpha:c_a];
|
|
539
549
|
[webview setBackgroundColor:rgbColor];
|
|
540
550
|
}
|
|
551
|
+
|
|
552
|
+
VALUE webview_increase_normal_level(VALUE self, VALUE delta) {
|
|
553
|
+
VALUE wrapper = rb_ivar_get(self, rb_intern("@webview"));
|
|
554
|
+
CocoaWebview *webview;
|
|
555
|
+
TypedData_Get_Struct(wrapper, CocoaWebview, &cocoawebview_obj_type, webview);
|
|
556
|
+
|
|
557
|
+
int c_delta = NUM2INT(delta);
|
|
558
|
+
[webview increaseNormalLevel:c_delta];
|
|
559
|
+
}
|
data/lib/cocoawebview/version.rb
CHANGED
data/lib/cocoawebview.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.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tommy Jeff
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-10-
|
|
10
|
+
date: 2025-10-17 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Webview ruby binding for macOS
|
|
13
13
|
email:
|