add a RECONFIGURING state, and enter that when doing reconfiguring
[mikachu/openbox.git] / openbox / openbox.h
index f8797d7..06d3829 100644 (file)
@@ -1,44 +1,70 @@
+/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
+
+   openbox.h for the Openbox window manager
+   Copyright (c) 2003-2007   Dana Jansens
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   See the COPYING file for a copy of the GNU General Public License.
+*/
+
 #ifndef __openbox_h
 #define __openbox_h
 
+#include "misc.h"
+
+#include "render/render.h"
+#include "render/theme.h"
+
 #include <glib.h>
 #include <X11/Xlib.h>
 
+struct _ObMainLoop;
+
+extern RrInstance *ob_rr_inst;
+extern RrImageCache *ob_rr_icons;
+extern RrTheme    *ob_rr_theme;
+
+extern struct _ObMainLoop *ob_main_loop;
+
 /*! The X display */
-extern Display *ob_display; 
+extern Display *ob_display;
+
 /*! The number of the screen on which we're running */
-extern int      ob_screen;
-/*! The root window */
-extern Window   ob_root;
+extern gint     ob_screen;
 
-/*! States of execution for Openbox */
-typedef enum {
-    State_Starting,
-    State_Exiting,
-    State_Running
-} State;
+extern gboolean ob_sm_use;
+extern gchar   *ob_sm_id;
+/* This save_file will get pass to ourselves if we restart too! So we won't
+ make a new file every time, yay. */
+extern gchar   *ob_sm_save_file;
+extern gboolean ob_sm_restore;
+extern gboolean ob_replace_wm;
+extern gboolean ob_debug_xinerama;
 
 /* The state of execution of the window manager */
-State ob_state;
-
-/*! When set to true, Openbox will exit */
-extern gboolean ob_shutdown;
-/*! When set to true, Openbox will restart instead of shutting down */
-extern gboolean ob_restart;
-/*! When restarting, if this is not NULL, it will be executed instead of
-  restarting Openbox. */
-extern char *ob_restart_path;
-
-/*! Runtime option to specify running on a remote display */
-extern gboolean ob_remote;
-/*! Runtime option to run in synchronous mode */
-extern gboolean ob_sync;
-
-typedef struct Cursors {
-    Cursor left_ptr;
-    Cursor ll_angle;
-    Cursor lr_angle;
-} Cursors;
-Cursors ob_cursors;
+ObState ob_state();
+void ob_set_state(ObState state);
+
+void ob_restart_other(const gchar *path);
+void ob_restart();
+void ob_exit(gint code);
+void ob_exit_replace();
+
+void ob_reconfigure();
+
+void ob_exit_with_error(const gchar *msg);
+
+Cursor ob_cursor(ObCursor cursor);
+
+KeyCode ob_keycode(ObKey key);
 
 #endif