LoadLibraryExW is available, but not SetThreadErrorMode.
DLL dependencies/errors need to be managed by the host app.
This is a sandboxed environment where the library dependencies
need to be managed manually per platform.
System themes are temporary disabled
Theses Contexts defines what palette they use (the standard one of the dark one
in the player), what color set they should use (is it a button, a slider,
etc..), and the state of the widget (hovered, focused, pressed, disabled). The
context defines some color properties that may be usable in the current widgets
(different colors for foregrounds, backgrounds, and decorations)
* For each color, we build a key representing the color, the key is build from
the color set (button, window, view, tabbutton, etc..), the section
(background/foreground), the name (primary/secondary/...) and the state
(normal, hovered, focused, pressed, disabled).
* all colors are stored in a map associating the color key to its value
* When a color is required for a particular context, we look in the table for
the key. There is a fallback mechanism, if the key doesn't exists for a given
state, we try to rebuild the key for the `Normal` state. then if the key
doesn't exist for this component we rebuild the key for the `View` component
(first with the actual state then with the `Normal` State). if every thing
fails we return a crappy color (magenta) to visually indicate that something
needs to be fixed.
* On the QML Side, we instantiate a ColorContext object for each component we
want to theme, and we extract colors from it. there are 3 main sets of colors:
* `fg` for foreground colors, the sub colors are `primary` (the main color),
`secondary` (for component that requires a second color), `hightlight` (for
selection), `link` (for links), positive/neutral/
* `bg` expose the same set of color but for background
* decoration colors. theses are directly accessible in the `ColorContext`
object. `border`, `separator`, `accent`, `shadow` and `visualFocus`
ColorContext have a palette property that defines which palette should be use
(dark palette for the player or default palette), a `colorset` to define what
is the current color set (Button/View/Item/Slider/etc...) and some state
(enabled, focused, hovered, pressed)
When a color change due to either a state change or a palette change, the
color property change is signaled and the color will be changed through
property bindings
When compiling with the GDK the POSIX variants are defined but not available
for linking. We can just the Windows variants that are always available.
Do the proper redirection in our custom unistd.h used with the Platform SDK.
_stricmp a Windows thing that is present in all the CRT, even in UCRT.
The stricmp() deprecated variant doesn't seem to exist elsewhere.
In some configuration it's not possible to link with stricmp() even though
_stricmp() is available.
These functions are not available when linking, so we should avoid using them.
Also mingw-w64 understands _CRT_NONSTDC_NO_DEPRECATE but not
_CRT_NONSTDC_NO_WARNINGS.