Initialize
[sdk/emulator/qemu.git] / tizen / src / emulator.h
1 /*
2  * Emulator
3  *
4  * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  * DoHyung Hong <don.hong@samsung.com>
8  * SeokYeon Hwang <syeon.hwang@samsung.com>
9  * Hyunjun Son <hj79.son@samsung.com>
10  * SangJin Kim <sangjin3.kim@samsung.com>
11  * MunKyu Im <munkyu.im@samsung.com>
12  * KiTae Kim <kt920.kim@samsung.com>
13  * JinHyung Jo <jinhyung.jo@samsung.com>
14  * SungMin Ha <sungmin82.ha@samsung.com>
15  * JiHye Kim <jihye1128.kim@samsung.com>
16  * GiWoong Kim <giwoong.kim@samsung.com>
17  * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
18  * DongKyun Yun <dk77.yun@samsung.com>
19  *
20  * This program is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU General Public License
22  * as published by the Free Software Foundation; either version 2
23  * of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
33  *
34  * Contributors:
35  * - S-Core Co., Ltd
36  *
37  */
38
39 /**
40  * @file emulator.h
41  * @brief - header of file these are config struecture and defines in emulator
42  */
43
44 #ifndef __EMULATOR_H__
45 #define __EMULATOR_H__
46
47 #define ISE_TOOLKIT_NUM             5
48
49 #include <sys/types.h>
50 #include <sys/stat.h>
51 #include <sys/time.h>
52 #include <fcntl.h>
53 #include <time.h>
54
55 #include <stdio.h>
56 #include <locale.h>
57
58 #include <unistd.h>
59 #include <string.h>
60 #include <stdio.h>
61 #include <signal.h>
62 #include <fcntl.h>
63 #include <errno.h>
64 #include <stdlib.h>
65 #include <gdk/gdkkeysyms.h>
66 #include <gtk/gtk.h>
67
68 #include <glib.h>
69 #include <glib/gstdio.h>
70 #ifndef _WIN32
71 #include <pthread.h>
72 #else
73 #include <windows.h>
74 #include <glib/gthread.h>
75 #include <process.h>
76 #endif
77
78 typedef struct _arglist arglist;
79
80 #include "utils.h"
81 #include "configuration.h"
82 #include "emulsignal.h"
83 #include "tools.h"
84 #include "fileio.h"
85 #include "extern.h"
86 #include "menu.h"
87 #include "vinit_process.h"
88 #include "qemu_gtk_widget.h"
89 #include "event_handler.h"
90
91 void append_argvlist(arglist* al, const char *fmt, ...) __attribute((__format__(__printf__,2,3)));
92
93 enum {
94     EMUL_BOOTING = 0, //not used yet
95     EMUL_NORMAL, //not used yet
96     EMUL_SHUTTING_DOWN,
97 };
98
99 extern void save_emulator_state(void);
100 extern void exit_emulator(void);
101 extern gboolean  update_progress_bar(GIOChannel *, GIOCondition , gpointer);
102
103 extern CONFIGURATION configuration;     /**<    configuration structure which hold system-wide information during running   */
104 extern SYSINFO SYSTEMINFO;
105 extern STARTUP_OPTION startup_option;   /**<    command line option structure which hold some command line option information   */
106 extern PHONEMODELINFO *phone_info;
107
108 extern GtkWidget *EventItem1;
109 extern GtkWidget *EventItem2;
110
111 int get_emulator_condition(void);
112 void set_emulator_condition(int state);
113 int emul_create_process(const gchar cmd[]);
114 void emul_kill_all_process(void);
115 extern int qemu_arch_is_arm(void); /* hack */
116 int device_set_rotation(int rotation);
117 int socket_init(void);
118 void exit_emulator_post_process( void );
119 int make_shdmem(void);
120 #endif