Simple test for asyncio.library.
[AROS-Contrib.git] / gfx / mysticview / src / Mystic_Gadgets.h
blob4918922dc7e4623902759c73e816054a635876fa
1 #ifndef _MADRID_FAKEGADGETS
2 #define _MADRID_FAKEGADGETS
4 /*********************************************************************
5 ----------------------------------------------------------------------
7 Madrid fake gadgets
9 ----------------------------------------------------------------------
10 *********************************************************************/
12 #include <exec/lists.h>
13 #include <guigfx/guigfx.h>
16 struct FakeGadgetList
18 struct List list;
19 int numgadgets;
21 int x, y;
22 int width, height;
24 struct Window *window;
25 struct RastPort *rp;
27 struct FakeGadget *rollovergadget;
28 struct FakeGadget *pressedgadget;
33 struct FakeGadget
35 struct Node node;
36 BOOL inserted;
38 ULONG id;
39 ULONG type;
40 BOOL togglestatus;
41 int status;
42 BOOL visible;
44 int x, y; // inserted from layout
46 int hborder;
47 int vborder;
49 int width, height;
52 LONG pen_inactive;
53 LONG pen_rollover;
54 LONG pen_pressed;
55 LONG pen_active;
56 LONG pen_activerollover;
57 LONG pen_activepressed;
59 // struct BitMap *bitmap;
61 ULONG picx_inactive;
62 ULONG picx_rollover;
63 ULONG picx_pressed;
64 ULONG picx_active;
65 ULONG picx_activerollover;
66 ULONG picx_activepressed;
68 ULONG picy_inactive;
69 ULONG picy_rollover;
70 ULONG picy_pressed;
71 ULONG picy_active;
72 ULONG picy_activerollover;
73 ULONG picy_activepressed;
77 #define FGDT_DUMMY (TAG_USER + 111)
78 #define FGDT_HBORDER (FGDT_DUMMY+1)
79 #define FGDT_VBORDER (FGDT_DUMMY+2)
80 #define FGDT_WIDTH (FGDT_DUMMY+3)
81 #define FGDT_HEIGHT (FGDT_DUMMY+4)
82 #define FGDT_INACTIVEPEN (FGDT_DUMMY+5)
83 #define FGDT_PRESSEDPEN (FGDT_DUMMY+6)
84 #define FGDT_ROLLOVERPEN (FGDT_DUMMY+7)
85 #define FGDT_ACTIVEPEN (FGDT_DUMMY+8)
86 #define FGDT_ACTIVEROLLOVERPEN (FGDT_DUMMY+9)
87 #define FGDT_ACTIVEPRESSEDPEN (FGDT_DUMMY+10)
88 #define FGDT_BITMAP (FGDT_DUMMY+11)
90 #define FGDT_PICX_INACTIVE (FGDT_DUMMY+12)
91 #define FGDT_PICX_PRESSED (FGDT_DUMMY+13)
92 #define FGDT_PICX_ROLLOVER (FGDT_DUMMY+14)
93 #define FGDT_PICX_ACTIVE (FGDT_DUMMY+15)
94 #define FGDT_PICX_ACTIVEROLLOVER (FGDT_DUMMY+16)
95 #define FGDT_PICX_ACTIVEPRESSED (FGDT_DUMMY+17)
97 #define FGDT_PICY_INACTIVE (FGDT_DUMMY+18)
98 #define FGDT_PICY_PRESSED (FGDT_DUMMY+19)
99 #define FGDT_PICY_ROLLOVER (FGDT_DUMMY+20)
100 #define FGDT_PICY_ACTIVE (FGDT_DUMMY+21)
101 #define FGDT_PICY_ACTIVEROLLOVER (FGDT_DUMMY+22)
102 #define FGDT_PICY_ACTIVEPRESSED (FGDT_DUMMY+23)
104 enum ORIENTATION
106 ORIENTATION_RIGHT,
107 ORIENTATION_DOWN
110 enum FGADTYPE
112 FGADTYPE_PUSH,
113 FGADTYPE_TOGGLE
116 enum FGADSTATUS
118 FGSTATUS_INACTIVE,
119 FGSTATUS_PRESSED,
120 FGSTATUS_ROLLOVER,
124 #define INVALID_FAKEGADGET (0xffffffff)
126 void DeleteFakeGadgetList(struct FakeGadgetList *fgl);
127 #define CreateFakeGadgetList(win, ...) \
128 ({ IPTR args[] = { __VA_ARGS__ }; CreateFakeGadgetListA(win, args); })
129 struct FakeGadgetList *CreateFakeGadgetListA(struct Window *win, IPTR *args);
130 #define CreateFakeGadget(id, type, ...) \
131 ({ IPTR args[] = { __VA_ARGS__ }; CreateFakeGadgetA(id, type, args); })
132 struct FakeGadget *CreateFakeGadgetA(ULONG id, ULONG type, IPTR *args);
133 void RemFakeGadget(struct FakeGadget *fg);
134 void DeleteFakeGadget(struct FakeGadget *fg);
135 void AddFakeGadget(struct FakeGadgetList *fgl, struct FakeGadget *fg);
136 void GetLayoutData(struct FakeGadgetList *fgl, int orientation, int *minwidth, int *minheight);
137 BOOL LayoutFakeGadgetList(struct FakeGadgetList *fgl, int orientation, int width, int height, int x, int y);
138 void DrawFakeGadgetList(struct FakeGadgetList *fgl, struct BitMap *bm);
139 ULONG HandleGadgetListEvent(struct FakeGadgetList *fgl, struct IntuiMessage *imsg, struct BitMap *bm);
140 void DrawFakeGadget(struct Window *win, struct FakeGadget *fg, int x, int y, struct BitMap *bitmap);
142 #endif