summaryrefslogtreecommitdiff
path: root/src/Fl_get_system_colors.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-04-17 17:51:32 +0200
committerGitHub <noreply@github.com>2024-04-17 17:51:32 +0200
commitfd791a068e39e06785adc44693f4c533d3d6c903 (patch)
treeef7ff684b38f646165e80c142e454cd7ef077e2e /src/Fl_get_system_colors.cxx
parentb4cf1a9824f2c4ba9596044962d3af36e3ca3d99 (diff)
Separate FLUID user documentation, screen shot automation (#936)
* CMake integration, no autotiools * alignment panel is now correctly renamed to setting panel * source view is now correctly renamed to code view * Merge FLTK FLUID docs into FLUID user manual. * Add two simple entry tutorials * Remove FLUID chapter form FLTK docs. * GitHub action to generate HTML and PDF docs and make the available as artefacts
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
-rw-r--r--src/Fl_get_system_colors.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index e0a78fd86..ecc08a5e0 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -186,10 +186,11 @@ static Fl_Pixmap tile(tile_xpm);
\param[in] s Scheme name of NULL
- \returns Current scheme name or NULL
- \retval NULL if the scheme has not been set or is the default scheme
+ \retval 0 if the scheme has not been set or is the default scheme
+ \retval 1 if a scheme other than "none"/"base" was set
- \see Fl::is_scheme()
+ \see Fl::scheme() to get the name of the current scheme
+ \see Fl::is_scheme(const char*) to test if the specified scheme is set
*/
int Fl::scheme(const char *s) {
if (!s) {
@@ -197,12 +198,12 @@ int Fl::scheme(const char *s) {
}
if (s) {
- if (!fl_ascii_strcasecmp(s, "none") || !fl_ascii_strcasecmp(s, "base") || !*s) s = 0;
+ if (!fl_ascii_strcasecmp(s, "none") || !fl_ascii_strcasecmp(s, "base") || !*s) s = NULL;
else if (!fl_ascii_strcasecmp(s, "gtk+")) s = fl_strdup("gtk+");
else if (!fl_ascii_strcasecmp(s, "plastic")) s = fl_strdup("plastic");
else if (!fl_ascii_strcasecmp(s, "gleam")) s = fl_strdup("gleam");
else if (!fl_ascii_strcasecmp(s, "oxy")) s = fl_strdup("oxy");
- else s = 0;
+ else s = NULL;
}
if (scheme_) free((void*)scheme_);
scheme_ = s;
@@ -210,12 +211,13 @@ int Fl::scheme(const char *s) {
// Save the new scheme in the FLTK_SCHEME env var so that child processes
// inherit it...
static char e[1024];
- strcpy(e,"FLTK_SCHEME=");
- if (s) strlcat(e,s,sizeof(e));
+ strcpy(e, "FLTK_SCHEME=");
+ if (s) strlcat(e, s, sizeof(e));
Fl::system_driver()->putenv(e);
// Load the scheme...
- return reload_scheme();
+ reload_scheme();
+ return (s != NULL);
}
/**