Headers do editor em include/, com a API privada atrás de um guard

- tb_editor_internal.h e tb_editor_modules.h (antes em internal/) e
  tb_stage_widget.h (antes em src/) foram para
  libraries/tinyblocks-editor/include/.
- Os três são API privada: só compilam com TB_EDITOR_PRIVATE_API (o
  editor, os módulos do bundle e o harness definem); fora disso um
  #error manda incluir tb_editor.h.
- Includes viraram <tb_editor_internal.h> etc.; Makefiles sem -Isrc /
  -Iinternal; library.toml descreve os fontes e o define.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mguinhosandClaude Opus 5.5 committed 2026-10-22 22:37:13 -03:00
1 parent b610a05904
commit 81f198f189
13 files changed
+44 -21

No files matched your search

+2 -2
View File
@@ -46,7 +46,7 @@
#include <tb_syntax.h>
#include <tb_scratchblocks.h>
#include <strings.h>
#include "tb_stage_widget.h"
#include <tb_stage_widget.h>
#include "../include/tb_editor.h"
@@ -62,7 +62,7 @@ TB_API void tb_editor_preload(const char* path) {
strncpy(s_preload[s_preload_n++], path, 511);
}
#include "../internal/tb_editor_internal.h"
#include <tb_editor_internal.h>
/* Perninha (triangulo) do balao de previa, apontando para baixo.
@@ -18,7 +18,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include "../internal/tb_editor_internal.h"
#include <tb_editor_internal.h>
/* Este arquivo nomeia os campos das tabelas (w.fill_rect, ...), entao os
apelidos curtos do editor atrapalham: remove-os aqui. */
@@ -9,7 +9,7 @@
#include <tinyblocks/tb_stage.h>
#include <tinyblocks/tb_renderable_block.h>
#include <tb_graphics.h>
#include "tb_stage_widget.h"
#include <tb_stage_widget.h>
/* input 0 (opcional): Graphics.Input da janela que mostra o palco - da o tamanho da vista */
static void eval_stage(TinyBlocks_Block* self, TinyBlocks* rt) {
@@ -1,13 +0,0 @@
/*
* TinyBlocks - tb_stage_widget.h (editor)
* Widget Editor.Stage: exibe o palco logico do runtime (tb_stage.h).
*/
#ifndef TINYBLOCKS_EDITOR_STAGE_WIDGET_H
#define TINYBLOCKS_EDITOR_STAGE_WIDGET_H
#include <tinyblocks/tinyblocks.h>
/* Registra o TypeBlock Editor.Stage na library do editor */
bool tb_stage_register(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib);
#endif /* TINYBLOCKS_EDITOR_STAGE_WIDGET_H */