2008-01-13 15:44:01 +01:00
|
|
|
/*
|
|
|
|
* structs.h - basic structs header
|
|
|
|
*
|
|
|
|
* Copyright © 2007-2008 Julien Danjou <julien@danjou.info>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AWESOME_STRUCTS_H
|
|
|
|
#define AWESOME_STRUCTS_H
|
|
|
|
|
2009-04-03 16:30:18 +02:00
|
|
|
#define SN_API_NOT_YET_FROZEN
|
|
|
|
#include <libsn/sn.h>
|
|
|
|
|
2008-09-03 12:07:53 +02:00
|
|
|
#include <xcb/xcb_icccm.h>
|
2008-09-16 14:09:56 +02:00
|
|
|
#include <xcb/xcb_property.h>
|
2008-03-21 16:50:17 +01:00
|
|
|
|
2008-11-19 02:22:05 +01:00
|
|
|
#include "config.h"
|
2008-09-17 16:38:38 +02:00
|
|
|
#include "luaa.h"
|
2008-09-11 14:11:13 +02:00
|
|
|
#include "swindow.h"
|
2008-12-18 11:33:19 +01:00
|
|
|
#include "key.h"
|
2008-05-30 12:30:20 +02:00
|
|
|
#include "common/xutil.h"
|
2008-06-14 18:12:16 +02:00
|
|
|
#include "common/xembed.h"
|
2008-12-03 15:23:10 +01:00
|
|
|
#include "common/tokenize.h"
|
2008-01-13 15:44:01 +01:00
|
|
|
|
2009-04-17 16:18:14 +02:00
|
|
|
typedef struct wibox_t wibox_t;
|
2009-04-17 16:14:09 +02:00
|
|
|
typedef struct a_screen screen_t;
|
2008-06-03 18:41:54 +02:00
|
|
|
typedef struct button_t button_t;
|
|
|
|
typedef struct widget_t widget_t;
|
|
|
|
typedef struct widget_node_t widget_node_t;
|
|
|
|
typedef struct client_t client_t;
|
2008-10-24 20:40:02 +02:00
|
|
|
typedef struct client_node client_node_t;
|
2008-10-21 17:33:16 +02:00
|
|
|
typedef struct tag tag_t;
|
2008-06-09 21:43:09 +02:00
|
|
|
typedef struct tag_client_node_t tag_client_node_t;
|
2008-06-03 18:41:54 +02:00
|
|
|
typedef struct awesome_t awesome_t;
|
2008-01-13 15:44:01 +01:00
|
|
|
|
2008-10-21 17:21:21 +02:00
|
|
|
ARRAY_TYPE(widget_node_t, widget_node)
|
2008-10-24 20:38:29 +02:00
|
|
|
ARRAY_TYPE(button_t *, button)
|
2009-04-17 16:14:09 +02:00
|
|
|
ARRAY_TYPE(tag_t *, tag)
|
|
|
|
ARRAY_TYPE(screen_t, screen)
|
2008-10-21 17:33:16 +02:00
|
|
|
ARRAY_TYPE(client_t *, client)
|
2008-01-13 15:44:01 +01:00
|
|
|
|
|
|
|
/** Main configuration structure */
|
2008-05-24 08:59:27 +02:00
|
|
|
struct awesome_t
|
2008-01-13 15:44:01 +01:00
|
|
|
{
|
2008-03-21 16:50:17 +01:00
|
|
|
/** Connection ref */
|
|
|
|
xcb_connection_t *connection;
|
|
|
|
/** Event and error handlers */
|
2008-09-16 15:36:44 +02:00
|
|
|
xcb_event_handlers_t evenths;
|
2008-09-16 14:09:56 +02:00
|
|
|
/** Property change handler */
|
|
|
|
xcb_property_handlers_t prophs;
|
2008-03-21 16:50:17 +01:00
|
|
|
/** Default screen number */
|
|
|
|
int default_screen;
|
2008-03-24 00:48:42 +01:00
|
|
|
/** Keys symbol table */
|
|
|
|
xcb_key_symbols_t *keysyms;
|
2008-01-13 15:44:01 +01:00
|
|
|
/** Logical screens */
|
2009-04-17 16:14:09 +02:00
|
|
|
screen_array_t screens;
|
2008-09-18 16:03:05 +02:00
|
|
|
/** True if xinerama is active */
|
|
|
|
bool xinerama_is_active;
|
2009-01-05 16:59:20 +01:00
|
|
|
/** Root window key bindings */
|
|
|
|
keybindings_t keys;
|
|
|
|
/** Root window mouse bindings */
|
2008-08-12 13:23:10 +02:00
|
|
|
button_array_t buttons;
|
2008-01-13 15:44:01 +01:00
|
|
|
/** Check for XRandR extension */
|
2008-03-21 16:50:17 +01:00
|
|
|
bool have_randr;
|
2008-12-29 17:03:17 +01:00
|
|
|
/** Check for XTest extension */
|
|
|
|
bool have_xtest;
|
2008-06-03 18:41:54 +02:00
|
|
|
/** Clients list */
|
2009-04-09 17:17:10 +02:00
|
|
|
client_array_t clients;
|
2008-06-14 18:12:16 +02:00
|
|
|
/** Embedded windows */
|
2008-12-01 16:43:44 +01:00
|
|
|
xembed_window_array_t embedded;
|
2008-01-13 15:44:01 +01:00
|
|
|
/** Path to config file */
|
2008-09-30 15:35:47 +02:00
|
|
|
char *conffile;
|
2008-05-25 19:30:54 +02:00
|
|
|
/** Stack client history */
|
|
|
|
client_node_t *stack;
|
2008-01-13 15:44:01 +01:00
|
|
|
/** Command line passed to awesome */
|
|
|
|
char *argv;
|
2008-05-20 15:39:47 +02:00
|
|
|
/** Lua VM state */
|
|
|
|
lua_State *L;
|
|
|
|
/** Default colors */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
xcolor_t fg, bg;
|
|
|
|
} colors;
|
|
|
|
/** Default font */
|
|
|
|
font_t *font;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
/** Command to execute when spawning a new client */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref manage;
|
2008-06-10 19:03:10 +02:00
|
|
|
/** Command to execute when unmanaging client */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref unmanage;
|
2008-05-20 15:39:47 +02:00
|
|
|
/** Command to execute when giving focus to a client */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref focus;
|
2008-05-20 15:39:47 +02:00
|
|
|
/** Command to execute when removing focus to a client */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref unfocus;
|
2008-09-22 17:54:48 +02:00
|
|
|
/** Command to run when mouse enter a client */
|
|
|
|
luaA_ref mouse_enter;
|
2008-12-01 15:43:16 +01:00
|
|
|
/** Command to run when mouse leave a client */
|
|
|
|
luaA_ref mouse_leave;
|
2008-05-23 17:09:34 +02:00
|
|
|
/** Command to run on arrange */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref arrange;
|
2008-10-20 15:01:16 +02:00
|
|
|
/** Command to run when client list changes */
|
|
|
|
luaA_ref clients;
|
2008-10-19 19:14:55 +02:00
|
|
|
/** Command to run on numbers of tag changes */
|
|
|
|
luaA_ref tags;
|
|
|
|
/** Command to run when client gets (un)tagged */
|
|
|
|
luaA_ref tagged;
|
2008-09-22 17:54:48 +02:00
|
|
|
/** Command to run on property change */
|
|
|
|
luaA_ref property;
|
2008-05-29 13:47:11 +02:00
|
|
|
/** Command to run on time */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref timer;
|
2009-04-03 16:30:18 +02:00
|
|
|
/** Startup notification hooks */
|
|
|
|
luaA_ref startup_notification;
|
2008-11-19 02:22:05 +01:00
|
|
|
#ifdef WITH_DBUS
|
|
|
|
/** Command to run on dbus events */
|
|
|
|
luaA_ref dbus;
|
|
|
|
#endif
|
2008-05-20 15:39:47 +02:00
|
|
|
} hooks;
|
2008-06-17 00:30:53 +02:00
|
|
|
/** The event loop */
|
|
|
|
struct ev_loop *loop;
|
2008-05-29 13:47:11 +02:00
|
|
|
/** The timeout after which we need to stop select() */
|
2008-06-17 00:30:53 +02:00
|
|
|
struct ev_timer timer;
|
2008-06-10 16:50:55 +02:00
|
|
|
/** The key grabber function */
|
2008-08-11 10:12:12 +02:00
|
|
|
luaA_ref keygrabber;
|
2008-11-13 16:08:34 +01:00
|
|
|
/** The mouse pointer grabber function */
|
|
|
|
luaA_ref mousegrabber;
|
2008-07-31 15:51:28 +02:00
|
|
|
/** Focused screen */
|
|
|
|
screen_t *screen_focus;
|
2009-04-10 18:15:48 +02:00
|
|
|
/** Need to call client_stack_refresh() */
|
|
|
|
bool client_need_stack_refresh;
|
2009-04-03 16:30:18 +02:00
|
|
|
/** The startup notification display struct */
|
|
|
|
SnDisplay *sndisplay;
|
2008-01-13 15:44:01 +01:00
|
|
|
};
|
|
|
|
|
2009-04-10 13:28:21 +02:00
|
|
|
extern awesome_t globalconf;
|
|
|
|
|
2008-01-13 15:44:01 +01:00
|
|
|
#endif
|
|
|
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|