mirror of
https://github.com/labwc/labwc.git
synced 2026-02-16 22:05:27 -05:00
include/: refactor header files more
This commit is contained in:
parent
53266a0d5a
commit
4d1363dcae
32 changed files with 130 additions and 78 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#include "labwc.h"
|
||||
#include "spawn.h"
|
||||
#include "common/spawn.h"
|
||||
|
||||
#include <strings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ void spawn_async_no_shell(char const *command)
|
|||
return;
|
||||
}
|
||||
g_spawn_async(NULL, argv, NULL,
|
||||
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL, NULL, NULL, &err);
|
||||
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL,
|
||||
NULL, NULL, &err);
|
||||
if (err) {
|
||||
g_message("%s", err->message);
|
||||
g_error_free(err);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "rcxml.h"
|
||||
#include "config/keybind.h"
|
||||
#include "config/rcxml.h"
|
||||
|
||||
static uint32_t parse_modifier(const char *symname)
|
||||
{
|
||||
|
|
@ -52,4 +53,3 @@ struct keybind *keybind_add(const char *keybind)
|
|||
memcpy(k->keysyms, keysyms, k->keysyms_len * sizeof(xkb_keysym_t));
|
||||
return k;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
#include "rcxml.h"
|
||||
#include "config/rcxml.h"
|
||||
#include "config/keybind.h"
|
||||
#include "config/config-dir.h"
|
||||
#include "common/bug-on.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "labwc.h"
|
||||
#include "rcxml.h"
|
||||
#include "config/rcxml.h"
|
||||
#include "config/keybind.h"
|
||||
|
||||
static void show_one_xdg_view(struct view *view)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "labwc.h"
|
||||
#include "theme.h"
|
||||
#include "theme/theme.h"
|
||||
|
||||
/* Based on expected font height of Sans 8 */
|
||||
#define TITLE_HEIGHT (14)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "labwc.h"
|
||||
#include "theme.h"
|
||||
#include "spawn.h"
|
||||
#include "theme/theme.h"
|
||||
#include "theme/xbm/xbm.h"
|
||||
#include "common/spawn.h"
|
||||
|
||||
struct server server = { 0 };
|
||||
struct rcxml rc = { 0 };
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "labwc.h"
|
||||
#include "theme.h"
|
||||
#include "theme/theme.h"
|
||||
|
||||
struct draw_data {
|
||||
struct wlr_renderer *renderer;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ char *theme_dir(const char *theme_name)
|
|||
prefix = getenv(d.prefix);
|
||||
if (!prefix)
|
||||
continue;
|
||||
snprintf(buf, sizeof(buf), "%s/%s/%s/openbox-3",
|
||||
prefix, d.path, theme_name);
|
||||
snprintf(buf, sizeof(buf), "%s/%s/%s/openbox-3", prefix,
|
||||
d.path, theme_name);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "%s/%s/openbox-3", d.path,
|
||||
theme_name);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "theme.h"
|
||||
#include "theme/theme.h"
|
||||
#include "theme/theme-dir.h"
|
||||
|
||||
static int hex_to_dec(char c)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "theme/theme.h"
|
||||
#include "theme/xbm/xbm.h"
|
||||
#include "theme/xbm/parse.h"
|
||||
#include "theme/theme-dir.h"
|
||||
#include "rcxml.h"
|
||||
#include "config/rcxml.h"
|
||||
|
||||
/* built-in 6x6 buttons */
|
||||
char close_button_normal[] = { 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
|
||||
|
|
@ -29,7 +30,7 @@ static struct wlr_texture *texture_from_pixmap(struct wlr_renderer *renderer,
|
|||
}
|
||||
|
||||
static struct wlr_texture *texture_from_builtin(struct wlr_renderer *renderer,
|
||||
const char *button)
|
||||
const char *button)
|
||||
{
|
||||
struct pixmap pixmap = xbm_create_pixmap_builtin(button);
|
||||
struct wlr_texture *texture = texture_from_pixmap(renderer, &pixmap);
|
||||
|
|
@ -70,5 +71,6 @@ void xbm_load(struct wlr_renderer *r)
|
|||
{
|
||||
load_button(r, "close.xbm", &theme.xbm_close, close_button_normal);
|
||||
load_button(r, "max.xbm", &theme.xbm_maximize, max_button_normal);
|
||||
load_button(r, "iconify.xbm", &theme.xbm_iconify, iconify_button_normal);
|
||||
load_button(r, "iconify.xbm", &theme.xbm_iconify,
|
||||
iconify_button_normal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue