nouveau.hidd: disable warnings about not initialized variables
[AROS.git] / workbench / classes / gadgets / arospalette / arospalette_intern.h
blob244588ffaca18aaa50e58139ffc41826cf88af50
1 /*
2 Copyright © 1995-2005, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef AROSPALETTE_INTERN_H
7 #define AROSPALETTE_INTERN_H
10 #ifndef EXEC_TYPES_H
11 # include <exec/types.h>
12 #endif
13 #ifndef EXEC_LIBRARIES_H
14 # include <exec/libraries.h>
15 #endif
16 #ifndef DOS_BPTR_H
17 # include <dos/bptr.h>
18 #endif
19 #ifndef GRAPHICS_RASPORT_H
20 # include <graphics/rastport.h>
21 #endif
22 #ifndef INTUITION_CGHOOKS_H
23 # include <intuition/cghooks.h>
24 #endif
25 #ifndef INTUITION_CLASSES_H
26 # include <intuition/classes.h>
27 #endif
28 #ifndef INTUITION_INTUITION_H
29 # include <intuition/intuition.h>
30 #endif
32 /* Predeclaration */
33 struct PaletteBase_intern;
35 struct PaletteData
37 UWORD pd_NumColors;
38 UBYTE *pd_ColorTable;
39 UBYTE pd_Color;
40 /* For state info, to know what selected entry to delete in GM_RENDER, GREDRAW_UPDATE */
41 UBYTE pd_OldColor;
43 UBYTE pd_ColorOffset;
44 UWORD pd_IndWidth;
45 UWORD pd_IndHeight;
47 struct IBox pd_GadgetBox; /* Box surrounding whole palette */
48 struct IBox pd_PaletteBox; /* Box surrounding palette */
49 struct IBox pd_IndicatorBox; /* Box surrounding indicator */
51 UWORD pd_ColWidth;
52 UWORD pd_RowHeight;
53 UBYTE pd_NumCols;
54 UBYTE pd_NumRows;
56 /* This one is used to backup pd_Color if left is clicked. This
57 ** way the old state can be restored if the left is released
58 ** outside the gadget.
60 UBYTE pd_ColorBackup;
61 struct TextAttr *pd_TAttr;
62 LONG pd_LabelPlace;
63 Object *pd_Frame;
68 /**************
69 ** Defines **
70 **************/
71 #undef EG
72 #define EG(o) ((struct ExtGadget *)o)
76 #define HSPACING 2
77 #define VSPACING 2
79 #define HBORDER HSPACING
80 #define VBORDER VSPACING
83 #define HSELBORDER 1
84 #define VSELBORDER 1
86 /*****************
87 ** Prototypes **
88 *****************/
90 UWORD GetPalettePen(struct PaletteData *, UWORD);
91 UBYTE Colors2Depth(UWORD);
93 VOID RenderFrame(struct PaletteData *, struct RastPort *, struct IBox *,
94 struct DrawInfo *, BOOL, BOOL, struct PaletteBase_intern *);
96 VOID RenderPalette(struct PaletteData *, struct RastPort *,
97 struct PaletteBase_intern *);
100 VOID UpdateActiveColor( struct PaletteData *, struct DrawInfo *,
101 struct RastPort *, struct PaletteBase_intern *);
103 VOID GetGadgetIBox(Object *, struct GadgetInfo *, struct IBox *);
104 UWORD ComputeColor(struct PaletteData *, WORD, WORD);
105 BOOL InsidePalette(struct PaletteData *, WORD, WORD);
107 void DrawDisabledPattern(struct RastPort *, struct IBox *, UWORD,
108 struct PaletteBase_intern *);
111 struct TextFont *PrepareFont(struct RastPort *, struct IntuiText *,
112 struct TextFont **, struct PaletteBase_intern *);
115 void DisposeFont(struct RastPort *, struct TextFont *, struct TextFont *,
116 struct PaletteBase_intern *);
118 BOOL RenderLabel( struct Gadget *gad, struct IBox *,
119 struct RastPort *, LONG labelplace,
120 struct PaletteBase_intern *);
122 #endif /* AROSPALETTE_INTERN_H */