chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / iclass.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2008 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _ICLASS_H
25 #define _ICLASS_H
26
27 #include "eimage.h"
28 #include "etypes.h"
29 #include "xwin.h"
30
31 #define BEVEL_NONE              0
32 #define BEVEL_AMIGA             1
33 #define BEVEL_MOTIF             2
34 #define BEVEL_NEXT              3
35 #define BEVEL_DOUBLE            4
36 #define BEVEL_WIDEDOUBLE        5
37 #define BEVEL_THINPOINT         6
38 #define BEVEL_THICKPOINT        7
39
40 #define FILL_STRETCH            0
41 #define FILL_TILE_H             1
42 #define FILL_TILE_V             2
43 #define FILL_INT_TILE_H         4
44 #define FILL_INT_TILE_V         8
45
46 /* Selective Transparency item types */
47 #define ST_SOLID        0
48 #define ST_BORDER       1
49 #define ST_WIDGET       2
50 #define ST_ICONBOX      3
51 #define ST_MENU         4
52 #define ST_MENU_ITEM    5
53 #define ST_TOOLTIP      6
54 #define ST_DIALOG       7
55 #define ST_HILIGHT      8
56 #define ST_PAGER        9
57 #define ST_WARPLIST     10
58 #define ST_BUTTON       11
59
60 #define ICLASS_ATTR_OPAQUE      0x00    /* No transparency */
61 #define ICLASS_ATTR_BG          0x01    /* Background transparency */
62 #define ICLASS_ATTR_GLASS       0x02    /* Glass transparency */
63 #define ICLASS_ATTR_NO_CLIP     0x04    /* Don't apply clip mask */
64 #define ICLASS_ATTR_USE_CM      0x08    /* Use colormodifier */
65
66 /* ImageclassApplyCopy flags */
67 #define IC_FLAG_NONE            0x00    /* No flags */
68 #define IC_FLAG_WRITABLE        0x01    /* Provide writable pixmaps */
69 #define IC_FLAG_MAKE_MASK       0x02    /* Make mask */
70 #define IC_FLAG_FULL_SIZE       0x04    /* Make full size pixmaps */
71
72 /* iclass.c */
73 int                 ImageclassConfigLoad(FILE * fs);
74
75 #ifdef ENABLE_THEME_TRANSPARENCY
76 void                TransparencySet(int transparency);
77 int                 TransparencyEnabled(void);
78 int                 TransparencyUpdateNeeded(void);
79 int                 ImageclassIsTransparent(ImageClass * ic);
80 #else
81 #define TransparencyEnabled() 0
82 #define TransparencyUpdateNeeded() 0
83 #define ImageclassIsTransparent(ic) 0
84 #endif
85
86 ImageClass         *ImageclassFind(const char *name, int fallback);
87 ImageClass         *ImageclassAlloc(const char *name, int fallback);
88 void                ImageclassFree(ImageClass * ic);
89 const char         *ImageclassGetName(ImageClass * ic);
90 EImageBorder       *ImageclassGetPadding(ImageClass * ic);
91 ImageState         *ImageclassGetImageState(ImageClass * ic, int state,
92                                             int active, int sticky);
93 ImageClass         *ImageclassCreateSimple(const char *name, const char *image);
94 ImageClass         *ImageclassGetBlack(void);
95 EImage             *ImageclassGetImage(ImageClass * ic, int active, int sticky,
96                                        int state);
97 void                ImageclassApplySimple(ImageClass * ic, Win win,
98                                           Drawable draw, int state, int x,
99                                           int y, int w, int h);
100 void                ImageclassApply(ImageClass * ic, Win win,
101                                     int active, int sticky, int state,
102                                     int image_type);
103 void                ImageclassApplyCopy(ImageClass * ic, Win win, int w,
104                                         int h, int active, int sticky,
105                                         int state, PmapMask * pmm,
106                                         int pmapflags, int image_type);
107 EImage             *ImageclassGetImageBlended(ImageClass * ic, Win win,
108                                               int w, int h, int active,
109                                               int sticky, int state,
110                                               int image_type);
111 void                ITApply(Win win, ImageClass * ic, ImageState * is,
112                             int state, int active, int sticky, int image_type,
113                             TextClass * tc, TextState * ts, const char *text,
114                             int flags);
115
116 #endif /* _ICLASS_H */