fzeet 0.4.1 → 0.4.2
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.
- data/examples/Command.rbw +9 -11
- data/examples/Control/Button.rbw +19 -0
- data/examples/Dialog.rbw +43 -0
- data/examples/DialogApplication.rbw +22 -0
- data/examples/Inheritance.rbw +44 -0
- data/examples/Inheritance1.rbw +43 -0
- data/examples/LifeCycle.rbw +1 -1
- data/examples/LifeCycle2.rbw +1 -1
- data/examples/LifeCycleNC.rbw +1 -1
- data/examples/Menu/ContextMenu.rbw +15 -0
- data/examples/Menu/Menu.rbw +31 -22
- data/examples/Menu/MenuPARGB32.rbw +22 -0
- data/examples/MinimalOpts.rbw +7 -0
- data/examples/Scribble.rbw +26 -0
- data/examples/res/edit-copy.bmp +0 -0
- data/examples/res/edit-cut.bmp +0 -0
- data/examples/res/edit-paste.bmp +0 -0
- data/lib/fzeet/Accelerator.rb +1 -1
- data/lib/fzeet/Application.rb +24 -5
- data/lib/fzeet/Control.rb +32 -3
- data/lib/fzeet/Menu.rb +37 -1
- data/lib/fzeet/Window.rb +177 -18
- data/lib/fzeet/WindowMethods.rb +41 -7
- data/lib/fzeet/common.rb +214 -6
- data/lib/fzeet/windows/comctl.rb +59 -0
- data/lib/fzeet/windows/common.rb +25 -1
- data/lib/fzeet/windows/gdi.rb +3 -0
- data/lib/fzeet/windows/user.rb +252 -34
- data/lib/fzeet/windows/userctl.rb +68 -0
- data/lib/fzeet/windows/usermsg.rb +265 -0
- data/lib/fzeet/windows.rb +4 -0
- data/lib/fzeet.rb +0 -2
- metadata +19 -4
@@ -0,0 +1,265 @@
|
|
1
|
+
require_relative 'common'
|
2
|
+
|
3
|
+
module Fzeet
|
4
|
+
module Windows
|
5
|
+
if __FILE__ == $0
|
6
|
+
ffi_lib 'user32'
|
7
|
+
ffi_convention :stdcall
|
8
|
+
end
|
9
|
+
|
10
|
+
#{ WM_xxx
|
11
|
+
WM_NULL = 0x0000
|
12
|
+
WM_CREATE = 0x0001
|
13
|
+
WM_DESTROY = 0x0002
|
14
|
+
WM_MOVE = 0x0003
|
15
|
+
WM_SIZE = 0x0005
|
16
|
+
WM_ACTIVATE = 0x0006
|
17
|
+
WM_SETFOCUS = 0x0007
|
18
|
+
WM_KILLFOCUS = 0x0008
|
19
|
+
WM_ENABLE = 0x000A
|
20
|
+
WM_SETREDRAW = 0x000B
|
21
|
+
WM_SETTEXT = 0x000C
|
22
|
+
WM_GETTEXT = 0x000D
|
23
|
+
WM_GETTEXTLENGTH = 0x000E
|
24
|
+
WM_PAINT = 0x000F
|
25
|
+
WM_CLOSE = 0x0010
|
26
|
+
WM_QUERYENDSESSION = 0x0011
|
27
|
+
WM_QUERYOPEN = 0x0013
|
28
|
+
WM_ENDSESSION = 0x0016
|
29
|
+
WM_QUIT = 0x0012
|
30
|
+
WM_ERASEBKGND = 0x0014
|
31
|
+
WM_SYSCOLORCHANGE = 0x0015
|
32
|
+
WM_SHOWWINDOW = 0x0018
|
33
|
+
WM_WININICHANGE = 0x001A
|
34
|
+
WM_SETTINGCHANGE = WM_WININICHANGE
|
35
|
+
WM_DEVMODECHANGE = 0x001B
|
36
|
+
WM_ACTIVATEAPP = 0x001C
|
37
|
+
WM_FONTCHANGE = 0x001D
|
38
|
+
WM_TIMECHANGE = 0x001E
|
39
|
+
WM_CANCELMODE = 0x001F
|
40
|
+
WM_SETCURSOR = 0x0020
|
41
|
+
WM_MOUSEACTIVATE = 0x0021
|
42
|
+
WM_CHILDACTIVATE = 0x0022
|
43
|
+
WM_QUEUESYNC = 0x0023
|
44
|
+
WM_GETMINMAXINFO = 0x0024
|
45
|
+
WM_PAINTICON = 0x0026
|
46
|
+
WM_ICONERASEBKGND = 0x0027
|
47
|
+
WM_NEXTDLGCTL = 0x0028
|
48
|
+
WM_SPOOLERSTATUS = 0x002A
|
49
|
+
WM_DRAWITEM = 0x002B
|
50
|
+
WM_MEASUREITEM = 0x002C
|
51
|
+
WM_DELETEITEM = 0x002D
|
52
|
+
WM_VKEYTOITEM = 0x002E
|
53
|
+
WM_CHARTOITEM = 0x002F
|
54
|
+
WM_SETFONT = 0x0030
|
55
|
+
WM_GETFONT = 0x0031
|
56
|
+
WM_SETHOTKEY = 0x0032
|
57
|
+
WM_GETHOTKEY = 0x0033
|
58
|
+
WM_QUERYDRAGICON = 0x0037
|
59
|
+
WM_COMPAREITEM = 0x0039
|
60
|
+
WM_GETOBJECT = 0x003D
|
61
|
+
WM_COMPACTING = 0x0041
|
62
|
+
WM_COMMNOTIFY = 0x0044
|
63
|
+
WM_WINDOWPOSCHANGING = 0x0046
|
64
|
+
WM_WINDOWPOSCHANGED = 0x0047
|
65
|
+
WM_POWER = 0x0048
|
66
|
+
WM_COPYDATA = 0x004A
|
67
|
+
WM_CANCELJOURNAL = 0x004B
|
68
|
+
WM_NOTIFY = 0x004E
|
69
|
+
WM_INPUTLANGCHANGEREQUEST = 0x0050
|
70
|
+
WM_INPUTLANGCHANGE = 0x0051
|
71
|
+
WM_TCARD = 0x0052
|
72
|
+
WM_HELP = 0x0053
|
73
|
+
WM_USERCHANGED = 0x0054
|
74
|
+
WM_NOTIFYFORMAT = 0x0055
|
75
|
+
WM_CONTEXTMENU = 0x007B
|
76
|
+
WM_STYLECHANGING = 0x007C
|
77
|
+
WM_STYLECHANGED = 0x007D
|
78
|
+
WM_DISPLAYCHANGE = 0x007E
|
79
|
+
WM_GETICON = 0x007F
|
80
|
+
WM_SETICON = 0x0080
|
81
|
+
WM_NCCREATE = 0x0081
|
82
|
+
WM_NCDESTROY = 0x0082
|
83
|
+
WM_NCCALCSIZE = 0x0083
|
84
|
+
WM_NCHITTEST = 0x0084
|
85
|
+
WM_NCPAINT = 0x0085
|
86
|
+
WM_NCACTIVATE = 0x0086
|
87
|
+
WM_GETDLGCODE = 0x0087
|
88
|
+
WM_SYNCPAINT = 0x0088
|
89
|
+
WM_NCMOUSEMOVE = 0x00A0
|
90
|
+
WM_NCLBUTTONDOWN = 0x00A1
|
91
|
+
WM_NCLBUTTONUP = 0x00A2
|
92
|
+
WM_NCLBUTTONDBLCLK = 0x00A3
|
93
|
+
WM_NCRBUTTONDOWN = 0x00A4
|
94
|
+
WM_NCRBUTTONUP = 0x00A5
|
95
|
+
WM_NCRBUTTONDBLCLK = 0x00A6
|
96
|
+
WM_NCMBUTTONDOWN = 0x00A7
|
97
|
+
WM_NCMBUTTONUP = 0x00A8
|
98
|
+
WM_NCMBUTTONDBLCLK = 0x00A9
|
99
|
+
WM_NCXBUTTONDOWN = 0x00AB
|
100
|
+
WM_NCXBUTTONUP = 0x00AC
|
101
|
+
WM_NCXBUTTONDBLCLK = 0x00AD
|
102
|
+
WM_INPUT_DEVICE_CHANGE = 0x00FE
|
103
|
+
WM_INPUT = 0x00FF
|
104
|
+
WM_KEYFIRST = 0x0100
|
105
|
+
WM_KEYDOWN = 0x0100
|
106
|
+
WM_KEYUP = 0x0101
|
107
|
+
WM_CHAR = 0x0102
|
108
|
+
WM_DEADCHAR = 0x0103
|
109
|
+
WM_SYSKEYDOWN = 0x0104
|
110
|
+
WM_SYSKEYUP = 0x0105
|
111
|
+
WM_SYSCHAR = 0x0106
|
112
|
+
WM_SYSDEADCHAR = 0x0107
|
113
|
+
WM_UNICHAR = 0x0109
|
114
|
+
WM_KEYLAST = 0x0109
|
115
|
+
WM_IME_STARTCOMPOSITION = 0x010D
|
116
|
+
WM_IME_ENDCOMPOSITION = 0x010E
|
117
|
+
WM_IME_COMPOSITION = 0x010F
|
118
|
+
WM_IME_KEYLAST = 0x010F
|
119
|
+
WM_INITDIALOG = 0x0110
|
120
|
+
WM_COMMAND = 0x0111
|
121
|
+
WM_SYSCOMMAND = 0x0112
|
122
|
+
WM_TIMER = 0x0113
|
123
|
+
WM_HSCROLL = 0x0114
|
124
|
+
WM_VSCROLL = 0x0115
|
125
|
+
WM_INITMENU = 0x0116
|
126
|
+
WM_INITMENUPOPUP = 0x0117
|
127
|
+
WM_GESTURE = 0x0119
|
128
|
+
WM_GESTURENOTIFY = 0x011A
|
129
|
+
WM_MENUSELECT = 0x011F
|
130
|
+
WM_MENUCHAR = 0x0120
|
131
|
+
WM_ENTERIDLE = 0x0121
|
132
|
+
WM_MENURBUTTONUP = 0x0122
|
133
|
+
WM_MENUDRAG = 0x0123
|
134
|
+
WM_MENUGETOBJECT = 0x0124
|
135
|
+
WM_UNINITMENUPOPUP = 0x0125
|
136
|
+
WM_MENUCOMMAND = 0x0126
|
137
|
+
WM_CHANGEUISTATE = 0x0127
|
138
|
+
WM_UPDATEUISTATE = 0x0128
|
139
|
+
WM_QUERYUISTATE = 0x0129
|
140
|
+
WM_CTLCOLORMSGBOX = 0x0132
|
141
|
+
WM_CTLCOLOREDIT = 0x0133
|
142
|
+
WM_CTLCOLORLISTBOX = 0x0134
|
143
|
+
WM_CTLCOLORBTN = 0x0135
|
144
|
+
WM_CTLCOLORDLG = 0x0136
|
145
|
+
WM_CTLCOLORSCROLLBAR = 0x0137
|
146
|
+
WM_CTLCOLORSTATIC = 0x0138
|
147
|
+
WM_MOUSEFIRST = 0x0200
|
148
|
+
WM_MOUSEMOVE = 0x0200
|
149
|
+
WM_LBUTTONDOWN = 0x0201
|
150
|
+
WM_LBUTTONUP = 0x0202
|
151
|
+
WM_LBUTTONDBLCLK = 0x0203
|
152
|
+
WM_RBUTTONDOWN = 0x0204
|
153
|
+
WM_RBUTTONUP = 0x0205
|
154
|
+
WM_RBUTTONDBLCLK = 0x0206
|
155
|
+
WM_MBUTTONDOWN = 0x0207
|
156
|
+
WM_MBUTTONUP = 0x0208
|
157
|
+
WM_MBUTTONDBLCLK = 0x0209
|
158
|
+
WM_MOUSEWHEEL = 0x020A
|
159
|
+
WM_XBUTTONDOWN = 0x020B
|
160
|
+
WM_XBUTTONUP = 0x020C
|
161
|
+
WM_XBUTTONDBLCLK = 0x020D
|
162
|
+
WM_MOUSEHWHEEL = 0x020E
|
163
|
+
WM_MOUSELAST = 0x020E
|
164
|
+
WM_PARENTNOTIFY = 0x0210
|
165
|
+
WM_ENTERMENULOOP = 0x0211
|
166
|
+
WM_EXITMENULOOP = 0x0212
|
167
|
+
WM_NEXTMENU = 0x0213
|
168
|
+
WM_SIZING = 0x0214
|
169
|
+
WM_CAPTURECHANGED = 0x0215
|
170
|
+
WM_MOVING = 0x0216
|
171
|
+
WM_POWERBROADCAST = 0x0218
|
172
|
+
WM_DEVICECHANGE = 0x0219
|
173
|
+
WM_MDICREATE = 0x0220
|
174
|
+
WM_MDIDESTROY = 0x0221
|
175
|
+
WM_MDIACTIVATE = 0x0222
|
176
|
+
WM_MDIRESTORE = 0x0223
|
177
|
+
WM_MDINEXT = 0x0224
|
178
|
+
WM_MDIMAXIMIZE = 0x0225
|
179
|
+
WM_MDITILE = 0x0226
|
180
|
+
WM_MDICASCADE = 0x0227
|
181
|
+
WM_MDIICONARRANGE = 0x0228
|
182
|
+
WM_MDIGETACTIVE = 0x0229
|
183
|
+
WM_MDISETMENU = 0x0230
|
184
|
+
WM_ENTERSIZEMOVE = 0x0231
|
185
|
+
WM_EXITSIZEMOVE = 0x0232
|
186
|
+
WM_DROPFILES = 0x0233
|
187
|
+
WM_MDIREFRESHMENU = 0x0234
|
188
|
+
WM_TOUCH = 0x0240
|
189
|
+
WM_IME_SETCONTEXT = 0x0281
|
190
|
+
WM_IME_NOTIFY = 0x0282
|
191
|
+
WM_IME_CONTROL = 0x0283
|
192
|
+
WM_IME_COMPOSITIONFULL = 0x0284
|
193
|
+
WM_IME_SELECT = 0x0285
|
194
|
+
WM_IME_CHAR = 0x0286
|
195
|
+
WM_IME_REQUEST = 0x0288
|
196
|
+
WM_IME_KEYDOWN = 0x0290
|
197
|
+
WM_IME_KEYUP = 0x0291
|
198
|
+
WM_MOUSEHOVER = 0x02A1
|
199
|
+
WM_MOUSELEAVE = 0x02A3
|
200
|
+
WM_NCMOUSEHOVER = 0x02A0
|
201
|
+
WM_NCMOUSELEAVE = 0x02A2
|
202
|
+
WM_WTSSESSION_CHANGE = 0x02B1
|
203
|
+
WM_TABLET_FIRST = 0x02c0
|
204
|
+
WM_TABLET_LAST = 0x02df
|
205
|
+
WM_CUT = 0x0300
|
206
|
+
WM_COPY = 0x0301
|
207
|
+
WM_PASTE = 0x0302
|
208
|
+
WM_CLEAR = 0x0303
|
209
|
+
WM_UNDO = 0x0304
|
210
|
+
WM_RENDERFORMAT = 0x0305
|
211
|
+
WM_RENDERALLFORMATS = 0x0306
|
212
|
+
WM_DESTROYCLIPBOARD = 0x0307
|
213
|
+
WM_DRAWCLIPBOARD = 0x0308
|
214
|
+
WM_PAINTCLIPBOARD = 0x0309
|
215
|
+
WM_VSCROLLCLIPBOARD = 0x030A
|
216
|
+
WM_SIZECLIPBOARD = 0x030B
|
217
|
+
WM_ASKCBFORMATNAME = 0x030C
|
218
|
+
WM_CHANGECBCHAIN = 0x030D
|
219
|
+
WM_HSCROLLCLIPBOARD = 0x030E
|
220
|
+
WM_QUERYNEWPALETTE = 0x030F
|
221
|
+
WM_PALETTEISCHANGING = 0x0310
|
222
|
+
WM_PALETTECHANGED = 0x0311
|
223
|
+
WM_HOTKEY = 0x0312
|
224
|
+
WM_PRINT = 0x0317
|
225
|
+
WM_PRINTCLIENT = 0x0318
|
226
|
+
WM_APPCOMMAND = 0x0319
|
227
|
+
WM_THEMECHANGED = 0x031A
|
228
|
+
WM_CLIPBOARDUPDATE = 0x031D
|
229
|
+
WM_DWMCOMPOSITIONCHANGED = 0x031E
|
230
|
+
WM_DWMNCRENDERINGCHANGED = 0x031F
|
231
|
+
WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320
|
232
|
+
WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321
|
233
|
+
WM_DWMSENDICONICTHUMBNAIL = 0x0323
|
234
|
+
WM_DWMSENDICONICLIVEPREVIEWBITMAP = 0x0326
|
235
|
+
WM_GETTITLEBARINFOEX = 0x033F
|
236
|
+
WM_HANDHELDFIRST = 0x0358
|
237
|
+
WM_HANDHELDLAST = 0x035F
|
238
|
+
WM_AFXFIRST = 0x0360
|
239
|
+
WM_AFXLAST = 0x037F
|
240
|
+
WM_PENWINFIRST = 0x0380
|
241
|
+
WM_PENWINLAST = 0x038F
|
242
|
+
WM_APP = 0x8000
|
243
|
+
WM_USER = 0x0400
|
244
|
+
#}
|
245
|
+
|
246
|
+
class MSG < FFI::Struct
|
247
|
+
layout \
|
248
|
+
:hwnd, :pointer,
|
249
|
+
:message, :uint,
|
250
|
+
:wParam, :uint,
|
251
|
+
:lParam, :long,
|
252
|
+
:time, :ulong,
|
253
|
+
:pt, POINT
|
254
|
+
end
|
255
|
+
|
256
|
+
attach_function :GetMessage, :GetMessageA, [:pointer, :pointer, :uint, :uint], :int
|
257
|
+
attach_function :IsDialogMessage, [:pointer, :pointer], :int
|
258
|
+
attach_function :TranslateAccelerator, :TranslateAcceleratorA, [:pointer, :pointer, :pointer], :int
|
259
|
+
attach_function :TranslateMessage, [:pointer], :int
|
260
|
+
attach_function :DispatchMessage, :DispatchMessageA, [:pointer], :long
|
261
|
+
attach_function :SendMessage, :SendMessageA, [:pointer, :uint, :uint, :long], :long
|
262
|
+
attach_function :PostMessage, :PostMessageA, [:pointer, :uint, :uint, :long], :int
|
263
|
+
attach_function :PostQuitMessage, [:int], :void
|
264
|
+
end
|
265
|
+
end
|
data/lib/fzeet/windows.rb
CHANGED
@@ -2,8 +2,12 @@ require_relative 'windows/libc'
|
|
2
2
|
|
3
3
|
require_relative 'windows/kernel'
|
4
4
|
require_relative 'windows/user'
|
5
|
+
require_relative 'windows/usermsg'
|
6
|
+
require_relative 'windows/userctl'
|
5
7
|
require_relative 'windows/gdi'
|
6
8
|
|
9
|
+
require_relative 'windows/comctl'
|
10
|
+
|
7
11
|
module Fzeet
|
8
12
|
module Windows
|
9
13
|
def DetonateLastError(on, name, *args)
|
data/lib/fzeet.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fzeet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Radoslav Peev
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-17 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -43,11 +43,14 @@ extensions: []
|
|
43
43
|
extra_rdoc_files: []
|
44
44
|
|
45
45
|
files:
|
46
|
+
- lib/fzeet/windows/comctl.rb
|
46
47
|
- lib/fzeet/windows/common.rb
|
47
48
|
- lib/fzeet/windows/gdi.rb
|
48
49
|
- lib/fzeet/windows/kernel.rb
|
49
50
|
- lib/fzeet/windows/libc.rb
|
50
51
|
- lib/fzeet/windows/user.rb
|
52
|
+
- lib/fzeet/windows/userctl.rb
|
53
|
+
- lib/fzeet/windows/usermsg.rb
|
51
54
|
- lib/fzeet/Accelerator.rb
|
52
55
|
- lib/fzeet/Application.rb
|
53
56
|
- lib/fzeet/common.rb
|
@@ -57,19 +60,31 @@ files:
|
|
57
60
|
- lib/fzeet/WindowMethods.rb
|
58
61
|
- lib/fzeet/windows.rb
|
59
62
|
- lib/fzeet.rb
|
63
|
+
- examples/res/edit-copy.bmp
|
64
|
+
- examples/res/edit-cut.bmp
|
65
|
+
- examples/res/edit-paste.bmp
|
60
66
|
- examples/Raw/Command.rbw
|
61
67
|
- examples/Raw/Hello.rbw
|
62
68
|
- examples/Raw/LifeCycle.rbw
|
63
69
|
- examples/Raw/Minimal.rbw
|
64
70
|
- examples/Command.rbw
|
71
|
+
- examples/Dialog.rbw
|
72
|
+
- examples/DialogApplication.rbw
|
65
73
|
- examples/Hello.rbw
|
74
|
+
- examples/Inheritance.rbw
|
75
|
+
- examples/Inheritance1.rbw
|
66
76
|
- examples/LifeCycle.rbw
|
67
77
|
- examples/LifeCycle1.rbw
|
68
78
|
- examples/LifeCycle2.rbw
|
69
79
|
- examples/LifeCycleNC.rbw
|
70
80
|
- examples/MessageBox.rbw
|
71
81
|
- examples/Minimal.rbw
|
82
|
+
- examples/MinimalOpts.rbw
|
83
|
+
- examples/Scribble.rbw
|
84
|
+
- examples/Menu/ContextMenu.rbw
|
72
85
|
- examples/Menu/Menu.rbw
|
86
|
+
- examples/Menu/MenuPARGB32.rbw
|
87
|
+
- examples/Control/Button.rbw
|
73
88
|
- LICENSE
|
74
89
|
has_rdoc: true
|
75
90
|
homepage:
|