cdk_process(3)
๐ cdk_process โ bestie, it's giving Cdk widget pre/post-processing ๐
okay so real talk, this is cdk_process(3) from the Cdk library calls, and it's literally the glow-up your widget's input handling has been waiting for. no cap. โจ
๐ธ NAME ๐ธ
cdk_process โ Cdk widget pre/post-processing ๐
๐ฆ SYNOPSIS ๐ฆ
Perform pre- and post-processing of data which is injected into a widget.
like. that's the whole vibe. you're intercepting the data going in and the aftermath going out. iconic behavior honestly. ๐
โจ DESCRIPTION โจ
So here's the tea, bestie. โ Character input is handled by each widget by its injection function. And that injection function? It's typically a large case-statement consisting of the actions to be taken for editing and scrolling keys. Big girl. Lots of branches. She's doing the most, and we love her for it. ๐
But plot twist: the calling application can modify the behavior of the injection function by defining either or both preprocess and postprocess functions. Not one, not the other โ either or both. choose your fighter, or honestly, choose both, main character energy. ๐
๐ฎ preprocessing (the before times)
Preprocessing is performed before doing anything with the injected keystroke. So like, before the widget even looks at it. ๐
๐จ If the preprocess function returns zero, no further action is taken in the injection function. Like, door's closed, party's over, go home. ๐ญ
And ngl, note that the preprocess function may do more than filter out characters โ it can fill in logic to coordinate different widgets. So it's not just a bouncer at the door, it's like, a whole event planner. She's networking. She's connecting widgets to each other. lowkey powerful. ๐ซถ
๐ postprocessing (the after party)
Postprocessing is performed after all other actions have been done in the injection function. Cleanup crew. Closing shift. โจ
Like the other actions, it is performed only if the preprocess function returns a nonzero value. So remember: preprocess says yes, postprocess gets to play. ๐ซ
And unlike the preprocess function, its return value is ignored. Bestie said her opinion does not matter and she's at peace with it. ๐
๐ SEE ALSO ๐
go read those too, iykyk ๐ฆ
and that's the whole page, bestie!! ๐ this one's from 2024-03-28, sourced from the Cdk library โ mwah, no notes, slay, periodt. ๐โจ
๐ฆ where this page comes from
- debian trixie: libcdk5-dev 5.0.20250116-1 ยท BSD-4-Clause
- fedora 43: cdk 5.0.20240619-4.fc43 ยท LicenseRef-Callaway-BSD-with-advertising
- fedora 43: cdk 5.0.20240619-4.fc43 ยท LicenseRef-Callaway-BSD-with-advertising
- 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