form_cursor(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… form_cursor β€” like, the cursor-putting-back girlie of the forms world ✨

okay so this is a page from the ncurses manual, section 3X β€” yes bestie, the library calls girlies. it's called form_cursor(3X) and it's short, it's sweet, it's lowkey iconic. let's get into it πŸŽ€


✨ NAME ✨

pos_form_cursor β€” puts the form window cursor back where it belongs πŸ‘‘

🌸 SYNOPSIS 🌸

#include <form.h>

int pos_form_cursor(FORM *form);

that's it. one include, one function, one FORM * argument. no cap, she's a minimalist πŸ¦‹

🫢 DESCRIPTION 🫢

so pos_form_cursor restores the cursor to the position required for the forms driver to continue processing requests. periodt. it literally puts the cursor back where the forms driver needs it so it can keep doing its thing πŸ™ˆ

and when do you need this? bestie, it's useful after curses routines have been called to do screen-painting in response to a form operation β€” like, the moment you go off and paint the screen yourself, the cursor gets all up in the wrong place, and this function is the one that fixes the vibe check and repositions it πŸ’…

πŸ’– RETURN VALUE πŸ’–

this routine returns one of the following, and every single one of them matters, so don't skip:

  • E_OK β€” the routine succeeded. slay. we love a win ✨
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument 😭 something you passed in was just... not it
  • E_NOT_POSTED β€” the form has not been posted. girl where is the form. it's not even posted yet πŸ’€
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). the system said no and you should go peek at errno(3) for the receipts πŸ”₯

🌈 PORTABILITY 🌈

these routines emulate the System V forms library. and just so we're clear β€” they were not supported on Version 7 or BSD versions 🫠 so if you're on some ancient Version 7 or BSD situation, this is not the function for you, sorry bestie πŸŽ€

πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. 🫢 and the manual pages and adaptation for new curses by Eric S. Raymond. absolute icons, both of them, we stan ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

  • curses(3X)
  • form(3X)

go read those too, iykyk πŸ’œ


and that's the whole page, bestie β€” ncurses 6.5, dated 2024-03-16, form_cursor(3X) out. mwah πŸ’‹πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from