1*c76f0793SBaptiste Daroussin /*- 2*c76f0793SBaptiste Daroussin * SPDX-License-Identifier: BSD-2-Clause 3*c76f0793SBaptiste Daroussin * 4*c76f0793SBaptiste Daroussin * Copyright (c) 2021 Alfonso Sabato Siciliano 5*c76f0793SBaptiste Daroussin * 6*c76f0793SBaptiste Daroussin * Redistribution and use in source and binary forms, with or without 7*c76f0793SBaptiste Daroussin * modification, are permitted provided that the following conditions 8*c76f0793SBaptiste Daroussin * are met: 9*c76f0793SBaptiste Daroussin * 1. Redistributions of source code must retain the above copyright 10*c76f0793SBaptiste Daroussin * notice, this list of conditions and the following disclaimer. 11*c76f0793SBaptiste Daroussin * 2. Redistributions in binary form must reproduce the above copyright 12*c76f0793SBaptiste Daroussin * notice, this list of conditions and the following disclaimer in the 13*c76f0793SBaptiste Daroussin * documentation and/or other materials provided with the distribution. 14*c76f0793SBaptiste Daroussin * 15*c76f0793SBaptiste Daroussin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*c76f0793SBaptiste Daroussin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*c76f0793SBaptiste Daroussin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*c76f0793SBaptiste Daroussin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*c76f0793SBaptiste Daroussin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*c76f0793SBaptiste Daroussin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*c76f0793SBaptiste Daroussin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*c76f0793SBaptiste Daroussin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*c76f0793SBaptiste Daroussin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*c76f0793SBaptiste Daroussin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*c76f0793SBaptiste Daroussin * SUCH DAMAGE. 26*c76f0793SBaptiste Daroussin */ 27*c76f0793SBaptiste Daroussin 28*c76f0793SBaptiste Daroussin #ifndef _LIBBSDDIALOG_THEME_H_ 29*c76f0793SBaptiste Daroussin #define _LIBBSDDIALOG_THEME_H_ 30*c76f0793SBaptiste Daroussin 31*c76f0793SBaptiste Daroussin enum bsddialog_color { 32*c76f0793SBaptiste Daroussin BSDDIALOG_BLACK = 0, 33*c76f0793SBaptiste Daroussin BSDDIALOG_RED, 34*c76f0793SBaptiste Daroussin BSDDIALOG_GREEN, 35*c76f0793SBaptiste Daroussin BSDDIALOG_YELLOW, 36*c76f0793SBaptiste Daroussin BSDDIALOG_BLUE, 37*c76f0793SBaptiste Daroussin BSDDIALOG_MAGENTA, 38*c76f0793SBaptiste Daroussin BSDDIALOG_CYAN, 39*c76f0793SBaptiste Daroussin BSDDIALOG_WHITE, 40*c76f0793SBaptiste Daroussin }; 41*c76f0793SBaptiste Daroussin 42*c76f0793SBaptiste Daroussin struct bsddialog_theme { 43*c76f0793SBaptiste Daroussin int shadowcolor; 44*c76f0793SBaptiste Daroussin unsigned int shadowrows; 45*c76f0793SBaptiste Daroussin unsigned int shadowcols; 46*c76f0793SBaptiste Daroussin 47*c76f0793SBaptiste Daroussin int backgroundcolor; 48*c76f0793SBaptiste Daroussin bool surroundtitle; 49*c76f0793SBaptiste Daroussin int titlecolor; 50*c76f0793SBaptiste Daroussin int lineraisecolor; 51*c76f0793SBaptiste Daroussin int linelowercolor; 52*c76f0793SBaptiste Daroussin int widgetcolor; 53*c76f0793SBaptiste Daroussin 54*c76f0793SBaptiste Daroussin unsigned int texthmargin; 55*c76f0793SBaptiste Daroussin 56*c76f0793SBaptiste Daroussin int curritemcolor; 57*c76f0793SBaptiste Daroussin int itemcolor; 58*c76f0793SBaptiste Daroussin int currtagcolor; 59*c76f0793SBaptiste Daroussin int tagcolor; 60*c76f0793SBaptiste Daroussin int namesepcolor; 61*c76f0793SBaptiste Daroussin int descsepcolor; 62*c76f0793SBaptiste Daroussin 63*c76f0793SBaptiste Daroussin int currfieldcolor; 64*c76f0793SBaptiste Daroussin int fieldcolor; 65*c76f0793SBaptiste Daroussin int fieldreadonlycolor; 66*c76f0793SBaptiste Daroussin 67*c76f0793SBaptiste Daroussin int currbarcolor; 68*c76f0793SBaptiste Daroussin int barcolor; 69*c76f0793SBaptiste Daroussin 70*c76f0793SBaptiste Daroussin unsigned int buttonspace; 71*c76f0793SBaptiste Daroussin int buttleftch; 72*c76f0793SBaptiste Daroussin int buttrightchar; 73*c76f0793SBaptiste Daroussin int currbuttdelimcolor; 74*c76f0793SBaptiste Daroussin int buttdelimcolor; 75*c76f0793SBaptiste Daroussin int currbuttoncolor; 76*c76f0793SBaptiste Daroussin int buttoncolor; 77*c76f0793SBaptiste Daroussin int currshortkeycolor; 78*c76f0793SBaptiste Daroussin int shortkeycolor; 79*c76f0793SBaptiste Daroussin 80*c76f0793SBaptiste Daroussin int bottomtitlecolor; 81*c76f0793SBaptiste Daroussin }; 82*c76f0793SBaptiste Daroussin 83*c76f0793SBaptiste Daroussin enum bsddialog_default_theme { 84*c76f0793SBaptiste Daroussin BSDDIALOG_THEME_BLACKWHITE, 85*c76f0793SBaptiste Daroussin BSDDIALOG_THEME_BSDDIALOG, 86*c76f0793SBaptiste Daroussin BSDDIALOG_THEME_DEFAULT, 87*c76f0793SBaptiste Daroussin BSDDIALOG_THEME_DIALOG, 88*c76f0793SBaptiste Daroussin BSDDIALOG_THEME_MAGENTA, 89*c76f0793SBaptiste Daroussin }; 90*c76f0793SBaptiste Daroussin 91*c76f0793SBaptiste Daroussin int bsddialog_color(enum bsddialog_color background, enum bsddialog_color foreground); 92*c76f0793SBaptiste Daroussin struct bsddialog_theme bsddialog_get_theme(); 93*c76f0793SBaptiste Daroussin void bsddialog_set_theme(struct bsddialog_theme theme); 94*c76f0793SBaptiste Daroussin int bsddialog_set_default_theme(enum bsddialog_default_theme theme); 95*c76f0793SBaptiste Daroussin 96*c76f0793SBaptiste Daroussin #endif 97