diff options
author | Ton Roosendaal <ton@blender.org> | 2003-10-19 13:19:58 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-10-19 13:19:58 +0400 |
commit | c6a2f42dba65e82e32eadf0a8867a4bcd3e8b08f (patch) | |
tree | a68427c9ef08ba6c97b48db296ec6a1515912530 /source/blender/include/BIF_resources.h | |
parent | c19d84f89e442a283ea3dcd4d80fb113b52d10bd (diff) |
- simplified Theme API. No need to include 'current active area' anymore.
like: BIF_ThemeColor(TH_GRID); will be sufficient. Blender does the rest.
- fixed bug in CTRL-X (reload home file) with themes
- fixed bug in horizontal alignment of different height panels. Seems also
to solve the drawing error with constraints...
Diffstat (limited to 'source/blender/include/BIF_resources.h')
-rw-r--r-- | source/blender/include/BIF_resources.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h index ac8a4faf210..f329dffea17 100644 --- a/source/blender/include/BIF_resources.h +++ b/source/blender/include/BIF_resources.h @@ -362,24 +362,39 @@ enum { struct bTheme; -void BIF_InitThemeColors(void); -void BIF_ThemeColor(struct ScrArea *sa, int colorid); -void BIF_ThemeColor4(struct ScrArea *sa, int colorid); -void BIF_ThemeColorShade(struct ScrArea *sa, int colorid, int offset); -void BIF_ThemeColorBlend(struct ScrArea *sa, int colorid1, int colorid2, float fac); - -// get only one value, not scaled -float BIF_GetThemeColorf(struct ScrArea *sa, int colorid); +// 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, which is blend between two theme colors +void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac); + +// returns one value, not scaled +float BIF_GetThemeColorf(int colorid); + // get three color values, scaled to 0.0-1.0 range -void BIF_GetThemeColor3fv(struct ScrArea *sa, int colorid, float *col); -// get the byte values -void BIF_GetThemeColor3ubv(struct ScrArea *sa, int colorid, char *col); -void BIF_GetThemeColor4ubv(struct ScrArea *sa, int colorid, char *col); +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); + +// 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); +// icon API int BIF_get_icon_width (BIFIconID icon); int BIF_get_icon_height (BIFIconID icon); void BIF_draw_icon (BIFIconID icon); |