ui/winui/toolkit.cpp

changeset 76
641dcc79e0ef
parent 5
83263002816f
child 77
5de33c2d94c6
equal deleted inserted replaced
75:73c8a3780c72 76:641dcc79e0ef
233 // TODO 233 // TODO
234 } 234 }
235 } 235 }
236 236
237 void ui_close(UiObject* obj) { 237 void ui_close(UiObject* obj) {
238 238 if (obj->wobj) {
239 } 239 obj->wobj->window.Close();
240 240 }
241 static void ui_job_finished(UiJob *job) {
242 UiEvent event;
243 event.obj = job->obj;
244 event.window = job->obj->window;
245 event.document = job->obj->ctx->document;
246 event.intval = 0;
247 event.eventdata = NULL;
248 job->finish_callback(&event, job->finish_data);
249 } 241 }
250 242
251 static void ui_job_thread(UiJob* job) { 243 static void ui_job_thread(UiJob* job) {
252 if (!job->job_func(job->job_data) && job->finish_callback) { 244 if (!job->job_func(job->job_data) && job->finish_callback) {
253 bool isQueued = uiDispatcherQueue.TryEnqueue([job]() 245 bool isQueued = uiDispatcherQueue.TryEnqueue([job]()

mercurial