DTWSMADDWORKSPACEMODIFIEDCALLBACK(3)
β¨ NAME β¨
DtWsmAddWorkspaceModifiedCallback β literally βadd a callback to be called when any workspace is changed,β bestie. Thatβs the whole name, folded in right here so you donβt have to squint at the header line. π
πΈ SYNOPSIS πΈ
#include &<Dt/Wsm.h>
DtWsmCBContext DtWsmAddWorkspaceModifiedCallback(
Widget widget,
DtWsmWsModifiedProc ws_change,
Pointer client_data);
π¦ DESCRIPTION π¦
Okay so hereβs the tea: DtWsmAddWorkspaceModifiedCallback works with the XCDE workspace manager, dtwm(1), and registers a function to be called when a workspace is added, deleted, or modified. Not me being obsessed with workspace events or anything π.
widgetβ a realized widget. Like, actually realized.ws_changeβ the procedure to be called when a workspace is modified.client_dataβ points to arbitrary client data to be passed back tows_change.
The header defines the DtWsmWsModifiedProc callback prototype as follows:
typedef void (*DtWsmWsModifiedProc)(Widget widget,
Atom aWorkspace,
DtWsmWsReason reason,
Pointer client_data);
π§ Callback prototype, decoded π§
widgetβ the ID of the widget to be registered with the callback.aWorkspaceβ the name of the new current workspace (converted to an X atom). Iconic.reasonβ a type of modification; the options are right below.client_dataβ points to the client data to be registered with the callback.
The reason argument is a type of modification:
DtWSM_REASON_ADDβ a new workspace was added.DtWSM_REASON_BACKDROPβ the backdrop for the workspace changed.DtWSM_REASON_CURRENTβ a different workspace was made the current workspace.DtWSM_REASON_DELETEβ a workspace was deleted.DtWSM_REASON_TITLEβ the workspace title changed.
The client_data argument points to the client data to be registered with the callback. π«Ά
π RETURN VALUE π
Upon successful completion, the DtWsmAddWorkspaceModifiedCallback function returns a workspace callback registration context. Slay. β¨
π APPLICATION USAGE π
- The
DtWsmAddWorkspaceModifiedCallbackfunction returns a registration context that the application must save in order to remove this callback later. Do not lose it in the group chat, bestie. π DtWsmAddWorkspaceModifiedCallbackrequires a window; thus, a gadget is not acceptable for thewidgetargument.- The
DtWsmRemoveWorkspaceCallback(3)function needs a registration context to remove the callback.
π SEE ALSO π
Dt/Wsm.h-DtWsm(5),dtwm(1),DtWsmGetWorkspaceInfo(3),DtWsmGetWorkspaceList(3),DtWsmRemoveWorkspaceCallback(3).
Okay thatβs the page, bestie π. Footer sign-off: weβre in the (library call) source/version zone, and the footer just echoes the truncated title loop β no date was printed, so Iβm not making one up. Mwah πβ¨
π¦ 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