grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / muimaster / datatypescache.h
blob19b70716a7f09e107e5225457473dc5ba489aa68
1 /*
2 Copyright 2002, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #ifndef _MUI_DATATYPESCACHE_H
9 #define _MUI_DATATYPESCACHE_H
11 /* struct dt_node; */
13 /*void dt_init(void);*/
14 /*void dt_cleanup(void);*/
16 struct NewImage
18 UWORD w;
19 UWORD h;
20 ULONG *data;
21 Object *o;
22 struct BitMap *bitmap;
23 APTR mask;
26 #define MODE_DEFAULT 0
27 #define MODE_PROP 1
29 struct dt_frame_image
31 Object *o;
32 struct NewImage *img_up;
33 struct NewImage *img_down;
34 short tile_left;
35 short tile_top;
36 short tile_right;
37 short tile_bottom;
38 short inner_left;
39 short inner_top;
40 short inner_right;
41 short inner_bottom;
42 BOOL noalpha;
45 struct dt_node
47 struct MinNode node;
48 char *filename;
49 Object *o;
50 int width, height;
51 struct Screen *scr;
52 int count;
53 struct BackFillInfo *bfi;
54 UBYTE mask;
55 UWORD mode;
56 struct NewImage *img_verticalcontainer;
57 struct NewImage *img_verticalknob;
58 struct NewImage *img_horizontalcontainer;
59 struct NewImage *img_horizontalknob;
60 struct NewImage *img_up;
61 struct NewImage *img_down;
62 struct NewImage *img_left;
63 struct NewImage *img_right;
65 int ContainerTop_o, ContainerTop_s;
66 int ContainerVertTile_o, ContainerVertTile_s;
67 int ContainerBottom_o, ContainerBottom_s;
68 int KnobTop_o, KnobTop_s;
69 int KnobTileTop_o, KnobTileTop_s;
70 int KnobVertGripper_o, KnobVertGripper_s;
71 int KnobTileBottom_o, KnobTileBottom_s;
72 int KnobBottom_o, KnobBottom_s;
73 int ContainerLeft_o, ContainerLeft_s;
74 int ContainerHorTile_o, ContainerHorTile_s;
75 int ContainerRight_o, ContainerRight_s;
76 int KnobLeft_o, KnobLeft_s;
77 int KnobTileLeft_o, KnobTileLeft_s;
78 int KnobHorGripper_o, KnobHorGripper_s;
79 int KnobTileRight_o, KnobTileRight_s;
80 int KnobRight_o, KnobRight_s;
84 void DisposeImageContainer(struct NewImage *ni);
85 struct NewImage *NewImageContainer(UWORD w, UWORD h);
87 struct dt_node *dt_load_picture(CONST_STRPTR filename, struct Screen *scr);
88 void dt_dispose_picture(struct dt_node *node);
90 int dt_width(struct dt_node *node);
91 int dt_height(struct dt_node *node);
92 void dt_put_on_rastport(struct dt_node *node, struct RastPort *rp, int x,
93 int y);
94 void dt_put_mim_on_rastport(struct dt_node *node, struct RastPort *rp,
95 int x, int y, int state);
97 void dt_put_on_rastport_tiled(struct dt_node *node, struct RastPort *rp,
98 int x1, int y1, int x2, int y2, int xoffset, int yoffset);
99 void dt_put_on_rastport_quicktiled(struct RastPort *rp,
100 struct dt_node *node, UWORD x, UWORD y, UWORD w, UWORD h);
101 struct dt_frame_image *load_custom_frame(CONST_STRPTR filename,
102 struct Screen *scr);
103 void dispose_custom_frame(struct dt_frame_image *fi);
105 #if AROS_BIG_ENDIAN
106 #define GET_A(rgb) ((rgb >> 24) & 0xff)
107 #define GET_R(rgb) ((rgb >> 16) & 0xff)
108 #define GET_G(rgb) ((rgb >> 8) & 0xff)
109 #define GET_B(rgb) (rgb & 0xff)
110 #define SET_ARGB(a, r, g, b) a << 24 | r << 16 | g << 8 | b
111 #else
112 #define GET_A(rgb) (rgb & 0xff)
113 #define GET_R(rgb) ((rgb >> 8) & 0xff)
114 #define GET_G(rgb) ((rgb >> 16) & 0xff)
115 #define GET_B(rgb) ((rgb >> 24) & 0xff)
116 #define SET_ARGB(a, r, g, b) b << 24 | g << 16 | r << 8 | a
117 #endif
119 #endif