gui_shadow_box_proc(3alleg4)
π gui_shadow_box_proc β the Allegro manual, but make it cute π
okay bestie, welcome to the 3alleg4 section of the Allegro manual. this one's short but it's lowkey powerful β it's the whole "make your dialogs look however you want" hook situation. let's get into it π«Ά
β¨ NAME β¨
gui_shadow_box_proc, gui_ctext_proc, gui_button_proc, gui_edit_proc, gui_list_proc, gui_text_list_proc β these are the hooks you use to customise the look and feel of Allegro dialogs. that's it, that's the whole gig. six little function pointers, infinite main character energy π
πΈ SYNOPSIS πΈ
#include <allegro.h>
extern int (*gui_shadow_box_proc)(int msg, struct DIALOG *d, int c);
extern int (*gui_ctext_proc)(int msg, struct DIALOG *d, int c);
extern int (*gui_button_proc)(int msg, struct DIALOG *d, int c);
extern int (*gui_edit_proc)(int msg, struct DIALOG *d, int c);
extern int (*gui_list_proc)(int msg, struct DIALOG *d, int c);
extern int (*gui_text_list_proc)(int msg, struct DIALOG *d, int c);
so yeah β six pointers, all the exact same signature: they take an int msg, a struct DIALOG *d, and an int c, and they hand you back an int. copy that shape exactly or the compiler will simply not let you have your moment π
π¦ DESCRIPTION π¦
If set, these functions will be used by the standard Allegro dialogs. π
That's the whole vibe: you point these at your own functions, and boom β the built-in dialogs start calling your code instead of the default drawing routines. This allows you to customise the look and feel, much like gui_fg_color and gui_bg_color, but much more flexibly. β¨
like, <pink>fg and bg colour</pink> is you picking a colour palette. <purple>this</purple> is you getting the keys to the whole house. no cap.
heads up bestie: it literally says "If set" β these are hooks, so nothing magical happens until you actually assign them. unset pointers = standard behaviour, periodt.
π SEE ALSO π
alert(3alleg4)alert3(3alleg4)file_select_ex(3alleg4)gfx_mode_select(3alleg4)gui_fg_color(3alleg4)
go read those next, they're all in the same friend group π
and that's the page, babe π this was Allegro, version 4.4.3, living in the gui_shadow_box_proc(3alleg4) corner of the manual. ty for coming to my ted talk, now go make some unreasonably pretty dialogs πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms