Module: reefvision.commands
Source: ./reefvision/commands.reef
Overview
reefvision.commands - command enable/disable + accelerator table (Wave 3)
Menus and chrome consult this table before activating a command. Unknown ids default to enabled=true so apps can opt-in gradually. Optional key accelerators: commands_set_accel / commands_match_key.
Types
CommandTable
Fields:
| Name | Type |
|---|---|
ids |
[int] |
enabled |
[bool] |
has_accel |
[bool] |
accels |
[event.KeyEvent] |
capacity |
int |
count |
int |
Functions
fn max_cmds(): int
fn empty_accel(): event.KeyEvent
fn commands_create(capacity: int): CommandTable
fn commands_count(t: CommandTable): int
fn commands_find(t: CommandTable, cmd: int): int
fn commands_set(t: CommandTable, cmd: int, enabled: bool): bool
fn commands_is_enabled(t: CommandTable, cmd: int): bool
fn norm_ch(ke: event.KeyEvent): int
Normalize char for matching: ctrl-letters compare as uppercase A–Z.
fn accel_eq(a: event.KeyEvent, b: event.KeyEvent): bool
fn commands_set_accel(t: CommandTable, cmd: int, ke: event.KeyEvent): bool
fn commands_has_accel(t: CommandTable, cmd: int): bool
fn commands_get_accel(t: CommandTable, cmd: int): event.KeyEvent
fn commands_match_key(t: CommandTable, ke: event.KeyEvent): int
Procedures
proc commands_enable(t: CommandTable, cmd: int)
proc commands_disable(t: CommandTable, cmd: int)
proc commands_clear_accel(t: CommandTable, cmd: int)
Generated by reefc doc