master ohmu/fastfetch-openbsd / src / fastfetch.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "fastfetch_config.h"
 4
 5#include <stdint.h>
 6#include <stdbool.h>
 7
 8#include "common/arrutil.h"
 9#include "common/FFstrbuf.h"
10#include "common/FFlist.h"
11#include "common/FFPlatform.h"
12#include "common/unused.h"
13
14#include "options/logo.h"
15#include "options/display.h"
16#include "options/general.h"
17
18typedef struct FFconfig {
19    FFOptionsLogo logo;
20    FFOptionsDisplay display;
21    FFOptionsGeneral general;
22} FFconfig;
23
24typedef struct FFLogoLineCacheState {
25    FFlist lines;
26    uint32_t nextLine;
27    uint32_t rightOffset;
28} FFLogoLineCacheState;
29
30typedef struct FFstate {
31    uint32_t logoWidth;
32    uint32_t logoHeight;
33    uint32_t keysHeight;
34    bool titleFqdn;
35    uint32_t dynamicInterval;
36    FFPlatform platform;
37    FFLogoLineCacheState logoLineCache;
38} FFstate;
39
40typedef struct FFinstance {
41    FFconfig config;
42    FFstate state;
43} FFinstance;
44extern FFinstance instance; // Defined in `common/init.c`
45extern FFModuleBaseInfo** ffModuleInfos[];