mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
Add theme.c to parse openbox's themerc
This commit is contained in:
parent
0ede4c61e6
commit
d40445da1d
10 changed files with 146 additions and 2 deletions
1
tools/theme/.gitignore
vendored
Normal file
1
tools/theme/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
theme-helper
|
||||
8
tools/theme/Makefile
Normal file
8
tools/theme/Makefile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CFLAGS = -g -Wall -Wextra -pedantic -std=c11
|
||||
CFLAGS += -I../../include/
|
||||
ASAN_FLAGS = -O0 -fsanitize=address -fno-common -fno-omit-frame-pointer -rdynamic
|
||||
CFLAGS += $(ASAN_FLAGS)
|
||||
LDFLAGS += $(ASAN_FLAGS) -fuse-ld=gold
|
||||
|
||||
all:
|
||||
gcc $(CFLAGS) -o theme-helper theme-helper.c ../../src/theme/theme.c $(LDFLAGS)
|
||||
14
tools/theme/theme-helper.c
Normal file
14
tools/theme/theme-helper.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../../include/theme.h"
|
||||
|
||||
struct theme theme = { 0 };
|
||||
|
||||
int main()
|
||||
{
|
||||
theme_read("../../data/themerc");
|
||||
for (int i=0; i < 4; i++)
|
||||
printf("%.2f; ", theme.window_active_title_bg_color[i]);
|
||||
printf("\n");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue