PageRenderTime 279ms CodeModel.GetById 116ms app.highlight 2ms RepoModel.GetById 160ms app.codeStats 0ms

/src/os/gtk/ftk_gtk.c

http://ftk.googlecode.com/
C | 34 lines | 23 code | 11 blank | 0 comment | 0 complexity | b2eecb14344d36a5c9198b3aea789b4a MD5 | raw file
 1
 2#include "ftk_typedef.h"
 3#include "ftk_display_gtk.h"
 4#include <gtk/gtk.h>
 5
 6extern int FTK_MAIN(int argc, char* argv[]);
 7
 8static pthread_t thread;
 9
10static void* thread_func(void* data)
11{
12	int argc = 1;
13	char* argv[] = { (char*)"ftk" };
14
15	FTK_MAIN(argc, argv);
16	gtk_main_quit();
17
18	return NULL;
19}
20
21int main(int argc, char* argv[])
22{
23	GtkWidget* window = NULL;
24
25	gtk_init(&argc, &argv);
26
27	window = (GtkWidget*)ftk_display_gtk_create_win();
28
29	pthread_create(&thread, NULL, thread_func, NULL);
30	gtk_main();
31	pthread_join(thread, NULL);
32
33	return 0;
34}