ALLEGRO_STATE(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… NAME πŸ’…

ALLEGRO_STATE - Allegro 5 API β€” and yes bestie, this is page ALLEGRO_STATE(3) from the Library Functions Manual, so you know it's official. πŸ’–

🌸 SYNOPSIS 🌸

typedef struct ALLEGRO_STATE ALLEGRO_STATE;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so ALLEGRO_STATE is an opaque type β€” meaning the internals are a mystery on purpose, and you literally just pass it to al_store_state(3) / al_restore_state(3). No peeking. πŸ™ˆ

The various state kept internally by Allegro can be displayed like this (yes, the whole tree, because we do not skip):

global
    active system driver
        current config
per thread
    new bitmap params
    new display params
    active file interface
    errno
    current blending mode
    current display
        deferred drawing
    current target bitmap
        current transformation
        current projection transformation
        current clipping rectangle
        bitmap locking
        current shader

so here's the tea, bestie: in general, the only real global state is the active system driver. All the other global state is per-thread, so if your application has multiple separate threads they never will interfere with each other. (Except if there are objects accessed by multiple threads, of course. Usually you want to minimize that though, and for the remaining cases use the synchronization primitives described in the threads section or events described in the events section to control inter-thread communication.) 🫢


that's the whole page, bestie β€” xoxo, the Allegro reference manual πŸ’–. page: ALLEGRO_STATE(3); date: not listed on this page, sorry! 🌈

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms