Imagens no palco por nome/número, paleta recarregável e slider de zoom
- Core: armazém de imagens nomeadas (tb_image_store_*) e tb_stage_image* para desenhar imagens no palco pelo nome ou pelo número. - Caneta: blocos "desenhe imagem nome/número". - tinyblocks-api: tb_api_load_named/tb_api_find_library e mtime em ns; o editor carrega as libraries de categoria como .so quando existem, para a paleta recarregar ao vivo. - Aba de imagem: slider de zoom no rodapé no lugar dos botões -/+. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b6bc65062
commit
adf5d2cd12
11 files changed
+378
-32
No files matched your search
@@ -15,6 +15,7 @@
|
||||
#define TINYBLOCKS_API_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
@@ -34,7 +35,7 @@ typedef struct TbApiModule {
|
||||
TinyBlocks_LibraryBlock* lib;
|
||||
const TinyBlocks_Category* category; /* pode ser NULL */
|
||||
unsigned block_count;
|
||||
time_t mtime; /* mtime do .so (hot reload) */
|
||||
int64_t mtime; /* mtime do .so (ns; hot reload) */
|
||||
} TbApiModule;
|
||||
|
||||
/* -- Ciclo de vida --- */
|
||||
@@ -53,6 +54,11 @@ TB_API const TbApiModule* tb_api_module_find(const char* name);
|
||||
/* -- Carregamento dinamico --- */
|
||||
/* Carrega um .so; retorna o indice (>=0) ou -1 (erro em tb_api_last_error). */
|
||||
TB_API int tb_api_load(const char* path);
|
||||
/* Procura "lib<name>.so" nos diretorios usuais (repo, ao lado do executavel,
|
||||
* AppImage, $TINYBLOCKS_LIBS) e carrega. Serve para o app abrir as libraries
|
||||
* de categoria como .so (e entao poder recarrega-las ao vivo). */
|
||||
TB_API bool tb_api_find_library(const char* name, char* out, size_t cap);
|
||||
TB_API int tb_api_load_named(const char* name); /* indice ou -1 */
|
||||
TB_API bool tb_api_unload(int idx);
|
||||
TB_API bool tb_api_reload(int idx);
|
||||
TB_API bool tb_api_is_loaded(const char* name);
|
||||
|
||||
Reference in new issue
Block a user