TTDT_SUBCONTRACT_MANAGE(3)
π ttdt_subcontract_manage β manage an outstanding request
okay so real quick: this is a page from the ttdt_subcontract_manage(library call) manual, and yes bestie we're getting into it β¨
β¨ NAME β¨
ttdt_subcontract_manage β manage an outstanding request π«Ά
πΈ SYNOPSIS πΈ
#include <Tt/tttk.h>
Tt_pattern *ttdt_subcontract_manage(
Tt_message subcontract,
Ttdt_contract_cb cb,
Widget shell,
void *clientdata);
π¦ DESCRIPTION π¦
so ttdt_subcontract_manage is literally the function that lets a requester manage the standard Desktop interactions with the tool that's handling the request. main character energy fr π
what it does is register, in the default session, for TT_HANDLER-addressed requests Get_Geometry and Get_XInfo, plus Status notices. that's the whole vibe check β¨
now here's the tea on shell β β if shell is not NULL, the ToolTalk service handles the Get_Geometry and Get_XInfo notices transparently, no stress, it's handled π. otherwise it passes them to cb. but the Status notice? that one is always passed to the callback, every single time, no exceptions π
if you wanna know what a Ttdt_contract_cb callback actually is, go read ttdt_session_join(3) β it's all described over there π
π¨ important cleanup lore: ifsubcontractgets destroyed bytttk_message_destroy, then the patterns get destroyed too β iconic, self-cleaning, we love to see it. but otherwise, the caller is responsible for iterating over the array and destroying each pattern themselves. that's on you, bestie π don't forget or it's giving leak.
π RETURN VALUE π
Upon successful completion, ttdt_subcontract_manage returns a null-terminated array of Tt_pattern, and associates this array with subcontract. slay π
otherwise? it returns an error pointer π. the application can use tt_ptr_error(3) to extract one of the following Tt_status values from the returned handle:
TT_DESKTOP_EINVALβ both theshellandcbarguments wereNULL. like, both? yeah that's a no from me πTT_ERR_NOMEMβ there is insufficient memory available to perform the function. the math isn't mathing, no room πTT_ERR_NOMPβ thettsession(1)process is not running and the ToolTalk service cannot restart it. it's not giving what it needs to give πTT_ERR_POINTERβ thesubcontractargument was not a validTt_message. bestie that's not a real message π©TT_ERR_PROCIDβ the specified process identifier is out of date or invalid. expired, stale, past its moment β°
π SEE ALSO π
Tt/tttk.h-Tttttk(5)ttdt_session_join(3)tttk_message_destroy(3)
okay that's the whole page, you ate that π and just so you know, this was ttdt_subcontract_manage(library call) β same title on both ends of the page, cute little bookends π now go forth and manage those outstanding requests, bestie π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms