fzeet 0.6.5 → 0.6.6
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/LICENSE_CEF +29 -0
- data/checks/Bstr.rb +14 -0
- data/checks/Decimal.rb +27 -0
- data/checks/OSVERSIONINFOEX.rb +14 -0
- data/checks/Point.rb +65 -0
- data/checks/Rect.rb +104 -0
- data/checks/RunAll.rb +2 -0
- data/checks/SafeArray.rb +27 -0
- data/checks/Size.rb +45 -0
- data/checks/SystemTime.rb +43 -0
- data/checks/Variant.rb +160 -0
- data/examples/Control/DateTimePicker.rbw +1 -1
- data/examples/Control/MonthCalendar.rbw +1 -1
- data/examples/Control/{WebBrowser.rbw → WebBrowser/WebBrowser.rbw} +2 -2
- data/examples/Control/{WebBrowser1.rbw → WebBrowser/WebBrowser1.rbw} +0 -0
- data/examples/Control/WebBrowser/WebBrowser2.rbw +24 -0
- data/examples/Control/{WebBrowser3.rbw → WebBrowser/WebBrowser3.rbw} +0 -0
- data/examples/Control/{WebBrowser4.rbw → WebBrowser/WebBrowser4.rbw} +8 -3
- data/examples/Control/{WebBrowser4Sinatra.rb → WebBrowser/WebBrowser4Sinatra.rb} +0 -0
- data/examples/Control/{WebBrowser5.rbw → WebBrowser/WebBrowser5.rbw} +4 -2
- data/examples/Control/WebBrowser/jQueryUI.html +53 -0
- data/examples/Control/WebBrowser/jQueryUI.rbw +26 -0
- data/examples/MDI.rbw +2 -2
- data/examples/Raw/UIRibbon/Command.rbw +3 -3
- data/examples/Raw/UIRibbon/Minimal.rbw +3 -3
- data/examples/Version.rbw +1 -1
- data/lib/fzeet.rb +22 -7
- data/lib/fzeet/windows.rb +82 -5
- data/lib/fzeet/windows/com.rb +1 -318
- data/lib/fzeet/windows/com/Common.rb +318 -0
- data/lib/fzeet/windows/comctl.rb +1 -1
- data/lib/fzeet/windows/comctl/ComboBoxEx.rb +32 -0
- data/lib/fzeet/windows/comctl/DateTimePicker.rb +35 -0
- data/lib/fzeet/windows/comctl/Header.rb +61 -1
- data/lib/fzeet/windows/comctl/ListView.rb +133 -3
- data/lib/fzeet/windows/comctl/MonthCalendar.rb +35 -0
- data/lib/fzeet/windows/comctl/ProgressBar.rb +37 -0
- data/lib/fzeet/windows/comctl/PropertySheet.rb +50 -2
- data/lib/fzeet/windows/comctl/SysLink.rb +37 -0
- data/lib/fzeet/windows/comctl/Tab.rb +56 -0
- data/lib/fzeet/windows/comctl/TreeView.rb +81 -2
- data/lib/fzeet/windows/comctl/UpDown.rb +33 -0
- data/lib/fzeet/windows/comdlg.rb +1 -0
- data/lib/fzeet/windows/comdlg/ColorDialog.rb +41 -0
- data/lib/fzeet/windows/comdlg/Common.rb +87 -0
- data/lib/fzeet/windows/comdlg/FileDialog.rb +133 -0
- data/lib/fzeet/windows/comdlg/FindReplaceDialog.rb +102 -0
- data/lib/fzeet/windows/comdlg/FontDialog.rb +36 -0
- data/lib/fzeet/windows/comdlg/PrintDialog.rb +72 -0
- data/lib/fzeet/{Dialog → windows/comdlg}/ShellFileDialog.rb +0 -0
- data/lib/fzeet/windows/core.rb +5 -0
- data/lib/fzeet/windows/core/Common.rb +324 -0
- data/lib/fzeet/windows/core/Point.rb +42 -0
- data/lib/fzeet/windows/core/Rect.rb +114 -0
- data/lib/fzeet/windows/core/Size.rb +34 -0
- data/lib/fzeet/windows/core/SystemTime.rb +46 -0
- data/lib/fzeet/windows/core/Version.rb +57 -0
- data/lib/fzeet/windows/gdi.rb +1 -62
- data/lib/fzeet/windows/gdi/Common.rb +40 -0
- data/lib/fzeet/windows/gdi/Font.rb +64 -0
- data/lib/fzeet/windows/kernel.rb +1 -92
- data/lib/fzeet/windows/kernel/Common.rb +92 -0
- data/lib/fzeet/windows/libc.rb +1 -1
- data/lib/fzeet/windows/libcef.rb +1 -0
- data/lib/fzeet/windows/mshtml.rb +1 -1135
- data/lib/fzeet/windows/mshtml/Common.rb +1135 -0
- data/lib/fzeet/windows/ole.rb +1 -561
- data/lib/fzeet/windows/ole/Common.rb +112 -0
- data/lib/fzeet/windows/ole/PropVariant.rb +141 -0
- data/lib/fzeet/windows/oleaut.rb +3 -0
- data/lib/fzeet/windows/oleaut/Bstr.rb +39 -0
- data/lib/fzeet/windows/oleaut/Common.rb +187 -0
- data/lib/fzeet/windows/oleaut/SafeArray.rb +104 -0
- data/lib/fzeet/windows/oleaut/Variant.rb +269 -0
- data/lib/fzeet/windows/scintilla.rb +115 -1
- data/lib/fzeet/windows/{SciLexer.dll → scintilla/SciLexer.dll} +0 -0
- data/lib/fzeet/windows/shdocvw.rb +150 -0
- data/lib/fzeet/windows/shell.rb +1 -1
- data/lib/fzeet/windows/shell/Common.rb +94 -2
- data/lib/fzeet/windows/shlwapi.rb +1 -1
- data/lib/fzeet/windows/uiribbon.rb +416 -0
- data/lib/fzeet/windows/urlmon.rb +2 -2
- data/lib/fzeet/windows/user.rb +20 -0
- data/lib/fzeet/windows/user/Accelerator.rb +45 -0
- data/lib/fzeet/windows/user/Common.rb +3 -2
- data/lib/fzeet/windows/user/Control/Button.rb +54 -0
- data/lib/fzeet/windows/user/Control/ComboBox.rb +44 -1
- data/lib/fzeet/windows/user/Control/Common.rb +88 -1
- data/lib/fzeet/windows/user/Control/Edit.rb +50 -0
- data/lib/fzeet/windows/user/Control/ListBox.rb +69 -0
- data/lib/fzeet/windows/user/Control/Static.rb +31 -0
- data/lib/fzeet/windows/user/Menu.rb +130 -0
- data/lib/fzeet/windows/user/Message.rb +9 -0
- data/lib/fzeet/windows/user/MessageBox.rb +47 -0
- data/lib/fzeet/windows/user/SystemParametersInfo.rb +1 -1
- data/lib/fzeet/windows/user/Window.rb +5 -463
- data/lib/fzeet/{Window → windows/user/Window}/Common.rb +460 -0
- data/lib/fzeet/{Window → windows/user/Window}/Container.rb +0 -0
- data/lib/fzeet/{Window → windows/user/Window}/Dialog.rb +0 -0
- data/lib/fzeet/{Window → windows/user/Window}/MDI.rb +0 -0
- data/lib/fzeet/{Window → windows/user/Window}/View.rb +0 -0
- data/lib/fzeet/{Window → windows/user/Window}/Window.rb +0 -0
- data/lib/fzeet/{Window → windows/user/Window}/WindowMethods.rb +1 -1
- metadata +55 -61
- data/examples/Control/WebBrowser2.rbw +0 -39
- data/lib/fzeet/Accelerator.rb +0 -48
- data/lib/fzeet/Application.rb +0 -71
- data/lib/fzeet/Common.rb +0 -350
- data/lib/fzeet/Control.rb +0 -19
- data/lib/fzeet/Control/Button.rb +0 -57
- data/lib/fzeet/Control/ComboBox.rb +0 -46
- data/lib/fzeet/Control/ComboBoxEx.rb +0 -35
- data/lib/fzeet/Control/Common.rb +0 -89
- data/lib/fzeet/Control/DateTimePicker.rb +0 -38
- data/lib/fzeet/Control/Edit.rb +0 -53
- data/lib/fzeet/Control/ExplorerBrowser.rb +0 -66
- data/lib/fzeet/Control/Header.rb +0 -63
- data/lib/fzeet/Control/ListBox.rb +0 -72
- data/lib/fzeet/Control/ListView.rb +0 -133
- data/lib/fzeet/Control/MonthCalendar.rb +0 -38
- data/lib/fzeet/Control/ProgressBar.rb +0 -40
- data/lib/fzeet/Control/PropertySheet.rb +0 -51
- data/lib/fzeet/Control/Scintilla.rb +0 -117
- data/lib/fzeet/Control/Static.rb +0 -34
- data/lib/fzeet/Control/SysLink.rb +0 -40
- data/lib/fzeet/Control/Tab.rb +0 -59
- data/lib/fzeet/Control/TreeView.rb +0 -82
- data/lib/fzeet/Control/UpDown.rb +0 -36
- data/lib/fzeet/Control/WebBrowser.rb +0 -153
- data/lib/fzeet/Dialog.rb +0 -6
- data/lib/fzeet/Dialog/ColorDialog.rb +0 -44
- data/lib/fzeet/Dialog/Common.rb +0 -89
- data/lib/fzeet/Dialog/FileDialog.rb +0 -136
- data/lib/fzeet/Dialog/FindReplaceDialog.rb +0 -105
- data/lib/fzeet/Dialog/FontDialog.rb +0 -39
- data/lib/fzeet/Dialog/PrintDialog.rb +0 -75
- data/lib/fzeet/Menu.rb +0 -133
- data/lib/fzeet/UIRibbon.rb +0 -417
- data/lib/fzeet/Window.rb +0 -5
- data/lib/fzeet/windows/common.rb +0 -244
|
@@ -1,6 +1,466 @@
|
|
|
1
1
|
require_relative 'WindowMethods'
|
|
2
2
|
|
|
3
3
|
module Fzeet
|
|
4
|
+
module Windows
|
|
5
|
+
CS_VREDRAW = 0x0001
|
|
6
|
+
CS_HREDRAW = 0x0002
|
|
7
|
+
CS_DBLCLKS = 0x0008
|
|
8
|
+
CS_OWNDC = 0x0020
|
|
9
|
+
CS_CLASSDC = 0x0040
|
|
10
|
+
CS_PARENTDC = 0x0080
|
|
11
|
+
CS_NOCLOSE = 0x0200
|
|
12
|
+
CS_SAVEBITS = 0x0800
|
|
13
|
+
CS_BYTEALIGNCLIENT = 0x1000
|
|
14
|
+
CS_BYTEALIGNWINDOW = 0x2000
|
|
15
|
+
CS_GLOBALCLASS = 0x4000
|
|
16
|
+
CS_IME = 0x00010000
|
|
17
|
+
CS_DROPSHADOW = 0x00020000
|
|
18
|
+
|
|
19
|
+
callback :WNDPROC, [:pointer, :uint, :uint, :long], :long
|
|
20
|
+
|
|
21
|
+
attach_function :DefWindowProc, :DefWindowProcA, [:pointer, :uint, :uint, :long], :long
|
|
22
|
+
attach_function :DefFrameProc, :DefFrameProcA, [:pointer, :pointer, :uint, :uint, :long], :long
|
|
23
|
+
attach_function :DefMDIChildProc, :DefMDIChildProcA, [:pointer, :uint, :uint, :long], :long
|
|
24
|
+
|
|
25
|
+
callback :DLGPROC, [:pointer, :uint, :uint, :long], :int
|
|
26
|
+
|
|
27
|
+
attach_function :DefDlgProc, :DefDlgProcA, [:pointer, :uint, :uint, :long], :long
|
|
28
|
+
|
|
29
|
+
IDI_APPLICATION = FFI::Pointer.new(32512)
|
|
30
|
+
IDI_HAND = FFI::Pointer.new(32513)
|
|
31
|
+
IDI_QUESTION = FFI::Pointer.new(32514)
|
|
32
|
+
IDI_EXCLAMATION = FFI::Pointer.new(32515)
|
|
33
|
+
IDI_ASTERISK = FFI::Pointer.new(32516)
|
|
34
|
+
IDI_WINLOGO = FFI::Pointer.new(32517)
|
|
35
|
+
IDI_SHIELD = FFI::Pointer.new(32518)
|
|
36
|
+
IDI_WARNING = IDI_EXCLAMATION
|
|
37
|
+
IDI_ERROR = IDI_HAND
|
|
38
|
+
IDI_INFORMATION = IDI_ASTERISK
|
|
39
|
+
|
|
40
|
+
attach_function :LoadIcon, :LoadIconA, [:pointer, :pointer], :pointer
|
|
41
|
+
|
|
42
|
+
IDC_ARROW = FFI::Pointer.new(32512)
|
|
43
|
+
IDC_IBEAM = FFI::Pointer.new(32513)
|
|
44
|
+
IDC_WAIT = FFI::Pointer.new(32514)
|
|
45
|
+
IDC_CROSS = FFI::Pointer.new(32515)
|
|
46
|
+
IDC_UPARROW = FFI::Pointer.new(32516)
|
|
47
|
+
IDC_SIZE = FFI::Pointer.new(32640)
|
|
48
|
+
IDC_ICON = FFI::Pointer.new(32641)
|
|
49
|
+
IDC_SIZENWSE = FFI::Pointer.new(32642)
|
|
50
|
+
IDC_SIZENESW = FFI::Pointer.new(32643)
|
|
51
|
+
IDC_SIZEWE = FFI::Pointer.new(32644)
|
|
52
|
+
IDC_SIZENS = FFI::Pointer.new(32645)
|
|
53
|
+
IDC_SIZEALL = FFI::Pointer.new(32646)
|
|
54
|
+
IDC_NO = FFI::Pointer.new(32648)
|
|
55
|
+
IDC_HAND = FFI::Pointer.new(32649)
|
|
56
|
+
IDC_APPSTARTING = FFI::Pointer.new(32650)
|
|
57
|
+
IDC_HELP = FFI::Pointer.new(32651)
|
|
58
|
+
|
|
59
|
+
attach_function :LoadCursor, :LoadCursorA, [:pointer, :pointer], :pointer
|
|
60
|
+
|
|
61
|
+
COLOR_SCROLLBAR = 0
|
|
62
|
+
COLOR_BACKGROUND = 1
|
|
63
|
+
COLOR_ACTIVECAPTION = 2
|
|
64
|
+
COLOR_INACTIVECAPTION = 3
|
|
65
|
+
COLOR_MENU = 4
|
|
66
|
+
COLOR_WINDOW = 5
|
|
67
|
+
COLOR_WINDOWFRAME = 6
|
|
68
|
+
COLOR_MENUTEXT = 7
|
|
69
|
+
COLOR_WINDOWTEXT = 8
|
|
70
|
+
COLOR_CAPTIONTEXT = 9
|
|
71
|
+
COLOR_ACTIVEBORDER = 10
|
|
72
|
+
COLOR_INACTIVEBORDER = 11
|
|
73
|
+
COLOR_APPWORKSPACE = 12
|
|
74
|
+
COLOR_HIGHLIGHT = 13
|
|
75
|
+
COLOR_HIGHLIGHTTEXT = 14
|
|
76
|
+
COLOR_BTNFACE = 15
|
|
77
|
+
COLOR_BTNSHADOW = 16
|
|
78
|
+
COLOR_GRAYTEXT = 17
|
|
79
|
+
COLOR_BTNTEXT = 18
|
|
80
|
+
COLOR_INACTIVECAPTIONTEXT = 19
|
|
81
|
+
COLOR_BTNHIGHLIGHT = 20
|
|
82
|
+
COLOR_3DDKSHADOW = 21
|
|
83
|
+
COLOR_3DLIGHT = 22
|
|
84
|
+
COLOR_INFOTEXT = 23
|
|
85
|
+
COLOR_INFOBK = 24
|
|
86
|
+
COLOR_HOTLIGHT = 26
|
|
87
|
+
COLOR_GRADIENTACTIVECAPTION = 27
|
|
88
|
+
COLOR_GRADIENTINACTIVECAPTION = 28
|
|
89
|
+
COLOR_MENUHILIGHT = 29
|
|
90
|
+
COLOR_MENUBAR = 30
|
|
91
|
+
COLOR_DESKTOP = COLOR_BACKGROUND
|
|
92
|
+
COLOR_3DFACE = COLOR_BTNFACE
|
|
93
|
+
COLOR_3DSHADOW = COLOR_BTNSHADOW
|
|
94
|
+
COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
|
|
95
|
+
COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT
|
|
96
|
+
COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT
|
|
97
|
+
|
|
98
|
+
CTLCOLOR_MSGBOX = 0
|
|
99
|
+
CTLCOLOR_EDIT = 1
|
|
100
|
+
CTLCOLOR_LISTBOX = 2
|
|
101
|
+
CTLCOLOR_BTN = 3
|
|
102
|
+
CTLCOLOR_DLG = 4
|
|
103
|
+
CTLCOLOR_SCROLLBAR = 5
|
|
104
|
+
CTLCOLOR_STATIC = 6
|
|
105
|
+
CTLCOLOR_MAX = 7
|
|
106
|
+
|
|
107
|
+
class WNDCLASSEX < FFI::Struct
|
|
108
|
+
layout \
|
|
109
|
+
:cbSize, :uint,
|
|
110
|
+
:style, :uint,
|
|
111
|
+
:lpfnWndProc, :WNDPROC,
|
|
112
|
+
:cbClsExtra, :int,
|
|
113
|
+
:cbWndExtra, :int,
|
|
114
|
+
:hInstance, :pointer,
|
|
115
|
+
:hIcon, :pointer,
|
|
116
|
+
:hCursor, :pointer,
|
|
117
|
+
:hbrBackground, :pointer,
|
|
118
|
+
:lpszMenuName, :pointer,
|
|
119
|
+
:lpszClassName, :pointer,
|
|
120
|
+
:hIconSm, :pointer
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
attach_function :RegisterClassEx, :RegisterClassExA, [:pointer], :ushort
|
|
124
|
+
|
|
125
|
+
GCL_MENUNAME = -8
|
|
126
|
+
GCL_HBRBACKGROUND = -10
|
|
127
|
+
GCL_HCURSOR = -12
|
|
128
|
+
GCL_HICON = -14
|
|
129
|
+
GCL_HMODULE = -16
|
|
130
|
+
GCL_CBWNDEXTRA = -18
|
|
131
|
+
GCL_CBCLSEXTRA = -20
|
|
132
|
+
GCL_WNDPROC = -24
|
|
133
|
+
GCL_STYLE = -26
|
|
134
|
+
GCL_HICONSM = -34
|
|
135
|
+
|
|
136
|
+
GCLP_MENUNAME = -8
|
|
137
|
+
GCLP_HBRBACKGROUND = -10
|
|
138
|
+
GCLP_HCURSOR = -12
|
|
139
|
+
GCLP_HICON = -14
|
|
140
|
+
GCLP_HMODULE = -16
|
|
141
|
+
GCLP_WNDPROC = -24
|
|
142
|
+
GCLP_HICONSM = -34
|
|
143
|
+
|
|
144
|
+
attach_function :GetClassLong, :GetClassLongA, [:pointer, :int], :ulong
|
|
145
|
+
attach_function :SetClassLong, :SetClassLongA, [:pointer, :int, :long], :ulong
|
|
146
|
+
|
|
147
|
+
HWND_BROADCAST = FFI::Pointer.new(0xffff)
|
|
148
|
+
HWND_MESSAGE = FFI::Pointer.new(-3)
|
|
149
|
+
HWND_DESKTOP = FFI::Pointer.new(0)
|
|
150
|
+
HWND_TOP = FFI::Pointer.new(0)
|
|
151
|
+
HWND_BOTTOM = FFI::Pointer.new(1)
|
|
152
|
+
HWND_TOPMOST = FFI::Pointer.new(-1)
|
|
153
|
+
HWND_NOTOPMOST = FFI::Pointer.new(-2)
|
|
154
|
+
|
|
155
|
+
WS_OVERLAPPED = 0x00000000
|
|
156
|
+
WS_POPUP = 0x80000000
|
|
157
|
+
WS_CHILD = 0x40000000
|
|
158
|
+
WS_MINIMIZE = 0x20000000
|
|
159
|
+
WS_VISIBLE = 0x10000000
|
|
160
|
+
WS_DISABLED = 0x08000000
|
|
161
|
+
WS_CLIPSIBLINGS = 0x04000000
|
|
162
|
+
WS_CLIPCHILDREN = 0x02000000
|
|
163
|
+
WS_MAXIMIZE = 0x01000000
|
|
164
|
+
WS_CAPTION = 0x00C00000
|
|
165
|
+
WS_BORDER = 0x00800000
|
|
166
|
+
WS_DLGFRAME = 0x00400000
|
|
167
|
+
WS_VSCROLL = 0x00200000
|
|
168
|
+
WS_HSCROLL = 0x00100000
|
|
169
|
+
WS_SYSMENU = 0x00080000
|
|
170
|
+
WS_THICKFRAME = 0x00040000
|
|
171
|
+
WS_GROUP = 0x00020000
|
|
172
|
+
WS_TABSTOP = 0x00010000
|
|
173
|
+
WS_MINIMIZEBOX = 0x00020000
|
|
174
|
+
WS_MAXIMIZEBOX = 0x00010000
|
|
175
|
+
WS_TILED = WS_OVERLAPPED
|
|
176
|
+
WS_ICONIC = WS_MINIMIZE
|
|
177
|
+
WS_SIZEBOX = WS_THICKFRAME
|
|
178
|
+
WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
|
|
179
|
+
WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW
|
|
180
|
+
WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU
|
|
181
|
+
WS_CHILDWINDOW = WS_CHILD
|
|
182
|
+
WS_ACTIVECAPTION = 0x0001
|
|
183
|
+
|
|
184
|
+
WS_EX_DLGMODALFRAME = 0x00000001
|
|
185
|
+
WS_EX_NOPARENTNOTIFY = 0x00000004
|
|
186
|
+
WS_EX_TOPMOST = 0x00000008
|
|
187
|
+
WS_EX_ACCEPTFILES = 0x00000010
|
|
188
|
+
WS_EX_TRANSPARENT = 0x00000020
|
|
189
|
+
WS_EX_MDICHILD = 0x00000040
|
|
190
|
+
WS_EX_TOOLWINDOW = 0x00000080
|
|
191
|
+
WS_EX_WINDOWEDGE = 0x00000100
|
|
192
|
+
WS_EX_CLIENTEDGE = 0x00000200
|
|
193
|
+
WS_EX_CONTEXTHELP = 0x00000400
|
|
194
|
+
WS_EX_RIGHT = 0x00001000
|
|
195
|
+
WS_EX_LEFT = 0x00000000
|
|
196
|
+
WS_EX_RTLREADING = 0x00002000
|
|
197
|
+
WS_EX_LTRREADING = 0x00000000
|
|
198
|
+
WS_EX_LEFTSCROLLBAR = 0x00004000
|
|
199
|
+
WS_EX_RIGHTSCROLLBAR = 0x00000000
|
|
200
|
+
WS_EX_CONTROLPARENT = 0x00010000
|
|
201
|
+
WS_EX_STATICEDGE = 0x00020000
|
|
202
|
+
WS_EX_APPWINDOW = 0x00040000
|
|
203
|
+
WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE
|
|
204
|
+
WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST
|
|
205
|
+
WS_EX_LAYERED = 0x00080000
|
|
206
|
+
WS_EX_NOINHERITLAYOUT = 0x00100000
|
|
207
|
+
WS_EX_LAYOUTRTL = 0x00400000
|
|
208
|
+
WS_EX_COMPOSITED = 0x02000000
|
|
209
|
+
WS_EX_NOACTIVATE = 0x08000000
|
|
210
|
+
|
|
211
|
+
CW_USEDEFAULT = -0x80000000
|
|
212
|
+
|
|
213
|
+
class CREATESTRUCT < FFI::Struct
|
|
214
|
+
layout \
|
|
215
|
+
:lpCreateParams, :pointer,
|
|
216
|
+
:hInstance, :pointer,
|
|
217
|
+
:hMenu, :pointer,
|
|
218
|
+
:hwndParent, :pointer,
|
|
219
|
+
:cy, :int,
|
|
220
|
+
:cx, :int,
|
|
221
|
+
:y, :int,
|
|
222
|
+
:x, :int,
|
|
223
|
+
:style, :long,
|
|
224
|
+
:lpszName, :pointer,
|
|
225
|
+
:lpszClass, :pointer,
|
|
226
|
+
:dwExStyle, :ulong
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
attach_function :CreateWindowEx, :CreateWindowExA, [:ulong, :string, :string, :ulong, :int, :int, :int, :int, :pointer, :pointer, :pointer, :pointer], :pointer
|
|
230
|
+
attach_function :DestroyWindow, [:pointer], :int
|
|
231
|
+
|
|
232
|
+
MDIS_ALLCHILDSTYLES = 0x0001
|
|
233
|
+
|
|
234
|
+
class MDICREATESTRUCT < FFI::Struct
|
|
235
|
+
layout \
|
|
236
|
+
:szClass, :pointer,
|
|
237
|
+
:szTitle, :pointer,
|
|
238
|
+
:hOwner, :pointer,
|
|
239
|
+
:x, :int,
|
|
240
|
+
:y, :int,
|
|
241
|
+
:cx, :int,
|
|
242
|
+
:cy, :int,
|
|
243
|
+
:style, :ulong,
|
|
244
|
+
:lParam, :long
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
class CLIENTCREATESTRUCT < FFI::Struct
|
|
248
|
+
layout \
|
|
249
|
+
:hWindowMenu, :pointer,
|
|
250
|
+
:idFirstChild, :uint
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
attach_function :CreateMDIWindow, :CreateMDIWindowA, [:string, :string, :ulong, :int, :int, :int, :int, :pointer, :pointer, :long], :pointer
|
|
254
|
+
|
|
255
|
+
DS_ABSALIGN = 0x01
|
|
256
|
+
DS_SYSMODAL = 0x02
|
|
257
|
+
DS_LOCALEDIT = 0x20
|
|
258
|
+
DS_SETFONT = 0x40
|
|
259
|
+
DS_MODALFRAME = 0x80
|
|
260
|
+
DS_NOIDLEMSG = 0x100
|
|
261
|
+
DS_SETFOREGROUND = 0x200
|
|
262
|
+
DS_3DLOOK = 0x0004
|
|
263
|
+
DS_FIXEDSYS = 0x0008
|
|
264
|
+
DS_NOFAILCREATE = 0x0010
|
|
265
|
+
DS_CONTROL = 0x0400
|
|
266
|
+
DS_CENTER = 0x0800
|
|
267
|
+
DS_CENTERMOUSE = 0x1000
|
|
268
|
+
DS_CONTEXTHELP = 0x2000
|
|
269
|
+
DS_SHELLFONT = DS_SETFONT | DS_FIXEDSYS
|
|
270
|
+
|
|
271
|
+
class DLGTEMPLATE < FFI::Struct
|
|
272
|
+
layout \
|
|
273
|
+
:style, :ulong,
|
|
274
|
+
:dwExtendedStyle, :ulong,
|
|
275
|
+
:cdit, :ushort,
|
|
276
|
+
:x, :short,
|
|
277
|
+
:y, :short,
|
|
278
|
+
:cx, :short,
|
|
279
|
+
:cy, :short,
|
|
280
|
+
:menu, :ushort,
|
|
281
|
+
:windowClass, :ushort,
|
|
282
|
+
:title, :ushort
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
attach_function :CreateDialogIndirectParam, :CreateDialogIndirectParamA, [:pointer, :pointer, :pointer, :DLGPROC, :long], :pointer
|
|
286
|
+
attach_function :DialogBoxIndirectParam, :DialogBoxIndirectParamA, [:pointer, :pointer, :pointer, :DLGPROC, :long], :int
|
|
287
|
+
attach_function :EndDialog, [:pointer, :int], :int
|
|
288
|
+
|
|
289
|
+
GWL_WNDPROC = -4
|
|
290
|
+
GWL_HINSTANCE = -6
|
|
291
|
+
GWL_HWNDPARENT = -8
|
|
292
|
+
GWL_STYLE = -16
|
|
293
|
+
GWL_EXSTYLE = -20
|
|
294
|
+
GWL_USERDATA = -21
|
|
295
|
+
GWL_ID = -12
|
|
296
|
+
|
|
297
|
+
GWLP_WNDPROC = -4
|
|
298
|
+
GWLP_HINSTANCE = -6
|
|
299
|
+
GWLP_HWNDPARENT = -8
|
|
300
|
+
GWLP_USERDATA = -21
|
|
301
|
+
GWLP_ID = -12
|
|
302
|
+
|
|
303
|
+
DWL_MSGRESULT = 0
|
|
304
|
+
DWL_DLGPROC = 4
|
|
305
|
+
DWL_USER = 8
|
|
306
|
+
|
|
307
|
+
attach_function :GetWindowLong, :GetWindowLongA, [:pointer, :int], :long
|
|
308
|
+
attach_function :SetWindowLong, :SetWindowLongA, [:pointer, :int, :long], :long
|
|
309
|
+
|
|
310
|
+
attach_function :IsWindowEnabled, [:pointer], :int
|
|
311
|
+
attach_function :EnableWindow, [:pointer, :int], :int
|
|
312
|
+
|
|
313
|
+
attach_function :IsWindowVisible, [:pointer], :int
|
|
314
|
+
|
|
315
|
+
SW_HIDE = 0
|
|
316
|
+
SW_SHOWNORMAL = 1
|
|
317
|
+
SW_NORMAL = 1
|
|
318
|
+
SW_SHOWMINIMIZED = 2
|
|
319
|
+
SW_SHOWMAXIMIZED = 3
|
|
320
|
+
SW_MAXIMIZE = 3
|
|
321
|
+
SW_SHOWNOACTIVATE = 4
|
|
322
|
+
SW_SHOW = 5
|
|
323
|
+
SW_MINIMIZE = 6
|
|
324
|
+
SW_SHOWMINNOACTIVE = 7
|
|
325
|
+
SW_SHOWNA = 8
|
|
326
|
+
SW_RESTORE = 9
|
|
327
|
+
SW_SHOWDEFAULT = 10
|
|
328
|
+
SW_FORCEMINIMIZE = 11
|
|
329
|
+
SW_MAX = 11
|
|
330
|
+
SW_PARENTCLOSING = 1
|
|
331
|
+
SW_OTHERZOOM = 2
|
|
332
|
+
SW_PARENTOPENING = 3
|
|
333
|
+
SW_OTHERUNZOOM = 4
|
|
334
|
+
SW_SCROLLCHILDREN = 0x0001
|
|
335
|
+
SW_INVALIDATE = 0x0002
|
|
336
|
+
SW_ERASE = 0x0004
|
|
337
|
+
SW_SMOOTHSCROLL = 0x0010
|
|
338
|
+
|
|
339
|
+
attach_function :ShowWindow, [:pointer, :int], :int
|
|
340
|
+
|
|
341
|
+
attach_function :UpdateWindow, [:pointer], :int
|
|
342
|
+
|
|
343
|
+
attach_function :GetFocus, [], :pointer
|
|
344
|
+
attach_function :SetFocus, [:pointer], :pointer
|
|
345
|
+
|
|
346
|
+
attach_function :GetWindowTextLength, :GetWindowTextLengthA, [:pointer], :int
|
|
347
|
+
attach_function :GetWindowText, :GetWindowTextA, [:pointer, :pointer, :int], :int
|
|
348
|
+
attach_function :SetWindowText, :SetWindowTextA, [:pointer, :string], :int
|
|
349
|
+
|
|
350
|
+
attach_function :GetClientRect, [:pointer, :pointer], :int
|
|
351
|
+
attach_function :GetWindowRect, [:pointer, :pointer], :int
|
|
352
|
+
|
|
353
|
+
SWP_NOSIZE = 0x0001
|
|
354
|
+
SWP_NOMOVE = 0x0002
|
|
355
|
+
SWP_NOZORDER = 0x0004
|
|
356
|
+
SWP_NOREDRAW = 0x0008
|
|
357
|
+
SWP_NOACTIVATE = 0x0010
|
|
358
|
+
SWP_FRAMECHANGED = 0x0020
|
|
359
|
+
SWP_SHOWWINDOW = 0x0040
|
|
360
|
+
SWP_HIDEWINDOW = 0x0080
|
|
361
|
+
SWP_NOCOPYBITS = 0x0100
|
|
362
|
+
SWP_NOOWNERZORDER = 0x0200
|
|
363
|
+
SWP_NOSENDCHANGING = 0x0400
|
|
364
|
+
SWP_DRAWFRAME = SWP_FRAMECHANGED
|
|
365
|
+
SWP_NOREPOSITION = SWP_NOOWNERZORDER
|
|
366
|
+
SWP_DEFERERASE = 0x2000
|
|
367
|
+
SWP_ASYNCWINDOWPOS = 0x4000
|
|
368
|
+
|
|
369
|
+
attach_function :SetWindowPos, [:pointer, :pointer, :int, :int, :int, :int, :uint], :int
|
|
370
|
+
|
|
371
|
+
attach_function :BeginDeferWindowPos, [:int], :pointer
|
|
372
|
+
attach_function :DeferWindowPos, [:pointer, :pointer, :pointer, :int, :int, :int, :int, :uint], :pointer
|
|
373
|
+
attach_function :EndDeferWindowPos, [:pointer], :int
|
|
374
|
+
|
|
375
|
+
MDITILE_VERTICAL = 0x0000
|
|
376
|
+
MDITILE_HORIZONTAL = 0x0001
|
|
377
|
+
MDITILE_SKIPDISABLED = 0x0002
|
|
378
|
+
MDITILE_ZORDER = 0x0004
|
|
379
|
+
|
|
380
|
+
attach_function :TileWindows, [:pointer, :uint, :pointer, :uint, :pointer], :ushort
|
|
381
|
+
|
|
382
|
+
attach_function :CascadeWindows, [:pointer, :uint, :pointer, :uint, :pointer], :ushort
|
|
383
|
+
attach_function :ArrangeIconicWindows, [:pointer], :uint
|
|
384
|
+
|
|
385
|
+
attach_function :GetCursorPos, [:pointer], :int
|
|
386
|
+
|
|
387
|
+
attach_function :ScreenToClient, [:pointer, :pointer], :int
|
|
388
|
+
attach_function :ClientToScreen, [:pointer, :pointer], :int
|
|
389
|
+
|
|
390
|
+
attach_function :GetCapture, [], :pointer
|
|
391
|
+
attach_function :SetCapture, [:pointer], :pointer
|
|
392
|
+
attach_function :ReleaseCapture, [], :int
|
|
393
|
+
|
|
394
|
+
attach_function :GetDC, [:pointer], :pointer
|
|
395
|
+
attach_function :ReleaseDC, [:pointer, :pointer], :int
|
|
396
|
+
|
|
397
|
+
class PAINTSTRUCT < FFI::Struct
|
|
398
|
+
layout \
|
|
399
|
+
:hdc, :pointer,
|
|
400
|
+
:fErase, :int,
|
|
401
|
+
:rcPaint, RECT,
|
|
402
|
+
:fRestore, :int,
|
|
403
|
+
:fIncUpdate, :int,
|
|
404
|
+
:rgbReserved, [:uchar, 32]
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
attach_function :BeginPaint, [:pointer, :pointer], :pointer
|
|
408
|
+
attach_function :EndPaint, [:pointer, :pointer], :int
|
|
409
|
+
|
|
410
|
+
attach_function :InvalidateRect, [:pointer, :pointer, :int], :int
|
|
411
|
+
|
|
412
|
+
attach_function :FillRect, [:pointer, :pointer, :pointer], :int
|
|
413
|
+
|
|
414
|
+
DT_TOP = 0x00000000
|
|
415
|
+
DT_LEFT = 0x00000000
|
|
416
|
+
DT_CENTER = 0x00000001
|
|
417
|
+
DT_RIGHT = 0x00000002
|
|
418
|
+
DT_VCENTER = 0x00000004
|
|
419
|
+
DT_BOTTOM = 0x00000008
|
|
420
|
+
DT_WORDBREAK = 0x00000010
|
|
421
|
+
DT_SINGLELINE = 0x00000020
|
|
422
|
+
DT_EXPANDTABS = 0x00000040
|
|
423
|
+
DT_TABSTOP = 0x00000080
|
|
424
|
+
DT_NOCLIP = 0x00000100
|
|
425
|
+
DT_EXTERNALLEADING = 0x00000200
|
|
426
|
+
DT_CALCRECT = 0x00000400
|
|
427
|
+
DT_NOPREFIX = 0x00000800
|
|
428
|
+
DT_INTERNAL = 0x00001000
|
|
429
|
+
DT_EDITCONTROL = 0x00002000
|
|
430
|
+
DT_PATH_ELLIPSIS = 0x00004000
|
|
431
|
+
DT_END_ELLIPSIS = 0x00008000
|
|
432
|
+
DT_MODIFYSTRING = 0x00010000
|
|
433
|
+
DT_RTLREADING = 0x00020000
|
|
434
|
+
DT_WORD_ELLIPSIS = 0x00040000
|
|
435
|
+
DT_NOFULLWIDTHCHARBREAK = 0x00080000
|
|
436
|
+
DT_HIDEPREFIX = 0x00100000
|
|
437
|
+
DT_PREFIXONLY = 0x00200000
|
|
438
|
+
|
|
439
|
+
attach_function :DrawText, :DrawTextA, [:pointer, :string, :int, :pointer, :uint], :int
|
|
440
|
+
|
|
441
|
+
attach_function :GetMenu, [:pointer], :pointer
|
|
442
|
+
attach_function :SetMenu, [:pointer, :pointer], :int
|
|
443
|
+
|
|
444
|
+
attach_function :DrawMenuBar, [:pointer], :int
|
|
445
|
+
|
|
446
|
+
attach_function :GetDlgItem, [:pointer, :int], :pointer
|
|
447
|
+
|
|
448
|
+
GW_HWNDFIRST = 0
|
|
449
|
+
GW_HWNDLAST = 1
|
|
450
|
+
GW_HWNDNEXT = 2
|
|
451
|
+
GW_HWNDPREV = 3
|
|
452
|
+
GW_OWNER = 4
|
|
453
|
+
GW_CHILD = 5
|
|
454
|
+
GW_ENABLEDPOPUP = 6
|
|
455
|
+
GW_MAX = 6
|
|
456
|
+
|
|
457
|
+
attach_function :GetWindow, [:pointer, :uint], :pointer
|
|
458
|
+
|
|
459
|
+
callback :WNDENUMPROC, [:pointer, :long], :int
|
|
460
|
+
|
|
461
|
+
attach_function :EnumChildWindows, [:pointer, :WNDENUMPROC, :long], :int
|
|
462
|
+
end
|
|
463
|
+
|
|
4
464
|
class WindowClass < Windows::WNDCLASSEX
|
|
5
465
|
def initialize(prototype, name, opts = {})
|
|
6
466
|
@prototype = prototype
|