-
Notifications
You must be signed in to change notification settings - Fork 2
/
pilrc.h
2771 lines (2485 loc) · 83 KB
/
pilrc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* @(#)pilrc.h
*
* Copyright 1997-1999, Wes Cherry (mailto:wesc@technosis.com)
* 2000-2005, Aaron Ardiri (mailto:aaron@ardiri.com)
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, please write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Revisions:
* ==========
*
* pre 18-Jun-2000 <numerous developers>
* creation
* 18-Jun-2000 Aaron Ardiri
* GNU GPL documentation additions
* 23-Jun-2000 Mark Garlanger
* Additions to support #ifdef/#ifndef/#else/#endif in
* both .rcp files and .h files.
* 20-Nov-2000 Renaud Malaval
* additions PalmOS 3.5 support
* additions to support LE32 resouces
* 03-Jun-2002 Renaud Malaval
* additions of SEARCH flag in list
* 22-Aug-2002 Ben Combee
* Added dependency tracking and better AUTOID support
*/
#ifndef _pilrc_h
#define _pilrc_h // RMA : multiples include protection
#if (SIZEOF_INT == SIZEOF_CHAR_P)
typedef int p_int;
#elif (SIZEOF_LONG == SIZEOF_CHAR_P)
typedef long p_int;
#endif
#ifndef strdup
char *strdup(const char *s);
#endif
#include "std.h"
#include "util.h"
#include "lex.h"
#include "plex.h"
#include "font.h"
/*-----------------------------------------------------------------------------
| PILOT STRUCTS
|
|
| a note on the strings following some of the following structures:
|
| the strings define how to dump the structure out in the same format as the
| pilot structs. This way you do not have to include pilot include files
| which are definitely not compiler/processor independent.
|
| note: we make the assumption that sizeof(p_int) == sizeof(void *) -- the emitter
| moves through the structs as if they were an array of ints and emits the struct
| according to the template
|
| template syntax:
|
| base types:
| b : byte (8 bits)
| w : word (16 bits)
| l : long (32 bits)
| t : bit (1 bit of 8 bits)
| u : bits (1 bits of 16 bits) // RMa additions
| p : pointer (32 bits)
|
| prefixes: (optional)
| z : zero -- there is no corresponding field in our structs -- emit the
| base type filled w/ 0
|
| suffixes: (optional)
| # : (decimal numeric) -- number of times to repeat the previous type.
| For bits (t) this specifies the number of bits to shift in.
| Note that the bits must not cross byte boundaries in any one field emission.
-------------------------------------------------------------WESC------------*/
#define leftAlign 0
#define centerAlign 1
#define rightAlign 2
#define noButtonFrame 0
#define standardButtonFrame 1
#define boldButtonFrame 2
#define rectangleButtonFrame 3
#define Enum(type) typedef enum type
#define EndEnum
Enum(ControlStyles)
{
buttonCtl, pushButtonCtl, checkboxCtl, popupTriggerCtl, selectorTriggerCtl, repeatingButtonCtl, sliderCtl, feedbackSliderCtl /* RMa add support sliders */
}
EndEnum ControlStyles;
Enum(AlertType)
{
informationAlert, confirmationAlert, warningAlert, errorAlert}
EndEnum AlertType;
Enum(FormObjectKind)
{
frmFieldObj, frmControlObj, frmListObj, frmTableObj, frmBitmapObj, frmLineObj, frmFrameObj, frmRectangleObj, frmLabelObj, frmTitleObj, frmPopupObj, frmGraffitiStateObj, frmGadgetObj, frmScrollBarObj, frmSliderObj, /* RMa add support sliders */
frmGraphicalControlObj /* RMa add support graphical control */
}
EndEnum FormObjectKind;
Enum(FontID)
{
stdFont, boldFont, largeFont, symbolFont, symbol11Font, symbol7Font, ledFont}
EndEnum FontID;
typedef struct RCPOINT
{
p_int x;
p_int y;
}
RCPOINT;
typedef struct RCRECT
{
RCPOINT topLeft;
RCPOINT extent;
}
RCRECT;
/************************************************\
* RMa update all structure to be compleant with
* PalmOS 3.5
* LE32 ( 16 and 32 bits memory alignment)
\************************************************/
/*
* window.h
*/
typedef struct RCFRAMEBITS
{
p_int cornerDiam; /* u8 */
/*
* p_int reserved; zu3
*/
p_int threeD; /* u */
p_int shadowWidth; /* u2 */
p_int width; /* u2 */
}
RCFRAMEBITS; /* u8zu3uu2u2 */
typedef struct RCWINDOWFLAGS
{
/*
* Word format:1; zu
*/
/*
* Word offscreen:1; zu
*/
p_int modal; /* u */
p_int focusable; /* u */
/*
* Word enabled:1; zu
*/
/*
* Word visible:1; zu
*/
p_int dialog; /* u */
/*
* Word freeBitmap:1 zu
*/
/*
* Word reserved :8; zu8
*/
}
RCWINDOWFLAGS; /* zuzuuu zuzuuzu zu8 */
typedef struct RCWindowBA16Type
{
p_int displayWidth; /* w */
p_int displayHeight; /* w */
/*
* p_int displayAddr; zl
*/
RCWINDOWFLAGS windowFlags; /* zuzuuu zuzuuzu zu8 */
RCRECT windowBounds; /* w4 */
/*
* RCRECT clippingBounds; zw4
*/
/*
* BitmapPtr bitmapP; zl
*/
RCFRAMEBITS frameType; /* u8zu3uu2u2 */
/*
* GraphicStatePtr drawStateP; zl
*/
/*
* struct RCWindowBA16Type *nextWindow; zl
*/
}
RCWindowBA16Type;
#define szRCWindowBA16 "w,w,zl,zuzuuuzuzuuzuzu8,w4,zw4,zl,u8zu3uu2u2,zl,zl"
typedef struct RCWindowBA32Type
{
p_int displayWidth; /* w */
p_int displayHeight; /* w */
/*
* p_int displayAddr; zl
*/
RCRECT windowBounds; /* w4 */
/*
* RCRECT clippingBounds; zw4
*/
/*
* BitmapPtr bitmapP; zl
*/
RCWINDOWFLAGS windowFlags; /* zuzuuu zuzuuzu zu8 */
RCFRAMEBITS frameType; /* u8zu3uu2u2 */
/*
* GraphicStatePtr drawStateP; zl
*/
/*
* struct RCWindow32Type *nextWindow; zl
*/
}
RCWindowBA32Type;
#define szRCWindowBA32 "w,w,zl,w4,zw4,zl,zuzuuuzuzuuzuzu8,u8zu3uu2u2,zl,zl"
/*
* ------------------ List ------------------
*/
typedef struct RCLISTATTR
{
p_int usable; /* u */
p_int enabled; /* u */
p_int visible; /* u */
p_int poppedUp; /* u */
p_int hasScrollBar; /* u */
p_int search; /* u */
/*
* p_int reserved; zu10
*/
}
RCLISTATTR; /* uuuuuuzu10 */
typedef struct RCListBA16Type
{
p_int id; /* w */
RCRECT bounds; /* w4 */
RCLISTATTR attr; /* uuuuuuzu10 */
char *itemsText; /* p */
p_int numItems; /* w */
/*
* Word currentItem; zw
*/
/*
* Word topItem; zw
*/
p_int font; /* b */
/*
* UInt8 reserved; zb
*/
/*
* WinHandle popupWin; zl
*/
/*
* ListDrawDataFuncPtr drawItemsCallback; zl
*/
/*
* private, not stored into file
*/
int cbListItems;
}
RCListBA16Type;
#define szRCListBA16 "w,w4,uuuuuuzu10,p,w,zw,zw,bzb,zl,zl"
typedef struct RCListBA32Type
{
p_int id; /* w */
RCLISTATTR attr; /* uuuuuuzu10 */
RCRECT bounds; /* w4 */
char *itemsText; /* p */
p_int numItems; /* w */
/*
* Word currentItem; zw
*/
/*
* Word topItem; zw
*/
p_int font; /* b */
/*
* UInt8 reserved; zb
*/
/*
* WinHandle popupWin; zl
*/
/*
* ListDrawDataFuncPtr drawItemsCallback; zl
*/
/*
* private, not stored into file
*/
int cbListItems;
}
RCListBA32Type;
#define szRCListBA32 "w,uuuuuuzu10,w4,p,w,zw,zw,bzb,zl,zl"
typedef union RCListType
{
RCListBA16Type s16;
RCListBA32Type s32;
}
RCListType;
/*
* ------------------ Field ------------------
*/
typedef struct RCFIELDATTR
{
p_int usable; /* u */
p_int visible; /* u */
p_int editable; /* u */
p_int singleLine; /* u */
p_int hasFocus; /* u */
p_int dynamicSize; /* u */
p_int insPtVisible; /* u */
p_int dirty; /* u */
p_int underlined; /* u2 */
p_int justification; /* u2 */
p_int autoShift; /* u */
p_int hasScrollBar; /* u */
p_int numeric; /* u */
/*
* zu
*/
}
RCFIELDATTR; /* uuuuuuuu u2u2uuuzu */
typedef struct RCFieldBA16Type
{
p_int id; /* w */
RCRECT rect; /* w4 */
RCFIELDATTR attr; /* uuuuuuuu u2u2uuuzu */
char *text; /* p */
/*
* VoidHand zl textHandle; block the contains the text string
*/
/*
* LineInfoPtr zl lines;
*/
/*
* Word zw textLen;
*/
/*
* Word zw textBlockSize;
*/
p_int maxChars; /* w */
/*
* p_int selFirstPos; zw
*/
/*
* p_int selLastPos; zw
*/
/*
* p_int insPtXPos; zw
*/
/*
* p_int insPtYPos; zw
*/
p_int fontID; /* b */
/*
* p_int reserved; zb
*/
}
RCFieldBA16Type;
#define szRCFieldBA16 "w,w4,uuuuuuuu,u2u2uuuzu,p,zl,zl,zw,zw,w,zw,zw,zw,zw,b,zb"
typedef struct RCFieldBA32Type
{
RCRECT rect; /* w4 */
p_int id; /* w */
RCFIELDATTR attr; /* uuuuuuuu u2u2uuuzu */
char *text; /* p */
/*
* VoidHand zl textHandle; block the contains the text string
*/
/*
* LineInfoPtr zl lines;
*/
/*
* Word zw textLen;
*/
/*
* Word zw textBlockSize;
*/
p_int maxChars; /* w */
/*
* p_int selFirstPos; zw
*/
/*
* p_int selLastPos; zw
*/
/*
* p_int insPtXPos; zw
*/
/*
* p_int insPtYPos; zw
*/
p_int fontID; /* b */
/*
* p_int reserved; zb
*/
}
RCFieldBA32Type;
#define szRCFieldBA32 "w4,w,uuuuuuuu,u2u2uuuzu,p,zl,zl,zw,zw,w,zw,zw,zw,zw,b,zb"
typedef union RCFieldType
{
RCFieldBA16Type s16;
RCFieldBA32Type s32;
}
RCFieldType;
/*
* ------------------ Table ------------------
*/
typedef struct RCTableColumnAttrBA16Type
{
p_int width; /* w */
/*
* p_int reserved1; zt5
*/
p_int masked; /* t */
p_int editIndicator; /* t */
p_int usable; /* t */
/*
* p_int reserved2; zb
*/
p_int spacing; /* w */
/*
* TableDrawItemFuncPtr drawCallback; zl
*/
/*
* TableLoadDataFuncPtr loadDataCallback; zl
*/
/*
* TableSaveDataFuncPtr saveDataCallback; zl
*/
}
RCTableColumnAttrBA16Type;
#define szRCTableColumnAttrBA16 "w,zt5tttzb,w,zl,zl,zl"
typedef struct RCTableColumnAttrBA32Type
{
p_int width; /* w */
p_int spacing; /* w */
/*
* p_int reserved1; zt5
*/
p_int masked; /* t */
p_int editIndicator; /* t */
p_int usable; /* t */
/*
* p_int reserved2; zb
*/
/*
* p_int reserved3; zw
*/
/*
* TableDrawItemFuncPtr drawCallback; zl
*/
/*
* TableLoadDataFuncPtr loadDataCallback; zl
*/
/*
* TableSaveDataFuncPtr saveDataCallback; zl
*/
}
RCTableColumnAttrBA32Type;
#define szRCTableColumnAttrBA32 "w,w,zt5tttzb,zw,zl,zl,zl"
#define szRCTABLECOLUMNATTR (vfLE32?szRCTableColumnAttrBA32:szRCTableColumnAttrBA16)
typedef union RCTABLECOLUMNATTR
{
RCTableColumnAttrBA16Type s16;
RCTableColumnAttrBA32Type s32;
}
RCTABLECOLUMNATTR;
typedef struct RCTABLEROWATTR
{
p_int id; /* w */
p_int height; /* w */
/*
* DWord data; zl
*/
/*
* p_int reserved1; zt7
*/
p_int usable; /* t */
/*
* p_int reserved2; zt4
*/
p_int masked; /* t */
p_int invalid; /* t */
p_int staticHeight; /* t */
p_int selectable; /* t */
/*
* p_int reserved3; zw
*/
}
RCTABLEROWATTR;
#define szRCTABLEROWATTR "w,w,zl,zt7t,zt4tttt,zw"
/*
* this is bogus...don't know why
*/
#define szRCTABLEPADDING "zl,zl"
typedef struct RCTABLEATTR
{
p_int visible; /* u */
p_int editable; /* u */
p_int editing; /* u */
p_int selected; /* u */
p_int hasScrollBar; /* u */
/*
* p_int reserved; zu11
*/
}
RCTABLEATTR; /* uuuu uzu11 */
typedef struct RCTableBA16Type
{
p_int id; /* w */
RCRECT bounds; /* w4 */
RCTABLEATTR attr; /* uuuu uzu11 */
p_int numColumns; /* w */
p_int numRows; /* w */
p_int currentRow; /* w */
p_int currentColumn; /* w */
p_int topRow; /* w */
/*
* TableColumnAttrType * columnAttrs; zl
*/
/*
* TableRowAttrType * rowAttrs; zl
*/
/*
* TableItemPtr items; zl
*/
RCFieldBA16Type currentField;
/*
* not emitted
*/
p_int *rgdxcol;
}
RCTableBA16Type;
#define szRCTableBA16 "w,w4,uuuuuzu11,w,w,w,w,w,zl,zl,zl" szRCFieldBA16
typedef struct RCTableBA32Type
{
p_int id; /* w */
RCTABLEATTR attr; /* uuuu uzu11 */
RCRECT bounds; /* w4 */
p_int numColumns; /* w */
p_int numRows; /* w */
p_int currentRow; /* w */
p_int currentColumn; /* w */
p_int topRow; /* w */
/*
* p_int reserved zw
*/
/*
* TableColumnAttrType * columnAttrs; zl
*/
/*
* TableRowAttrType * rowAttrs; zl
*/
/*
* TableItemPtr items; zl
*/
RCFieldBA32Type currentField;
/*
* not emitted
*/
p_int *rgdxcol;
}
RCTableBA32Type;
#define szRCTableBA32 "w,uuuuuzu11,w4,w,w,w,w,w,zw,zl,zl,zl" szRCFieldBA32
typedef union RCTableType
{
RCTableBA16Type s16;
RCTableBA32Type s32;
}
RCTableType;
/*
* ------------------ Form Label ------------------
*/
/*
* form.h
*/
typedef struct RCFORMOBJATTR
{
p_int usable; /* t,zt7 (opt) */
/*
* p_int reserved zb
*/
}
RCFORMOBJATTR; /* tzt7,zb */
typedef struct RCFormLabelBA16Type
{
p_int id; /* w */
RCPOINT pos; /* w2 */
RCFORMOBJATTR attr; /* uzu15 */
p_int fontID; /* b */
/*
* p_int reserved zb
*/
char *text; /* p */
}
RCFormLabelBA16Type;
#define szRCFormLabelBA16 "w,w2,uzu15,b,zb,p"
typedef struct RCFormLabelBA32Type
{
RCPOINT pos; /* w2 */
char *text; /* p */
p_int id; /* w */
RCFORMOBJATTR attr; /* uzu15 */
p_int fontID; /* b */
/*
* p_int reserved zb
*/
/*
* p_int padding; zw
*/
}
RCFormLabelBA32Type;
#define szRCFormLabelBA32 "w2,p,w,uzu15,b,zb,zw"
typedef union RCFormLabelType
{
RCFormLabelBA16Type s16;
RCFormLabelBA32Type s32;
}
RCFormLabelType;
/*
* ------------------ Form Title ------------------
*/
typedef struct RCFORMTITLE
{
RCRECT rect; /* w4 */
char *text; /* p */
}
RCFORMTITLE;
#define szRCFORMTITLE "w4,p"
/*
* ------------------ Form Popup ------------------
*/
typedef struct RCFORMPOPUP
{
p_int controlID; /* w */
p_int listID; /* w */
}
RCFORMPOPUP;
#define szRCFORMPOPUP "ww"
/*
* ------------------ Form Graffiti State ------------------
*/
typedef struct RCFORMGRAFFITISTATE
{
RCPOINT pos; /* w2 */
}
RCFORMGRAFFITISTATE;
#define szRCFORMGRAFFITISTATE "w2"
/*
* ------------------ Form Gadget ------------------
*/
typedef struct RCFormGadgetAttr
{
p_int usable; /* u */
p_int extended; /* u */
p_int visible; /* u */
/*
* p_int reserved zu13
*/
}
RCFormGadgetAttr; /* uuuzu13 */
typedef struct RCFORMGADGET
{
p_int id; /* w */
RCFormGadgetAttr attr; /* uuuzu13 */
RCRECT rect; /* w4 */
/*
* VoidPtr data; zl
*/
/*
* FormGadgetHandlerType *handler zl
*/
}
RCFORMGADGET;
#define szRCFORMGADGET "w,uuuzu13,w4,zl,zl"
/*
* ------------------ Form Bitmap ------------------
*/
typedef struct RCFormBitMapBA16Type
{
RCFORMOBJATTR attr; /* uzu15 */
RCPOINT pos; /* w2 */
p_int rscID; /* w */
}
RCFormBitMapBA16Type;
#define szRCFormBitMapBA16 "uzu15,w2,w"
typedef struct RCFormBitMapBA32Type
{
RCFORMOBJATTR attr; /* uzu15 */
p_int rscID; /* w */
RCPOINT pos; /* w2 */
}
RCFormBitMapBA32Type;
#define szRCFormBitMapBA32 "uzu15,w,w2"
typedef union RCFormBitMapType
{
RCFormBitMapBA16Type s16;
RCFormBitMapBA32Type s32;
}
RCFormBitMapType;
/*
* ------------------ Control ------------------
*/
typedef struct RCCONTROLATTR
{
p_int usable; /* u */
p_int enabled; /* u */
p_int visible; /* u *//* OS use internal */
p_int on; /* u */
p_int leftAnchor; /* u */
p_int frame; /* u3 */
p_int drawnAsSelected; /* u */
p_int graphical; /* u */
p_int vertical; /* u */
/*
* p_int reserved; zu5
*/
}
RCCONTROLATTR; /* uuuuuu3 uuuzu5 */
typedef struct RCControlBA16Type
{
p_int id; /* w */
RCRECT bounds; /* w4 */
p_int bitmapid; /* s / w */
p_int selectedbitmapid; /* s / w */
char *text; /* p / s */
RCCONTROLATTR attr; /* uuuuuu3 uuuzu5 */
p_int style; /* b */
p_int font; /* b */
p_int group; /* b */
}
RCControlBA16Type;
#define szRCControlBA16 "w,w4,ssp,uuuuuu3,uuuzu5,b,b,b,zb"
#define szRCGraphicalControlBA16 "w,w4,wws,uuuuuu3,uuuzu5,b,b,b,zb"
typedef struct RCControlBA32Type
{
p_int id; /* w */
RCCONTROLATTR attr; /* uuuuuu3 uuuzu5 */
RCRECT bounds; /* w4 */
p_int bitmapid; /* s / w */
p_int selectedbitmapid; /* s / w */
char *text; /* p / s */
p_int style; /* b */
p_int font; /* b */
p_int group; /* b */
/*
* p_int reserved; zb
*/
}
RCControlBA32Type;
#define szRCControlBA32 "w,uuuuuu3,uuuzu5,w4,ssp,b,b,b,zb"
#define szRCGraphicalControlBA32 "w,uuuuuu3,uuuzu5,w4,wws,b,b,b,zb"
typedef union RCControlType
{
RCControlBA16Type s16;
RCControlBA32Type s32;
}
RCControlType;
/*
* ------------------ Slider ------------------
*/
typedef struct RCSliderControlBA16Type
{
p_int id; /* w */
RCRECT bounds; /* w4 */
p_int thumbid; /* w */// overlays text in ControlBA16Type
p_int backgroundid; /* w */// overlays text in ControlBA16Type
RCCONTROLATTR attr; /* uuuuuu3,uuuzu5 */// graphical *is* set
p_int style; /* b */// must be sliderCtl or repeatingSliderCtl
/*
* UInt8 reserved; zb
*/
p_int minValue; /* w */
p_int maxValue; /* w */
p_int pageSize; /* w *//* pageJump == pageSize */
p_int value; /* w */
/*
* MemPtr activeSliderP; zl
*/
}
RCSliderControlBA16Type;
#define szRCSliderControlBA16 "w,w4,w,w,uuuuuu3,uuuzu5,b,zb,w,w,w,w,zl"
typedef struct RCSliderControlBA32Type
{
p_int id; /* w */
RCCONTROLATTR attr; /* uuuuuu3,uuuzu5 */// graphical *is* set
RCRECT bounds; /* w4 */
p_int thumbid; /* w */// overlays text in ControlBA16Type
p_int backgroundid; /* w */// overlays text in ControlBA16Type
p_int style; /* b */// must be sliderCtl or repeatingSliderCtl
/*
* UInt8 reserved; zb
*/
p_int minValue; /* w */
p_int maxValue; /* w */
p_int pageSize; /* w */
p_int value; /* w */
/*
* p_int reserved2; zw
*/
/*
* MemPtr activeSliderP; zl
*/
}
RCSliderControlBA32Type;
#define szRCSliderControlBA32 "w,uuuuuu3,uuuzu5,w4,w,w,b,zb,w,w,w,w,zw,zl"
typedef union RCSliderControlType
{
RCSliderControlBA16Type s16;
RCSliderControlBA32Type s32;
}
RCSliderControlType;
/*
* ------------------ ScrollBar ------------------
*/
typedef struct RCSCROLLBARATTR
{
p_int usable; /* t */
p_int visible; /* t */
p_int hilighted; /* t */
p_int shown; /* t */
p_int activeRegion; /* t4 */
/*
* p_int reserved; zb
*/
}
RCSCROLLBARATTR;
typedef struct RCSCROLLBAR
{
RCRECT bounds; /* w4 */
p_int id; /* w */
RCSCROLLBARATTR attr; /* ttttt4,zb */
p_int value; /* w */
p_int minValue; /* w */
p_int maxValue; /* w */
p_int pageSize; /* w */
/*
* Short penPosInCar;
*/
/*
* zw
*/
/*
* Short savePos;
*/
/*
* zw
*/
}
RCSCROLLBAR;
#define szRCSCROLLBAR "w4,w,ttttt4,zb,w,w,w,w,zw,zw"
/*
* ------------------ Forms ------------------
*/
typedef union RCFORMOBJECT
{
void *ptr;
RCFieldType *field;
RCControlType *control;
RCSliderControlType *slider;
RCListType *list;
RCTableType *table;
RCFormBitMapType *bitmap;
RCFormLabelType *label;
/*
* RCFORMLINE * line;
*/
/*
* RCFORMFRAME * frame;
*/
/*
* RCFORMRECTANGLE * rectangle;
*/
RCFORMTITLE *title;
RCFORMPOPUP *popup;
RCFORMGRAFFITISTATE *grfState;
RCFORMGADGET *gadget;
RCSCROLLBAR *scrollbar;
}
RCFORMOBJECT;
typedef struct RCFormObjListBA16Type
{
p_int objectType; /* b */
/*
* p_int reserved; zb
*/
union
{
RCFORMOBJECT object; /* l */
p_int ibobj;
}
u;
}
RCFormObjListBA16Type;
#define szRCFormObjListBA16 "b,zb,l"
typedef struct RCFormObjListBA32Type
{
union
{
RCFORMOBJECT object; /* l */
p_int ibobj;