ladybird/Libraries/LibDraw/SystemTheme.h
Andreas Kling fd64e97c8a LibDraw+LibHTML: Make link colors themeable
Add "Link", "ActiveLink" and "VisitedLink" colors to the system theme
definition, and implement support for them in LibHTML.

Note that <body link="foo" alink="bar" vlink="baz"> takes precedence
over the system colors. Author style also takes precedence, since we
only fetch the system color in case the CSS color is -libhtml-link.
2020-01-13 20:33:15 +01:00

58 lines
1.1 KiB
C

#pragma once
#include <AK/SharedBuffer.h>
#include <AK/Types.h>
#include <LibDraw/Color.h>
enum class ColorRole {
NoRole,
DesktopBackground,
ActiveWindowBorder1,
ActiveWindowBorder2,
ActiveWindowTitle,
InactiveWindowBorder1,
InactiveWindowBorder2,
InactiveWindowTitle,
MovingWindowBorder1,
MovingWindowBorder2,
MovingWindowTitle,
HighlightWindowBorder1,
HighlightWindowBorder2,
HighlightWindowTitle,
MenuStripe,
MenuBase,
MenuBaseText,
MenuSelection,
MenuSelectionText,
Window,
WindowText,
Button,
ButtonText,
Base,
BaseText,
ThreedHighlight,
ThreedShadow1,
ThreedShadow2,
HoverHighlight,
Selection,
SelectionText,
RubberBandFill,
RubberBandBorder,
Link,
ActiveLink,
VisitedLink,
__Count,
Background = Window,
DisabledText = ThreedShadow1,
};
struct SystemTheme {
Color color[(int)ColorRole::__Count];
};
const SystemTheme& current_system_theme();
int current_system_theme_buffer_id();
void set_system_theme(SharedBuffer&);
RefPtr<SharedBuffer> load_system_theme(const String& path);