Made all header files to have LABWC_ prefix in include guard identifers.
Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.
The double underscores were removed since according to C standard
those "are always reserved for any use".
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_ACTION_H
-#define __LABWC_ACTION_H
+#ifndef LABWC_ACTION_H
+#define LABWC_ACTION_H
#include <wayland-util.h>
struct wl_list *actions, uint32_t resize_edges);
void action_list_free(struct wl_list *action_list);
-#endif /* __LABWC_ACTION_H */
+#endif /* LABWC_ACTION_H */
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef __LABWC_BUFFER_H
-#define __LABWC_BUFFER_H
+#ifndef LABWC_BUFFER_H
+#define LABWC_BUFFER_H
#include <cairo.h>
#include <wlr/types/wlr_buffer.h>
struct lab_data_buffer *buffer_create_wrap(void *pixel_data, uint32_t width,
uint32_t height, uint32_t stride, bool free_on_destroy);
-#endif /* __LABWC_BUFFER_H */
+#endif /* LABWC_BUFFER_H */
* Copyright Johan Malm 2020
*/
-#ifndef __LABWC_BUF_H
-#define __LABWC_BUF_H
+#ifndef LABWC_BUF_H
+#define LABWC_BUF_H
#include <stdio.h>
#include <stdlib.h>
*/
void buf_add(struct buf *s, const char *data);
-#endif /* __LABWC_BUF_H */
+#endif /* LABWC_BUF_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_DIR_H
-#define __LABWC_DIR_H
+#ifndef LABWC_DIR_H
+#define LABWC_DIR_H
char *config_dir(void);
*/
char *theme_dir(const char *theme_name);
-#endif /* __LABWC_DIR_H */
+#endif /* LABWC_DIR_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_FD_UTIL_H
-#define __LABWC_FD_UTIL_H
+#ifndef LABWC_FD_UTIL_H
+#define LABWC_FD_UTIL_H
void increase_nofile_limit(void);
void restore_nofile_limit(void);
-#endif /* __LABWC_FD_UTIL_H */
+#endif /* LABWC_FD_UTIL_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_FONT_H
-#define __LABWC_FONT_H
+#ifndef LABWC_FONT_H
+#define LABWC_FONT_H
struct lab_data_buffer;
*/
void font_finish(void);
-#endif /* __LABWC_FONT_H */
+#endif /* LABWC_FONT_H */
* Copyright Johan Malm 2020
*/
-#ifndef __LABWC_GRAB_FILE_H
-#define __LABWC_GRAB_FILE_H
+#ifndef LABWC_GRAB_FILE_H
+#define LABWC_GRAB_FILE_H
/**
* grab_file - read file into memory buffer
*/
char *grab_file(const char *filename);
-#endif /* __LABWC_GRAB_FILE_H */
+#endif /* LABWC_GRAB_FILE_H */
/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef LABWC_GRAPHIC_HELPERS_H
+#define LABWC_GRAPHIC_HELPERS_H
#include <cairo.h>
#include <wayland-server-core.h>
/* Draws a border with a specified line width */
void draw_cairo_border(cairo_t *cairo, double width, double height,
double line_width);
+
+#endif /* LABWC_GRAPHIC_HELPERS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef LABWC_LIST_H
+#define LABWC_LIST_H
#include <wayland-server-core.h>
/**
{
wl_list_insert(list->prev, elm);
}
+
+#endif /* LABWC_LIST_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_MATCH_H
-#define __LABWC_MATCH_H
+#ifndef LABWC_MATCH_H
+#define LABWC_MATCH_H
#include <glib.h>
/**
*/
bool match_glob(const gchar *pattern, const gchar *string);
-#endif /* __LABWC_MATCH_H */
+#endif /* LABWC_MATCH_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_MEM_H
-#define __LABWC_MEM_H
+#ifndef LABWC_MEM_H
+#define LABWC_MEM_H
#include <stdlib.h>
free(ptr); (ptr) = NULL; \
} while (0)
-#endif /* __LABWC_MEM_H */
+#endif /* LABWC_MEM_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_NODENAME_H
-#define __LABWC_NODENAME_H
+#ifndef LABWC_NODENAME_H
+#define LABWC_NODENAME_H
#include <libxml/parser.h>
#include <libxml/tree.h>
*/
char *nodename(xmlNode * node, char *buf, int len);
-#endif /* __LABWC_NODENAME_H */
+#endif /* LABWC_NODENAME_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_PARSE_BOOL_H
-#define __LABWC_PARSE_BOOL_H
+#ifndef LABWC_PARSE_BOOL_H
+#define LABWC_PARSE_BOOL_H
#include <stdbool.h>
/**
void set_bool(const char *str, bool *variable);
void set_bool_as_int(const char *str, int *variable);
-#endif /* __LABWC_PARSE_BOOL_H */
+#endif /* LABWC_PARSE_BOOL_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LAB_COMMON_SCALED_FONT_BUFFER_H
-#define __LAB_COMMON_SCALED_FONT_BUFFER_H
+#ifndef LABWC_SCALED_FONT_BUFFER_H
+#define LABWC_SCALED_FONT_BUFFER_H
#include "common/font.h"
*/
void scaled_font_buffer_set_max_width(struct scaled_font_buffer *self, int max_width);
-#endif /* __LAB_COMMON_SCALED_FONT_BUFFER_H */
+#endif /* LABWC_SCALED_FONT_BUFFER_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LAB_COMMON_SCALED_SCENE_BUFFER_H
-#define __LAB_COMMON_SCALED_SCENE_BUFFER_H
+#ifndef LABWC_SCALED_SCENE_BUFFER_H
+#define LABWC_SCALED_SCENE_BUFFER_H
#define LAB_SCALED_BUFFER_MAX_CACHE 2
double scale;
};
-#endif /* __LAB_COMMON_SCALED_SCENE_BUFFER_H */
+#endif /* LABWC_SCALED_SCENE_BUFFER_H */
/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef LABWC_SCENE_HELPERS_H
+#define LABWC_SCENE_HELPERS_H
struct wlr_scene_node;
struct wlr_scene_rect;
* Return NULL if previous link is list-head which means node is bottom-most
*/
struct wlr_scene_node *lab_wlr_scene_get_prev_node(struct wlr_scene_node *node);
+
+#endif /* LABWC_SCENE_HELPERS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_SPAWN_H
-#define __LABWC_SPAWN_H
+#ifndef LABWC_SPAWN_H
+#define LABWC_SPAWN_H
/**
* spawn_async_no_shell - execute asyncronously
*/
void spawn_async_no_shell(char const *command);
-#endif /* __LABWC_SPAWN_H */
+#endif /* LABWC_SPAWN_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_STRING_HELPERS_H
-#define __LABWC_STRING_HELPERS_H
+#ifndef LABWC_STRING_HELPERS_H
+#define LABWC_STRING_HELPERS_H
/**
* string_strip - strip white space left and right
*/
void string_truncate_at_pattern(char *buf, const char *pattern);
-#endif /* __LABWC_STRING_HELPERS_H */
+#endif /* LABWC_STRING_HELPERS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_KEYBIND_H
-#define __LABWC_KEYBIND_H
+#ifndef LABWC_KEYBIND_H
+#define LABWC_KEYBIND_H
#include <wlr/types/wlr_keyboard.h>
#include <xkbcommon/xkbcommon.h>
bool keybind_the_same(struct keybind *a, struct keybind *b);
-#endif /* __LABWC_KEYBIND_H */
+#endif /* LABWC_KEYBIND_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_LIBINPUT_H
-#define __LABWC_LIBINPUT_H
+#ifndef LABWC_LIBINPUT_H
+#define LABWC_LIBINPUT_H
#include <libinput.h>
#include <string.h>
struct libinput_category *libinput_category_create(void);
struct libinput_category *libinput_category_get_default(void);
-#endif /* __LABWC_LIBINPUT_H */
+#endif /* LABWC_LIBINPUT_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_MOUSEBIND_H
-#define __LABWC_MOUSEBIND_H
+#ifndef LABWC_MOUSEBIND_H
+#define LABWC_MOUSEBIND_H
#include <wayland-util.h>
#include "ssd.h"
struct mousebind *mousebind_create(const char *context);
bool mousebind_the_same(struct mousebind *a, struct mousebind *b);
-#endif /* __LABWC_MOUSEBIND_H */
+#endif /* LABWC_MOUSEBIND_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_RCXML_H
-#define __LABWC_RCXML_H
+#ifndef LABWC_RCXML_H
+#define LABWC_RCXML_H
#include <stdbool.h>
#include <stdio.h>
void rcxml_read(const char *filename);
void rcxml_finish(void);
-#endif /* __LABWC_RCXML_H */
+#endif /* LABWC_RCXML_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_SESSION_H
-#define __LABWC_SESSION_H
+#ifndef LABWC_SESSION_H
+#define LABWC_SESSION_H
/**
* session_environment_init - set enrivonment variables based on <key>=<value>
*/
void session_autostart_init(const char *dir);
-#endif /* __LABWC_SESSION_H */
+#endif /* LABWC_SESSION_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_CURSOR_H
-#define __LABWC_CURSOR_H
+#ifndef LABWC_CURSOR_H
+#define LABWC_CURSOR_H
#include <wlr/util/edges.h>
#include "ssd.h"
void cursor_init(struct seat *seat);
void cursor_finish(struct seat *seat);
-#endif /* __LABWC_CURSOR_H */
+#endif /* LABWC_CURSOR_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __DEBUG_H
-#define __DEBUG_H
+#ifndef LABWC_DEBUG_H
+#define LABWC_DEBUG_H
struct server;
void debug_dump_scene(struct server *server);
-#endif /* __DEBUG_H */
+#endif /* LABWC_DEBUG_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LAB_DECORATIONS_H
-#define __LAB_DECORATIONS_H
+#ifndef LABWC_DECORATIONS_H
+#define LABWC_DECORATIONS_H
struct server;
struct view;
void kde_server_decoration_update_default(void);
void kde_server_decoration_set_view(struct view *view, struct wlr_surface *surface);
-#endif /* __LAB_DECORATIONS_H */
+#endif /* LABWC_DECORATIONS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LAB_DND_H
-#define __LAB_DND_H
+#ifndef LABWC_DND_H
+#define LABWC_DND_H
#include <wayland-server-core.h>
void dnd_icons_move(struct seat *seat, double x, double y);
void dnd_finish(struct seat *seat);
-#endif /* __LAB_DND_H */
+#endif /* LABWC_DND_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_KEY_STATE_H
-#define __LABWC_KEY_STATE_H
+#ifndef LABWC_KEY_STATE_H
+#define LABWC_KEY_STATE_H
/*
* All keycodes in these functions are (Linux) libinput evdev scancodes which is
void key_state_bound_key_remove(uint32_t keycode);
int key_state_nr_keys(void);
-#endif /* __LABWC_KEY_STATE_H */
+#endif /* LABWC_KEY_STATE_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_H
-#define __LABWC_H
+#ifndef LABWC_H
+#define LABWC_H
#include "config.h"
#include <getopt.h>
#include <stdbool.h>
void constrain_cursor(struct server *server, struct wlr_pointer_constraint_v1
*constraint);
-#endif /* __LABWC_H */
+#endif /* LABWC_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_LAYERS_H
-#define __LABWC_LAYERS_H
+#ifndef LABWC_LAYERS_H
+#define LABWC_LAYERS_H
#include <wayland-server.h>
#include <wlr/types/wlr_layer_shell_v1.h>
void layers_arrange(struct output *output);
-#endif /* __LABWC_LAYERS_H */
+#endif /* LABWC_LAYERS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_MENU_H
-#define __LABWC_MENU_H
+#ifndef LABWC_MENU_H
+#define LABWC_MENU_H
#include <wayland-server.h>
/* menu_reconfigure - reload theme and content */
void menu_reconfigure(struct server *server);
-#endif /* __LABWC_MENU_H */
+#endif /* LABWC_MENU_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_NODE_DESCRIPTOR_H
-#define __LABWC_NODE_DESCRIPTOR_H
+#ifndef LABWC_NODE_DESCRIPTOR_H
+#define LABWC_NODE_DESCRIPTOR_H
#include <wlr/types/wlr_scene.h>
struct view;
struct ssd_button *node_ssd_button_from_node(
struct wlr_scene_node *wlr_scene_node);
-#endif /* __LABWC_NODE_DESCRIPTOR_H */
+#endif /* LABWC_NODE_DESCRIPTOR_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_REGIONS_H
-#define __LABWC_REGIONS_H
+#ifndef LABWC_REGIONS_H
+#define LABWC_REGIONS_H
#include <wlr/util/box.h>
void regions_show_overlay(struct view *view, struct seat *seat, struct region *region);
void regions_hide_overlay(struct seat *seat);
-#endif /* __LABWC_REGIONS_H */
+#endif /* LABWC_REGIONS_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __RESISTANCE_H
-#define __RESISTANCE_H
+#ifndef LABWC_RESISTANCE_H
+#define LABWC_RESISTANCE_H
#include "labwc.h"
void resistance_move_apply(struct view *view, double *x, double *y);
void resistance_resize_apply(struct view *view, struct wlr_box *new_view_geo);
-#endif /* __RESISTANCE_H */
+#endif /* LABWC_RESISTANCE_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LAB_SESSION_LOCK_H
-#define __LAB_SESSION_LOCK_H
+#ifndef LABWC_SESSION_LOCK_H
+#define LABWC_SESSION_LOCK_H
#include <wlr/types/wlr_session_lock_v1.h>
void session_lock_init(struct server *server);
void session_lock_output_create(struct session_lock *lock, struct output *output);
-#endif /* __LAB_SESSION_LOCK_H */
+#endif /* LABWC_SESSION_LOCK_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_SSD_INTERNAL_H
-#define __LABWC_SSD_INTERNAL_H
+#ifndef LABWC_SSD_INTERNAL_H
+#define LABWC_SSD_INTERNAL_H
#include <wlr/util/box.h>
#include "ssd.h"
void ssd_extents_update(struct ssd *ssd);
void ssd_extents_destroy(struct ssd *ssd);
-#endif /* __LABWC_SSD_INTERNAL_H */
+#endif /* LABWC_SSD_INTERNAL_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_SSD_H
-#define __LABWC_SSD_H
+#ifndef LABWC_SSD_H
+#define LABWC_SSD_H
#include <wayland-server-core.h>
const char *ssd_debug_get_node_name(const struct ssd *ssd,
struct wlr_scene_node *node);
-#endif /* __LABWC_SSD_H */
+#endif /* LABWC_SSD_H */
* Copyright Johan Malm 2020-2021
*/
-#ifndef __LABWC_THEME_H
-#define __LABWC_THEME_H
+#ifndef LABWC_THEME_H
+#define LABWC_THEME_H
#include <stdio.h>
#include <wlr/render/wlr_renderer.h>
*/
void theme_finish(struct theme *theme);
-#endif /* __LABWC_THEME_H */
+#endif /* LABWC_THEME_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_VIEW_IMPL_COMMON_H
-#define __LABWC_VIEW_IMPL_COMMON_H
+#ifndef LABWC_VIEW_IMPL_COMMON_H
+#define LABWC_VIEW_IMPL_COMMON_H
/*
* Common code for view->impl functions
*
*/
void view_impl_apply_geometry(struct view *view, int w, int h);
-#endif /* __LABWC_VIEW_IMPL_COMMON_H */
+#endif /* LABWC_VIEW_IMPL_COMMON_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_VIEW_H
-#define __LABWC_VIEW_H
+#ifndef LABWC_VIEW_H
+#define LABWC_VIEW_H
#include "config.h"
#include <stdbool.h>
/* xdg.c */
struct wlr_xdg_surface *xdg_surface_from_view(struct view *view);
-#endif /* __LABWC_VIEW_H */
+#endif /* LABWC_VIEW_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __WINDOW_RULES_H
-#define __WINDOW_RULES_H
+#ifndef LABWC_WINDOW_RULES_H
+#define LABWC_WINDOW_RULES_H
enum window_rule_event {
LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP = 0,
void window_rules_apply(struct view *view, enum window_rule_event event);
enum property window_rules_get_property(struct view *view, const char *property);
-#endif /* __WINDOW_RULES_H */
+#endif /* LABWC_WINDOW_RULES_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_WORKSPACES_H
-#define __LABWC_WORKSPACES_H
+#ifndef LABWC_WORKSPACES_H
+#define LABWC_WORKSPACES_H
struct seat;
struct view;
void workspaces_osd_hide(struct seat *seat);
struct workspace *workspaces_find(struct workspace *anchor, const char *name);
-#endif /* __LABWC_WORKSPACES_H */
+#endif /* LABWC_WORKSPACES_H */
* Copyright Johan Malm 2020
*/
-#ifndef __LABWC_PARSE_H
-#define __LABWC_PARSE_H
+#ifndef LABWC_PARSE_H
+#define LABWC_PARSE_H
#include "xbm/tokenize.h"
#include <stdint.h>
*/
struct pixmap parse_xbm_builtin(const char *button, int size);
-#endif /* __LABWC_PARSE_H */
+#endif /* LABWC_PARSE_H */
* Copyright Johan Malm 2020
*/
-#ifndef __LABWC_TOKENIZE_H
-#define __LABWC_TOKENIZE_H
+#ifndef LABWC_TOKENIZE_H
+#define LABWC_TOKENIZE_H
enum token_type {
TOKEN_NONE = 0,
*/
struct token *tokenize_xbm(char *buffer);
-#endif /* __LABWC_TOKENIZE_H */
+#endif /* LABWC_TOKENIZE_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_XBM_H
-#define __LABWC_XBM_H
+#ifndef LABWC_XBM_H
+#define LABWC_XBM_H
#include <wlr/render/wlr_renderer.h>
*/
void xbm_load(struct theme *theme);
-#endif /* __LABWC_XBM_H */
+#endif /* LABWC_XBM_H */
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __LABWC_XWAYLAND_H
-#define __LABWC_XWAYLAND_H
+#ifndef LABWC_XWAYLAND_H
+#define LABWC_XWAYLAND_H
#include "config.h"
#if HAVE_XWAYLAND
#include "view.h"
void xwayland_server_finish(struct server *server);
#endif /* HAVE_XWAYLAND */
-#endif /* __LABWC_XWAYLAND_H */
+#endif /* LABWC_XWAYLAND_H */