gtk2keypress 0.1.0 → 0.1.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/gtk2keypress.rb +5 -3
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a87eea2e8d277a98a2a966ad8b25591bb900aa7f
|
4
|
+
data.tar.gz: bd165894217d450e494d8cc022d73008fc1c15f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0be313cfdd11857e733267dfb86a0712a5a9a216ff5f07fc5feac1f40f4a8a77daa68e6f085ee48890a51fd7c70ae08ae3e5c71c17a8cd09685162d9547eb187
|
7
|
+
data.tar.gz: b14d1c39a5f6f41b2c8a915503db23affd684043e11257fdc1e7528932d1802de01ddc77b929f00f78bd03b318520fafcf7cd72212a40589eba3b499b07b10e4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/gtk2keypress.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
class Gtk2KeyPress
|
10
10
|
|
11
|
-
def initialize(parent)
|
11
|
+
def initialize(parent, external=nil)
|
12
12
|
|
13
13
|
parent.add_events(Gdk::Event::KEY_PRESS)
|
14
14
|
last_keydown, last_keyup = '', ''
|
@@ -28,7 +28,9 @@ class Gtk2KeyPress
|
|
28
28
|
end
|
29
29
|
|
30
30
|
on_keypress(e)
|
31
|
+
external.on_keypress if external and external.respond_to? :on_keypress
|
31
32
|
on_keydown(e)
|
33
|
+
external.on_keydown if external and external.respond_to? :on_keydown
|
32
34
|
|
33
35
|
end
|
34
36
|
|
@@ -51,6 +53,7 @@ class Gtk2KeyPress
|
|
51
53
|
end
|
52
54
|
|
53
55
|
on_keyup(e)
|
56
|
+
external.on_keyup if external and external.respond_to? :on_keyup
|
54
57
|
end
|
55
58
|
|
56
59
|
last_keyup = e.keyval
|
@@ -69,5 +72,4 @@ class Gtk2KeyPress
|
|
69
72
|
|
70
73
|
def on_keyup(e)
|
71
74
|
end
|
72
|
-
end
|
73
|
-
|
75
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|