79 lines
4.1 KiB
Plaintext
79 lines
4.1 KiB
Plaintext
# How the generated bindings in generated.flan are shaped. One directive per
|
|
# line, `#` comments, blank lines ignored. A line that is neither directive is
|
|
# an error rather than a line quietly skipped.
|
|
#
|
|
# exclude <C symbol or pattern> do not generate a binding for this
|
|
# name <C symbol> <flan-name> call it this instead of the kebab rule's
|
|
#
|
|
# `*` in an exclude pattern stands for any run of characters, and nothing else
|
|
# does anything.
|
|
#
|
|
# Why this file exists. generated.flan is committed, so it is not a build
|
|
# artefact anybody can hand-correct: the next `flan generate-c vendor/raylib`
|
|
# overwrites it, and an edit made there is destroyed without anybody being
|
|
# told. This file is read *while* those lines are made, so it is the edit that
|
|
# survives regeneration. A postprocessing pass over the generated text was the
|
|
# alternative and was rejected — a second program to understand, applied to
|
|
# output the generator had already committed to.
|
|
#
|
|
# What does NOT belong here. Anything neither directive can express is a
|
|
# hand-written `declare-c` in raylib.flan, which wins over the generated file
|
|
# and is left alone by the importer. That is the escape hatch for a signature
|
|
# the importer gets wrong and for a Flan face the header cannot describe —
|
|
# load-font-ex-raw and load-image-from-memory-raw are both that, each wrapped
|
|
# by a Flan defn of the same name without the suffix.
|
|
|
|
# ── raylib's allocator ──────────────────────────────────────────────
|
|
#
|
|
# raylib exports malloc, realloc and free under its own names. Flan's memory
|
|
# model is explicit — plan.org's rule is that an operation never falls back to
|
|
# a hidden allocator — so binding these would put a second, untracked heap
|
|
# behind three innocuous-looking Flan names, and a pointer from one freed by
|
|
# the other is the kind of bug that does not point at itself. Nothing in the
|
|
# package needs them: raylib's own Load*/Unload* pairs own everything raylib
|
|
# allocates.
|
|
exclude MemAlloc
|
|
exclude MemRealloc
|
|
exclude MemFree
|
|
|
|
# ── Predicates read as questions ────────────────────────────────────
|
|
#
|
|
# The kebab rule gives `is-window-ready`, which is C's phrasing wearing Flan's
|
|
# punctuation. The hand-written bindings in raylib.flan settled the convention
|
|
# years of Lisp settled first — a predicate ends in `?` and does not begin with
|
|
# `is` — and these are the generated half of the same set, so they follow it.
|
|
# key-pressed? and window-ready? being spelled differently would be the split
|
|
# this whole change exists to remove.
|
|
#
|
|
# The C symbol is kept verbatim in the declaration either way, so nothing here
|
|
# is lost: the name is the Flan face and `IsWindowReady` is still what is
|
|
# called and still what the check compares against.
|
|
name IsWindowReady window-ready?
|
|
name IsWindowFullscreen window-fullscreen?
|
|
name IsWindowHidden window-hidden?
|
|
name IsWindowMinimized window-minimized?
|
|
name IsWindowMaximized window-maximized?
|
|
name IsWindowFocused window-focused?
|
|
name IsWindowResized window-resized?
|
|
name IsWindowState window-state?
|
|
name IsCursorOnScreen cursor-on-screen?
|
|
name IsKeyUp key-up?
|
|
name IsKeyPressedRepeat key-pressed-repeat?
|
|
name IsMouseButtonUp mouse-button-up?
|
|
name IsFileDropped file-dropped?
|
|
name IsFileExtension file-extension?
|
|
name IsFileNameValid file-name-valid?
|
|
name IsPathFile path-file?
|
|
name IsAudioStreamValid audio-stream-valid?
|
|
name IsAudioStreamPlaying audio-stream-playing?
|
|
name IsAudioStreamProcessed audio-stream-processed?
|
|
|
|
# Hand-written in raylib.flan, so excluded here: a second declare-c for one C
|
|
# symbol is refused for the whole program. These three are on a game's
|
|
# per-frame path (PORTING.md), and a hand-written line is what the signature
|
|
# check has to compare against -- generated output agrees with the header by
|
|
# construction, so it can only check the hand-written half.
|
|
exclude DrawTexturePro
|
|
exclude ImageFromImage
|
|
exclude IsWindowReady
|