Important Files

This page is a directory of the files worth knowing, grouped by area: what each is, and when you would touch it. For the big picture of how they fit together, read Architecture first.

src/core

The core: definitions, commands, workers, settings and OS glue.

siril.h

Where the constants, enums and shared types live (including fits / struct ffit, cominfo and gfit). Included almost everywhere. Before adding anything here, ask whether it can live locally in your feature instead. Its lock comment blocks are authoritative — see Locking.

settings.h and settings.c

Where preferences are defined and initialised. settings.h declares the *_config structs and the top-level pref_struct; settings.c holds the default values and the all_settings table that decides which values are persistent (written to the .ini file) versus volatile (reset to a good default each launch). A user-tunable value that should survive restarts goes in all_settings; a working default that should not (e.g. dynamic-PSF parameters) does not.

processing.c and processing.h

The generic worker machinery: generic_image_worker, generic_sequence_worker and generic_mask_worker, with their argument structs and hooks. This is the single most important file for feature authors — its complete reference is Generic workers, and Writing a feature is the tutorial. You rarely need to modify it, but you will read it constantly.

processing_thread.c and processing_thread.h

Added in version 1.5.

The persistent single worker thread and its FIFO job queue, plus the cancellation and Python-reservation contracts. Read the header comments — they are the ground truth for Threading.

masks.c and masks.h

Added in version 1.5.

The image-mask system: creating masks, attaching them to a fits, and the blend used by the workers. See Masks.

siril_alloc.c and siril_alloc.h

Siril's allocation helpers (siril_malloc / siril_calloc / siril_free, VirtualAlloc-backed on Windows). See Memory management.

OS_utils.c and OS_utils.h

Per-OS glue: available-memory reporting, disk-space checks, app directories, and platform #ifdef blocks. See OS differences.

gui_iface.h and gui_iface_stubs.c

Added in version 1.5.

The abstract, GTK-free GUI interface (a vtable, gui_iface) through which core code reaches the GUI. gui_iface_stubs.c provides the no-op defaults used by siril-cli; the real implementations live in the GUI build (see below). Central to gui_iface in depth.

other core files

  • siril_log.h — the logging API (siril_log_message and friends). See Logging.

  • siril_spawn.h — the mandatory wrappers for spawning host processes (Flatpak-aware). See OS differences.

  • siril_networking.h — network availability and helpers.

  • undo.h — the undo/redo stack.

  • sequence_filtering.h — the include/select filters used by sequence operations.

  • pipe.c — the CLI named-pipe command interface.

  • initfile.c — reading/writing the .ini settings file.

  • siril_date.c, siril_world_cs.c — date and WCS helpers.

  • utils.c — numeric/string/filename utilities.

src/gui-gtk4

Changed in version 1.5: All GTK code lives here now (GTK4). In 1.4 it was in src/gui (GTK3). Nothing outside this directory and src/main.c may include GTK.

If your feature has a GUI, add a file here with the same base name as your core feature file, holding its callbacks and GUI helpers.

  • uifiles/ and ui_files.h — the .ui definitions and the ordered list that loads them into the single global builder.

  • dialogs.c — the dialog registry (open/close, processing-dialog tracking, cancel handlers).

  • gui_iface_impl.c — the real GTK implementations of the gui_iface slots (linked only into the siril binary).

  • image_display.c / image_display.h — the tiled renderer. See Display and rendering.

  • image_interactions.c — mouse/keyboard interaction with the image (zoom, pan, selection).

  • siril_preview.c — the preview/backup machinery. See Region of Interest Processing.

  • siril.css and siril_css.c — the single global stylesheet and its loader.

  • callbacks.c — general widget callbacks; also home of roi_mutex.

  • gtk3_event_compat.h — compatibility shims used during the port. See GTK4 quirks.

  • masks_gui.c — the mask editor UI.

  • gui_state.h — the gui (guiinfo) structure and the tile/view structs.

src/io

Reading and writing bytes:

  • image_format_fits.c — FITS, Siril's native format.

  • fits_sequence.c — fitseq, a multi-image FITS container.

  • ser.c — SER files, the planetary multi-image container.

  • seqfile.c — the .seq files.

  • sequence.c — sequences within Siril (and the memory-fit helpers).

  • seqwriter.c / seqwriter.h — the buffered sequence writer with memory backpressure (see generic_sequence_worker).

  • single_image.c — single-image load/save and notify_gfit_data_modified, the update-contract entry point (The update contract).

  • siril_pythonmodule.c / siril_pythonmodule.h — the Python IPC transport (sockets/pipes, SHM). See Python integration.

  • siril_pythoncommands.c / siril_pythoncommands.h — the C-side handlers for each Python command.

python_module

Added in version 1.5.

  • sirilpy/ — the Python package scripts import.

  • pyproject.toml — its packaging metadata.

po/

POTFILES.in

Lists every file containing translatable strings.

Tip

When you add a file that logs new strings to the Console, or a new UI file, add it here — respecting alphabetical order.