File: settings.hpp

package info (click to toggle)
ares 126-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 32,600 kB
  • sloc: cpp: 356,508; ansic: 20,394; makefile: 16; sh: 2
file content (28 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace hiro {

struct Settings {
  Settings();
  ~Settings();

  //Windows 8+ draws windows with almost no visible borders
  //to allow resizing the window, the OS places transparent margins around each window
  //this causes AdjustFrameRect and SetWindowPos to hold values larger than the actual window
  //as a result, attempts to call Window::setAlignment(Window) fail to position windows correctly
  //pWindow::setVisible() attempts to compute the actual window bounds to correct Window::frameMargin()
  //note: different window styles have different extended frame bounds
  struct ExtendedFrameBounds {
    u32 x = 0;
    u32 y = 0;
    u32 width = 0;
    u32 height = 0;
  };

  //these are the default values for Windows 10 ... they will be updated later if they are incorrect
  ExtendedFrameBounds efbPopup    { 0, 0,  0,  0};
  ExtendedFrameBounds efbFixed    { 2, 0,  4,  2};
  ExtendedFrameBounds efbResizable{10, 0, 20, 10};
};

static Settings settings;

}