@@ -79,13 +79,15 @@ application_glue::application_glue(const utki::version_duplet& gl_version) :
7979 )
8080{}
8181
82- void application_glue::render () {
82+ void application_glue::render ()
83+ {
8384 for (auto & w : this ->windows ) {
8485 w.second .get ().render ();
8586 }
8687}
8788
88- app_window* application_glue::get_window (native_window::window_id_type id) {
89+ app_window* application_glue::get_window (native_window::window_id_type id)
90+ {
8991 auto i = this ->windows .find (id);
9092 if (i == this ->windows .end ()) {
9193 return nullptr ;
@@ -94,7 +96,8 @@ app_window* application_glue::get_window(native_window::window_id_type id) {
9496 return &i->second .get ();
9597}
9698
97- ruisapp::window& application_glue::make_window (ruisapp::window_parameters window_params) {
99+ ruisapp::window& application_glue::make_window (ruisapp::window_parameters window_params)
100+ {
98101 auto ruis_native_window = utki::make_shared<native_window>(
99102 this ->display ,
100103 this ->gl_version ,
@@ -106,17 +109,15 @@ ruisapp::window& application_glue::make_window(ruisapp::window_parameters window
106109 .post_to_ui_thread_function =
107110 [this ](std::function<void ()> procedure) {
108111 if (PostMessage (
109- NULL , // post message to UI thread's message queue
110- WM_USER,
111- 0 , // no wParam
112- // NOLINTNEXTLINE(cppcoreguidelines-owning-memory, cppcoreguidelines-pro-type-reinterpret-cast)
113- reinterpret_cast <LPARAM>(
114- new std::remove_reference_t <decltype (procedure)>(std::move (procedure))
115- )
116- ) == 0 )
117- {
118- throw std::runtime_error (" PostMessage(): failed" );
119- }
112+ NULL , // post message to UI thread's message queue
113+ WM_USER,
114+ 0 , // no wParam
115+ // NOLINTNEXTLINE(cppcoreguidelines-owning-memory, cppcoreguidelines-pro-type-reinterpret-cast)
116+ reinterpret_cast <LPARAM>(new std::remove_reference_t <decltype (procedure)>(std::move (procedure)))
117+ ) == 0 )
118+ {
119+ throw std::runtime_error (" PostMessage(): failed" );
120+ }
120121 },
121122 .updater = this ->updater ,
122123 .renderer = utki::make_shared<ruis::render::renderer>(
@@ -132,9 +133,9 @@ ruisapp::window& application_glue::make_window(ruisapp::window_parameters window
132133 ),
133134 .style_provider = this ->ruis_style_provider ,
134135 .units = ruis::units (
135- ruis_native_window.get ().get_dots_per_inch (), //
136- ruis_native_window.get ().get_dots_per_pp ()
137- )
136+ ruis_native_window.get ().get_dots_per_inch (), //
137+ ruis_native_window.get ().get_dots_per_pp ()
138+ )
138139 });
139140
140141 auto ruisapp_window = utki::make_shared<app_window>(
@@ -162,7 +163,8 @@ ruisapp::window& application_glue::make_window(ruisapp::window_parameters window
162163 return res.first ->second .get ();
163164}
164165
165- void application_glue::destroy_window (native_window::window_id_type id){
166+ void application_glue::destroy_window (native_window::window_id_type id)
167+ {
166168 auto i = this ->windows .find (id);
167169 utki::assert (i != this ->windows .end (), SL);
168170
@@ -178,20 +180,22 @@ ruisapp::application::application(parameters params) :
178180 )
179181{}
180182
181- void ruisapp::application::quit () noexcept {
183+ void ruisapp::application::quit () noexcept
184+ {
182185 auto & glue = get_glue (*this );
183186
184- PostQuitMessage (
185- 0 // exit code
187+ PostQuitMessage (0 // exit code
186188 );
187189}
188190
189- ruisapp::window& ruisapp::application::make_window (ruisapp::window_parameters window_params) {
191+ ruisapp::window& ruisapp::application::make_window (ruisapp::window_parameters window_params)
192+ {
190193 auto & glue = get_glue (*this );
191194 return glue.make_window (std::move (window_params));
192195}
193196
194- void ruisapp::application::destroy_window (ruisapp::window& w) {
197+ void ruisapp::application::destroy_window (ruisapp::window& w)
198+ {
195199 auto & glue = get_glue (*this );
196200
197201 utki::assert (dynamic_cast <app_window*>(&w), SL);
0 commit comments