DTWSMADDCURRENTWORKSPACECALLBACK(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– DtWsmAddCurrentWorkspaceCallback(3) πŸ’–

okay bestie, welcome to this library call manual page β€” it's giving workspace-change notification realness and we're gonna get you all the way together. No cap, every deet is here. 🌸

✨ NAME ✨

DtWsmAddCurrentWorkspaceCallback β€” add a callback to be called when the current workspace changes. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

#include &<Dt/Wsm.h>
DtWsmCBContext DtWsmAddCurrentWorkspaceCallback(
Widget widget,
DtWsmWsChangeProc ws_change,
Pointer client_data);

πŸ’… DESCRIPTION πŸ’…

The DtWsmAddCurrentWorkspaceCallback function registers an application function to be called when the XCDE workspace manager, dtwm(1), switches to a new workspace. highkey iconic behavior.

The workspace manager sends the new current workspace name to the DtWsmWsChangeProc callback. πŸ¦‹

  • widget β€” a realized widget. periodt.
  • ws_change β€” the procedure to be called when the workspace changes.
  • client_data β€” points to arbitrary client data to be passed back to ws_change.

The header defines the DtWsmWsChangeProc callback prototype as follows:

typedef void (*DtWsmWsChangeProc)(Widget widget,
               Atom aWorkspace,
               Pointer client_data);
  • 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).
  • client_data β€” points to the client data to be registered with the callback.

🌈 RETURN VALUE 🌈

Upon successful completion, the DtWsmAddCurrentWorkspaceCallback function returns a workspace callback registration context. πŸ’–

πŸ¦‹ APPLICATION USAGE πŸ¦‹

The DtWsmAddCurrentWorkspaceCallback function returns a registration context that the application must save in order to remove this callback later. Like, do not lose it, bestie β€” it's main character energy for cleanup. 😭

DtWsmAddCurrentWorkspaceCallback requires a window; thus, a gadget is not acceptable for the widget argument. Not me warning you about gadgets β€” it's literally a no-gadget zone. πŸ™ˆ

The DtWsmRemoveWorkspaceCallback(3) function needs a registration context to remove the callback.

πŸ”₯ SEE ALSO πŸ”₯

Dt/Wsm.h - DtWsm(5), dtwm(1), DtWsmRemoveWorkspaceCallback(3).


And that's the tea from this library call page, bestie β€” the original footer only echoed the truncated title DtWsmAddCur...aceCallback(library call), so there wasn't a separate source/version/date line to quote. Still slayed. πŸŽ€βœ¨

πŸ“¦ where this page comes from