Move the definition of globalconf into a header file

Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Uli Schlachter 2009-04-10 13:28:21 +02:00 committed by Julien Danjou
parent 82329ad78a
commit 95457c5ab7
31 changed files with 2 additions and 61 deletions

View File

@ -34,8 +34,6 @@
#include "wibox.h"
#include "common/atoms.h"
extern awesome_t globalconf;
DO_LUA_NEW(extern, client_t, client, "client", client_ref)
DO_LUA_EQ(client_t, client, "client")
DO_LUA_GC(client_t, client, "client", client_unref)

2
dbus.c
View File

@ -33,8 +33,6 @@
#include "widget.h"
#include "event.h"
extern awesome_t globalconf;
static DBusError err;
static DBusConnection *dbus_connection = NULL;
ev_io dbusio = { .fd = -1 };

2
draw.c
View File

@ -33,8 +33,6 @@
#include "common/tokenize.h"
extern awesome_t globalconf;
/** Convert text from any charset to UTF-8 using iconv.
* \param iso The ISO string to convert.
* \param len The string size.

View File

@ -41,8 +41,6 @@
#include "screen.h"
#include "common/atoms.h"
extern awesome_t globalconf;
/** Handle mouse button events.
* \param c The client on which the event happened or NULL.
* \param type Event type, press or release.

2
ewmh.c
View File

@ -35,8 +35,6 @@
#include "common/atoms.h"
#include "common/buffer.h"
extern awesome_t globalconf;
#define _NET_WM_STATE_REMOVE 0
#define _NET_WM_STATE_ADD 1
#define _NET_WM_STATE_TOGGLE 2

View File

@ -21,8 +21,6 @@
#include "structs.h"
extern awesome_t globalconf;
#define HANDLE_HOOK(L, h) \
do { \
if(lua_gettop(L) == 1) \

View File

@ -21,8 +21,6 @@
#include "structs.h"
extern awesome_t globalconf;
DO_LUA_NEW(extern, image_t, image, "image", image_ref)
DO_LUA_GC(image_t, image, "image", image_unref)
DO_LUA_EQ(image_t, image, "image")

2
key.c
View File

@ -25,8 +25,6 @@
#include "structs.h"
extern awesome_t globalconf;
static void
key_delete(keyb_t **kbp)
{

View File

@ -25,8 +25,6 @@
#include "keygrabber.h"
#include "key.h"
extern awesome_t globalconf;
/** XCB equivalent of XLookupString which translate the keycode given
* by PressEvent to a KeySym and a string
* \todo use XKB!

View File

@ -25,8 +25,6 @@
#include "screen.h"
#include "titlebar.h"
extern awesome_t globalconf;
/** Arrange windows following current selected layout
* \param screen the screen to arrange
*/

2
luaa.c
View File

@ -46,8 +46,6 @@
#include "window.h"
#include "common/xcursor.h"
extern awesome_t globalconf;
extern const struct luaL_reg awesome_hooks_lib[];
extern const struct luaL_reg awesome_dbus_lib[];
extern const struct luaL_reg awesome_keygrabber_lib[];

View File

@ -27,8 +27,6 @@
#include "wibox.h"
#include "common/xcursor.h"
extern awesome_t globalconf;
DO_LUA_NEW(static, button_t, button, "button", button_ref)
DO_LUA_GC(button_t, button, "button", button_unref)
DO_LUA_EQ(button_t, button, "button")

View File

@ -25,8 +25,6 @@
#include "mousegrabber.h"
#include "common/xcursor.h"
extern awesome_t globalconf;
/** Grab the mouse.
* \param cursor The cursor to use while grabbing.
* \return True if mouse was grabbed.

View File

@ -27,9 +27,6 @@
#include "ewmh.h"
#include "common/atoms.h"
extern awesome_t globalconf;
void
property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply)
{

View File

@ -31,8 +31,6 @@
#include "widget.h"
#include "wibox.h"
extern awesome_t globalconf;
static inline area_t
screen_xsitoarea(xcb_xinerama_screen_info_t si)
{

View File

@ -27,8 +27,6 @@
#include "event.h"
#include "common/atoms.h"
extern awesome_t globalconf;
static xcb_window_t selection_window = XCB_NONE;
/** Get the current X selection buffer.

View File

@ -28,8 +28,6 @@
#include "spawn.h"
#include "luaa.h"
extern awesome_t globalconf;
/** Spawn a program.
* This function is multi-head (Zaphod) aware and will set display to
* the right screen according to mouse position.

View File

@ -23,8 +23,6 @@
#include "cnode.h"
#include "ewmh.h"
extern awesome_t globalconf;
/** Push the client at the beginning of the client stack.
* \param c The client to push.
*/

View File

@ -385,5 +385,7 @@ struct awesome_t
DO_ARRAY(const void *, void, DO_NOTHING)
extern awesome_t globalconf;
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -28,8 +28,6 @@
#include "draw.h"
#include "common/xutil.h"
extern awesome_t globalconf;
static void
simplewindow_draw_context_update(simple_window_t *sw, xcb_screen_t *s)
{

View File

@ -30,8 +30,6 @@
#define SYSTEM_TRAY_REQUEST_DOCK 0 /* Begin icon docking */
extern awesome_t globalconf;
/** Initialize systray information in X.
* \param phys_screen Physical screen.
*/

2
tag.c
View File

@ -25,8 +25,6 @@
#include "ewmh.h"
#include "widget.h"
extern awesome_t globalconf;
DO_LUA_NEW(extern, tag_t, tag, "tag", tag_ref)
DO_LUA_GC(tag_t, tag, "tag", tag_unref)
DO_LUA_EQ(tag_t, tag, "tag")

View File

@ -27,8 +27,6 @@
#include "wibox.h"
#include "screen.h"
extern awesome_t globalconf;
/** Get a client by its titlebar.
* \param titlebar The titlebar.
* \return A client.

View File

@ -28,8 +28,6 @@
#include "common/xcursor.h"
#include "window.h"
extern awesome_t globalconf;
DO_LUA_NEW(extern, wibox_t, wibox, "wibox", wibox_ref)
DO_LUA_GC(wibox_t, wibox, "wibox", wibox_unref)
DO_LUA_EQ(wibox_t, wibox, "wibox")

View File

@ -29,8 +29,6 @@
#include "wibox.h"
#include "common/atoms.h"
extern awesome_t globalconf;
DO_LUA_NEW(extern, widget_t, widget, "widget", widget_ref)
DO_LUA_GC(widget_t, widget, "widget", widget_unref)
DO_LUA_EQ(widget_t, widget, "widget")

View File

@ -25,8 +25,6 @@
#include "widget.h"
#include "common/tokenize.h"
extern awesome_t globalconf;
typedef enum
{
Bottom_Style = 0,

View File

@ -22,8 +22,6 @@
#include "widget.h"
#include "titlebar.h"
extern awesome_t globalconf;
/** The imagebox private data structure */
typedef struct
{

View File

@ -23,8 +23,6 @@
#include "common/tokenize.h"
#include "widget.h"
extern awesome_t globalconf;
/** Progressbar bar data structure */
typedef struct
{

View File

@ -30,8 +30,6 @@
#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0
#define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1
extern awesome_t globalconf;
static area_t
systray_geometry(widget_t *widget, int screen, int height, int width)
{

View File

@ -22,8 +22,6 @@
#include "widget.h"
#include "common/tokenize.h"
extern awesome_t globalconf;
/** The textbox private data structure */
typedef struct
{

View File

@ -26,8 +26,6 @@
#include "mouse.h"
#include "common/atoms.h"
extern awesome_t globalconf;
/** Mask shorthands */
#define BUTTONMASK (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE)