2 Copyright 2003, The AROS Development Team.
8 #ifndef MUI_IMSPEC_INTERN_H
9 #define MUI_IMSPEC_INTERN_H
11 /* This header contains the definition of the internal ImageSpec
12 * structure (ie. parsed, in memory).
13 * It's private, used only by imspec implementation, and shouldnt
14 * be included by other Zune components, which should refer to
15 * the public imspec API in imspec.h
18 #ifndef LIBRARIES_MUI_H
22 #include "muimaster_intern.h"
26 IST_PATTERN
, /* "0:%ld" = a dithered mix of MUI pens */
27 IST_VECTOR
, /* "1:%ld" = builtin code to draw vector image */
28 IST_COLOR
, /* "2:" + PenSpec = a pen */
29 IST_BOOPSI
, /* "3:%s" = boopsi image class */
30 IST_BRUSH
, /* "3:%s", "4:%s" = small brushes */
31 IST_BITMAP
, /* "5:%s" = a picture to tile in background */
32 IST_CONFIG
, /* "6:%ld" = a configured image/background (indirection) */
33 IST_SCALED_GRADIENT
, /* "7:([Hh]|[Vv]|angle),<IST_COLOR>-<IST_COLOR>" = a scaled gradient */
34 IST_TILED_GRADIENT
, /* "8:([Hh]|[Vv]|angle),<IST_COLOR>-<IST_COLOR>" = a tiled gradient */
37 #define CHECKBOX_IMAGE 4
40 enum MUI_ImageSpec_Flags
{
41 IMF_SETUP
= 1, /* struct is between _setup and _cleanup */
42 IMF_SHOW
= 2, /* struct is between _show and _hide */
46 struct MUI_ImageSpec_intern
;
48 typedef void (*VECTOR_DRAW_FUNC
)(struct MUI_RenderInfo
*mri
, LONG left
, LONG top
, LONG width
, LONG height
, LONG state
);
50 /* should really contain an union */
51 struct MUI_ImageSpec_intern
/* _intern */
54 /* UWORD flags; */ /* see MUI_ImageSpec_Flags */
55 /* struct MUI_RenderInfo *mri; */
62 VECTOR_DRAW_FUNC draw
;
65 struct MUI_PenSpec_intern penspec
;
68 CONST_STRPTR filename
;
73 CONST_STRPTR filename
[2];
74 struct dt_node
*dt
[2];
78 CONST_STRPTR filename
;
83 LONG muiimg
; /* index in prefs->imagespecs[] */
86 struct MUI_RenderInfo
*mri
;
87 UWORD angle
; /* integer values in [0,360) */
93 BOOL start_pen_is_allocated
;
94 BOOL end_pen_is_allocated
;
100 struct MUI_ImageSpec_intern
*zune_imspec_create_vector(LONG vect
);
101 BOOL
zune_imspec_vector_get_minmax(struct MUI_ImageSpec_intern
*spec
, struct MUI_MinMax
*minmax
);
103 VOID
zune_scaled_gradient_intern_to_string(struct MUI_ImageSpec_intern
*spec
,
105 VOID
zune_tiled_gradient_intern_to_string(struct MUI_ImageSpec_intern
*spec
,
107 BOOL
zune_gradient_string_to_intern(CONST_STRPTR str
,
108 struct MUI_ImageSpec_intern
*spec
);
109 VOID zune_gradient_draw
111 struct MUI_ImageSpec_intern
*spec
,
112 struct MUI_RenderInfo
*mri
,
113 WORD x1
, WORD y1
, WORD x2
, WORD y2
,
117 VOID zune_gradient_drawfast
119 struct MUI_ImageSpec_intern
*spec
,
121 struct MUI_RenderInfo
*mri
,
122 WORD mode
, WORD abs_l
, WORD abs_t
, WORD abs_r
, WORD abs_b
,
123 WORD x1
, WORD y1
, WORD x2
, WORD y2
,
127 BOOL
zune_gradientspec_setup(struct MUI_ImageSpec_intern
*spec
, struct MUI_RenderInfo
*mri
);
128 VOID
zune_gradientspec_cleanup(struct MUI_ImageSpec_intern
*spec
);