ui/winui/toolkit.cpp

branch
newapi
changeset 373
2eede3d98aba
parent 235
9c79f00fbf36
equal deleted inserted replaced
372:4657ec1229f2 373:2eede3d98aba
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