# Raylib API reference

[العربية](reference.ar.md) · [Guide](guide.en.md) · [Deployment](deployment.en.md) · [Reviewed adapters](adapters.md)

Import `core::raylib` or `أساسي::رايليب` in every source module that uses it.
Use the short prefix admitted by that import. Each pair below names one
operation, type, field or constant. Import both spellings to use both prefixes.
User identifiers, user-record fields, strings and paths keep their own identity.
No normal call needs `unsafe`; opaque owners never expose native descriptors.

Signatures use exact ASPL numeric widths. All ordinary operations return checked
results; the seven total readiness/validity probes return bool. Check `ok` before
reading `value`; failures use existing `error::code` and `error::message` fields.
Every new Raylib error message contains English and Arabic. Stable ASCII codes,
not message wording, identify failures. [The guide](guide.en.md) defines owner,
frame, text and failure rules that apply to every entry. Each entry below adds
its context and intentional differences from the pinned upstream operation.

Records require every field exactly once. Both aliases of a field count as a
duplicate. Copies have value semantics and mutation requires a mutable root.
Enums admit same-type equality and storage, without integer construction,
arithmetic or ordering. WindowFlags admits same-type `|`, `&`, `^`, bounded `~`
and equality, using only its five supported bits and empty set. TextureFilter
supports POINT/BILINEAR and TextureWrap supports REPEAT/CLAMP.

The tables and adapter inventory are regenerated by
`python3 tools/generate_raylib_reference.py`. The accepted inventory is checked
against production declarations by `make test-raylib-handoff`.

<!-- catalog:start -->
## Types and fields

| English / العربية | Policy / القاعدة |
| --- | --- |
| `Vector2` / `متجه2` | record / سجل |
| `Rectangle` / `مستطيل` | record / سجل |
| `Color` / `لون` | record / سجل |
| `Camera2D` / `كاميرا2` | record / سجل |
| `TextOptions` / `خيارات_النص` | record / سجل |
| `TextMetrics` / `مقاييس_النص` | record / سجل |
| `Texture` / `نسيج` | opaque shared owner / مالك مشترك معتم |
| `Font` / `خط` | opaque shared owner / مالك مشترك معتم |
| `Sound` / `صوت` | opaque shared owner / مالك مشترك معتم |
| `Music` / `موسيقى` | opaque shared owner / مالك مشترك معتم |
| `TextLayout` / `تخطيط_نص` | opaque shared owner / مالك مشترك معتم |
| `Key` / `مفتاح` | nominal enum / تعداد اسمي |
| `MouseButton` / `زر_فأرة` | nominal enum / تعداد اسمي |
| `TextureFilter` / `مرشح_نسيج` | nominal enum / تعداد اسمي |
| `TextureWrap` / `التفاف_نسيج` | nominal enum / تعداد اسمي |
| `TextDirection` / `اتجاه_نص` | nominal enum / تعداد اسمي |
| `TextAlignment` / `محاذاة_نص` | nominal enum / تعداد اسمي |
| `WindowFlags` / `أعلام_نافذة` | bounded flags / أعلام محدودة |

### `Vector2` / `متجه2`

| English / العربية | Type / النوع |
| --- | --- |
| `x` / `س` | `f32` |
| `y` / `ص` | `f32` |

### `Rectangle` / `مستطيل`

| English / العربية | Type / النوع |
| --- | --- |
| `x` / `س` | `f32` |
| `y` / `ص` | `f32` |
| `width` / `عرض` | `f32` |
| `height` / `ارتفاع` | `f32` |

### `Color` / `لون`

| English / العربية | Type / النوع |
| --- | --- |
| `r` / `أحمر` | `u8` |
| `g` / `أخضر` | `u8` |
| `b` / `أزرق` | `u8` |
| `a` / `ألفا` | `u8` |

### `Camera2D` / `كاميرا2`

| English / العربية | Type / النوع |
| --- | --- |
| `offset` / `إزاحة` | `Vector2` |
| `target` / `هدف` | `Vector2` |
| `rotation` / `دوران` | `f32` |
| `zoom` / `تكبير` | `f32` |

### `TextOptions` / `خيارات_النص`

| English / العربية | Type / النوع |
| --- | --- |
| `font_size` / `حجم_الخط` | `f32` |
| `direction` / `اتجاه` | `TextDirection` |
| `has_width` / `له_عرض` | `bool` |
| `width` / `عرض` | `f32` |
| `alignment` / `محاذاة` | `TextAlignment` |
| `line_spacing` / `تباعد_الأسطر` | `f32` |

### `TextMetrics` / `مقاييس_النص`

| English / العربية | Type / النوع |
| --- | --- |
| `size` / `حجم` | `Vector2` |
| `ink` / `حبر` | `Rectangle` |

## Operations

### `SetConfigFlags` / `اضبط_أعلام_الإعداد`

`(flags: WindowFlags) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Replaces saved next-window flags. Call before opening a window; flags survive reopen.

[Raylib 6.0 `SetConfigFlags`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `InitWindow` / `هيئ_نافذة`

`(width: i32, height: i32, title: string) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Positive dimensions; title bytes are copied and retained. New generations reset Escape, input and timing.

[Raylib 6.0 `InitWindow`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsWindowReady` / `هل_النافذة_جاهزة`

`() -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsWindowReady`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `WindowShouldClose` / `هل_يجب_إغلاق_النافذة`

`() -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `WindowShouldClose`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CloseWindow` / `أغلق_النافذة`

`() -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Closes texture aliases and GPU caches before destroying the context. CPU fonts/layouts survive.

[Raylib 6.0 `CloseWindow`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetWindowTitle` / `اضبط_عنوان_النافذة`

`(title: string) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Retains copied title backing until replacement/native quiescence. Refusal preserves the current title; NUL is refused.

[Raylib 6.0 `SetWindowTitle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetScreenWidth` / `عرض_الشاشة`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetScreenWidth`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetScreenHeight` / `ارتفاع_الشاشة`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetScreenHeight`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetRenderWidth` / `عرض_التصيير`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetRenderWidth`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetRenderHeight` / `ارتفاع_التصيير`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetRenderHeight`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsWindowResized` / `هل_تغير_حجم_النافذة`

`() -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsWindowResized`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `BeginDrawing` / `ابدأ_الرسم`

`() -> result<unit>`

Application, main thread; obey the drawing/mode pair rules.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `BeginDrawing`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `EndDrawing` / `أنه_الرسم`

`() -> result<unit>`

Application, main thread; obey the drawing/mode pair rules.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `EndDrawing`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `ClearBackground` / `امسح_الخلفية`

`(color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `ClearBackground`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetTargetFPS` / `اضبط_معدل_الإطارات`

`(fps: i32) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Nonnegative FPS; zero is uncapped. Saved pacing survives reopen.

[Raylib 6.0 `SetTargetFPS`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetFrameTime` / `زمن_الإطار`

`() -> result<f32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetFrameTime`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetTime` / `الزمن`

`() -> result<f64>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetTime`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetFPS` / `معدل_الإطارات`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetFPS`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsKeyPressed` / `هل_ضغط_المفتاح`

`(key: Key) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsKeyPressed`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsKeyPressedRepeat` / `هل_تكرر_ضغط_المفتاح`

`(key: Key) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsKeyPressedRepeat`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsKeyDown` / `هل_المفتاح_مضغوط`

`(key: Key) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsKeyDown`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsKeyReleased` / `هل_حرر_المفتاح`

`(key: Key) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsKeyReleased`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsKeyUp` / `هل_المفتاح_غير_مضغوط`

`(key: Key) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsKeyUp`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetKeyPressed` / `المفتاح_المضغوط`

`() -> result<Key>`

Application, main thread, live window; sampled observations allowed inside a frame.

Consumes one queue entry; an empty queue returns KEY_NULL.

[Raylib 6.0 `GetKeyPressed`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetCharPressed` / `المحرف_المدخل`

`() -> result<i32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Consumes one queue entry; returns i32 zero or a checked Unicode scalar.

[Raylib 6.0 `GetCharPressed`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetExitKey` / `اضبط_مفتاح_الخروج`

`(key: Key) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

KEY_NULL disables the exit key. Reopen restores Escape.

[Raylib 6.0 `SetExitKey`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMouseButtonPressed` / `هل_ضغط_زر_الفأرة`

`(button: MouseButton) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMouseButtonPressed`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMouseButtonDown` / `هل_زر_الفأرة_مضغوط`

`(button: MouseButton) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMouseButtonDown`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMouseButtonReleased` / `هل_حرر_زر_الفأرة`

`(button: MouseButton) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMouseButtonReleased`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMouseButtonUp` / `هل_زر_الفأرة_غير_مضغوط`

`(button: MouseButton) -> result<bool>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMouseButtonUp`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMousePosition` / `موضع_الفأرة`

`() -> result<Vector2>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMousePosition`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMouseDelta` / `تغير_موضع_الفأرة`

`() -> result<Vector2>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMouseDelta`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMouseWheelMove` / `حركة_عجلة_الفأرة`

`() -> result<f32>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMouseWheelMove`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMouseWheelMoveV` / `حركة_عجلة_الفأرة_بمتجه`

`() -> result<Vector2>`

Application, main thread, live window; sampled observations allowed inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMouseWheelMoveV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawPixel` / `ارسم_بكسلا`

`(posX: i32, posY: i32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawPixel`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawPixelV` / `ارسم_بكسلا_بمتجه`

`(position: Vector2, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawPixelV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawLine` / `ارسم_خطا`

`(startPosX: i32, startPosY: i32, endPosX: i32, endPosY: i32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawLine`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawLineV` / `ارسم_خطا_بمتجه`

`(startPos: Vector2, endPos: Vector2, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawLineV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawLineEx` / `ارسم_خطا_موسعا`

`(startPos: Vector2, endPos: Vector2, thick: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawLineEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawCircle` / `ارسم_دائرة`

`(centerX: i32, centerY: i32, radius: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawCircle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawCircleV` / `ارسم_دائرة_بمتجه`

`(center: Vector2, radius: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawCircleV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawCircleLines` / `ارسم_محيط_دائرة`

`(centerX: i32, centerY: i32, radius: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawCircleLines`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectangle` / `ارسم_مستطيلا`

`(posX: i32, posY: i32, width: i32, height: i32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectangle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectangleV` / `ارسم_مستطيلا_بمتجه`

`(position: Vector2, size: Vector2, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectangleV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectangleRec` / `ارسم_مستطيلا_بسجل`

`(rec: Rectangle, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectangleRec`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectanglePro` / `ارسم_مستطيلا_متقدما`

`(rec: Rectangle, origin: Vector2, rotation: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectanglePro`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectangleLines` / `ارسم_محيط_مستطيل`

`(posX: i32, posY: i32, width: i32, height: i32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectangleLines`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawRectangleLinesEx` / `ارسم_محيط_مستطيل_موسعا`

`(rec: Rectangle, lineThick: f32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawRectangleLinesEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTriangle` / `ارسم_مثلثا`

`(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawTriangle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTriangleLines` / `ارسم_محيط_مثلث`

`(v1: Vector2, v2: Vector2, v3: Vector2, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `DrawTriangleLines`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `BeginMode2D` / `ابدأ_وضع_ثنائي_الأبعاد`

`(camera: Camera2D) -> result<unit>`

Application, main thread; obey the drawing/mode pair rules.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `BeginMode2D`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `EndMode2D` / `أنه_وضع_ثنائي_الأبعاد`

`() -> result<unit>`

Application, main thread; obey the drawing/mode pair rules.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `EndMode2D`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetWorldToScreen2D` / `من_العالم_إلى_الشاشة`

`(position: Vector2, camera: Camera2D) -> result<Vector2>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetWorldToScreen2D`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetScreenToWorld2D` / `من_الشاشة_إلى_العالم`

`(position: Vector2, camera: Camera2D) -> result<Vector2>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetScreenToWorld2D`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionRecs` / `هل_يتداخل_مستطيلان`

`(rec1: Rectangle, rec2: Rectangle) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionRecs`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionCircles` / `هل_تتداخل_دائرتان`

`(center1: Vector2, radius1: f32, center2: Vector2, radius2: f32) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionCircles`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionCircleRec` / `هل_تتداخل_دائرة_ومستطيل`

`(center: Vector2, radius: f32, rec: Rectangle) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionCircleRec`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionPointRec` / `هل_النقطة_في_مستطيل`

`(point: Vector2, rec: Rectangle) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionPointRec`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionPointCircle` / `هل_النقطة_في_دائرة`

`(point: Vector2, center: Vector2, radius: f32) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionPointCircle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CheckCollisionPointTriangle` / `هل_النقطة_في_مثلث`

`(point: Vector2, p1: Vector2, p2: Vector2, p3: Vector2) -> result<bool>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `CheckCollisionPointTriangle`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetCollisionRec` / `مستطيل_التداخل`

`(rec1: Rectangle, rec2: Rectangle) -> result<Rectangle>`

Pure checked math; handlers/callbacks allowed; no device/frame prerequisite.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetCollisionRec`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `LoadTexture` / `حمل_نسيجا`

`(fileName: string) -> result<Texture>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

PNG only, with process-working-directory paths and copied path bytes. Requires a live window.

[Raylib 6.0 `LoadTexture`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsTextureValid` / `هل_النسيج_صالح`

`(texture: Texture) -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsTextureValid`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `UnloadTexture` / `حرر_النسيج`

`(texture: Texture) -> result<unit>`

Application, main thread; logical close may occur in a frame. Already closed unload succeeds.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `UnloadTexture`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetTextureFilter` / `اضبط_مرشح_النسيج`

`(texture: Texture, filter: TextureFilter) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `SetTextureFilter`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetTextureWrap` / `اضبط_التفاف_النسيج`

`(texture: Texture, wrap: TextureWrap) -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `SetTextureWrap`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTexture` / `ارسم_نسيجا`

`(texture: Texture, posX: i32, posY: i32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Signed source rectangles preserve flipping; zero/negative scale and signed destinations retain admitted Raylib behavior. Derived geometry must remain representable.

[Raylib 6.0 `DrawTexture`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTextureV` / `ارسم_نسيجا_بمتجه`

`(texture: Texture, position: Vector2, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Signed source rectangles preserve flipping; zero/negative scale and signed destinations retain admitted Raylib behavior. Derived geometry must remain representable.

[Raylib 6.0 `DrawTextureV`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTextureEx` / `ارسم_نسيجا_موسعا`

`(texture: Texture, position: Vector2, rotation: f32, scale: f32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Signed source rectangles preserve flipping; zero/negative scale and signed destinations retain admitted Raylib behavior. Derived geometry must remain representable.

[Raylib 6.0 `DrawTextureEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTextureRec` / `ارسم_جزء_نسيج`

`(texture: Texture, source: Rectangle, position: Vector2, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Signed source rectangles preserve flipping; zero/negative scale and signed destinations retain admitted Raylib behavior. Derived geometry must remain representable.

[Raylib 6.0 `DrawTextureRec`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTexturePro` / `ارسم_نسيجا_متقدما`

`(texture: Texture, source: Rectangle, dest: Rectangle, origin: Vector2, rotation: f32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Signed source rectangles preserve flipping; zero/negative scale and signed destinations retain admitted Raylib behavior. Derived geometry must remain representable.

[Raylib 6.0 `DrawTexturePro`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetFontDefault` / `الخط_الافتراضي`

`() -> result<Font>`

CPU text; handlers/callbacks allowed; no window required.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetFontDefault`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `LoadFont` / `حمل_خطا`

`(fileName: string) -> result<Font>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Single-face TrueType outlines; copied file bytes survive file replacement. Default fallback remains available.

[Raylib 6.0 `LoadFont`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `LoadFontEx` / `حمل_خطا_موسعا`

`(fileName: string, fontSize: i32, codepoints: list<i32>) -> result<Font>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Base size 1..4096. list<i32> contains copied scalar prewarming hints; empty means no hints, never restricted coverage.

[Raylib 6.0 `LoadFontEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsFontValid` / `هل_الخط_صالح`

`(font: Font) -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsFontValid`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `UnloadFont` / `حرر_الخط`

`(font: Font) -> result<unit>`

CPU text; handlers/callbacks allowed; no window required.

Alias-safe close. Existing layouts retain independent font backing; unloading the default Font succeeds without closing it.

[Raylib 6.0 `UnloadFont`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawText` / `ارسم_نصا`

`(text: string, posX: i32, posY: i32, fontSize: i32, color: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Shaped Arabic/Latin text in logical order; known preparation failure submits none of this text request. Ex/Pro spacing must be zero.

[Raylib 6.0 `DrawText`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTextEx` / `ارسم_نصا_موسعا`

`(font: Font, text: string, position: Vector2, fontSize: f32, spacing: f32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Shaped Arabic/Latin text in logical order; known preparation failure submits none of this text request. Ex/Pro spacing must be zero.

[Raylib 6.0 `DrawTextEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `DrawTextPro` / `ارسم_نصا_متقدما`

`(font: Font, text: string, position: Vector2, origin: Vector2, rotation: f32, fontSize: f32, spacing: f32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Shaped Arabic/Latin text in logical order; known preparation failure submits none of this text request. Ex/Pro spacing must be zero.

[Raylib 6.0 `DrawTextPro`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `MeasureText` / `قس_النص`

`(text: string, fontSize: i32) -> result<i32>`

CPU text; handlers/callbacks allowed; no window required.

Shaped default-font width, rounded upward to checked i32; size 1..4096.

[Raylib 6.0 `MeasureText`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `MeasureTextEx` / `قس_النص_موسعا`

`(font: Font, text: string, fontSize: f32, spacing: f32) -> result<Vector2>`

CPU text; handlers/callbacks allowed; no window required.

Shaped logical size; spacing must be zero and size 0.5..4096.

[Raylib 6.0 `MeasureTextEx`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `InitAudioDevice` / `هيئ_جهاز_الصوت`

`() -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `InitAudioDevice`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CloseAudioDevice` / `أغلق_جهاز_الصوت`

`() -> result<unit>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

Stops and closes dependent Sound/Music aliases before releasing the device.

[Raylib 6.0 `CloseAudioDevice`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsAudioDeviceReady` / `هل_جهاز_الصوت_جاهز`

`() -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsAudioDeviceReady`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetMasterVolume` / `اضبط_مستوى_الصوت_العام`

`(volume: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Volume 0..1.

[Raylib 6.0 `SetMasterVolume`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMasterVolume` / `مستوى_الصوت_العام`

`() -> result<f32>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMasterVolume`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `LoadSound` / `حمل_صوتا`

`(fileName: string) -> result<Sound>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

WAV/OGG/MP3 files; paths resolve from the process working directory. Resource belongs to the current audio generation.

[Raylib 6.0 `LoadSound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsSoundValid` / `هل_الصوت_صالح`

`(sound: Sound) -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsSoundValid`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `UnloadSound` / `حرر_الصوت`

`(sound: Sound) -> result<unit>`

Application, main thread; logical close may occur in a frame. Already closed unload succeeds.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `UnloadSound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `PlaySound` / `شغل_الصوت`

`(sound: Sound) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `PlaySound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `StopSound` / `أوقف_الصوت`

`(sound: Sound) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `StopSound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `PauseSound` / `أوقف_الصوت_مؤقتا`

`(sound: Sound) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `PauseSound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `ResumeSound` / `استأنف_الصوت`

`(sound: Sound) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `ResumeSound`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsSoundPlaying` / `هل_الصوت_يعمل`

`(sound: Sound) -> result<bool>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsSoundPlaying`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetSoundVolume` / `اضبط_مستوى_الصوت`

`(sound: Sound, volume: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Volume 0..1.

[Raylib 6.0 `SetSoundVolume`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetSoundPitch` / `اضبط_حدة_الصوت`

`(sound: Sound, pitch: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Positive finite pitch and checked derived resampling rate. Refusal before native entry preserves the previous pitch.

[Raylib 6.0 `SetSoundPitch`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetSoundPan` / `اضبط_توازن_الصوت`

`(sound: Sound, pan: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Pan -1..1.

[Raylib 6.0 `SetSoundPan`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `LoadMusicStream` / `حمل_تدفق_موسيقى`

`(fileName: string) -> result<Music>`

Application, main thread, outside drawing frames; device/owner prerequisites apply.

WAV/OGG/MP3 files; paths resolve from the process working directory. Resource belongs to the current audio generation.

[Raylib 6.0 `LoadMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMusicValid` / `هل_الموسيقى_صالحة`

`(music: Music) -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMusicValid`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `UnloadMusicStream` / `حرر_تدفق_الموسيقى`

`(music: Music) -> result<unit>`

Application, main thread; logical close may occur in a frame. Already closed unload succeeds.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `UnloadMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `PlayMusicStream` / `شغل_تدفق_الموسيقى`

`(music: Music) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `PlayMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `IsMusicStreamPlaying` / `هل_تدفق_الموسيقى_يعمل`

`(music: Music) -> result<bool>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `IsMusicStreamPlaying`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `UpdateMusicStream` / `حدث_تدفق_الموسيقى`

`(music: Music) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Explicit application update; no automatic streaming loop or source callback.

[Raylib 6.0 `UpdateMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `StopMusicStream` / `أوقف_تدفق_الموسيقى`

`(music: Music) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `StopMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `PauseMusicStream` / `أوقف_تدفق_الموسيقى_مؤقتا`

`(music: Music) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `PauseMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `ResumeMusicStream` / `استأنف_تدفق_الموسيقى`

`(music: Music) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `ResumeMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SeekMusicStream` / `اضبط_موضع_تدفق_الموسيقى`

`(music: Music, position: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Finite seconds 0..reported length inclusive. Endpoint means logical EOF; later update loops playing music or stops nonlooping/empty music. Decoder refusal closes the owner.

[Raylib 6.0 `SeekMusicStream`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetMusicVolume` / `اضبط_مستوى_الموسيقى`

`(music: Music, volume: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Volume 0..1.

[Raylib 6.0 `SetMusicVolume`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetMusicPitch` / `اضبط_حدة_الموسيقى`

`(music: Music, pitch: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Positive finite pitch and checked derived resampling rate. Refusal before native entry preserves the previous pitch.

[Raylib 6.0 `SetMusicPitch`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `SetMusicPan` / `اضبط_توازن_الموسيقى`

`(music: Music, pan: f32) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

Pan -1..1.

[Raylib 6.0 `SetMusicPan`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMusicTimeLength` / `مدة_الموسيقى`

`(music: Music) -> result<f32>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMusicTimeLength`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `GetMusicTimePlayed` / `زمن_الموسيقى_المنقضي`

`(music: Music) -> result<f32>`

Application, main thread, live audio device/owner; permitted inside a frame.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

[Raylib 6.0 `GetMusicTimePlayed`](https://github.com/raysan5/raylib/blob/dbc56a87da87d973a9c5baa4e7438a9d20121d28/src/raylib.h).

### `CreateTextLayout` / `أنشئ_تخطيط_نص`

`(font: Font, text: string, options: TextOptions) -> result<TextLayout>`

CPU text; handlers/callbacks allowed; no window required.

Immutable CPU layout; options supply every field. It retains fonts and survives window recreation.

ASPL accessor/layout operation; no public upstream counterpart.

### `MeasureTextLayout` / `قس_تخطيط_النص`

`(layout: TextLayout) -> result<TextMetrics>`

CPU text; handlers/callbacks allowed; no window required.

size is the logical box, ink is the local glyph bounds. Measurement and drawing share positions.

ASPL accessor/layout operation; no public upstream counterpart.

### `DrawTextLayout` / `ارسم_تخطيط_النص`

`(layout: TextLayout, position: Vector2, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Shaped Arabic/Latin text in logical order; known preparation failure submits none of this text request. Ex/Pro spacing must be zero.

ASPL accessor/layout operation; no public upstream counterpart.

### `DrawTextLayoutPro` / `ارسم_تخطيط_النص_متقدما`

`(layout: TextLayout, position: Vector2, origin: Vector2, rotation: f32, tint: Color) -> result<unit>`

Application, main thread, inside a drawing frame.

Shaped Arabic/Latin text in logical order; known preparation failure submits none of this text request. Ex/Pro spacing must be zero.

ASPL accessor/layout operation; no public upstream counterpart.

### `IsTextLayoutValid` / `هل_تخطيط_النص_صالح`

`(layout: TextLayout) -> bool`

Total probe; handlers/callbacks allowed; no native device entry.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

ASPL accessor/layout operation; no public upstream counterpart.

### `UnloadTextLayout` / `حرر_تخطيط_النص`

`(layout: TextLayout) -> result<unit>`

CPU text; handlers/callbacks allowed; no window required.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

ASPL accessor/layout operation; no public upstream counterpart.

### `GetTextureWidth` / `عرض_النسيج`

`(texture: Texture) -> result<i32>`

Read-only owner metadata; handlers/callbacks allowed; closed-owner checks apply.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

ASPL accessor/layout operation; no public upstream counterpart.

### `GetTextureHeight` / `ارتفاع_النسيج`

`(texture: Texture) -> result<i32>`

Read-only owner metadata; handlers/callbacks allowed; closed-owner checks apply.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

ASPL accessor/layout operation; no public upstream counterpart.

### `GetFontBaseSize` / `حجم_الخط_الأساسي`

`(font: Font) -> result<i32>`

CPU text; handlers/callbacks allowed; no window required.

Checked widths, owner generations and results follow the guide. Refusal before native entry preserves state.

ASPL accessor/layout operation; no public upstream counterpart.

### `GetMusicLooping` / `هل_الموسيقى_تتكرر`

`(music: Music) -> result<bool>`

Read-only owner metadata; handlers/callbacks allowed; closed-owner checks apply.

Reads retained metadata without entering the audio device.

ASPL accessor/layout operation; no public upstream counterpart.

### `SetMusicLooping` / `اضبط_تكرار_الموسيقى`

`(music: Music, looping: bool) -> result<unit>`

Application, main thread, live audio device/owner; permitted inside a frame.

An audio control requiring application admission and a live audio owner.

ASPL accessor/layout operation; no public upstream counterpart.

## Constants and type membership

| English / العربية | Type / النوع | Native mapping / القيمة |
| --- | --- | --- |
| `KEY_NULL` / `مفتاح_لا_شيء` | `Key` | `0` |
| `KEY_APOSTROPHE` / `مفتاح_اقتباس_مفرد` | `Key` | `39` |
| `KEY_COMMA` / `مفتاح_فاصلة` | `Key` | `44` |
| `KEY_MINUS` / `مفتاح_ناقص` | `Key` | `45` |
| `KEY_PERIOD` / `مفتاح_نقطة` | `Key` | `46` |
| `KEY_SLASH` / `مفتاح_شرطة_مائلة` | `Key` | `47` |
| `KEY_ZERO` / `مفتاح_0` | `Key` | `48` |
| `KEY_ONE` / `مفتاح_1` | `Key` | `49` |
| `KEY_TWO` / `مفتاح_2` | `Key` | `50` |
| `KEY_THREE` / `مفتاح_3` | `Key` | `51` |
| `KEY_FOUR` / `مفتاح_4` | `Key` | `52` |
| `KEY_FIVE` / `مفتاح_5` | `Key` | `53` |
| `KEY_SIX` / `مفتاح_6` | `Key` | `54` |
| `KEY_SEVEN` / `مفتاح_7` | `Key` | `55` |
| `KEY_EIGHT` / `مفتاح_8` | `Key` | `56` |
| `KEY_NINE` / `مفتاح_9` | `Key` | `57` |
| `KEY_SEMICOLON` / `مفتاح_فاصلة_منقوطة` | `Key` | `59` |
| `KEY_EQUAL` / `مفتاح_يساوي` | `Key` | `61` |
| `KEY_A` / `مفتاح_A` | `Key` | `65` |
| `KEY_B` / `مفتاح_B` | `Key` | `66` |
| `KEY_C` / `مفتاح_C` | `Key` | `67` |
| `KEY_D` / `مفتاح_D` | `Key` | `68` |
| `KEY_E` / `مفتاح_E` | `Key` | `69` |
| `KEY_F` / `مفتاح_F` | `Key` | `70` |
| `KEY_G` / `مفتاح_G` | `Key` | `71` |
| `KEY_H` / `مفتاح_H` | `Key` | `72` |
| `KEY_I` / `مفتاح_I` | `Key` | `73` |
| `KEY_J` / `مفتاح_J` | `Key` | `74` |
| `KEY_K` / `مفتاح_K` | `Key` | `75` |
| `KEY_L` / `مفتاح_L` | `Key` | `76` |
| `KEY_M` / `مفتاح_M` | `Key` | `77` |
| `KEY_N` / `مفتاح_N` | `Key` | `78` |
| `KEY_O` / `مفتاح_O` | `Key` | `79` |
| `KEY_P` / `مفتاح_P` | `Key` | `80` |
| `KEY_Q` / `مفتاح_Q` | `Key` | `81` |
| `KEY_R` / `مفتاح_R` | `Key` | `82` |
| `KEY_S` / `مفتاح_S` | `Key` | `83` |
| `KEY_T` / `مفتاح_T` | `Key` | `84` |
| `KEY_U` / `مفتاح_U` | `Key` | `85` |
| `KEY_V` / `مفتاح_V` | `Key` | `86` |
| `KEY_W` / `مفتاح_W` | `Key` | `87` |
| `KEY_X` / `مفتاح_X` | `Key` | `88` |
| `KEY_Y` / `مفتاح_Y` | `Key` | `89` |
| `KEY_Z` / `مفتاح_Z` | `Key` | `90` |
| `KEY_LEFT_BRACKET` / `مفتاح_قوس_مربع_أيسر` | `Key` | `91` |
| `KEY_BACKSLASH` / `مفتاح_شرطة_مائلة_عكسية` | `Key` | `92` |
| `KEY_RIGHT_BRACKET` / `مفتاح_قوس_مربع_أيمن` | `Key` | `93` |
| `KEY_GRAVE` / `مفتاح_اقتباس_خلفي` | `Key` | `96` |
| `KEY_SPACE` / `مفتاح_مسافة` | `Key` | `32` |
| `KEY_ESCAPE` / `مفتاح_هروب` | `Key` | `256` |
| `KEY_ENTER` / `مفتاح_إدخال` | `Key` | `257` |
| `KEY_TAB` / `مفتاح_جدولة` | `Key` | `258` |
| `KEY_BACKSPACE` / `مفتاح_مسح_خلفي` | `Key` | `259` |
| `KEY_INSERT` / `مفتاح_إدراج` | `Key` | `260` |
| `KEY_DELETE` / `مفتاح_حذف` | `Key` | `261` |
| `KEY_RIGHT` / `مفتاح_يمين` | `Key` | `262` |
| `KEY_LEFT` / `مفتاح_يسار` | `Key` | `263` |
| `KEY_DOWN` / `مفتاح_أسفل` | `Key` | `264` |
| `KEY_UP` / `مفتاح_أعلى` | `Key` | `265` |
| `KEY_PAGE_UP` / `مفتاح_صفحة_لأعلى` | `Key` | `266` |
| `KEY_PAGE_DOWN` / `مفتاح_صفحة_لأسفل` | `Key` | `267` |
| `KEY_HOME` / `مفتاح_بداية` | `Key` | `268` |
| `KEY_END` / `مفتاح_نهاية` | `Key` | `269` |
| `KEY_CAPS_LOCK` / `مفتاح_قفل_الأحرف` | `Key` | `280` |
| `KEY_SCROLL_LOCK` / `مفتاح_قفل_التمرير` | `Key` | `281` |
| `KEY_NUM_LOCK` / `مفتاح_قفل_الأرقام` | `Key` | `282` |
| `KEY_PRINT_SCREEN` / `مفتاح_طباعة_الشاشة` | `Key` | `283` |
| `KEY_PAUSE` / `مفتاح_إيقاف_مؤقت` | `Key` | `284` |
| `KEY_F1` / `مفتاح_F1` | `Key` | `290` |
| `KEY_F2` / `مفتاح_F2` | `Key` | `291` |
| `KEY_F3` / `مفتاح_F3` | `Key` | `292` |
| `KEY_F4` / `مفتاح_F4` | `Key` | `293` |
| `KEY_F5` / `مفتاح_F5` | `Key` | `294` |
| `KEY_F6` / `مفتاح_F6` | `Key` | `295` |
| `KEY_F7` / `مفتاح_F7` | `Key` | `296` |
| `KEY_F8` / `مفتاح_F8` | `Key` | `297` |
| `KEY_F9` / `مفتاح_F9` | `Key` | `298` |
| `KEY_F10` / `مفتاح_F10` | `Key` | `299` |
| `KEY_F11` / `مفتاح_F11` | `Key` | `300` |
| `KEY_F12` / `مفتاح_F12` | `Key` | `301` |
| `KEY_LEFT_SHIFT` / `مفتاح_تبديل_أيسر` | `Key` | `340` |
| `KEY_LEFT_CONTROL` / `مفتاح_تحكم_أيسر` | `Key` | `341` |
| `KEY_LEFT_ALT` / `مفتاح_بديل_أيسر` | `Key` | `342` |
| `KEY_LEFT_SUPER` / `مفتاح_نظام_أيسر` | `Key` | `343` |
| `KEY_RIGHT_SHIFT` / `مفتاح_تبديل_أيمن` | `Key` | `344` |
| `KEY_RIGHT_CONTROL` / `مفتاح_تحكم_أيمن` | `Key` | `345` |
| `KEY_RIGHT_ALT` / `مفتاح_بديل_أيمن` | `Key` | `346` |
| `KEY_RIGHT_SUPER` / `مفتاح_نظام_أيمن` | `Key` | `347` |
| `KEY_KB_MENU` / `مفتاح_قائمة_لوحة_المفاتيح` | `Key` | `348` |
| `KEY_KP_0` / `مفتاح_لوحة_أرقام_0` | `Key` | `320` |
| `KEY_KP_1` / `مفتاح_لوحة_أرقام_1` | `Key` | `321` |
| `KEY_KP_2` / `مفتاح_لوحة_أرقام_2` | `Key` | `322` |
| `KEY_KP_3` / `مفتاح_لوحة_أرقام_3` | `Key` | `323` |
| `KEY_KP_4` / `مفتاح_لوحة_أرقام_4` | `Key` | `324` |
| `KEY_KP_5` / `مفتاح_لوحة_أرقام_5` | `Key` | `325` |
| `KEY_KP_6` / `مفتاح_لوحة_أرقام_6` | `Key` | `326` |
| `KEY_KP_7` / `مفتاح_لوحة_أرقام_7` | `Key` | `327` |
| `KEY_KP_8` / `مفتاح_لوحة_أرقام_8` | `Key` | `328` |
| `KEY_KP_9` / `مفتاح_لوحة_أرقام_9` | `Key` | `329` |
| `KEY_KP_DECIMAL` / `مفتاح_لوحة_أرقام_عشرية` | `Key` | `330` |
| `KEY_KP_DIVIDE` / `مفتاح_لوحة_أرقام_قسمة` | `Key` | `331` |
| `KEY_KP_MULTIPLY` / `مفتاح_لوحة_أرقام_ضرب` | `Key` | `332` |
| `KEY_KP_SUBTRACT` / `مفتاح_لوحة_أرقام_طرح` | `Key` | `333` |
| `KEY_KP_ADD` / `مفتاح_لوحة_أرقام_جمع` | `Key` | `334` |
| `KEY_KP_ENTER` / `مفتاح_لوحة_أرقام_إدخال` | `Key` | `335` |
| `KEY_KP_EQUAL` / `مفتاح_لوحة_أرقام_يساوي` | `Key` | `336` |
| `KEY_BACK` / `مفتاح_رجوع` | `Key` | `4` |
| `KEY_MENU` / `مفتاح_قائمة` | `Key` | `5` |
| `KEY_VOLUME_UP` / `مفتاح_رفع_الصوت` | `Key` | `24` |
| `KEY_VOLUME_DOWN` / `مفتاح_خفض_الصوت` | `Key` | `25` |
| `MOUSE_BUTTON_LEFT` / `زر_فأرة_أيسر` | `MouseButton` | `0` |
| `MOUSE_BUTTON_RIGHT` / `زر_فأرة_أيمن` | `MouseButton` | `1` |
| `MOUSE_BUTTON_MIDDLE` / `زر_فأرة_أوسط` | `MouseButton` | `2` |
| `MOUSE_BUTTON_SIDE` / `زر_فأرة_جانبي` | `MouseButton` | `3` |
| `MOUSE_BUTTON_EXTRA` / `زر_فأرة_إضافي` | `MouseButton` | `4` |
| `MOUSE_BUTTON_FORWARD` / `زر_فأرة_تقدم` | `MouseButton` | `5` |
| `MOUSE_BUTTON_BACK` / `زر_فأرة_رجوع` | `MouseButton` | `6` |
| `TEXTURE_FILTER_POINT` / `مرشح_نسيج_نقطي` | `TextureFilter` | `0` |
| `TEXTURE_FILTER_BILINEAR` / `مرشح_نسيج_ثنائي_الخطية` | `TextureFilter` | `1` |
| `TEXTURE_WRAP_REPEAT` / `التفاف_نسيج_تكرار` | `TextureWrap` | `0` |
| `TEXTURE_WRAP_CLAMP` / `التفاف_نسيج_تثبيت` | `TextureWrap` | `1` |
| `FLAG_VSYNC_HINT` / `علم_تلميح_تزامن_رأسي` | `WindowFlags` | `64` |
| `FLAG_FULLSCREEN_MODE` / `علم_ملء_الشاشة` | `WindowFlags` | `2` |
| `FLAG_WINDOW_RESIZABLE` / `علم_نافذة_قابلة_للتحجيم` | `WindowFlags` | `4` |
| `FLAG_WINDOW_HIGHDPI` / `علم_نافذة_عالية_الكثافة` | `WindowFlags` | `8192` |
| `FLAG_MSAA_4X_HINT` / `علم_تلميح_تنعيم_4X` | `WindowFlags` | `32` |
| `WINDOW_FLAGS_NONE` / `أعلام_نافذة_فارغة` | `WindowFlags` | `0` |
| `LIGHTGRAY` / `رمادي_فاتح` | `Color` | `[200, 200, 200, 255]` |
| `GRAY` / `رمادي` | `Color` | `[130, 130, 130, 255]` |
| `DARKGRAY` / `رمادي_داكن` | `Color` | `[80, 80, 80, 255]` |
| `YELLOW` / `أصفر` | `Color` | `[253, 249, 0, 255]` |
| `GOLD` / `ذهبي` | `Color` | `[255, 203, 0, 255]` |
| `ORANGE` / `برتقالي` | `Color` | `[255, 161, 0, 255]` |
| `PINK` / `وردي` | `Color` | `[255, 109, 194, 255]` |
| `RED` / `أحمر` | `Color` | `[230, 41, 55, 255]` |
| `MAROON` / `عنابي` | `Color` | `[190, 33, 55, 255]` |
| `GREEN` / `أخضر` | `Color` | `[0, 228, 48, 255]` |
| `LIME` / `أخضر_ليموني` | `Color` | `[0, 158, 47, 255]` |
| `DARKGREEN` / `أخضر_داكن` | `Color` | `[0, 117, 44, 255]` |
| `SKYBLUE` / `أزرق_سماوي` | `Color` | `[102, 191, 255, 255]` |
| `BLUE` / `أزرق` | `Color` | `[0, 121, 241, 255]` |
| `DARKBLUE` / `أزرق_داكن` | `Color` | `[0, 82, 172, 255]` |
| `PURPLE` / `أرجواني` | `Color` | `[200, 122, 255, 255]` |
| `VIOLET` / `بنفسجي` | `Color` | `[135, 60, 190, 255]` |
| `DARKPURPLE` / `أرجواني_داكن` | `Color` | `[112, 31, 126, 255]` |
| `BEIGE` / `بيج` | `Color` | `[211, 176, 131, 255]` |
| `BROWN` / `بني` | `Color` | `[127, 106, 79, 255]` |
| `DARKBROWN` / `بني_داكن` | `Color` | `[76, 63, 47, 255]` |
| `WHITE` / `أبيض` | `Color` | `[255, 255, 255, 255]` |
| `BLACK` / `أسود` | `Color` | `[0, 0, 0, 255]` |
| `BLANK` / `شفاف` | `Color` | `[0, 0, 0, 0]` |
| `MAGENTA` / `فوشي` | `Color` | `[255, 0, 255, 255]` |
| `RAYWHITE` / `أبيض_رايليب` | `Color` | `[245, 245, 245, 255]` |
| `TEXT_DIRECTION_AUTO` / `اتجاه_نص_تلقائي` | `TextDirection` | `Auto` |
| `TEXT_DIRECTION_LTR` / `اتجاه_نص_من_اليسار_إلى_اليمين` | `TextDirection` | `LTR` |
| `TEXT_DIRECTION_RTL` / `اتجاه_نص_من_اليمين_إلى_اليسار` | `TextDirection` | `RTL` |
| `TEXT_ALIGNMENT_START` / `محاذاة_نص_بداية` | `TextAlignment` | `Start` |
| `TEXT_ALIGNMENT_END` / `محاذاة_نص_نهاية` | `TextAlignment` | `End` |
| `TEXT_ALIGNMENT_CENTER` / `محاذاة_نص_وسط` | `TextAlignment` | `Center` |
| `TEXT_ALIGNMENT_LEFT` / `محاذاة_نص_يسار` | `TextAlignment` | `Left` |
| `TEXT_ALIGNMENT_RIGHT` / `محاذاة_نص_يمين` | `TextAlignment` | `Right` |

## HTTP sessions

| English / العربية | Type arguments / وسائط النوع |
| --- | --- |
| `Session<C,S>` / `جلسة<C,S>` | <C,S> |
| `StateSnapshot<S>` / `لقطة_حالة<S>` | <S> |
| `SessionStatus` / `حالة_جلسة` | none / لا يوجد |
| `ProgressBudget` / `ميزانية_تقدم` | none / لا يوجد |

| English / العربية | Signature / التوقيع | Context / السياق |
| --- | --- | --- |
| `progress_budget` / `ميزانية_التقدم` | `() -> ProgressBudget` | pure / بلا جهاز |
| `start` / `ابدأ` | `(ServerConfig, Router<C,S>, C, S) -> result<Session<C,S>>` | application, outside frame / التطبيق خارج الإطار |
| `progress` / `تقدم` | `(Session<C,S>, ProgressBudget) -> result<SessionStatus>` | application, outside frame / التطبيق خارج الإطار |
| `stop_session` / `أوقف_الجلسة` | `(Session<C,S>) -> result<unit>` | application, outside frame / التطبيق خارج الإطار |
| `close_session` / `أغلق_الجلسة` | `(Session<C,S>) -> result<unit>` | application, outside frame / التطبيق خارج الإطار |
| `session_config` / `إعداد_الجلسة` | `(Session<C,S>) -> result<C>` | application, frame allowed / التطبيق ويسمح داخل الإطار |
| `session_state` / `حالة_الجلسة` | `(Session<C,S>) -> result<S>` | application, frame allowed / التطبيق ويسمح داخل الإطار |
| `replace_session_state` / `استبدل_حالة_الجلسة` | `(Session<C,S>, S) -> result<unit>` | application, frame allowed / التطبيق ويسمح داخل الإطار |
| `snapshot_state` / `التقط_الحالة` | `(Context<C,S>) -> StateSnapshot<S>` | handler / معالج |
| `snapshot_session_state` / `التقط_حالة_الجلسة` | `(Session<C,S>) -> result<StateSnapshot<S>>` | application, frame allowed / التطبيق ويسمح داخل الإطار |
| `replace_state_if_current` / `استبدل_الحالة_إن_كانت_حالية` | `(Context<C,S>, StateSnapshot<S>, S) -> result<bool>` | handler / معالج |
| `replace_session_state_if_current` / `استبدل_حالة_الجلسة_إن_كانت_حالية` | `(Session<C,S>, StateSnapshot<S>, S) -> result<bool>` | application, frame allowed / التطبيق ويسمح داخل الإطار |

| English / العربية | Type and default / النوع والافتراضي |
| --- | --- |
| `max_instructions` / `حد_التعليمات` | i64, 4096, 1..1048576 |
| `active_ms` / `زمن_العمل_مللي` | i64, 2 ms, 1..1000 |
| `wait_ms` / `زمن_الانتظار_مللي` | i64, 0 ms, 0..1000 |
| `value` / `قيمة` | `S`, read-only / للقراءة فقط |

- `SESSION_RUNNING` / `جلسة_تعمل` = `running`
- `SESSION_DRAINING` / `جلسة_تستكمل_الإغلاق` = `draining`
- `SESSION_CLOSED` / `جلسة_مغلقة` = `closed`

Snapshots are copies with hidden session/version identity. Stale same-session publication returns successful false; a foreign-session snapshot returns http.invalid_argument. Snapshots survive close without granting handler authority. Normal closed progress returns SESSION_CLOSED; repeated stop/close succeeds. Safely released host failures remain latched. See the guide for explicit progress and the existing HTTP reference for all earlier operations.
<!-- catalog:end -->
