2020-01-18 08:38:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
|
|
* list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2019-12-23 19:24:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-01-01 17:53:34 +00:00
|
|
|
#include <AK/SharedBuffer.h>
|
2019-12-23 19:24:26 +00:00
|
|
|
#include <AK/Types.h>
|
2020-02-06 11:04:00 +00:00
|
|
|
#include <LibGfx/Color.h>
|
2019-12-23 19:24:26 +00:00
|
|
|
|
2020-02-06 10:56:38 +00:00
|
|
|
namespace Gfx {
|
|
|
|
|
2019-12-24 19:57:54 +00:00
|
|
|
enum class ColorRole {
|
|
|
|
NoRole,
|
|
|
|
DesktopBackground,
|
|
|
|
ActiveWindowBorder1,
|
|
|
|
ActiveWindowBorder2,
|
|
|
|
ActiveWindowTitle,
|
|
|
|
InactiveWindowBorder1,
|
|
|
|
InactiveWindowBorder2,
|
|
|
|
InactiveWindowTitle,
|
|
|
|
MovingWindowBorder1,
|
|
|
|
MovingWindowBorder2,
|
|
|
|
MovingWindowTitle,
|
|
|
|
HighlightWindowBorder1,
|
|
|
|
HighlightWindowBorder2,
|
|
|
|
HighlightWindowTitle,
|
|
|
|
MenuStripe,
|
|
|
|
MenuBase,
|
2019-12-25 23:58:46 +00:00
|
|
|
MenuBaseText,
|
2019-12-24 19:57:54 +00:00
|
|
|
MenuSelection,
|
2019-12-25 23:58:46 +00:00
|
|
|
MenuSelectionText,
|
2019-12-24 19:57:54 +00:00
|
|
|
Window,
|
|
|
|
WindowText,
|
|
|
|
Button,
|
|
|
|
ButtonText,
|
|
|
|
Base,
|
2019-12-24 21:01:32 +00:00
|
|
|
BaseText,
|
2019-12-24 19:57:54 +00:00
|
|
|
ThreedHighlight,
|
|
|
|
ThreedShadow1,
|
|
|
|
ThreedShadow2,
|
|
|
|
HoverHighlight,
|
|
|
|
Selection,
|
|
|
|
SelectionText,
|
2020-01-05 23:47:55 +00:00
|
|
|
RubberBandFill,
|
|
|
|
RubberBandBorder,
|
2020-01-13 19:33:15 +00:00
|
|
|
Link,
|
|
|
|
ActiveLink,
|
|
|
|
VisitedLink,
|
2019-12-24 19:57:54 +00:00
|
|
|
|
|
|
|
__Count,
|
|
|
|
|
2019-12-28 23:47:49 +00:00
|
|
|
Background = Window,
|
2019-12-24 19:57:54 +00:00
|
|
|
DisabledText = ThreedShadow1,
|
|
|
|
};
|
2019-12-24 11:13:10 +00:00
|
|
|
|
2019-12-24 19:57:54 +00:00
|
|
|
struct SystemTheme {
|
|
|
|
Color color[(int)ColorRole::__Count];
|
2019-12-23 19:24:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const SystemTheme& current_system_theme();
|
|
|
|
int current_system_theme_buffer_id();
|
|
|
|
void set_system_theme(SharedBuffer&);
|
|
|
|
RefPtr<SharedBuffer> load_system_theme(const String& path);
|
2020-02-06 10:56:38 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
using Gfx::ColorRole;
|