34 #include "toolkit.h" |
34 #include "toolkit.h" |
35 #include "toolbar.h" |
35 #include "toolbar.h" |
36 #include "stock.h" |
36 #include "stock.h" |
37 #include "../common/document.h" |
37 #include "../common/document.h" |
38 #include "../common/properties.h" |
38 #include "../common/properties.h" |
39 #include <ucx/buffer.h> |
39 #include <cx/buffer.h> |
40 |
40 |
41 static XtAppContext app; |
41 static XtAppContext app; |
42 static Display *display; |
42 static Display *display; |
43 static Widget active_window; |
43 static Widget active_window; |
44 static char *application_name; |
44 static char *application_name; |
204 printf("XtAppAddWorkProc\n"); |
204 printf("XtAppAddWorkProc\n"); |
205 write(event_pipe[1], &job, sizeof(void*)); // hack |
205 write(event_pipe[1], &job, sizeof(void*)); // hack |
206 XtAppAddWorkProc(app, ui_job_finished, job); |
206 XtAppAddWorkProc(app, ui_job_finished, job); |
207 |
207 |
208 } |
208 } |
|
209 return NULL; |
209 } |
210 } |
210 |
211 |
211 void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd) { |
212 void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd) { |
212 UiJob *job = malloc(sizeof(UiJob)); |
213 UiJob *job = malloc(sizeof(UiJob)); |
213 job->obj = obj; |
214 job->obj = obj; |