4 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version. The Blender
10 * Foundation also sells licenses for use in proprietary software under
11 * the Blender License. See http://www.blender.org/BL/ for information
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 * All rights reserved.
26 * The Original Code is: all of this file.
28 * Contributor(s): none yet.
30 * ***** END GPL/BL DUAL LICENSE BLOCK *****
33 #ifndef UI_RESOURCES_H
34 #define UI_RESOURCES_H
36 /* elubie: TODO: move the typedef for icons to UI_interface_icons.h */
37 /* and add/replace include of UI_resources.h by UI_interface_icons.h */
38 #define DEF_ICON(name) name,
41 #define BIFICONID_FIRST (ICON_BLENDER)
45 #define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
51 #define BIFCOLORSHADE_FIRST (COLORSHADE_DARK)
58 #define BIFCOLORSHADE_LAST (COLORSHADE_WHITE)
59 #define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
63 #define BIFCOLORID_FIRST (BUTGREY)
104 VIEWPORTSELECTEDCOLOR,
112 #define BIFCOLORID_LAST (EDITEDGEUNSEL)
113 #define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
121 // common colors among spaces
172 /* this eight colors should be in one block */
223 TH_HANDLE_VERTEX_SELECT,
224 TH_HANDLE_VERTEX_SIZE,
226 TH_DOPESHEET_CHANNELOB,
227 TH_DOPESHEET_CHANNELSUBOB,
233 /* XXX WARNING: previous is saved in file, so do not change order! */
235 /* specific defines per space should have higher define values */
240 // THE CODERS API FOR THEMES:
243 void UI_ThemeColor(int colorid);
245 // sets the color plus alpha
246 void UI_ThemeColor4(int colorid);
248 // sets color plus offset for shade
249 void UI_ThemeColorShade(int colorid, int offset);
251 // sets color plus offset for alpha
252 void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset);
254 // sets color, which is blend between two theme colors
255 void UI_ThemeColorBlend(int colorid1, int colorid2, float fac);
256 // same, with shade offset
257 void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset);
258 void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset);
260 // returns one value, not scaled
261 float UI_GetThemeValuef(int colorid);
262 int UI_GetThemeValue(int colorid);
264 // get three color values, scaled to 0.0-1.0 range
265 void UI_GetThemeColor3fv(int colorid, float *col);
266 // get the color, range 0.0-1.0, complete with shading offset
267 void UI_GetThemeColorShade3fv(int colorid, int offset, float *col);
269 // get the 3 or 4 byte values
270 void UI_GetThemeColor3ubv(int colorid, char *col);
271 void UI_GetThemeColor4ubv(int colorid, char *col);
273 // get a theme color from specified space type
274 void UI_GetThemeColorType4ubv(int colorid, int spacetype, char *col);
276 // blends and shades between two color pointers
277 void UI_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset);
279 // get a 3 byte color, blended and shaded between two other char color pointers
280 void UI_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset);
282 // clear the openGL ClearColor using the input colorid
283 void UI_ThemeClearColor(int colorid);
285 // internal (blender) usage only, for init and set active
286 void UI_SetTheme(int spacetype, int regionid);
288 /* only for buttons in theme editor! */
289 char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
290 char *UI_ThemeColorsPup(int spacetype);
292 void UI_make_axis_color(char *src_col, char *dst_col, char axis);
294 #endif /* UI_ICONS_H */