FRANK OS API-Referenz

API-Referenz für apps/api/frankos-app.h. Alle Funktionen werden über die MOS2-sys_table unter 0x10FFF000 aufgerufen.

sys_table-Index

OptionDescription
17xTaskGetTickCount (FreeRTOS)
404wm_create_window
405wm_destroy_window
406wm_show_window
407wm_set_focus
408wm_get_window
409wm_set_window_rect
410wm_invalidate
411wm_post_event
412wm_get_client_rect
413wd_begin
414wd_end
415wd_pixel
416wd_hline
417wd_vline
418wd_fill_rect
419wd_clear
420wd_rect
421wd_bevel_rect
422wd_char_ui
423wd_text_ui
424-427Menüs, Dialoge, Taskleiste, Timer
430-431Task-Benachrichtigungen
438printf (Debug über serielle Schnittstelle)
439-442Datei-Dialog, Schaltfläche, Framebuffer-Zeiger
443-450MP3-Decodierung (Helix) und PCM-Audio
451-454Zwischenablage-Operationen
455-474Steuerelemente Bildlaufleiste und Textfeld
475-481Datei-Speichern-Dialog, Suchen/Ersetzen
482wm_mark_dirty
483snd_open
484snd_write
485snd_close
486-490MOD-Wiedergabe (HxCMod)
491-493PSRAM-Allokator
494-505Dateizuordnungen, Desktop-Verknüpfungen, Vollbild, verzögerter Start
506-511MIDI/OPL-Audio
512-51432×32-Symbole, ICO-Parsing
515-521Wechsel des Videomodus und Anzeigestatus
522-528Direkter Framebuffer, Tastaturabfrage (Vollbild)
529-535SRAM-Allokator, display_request_mode, Lautstärkesteuerung

Datentypen

rect_t — { int16_t x, y, w, h }

point_t — { int16_t x, y }

hwnd_t — uint8_t (0 = HWND_NULL, 1–16 = gültig)

window_event_t — type + Union aus key, charev, mouse, move, size, command, timer, dropfiles

window_t — flags, state, frame rect, restore_rect, bg_color, z_order, title[24], event_handler, paint_handler, user_data

Konstanten

Fenster-Flags (WF_*)

OptionDescription
WF_ALIVEBit 0
WF_VISIBLEBit 1
WF_FOCUSEDBit 2
WF_CLOSABLEBit 3
WF_RESIZABLEBit 4
WF_MOVABLEBit 5
WF_BORDERBit 6
WF_DIRTYBit 7
WF_MENUBARBit 8
WF_FRAME_DIRTYBit 9
WF_FULLSCREENABLEBit 11

Fensterzustände

OptionDescription
WS_NORMAL0
WS_MINIMIZED1
WS_MAXIMIZED2

Tastatur-Modifikatoren

OptionDescription
KMOD_SHIFTBit 0
KMOD_CTRLBit 1
KMOD_ALTBit 2

Dialog-Konstanten

OptionDescription
DIALOG_ICON_NONEKein Symbol
DIALOG_ICON_INFOInfo-Symbol
DIALOG_ICON_WARNINGWarnsymbol
DIALOG_ICON_ERRORFehlersymbol
DIALOG_BTN_OKOK-Schaltfläche
DIALOG_BTN_CANCELAbbrechen-Schaltfläche
DIALOG_BTN_YESJa-Schaltfläche
DIALOG_BTN_NONein-Schaltfläche
DIALOG_RESULT_OK0xFF01
DIALOG_RESULT_CANCEL0xFF02
DIALOG_RESULT_YES0xFF03
DIALOG_RESULT_NO0xFF04
DIALOG_RESULT_INPUT0xFF10
DIALOG_RESULT_FILE0xFF20
DIALOG_RESULT_FILE_SAVE0xFF21
DIALOG_RESULT_FIND_NEXT0xFF31
DIALOG_RESULT_REPLACE0xFF32
DIALOG_RESULT_REPLACE_ALL0xFF33

Anzeigekonstanten

OptionDescription
DISPLAY_WIDTH640
DISPLAY_HEIGHT480
TASKBAR_HEIGHT28
FONT_UI_WIDTH6
FONT_UI_HEIGHT12
SCROLLBAR_WIDTH16

Theme-Konstanten

OptionDescription
THEME_TITLE_HEIGHT20
THEME_MENU_HEIGHT20
THEME_BORDER_WIDTH4
THEME_BUTTON_FACECOLOR_LIGHT_GRAY

Farben

OptionDescription
COLOR_BLACK0
COLOR_BLUE1
COLOR_GREEN2
COLOR_CYAN3
COLOR_RED4
COLOR_MAGENTA5
COLOR_BROWN6
COLOR_LIGHT_GRAY7
COLOR_DARK_GRAY8
COLOR_LIGHT_BLUE9
COLOR_LIGHT_GREEN10
COLOR_LIGHT_CYAN11
COLOR_LIGHT_RED12
COLOR_LIGHT_MAGENTA13
COLOR_YELLOW14
COLOR_WHITE15