cdk_label(3)
cdk_label π
okay bestie, welcome to the cdk_label page β it's a Library call, it lives in section 3, and it's literally the whole Cdk label widget situation. think cute little pop-up label window energy. π
β¨ NAME β¨
cdk_label β the Cdk label widget, periodt π
πΈ SYNOPSIS πΈ
cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
void activateCDKLabel (
CDKLABEL *label,
chtype unused);
void destroyCDKLabel (
CDKLABEL *label);
void drawCDKLabel (
CDKLABEL *label,
boolean box);
void eraseCDKLabel (
CDKLABEL *label);
boolean getCDKLabelBox (
CDKLABEL *label);
chtype **getCDKLabelMessage (
CDKLABEL *label
int *messageLines);
void moveCDKLabel (
CDKLABEL *label,
int xpos,
int ypos,
boolean relative,
boolean refresh);
CDKLABEL *newCDKLabel (
CDKSCREEN *cdkscreen,
int xpos,
int ypos,
CDK_CONST char **message,
int messageLines,
boolean box,
boolean shadow);
void positionCDKLabel (
CDKLABEL *label);
void setCDKLabel (
CDKLABEL *label,
CDK_CONST char **message,
int messageLines,
boolean box);
void setCDKLabelBackgroundAttrib (
CDKLABEL *label,
chtype attribute);
void setCDKLabelBackgroundColor (
CDKLABEL *label,
const char * color);
void setCDKLabelBox (
CDKLABEL *label,
boolean box);
void setCDKLabelBoxAttribute (
CDKLABEL *label,
chtype character);
void setCDKLabelHorizontalChar (
CDKLABEL *label,
chtype character);
void setCDKLabelLLChar (
CDKLABEL *label,
chtype character);
void setCDKLabelLRChar (
CDKLABEL *label,
chtype character);
void setCDKLabelMessage (
CDKLABEL *label,
CDK_CONST char **message,
int messageLines);
void setCDKLabelULChar (
CDKLABEL *label,
chtype character);
void setCDKLabelURChar (
CDKLABEL *label,
chtype character);
void setCDKLabelVerticalChar (
CDKLABEL *label,
chtype character);
char waitCDKLabel (
CDKLABEL *label,
char key);
π¦ DESCRIPTION π¦
so the Cdk label widget makes a pop-up label window. that's the vibe. and the functions below? they're the ones that create or manipulate the Cdk label widget. no cap. β¨
π AVAILABLE FUNCTIONS π
activateCDKLabel
obsolete entrypoint that just calls drawCDKLabel. it's giving legacy. still here tho. π«Ά
destroyCDKLabel
removes the widget from the screen and frees the memory the object used. gone, but like, properly gone. π
drawCDKLabel
draws the label widget on the screen. if the box parameter is true, the widget gets drawn with a box around it. box = true, box = slay. π¦
eraseCDKLabel
removes the widget from the screen. but bestie, listen β this does NOT destroy the widget. it's just off-screen, not deceased. π
getCDKLabelBox
returns true if the widget will be drawn with a box around it. simple as.
getCDKLabelMessage
returns the contents of the label widget. the messageLines parameter points to the location that'll be given the number of message-lines. π
moveCDKLabel
moves the given widget to the given position. let's break it down:
- the parameters
xposandyposare the new position of the widget.- the parameter
xposmay be an integer or one of the pre-defined valuesTOP,BOTTOM, andCENTER. - the parameter
yposmay be an integer or one of the pre-defined valuesLEFT,RIGHT, andCENTER.
- the parameter
- the parameter
relativestates whether thexpos/ypospair is a relative move or an absolute move.- for example, if
xpos = 1andypos = 2andrelative = TRUE, then the widget would move one row down and two columns right. if the value ofrelativewasFALSE, then the widget would move to the position(1,2). - > π¨ do NOT use the values
TOP,BOTTOM,LEFT,RIGHT, orCENTERwhenrelative = TRUE. (weird things may happen). i'm serious, the manpage literally says weird things may happen. π
- for example, if
- the final parameter
refreshis a boolean value which states whether the widget will get refreshed after the move. β¨
newCDKLabel
creates a label widget and returns a pointer to it. π parameters:
screenβ is the screen you wish this widget to be placed in.xposβ controls the placement of the object along the horizontal axis. it may be an integer or one of the pre-defined valuesLEFT,RIGHT, andCENTER.yposβ controls the placement of the object along the vertical axis. it may be an integer or one of the pre-defined valuesTOP,BOTTOM, andCENTER.messageβ is the message to be displayed in the window. it may contain any of the standard Cdk display format commands. to learn more about this, seecdk_display(3).rowsβ is the number of message rows that were passed in themessageparameter.boxβ is true if the widget should be drawn with a box around it.shadowβ turns the shadow on or off around this widget.
π if the widget could not be created, then a NULL pointer is returned. sad girl hours.
positionCDKLabel
lets the user move the widget around the screen via the cursor/keypad keys. see cdk_position (3) for the key bindings. main character moving energy. πΉοΈ
setCDKLabel
lets the user change the contents of the label widget. the parameters are the same as newCDKLabel. π
setCDKLabelBackgroundAttrib
sets the background attribute of the widget. the parameter attribute is a curses attribute, e.g., A_BOLD. β¨
setCDKLabelBackgroundColor
sets the background color of the widget. the parameter color is in the format of the Cdk format strings. for more info, see cdk_display(3). π
setCDKLabelBox
sets whether the widget will be drawn with a box around it.
setCDKLabelBoxAttribute
sets the attribute of the box.
setCDKLabelHorizontalChar
sets the horizontal drawing character for the box to the given character.
setCDKLabelLLChar
sets the lower left hand corner of the widget's box to the given character.
setCDKLabelLRChar
sets the lower right hand corner of the widget's box to the given character.
setCDKLabelMessage
this sets the contents of the label widget. βοΈ
setCDKLabelULChar
sets the upper left hand corner of the widget's box to the given character.
setCDKLabelURChar
sets the upper right hand corner of the widget's box to the given character.
setCDKLabelVerticalChar
sets the vertical drawing character for the box to the given character.
waitCDKLabel
waits for a user to press a key. the label parameter is the pointer to a label widget, and key is the key to wait for. if no specific key is desired, use (char)0. β¨οΈ
π SEE ALSO π
cdk(3), cdk_binding(3), cdk_display(3), cdk_position(3), cdk_screen(3) β go read your siblings bestie, iykyk π«Ά
and that's the whole page, gorgeous. this was cdk_label(3) from the Library calls section, dated 2025-01-14. mwah, slay, go write some labels. π β¨π
π¦ where this page comes from
- debian trixie: libcdk5-dev 5.0.20250116-1 Β· BSD-4-Clause
- fedora 43: cdk 5.0.20251014-1.fc43 Β· X11-distribute-modifications-variant
- fedora 43: cdk 5.0.20251014-1.fc43 Β· X11-distribute-modifications-variant
- fedora 44: cdk 5.0.20251014-3.fc44 Β· X11-distribute-modifications-variant
- fedora 44: cdk 5.0.20251014-3.fc44 Β· X11-distribute-modifications-variant
- nixos 26.05: cdk 5.0-20260119
- nixpkgs unstable: cdk 5.0-20260119
- ubuntu questing: libcdk5-dev 5.0.20250116-1
- ubuntu resolute: libcdk5-dev 5.0.20251014-1 Β· BSD-4-Clause
- ubuntu stonking: libcdk5-dev 5.0.20260119-1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms