Files
Viper_VRTE/fltk/_cfl_surface.vp
T
TermiNexus c0d56b127d chore(comments): includes 头注释英文化(R11 收尾)
把 includes 下 64 个 .vp 的文件头注释(含 traceback.vp 第 13-427 行的整块文件级说明)以及 2 处漏网的正文中文注释(ast/lexer.vp、json/__writer.vp)与 1 处中文 docstring(memhub.vp)逐行译为英文;同步把 fltk/gen_ffi.py 的生成模板与其自身注释英文化,使重新生成仍为英文。

只改注释/文档串文字:行数与代码逐字节不变(骨架比对 140 文件漂移 0),运行时中文字符串字面量 305 处保持原样。验证:三重重编 SUCCESS(170.21s)+ 全量 77/77 顺序回归通过 + VET 编译 SUCCESS / --search-paths 7 条 exit 0。
2026-10-06 09:42:25 +08:00

34 lines
2.3 KiB
Plaintext

import t, c
from fltk._types import *
# ============================================================
# fltk/_cfl_surface.vp — extern FFI declarations for cfl_surface.h (cfltk C API)
# ============================================================
# Every function maps directly to a cfltk-generated C symbol (extern "C"); link target: cfltk2.
# Type conventions: Fl_* objects are opaque pointers (Fl_XxxPtr); const char* -> str;
# function pointers / void* -> bytes (pass 0/NULL or leave unused on the Viper side).
extern def Fl_Surface_Device_set_current(self: Fl_Surface_DevicePtr)
extern def Fl_Surface_Device_is_current(self: Fl_Surface_DevicePtr) -> int
extern def Fl_Surface_Device_surface() -> Fl_Surface_DevicePtr
extern def Fl_Surface_Device_push_current(new_current: Fl_Surface_DevicePtr)
extern def Fl_Surface_Device_pop_current() -> Fl_Surface_DevicePtr
extern def Fl_Image_Surface_new(w: int, h: int, high_res: int) -> Fl_Image_SurfacePtr
extern def Fl_Image_Surface_delete(s: Fl_Image_SurfacePtr)
extern def Fl_Image_Surface_set_current(self: Fl_Image_SurfacePtr)
extern def Fl_Image_Surface_is_current(self: Fl_Image_SurfacePtr) -> int
extern def Fl_Image_Surface_image(self: Fl_Image_SurfacePtr) -> bytes
extern def Fl_Image_Surface_highres_image(self: Fl_Image_SurfacePtr) -> bytes
extern def Fl_Image_Surface_origin(self: Fl_Image_SurfacePtr, x: bytes, y: bytes)
extern def Fl_Image_Surface_set_origin(self: Fl_Image_SurfacePtr, x: int, y: int)
extern def Fl_Image_Surface_rescale(self: Fl_Image_SurfacePtr)
extern def Fl_Image_Surface_draw(self: Fl_Image_SurfacePtr, widget: bytes, delta_x: int, delta_y: int)
extern def Fl_Image_Surface_draw_decorated_window(self: Fl_Image_SurfacePtr, widget: bytes, delta_x: int, delta_y: int)
extern def Fl_SVG_File_Surface_new(width: int, height: int, file: str) -> Fl_SVG_File_SurfacePtr
extern def Fl_SVG_File_Surface_delete(self: Fl_SVG_File_SurfacePtr)
extern def Fl_SVG_File_Surface_origin(self: Fl_SVG_File_SurfacePtr, x: int, y: int)
extern def Fl_SVG_File_Surface_printable_rect(self: Fl_SVG_File_SurfacePtr, w: bytes, h: bytes) -> int
extern def Fl_SVG_File_Surface_draw(self: Fl_SVG_File_SurfacePtr, widget: bytes, delta_x: int, delta_y: int)
extern def Fl_SVG_File_Surface_draw_decorated_window(self: Fl_SVG_File_SurfacePtr, widget: bytes, delta_x: int, delta_y: int)