2008-01-13 15:44:01 +01:00
|
|
|
/*
|
2009-09-07 17:22:32 +02:00
|
|
|
* globalconf.h - basic globalconf.header
|
2008-01-13 15:44:01 +01:00
|
|
|
*
|
2009-09-07 17:22:32 +02:00
|
|
|
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
|
2008-01-13 15:44:01 +01:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-09-07 17:22:32 +02:00
|
|
|
#ifndef AWESOME_GLOBALCONF_H
|
|
|
|
#define AWESOME_GLOBALCONF_H
|
2008-01-13 15:44:01 +01:00
|
|
|
|
2009-04-03 16:30:18 +02:00
|
|
|
#define SN_API_NOT_YET_FROZEN
|
|
|
|
#include <libsn/sn.h>
|
|
|
|
|
2009-08-17 16:38:56 +02:00
|
|
|
#include <ev.h>
|
|
|
|
|
2008-09-03 12:07:53 +02:00
|
|
|
#include <xcb/xcb_icccm.h>
|
2009-04-17 16:52:25 +02:00
|
|
|
#include <xcb/xcb_keysyms.h>
|
2008-03-21 16:50:17 +01:00
|
|
|
|
2009-09-14 20:27:56 +02:00
|
|
|
#include "objects/key.h"
|
2009-09-07 17:51:40 +02:00
|
|
|
#include "color.h"
|
|
|
|
#include "font.h"
|
2008-06-14 18:12:16 +02:00
|
|
|
#include "common/xembed.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 client_t client_t;
|
2008-10-21 17:33:16 +02:00
|
|
|
typedef struct tag tag_t;
|
2008-01-13 15:44:01 +01:00
|
|
|
|
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)
|
2009-05-10 14:55:13 +02:00
|
|
|
ARRAY_TYPE(wibox_t *, wibox)
|
2008-01-13 15:44:01 +01:00
|
|
|
|
|
|
|
/** Main configuration structure */
|
2009-09-07 17:23:54 +02:00
|
|
|
typedef struct
|
2008-01-13 15:44:01 +01:00
|
|
|
{
|
2008-03-21 16:50:17 +01:00
|
|
|
/** Connection ref */
|
|
|
|
xcb_connection_t *connection;
|
|
|
|
/** 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 */
|
2009-08-14 16:46:35 +02:00
|
|
|
key_array_t keys;
|
2009-01-05 16:59:20 +01:00
|
|
|
/** Root window mouse bindings */
|
2009-08-14 16:46:35 +02:00
|
|
|
button_array_t buttons;
|
2009-04-28 18:17:16 +02:00
|
|
|
/** Modifiers masks */
|
|
|
|
uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
|
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-05-25 19:30:54 +02:00
|
|
|
/** Stack client history */
|
2009-04-17 23:26:26 +02:00
|
|
|
client_array_t stack;
|
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;
|
2008-06-17 00:30:53 +02:00
|
|
|
/** The event loop */
|
|
|
|
struct ev_loop *loop;
|
2008-06-10 16:50:55 +02:00
|
|
|
/** The key grabber function */
|
2009-07-28 10:29:30 +02:00
|
|
|
int keygrabber;
|
2008-11-13 16:08:34 +01:00
|
|
|
/** The mouse pointer grabber function */
|
2009-07-28 10:29:30 +02:00
|
|
|
int mousegrabber;
|
2008-07-31 15:51:28 +02:00
|
|
|
/** Focused screen */
|
|
|
|
screen_t *screen_focus;
|
2009-05-10 14:55:13 +02:00
|
|
|
/** Wiboxes */
|
|
|
|
wibox_array_t wiboxes;
|
2009-04-03 16:30:18 +02:00
|
|
|
/** The startup notification display struct */
|
|
|
|
SnDisplay *sndisplay;
|
2010-08-12 14:37:39 +02:00
|
|
|
/** Latest timestamp we got from the X server */
|
|
|
|
xcb_timestamp_t timestamp;
|
2010-08-16 13:55:12 +02:00
|
|
|
/** Window that contains the systray */
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
xcb_window_t window;
|
|
|
|
/** Systray window parent */
|
|
|
|
xcb_window_t parent;
|
|
|
|
/** Is awesome the systray owner? */
|
|
|
|
bool registered;
|
|
|
|
} systray;
|
2010-08-16 13:57:31 +02:00
|
|
|
/** The monitor of startup notifications */
|
|
|
|
SnMonitorContext *snmonitor;
|
2010-08-16 13:59:51 +02:00
|
|
|
/** The default visual, used to draw */
|
|
|
|
xcb_visualtype_t *visual;
|
2010-08-16 14:10:58 +02:00
|
|
|
/** The screen's information */
|
|
|
|
xcb_screen_t *screen;
|
2009-09-07 17:23:54 +02:00
|
|
|
} awesome_t;
|
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
|