-
Notifications
You must be signed in to change notification settings - Fork 0
/
gadgets.h
172 lines (125 loc) · 4.04 KB
/
gadgets.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
/*
* Copyright ©1996-2008 pinc Software. All Rights Reserved.
* Licensed under the terms of the GNU General Public License, version 3.
*/
#ifndef IGN_GADGETS_H
#define IGN_GADGETS_H
#ifndef __amigaos4__
#include <gadgets/TextEdit.h>
#include <gadgets/Scroller.h>
#endif
/*************************** PopUp-Gadget ***************************/
#define POPA_MaxItems TAG_USER+42
#define POPA_CallBack TAG_USER+43
#define POPA_ItemHeight TAG_USER+44
#define POPA_Selected TAG_USER+45
#define POPA_Width TAG_USER+46
#define POPA_MaxPen TAG_USER+47
#define POPA_Left TAG_USER+48
/*************************** ColorButton-Gadget ***************************/
#define CGA_Color TAG_USER+70
#define CGA_Pen TAG_USER+71
#define CGA_Recessed TAG_USER+72
struct ColorGData {
ULONG cd_Color;
ULONG cd_Pen;
UBYTE cd_Recessed;
};
/*************************** Page-Gadget ***************************/
#define PAGEGA_Active TAG_USER+80
#define PAGEGA_Pages TAG_USER+81
#define PAGEGA_RefreshFunc TAG_USER+82
#define PAGEGA_BeginUpdatePage TAG_USER+83
#define PAGEGA_EndUpdatePage TAG_USER+84
struct PageGData {
struct Gadget **pd_Pages;
ULONG *pd_GadgetCount;
struct Window *pd_Window;
struct Gadget *pd_Gadgets;
ULONG pd_Active,pd_Count;
void ASM (*pd_Refresh)(REG(a0, struct Window *), REG(d0, LONG));
};
/*************************** Index-Gadget ***************************/
#define IGA_Active PAGEGA_Active
#define IGA_Labels GTCY_Labels
struct IndexGData {
STRPTR *id_Labels;
LONG *id_Length;
LONG *id_Width;
LONG *id_Pos;
// BYTE *id_Flags;
ULONG id_Active,id_Current,id_NewCurrent;
ULONG id_Count,id_MinWidth;
UWORD id_Space,id_TextSpace;
struct DrawInfo *id_dri;
};
/*************************** Edit-Gadget ***************************/
/*
Mazze: removed struct EditGData. Must be inserted in a new header
which is shared with pTextEdit.gadget.
*/
#define EDJ_JUSTIFY 0 /* justified lines */
#define EDJ_LEFT 1 /* left-aligned */
#define EDJ_RIGHT 2 /* right-aligned */
#define EDJ_CENTERED 3 /* centered */
struct EditLine {
STRPTR el_Word;
UWORD el_Length;
UWORD el_Width;
UBYTE el_Type;
};
#define EDITLINE(mln) ((struct EditLine *)((UBYTE *)mln+sizeof(ULONG)+sizeof(struct MinNode)))
#define LINEOFFSET(mln) (*(LONG *)(mln+1))
/*************************** Arrow-Image ***************************/
struct ArrowIData {
struct Image *ad_Frame;
long ad_Type;
};
#define ADT_UP 0
#define ADT_DOWN 1
/*************************** Bitmap-Image ***************************/
#define BIA_Bitmap TAG_USER+200
#define BIA_SelectedBitmap TAG_USER+201
struct BitmapIData {
struct BitMap *bd_Bitmap;
struct BitMap *bd_SelectedBitmap;
};
/*************************** Picture-Image ***************************/
#define PIA_FromImage TAG_USER+100
#define PIA_WithColors TAG_USER+101
#define PIA_BitMap TAG_USER+102
#define PIA_DelayLoad TAG_USER+103
#define PIM_LOAD TAG_USER+104
struct PictureIData {
struct Screen *pd_Screen;
struct BitMap *pd_SourceBitMap,*pd_BitMap;
struct ColorRegister *pd_ColorMap;
LONG *pd_ColorRegs;
Object *pd_Remapped;
ULONG pd_NumColors;
UBYTE pd_Depth;
STRPTR pd_Name;
};
/*************************** gpDomain ***************************/
/* taken from the ADCD - G1 */
#ifndef GM_DOMAIN
#define GM_DOMAIN (7)
struct gpDomain {
ULONG MethodID;
struct GadgetInfo *gpd_GInfo;
struct RastPort *gpd_RPort; /* RastPort to layout for */
LONG gpd_Which;
struct IBox gpd_Domain; /* Resulting domain */
struct TagItem *gpd_Attrs; /* Additional attributes */
};
#define GDOMAIN_MINIMUM (0)
#define GDOMAIN_NOMINAL (1)
#define GDOMAIN_MAXIMUM (2)
#endif /* GM_DOMAIN */
/*************************** Link ***************************/
struct Link {
struct MinNode l_Node;
APTR l_Link;
ULONG ASM (*l_HookFunction)(REG(a0, APTR), REG(a2, APTR), REG(a1, struct LVDrawMsg *));
};
#endif /* IGN_GADGETS_H */