cdk_scale(3)
πΈ NAME πΈ
okay so bestie, welcome to the cdk_scale(3) manual page β it's the Cdk scale widget, and it's type int, no cap. π
cdk_scaleβ Cdk scale widget (typeint) π
β¨ SYNOPSIS β¨
bestie, here's the compile line and every single function signature, exactly as they are, fr fr. don't rename anything, don't merge anything, just vibe with it. π
cc [ flag ... ] file ... -lcdk [ library ... ]
#include <cdk.h>
int activateCDKScale (
CDKSCALE *scale,
chtype *actions);
void destroyCDKScale (
CDKSCALE *scale);
void drawCDKScale (
CDKSCALE *scale,
boolean box);
void eraseCDKScale (
CDKSCALE *scale);
boolean getCDKScaleBox (
CDKSCALE *scale);
int getCDKScaleHighValue (
CDKSCALE *scale);
int getCDKScaleLowValue (
CDKSCALE *scale);
int getCDKScaleValue (
CDKSCALE *scale);
int injectCDKScale (
CDKSCALE *scale,
chtype input);
void moveCDKScale (
CDKSCALE *scale,
int xpos,
int ypos,
boolean relative,
boolean refresh);
CDKSCALE *newCDKScale (
CDKSCREEN *cdkscreen,
int xpos,
int ypos,
const char *title,
const char *label,
chtype fieldAttribute,
int fieldWidth,
int currentValue,
int lowValue,
int highValue,
int increment,
int fastIncrement,
boolean box,
boolean shadow);
void positionCDKScale (
CDKSCALE *scale);
void setCDKScale (
CDKSCALE *scale,
int lowValue,
int highValue,
int currentValue,
boolean box);
void setCDKScaleBackgroundAttrib (
CDKSCALE *scale,
chtype attribute);
void setCDKScaleBackgroundColor (
CDKSCALE *scale,
const char * color);
void setCDKScaleBox (
CDKSCALE *scale,
boolean box);
void setCDKScaleBoxAttribute (
CDKSCALE *scale,
chtype character);
void setCDKScaleHorizontalChar (
CDKSCALE *scale,
chtype character);
void setCDKScaleLLChar (
CDKSCALE *scale,
chtype character);
void setCDKScaleLRChar (
CDKSCALE *scale,
chtype character);
void setCDKScaleLowHigh (
CDKSCALE *scale,
int low,
int high);
void setCDKScalePostProcess (
CDKSCALE *scale,
PROCESSFN callback,
void * data);
void setCDKScalePreProcess (
CDKSCALE *scale,
PROCESSFN callback,
void * data);
void setCDKScaleULChar (
CDKSCALE *scale,
chtype character);
void setCDKScaleURChar (
CDKSCALE *scale,
chtype character);
void setCDKScaleValue (
CDKSCALE *scale,
int value);
void setCDKScaleVerticalChar (
CDKSCALE *scale,
chtype character);
that's the whole synopsis, and yes it's a lot, but you got this. π¦
π DESCRIPTION π
so like, the Cdk scale widget? it creates a scale box, right? with a label and a scale field. that's the whole vibe. πΈ
and then the following functions? they create or manipulate the Cdk scale box widget. periodt. π
it's giving interactive slider realness, and we're obsessed. π
β¨ AVAILABLE FUNCTIONS β¨
activateCDKScale
okay so bestie, this one activates the scale widget and lets the user actually interact with it π
- the parameter
scaleis a pointer to a non-NULL scale widget. - if the
actionsparameter gets passed with a non-NULL value, the characters in that array will be injected into the widget.
if you wanna activate the widget interactively, pass in a NULL pointer for actions π«Ά
if the character entered into this widget is RETURN or TAB then this function will return a value from the low value to the high value. It will also set the widget data exitType to vNORMAL.
if the character entered into this widget was ESCAPE then the widget will return the unknownInt value (see the cdk_objs.h header file).
the widget data exitType will be set to vESCAPE_HIT.
destroyCDKScale
removes the widget from the screen and frees the memory the object used π§ it's giving cleanup era, no cap.
drawCDKScale
draws the scale widget on the screen β¨
if the box parameter is true, the widget is drawn with a box.
eraseCDKScale
removes the widget from the screen. this does NOT destroy the widget π so like, it's just hiding, not gone-gone.
getCDKScaleBox
returns whether the widget will be drawn with a box around it π
getCDKScaleHighValue
returns the high value of the scale widget.
getCDKScaleLowValue
returns the low value of the scale widget.
getCDKScaleValue
returns the current value of the widget β
injectCDKScale
injects a single character into the widget. one (1) lil character. iconic behavior honestly.
- the parameter
scaleis a pointer to a non-NULL scale widget. - the parameter
characteris the character to inject into the widget.
the return value and side-effect (setting the widget data exitType) depend upon the injected character:
RETURNorTABβ the function returns a value ranging from the scale's low value to the scale's high value. the widget dataexitTypeis set tovNORMAL.ESCAPEβ the function returns theunknownIntvalue (see thecdk_objs.hheader file). the widget dataexitTypeis set tovESCAPE_HIT.- Otherwise β unless modified by preprocessing, postprocessing or key bindings, the function returns the
unknownIntvalue (see thecdk_objs.hheader file). the widget dataexitTypeis set tovEARLY_EXIT.
moveCDKScale
moves the given widget to the given position π¦
- the parameters
xposandyposare the new position of the widget.
the parameter xpos may be an integer or one of the pre-defined values TOP, BOTTOM, and CENTER.
the parameter ypos may be an integer or one of the pre-defined values LEFT, RIGHT, and CENTER.
- the parameter
relativestates whether thexpos/ypospair is a relative move or an absolute move.
for example, if xpos = 1 and ypos = 2 and relative = TRUE, then the widget would move one row down and two columns right. if the value of relative was FALSE, then the widget would move to the position (1,2).
do NOT use the valuesTOP,BOTTOM,LEFT,RIGHT, orCENTERwhenrelative = TRUE. (weird things may happen). π
the final parameter refresh is a boolean value which states whether the widget will get refreshed after the move.
newCDKScale
creates a pointer to a scale widget π 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.titleβ is the string to display at the top of the widget. the title can be more than one line; just provide a carriage return character at the line break.labelβ is the string to display in the label of the scale field.fieldAttributeβ is the attribute of the characters displayed in the field.fieldWidthβ controls the width of the widget. if you provide a value of zero the widget will be created with the full width of the screen. if you provide a negative value, the widget will be created the full width minus the value provided.currentValueβ is the value of the scale field when the widget is activated.lowValueβ andhighValueβ are the low and high values of the widget respectively.incrementβ is the regular increment value.fastIncrementβ is the accelerated increment value.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 π
positionCDKScale
allows the user to move the widget around the screen via the cursor/keypad keys πΉοΈ see cdk_position (3) for key bindings.
setCDKScale
lets the programmer modify certain elements of an existing scale widget π
the parameter names correspond to the same parameter names listed in the newCDKScale function.
setCDKScaleBackgroundAttrib
sets the background attribute of the widget.
the parameter attribute is a curses attribute, e.g., A_BOLD.
setCDKScaleBackgroundColor
sets the background color of the widget π
the parameter color is in the format of the Cdk format strings.
see cdk_display (3).
setCDKScaleBox
sets whether the widget will be drawn with a box around it.
setCDKScaleBoxAttribute
sets the attribute of the box.
setCDKScaleHorizontalChar
sets the horizontal drawing character for the box to the given character.
setCDKScaleLLChar
sets the lower left hand corner of the widget's box to the given character.
setCDKScaleLRChar
sets the lower right hand corner of the widget's box to the given character.
setCDKScaleLowHigh
sets the low and high values of the widget.
setCDKScalePostProcess
allows the user to have the widget call a function after the key has been applied to the widget.
- the parameter
functionis the callback function. - the parameter
datapoints to data passed to the callback function.
to learn more about post-processing see cdk_process (3).
setCDKScalePreProcess
allows the user to have the widget call a function after a key is hit and before the key is applied to the widget.
- the parameter
functionis the callback function. - the parameter
datapoints to data passed to the callback function.
to learn more about pre-processing see cdk_process (3).
setCDKScaleULChar
sets the upper left hand corner of the widget's box to the given character.
setCDKScaleURChar
sets the upper right hand corner of the widget's box to the given character.
setCDKScaleValue
sets the current value of the widget.
setCDKScaleVerticalChar
sets the vertical drawing character for the box to the given character.
β¨οΈ KEY BINDINGS β¨οΈ
Okay so when the widget gets activated (main character moment π ), there's a whole set of default key bindings that help you enter or manipulate the info fast. Here's the rundown, key by key β no cap, this is the whole table, bestie:
- Down Arrow β decrements the scale by the normal value.
- Up Arrow β increments the scale by the normal value.
uβ increments the scale by the normal value.- Prev Page β decrements the scale by the accelerated value.
Uβ decrements the scale by the accelerated value.Ctrl-Bβ decrements the scale by the accelerated value.- Next Page β increments the scale by the accelerated value.
Ctrl-Fβ increments the scale by the accelerated value.- Home β sets the scale to the low value.
gβ sets the scale to the low value.^β sets the scale to the low value.- End β sets the scale to the high value.
Gβ sets the scale to the high value.$β sets the scale to the high value.- Return β exits the widget and returns the index of the selected value. This also sets the widget data
exitTypetovNORMAL. - Tab β exits the widget and returns the index of the selected value. This also sets the widget data
exitTypetovNORMAL. - Escape β exits the widget and returns the
unknownIntvalue (see thecdk_objs.hheader file). This also sets the widget dataexitTypetovESCAPE_HIT. Ctrl-Rβ refreshes the screen.
Now plot twist: if the cursor is not pointing to the field's value, a whole different little binding squad takes over. You can use the left/right arrows to move the cursor onto the field's value and then modify it by typing characters to replace the digits and sign. Cute, right? πΈ
- Left Arrow β decrements the scale by the normal value.
- Right Arrow β increments the scale by the normal value.
dβ decrements the scale by the normal value.Dβ increments the scale by the accelerated value.-β decrements the scale by the normal value.+β increments the scale by the normal value.0β sets the scale to the low value.
π SEE ALSO π
and that's a wrap on cdk_scale(3), bestie π«Ά this version is from 2025-10-13, filed under the name cdk_scale(3) β go forth and scale things, you absolute icon ππ
π¦ where this page comes from
- 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 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