367 lines
9.6 KiB
Forth
367 lines
9.6 KiB
Forth
\ Copyright 2022 Bradley D. Nelson
|
|
\
|
|
\ Licensed under the Apache License, Version 2.0 (the "License");
|
|
\ you may not use this file except in compliance with the License.
|
|
\ You may obtain a copy of the License at
|
|
\
|
|
\ http://www.apache.org/licenses/LICENSE-2.0
|
|
\
|
|
\ Unless required by applicable law or agreed to in writing, software
|
|
\ distributed under the License is distributed on an "AS IS" BASIS,
|
|
\ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
\ See the License for the specific language governing permissions and
|
|
\ limitations under the License.
|
|
|
|
windows definitions
|
|
|
|
0 constant WM_NULL
|
|
1 constant WM_CREATE
|
|
2 constant WM_DESTROY
|
|
3 constant WM_MOVE
|
|
5 constant WM_SIZE
|
|
6 constant WM_ACTIVATE
|
|
7 constant WM_SETFOCUS
|
|
8 constant WM_KILLFOCUS
|
|
10 constant WM_ENABLE
|
|
11 constant WM_SETREDRAW
|
|
12 constant WM_SETTEXT
|
|
13 constant WM_GETTEXT
|
|
14 constant WM_GETTEXTLENGTH
|
|
15 constant WM_PAINT
|
|
16 constant WM_CLOSE
|
|
17 constant WM_QUERYENDSESSION
|
|
18 constant WM_QUIT
|
|
19 constant WM_QUERYOPEN
|
|
20 constant WM_ERASEBKGND
|
|
21 constant WM_SYSCOLORCHANGE
|
|
22 constant WM_ENDSESSION
|
|
24 constant WM_SHOWWINDOW
|
|
25 constant WM_CTLCOLOR
|
|
26 constant WM_WININICHANGE
|
|
27 constant WM_DEVMODECHANGE
|
|
28 constant WM_ACTIVATEAPP
|
|
29 constant WM_FONTCHANGE
|
|
30 constant WM_TIMECHANGE
|
|
31 constant WM_CANCELMODE
|
|
32 constant WM_SETCURSOR
|
|
33 constant WM_MOUSEACTIVATE
|
|
34 constant WM_CHILDACTIVATE
|
|
35 constant WM_QUEUESYNC
|
|
36 constant WM_GETMINMAXINFO
|
|
38 constant WM_PAINTICON
|
|
39 constant WM_ICONERASEBKGND
|
|
40 constant WM_NEXTDLGCTL
|
|
42 constant WM_SPOOLERSTATUS
|
|
43 constant WM_DRAWITEM
|
|
44 constant WM_MEASUREITEM
|
|
45 constant WM_DELETEITEM
|
|
46 constant WM_VKEYTOITEM
|
|
47 constant WM_CHARTOITEM
|
|
48 constant WM_SETFONT
|
|
49 constant WM_GETFONT
|
|
50 constant WM_SETHOTKEY
|
|
51 constant WM_GETHOTKEY
|
|
55 constant WM_QUERYDRAGICON
|
|
57 constant WM_COMPAREITEM
|
|
61 constant WM_GETOBJECT
|
|
65 constant WM_COMPACTING
|
|
68 constant WM_COMMNOTIFY
|
|
70 constant WM_WINDOWPOSCHANGING
|
|
71 constant WM_WINDOWPOSCHANGED
|
|
72 constant WM_POWER
|
|
73 constant WM_COPYGLOBALDATA
|
|
74 constant WM_COPYDATA
|
|
75 constant WM_CANCELJOURNAL
|
|
78 constant WM_NOTIFY
|
|
80 constant WM_INPUTLANGCHANGEREQUEST
|
|
81 constant WM_INPUTLANGCHANGE
|
|
82 constant WM_TCARD
|
|
83 constant WM_HELP
|
|
84 constant WM_USERCHANGED
|
|
85 constant WM_NOTIFYFORMAT
|
|
123 constant WM_CONTEXTMENU
|
|
124 constant WM_STYLECHANGING
|
|
125 constant WM_STYLECHANGED
|
|
126 constant WM_DISPLAYCHANGE
|
|
127 constant WM_GETICON
|
|
128 constant WM_SETICON
|
|
129 constant WM_NCCREATE
|
|
130 constant WM_NCDESTROY
|
|
131 constant WM_NCCALCSIZE
|
|
132 constant WM_NCHITTEST
|
|
133 constant WM_NCPAINT
|
|
134 constant WM_NCACTIVATE
|
|
135 constant WM_GETDLGCODE
|
|
136 constant WM_SYNCPAINT
|
|
160 constant WM_NCMOUSEMOVE
|
|
161 constant WM_NCLBUTTONDOWN
|
|
162 constant WM_NCLBUTTONUP
|
|
163 constant WM_NCLBUTTONDBLCLK
|
|
164 constant WM_NCRBUTTONDOWN
|
|
165 constant WM_NCRBUTTONUP
|
|
166 constant WM_NCRBUTTONDBLCLK
|
|
167 constant WM_NCMBUTTONDOWN
|
|
168 constant WM_NCMBUTTONUP
|
|
169 constant WM_NCMBUTTONDBLCLK
|
|
171 constant WM_NCXBUTTONDOWN
|
|
172 constant WM_NCXBUTTONUP
|
|
173 constant WM_NCXBUTTONDBLCLK
|
|
|
|
176 constant EM_GETSEL
|
|
177 constant EM_SETSEL
|
|
178 constant EM_GETRECT
|
|
179 constant EM_SETRECT
|
|
180 constant EM_SETRECTNP
|
|
181 constant EM_SCROLL
|
|
182 constant EM_LINESCROLL
|
|
183 constant EM_SCROLLCARET
|
|
185 constant EM_GETMODIFY
|
|
187 constant EM_SETMODIFY
|
|
188 constant EM_GETLINECOUNT
|
|
189 constant EM_LINEINDEX
|
|
190 constant EM_SETHANDLE
|
|
191 constant EM_GETHANDLE
|
|
192 constant EM_GETTHUMB
|
|
193 constant EM_LINELENGTH
|
|
194 constant EM_REPLACESEL
|
|
195 constant EM_SETFONT
|
|
196 constant EM_GETLINE
|
|
197 constant EM_LIMITTEXT
|
|
197 constant EM_SETLIMITTEXT
|
|
198 constant EM_CANUNDO
|
|
199 constant EM_UNDO
|
|
200 constant EM_FMTLINES
|
|
201 constant EM_LINEFROMCHAR
|
|
202 constant EM_SETWORDBREAK
|
|
203 constant EM_SETTABSTOPS
|
|
204 constant EM_SETPASSWORDCHAR
|
|
205 constant EM_EMPTYUNDOBUFFER
|
|
206 constant EM_GETFIRSTVISIBLELINE
|
|
207 constant EM_SETREADONLY
|
|
209 constant EM_SETWORDBREAKPROC
|
|
209 constant EM_GETWORDBREAKPROC
|
|
210 constant EM_GETPASSWORDCHAR
|
|
211 constant EM_SETMARGINS
|
|
212 constant EM_GETMARGINS
|
|
213 constant EM_GETLIMITTEXT
|
|
214 constant EM_POSFROMCHAR
|
|
215 constant EM_CHARFROMPOS
|
|
216 constant EM_SETIMESTATUS
|
|
217 constant EM_GETIMESTATUS
|
|
|
|
224 constant SBM_SETPOS
|
|
225 constant SBM_GETPOS
|
|
226 constant SBM_SETRANGE
|
|
227 constant SBM_GETRANGE
|
|
228 constant SBM_ENABLE_ARROWS
|
|
230 constant SBM_SETRANGEREDRAW
|
|
233 constant SBM_SETSCROLLINFO
|
|
234 constant SBM_GETSCROLLINFO
|
|
235 constant SBM_GETSCROLLBARINFO
|
|
|
|
240 constant BM_GETCHECK
|
|
241 constant BM_SETCHECK
|
|
242 constant BM_GETSTATE
|
|
243 constant BM_SETSTATE
|
|
244 constant BM_SETSTYLE
|
|
245 constant BM_CLICK
|
|
246 constant BM_GETIMAGE
|
|
247 constant BM_SETIMAGE
|
|
248 constant BM_SETDONTCLICK
|
|
|
|
255 constant WM_INPUT
|
|
|
|
256 constant WM_KEYFIRST ( for ranges )
|
|
256 constant WM_KEYDOWN
|
|
257 constant WM_KEYUP
|
|
258 constant WM_CHAR
|
|
259 constant WM_DEADCHAR
|
|
260 constant WM_SYSKEYDOWN
|
|
261 constant WM_SYSKEYUP
|
|
262 constant WM_SYSCHAR
|
|
263 constant WM_SYSDEADCHAR
|
|
265 constant WM_UNICHAR
|
|
265 constant WM_KEYLAST ( for ranges )
|
|
|
|
266 constant WM_CONVERTREQUEST
|
|
267 constant WM_CONVERTRESULT
|
|
268 constant WM_INTERIM
|
|
269 constant WM_IME_STARTCOMPOSITION
|
|
270 constant WM_IME_ENDCOMPOSITION
|
|
271 constant WM_IME_COMPOSITION
|
|
271 constant WM_IME_KEYLAST ( for ranges )
|
|
|
|
272 constant WM_INITDIALOG
|
|
273 constant WM_COMMAND
|
|
274 constant WM_SYSCOMMAND
|
|
275 constant WM_TIMER
|
|
276 constant WM_HSCROLL
|
|
277 constant WM_VSCROLL
|
|
278 constant WM_INITMENU
|
|
279 constant WM_INITMENUPOPUP
|
|
280 constant WM_SYSTIMER
|
|
287 constant WM_MENUSELECT
|
|
288 constant WM_MENUCHAR
|
|
289 constant WM_ENTERIDLE
|
|
290 constant WM_MENURBUTTONUP
|
|
291 constant WM_MENUDRAG
|
|
292 constant WM_MENUGETOBJECT
|
|
293 constant WM_UNINITMENUPOPUP
|
|
294 constant WM_MENUCOMMAND
|
|
295 constant WM_CHANGEUISTATE
|
|
296 constant WM_UPDATEUISTATE
|
|
297 constant WM_QUERYUISTATE
|
|
305 constant WM_LBTRACKPOINT
|
|
306 constant WM_CTLCOLORMSGBOX
|
|
307 constant WM_CTLCOLOREDIT
|
|
308 constant WM_CTLCOLORLISTBOX
|
|
309 constant WM_CTLCOLORBTN
|
|
310 constant WM_CTLCOLORDLG
|
|
311 constant WM_CTLCOLORSCROLLBAR
|
|
312 constant WM_CTLCOLORSTATIC
|
|
|
|
320 constant CB_GETEDITSEL
|
|
321 constant CB_LIMITTEXT
|
|
322 constant CB_SETEDITSEL
|
|
323 constant CB_ADDSTRING
|
|
324 constant CB_DELETESTRING
|
|
325 constant CB_DIR
|
|
326 constant CB_GETCOUNT
|
|
327 constant CB_GETCURSEL
|
|
328 constant CB_GETLBTEXT
|
|
329 constant CB_GETLBTEXTLEN
|
|
330 constant CB_INSERTSTRING
|
|
331 constant CB_RESETCONTENT
|
|
332 constant CB_FINDSTRING
|
|
333 constant CB_SELECTSTRING
|
|
334 constant CB_SETCURSEL
|
|
335 constant CB_SHOWDROPDOWN
|
|
336 constant CB_GETITEMDATA
|
|
337 constant CB_SETITEMDATA
|
|
338 constant CB_GETDROPPEDCONTROLRECT
|
|
339 constant CB_SETITEMHEIGHT
|
|
340 constant CB_GETITEMHEIGHT
|
|
341 constant CB_SETEXTENDEDUI
|
|
342 constant CB_GETEXTENDEDUI
|
|
343 constant CB_GETDROPPEDSTATE
|
|
344 constant CB_FINDSTRINGEXACT
|
|
345 constant CB_SETLOCALE
|
|
346 constant CB_GETLOCALE
|
|
347 constant CB_GETTOPINDEX
|
|
348 constant CB_SETTOPINDEX
|
|
349 constant CB_GETHORIZONTALEXTENT
|
|
350 constant CB_SETHORIZONTALEXTENT
|
|
351 constant CB_GETDROPPEDWIDTH
|
|
352 constant CB_SETDROPPEDWIDTH
|
|
353 constant CB_INITSTORAGE
|
|
355 constant CB_MULTIPLEADDSTRING
|
|
356 constant CB_GETCOMBOBOXINFO
|
|
357 constant CB_MSGMAX
|
|
|
|
512 constant WM_MOUSEFIRST ( for ranges )
|
|
512 constant WM_MOUSEMOVE
|
|
513 constant WM_LBUTTONDOWN
|
|
514 constant WM_LBUTTONUP
|
|
515 constant WM_LBUTTONDBLCLK
|
|
516 constant WM_RBUTTONDOWN
|
|
517 constant WM_RBUTTONUP
|
|
518 constant WM_RBUTTONDBLCLK
|
|
519 constant WM_MBUTTONDOWN
|
|
520 constant WM_MBUTTONUP
|
|
521 constant WM_MBUTTONDBLCLK
|
|
521 constant WM_MOUSELAST ( for ranges )
|
|
|
|
522 constant WM_MOUSEWHEEL
|
|
523 constant WM_XBUTTONDOWN
|
|
524 constant WM_XBUTTONUP
|
|
525 constant WM_XBUTTONDBLCLK
|
|
526 constant WM_MOUSEHWHEEL
|
|
528 constant WM_PARENTNOTIFY
|
|
529 constant WM_ENTERMENULOOP
|
|
530 constant WM_EXITMENULOOP
|
|
531 constant WM_NEXTMENU
|
|
532 constant WM_SIZING
|
|
533 constant WM_CAPTURECHANGED
|
|
534 constant WM_MOVING
|
|
536 constant WM_POWERBROADCAST
|
|
537 constant WM_DEVICECHANGE
|
|
544 constant WM_MDICREATE
|
|
545 constant WM_MDIDESTROY
|
|
546 constant WM_MDIACTIVATE
|
|
547 constant WM_MDIRESTORE
|
|
548 constant WM_MDINEXT
|
|
549 constant WM_MDIMAXIMIZE
|
|
550 constant WM_MDITILE
|
|
551 constant WM_MDICASCADE
|
|
552 constant WM_MDIICONARRANGE
|
|
553 constant WM_MDIGETACTIVE
|
|
560 constant WM_MDISETMENU
|
|
561 constant WM_ENTERSIZEMOVE
|
|
562 constant WM_EXITSIZEMOVE
|
|
563 constant WM_DROPFILES
|
|
564 constant WM_MDIREFRESHMENU
|
|
640 constant WM_IME_REPORT
|
|
641 constant WM_IME_SETCONTEXT
|
|
642 constant WM_IME_NOTIFY
|
|
643 constant WM_IME_CONTROL
|
|
644 constant WM_IME_COMPOSITIONFULL
|
|
645 constant WM_IME_SELECT
|
|
646 constant WM_IME_CHAR
|
|
648 constant WM_IME_REQUEST
|
|
656 constant WM_IMEKEYDOWN
|
|
656 constant WM_IME_KEYDOWN
|
|
657 constant WM_IMEKEYUP
|
|
657 constant WM_IME_KEYUP
|
|
672 constant WM_NCMOUSEHOVER
|
|
673 constant WM_MOUSEHOVER
|
|
674 constant WM_NCMOUSELEAVE
|
|
675 constant WM_MOUSELEAVE
|
|
768 constant WM_CUT
|
|
769 constant WM_COPY
|
|
770 constant WM_PASTE
|
|
771 constant WM_CLEAR
|
|
772 constant WM_UNDO
|
|
773 constant WM_RENDERFORMAT
|
|
774 constant WM_RENDERALLFORMATS
|
|
775 constant WM_DESTROYCLIPBOARD
|
|
776 constant WM_DRAWCLIPBOARD
|
|
777 constant WM_PAINTCLIPBOARD
|
|
778 constant WM_VSCROLLCLIPBOARD
|
|
779 constant WM_SIZECLIPBOARD
|
|
780 constant WM_ASKCBFORMATNAME
|
|
781 constant WM_CHANGECBCHAIN
|
|
782 constant WM_HSCROLLCLIPBOARD
|
|
783 constant WM_QUERYNEWPALETTE
|
|
784 constant WM_PALETTEISCHANGING
|
|
785 constant WM_PALETTECHANGED
|
|
786 constant WM_HOTKEY
|
|
791 constant WM_PRINT
|
|
792 constant WM_PRINTCLIENT
|
|
793 constant WM_APPCOMMAND
|
|
856 constant WM_HANDHELDFIRST
|
|
863 constant WM_HANDHELDLAST
|
|
864 constant WM_AFXFIRST
|
|
895 constant WM_AFXLAST
|
|
|
|
896 constant WM_PENWINFIRST
|
|
897 constant WM_RCRESULT
|
|
898 constant WM_HOOKRCRESULT
|
|
899 constant WM_GLOBALRCCHANGE
|
|
899 constant WM_PENMISCINFO
|
|
900 constant WM_SKB
|
|
901 constant WM_HEDITCTL
|
|
901 constant WM_PENCTL
|
|
902 constant WM_PENMISC
|
|
903 constant WM_CTLINIT
|
|
904 constant WM_PENEVENT
|
|
911 constant WM_PENWINLAST
|
|
|
|
: WM_>name ( msg -- a n )
|
|
['] WM_PENWINLAST begin dup ['] WM_NULL <> while
|
|
2dup >body @ = if nip >name exit then
|
|
>link
|
|
repeat
|
|
nip >name ;
|
|
|
|
forth definitions
|