editor: bundle com libraries privadas + hot reload (tinyblocks-api) e aba de imagem estilo Krita
- tinyblocks-editor agora e um bundle: libraries privadas em
libraries/tinyblocks-editor-{widgets,image} (.a + .so), com library.toml
(bundle = tinyblocks-editor, private = true -> nao aparecem no libman).
- O editor carrega os modulos por dlopen via tinyblocks-api e chama tudo por
tabelas de ponteiros (tb_ed_w, tb_ed_img): da para recompilar so a parte que
mudou e o editor recarrega ao vivo (make ed-modules), sem reiniciar.
- tinyblocks-api ganhou modulos de codigo (tb_api_code_*) e watcher de
arquivos (inotify, com mtime como reserva).
- libman: entradas com bundle/private nao sao listadas como extensao.
- Aba de imagem: layout estilo Krita - ferramentas na esquerda, tela no meio,
roda de cores + paleta + camadas na coluna da direita; miniatura por camada
(como as fantasias do Scratch); rodape enxuto (Desfazer/Limpar/zoom).
- Ferramenta selecionar (mover/redimensionar/excluir pixels) e consertada a
geometria da folha (doc = area de desenho, zoom puro).
- Makefile: alvo ed-modules; AppImage empacota os .so do bundle.
- harness: testes de imagem atualizados + testes de cores na lateral.
This commit is contained in:
1 parent
036162280d
commit
0143d3efd5
21 files changed
+3775
-557
No files matched your search
@@ -13,9 +13,17 @@ CFLAGS := -std=c11 -Wall -Wextra -pedantic -fvisibility=hidden \
|
||||
-I../tinyblocks-blueprint/include \
|
||||
-I../tinyblocks-environ/include \
|
||||
-I../tinyblocks-api/include \
|
||||
-I../tinyblocks-libman/include
|
||||
-I../tinyblocks-libman/include \
|
||||
-I../tinyblocks-syntax/include \
|
||||
-Ilibraries/tinyblocks-editor-widgets/include \
|
||||
-Ilibraries/tinyblocks-editor-image/include
|
||||
|
||||
OBJ := $(BUILD)/tb_editor.o $(BUILD)/tb_stage_widget.o
|
||||
WIDGETS_DIR := libraries/tinyblocks-editor-widgets
|
||||
WIDGETS_A := $(WIDGETS_DIR)/build/libtinyblocks-editor-widgets.a
|
||||
IMG_DIR := libraries/tinyblocks-editor-image
|
||||
IMG_A := $(IMG_DIR)/build/libtinyblocks-editor-image.a
|
||||
|
||||
OBJ := $(BUILD)/tb_editor.o $(BUILD)/tb_stage_widget.o $(BUILD)/tb_editor_modules.o
|
||||
LIB_A := $(BUILD)/libtinyblocks-editor.a
|
||||
LIB_SO := $(BUILD)/libtinyblocks-editor.so
|
||||
|
||||
@@ -24,13 +32,17 @@ all: static shared
|
||||
static: $(LIB_A)
|
||||
shared: $(LIB_SO)
|
||||
|
||||
$(BUILD)/tb_editor.o: src/tb_editor.c include/tb_editor.h src/tb_stage_widget.h \
|
||||
$(BUILD)/tb_editor.o: src/tb_editor.c include/tb_editor.h internal/tb_editor_internal.h \
|
||||
src/tb_stage_widget.h \
|
||||
$(WIDGETS_DIR)/include/tb_editor_widgets.h \
|
||||
$(IMG_DIR)/include/tb_editor_image.h \
|
||||
../tinyblocks-graphics/include/tb_graphics.h \
|
||||
../tinyblocks-variables/include/tb_variables.h \
|
||||
../tinyblocks-blueprint/include/tb_blueprint.h \
|
||||
../tinyblocks-environ/include/tb_environ.h \
|
||||
../tinyblocks-api/include/tb_api.h \
|
||||
../tinyblocks-libman/include/tb_libman.h
|
||||
../tinyblocks-libman/include/tb_libman.h \
|
||||
../tinyblocks-syntax/include/tb_syntax.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
@@ -39,8 +51,23 @@ $(BUILD)/tb_stage_widget.o: src/tb_stage_widget.c src/tb_stage_widget.h \
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
$(LIB_A): $(OBJ)
|
||||
ar rcs $@ $^
|
||||
$(BUILD)/tb_editor_modules.o: src/tb_editor_modules.c internal/tb_editor_modules.h \
|
||||
internal/tb_editor_internal.h
|
||||
@mkdir -p $(BUILD)
|
||||
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
||||
|
||||
# Sempre delega para o make das libraries privadas (elas sabem o que mudou):
|
||||
# assim o editor nunca fica com um modulo velho.
|
||||
.PHONY: FORCE
|
||||
FORCE:
|
||||
|
||||
$(WIDGETS_A): FORCE
|
||||
$(MAKE) -C $(WIDGETS_DIR)
|
||||
$(IMG_A): FORCE
|
||||
$(MAKE) -C $(IMG_DIR)
|
||||
|
||||
$(LIB_A): $(OBJ) $(WIDGETS_A) $(IMG_A)
|
||||
ar rcs $@ $(OBJ)
|
||||
|
||||
$(LIB_SO): $(OBJ)
|
||||
$(CC) -shared -o $@ $^ -ldl
|
||||
|
||||
Reference in new issue
Block a user