vruby 2004.08.07

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.
@@ -0,0 +1,159 @@
1
+ ###################################
2
+ #
3
+ # winconst.rb
4
+ # Programmed by nyasu <nyasu@osk.3web.ne.jp>
5
+ # Copyright 1999-2001 Nishikawa,Yasuhiro
6
+ #
7
+ # More information at http://www.threeweb.ad.jp/~nyasu/software/vrproject.html
8
+ # (in Japanese)
9
+ #
10
+ ###################################
11
+
12
+
13
+ #######################################
14
+ # Win Constants and utils
15
+ #
16
+ module WMsg
17
+ WM_NULL = 0x0000
18
+ WM_CREATE = 0x0001
19
+ WM_DESTROY = 0x0002
20
+ WM_MOVE = 0x0003
21
+ WM_SIZE = 0x0005
22
+ WM_ACTIVATE = 0x0006
23
+ WM_SETFOCUS = 0x0007
24
+ WM_KILLFOCUS = 0x0008
25
+ WM_ENABLE = 0x000A
26
+ WM_SETREDRAW = 0x000B
27
+ WM_SETTEXT = 0x000C
28
+ WM_GETTEXT = 0x000D
29
+ WM_GETTEXTLENGTH = 0x000E
30
+ WM_PAINT = 0x000F
31
+ WM_CLOSE = 0x0010
32
+ WM_QUERYENDSESSION= 0x0011
33
+ WM_QUIT = 0x0012
34
+ WM_QUERYOPEN = 0x0013
35
+ WM_ERASEBKGND = 0x0014
36
+ WM_SYSCOLORCHANGE = 0x0015
37
+ WM_ENDSESSION = 0x0016
38
+ WM_SHOWWINDOW = 0x0018
39
+ WM_WININICHANGE = 0x001A
40
+ WM_SETTINGCHANGE = WM_WININICHANGE
41
+ WM_DEVMODECHANGE = 0x001B
42
+ WM_ACTIVATEAPP = 0x001C
43
+ WM_FONTCHANGE = 0x001D
44
+ WM_TIMECHANGE = 0x001E
45
+ WM_CANCELMODE = 0x001F
46
+ WM_SETCURSOR = 0x0020
47
+ WM_MOUSEACTIVATE = 0x0021
48
+ WM_CHILDACTIVATE = 0x0022
49
+ WM_QUEUESYNC = 0x0023
50
+ WM_GETMINMAXINFO = 0x0024
51
+ WM_NOTIFY = 0x004E
52
+ WM_KEYDOWN = 0x0100
53
+ WM_KEYUP = 0x0101
54
+ WM_CHAR = 0x0102
55
+ WM_COMMAND = 0x0111
56
+ #
57
+ WM_MOUSEFIRST = 0x0200
58
+ WM_MOUSEMOVE = 0x0200
59
+ WM_LBUTTONDOWN = 0x0201
60
+ WM_LBUTTONUP = 0x0202
61
+ WM_LBUTTONDBLCLK = 0x0203
62
+ WM_RBUTTONDOWN = 0x0204
63
+ WM_RBUTTONUP = 0x0205
64
+ WM_RBUTTONDBLCLK = 0x0206
65
+ WM_MBUTTONDOWN = 0x0207
66
+ WM_MBUTTONUP = 0x0208
67
+ WM_MBUTTONDBLCLK = 0x0209
68
+ WM_MOUSEWHEEL = 0x020A
69
+ WM_MOUSELAST = 0x020A
70
+ WM_DROPFILES = 0x0233
71
+ #
72
+ WM_CUT = 0x0300
73
+ WM_COPY = 0x0301
74
+ WM_PASTE = 0x0302
75
+ WM_CLEAR = 0x0303
76
+ WM_UNDO = 0x0304
77
+
78
+ WM_HOTKEY = 0x0312
79
+ WM_USER = 0x0400
80
+ WM_APP = 0x8000
81
+ end
82
+
83
+ module WStyle
84
+ WS_OVERLAPPED = 0
85
+ WS_TABSTOP = 0x00010000
86
+ WS_GROUP = 0x00020000
87
+ WS_THICKFRAME = 0x00040000
88
+ WS_SYSMENU = 0x00080000
89
+ WS_HSCROLL = 0x00100000
90
+ WS_VSCROLL = 0x00200000
91
+ WS_DLGFRAME = 0x00400000
92
+ WS_BORDER = 0x00800000
93
+ WS_CAPTION = 0x00c00000
94
+ WS_MAXIMIZE = 0x01000000
95
+ WS_CLIPCHILDREN = 0x02000000
96
+ WS_CLIPSIBLINGS = 0x04000000
97
+ WS_DISABLED = 0x08000000
98
+ WS_VISIBLE = 0x10000000
99
+ WS_MINIMIZE = 0x20000000
100
+ WS_CHILD = 0x40000000
101
+ WS_POPUP = 0x80000000
102
+ WS_VISIBLECHILD = 0x50000000 # for util
103
+
104
+ #followings are contributed by Yuya-san.
105
+ WS_ICONIC = 0x20000000
106
+ WS_CHILDWINDOW = 0x40000000
107
+ WS_MAXIMIZEBOX = 0x10000
108
+ WS_MINIMIZEBOX = 0x20000
109
+ WS_OVERLAPPEDWINDOW = 0xCF0000
110
+ WS_POPUPWINDOW = 0x80880000
111
+ WS_SIZEBOX = 0x40000
112
+ WS_TILED = 0
113
+ WS_TILEDWINDOW = 0xCF0000
114
+ end
115
+
116
+ module WExStyle
117
+ WS_EX_TOPMOST = 0x00000008
118
+ WS_EX_TRANSPARENT = 0x00000020
119
+ WS_EX_MDICHILD = 0x00000040
120
+ WS_EX_TOOLWINDOW = 0x00000080
121
+ WS_EX_CLIENTEDGE = 0x00000200
122
+ WS_EX_APPWINDOW = 0x00040000
123
+ end
124
+
125
+ =begin
126
+ == Global Functions
127
+ These are utility functions instead of macros.
128
+ === Functions
129
+ --- LOWORD(lParam)
130
+ Returns low-word of lParam
131
+ --- HIWORD(lParam)
132
+ Returns hi-word of lParam
133
+ --- MAKELPARAM(w1,w2)
134
+ Returns the DWORD from 2 words of w1,w2.
135
+ --- SIGNEDWORD(word)
136
+ changes unsigned WORD into signed WORD.
137
+ --- RGB(r,g,b)
138
+ returns color code from r,g,b.
139
+ =end
140
+
141
+ def LOWORD(lParam)
142
+ return (lParam & 0xffff)
143
+ end
144
+ def HIWORD(lParam)
145
+ return ( (lParam>>16) & 0xffff)
146
+ end
147
+ def MAKELPARAM(w1,w2)
148
+ return (w2<<16) | w1
149
+ end
150
+
151
+ def SIGNEDWORD(word)
152
+ if word>0x8000 then word-0x10000 else word end
153
+ end
154
+
155
+
156
+ def RGB(r,g,b)
157
+ return r+(g<<8)+(b<<16)
158
+ end
159
+
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.1
3
+ specification_version: 1
4
+ name: vruby
5
+ version: !ruby/object:Gem::Version
6
+ version: 2004.08.07
7
+ date: 2004-09-19
8
+ summary: VRuby is a set of vr* series of ruby scripts which wrap swin.
9
+ require_paths:
10
+ - lib
11
+ author: Yasuhiro Nishikawa
12
+ email: nyasu@osk.3web.ne.jp
13
+ homepage: http://www.osk.3web.ne.jp/~nyasu/vruby/vrproject-e.html
14
+ rubyforge_project:
15
+ description: "\"VisualuRuby\" is a GUI library on MS Windows for Ruby. The project has two part, one is \"swin\" which is about ruby extension library, the other is \"vruby\" : a set of vr* series of ruby scripts which wrap swin. The event handling style is like that of VisualBasic."
16
+ autorequire: vr/vruby
17
+ default_executable:
18
+ bindir: bin
19
+ has_rdoc: false
20
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
21
+ requirements:
22
+ -
23
+ - ">"
24
+ - !ruby/object:Gem::Version
25
+ version: 0.0.0
26
+ version:
27
+ platform: ruby
28
+ files:
29
+ - lib/vr
30
+ - lib/vr/clipboard.rb
31
+ - lib/vr/compat
32
+ - lib/vr/contrib
33
+ - lib/vr/dragdropformat.rb
34
+ - lib/vr/handlers.rd
35
+ - lib/vr/rscutil.rb
36
+ - lib/vr/sysmod.rb
37
+ - lib/vr/vractivex.rb
38
+ - lib/vr/vrclipboard.rb
39
+ - lib/vr/vrcomctl.rb
40
+ - lib/vr/vrcontrol.rb
41
+ - lib/vr/vrdde.rb
42
+ - lib/vr/vrddrop.rb
43
+ - lib/vr/vrdialog.rb
44
+ - lib/vr/vrhandler.rb
45
+ - lib/vr/vrlayout.old.rb
46
+ - lib/vr/vrlayout.rb
47
+ - lib/vr/vrlayout2.rb
48
+ - lib/vr/vrmmedia.rb
49
+ - lib/vr/vrolednd.rb
50
+ - lib/vr/vrowndraw.rb
51
+ - lib/vr/vrrichedit.rb
52
+ - lib/vr/vrtimer.rb
53
+ - lib/vr/vrtooltip.rb
54
+ - lib/vr/vrtray.rb
55
+ - lib/vr/vrtvitem.rb
56
+ - lib/vr/vrtwopane.rb
57
+ - lib/vr/vruby.rb
58
+ - lib/vr/winconst.rb
59
+ - lib/vr/compat/rubycompat.rb
60
+ - lib/vr/compat/vrcomctl.rb
61
+ - lib/vr/compat/vrcontrol.rb
62
+ - lib/vr/compat/vrmmedia.rb
63
+ - lib/vr/contrib/inifile.rb
64
+ - lib/vr/contrib/msgboxconst.rb
65
+ - lib/vr/contrib/toolbar.rb
66
+ - lib/vr/contrib/vrctlcolor.rb
67
+ - lib/vr/contrib/vrhotkey.rb
68
+ - lib/vr/contrib/vrlistviewex.rb
69
+ - lib/vr/contrib/vrwincomponent.rb
70
+ test_files: []
71
+ rdoc_options: []
72
+ extra_rdoc_files: []
73
+ executables: []
74
+ extensions: []
75
+ requirements: []
76
+ dependencies:
77
+ - !ruby/object:Gem::Dependency
78
+ name: swin
79
+ version_requirement:
80
+ version_requirements: !ruby/object:Gem::Version::Requirement
81
+ requirements:
82
+ -
83
+ - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: 2004.03.14
86
+ version: