// Copyright (c) 2026 Storm Dragon // Authors: Storm Dragon, Angus Kola // SPDX-License-Identifier: GPL-3.0-or-later #include // Shared action IDs for the native callbacks and Go preferences dispatcher. // Value 10 is reserved; preserve the existing wire values. enum { PREFS_TENTACLE_REPOSITORY_ADD = 9, PREFS_TENTACLE_TOGGLE = 11, PREFS_TENTACLE_REPOSITORY_REMOVE = 12, PREFS_TENTACLE_RETRY = 13, PREFS_TENTACLE_REMOVE = 14, PREFS_TENTACLE_REFRESH = 15, PREFS_TENTACLE_SELECT = 16, PREFS_TENTACLE_REPOSITORY_SELECT = 17, PREFS_TENTACLE_REPOSITORY_REFRESH = 18, PREFS_TENTACLE_INSTALL = 19, PREFS_TENTACLE_SETTINGS = 20, PREFS_TENTACLE_UPDATE = 21, }; int prefs_init(const char *xml); void prefs_set_application(const char *name); void prefs_iterate(void); int prefs_action(void); int prefs_voice_changed(void); int prefs_echo_preview(int *focused); void prefs_busy(int busy, int can_save); void prefs_present(void); void prefs_close(void); void prefs_status(const char *message, int focus); void prefs_number_set(const char *id, double value); double prefs_number_value(const char *id); int prefs_number_edited(const char *id); void prefs_choice_set(const char *id, int value); int prefs_choice_get(const char *id); void prefs_hardware_devices_clear(void); void prefs_hardware_device_append(const char *text); void prefs_hardware_device_set(const char *text); const char *prefs_hardware_device_get(void); void prefs_hardware_sensitivity(int enabled); void prefs_combo_set(const char *id, int value); int prefs_combo_get(const char *id); void prefs_check_set(const char *id, int value); int prefs_check_get(const char *id); void prefs_reading_set(const char *id, int value); int prefs_reading_get(const char *id); void prefs_range_set(const char *id, double value); void prefs_spin_set(const char *id, double value); double prefs_spin_get(const char *id); void prefs_combo_clear(const char *id); void prefs_combo_append(const char *id, const char *text); void prefs_entry_set(const char *id, const char *text); const char *prefs_entry_get(const char *id); void prefs_bindings_clear(void); void prefs_binding_append(const char *label, const char *scope, const char *keys, const char *defaults); int prefs_binding_selected(void); void prefs_binding_select(int row); void prefs_modifier_set(const char *id, int enabled); void prefs_interruption_clear(void); void prefs_interruption_append(const char *name); int prefs_interruption_count(void); const char *prefs_interruption_key(int index); int prefs_modifier_get(const char *id); void prefs_init_pronunciation(void); void prefs_pronunciation_clear(void); void prefs_pronunciation_append(const char *word, const char *replacement); int prefs_pronunciation_count(void); char *prefs_pronunciation_value(int row, int column); void prefs_init_wine(void); void prefs_wine_clear(void); void prefs_wine_append(const char *program); int prefs_wine_count(void); char *prefs_wine_value(int row); int prefs_wine_changed(void); void prefs_wine_validation(const char *message); void prefs_init_text_attributes(void); void prefs_text_attributes_clear(void); void prefs_text_attribute_append(const char *key, const char *label, int speak, int braille); int prefs_text_attribute_count(void); char *prefs_text_attribute_key(int row); int prefs_text_attribute_enabled(int row, int column); void prefs_tentacles_clear(void); void prefs_tentacle_append(int enabled, const char *name, const char *state, const char *version, const char *repository, const char *message, const char *shortcuts); int prefs_tentacle_selected(void); void prefs_tentacle_select(int row); void prefs_tentacle_controls(int available, int installed, int enabled, int repository); int prefs_tentacle_confirm(const char *message, const char *label); void prefs_tentacle_repositories_clear(void); void prefs_tentacle_repository_append(const char *label); int prefs_tentacle_repository_selected(void); void prefs_tentacle_repository_select(int page); void prefs_extension_add(const char *key, const char *title); void prefs_extension_remove(const char *key); void prefs_extensions_close(void); const char *prefs_extension_selected(void); void prefs_extension_select(const char *key); void prefs_extension_control(const char *page, const char *id, const char *label, int kind, int row, int max_length, int disabled); void prefs_extension_option(const char *page, const char *id, const char *option, const char *label, int disabled); void prefs_extension_set(const char *page, const char *id, int kind, const char *text, int checked); const char *prefs_extension_text(const char *page, const char *id, int kind); int prefs_extension_checked(const char *page, const char *id);