normalize file headers across **/*.{h,c}

This commit is contained in:
Michael Stapelberg
2011-10-25 21:19:38 +01:00
parent 8660ae4e12
commit 726f2a1e5a
70 changed files with 392 additions and 327 deletions

View File

@ -1,4 +1,9 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* This header file includes all relevant files of i3 and the most often used
* system header files. This reduces boilerplate (the amount of code duplicated
* at the beginning of each source file) and is not significantly slower at

View File

@ -1,6 +1,11 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* assignments.c: Assignments for specific windows (for_window).
*
*/
#ifndef _ASSIGNMENTS_H
#define _ASSIGNMENTS_H

View File

@ -2,10 +2,9 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2011 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* click.c: Button press (mouse click) events.
*
*/
#ifndef _CLICK_H

View File

@ -1,3 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* cmdparse.y: the parser for commands you send to i3 (or bind on keys)
*
*/
#ifndef _CMDPARSE_H
#define _CMDPARSE_H

View File

@ -1,3 +1,14 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* con.c: Functions which deal with containers directly (creating containers,
* searching containers, getting specific properties from containers,
* …).
*
*/
#ifndef _CON_H
#define _CON_H

View File

@ -2,10 +2,7 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* include/config.h: Contains all structs/variables for the configurable
* part of i3 as well as functions handling the configuration file (calling
@ -13,7 +10,6 @@
* mode).
*
*/
#ifndef _CONFIG_H
#define _CONFIG_H

View File

@ -7,7 +7,6 @@
* include/data.h: This file defines all data structures used by i3
*
*/
#ifndef _DATA_H
#define _DATA_H

View File

@ -1,11 +1,11 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* (c) 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* debug.c: Debugging functions, especially FormatEvent, which prints unhandled
* events. This code is from xcb-util.
*
*/
#ifndef _DEBUG_H

View File

@ -2,10 +2,9 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* ewmh.c: Get/set certain EWMH properties easily.
*
*/
#ifndef _EWMH_C

View File

@ -1,11 +1,10 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* floating.c: Floating windows.
*
*/
#ifndef _FLOATING_H

View File

@ -1,11 +1,11 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* handlers.c: Small handlers for various events (keypresses, focus changes,
* …).
*
*/
#ifndef _HANDLERS_H

View File

@ -2,12 +2,14 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* i3.h: global variables that are used all over i3.
*
*/
#ifndef _I3_H
#define _I3_H
#include <xcb/xcb_keysyms.h>
#include <X11/XKBlib.h>
@ -19,9 +21,6 @@
#include "data.h"
#include "xcb.h"
#ifndef _I3_H
#define _I3_H
extern xcb_connection_t *conn;
extern int conn_screen;
/** The last timestamp we got from X11 (timestamps are included in some events

View File

@ -1,17 +1,13 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* © 2009-2010 Michael Stapelberg and contributors (see also: LICENSE)
*
* This public header defines the different constants and message types to use
* for the IPC interface to i3 (see docs/ipc for more information).
*
*/
#ifndef _I3_IPC_H
#define _I3_IPC_H

View File

@ -1,14 +1,12 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* ipc.c: UNIX domain socket IPC (initialization, client handling, protocol).
*
*/
#ifndef _IPC_H
#define _IPC_H

View File

@ -1,7 +1,13 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* libi3: contains functions which are used by i3 *and* accompanying tools such
* as i3-msg, i3-config-wizard, …
*
*/
#ifndef _LIBI3_H
#define _LIBI3_H

View File

@ -1,3 +1,13 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* load_layout.c: Restore (parts of) the layout, for example after an inplace
* restart.
*
*/
#ifndef _LOAD_LAYOUT_H
#define _LOAD_LAYOUT_H

View File

@ -2,10 +2,9 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2011 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* log.c: Setting of loglevels, logging functions.
*
*/
#ifndef _LOG_H

View File

@ -1,19 +1,17 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* manage.c: Initially managing new windows (or existing ones on restart).
*
*/
#include "data.h"
#ifndef _MANAGE_H
#define _MANAGE_H
#include "data.h"
/**
* Go through all existing windows (if the window manager is restarted) and
* manage them

View File

@ -1,3 +1,16 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* A "match" is a data structure which acts like a mask or expression to match
* certain windows or not. For example, when using commands, you can specify a
* command like this: [title="*Firefox*"] kill. The title member of the match
* data structure will then be filled and i3 will check each window using
* match_matches_window() to find the windows affected by this command.
*
*/
#ifndef _MATCH_H
#define _MATCH_H

View File

@ -1,7 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* move.c: Moving containers into some direction.
*
*/
#ifndef _MOVE_H
#define _MOVE_H

View File

@ -1,7 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* output.c: Output (monitor) related functions.
*
*/
#ifndef _OUTPUT_H
#define _OUTPUT_H

View File

@ -1,19 +1,20 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* For more information on RandR, please see the X.org RandR specification at
* http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt
* (take your time to read it completely, it answers all questions).
*
*/
#include "data.h"
#include <xcb/randr.h>
#ifndef _RANDR_H
#define _RANDR_H
#include "data.h"
#include <xcb/randr.h>
TAILQ_HEAD(outputs_head, xoutput);
extern struct outputs_head outputs;

View File

@ -1,6 +1,11 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* regex.c: Interface to libPCRE (perl compatible regular expressions).
*
*/
#ifndef _REGEX_H
#define _REGEX_H

View File

@ -1,7 +1,13 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* render.c: Renders (determines position/sizes) the layout tree, updating the
* various rects. Needs to be pushed to X11 (see x.c) to be visible.
*
*/
#ifndef _RENDER_H
#define _RENDER_H

View File

@ -1,3 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* resize.c: Interactive resizing.
*
*/
#ifndef _RESIZE_H
#define _RESIZE_H

View File

@ -2,11 +2,11 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
*
* © 2009-2010 Michael Stapelberg and contributors
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
* © 2009-2010 Jan-Erik Rediger
*
* See file LICENSE for license information.
* sighandler.c: Interactive crash dialog upon SIGSEGV/SIGABRT/SIGFPE (offers
* to restart inplace).
*
*/
#ifndef _SIGHANDLER_H

View File

@ -2,10 +2,12 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2011 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* startup.c: Startup notification code. Ensures a startup notification context
* is setup when launching applications. We store the current
* workspace to open windows in that startup notification context on
* the appropriate workspace.
*
*/
#ifndef _STARTUP_H

View File

@ -1,7 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* tree.c: Everything that primarily modifies the layout tree data structure.
*
*/
#ifndef _TREE_H
#define _TREE_H

View File

@ -1,20 +1,20 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* util.c: Utility functions, which can be useful everywhere within i3 (see
* also libi3).
*
*/
#ifndef _UTIL_H
#define _UTIL_H
#include <err.h>
#include "data.h"
#ifndef _UTIL_H
#define _UTIL_H
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
#define exit_if_null(pointer, ...) { if (pointer == NULL) die(__VA_ARGS__); }
#define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0)

View File

@ -1,3 +1,12 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* window.c: Updates window attributes (X11 hints/properties).
*
*/
#ifndef _WINDOW_H
#define _WINDOW_H

View File

@ -1,21 +1,20 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* workspace.c: Modifying workspaces, accessing them, moving containers to
* workspaces.
*
*/
#ifndef _WORKSPACE_H
#define _WORKSPACE_H
#include "data.h"
#include "tree.h"
#include "randr.h"
#ifndef _WORKSPACE_H
#define _WORKSPACE_H
/**
* Returns a pointer to the workspace with the given number (starting at 0),
* creating the workspace if necessary (by allocating the necessary amount of

View File

@ -1,7 +1,13 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* x.c: Interface to X11, transfers our in-memory state to X11 (see also
* render.c). Basically a big state machine.
*
*/
#ifndef _X_H
#define _X_H

View File

@ -2,10 +2,9 @@
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2011 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* xcb.c: Helper functions for easier usage of XCB
*
*/
#ifndef _XCB_H

View File

@ -1,3 +1,14 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* xcb_compat.h: uses #define to create aliases for xcb functions which got
* renamed. Makes the code work with >= 0.3.8 xcb-util and
* older versions.
*
*/
#ifndef _XCB_COMPAT_H
#define _XCB_COMPAT_H

View File

@ -1,5 +1,11 @@
/*
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* xcursor.c: libXcursor support for themed cursors.
*
*/
#ifndef _XCURSOR_CURSOR_H
#define _XCURSOR_CURSOR_H

View File

@ -1,18 +1,19 @@
/*
* vim:ts=8:expandtab
* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
* © 2009-2010 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
* This is LEGACY code (we support RandR, which can do much more than
* Xinerama), but necessary for the poor users of the nVidia binary
* driver which does not support RandR in 2011 *sigh*.
*
*/
#include "data.h"
#ifndef _XINERAMA_H
#define _XINERAMA_H
#include "data.h"
/**
* We have just established a connection to the X server and need the initial
* Xinerama information to setup workspaces for each screen.