WINDOWSWM(3)
πΈ NAME πΈ
Okay bestie, this is the WindowsWM manual page β thatβs the manual name β and itβs the Cygwin/X rootless window management extension. Official vibe: WindowsWM - Cygwin/X rootless window management extension. Slay. π
β¨ SYNTAX β¨
Hereβs the include and the full function signatures, copied exactly so you can paste them into your notes. No cap, donβt rename anything:
#include <X11/extensions/windowswm.h>
Bool XWindowsWMQueryExtension (Display *dpy,
int *event_base, int *error_base);
Status XWindowsWMQueryVersion (Display *dpy, int *majorVersion,
int *minorVersion, int *patchVersion);
Bool XWindowsWMDisableUpdate (Display *dpy, int screen);
Bool XWindowsWMReenableUpdate (Display *dpy, int screen);
Bool XWindowsWMSelectInput (Display *dpy, unsigned long mask);
Bool XWindowsWMSetFrontProcess (Display *dpy);
Bool XWindowsWMFrameGetRect (Display *dpy,
unsigned int frame_style,
unsigned int frame_style_ex,
unsigned int frame_rect,
short inner_x, short inner_y,
short inner_w, short inner_h,
short *ret_x, short *ret_y,
short *ret_w, short *ret_h);
Bool XWindowsWMFrameDraw (Display *dpy, int screen,
Window window,
unsigned int frame_style,
unsigned int frame_style_ex,
short inner_x, short inner_y,
short inner_w, short inner_h);
Bool XWindowsWMFrameSetTitle (Display *dpy, int screen,
Window window,
unsigned int title_length,
const char *title_bytes);
π ARGUMENTS π
dpyβ specifies the connection to the X server. Thatβs your display hookup, bestie.screenβ specifies which screen.maskβ mask of event types the client is interested in.windowβ specifies which window.frame_styleβ specifies the style of window frame decoration.frame_style_exβ specifies the extended style of window frame decoration.frame_rectβ specifies which rectangle to return from the window frame decoration.inner_x,inner_y,inner_w,inner_hβ rectangle of the window content inside the window frame decoration.
Also, because the signatures above are extra: XWindowsWMFrameGetRect carries ret_x, ret_y, ret_w, ret_h, and XWindowsWMFrameSetTitle carries title_length plus title_bytes. Those are in the SYNTAX block exactly, so donβt let them ghost you. π»
π¦ DATATYPES π¦
π«Ά Events π«Ά
This extension has one event struct you need to know about, and itβs called XWindowsWMNotifyEvent:
typedef struct {
int type; * of event *
unsigned long serial; * # of last request processed by server *
Bool send_event; * true if came from a SendEvent request *
Display *display; * Display the event was read from *
Window window; * window of event *
Time time; * server timestamp when event happened *
int kind; * subtype of event *
int arg;
int x;
int y;
int w;
int h;
} XWindowsWMNotifyEvent;
XWindowsWMNotifyEvent is sent to a client who has requested notification of WindowsWM events with XWindowsWMSelectInput.
β Event types:
#define WindowsWMControllerNotify 0
#define WindowsWMActivationNotify 1
#define WindowsWMNumberEvents 2
β Event masks:
#define WindowsWMControllerNotifyMask (1L << 0)
#define WindowsWMActivationNotifyMask (1L << 1)
β Kinds of ControllerNotify events:
#define WindowsWMMinimizeWindow 0
#define WindowsWMMaximizeWindow 1
#define WindowsWMRestoreWindow 2
#define WindowsWMCloseWindow 3
#define WindowsWMBringAllToFront 4
#define WindowsWMHideWindow 5
#define WindowsWMMoveWindow 6
#define WindowsWMResizeWindow 7
#define WindowsWMActivateWindow 8
β Kinds of ActivationNotify events:
#define WindowsWMIsActive 0
#define WindowsWMIsInactive 1
β Errors:
#define WindowsWMClientNotLocal 0
#define WindowsWMOperationNotSupported 1
#define WindowsWMNumberErrors 2
π Window Parameters π
Values for frame_rect argument to XWindowsWMFrameGetRect:
#define WindowsWMFrameRectTitleBar 1
#define WindowsWMFrameRectTracking 2
#define WindowsWMFrameRectGrowBox 3
Window frame styles:
#define WindowsWMFrameStyleBorder 0x800000
#define WindowsWMFrameStyleCaption 0xc00000
#define WindowsWMFrameStyleChild 0x40000000
#define WindowsWMFrameStyleChildWindow 0x40000000
#define WindowsWMFrameStyleClipChildren 0x2000000
#define WindowsWMFrameStyleClipSiblings 0x4000000
#define WindowsWMFrameStyleDisabled 0x8000000
#define WindowsWMFrameStyleDlgFrame 0x400000
#define WindowsWMFrameStyleGroup 0x20000
#define WindowsWMFrameStyleHScroll 0x100000
#define WindowsWMFrameStyleIconic 0x20000000
#define WindowsWMFrameStyleMaximize 0x1000000
#define WindowsWMFrameStyleMaximizeBox 0x10000
#define WindowsWMFrameStyleMinimize 0x20000000
#define WindowsWMFrameStyleMinimizeBox 0x20000
#define WindowsWMFrameStyleOverlapped 0
#define WindowsWMFrameStyleOverlappedWindow 0xcf0000
#define WindowsWMFrameStylePopup 0x80000000
#define WindowsWMFrameStylePopupWindow 0x80880000
#define WindowsWMFrameStyleSizeBox 0x40000
#define WindowsWMFrameStyleSysMenu 0x80000
#define WindowsWMFrameStyleTabStop 0x10000
#define WindowsWMFrameStyleThickFrame 0x40000
#define WindowsWMFrameStyleTiled 0
#define WindowsWMFrameStyleTiledWindow 0xcf0000
#define WindowsWMFrameStyleVisible 0x10000000
#define WindowsWMFrameStyleVScroll 0x200000
Window frame extended styles:
#define WindowsWMFrameStyleExAcceptFiles 16
#define WindowsWMFrameStyleExAppWindow 0x40000
#define WindowsWMFrameStyleExClientEdge 512
#define WindowsWMFrameStyleExComposited 0x2000000
#define WindowsWMFrameStyleExContextHelp 0x400
#define WindowsWMFrameStyleExControlParent 0x10000
#define WindowsWMFrameStyleExDlgModalFrame 1
#define WindowsWMFrameStyleExLayered 0x80000
#define WindowsWMFrameStyleExLayoutRtl 0x400000
#define WindowsWMFrameStyleExLeft 0
#define WindowsWMFrameStyleExLeftScrollBar 0x4000
#define WindowsWMFrameStyleExLtrReading 0
#define WindowsWMFrameStyleExMDIChild 64
#define WindowsWMFrameStyleExNoActivate 0x8000000
#define WindowsWMFrameStyleExNoInheritLayout 0x100000
#define WindowsWMFrameStyleExNoParentNotify 4
#define WindowsWMFrameStyleExOverlappedWindow 0x300
#define WindowsWMFrameStyleExPaletteWindow 0x188
#define WindowsWMFrameStyleExRight 0x1000
#define WindowsWMFrameStyleExRightScrollBar 0
#define WindowsWMFrameStyleExRtlReading 0x2000
#define WindowsWMFrameStyleExStaticEdge 0x20000
#define WindowsWMFrameStyleExToolWindow 128
#define WindowsWMFrameStyleExTopMost 8
#define WindowsWMFrameStyleExTransparent 32
#define WindowsWMFrameStyleExWindowEdge 256
π DESCRIPTION π
WindowsWM is a simple library designed to interface with the Windows-WM extension. This extension allows X window managers to better interact with the Cygwin XWin server when running X11 in a rootless mode. Thatβs the whole plot. π«Ά
Also, the page literally says: βA more complete description will be forthcoming eventually.β So if you were hoping for more lore, bestie, same. π
π FUNCTIONS π
XWindowsWMDisableUpdateβ causes any updates to the windows on the screen to be queued until updates are reenabled withXWindowsWMReenableUpdate. This is useful to avoid intermediate redraws to the screen if a number of changes are going to be made at once. Updates should only be disabled temporarily while drawing to a window. These calls may be nested and each call toXWindowsWMDisableUpdatemust be paired with a subsequent call toXWindowsWMReenableUpdate. Updating is not reenabled until the last unnested call toXWindowsWMReenableUpdate. Disabling updates applies to window content; however, it is implementation dependent whether window size and position changes are disabled as well. That βtemporarilyβ is doing real work β donβt leave updates off forever, okay? πXWindowsWMSelectInputβ is used to request that a client receive notification of the WindowsWM events listed above. The event mask specifies the event types the client is interested in receiving. Passing an event mask of0stops notification of events.XWindowsWMSetFrontProcessβ directs the X server to make itself the front most application among all the other Windows applications. This causes X11 windows to move above other applications' windows and for the X server to start receiving keyboard and mouse events. Main character energy for the X server, honestly. πXWindowsWMFrameDrawβ can be used to decorate a top-level window with the standard Windows window frame and widgets. Theframe_stylecontrols the overall look of the window frame andframe_style_exspecifies the extended window style attributes. The dimensions of the X11 window content are passed as theinner_*rectangle.XWindowsWMFrameGetRectis used to calculate the size of the rectangle from the size of the window content, which is being reparented.XWindowsWMFrameSetTitleβ can be used to set the title of the Windows window decoration.XWindowsWMFrameGetRectβ returns a rectangle that encloses an element of the window frame decoration. Theframe_rectargument specifies the element of interest. Theinner_*rectangle (as described above) specifies the window geometry. IfWindowsWMFrameRectTitleBaris passed forframe_rect, theinner_*parameters are ignored. TheWindowsWMFrameRectTrackingandWindowsWMFrameRectGrowBoxrectangles are primarily intended to be used by the window manager to determine the correct placement for child windows to receive events. The tracking rectangle is the area of the window containing the close, collapse and zoom boxes. Typically when the cursor is over this area, the window manager will highlight the close, collapse, and zoom buttons to conform to the standard Aqua interface.- Other functions β include
XWindowsWMQueryExtension, which returns the event and error base codes, andXWindowsWMQueryVersion, which returns the current version of the extension. (This information is cached by the library.) Iykyk. β¨
π RESTRICTIONS π
WindowsWM is only intended to be used on Cygwin when running a rootless XWin server. Periodt. π
π Thatβs the whole manual, bestie: source/version vibes are XFree86, Version 1.0, and the filed page is WINDOWSWM(3). Go forth and rootlessly slay. π¦β¨
π¦ where this page comes from
- nixos 26.05: libwindowswm 1.0.1
- nixpkgs unstable: libwindowswm 1.0.1
- Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved
- Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved
- Copyright (c) 2008 Yaakov Selkowitz, All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms