set_cursor_dimensions(3)
π set_cursor_dimensions(3) π
okay bestie so we're in the gstream manual and today's main character is set_cursor_dimensions β literally the glow-up your cursor has been waiting for π
β¨ NAME β¨
set_cursor_dimensions β she sets the cursor dimensions, that's it, that's the whole job π
πΈ SYNOPSIS πΈ
#include <gstream.h>
void set_cursor_dimensions(int iw, int ih, int ow, int oh);
π¦ DESCRIPTION π¦
So here's the tea: this function sets your cursor dimensions to IW x IH when you're in insert mode, and OW x OH when you're in overwrite mode. The standard cursors do respond to this, no cap β but ngl, it's mostly meant to be used with your own custom cursor drawers. like, that's the whole vibe. π«Ά
Before you go requesting any inputs with your custom cursor drawer, you should call this function with the appropriate values. fr fr, do it first.
Wanna set the size of the character underneath the cursor dynamically? pass gbuf::DYNAMIC_CURSOR_SIZE and it handles the rest:
- if the cursor is at the end of the line, it gets the width of a space
' ' - else, it gets the size of the character under it
so it just knows. iconic behaviour honestly β¨
π the example (she's giving vertical line, then BITMAP) π
Say we've created a nice cursor drawer where, for the insert cursor, it's one pixel wide and as tall as the characters β in other words, a vertical line β but for the overwrite cursor it's a BITMAP with the dimensions 8x10. Then this is what you'd do:
gs.set_cursor_dimensions(1, gbuf::DYNAMIC_CURSOR_SIZE, 8, 10);
slay. π¦
π IMPORTANT, bestie, do NOT skip this part β it is important that you remember to call this function when you're using custom cursor drawers. Else the inputter doesn't know how much of the background below the cursor to save and recover. and then everything is chaos. not the cute kind. π
The default dimensions are the dimensions that are suited for the default cursor. simple as that π
π SEE ALSO π
and that's the whole page, periodt π this was brought to you by gstream, version 1.6 β go forth and dimension your cursors, you've got this πβ¨π
π¦ where this page comes from
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms