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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 BIF_RESOURCES_H
34 #define BIF_RESOURCES_H
36 /* elubie: TODO: move the typedef for icons to BIF_interface_icons.h */
37 /* and add/replace include of BIF_resources.h by BIF_interface_icons.h */
39 #define BIFICONID_FIRST (ICON_VIEW3D)
101 ICON_MAYBE_ITS_A_LASSO,
102 ICON_BLANK1, /* ATTENTION, someone decided to use this throughout blender
103 and didn't care to neither rename it nor update the PNG */
127 ICON_STICKY_UVS_DISABLE,
128 ICON_STICKY_UVS_VERT,
154 ICON_MATERIAL_DEHLT2,
159 ICON_DESEL_CUBE_VERTS,
176 ICON_BLUEIMAGE_DEHLT,
178 ICON_BPIBFOLDER_DEHLT,
181 ICON_UGLY_GREEN_RING,
200 ICON_ROUNDBEVELTHING,
252 ICON_RIGHTARROW_THIN,
253 ICON_DISCLOSURE_TRI_RIGHT,
254 ICON_DISCLOSURE_TRI_DOWN,
323 ICON_RESTRICT_SELECT_OFF,
324 ICON_RESTRICT_SELECT_ON,
342 ICON_SEQ_LUMA_WAVEFORM,
343 ICON_SEQ_CHROMA_SCOPE,
346 ICON_ROTATECOLLECTION,
349 ICON_RESTRICT_VIEW_OFF,
350 ICON_RESTRICT_VIEW_ON,
351 ICON_RESTRICT_RENDER_OFF,
352 ICON_RESTRICT_RENDER_ON,
356 VICON_EDITMODE_DEHLT,
358 VICON_DISCLOSURE_TRI_RIGHT,
359 VICON_DISCLOSURE_TRI_DOWN,
364 #define BIFICONID_LAST (VICON_X)
365 #define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
369 #define BIFCOLORSHADE_FIRST (COLORSHADE_DARK)
376 #define BIFCOLORSHADE_LAST (COLORSHADE_WHITE)
377 #define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
381 #define BIFCOLORID_FIRST (BUTGREY)
422 VIEWPORTSELECTEDCOLOR,
430 #define BIFCOLORID_LAST (EDITEDGEUNSEL)
431 #define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
435 /* XXX WARNING: this is saved in file, so do not change order! */
437 TH_AUTO, /* for buttons, to signal automatic color assignment */
466 // common colors among spaces
529 /* XXX WARNING: previous is saved in file, so do not change order! */
531 /* theme drawtypes */
535 #define TH_OLDSKOOL 3
537 /* specific defines per space should have higher define values */
541 // THE CODERS API FOR THEMES:
544 void BIF_ThemeColor(int colorid);
546 // sets the color plus alpha
547 void BIF_ThemeColor4(int colorid);
549 // sets color plus offset for shade
550 void BIF_ThemeColorShade(int colorid, int offset);
552 // sets color plus offset for alpha
553 void BIF_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset);
555 // sets color, which is blend between two theme colors
556 void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac);
557 // same, with shade offset
558 void BIF_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset);
560 // returns one value, not scaled
561 float BIF_GetThemeValuef(int colorid);
562 int BIF_GetThemeValue(int colorid);
564 // get three color values, scaled to 0.0-1.0 range
565 void BIF_GetThemeColor3fv(int colorid, float *col);
567 // get the 3 or 4 byte values
568 void BIF_GetThemeColor3ubv(int colorid, char *col);
569 void BIF_GetThemeColor4ubv(int colorid, char *col);
571 // get a theme color from specified space type
572 void BIF_GetThemeColorType4ubv(int colorid, int spacetype, char *col);
574 // blends and shades between two color pointers
575 void BIF_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset);
577 // get a 3 byte color, blended and shaded between two other char color pointers
578 void BIF_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset);
583 // internal (blender) usage only, for init and set active
584 void BIF_InitTheme(void);
585 void BIF_SetTheme(struct ScrArea *sa);
586 void BIF_resources_init (void);
587 void BIF_resources_free (void);
588 void BIF_colors_init (void);
589 void BIF_load_ui_colors (void);
591 /* only for buttons in theme editor! */
592 char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
593 char *BIF_ThemeColorsPup(int spacetype);
596 void BIF_def_color (BIFColorID colorid, unsigned char r, unsigned char g, unsigned char b);
598 #endif /* BIF_ICONS_H */