mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -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
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include "theme/xbm/tokenize.h"
 | 
			
		||||
#include "xbm/tokenize.h"
 | 
			
		||||
 | 
			
		||||
struct pixmap {
 | 
			
		||||
	uint32_t *data;
 | 
			
		||||
| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
 | 
			
		||||
#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
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
#include "labwc.h"
 | 
			
		||||
#include "theme/theme.h"
 | 
			
		||||
#include "theme/xbm/xbm.h"
 | 
			
		||||
#include "xbm/xbm.h"
 | 
			
		||||
#include "common/spawn.h"
 | 
			
		||||
 | 
			
		||||
#include <cairo.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,3 +16,4 @@ subdir('common')
 | 
			
		|||
subdir('config')
 | 
			
		||||
subdir('theme')
 | 
			
		||||
subdir('debug')
 | 
			
		||||
subdir('xbm')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,4 +2,3 @@ labwc_sources += files(
 | 
			
		|||
  'theme.c',
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
subdir('xbm')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
#include <stdint.h>
 | 
			
		||||
#include <stdbool.h>
 | 
			
		||||
 | 
			
		||||
#include "theme/xbm/parse.h"
 | 
			
		||||
#include "xbm/parse.h"
 | 
			
		||||
#include "common/bug-on.h"
 | 
			
		||||
 | 
			
		||||
static uint32_t color;
 | 
			
		||||
| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "theme/xbm/tokenize.h"
 | 
			
		||||
#include "xbm/tokenize.h"
 | 
			
		||||
 | 
			
		||||
static char *current_buffer_position;
 | 
			
		||||
static struct token *tokens;
 | 
			
		||||
| 
						 | 
				
			
			@ -8,8 +8,8 @@
 | 
			
		|||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
#include "theme/theme.h"
 | 
			
		||||
#include "theme/xbm/xbm.h"
 | 
			
		||||
#include "theme/xbm/parse.h"
 | 
			
		||||
#include "xbm/xbm.h"
 | 
			
		||||
#include "xbm/parse.h"
 | 
			
		||||
#include "config/rcxml.h"
 | 
			
		||||
#include "common/dir.h"
 | 
			
		||||
#include "common/grab-file.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -15,6 +15,7 @@ SRC = \
 | 
			
		|||
	../../src/common/dir.c \
 | 
			
		||||
	../../src/common/buf.c \
 | 
			
		||||
	../../src/common/font.c \
 | 
			
		||||
	../../src/common/log.c \
 | 
			
		||||
	../../src/config/keybind.c
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,12 @@
 | 
			
		|||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <cairo.h>
 | 
			
		||||
#include <pango/pangocairo.h>
 | 
			
		||||
 | 
			
		||||
#include "config/rcxml.h"
 | 
			
		||||
#include "common/buf.h"
 | 
			
		||||
#include "common/log.h"
 | 
			
		||||
 | 
			
		||||
struct rcxml rc = { 0 };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -20,4 +23,5 @@ int main(int argc, char **argv)
 | 
			
		|||
	rcxml_read(argv[1]);
 | 
			
		||||
	printf("%s", b.buf);
 | 
			
		||||
	free(b.buf);
 | 
			
		||||
	pango_cairo_font_map_set_default(NULL);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,8 @@ LDFLAGS   += -DWLR_USE_UNSTABLE
 | 
			
		|||
SRCS = \
 | 
			
		||||
	theme-helper.c \
 | 
			
		||||
	../../src/theme/theme.c \
 | 
			
		||||
	../../src/common/dir.c
 | 
			
		||||
	../../src/common/dir.c \
 | 
			
		||||
	../../src/common/log.c
 | 
			
		||||
 | 
			
		||||
all:
 | 
			
		||||
	gcc $(CFLAGS) -o theme-helper $(SRCS) $(LDFLAGS)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,10 +7,10 @@ PROGS        = xbm-tokenize xbm-parse
 | 
			
		|||
 | 
			
		||||
DEP_TOKENIZE = \
 | 
			
		||||
	       ../../src/common/buf.c \
 | 
			
		||||
	       ../../src/theme/xbm/tokenize.c
 | 
			
		||||
	       ../../src/xbm/tokenize.c
 | 
			
		||||
 | 
			
		||||
DEP_PARSE    = $(DEP_TOKENIZE) \
 | 
			
		||||
	       ../../src/theme/xbm/parse.c \
 | 
			
		||||
	       ../../src/xbm/parse.c \
 | 
			
		||||
	       ../../src/common/grab-file.c
 | 
			
		||||
 | 
			
		||||
all: $(PROGS)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,9 +3,11 @@
 | 
			
		|||
#include <string.h>
 | 
			
		||||
#include <cairo.h>
 | 
			
		||||
 | 
			
		||||
#include "theme/xbm/parse.h"
 | 
			
		||||
#include "xbm/parse.h"
 | 
			
		||||
#include "common/grab-file.h"
 | 
			
		||||
 | 
			
		||||
static float red[] = { 1.0, 0.0, 0.0, 1.0 };
 | 
			
		||||
 | 
			
		||||
int main(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	struct token *tokens;
 | 
			
		||||
| 
						 | 
				
			
			@ -20,6 +22,7 @@ int main(int argc, char **argv)
 | 
			
		|||
		exit(EXIT_FAILURE);
 | 
			
		||||
	tokens = tokenize_xbm(buffer);
 | 
			
		||||
	free(buffer);
 | 
			
		||||
	parse_set_color(red);
 | 
			
		||||
	struct pixmap pixmap = parse_xbm_tokens(tokens);
 | 
			
		||||
	free(tokens);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,7 @@
 | 
			
		|||
#include <string.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 */
 | 
			
		||||
char *read_file(const char *filename)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue