typeof GD_DEFAULT_TRANSPARENCYCOLOR = I ;; typeof GD_WINDOWS_TITLE_COLOR1 = I ;; typeof GD_DEFAULT_TEXT_COLOR = I ;; typeof GD_DEFAULT_TEXT_HIGHLIGHT_COLOR = I ;; typeof GD_DEFAULT_TITLE_TEXT_COLOR = I ;; typeof GD_DEFAULT_TITLE_TEXT_HIGHLIGHT_COLOR = I ;; typeof GD_COMPTREE_HIGHLIGHT_COLOR = I;; typeof GD_COMPTREE_TEXT_COLOR = I;; typeof GD_COMPTREE_HIGHLIGHT_TRANSPARENCY = I;; typeof GD_COMPLIST_HIGHLIGHT_COLOR = I;; typeof GD_COMPLIST_TEXT_COLOR = I;; typeof GD_COMPLIST_HIGHLIGHT_TRANSPARENCY = I;; typeof GD_COMBO_HIGHLIGHT_COLOR = I ;; typeof GD_COMBO_TEXT_COLOR = I ;; typeof GD_TOOLTIP_TEXT_COLOR = I ;; typeof GD_DEFAULT_TEXT_BUTTON_COLOR = I ;; struct THEME = [ THEMEname : S, THEMEdir : S, THEMEtext : [[S r1] r1] ] mkTHEME;; typeof THEME_themes = [THEME r1];; /* skip blank lines */ fun skipBlankLines (l)= if l==nil then nil else if (hd l) == nil then skipBlankLines tl l else l;; fun THEME_loadtheme (pack)= if pack==nil then nil else let skipBlankLines strextr _getpack pack -> l in if !strcmp hd hd l "$theme001$" then let mkTHEME [(nth_list hd l 1) (nth_list hd l 2) tl l] -> t in { set THEME_themes = t::THEME_themes; t /* return THEME struct */ } else nil;; fun THEME_byName (t, s)= !strcmp t.THEMEname s;; fun THEME_unloadthemeByName (themeName)= set THEME_themes = removef_from_list THEME_themes @THEME_byName themeName; 0;; fun THEME_getParamsByName (themeName, itemName)= let search_in_list THEME_themes @THEME_byName themeName -> t in if t==nil then nil else let switchstr t.THEMEtext itemName -> l1 in [ strcat t.THEMEdir nth_list l1 0 atoi nth_list l1 1 atoi nth_list l1 2 atoi nth_list l1 3 atoi nth_list l1 4 atoi nth_list l1 5 atoi nth_list l1 6 atoi nth_list l1 7 atoi nth_list l1 8 ];; fun THEME_getParamsByTheme (theme, itemName)= if theme==nil then nil else let switchstr theme.THEMEtext itemName -> l1 in [ strcat theme.THEMEdir nth_list l1 0 atoi nth_list l1 1 atoi nth_list l1 2 atoi nth_list l1 3 atoi nth_list l1 4 atoi nth_list l1 5 atoi nth_list l1 6 atoi nth_list l1 7 atoi nth_list l1 8 ];; fun THEME_getInfos(theme,info)= if theme==nil then nil else switchstr theme.THEMEtext info;; fun THEME_GetDirectory(theme) = { theme.THEMEdir ; } ;;