d_edit_proc(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

d_edit_proc β€” a dialog procedure implementing an editable text object, from the Allegro game programming library. And yes bestie, this is the d_edit_proc(3) page from the Allegro manual, so you're in exactly the right place. πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int d_edit_proc(int msg, DIALOG *d, int c);

πŸ’… DESCRIPTION πŸ’…

Okay so this is an editable text object, and the dp field points to the string. When it has the input focus β€” which you get by clicking on it with the mouse β€” text can be typed into this object. It's giving "click me and type", fr fr. ✨

The d1 field specifies the maximum number of characters that it will accept, and d2 is the text cursor position within the string. Those two fields are doing the absolute most, and we love that for them. πŸ’…

⚠️ note, no cap: dp must point to a buffer at least (d1 + 1) * 4 bytes long, because depending on the encoding format in use, a single character can occupy up to 4 bytes, and room must be reserved for the terminating null character. Do not skimp on that buffer size, bestie. That's not a vibe check you wanna fail. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


source: Allegro Β· version: 4.4.3 Β· date: the footer didn't give us one, so that's the whole tea β€” bye bestie, go make that editable text object slay πŸ¦‹πŸ’–

πŸ“¦ where this page comes from