The revised patch from Leon for new particle effects.
[blender.git] / source / blender / include / BIF_resources.h
index 01f04f0f35e65fafb3008e5a504570bd46e935ae..6bce7e4e3f171381f71a70fc1695f6d44bbc4ed4 100644 (file)
@@ -26,7 +26,7 @@
  * The Original Code is: all of this file.
  *
  * Contributor(s): none yet.
- *
+ * 
  * ***** END GPL/BL DUAL LICENSE BLOCK *****
  */
 
@@ -60,7 +60,7 @@ typedef enum {
        ICON_ORTHO,
        ICON_PERSP,
        ICON_CAMERA,
-       ICON_BLANK1,
+       ICON_EFFECTS,
        ICON_BBOX,
        ICON_WIRE,
        ICON_SOLID,
@@ -89,7 +89,7 @@ typedef enum {
        ICON_POSE_HLT,
        ICON_BORDERMOVE,
        ICON_MAYBE_ITS_A_LASSO,
-       ICON_BLANK6,
+       ICON_BLANK1,
        ICON_ROTATE,
        ICON_CURSOR,
        ICON_ROTATECOLLECTION,
@@ -101,15 +101,17 @@ typedef enum {
        ICON_BLANK11,
        ICON_BLANK12,
        
+
+
        ICON_DOTSUP,
        ICON_DOTSDOWN,
        ICON_MENU_PANEL,
        ICON_AXIS_SIDE,
        ICON_AXIS_FRONT,
        ICON_AXIS_TOP,
-       ICON_BLANK14,
-       ICON_BLANK15,
-       ICON_BLANK16,
+       ICON_DRAW_UVFACES,
+       ICON_STICKY_UVS,
+       ICON_STICKY2_UVS,
        ICON_BLANK17,
        ICON_BLANK18,
        ICON_ENVMAP,
@@ -231,7 +233,7 @@ typedef enum {
        ICON_IMAGE_DEHLT,
        ICON_WINDOW_FULLSCREEN,
        ICON_WINDOW_WINDOW,
-       ICON_BLANK31,
+       ICON_PANEL_CLOSE,
        
        ICON_BLENDER,
        ICON_PACKAGE,
@@ -259,23 +261,20 @@ typedef enum {
 } BIFIconID;
 
 typedef enum {
-#define BIFCOLORSHADE_FIRST    (COLORSHADE_DARK)
-       COLORSHADE_DARK,
-       COLORSHADE_GREY,
-       COLORSHADE_LGREY,
-       COLORSHADE_LMEDIUM,
-       COLORSHADE_MEDIUM,
-       COLORSHADE_HILITE,
-       COLORSHADE_LIGHT,
-       COLORSHADE_WHITE,
-       
-#define BIFCOLORSHADE_LAST     (COLORSHADE_WHITE)
-#define BIFNCOLORSHADES                (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
+#define BIFCOLORSHADE_FIRST     (COLORSHADE_DARK)
+        COLORSHADE_DARK,
+        COLORSHADE_GREY,
+        COLORSHADE_MEDIUM,
+        COLORSHADE_HILITE,
+        COLORSHADE_LIGHT,
+        COLORSHADE_WHITE,
+#define BIFCOLORSHADE_LAST      (COLORSHADE_WHITE)
+#define BIFNCOLORSHADES         (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
 } BIFColorShade;
 
 typedef enum {
 #define BIFCOLORID_FIRST       (BUTGREY)
-       BUTGREY,
+       BUTGREY = 0,
        BUTGREEN,
        BUTBLUE,
        BUTSALMON,
@@ -290,15 +289,6 @@ typedef enum {
        BUTDPINK,
        BUTMACTIVE,
 
-       ACTIONBUTCOL,
-       NUMBUTCOL,
-       TEXBUTCOL,
-       TOGBUTCOL,
-       SLIDERCOL,
-       TABCOL,
-       MENUCOL,
-       MENUACTIVECOL,
-
        BUTIPO,
        BUTAUDIO,
        BUTCAMERA,
@@ -315,23 +305,137 @@ typedef enum {
        BUTYUCK,
        BUTSEASICK,
        BUTCHOKE,
+       BUTIMPERIAL,
+
+       BUTTEXTCOLOR,
+       BUTTEXTPRESSED,
+       BUTSBACKGROUND,
        
-       HEADERCOL,
-       HEADERCOLSEL,
+       VIEWPORTBACKCOLOR,
+       VIEWPORTGRIDCOLOR,
+       VIEWPORTACTIVECOLOR,
+       VIEWPORTSELECTEDCOLOR,
+       VIEWPORTUNSELCOLOR,
        
-       BUTIMPERIAL,
-#define BIFCOLORID_LAST                (BUTIMPERIAL)
+       EDITVERTSEL, 
+       EDITVERTUNSEL, 
+       EDITEDGESEL, 
+       EDITEDGEUNSEL,
+       
+#define BIFCOLORID_LAST                (EDITEDGEUNSEL)
 #define BIFNCOLORIDS           (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
+
 } BIFColorID;
 
+enum {
+       TH_AUTO,        /* for buttons, to signal automatic color assignment */
+       
+// uibutton colors
+       TH_BUT_OUTLINE,
+       TH_BUT_NEUTRAL,
+       TH_BUT_ACTION,
+       TH_BUT_SETTING,
+       TH_BUT_SETTING1,
+       TH_BUT_SETTING2,
+       TH_BUT_NUM,
+       TH_BUT_TEXTFIELD,
+       TH_BUT_POPUP,
+       TH_BUT_TEXT,
+       TH_BUT_TEXT_HI,
+       TH_MENU_BACK,
+       TH_MENU_ITEM,
+       TH_MENU_HILITE,
+       TH_MENU_TEXT,
+       TH_MENU_TEXT_HI,
+       
+       TH_BUT_DRAWTYPE,
+       
+       TH_REDALERT,
+       TH_CUSTOM,
+       
+       TH_THEMEUI,
+// common colors among spaces
+       
+       TH_BACK,
+       TH_TEXT,
+       TH_TEXT_HI,
+       TH_HEADER,
+       TH_HEADERDESEL,
+       TH_PANEL,
+       TH_SHADE1,
+       TH_SHADE2,
+       TH_HILITE,
+
+       TH_GRID,
+       TH_WIRE,
+       TH_SELECT,
+       TH_ACTIVE,
+       TH_TRANSFORM,
+       TH_VERTEX,
+       TH_VERTEX_SELECT,
+       TH_VERTEX_SIZE,
+       TH_EDGE,
+       TH_EDGE_SELECT,
+       TH_FACE,
+       TH_FACE_SELECT
+};
+
+/* specific defines per space should have higher define values */
+
+struct bTheme;
+
+// THE CODERS API FOR THEMES:
+
+// sets the color
+void   BIF_ThemeColor(int colorid);
+
+// sets the color plus alpha
+void   BIF_ThemeColor4(int colorid);
+
+// sets color plus offset for shade
+void   BIF_ThemeColorShade(int colorid, int offset);
+
+// sets color plus offset for alpha
+void           BIF_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset);
+
+// sets color, which is blend between two theme colors
+void   BIF_ThemeColorBlend(int colorid1, int colorid2, float fac);
+// same, with shade offset
+void    BIF_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset);
+
+// returns one value, not scaled
+float  BIF_GetThemeValuef(int colorid);
+int    BIF_GetThemeValue(int colorid);
+
+// get three color values, scaled to 0.0-1.0 range
+void   BIF_GetThemeColor3fv(int colorid, float *col);
+
+// get the 3 or 4 byte values
+void   BIF_GetThemeColor3ubv(int colorid, char *col);
+void   BIF_GetThemeColor4ubv(int colorid, char *col);
+
+struct ScrArea;
+
+// internal (blender) usage only, for init and set active
+void   BIF_InitTheme(void);
+void   BIF_SetTheme(struct ScrArea *sa);
 void   BIF_resources_init              (void);
 void   BIF_resources_free              (void);
+void   BIF_colors_init                 (void);
+void   BIF_load_ui_colors              (void);
+
 
+// icon API
 int            BIF_get_icon_width              (BIFIconID icon);
 int            BIF_get_icon_height             (BIFIconID icon);
 void   BIF_draw_icon                   (BIFIconID icon);
-void   BIF_draw_icon_blended   (BIFIconID icon, BIFColorID color, BIFColorShade shade);
+void   BIF_draw_icon_blended   (BIFIconID icon, int colorid, int shade);
+
+/* only for buttons in theme editor! */
+char   *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
+char   *BIF_ThemeColorsPup(int spacetype);
+
 
-void   BIF_set_color                   (BIFColorID color, BIFColorShade shade);
+void   BIF_def_color                   (BIFColorID colorid, unsigned char r, unsigned char g, unsigned char b);
 
 #endif /*  BIF_ICONS_H */