Debian Codegraph @

addons/native_dialog/gtk_dialog.h

raw
1 #ifndef __al_included_gtk_dialog_h
2 #define __al_included_gtk_dialog_h
3
4 #include "allegro5/allegro.h"
5 #include "allegro5/allegro_native_dialog.h"
6 #include "allegro5/internal/aintern_native_dialog.h"
7
8 #define ACK_OK ((void *)0x1111)
9 #define ACK_ERROR ((void *)0x2222)
10 #define ACK_OPENED ((void *)0x3333)
11 #define ACK_CLOSED ((void *)0x4444)
12
13 void _al_gtk_make_transient(ALLEGRO_DISPLAY *display, GtkWidget *window);
14
15
16 bool _al_gtk_ensure_thread(void);
17
18
19 /* The API is assumed to be synchronous, but the user calls will not be
20 * on the GTK thread. The following structure is used to pass data from the
21 * user thread to the GTK thread, and then wait until the GTK has processed it.
22 */
23 typedef struct ARGS_BASE ARGS_BASE;
24
25 struct ARGS_BASE
26 {
27 ALLEGRO_MUTEX *mutex;
28 ALLEGRO_COND *cond;
29 bool done;
30 bool response;
31 };
32
33
34 bool _al_gtk_init_args(void *ptr, size_t size);
35 bool _al_gtk_wait_for_args(GSourceFunc func, void *data);
36 void *_al_gtk_lock_args(gpointer data);
37 gboolean _al_gtk_release_args(gpointer data);
38
39 #endif