Mercurial > hg > svcore
comparison system/System.cpp @ 1820:fc18ce2d99d7 background-mode
Add OSQueryAccentColour
author | Chris Cannam |
---|---|
date | Thu, 23 Jan 2020 15:43:30 +0000 |
parents | 4eda6ba5b5d8 |
children | 472865574b1a |
comparison
equal
deleted
inserted
replaced
1819:4eda6ba5b5d8 | 1820:fc18ce2d99d7 |
---|---|
351 } | 351 } |
352 #endif | 352 #endif |
353 return false; | 353 return false; |
354 } | 354 } |
355 | 355 |
356 bool | |
357 OSQueryAccentColour(int &r, int &g, int &b) | |
358 { | |
359 SVCERR << "OSQueryAccentColour() called" << endl; | |
360 #ifdef _MSC_VER | |
361 using namespace winrt::Windows::UI::ViewManagement; | |
362 UISettings settings; | |
363 auto background = settings.GetColorValue(UIColorType::Accent); | |
364 r = background.R; | |
365 g = background.G; | |
366 b = background.B; | |
367 return true; | |
368 #endif | |
369 return false; | |
370 } | |
371 | |
356 double mod(double x, double y) { return x - (y * floor(x / y)); } | 372 double mod(double x, double y) { return x - (y * floor(x / y)); } |
357 float modf(float x, float y) { return x - (y * floorf(x / y)); } | 373 float modf(float x, float y) { return x - (y * floorf(x / y)); } |
358 | 374 |
359 double princarg(double a) { return mod(a + M_PI, -2 * M_PI) + M_PI; } | 375 double princarg(double a) { return mod(a + M_PI, -2 * M_PI) + M_PI; } |
360 float princargf(float a) { return float(princarg(a)); } | 376 float princargf(float a) { return float(princarg(a)); } |