Don't call InvertPixelArray with negative width and/or height.
[tangerine.git] / workbench / libs / muimaster / frame.h
blobeb3e121bd82a4fb47b41febc3b121abee2200b08
1 /*
2 Copyright © 1999, David Le Corfec.
3 Copyright © 2002, The AROS Development Team.
4 All rights reserved.
6 $Id$
7 */
9 #ifndef _MUI_FRAME_H
10 #define _MUI_FRAME_H
12 #ifndef EXEC_TYPES_H
13 #include <exec/types.h>
14 #endif
16 struct MUI_FrameSpec;
18 /* MUI_*Spec really are ASCII strings.
20 #if 0
21 struct MUI_FrameSpec
23 UBYTE spec[7]; /* eg. "504444", "A13333" */
25 #endif
27 typedef enum {
28 FST_NONE,
29 FST_RECT,
30 FST_BEVEL,
31 FST_THIN_BORDER,
32 FST_THICK_BORDER,
33 FST_ROUND_BEVEL, /* 5 */
34 FST_WIN_BEVEL,
35 FST_ROUND_THICK_BORDER,
36 FST_ROUND_THIN_BORDER,
37 FST_GRAY_BORDER,
38 FST_SEMIROUND_BEVEL,
39 FST_COUNT,
40 } FrameSpecType;
42 /* here values are converted from their ASCII counterparts
44 struct MUI_FrameSpec_intern
46 FrameSpecType type;
47 UBYTE state; /* 0 = up, 1 = down */
48 UBYTE innerLeft;
49 UBYTE innerRight;
50 UBYTE innerTop;
51 UBYTE innerBottom;
55 struct MUI_RenderInfo;
57 typedef void (*ZFDrawFunc)(struct MUI_RenderInfo *mri,
58 int left, int top, int width, int height);
61 struct ZuneFrameGfx {
62 ZFDrawFunc draw;
63 UWORD ileft;
64 UWORD iright;
65 UWORD itop;
66 UWORD ibottom;
69 const struct ZuneFrameGfx *zune_zframe_get (const struct MUI_FrameSpec_intern *frameSpec);
70 const struct ZuneFrameGfx *zune_zframe_get_with_state (const struct MUI_FrameSpec_intern *frameSpec,
71 UWORD state);
73 BOOL zune_frame_intern_to_spec (const struct MUI_FrameSpec_intern *intern,
74 STRPTR spec);
75 BOOL zune_frame_spec_to_intern(CONST_STRPTR spec,
76 struct MUI_FrameSpec_intern *intern);
78 #endif