MLV_input_box.h(3)
💖 MLV_input_box.h 💖 — Library Functions Manual, section 3 🎀
okay bestie, welcome to the MLV_input_box.h(3) page ✨ this is the one that tells you how to pop a lil box on screen and go "hey user, type me a sentence" 💬🦋 it's the manual for the input-box corner of MLV and it is, ngl, kinda iconic.
🌸 NAME 🌸
MLV_input_box.h — this file defines the prototypes of the functions that let you ask the user for some text through input boxes. that's it, that's the whole vibe 💅
✨ SYNOPSIS ✨
🧁 Définitions de type 🧁
typedef struct _MLV_Input_box MLV_Input_box— the type definition for the input boxes themselves. it's giving "here's the lil struct that holds your box" 💖
🌈 Fonctions 🌈
MLV_wait_input_box()
void MLV_wait_input_box (int top_left_corner_X, int top_left_corner_Y,
int width, int height, MLV_Color borderColor, MLV_Color textColor,
MLV_Color backgroundColor, const char *informativeMessage, char **text,...)
this one suspends your program's execution, draws an input box, and just waits — patiently, like a bestie holding your Starbucks 🫶 — until the user types a sentence into the field of the box.
MLV_wait_input_box_with_font()
void MLV_wait_input_box_with_font (int top_left_corner_X, int
top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char
*informativeMessage, char **text, const MLV_Font *font,...)
literally the same thing as MLV_wait_input_box(), except you get to change the font of the text. glow-up unlocked ✨
MLV_wait_particular_input_box()
void MLV_wait_particular_input_box (MLV_Input_box *input_box, char
**text)
this one suspends execution until the user writes a sentence in the field of the input box you passed as a parameter to the function. you brought your own box, she's just waiting on it 💅
MLV_create_input_box()
MLV_Input_box * MLV_create_input_box (int top_left_corner_X, int
top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char
*informativeMessage,...)
this function creates an input box 🎀 brand new, fresh out the box, literally.
MLV_create_input_box_with_font()
MLV_Input_box * MLV_create_input_box_with_font (int top_left_corner_X,
int top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char
*informativeMessage, const MLV_Font *font,...)
creates an input box, but with a specific font because sometimes you're just built different 💜
MLV_free_input_box()
void MLV_free_input_box (MLV_Input_box *input_box)
closes an input box that was created earlier. it's the "okay bye bestie" of functions 👋✨
MLV_change_informative_message_of_input_box()
void MLV_change_informative_message_of_input_box (MLV_Input_box
*input_box, const char *message,...)
changes the header message of an input box. new text, same box, no cap.
MLV_draw_input_box()
void MLV_draw_input_box (MLV_Input_box *input_box)
draws one particular input box. one box, one moment, main character energy 👑
MLV_draw_all_input_boxes()
void MLV_draw_all_input_boxes ()
draws all of the input boxes. the whole squad, on screen, together 🌈
MLV_suppress_history()
void MLV_suppress_history (MLV_Input_box *input_box)
deletes the history of an input box. what happened in the box stays in the box... actually no, it's gone. it's giving "we don't talk about that anymore" 🙈💀
MLV_change_input_box_geometry()
void MLV_change_input_box_geometry (MLV_Input_box *input_box, int
top_left_corner_X, int top_left_corner_Y, int width, int height)
changes both the size and the position of the input box you hand it as a parameter. full makeover, geometry edition ✨
MLV_change_input_box_size()
void MLV_change_input_box_size (MLV_Input_box *input_box, int width, int
height)
changes the size of an input box. width, height, done.
MLV_change_input_box_position()
void MLV_change_input_box_position (MLV_Input_box *input_box, int
top_left_corner_X, int top_left_corner_Y)
changes the position of the input box you gave it as a parameter. she's moving, respectfully 🦋
MLV_change_input_box_colors()
void MLV_change_input_box_colors (MLV_Input_box *input_box, MLV_Color
borderColor, MLV_Color textColor, MLV_Color backgroundColor)
changes the different colours of a given input box — border, text, background, the whole palette 💅🎨
MLV_activate_input_box()
void MLV_activate_input_box (MLV_Input_box *input_box)
activates an input box. she's live, she's focused, she's the moment ⭐
MLV_desactivate_input_box()
void MLV_desactivate_input_box ()
deactivates the input box that is currently active. the active box gets benched, no drama 😌
💜 Description détaillée 💜
this file defines the prototypes of the functions that let you ask the user for text through input boxes. that's the whole point of the header, bestie — boxes in, text out, everyone's happy 🫶✨
🎀 Auteur 🎀
- Adrien Boussicault
- Marc Zipstein
they wrote it, we thank them, absolute icons 👑👑
📚 Documentation des fonctions 📚
okay bestie, buckle up, this is the part where we go function by function. it's giving extensive and honestly? we love that for us. 💅
🫶 MLV_activate_input_box
void MLV_activate_input_box (MLV_Input_box * input_box)
so this one activates an input box. and it's doing it in the sneakiest way possible — it acts exactly like the user clicked on that box, because clicking is literally the thing that makes a box active in the first place. same energy, no click required.
once a box is active, keyboard events get snatched up by the box and used to save whatever the user types. and mouse clicks on the box? also captured by the box. it's very possessive. it's giving main character energy fr.
Paramètres 🌸
input_box— the input box you wanna activate.
💖 MLV_change_informative_message_of_input_box
void MLV_change_informative_message_of_input_box (MLV_Input_box * input_box,
const char * message, ...)
swaps out the header message of an input box. new header, who dis. ✨
Paramètres
input_box— the input box you're editing.message— the header message.
🎀 MLV_change_input_box_colors
void MLV_change_input_box_colors (MLV_Input_box * input_box, MLV_Color
borderColor, MLV_Color textColor, MLV_Color backgroundColor)
full glow-up for the colors of a given input box. border, text, background — all of it, bestie.
Paramètres
input_box— the input box you're editing.borderColor— the new border color of the input box.textColor— the new text color of the input box.backgroundColor— the new background color of the input box.
🦋 MLV_change_input_box_geometry
void MLV_change_input_box_geometry (MLV_Input_box * input_box, int
top_left_corner_X, int top_left_corner_Y, int width, int height)
changes both the size and the position of the input box you pass in. it's a whole makeover, not just a haircut. 💇
Paramètres
input_box— the input box you're editing.top_left_corner_X— the new X coordinate for the position of the North-West corner of the input box.top_left_corner_Y— the new Y coordinate for the position of the North-West corner of the input box.width— the new width of the input box.height— the new height of the input box.
🌸 MLV_change_input_box_position
void MLV_change_input_box_position (MLV_Input_box * input_box, int
top_left_corner_X, int top_left_corner_Y)
just the position this time. the box is moving, it's not changing size, okay, respect the distinction. ✈️
Paramètres
input_box— the input box you're editing.top_left_corner_X— the new X coordinate for the position of the North-West corner of the input box.top_left_corner_Y— the new Y coordinate for the position of the North-West corner of the input box.
🌈 MLV_change_input_box_size
void MLV_change_input_box_size (MLV_Input_box * input_box, int width, int
height)
and this one is size only, no moving. glow up in place. 💫
Paramètres
input_box— the input box you're editing.width— the new width of the input box.height— the new height of the input box.
👑 MLV_create_input_box
MLV_Input_box* MLV_create_input_box (int top_left_corner_X, int
top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char *
informativeMessage, ...)
okay so this is the birth of an input box. 🐣 you make it, and once it exists, if the user clicks on it, it becomes active. which means — and say it with me — all keyboard events get grabbed by the box and used to record the text the user typed. also, any mouse click that happens on the box gets monopolized by the box. it does not share. periodt.
to draw one or all of your input boxes, in the area where you created them, you gotta use these functions:
MLV_draw_input_box()MLV_draw_all_input_boxes()
Paramètres
top_left_corner_X— the X coordinate of the North-West corner of the input box.top_left_corner_Y— the Y coordinate of the North-West corner of the input box.width— the width of the input box.height— the height of the input box.borderColor— the border color of the input box.textColor— the text color.backgroundColor— the background color.informativeMessage— the header message of the input box.
Exemples 🍓
medium/03_input_box_events.c, etmedium/04_events.c.
🧚 MLV_create_input_box_with_font
MLV_Input_box* MLV_create_input_box_with_font (int top_left_corner_X, int
top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char *
informativeMessage, const MLV_Font * font, ...)
same thing as above but the box gets a specific font. it's the same box, she just has a signature look now. ✨
Paramètres
top_left_corner_X— the X coordinate of the North-West corner of the input box.top_left_corner_Y— the Y coordinate of the North-West corner of the input box.width— the width of the input box.height— the height of the input box.borderColor— the border color of the input box.textColor— the text color.backgroundColor— the background color.informativeMessage— the header message of the input box.font— the font to use for the text.
💀 MLV_desactivate_input_box
void MLV_desactivate_input_box ()
deactivates whichever input box is currently active. and if there's no active input box? bestie, this function simply does nothing. it's not gonna manifest a problem out of thin air. 🙈
🖌️ MLV_draw_input_box
void MLV_draw_input_box (MLV_Input_box * input_box)
draws one specific input box. that's it, that's the tweet. 🎨
Paramètres
input_box— the input box to draw.
🗑️ MLV_free_input_box
void MLV_free_input_box (MLV_Input_box * input_box)
closes an input box that was previously created. the memory allocated for that box gets freed — released, returned, gone, bye. 🫶
Paramètres
input_box— the input box to close.
Exemples
medium/03_input_box_events.c.
🚮 MLV_suppress_history
void MLV_suppress_history (MLV_Input_box * input_box)
deletes the history of an input box. the past is the past, we don't talk about it anymore. 💅
Paramètres
input_box— the input box whose history must be deleted.
⏳ MLV_wait_input_box
void MLV_wait_input_box (int top_left_corner_X, int top_left_corner_Y, int
width, int height, MLV_Color borderColor, MLV_Color textColor, MLV_Color
backgroundColor, const char * informativeMessage, char ** text, ...)
this one suspends your program's execution, shows an input box, and just... waits. patiently. until the user types a sentence into the box's field. 👑
the input box has two text zones: the first one the user cannot edit — it's there to display an informational message. the second one is empty and can be edited by the user. when the user hits the enter key, the text sitting in the text zone gets returned by the function through the text parameter. the text, the size, and the colors of the box are all configurable. so much range. 🌈
⚠️ heads up bestie:MLV_wait_input_box()allocates the memory associated with the'text'parameter itself. but after you're done using it, you have to free that allocated memory space. it's giving "i made the mess but you're cleaning it up" and honestly? that's just how it is.
Paramètres
top_left_corner_X— the X coordinate of the North-West corner of the input box.top_left_corner_Y— the Y coordinate of the North-West corner of the input box.width— the width of the input box.height— the height of the input box.borderColor— the border color of the input box.textColor— the text color of the input box.backgroundColor— the background color of the input box.informativeMessage— the message to display in front of the input box.text— the address where the answer given by the user will be placed.
Exemples 🌟
beginner/07_input_box.c.
🦄 MLV_wait_input_box_with_font
void MLV_wait_input_box_with_font (int top_left_corner_X, int
top_left_corner_Y, int width, int height, MLV_Color borderColor,
MLV_Color textColor, MLV_Color backgroundColor, const char *
informativeMessage, char ** text, const MLV_Font * font, ...)
literally the same as MLV_wait_input_box(), except you get to change the font of the text. custom typography moment. 💜
and same deal as before: MLV_wait_input_box_with_font() allocates the memory associated with the 'text' parameter itself, and after use, you must free that allocated memory space. no skipping this step, bestie, i will know.
Paramètres
top_left_corner_X— the X coordinate of the North-West corner of the input box.top_left_corner_Y— the Y coordinate of the North-West corner of the input box.width— the width of the input box.height— the height of the input box.borderColor— the border color of the input box.textColor— the text color of the input box.backgroundColor— the background color of the input box.informativeMessage— the message to display in front of the input box.text— the address where the answer given by the user will be placed.font— the font of the text to use.
🎯 MLV_wait_particular_input_box
void MLV_wait_particular_input_box (MLV_Input_box * input_box, char ** text)
this one suspends the program's execution until the user writes a sentence in the field of the input box that was passed as a parameter to the function. very "waiting for you specifically" energy. 🎀
Paramètres
input_box— the input box that must be observed.text— the text retrieved by the input box.
✍️ Auteur
Généré automatiquement par Doxygen pour MLV-3.1.0 à partir du code source.
and that's the whole page, bestie!! 🎉 every single function documented, nothing skipped, no cap. this one's MLV-3.1.0, and it was born on Samedi 29 Janvier 2022 — shoutout to that date, and to MLV_input_box.h(3) itself, an absolute icon. now go make some input boxes and free your memory. i love you, bye. 💖✨🦋
📦 where this page comes from
- ubuntu jammy: libmlv3-dev 3.1.0-7 · GPL-3.0-only
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms