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:
parent
82329ad78a
commit
95457c5ab7
2
client.c
2
client.c
|
@ -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
2
dbus.c
|
@ -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
2
draw.c
|
@ -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.
|
||||
|
|
2
event.c
2
event.c
|
@ -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
2
ewmh.c
|
@ -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
|
||||
|
|
2
hooks.c
2
hooks.c
|
@ -21,8 +21,6 @@
|
|||
|
||||
#include "structs.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
#define HANDLE_HOOK(L, h) \
|
||||
do { \
|
||||
if(lua_gettop(L) == 1) \
|
||||
|
|
2
image.c
2
image.c
|
@ -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
2
key.c
|
@ -25,8 +25,6 @@
|
|||
|
||||
#include "structs.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
static void
|
||||
key_delete(keyb_t **kbp)
|
||||
{
|
||||
|
|
|
@ -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!
|
||||
|
|
2
layout.c
2
layout.c
|
@ -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
2
luaa.c
|
@ -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[];
|
||||
|
|
2
mouse.c
2
mouse.c
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
2
screen.c
2
screen.c
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
2
spawn.c
2
spawn.c
|
@ -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.
|
||||
|
|
2
stack.c
2
stack.c
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
2
tag.c
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
|
|
2
wibox.c
2
wibox.c
|
@ -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")
|
||||
|
|
2
widget.c
2
widget.c
|
@ -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")
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include "widget.h"
|
||||
#include "common/tokenize.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Bottom_Style = 0,
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
#include "widget.h"
|
||||
#include "titlebar.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
/** The imagebox private data structure */
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include "common/tokenize.h"
|
||||
#include "widget.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
/** Progressbar bar data structure */
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
#include "widget.h"
|
||||
#include "common/tokenize.h"
|
||||
|
||||
extern awesome_t globalconf;
|
||||
|
||||
/** The textbox private data structure */
|
||||
typedef struct
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue