summaryrefslogtreecommitdiffstats
path: root/client/application.h
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-07-01 13:48:58 +0200
committerAlexander Larsson <alexl@redhat.com>2010-07-01 13:48:58 +0200
commit0e16cadc7077d448a5b91be205226620e2bc5191 (patch)
treeee3f97a1a9189956c8ca5aac25ed8975e5ee9787 /client/application.h
parentd69fd9408cecff72a9261ed5c1cc2de77aee37bb (diff)
downloadspice-0e16cadc7077d448a5b91be205226620e2bc5191.tar.gz
spice-0e16cadc7077d448a5b91be205226620e2bc5191.tar.xz
spice-0e16cadc7077d448a5b91be205226620e2bc5191.zip
Make CEGUI optional
This makes the CEGUI dependency optional and off by default. Restoring previous behaviour of exiting on disconnect if disabled.
Diffstat (limited to 'client/application.h')
-rw-r--r--client/application.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/application.h b/client/application.h
index 1e48ab57..01ef517d 100644
--- a/client/application.h
+++ b/client/application.h
@@ -35,6 +35,8 @@ class InputsHandler;
class Monitor;
class CmdLineParser;
class Menu;
+
+#ifdef USE_GUI
class GUI;
class GUITimer;
class GUIBarrier;
@@ -42,6 +44,7 @@ class GUIBarrier;
#ifdef GUI_DEMO
class TestTimer;
#endif
+#endif // USE_GUI
class ConnectedEvent: public Event {
@@ -131,7 +134,9 @@ typedef struct StickyInfo {
typedef std::list<KeyHandler*> KeyHandlersStack;
+#ifdef USE_GUI
typedef std::list<GUIBarrier*> GUIBarriers;
+#endif // USE_GUI
class Application : public ProcessLoop,
public Platform::EventListener,
@@ -147,11 +152,13 @@ public:
DISCONECTING,
};
+#ifdef USE_GUI
enum GuiMode {
GUI_MODE_FULL,
GUI_MODE_ACTIVE_SESSION,
GUI_MODE_MINIMAL,
};
+#endif // USE_GUI
Application();
virtual ~Application();
@@ -216,7 +223,9 @@ public:
void quit();
void hide_me();
void beep();
+#ifdef USE_GUI
bool is_disconnect_allowed();
+#endif
const std::string& get_host();
int get_port();
@@ -272,6 +281,7 @@ private:
void show_info_layer();
void hide_info_layer();
+#ifdef USE_GUI
void attach_gui_barriers();
void detach_gui_barriers();
void show_gui();
@@ -279,6 +289,11 @@ private:
void create_gui_barrier(RedScreen& screen, int id);
void destroyed_gui_barrier(int id);
void destroyed_gui_barriers();
+#else // USE_GUI
+ void show_gui() {}
+ void hide_gui() {}
+
+#endif // USE_GUI
// returns the press value before operation (i.e., if it was already pressed)
bool press_key(RedKey key);
@@ -324,6 +339,7 @@ private:
StickyInfo _sticky_info;
std::vector<int> _canvas_types;
AutoRef<Menu> _app_menu;
+#ifdef USE_GUI
std::auto_ptr<GUI> _gui;
AutoRef<GUITimer> _gui_timer;
GUIBarriers _gui_barriers;
@@ -331,6 +347,7 @@ private:
#ifdef GUI_DEMO
AutoRef<TestTimer> _gui_test_timer;
#endif
+#endif // USE_GUI
bool _during_host_switch;
State _state;