X11workbench Toolkit
1.0
|
Modules | |
structures | |
Typedefs | |
typedef struct s_WBGC * | WBGC |
internal wrapper struct for GC with local cache More... | |
typedef struct s_WB_POINT | WB_POINT |
internal wrapper struct for 'point' definition More... | |
typedef struct s_WB_EXTENT | WB_EXTENT |
internal wrapper struct for 'extent' definition More... | |
typedef struct s_WB_RECT | WB_RECT |
internal wrapper struct for 'rectangle' definition More... | |
typedef struct s_WB_GEOM | WB_GEOM |
internal wrapper struct for X11 'geometry' definition More... | |
Structures that help to implement 'Core' functionality
internal wrapper struct for 'extent' definition
The extent structure has been defined primarily for convenience, so that specific coding methods that work well in GUI environments that use 'extents' can easily be ported into this environment.
Definition at line 79 of file font_helper.h.
internal wrapper struct for X11 'geometry' definition
The geometry structure is a wrapper for the X11 functions that specify the individual parameters for a geometry, such as XGetGeometry. Instead of passing 5 integers, you pass the pointer to a structure for the X11workbench API functions. This provides many advantages over the 'individual parameter' method as well as providing a structure for cacheing geometry information.
Use of 'int' and 'unsigned int' for the various parameter is consistent with the various 'Geom' functions, which typically use 'int *' for returned parameters, as shown:
internal wrapper struct for 'point' definition
The point structure has been defined primarily for convenience, so that specific coding methods that work well in GUI environments that use 'points' can easily be ported into this environment.
Note that this is different from an XPoint structure, which is defined as
internal wrapper struct for 'rectangle' definition
The rectangle structure has been defined primarily for convenience, so that specific coding methods that work well in GUI environments that use rectangles (instead of 'geometry') can easily be ported into this environment.
Note that this is different from an XRectangle structure, which is defined as
internal wrapper struct for GC with local cache
The WBGC data type (and its associated structure) represent a locally cached 'Graphics Context' that can be efficiently used by the X11workbench Toolkit . It is similar to a GC structure in X11, and an HDC in windows, and exists for basically the same purpose.
Local cacheing of context information improves efficiency, especially for remote X11 clients.
It is generally safe to query the 'values' member in order to get cached information about the WBGC. You should not change them, however.
The XOrg documentation defines the XGCValues structure as follows:
Additional information regarding the drawing of lines
The XOrg 'manual page' documentation for XGCValues also includes the following information (slightly edited):
To be fair, the use of a line width of zero in the X11Workbench Toolkit is NOT recommended. The XImage code will assume zero implies width=1.
Also, an algorithm that allows the 'touching' of the same point many times is not impractical with an XImage; that is, the amount of code needed to check if a point were touched or will be touched is more computationally expensive than 'just touching it anyway'. As such, the XImage code may 'touch' a point multiple times, depending. For video hardware, especially accelerated video hardware, this could be a performance hit. But when using an XImage as a backing store for the window contents, it makes more sense to simply draw it anyway.
Additional information can be found in the aforementioned manual page.