* Translates keysymbols to keycodes for all bindings which use keysyms.
*
*/
-void translate_keysyms();
+void translate_keysyms(void);
/**
* Ungrabs all keys, to be called before re-grabbing the keys because of a
* and _NET_NUMBER_OF_DESKTOPS - 1.
*
*/
-void ewmh_update_current_desktop();
+void ewmh_update_current_desktop(void);
/**
* Updates _NET_ACTIVE_WINDOW with the currently focused window.
* Set up the EWMH hints on the root window.
*
*/
-void ewmh_setup_hints();
+void ewmh_setup_hints(void);
#endif
* received from X11
*
*/
-void property_handlers_init();
+void property_handlers_init(void);
#if 0
/**
* when exiting or restarting only!
*
*/
-void ipc_shutdown();
+void ipc_shutdown(void);
void dump_node(yajl_gen gen, Con *con, bool inplace_restart);
* Frees the resources taken by the current font.
*
*/
-void free_font();
+void free_font(void);
/**
* Converts the given string to UTF-8 from UCS-2 big endian. The return value
* XDG_RUNTIME_DIR, see get_process_filename()).
*
*/
-void init_logging();
+void init_logging(void);
/**
* Enables the given loglevel.
* side-effects which are to be expected when continuing to run i3.
*
*/
-void restore_geometry();
+void restore_geometry(void);
/**
* Do some sanity checks and then reparent the window.
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
*
*/
-void randr_query_outputs();
+void randr_query_outputs(void);
/**
* Returns the first output which is active.
*
*/
-Output *get_first_output();
+Output *get_first_output(void);
/**
* Returns the output with the given name if it is active (!) or NULL.
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
*
*/
-void setup_signal_handler();
+void setup_signal_handler(void);
#endif
* Moves focus one level up.
*
*/
-void level_up();
+void level_up(void);
/**
* Moves focus one level down.
*
*/
-void level_down();
+void level_down(void);
/**
* Renders the tree, that is rendering all outputs using render_con() and
* pushing the changes to X11 using x_push_changes().
*
*/
-void tree_render();
+void tree_render(void);
/**
* Closes the current container using tree_close().
* Returns the next workspace.
*
*/
-Con* workspace_next();
+Con* workspace_next(void);
/**
* Returns the previous workspace.
*
*/
-Con* workspace_prev();
+Con* workspace_prev(void);
/**
* Returns the next workspace on the same output
*
*/
-Con* workspace_next_on_output();
+Con* workspace_next_on_output(void);
/**
* Returns the previous workspace on the same output
*
*/
-Con* workspace_prev_on_output();
+Con* workspace_prev_on_output(void);
/**
* Focuses the previously focused workspace.
*
*/
-void workspace_back_and_forth();
+void workspace_back_and_forth(void);
#if 0
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
*
*/
-void x_set_i3_atoms();
+void x_set_i3_atoms(void);
/**
* Set warp_to coordinates. This will trigger on the next call to
XCURSOR_CURSOR_MAX
};
-void xcursor_load_cursors();
+void xcursor_load_cursors(void);
Cursor xcursor_get_cursor(enum xcursor_cursor_t c);
int xcursor_get_xcb_cursor(enum xcursor_cursor_t c);
* Xinerama information to setup workspaces for each screen.
*
*/
-void xinerama_init();
+void xinerama_init(void);
#endif
* Frees the resources taken by the current font.
*
*/
-void free_font() {
+void free_font(void) {
/* Close the font and free the info */
xcb_close_font(conn, savedFont->id);
if (savedFont->info)
ELOG("\n");
}
-int yywrap() {
+int yywrap(void) {
return 1;
}
}
#endif
-void cmd_MIGRATION_start_nagbar() {
+void cmd_MIGRATION_start_nagbar(void) {
if (migration_pid != -1) {
fprintf(stderr, "i3-nagbar already running.\n");
return;
return NULL;
}
-static void clear_stack() {
+static void clear_stack(void) {
DLOG("clearing stack.\n");
for (int c = 0; c < 10; c++) {
if (stack[c].str != NULL)
* Translates keysymbols to keycodes for all bindings which use keysyms.
*
*/
-void translate_keysyms() {
+void translate_keysyms(void) {
Binding *bind;
xcb_keysym_t keysym;
int col;
* and _NET_NUMBER_OF_DESKTOPS - 1.
*
*/
-void ewmh_update_current_desktop() {
+void ewmh_update_current_desktop(void) {
Con *focused_ws = con_get_workspace(focused);
Con *output;
uint32_t idx = 0;
* desktop applications to place desktop icons appropriately.
*
*/
-void ewmh_update_workarea() {
+void ewmh_update_workarea(void) {
int num_workspaces = 0, count = 0;
Rect last_rect = {0, 0, 0, 0};
Con *output;
* Set up the EWMH hints on the root window.
*
*/
-void ewmh_setup_hints() {
+void ewmh_setup_hints(void) {
xcb_atom_t supported_atoms[] = {
#define xmacro(atom) A_ ## atom,
#include "atoms.xmacro"
* Calculates sum of heights and sum of widths of all currently active outputs
*
*/
-Rect total_outputs_dimensions() {
+static Rect total_outputs_dimensions(void) {
Output *output;
/* Use Rect to encapsulate dimensions, ignoring x/y */
Rect outputs_dimensions = {0, 0, 0, 0};
* received from X11
*
*/
-void property_handlers_init() {
+void property_handlers_init(void) {
sn_monitor_context_new(sndisplay, conn_screen, startup_monitor_event, NULL, NULL);
* when exiting or restarting only!
*
*/
-void ipc_shutdown() {
+void ipc_shutdown(void) {
ipc_client *current;
while (!TAILQ_EMPTY(&all_clients)) {
current = TAILQ_FIRST(&all_clients);
* Necessary to print the i3 SHM log in the correct order.
*
*/
-static void store_log_markers() {
+static void store_log_markers(void) {
i3_shmlog_header *header = (i3_shmlog_header*)logbuffer;
header->offset_next_write = (logwalk - logbuffer);
* Will be called twice if --shmlog-size is specified.
*
*/
-void init_logging() {
+void init_logging(void) {
if (!errorfilename) {
if (!(errorfilename = get_process_filename("errorlog")))
ELOG("Could not initialize errorlog\n");
* Exit handler which destroys the main_loop. Will trigger cleanup handlers.
*
*/
-static void i3_exit() {
+static void i3_exit(void) {
/* We need ev >= 4 for the following code. Since it is not *that* important (it
* only makes sure that there are no i3-nagbar instances left behind) we still
* support old systems with libev 3. */
* side-effects which are to be expected when continuing to run i3.
*
*/
-void restore_geometry() {
+void restore_geometry(void) {
DLOG("Restoring geometry\n");
Con *con;
* Returns the first output which is active.
*
*/
-Output *get_first_output() {
+Output *get_first_output(void) {
Output *output;
TAILQ_FOREACH(output, &outputs, outputs)
* (Re-)queries the outputs via RandR and stores them in the list of outputs.
*
*/
-void randr_query_outputs() {
+void randr_query_outputs(void) {
Output *output, *other, *first;
xcb_randr_get_output_primary_cookie_t pcookie;
xcb_randr_get_screen_resources_current_cookie_t rcookie;
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
*
*/
-void setup_signal_handler() {
+void setup_signal_handler(void) {
struct sigaction action;
action.sa_sigaction = handle_signal;
* __i3_scratch will live there.
*
*/
-static Con *_create___i3() {
+static Con *_create___i3(void) {
Con *__i3 = con_new(croot, NULL);
FREE(__i3->name);
__i3->name = sstrdup("__i3");
* Moves focus one level up.
*
*/
-void level_up() {
+void level_up(void) {
/* We cannot go up when we are in fullscreen mode at the moment, that would
* be totally not intuitive */
if (focused->fullscreen_mode != CF_NONE) {
* Moves focus one level down.
*
*/
-void level_down() {
+void level_down(void) {
/* Go down the focus stack of the current node */
Con *next = TAILQ_FIRST(&(focused->focus_head));
if (next == TAILQ_END(&(focused->focus_head))) {
* pushing the changes to X11 using x_push_changes().
*
*/
-void tree_render() {
+void tree_render(void) {
if (croot == NULL)
return;
#define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
#define ystr(str) yajl_gen_string(gen, (unsigned char*)str, strlen(str))
-char *store_restart_layout() {
+char *store_restart_layout(void) {
setlocale(LC_NUMERIC, "C");
#if YAJL_MAJOR >= 2
yajl_gen gen = yajl_gen_alloc(NULL);
* Focuses the next workspace.
*
*/
-Con* workspace_next() {
+Con* workspace_next(void) {
Con *current = con_get_workspace(focused);
Con *next = NULL;
Con *output;
* Focuses the previous workspace.
*
*/
-Con* workspace_prev() {
+Con* workspace_prev(void) {
Con *current = con_get_workspace(focused);
Con *prev = NULL;
Con *output;
* Focuses the next workspace on the same output.
*
*/
-Con* workspace_next_on_output() {
+Con* workspace_next_on_output(void) {
Con *current = con_get_workspace(focused);
Con *next = NULL;
Con *output = con_get_output(focused);
* Focuses the previous workspace on same output.
*
*/
-Con* workspace_prev_on_output() {
+Con* workspace_prev_on_output(void) {
Con *current = con_get_workspace(focused);
Con *prev = NULL;
Con *output = con_get_output(focused);
* Focuses the previously focused workspace.
*
*/
-void workspace_back_and_forth() {
+void workspace_back_and_forth(void) {
if (!previous_workspace_name) {
DLOG("No previous workspace name set. Not switching.");
return;
* Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
*
*/
-void x_set_i3_atoms() {
+void x_set_i3_atoms(void) {
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
(current_socketpath == NULL ? 0 : strlen(current_socketpath)),
current_socketpath);
return c;
}
-void xcursor_load_cursors() {
+void xcursor_load_cursors(void) {
cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr");
cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow");
cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow");
* information to setup workspaces for each screen.
*
*/
-void xinerama_init() {
+void xinerama_init(void) {
if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
DLOG("Xinerama extension not found, disabling.\n");
disable_randr(conn);