X11workbench Toolkit  1.0
Graphics Context APIs related to Windows

Macros

#define WBGetWindowCopyGC2(wID, gcSrc)   WBCopyDrawableGC(WBGetWindowDisplay(wID), wID, gcSrc)
 makes a copy of the specified WBGC for the desired window More...
 

Functions

void WBCreateWindowDefaultGC (Window wID, unsigned long clrFG, unsigned long clrBG)
 creates a default WBGC for a window More...
 
void WBSetWindowDefaultGC (Window wID, WBGC hGC)
 assigns a default WBGC to a window More...
 
WBGC WBGetWindowCopyGC (Window wID)
 makes a copy of the default WBGC so that it can be modified More...
 
WBGC WBGetWindowDefaultGC (Window wID)
 Returns the default WBGC currently assigned to the window (not a copy) More...
 

Detailed Description

See Also: Graphics Abstraction Layer

Macro Definition Documentation

◆ WBGetWindowCopyGC2

#define WBGetWindowCopyGC2 (   wID,
  gcSrc 
)    WBCopyDrawableGC(WBGetWindowDisplay(wID), wID, gcSrc)

makes a copy of the specified WBGC for the desired window

Parameters
wIDThe Window ID for which to copy the WBGC
gcSrcThe source 'WBGC'
Returns
A copy of the WBGC for the specified window

Essentially, it works the same as WBGetWindowCopyGC() except it uses gcSrc instead of the window's 'default WBGC'. (legacy, use WBCopyDrawableGC() instead)

Header File: window_helper.h

Definition at line 1419 of file window_helper.h.

Function Documentation

◆ WBCreateWindowDefaultGC()

void WBCreateWindowDefaultGC ( Window  wID,
unsigned long  clrFG,
unsigned long  clrBG 
)

creates a default WBGC for a window

Parameters
wIDThe Window ID for which to assign the colors
clrFGThe foreground color
clrBGThe background color

Header File: window_helper.h

Definition at line 5726 of file window_helper.c.

◆ WBGetWindowCopyGC()

WBGC WBGetWindowCopyGC ( Window  wID)

makes a copy of the default WBGC so that it can be modified

Parameters
wIDThe Window ID from which to copy the WBGC
Returns
A copy of the default WBGC for the specified window

Header File: window_helper.h

Definition at line 5817 of file window_helper.c.

◆ WBGetWindowDefaultGC()

WBGC WBGetWindowDefaultGC ( Window  wID)

Returns the default WBGC currently assigned to the window (not a copy)

Parameters
wIDThe Window ID from which to obtain the default WBGC
Returns
The default WBGC associated with the specified window. This is the actual WBGC, not a copy.

Each window that is mapped within the API will have a 'default WBGC' associated with it. This WBGC should not be modified unless you want the changes to remain for the next time a WBGC is required. A preferred method is to re-assign a new default WBGC with the new settings, or create a copy of the default WBGC as a 'starting point', then modify the copy as needed to perform the desired operation. This, in fact, will happen every time you use the API to handle Expose events, via the WBBeginPaint() and WBEndPaint() functions, where the paint WBGC is a modified version of the default WBGC.

Header File: window_helper.h

Definition at line 5805 of file window_helper.c.

◆ WBSetWindowDefaultGC()

void WBSetWindowDefaultGC ( Window  wID,
WBGC  hGC 
)

assigns a default WBGC to a window

Parameters
wIDThe Window ID for which to assign the WBGC
hGCThe WBGC to assign

Header File: window_helper.h

Definition at line 5774 of file window_helper.c.