mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
mv xbm/ ..
This commit is contained in:
parent
a042aad9f6
commit
fd8d9a395d
16 changed files with 22 additions and 13 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
#define __LABWC_PARSE_H
|
#define __LABWC_PARSE_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "theme/xbm/tokenize.h"
|
#include "xbm/tokenize.h"
|
||||||
|
|
||||||
struct pixmap {
|
struct pixmap {
|
||||||
uint32_t *data;
|
uint32_t *data;
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <wlr/render/wlr_renderer.h>
|
#include <wlr/render/wlr_renderer.h>
|
||||||
|
|
||||||
#include "theme/xbm/parse.h"
|
#include "xbm/parse.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xbm_load - load theme xbm files into global theme struct
|
* xbm_load - load theme xbm files into global theme struct
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "labwc.h"
|
#include "labwc.h"
|
||||||
#include "theme/theme.h"
|
#include "theme/theme.h"
|
||||||
#include "theme/xbm/xbm.h"
|
#include "xbm/xbm.h"
|
||||||
#include "common/spawn.h"
|
#include "common/spawn.h"
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,4 @@ subdir('common')
|
||||||
subdir('config')
|
subdir('config')
|
||||||
subdir('theme')
|
subdir('theme')
|
||||||
subdir('debug')
|
subdir('debug')
|
||||||
|
subdir('xbm')
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,3 @@ labwc_sources += files(
|
||||||
'theme.c',
|
'theme.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('xbm')
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "theme/xbm/parse.h"
|
#include "xbm/parse.h"
|
||||||
#include "common/bug-on.h"
|
#include "common/bug-on.h"
|
||||||
|
|
||||||
static uint32_t color;
|
static uint32_t color;
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "theme/xbm/tokenize.h"
|
#include "xbm/tokenize.h"
|
||||||
|
|
||||||
static char *current_buffer_position;
|
static char *current_buffer_position;
|
||||||
static struct token *tokens;
|
static struct token *tokens;
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "theme/theme.h"
|
#include "theme/theme.h"
|
||||||
#include "theme/xbm/xbm.h"
|
#include "xbm/xbm.h"
|
||||||
#include "theme/xbm/parse.h"
|
#include "xbm/parse.h"
|
||||||
#include "config/rcxml.h"
|
#include "config/rcxml.h"
|
||||||
#include "common/dir.h"
|
#include "common/dir.h"
|
||||||
#include "common/grab-file.h"
|
#include "common/grab-file.h"
|
||||||
|
|
@ -15,6 +15,7 @@ SRC = \
|
||||||
../../src/common/dir.c \
|
../../src/common/dir.c \
|
||||||
../../src/common/buf.c \
|
../../src/common/buf.c \
|
||||||
../../src/common/font.c \
|
../../src/common/font.c \
|
||||||
|
../../src/common/log.c \
|
||||||
../../src/config/keybind.c
|
../../src/config/keybind.c
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <cairo.h>
|
||||||
|
#include <pango/pangocairo.h>
|
||||||
|
|
||||||
#include "config/rcxml.h"
|
#include "config/rcxml.h"
|
||||||
#include "common/buf.h"
|
#include "common/buf.h"
|
||||||
|
#include "common/log.h"
|
||||||
|
|
||||||
struct rcxml rc = { 0 };
|
struct rcxml rc = { 0 };
|
||||||
|
|
||||||
|
|
@ -20,4 +23,5 @@ int main(int argc, char **argv)
|
||||||
rcxml_read(argv[1]);
|
rcxml_read(argv[1]);
|
||||||
printf("%s", b.buf);
|
printf("%s", b.buf);
|
||||||
free(b.buf);
|
free(b.buf);
|
||||||
|
pango_cairo_font_map_set_default(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ LDFLAGS += -DWLR_USE_UNSTABLE
|
||||||
SRCS = \
|
SRCS = \
|
||||||
theme-helper.c \
|
theme-helper.c \
|
||||||
../../src/theme/theme.c \
|
../../src/theme/theme.c \
|
||||||
../../src/common/dir.c
|
../../src/common/dir.c \
|
||||||
|
../../src/common/log.c
|
||||||
|
|
||||||
all:
|
all:
|
||||||
gcc $(CFLAGS) -o theme-helper $(SRCS) $(LDFLAGS)
|
gcc $(CFLAGS) -o theme-helper $(SRCS) $(LDFLAGS)
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ PROGS = xbm-tokenize xbm-parse
|
||||||
|
|
||||||
DEP_TOKENIZE = \
|
DEP_TOKENIZE = \
|
||||||
../../src/common/buf.c \
|
../../src/common/buf.c \
|
||||||
../../src/theme/xbm/tokenize.c
|
../../src/xbm/tokenize.c
|
||||||
|
|
||||||
DEP_PARSE = $(DEP_TOKENIZE) \
|
DEP_PARSE = $(DEP_TOKENIZE) \
|
||||||
../../src/theme/xbm/parse.c \
|
../../src/xbm/parse.c \
|
||||||
../../src/common/grab-file.c
|
../../src/common/grab-file.c
|
||||||
|
|
||||||
all: $(PROGS)
|
all: $(PROGS)
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
|
|
||||||
#include "theme/xbm/parse.h"
|
#include "xbm/parse.h"
|
||||||
#include "common/grab-file.h"
|
#include "common/grab-file.h"
|
||||||
|
|
||||||
|
static float red[] = { 1.0, 0.0, 0.0, 1.0 };
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct token *tokens;
|
struct token *tokens;
|
||||||
|
|
@ -20,6 +22,7 @@ int main(int argc, char **argv)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
tokens = tokenize_xbm(buffer);
|
tokens = tokenize_xbm(buffer);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
parse_set_color(red);
|
||||||
struct pixmap pixmap = parse_xbm_tokens(tokens);
|
struct pixmap pixmap = parse_xbm_tokens(tokens);
|
||||||
free(tokens);
|
free(tokens);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "common/buf.h"
|
#include "common/buf.h"
|
||||||
#include "theme/xbm/tokenize.h"
|
#include "xbm/tokenize.h"
|
||||||
|
|
||||||
/* Read file into buffer, because it's easier to tokenize that way */
|
/* Read file into buffer, because it's easier to tokenize that way */
|
||||||
char *read_file(const char *filename)
|
char *read_file(const char *filename)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue