Files
TransPyC/includes/fltk/_cfl_utils.vp
T
TermiNexus 6892183cc9 feat(fltk): 新增 FLTK 1.4 纯 extern FFI 绑定库(对接 cfltk C API)
- 生成 24 个 _cfl*.vp(10327 条 extern 声明)+ _types/_enums 常量

- __init__.vp 提供 Fl/Fl_Widget/Fl_Window/Fl_Button/Fl_Input/Fl_Text_Buffer/Fl_Group/Fl_Menu_Bar/Fl_Native_File_Chooser 等包装类

- 回调(Fl_Callback)按 bytes 不透明处理,菜单回调位传 t.CPtr(0)

- 新增 examples/hello.vp、dialog.vp 冒烟样例,26 个 .vp 全部通过 vast parse

- 内嵌 cfltk(C API 封装)与 FLTK 1.4 完整源码,构建目标 cfltk2
2026-09-01 19:53:54 +08:00

16 lines
724 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import t, c
from fltk._types import *
# ============================================================
# fltk/_cfl_utils.vp — cfl_utils.h 的 extern FFI 声明(对接 cfltk C API)
# ============================================================
# 所有函数直接对应 cfltk 生成的 C 符号(extern "C"),链接目标: cfltk2。
# 类型约定: Fl_* 对象均为不透明指针 (Fl_XxxPtr);const char* → str;
# 函数指针/void* → bytes(Viper 端传 0/NULL 或不使用)。
extern def Fl_filename_expand(out: str, len_: int, in_: str) -> int
extern def Fl_type_name(w: bytes) -> str
extern def Fl_open_uri(uri: str, msg: str, msglen: int) -> int
extern def Fl_decode_uri(uri: str)