Defines a set of configuration attributes for windows.
Graphic-Window-Configuration | Defines a set of configuration attributes for windows. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file Graphic-Window-Configuration. |
C-kern/ | Implementation file Graphic-Window-Configuration impl. |
Types | |
struct windowconfig_t | Export windowconfig_t into global namespace. |
Enumerations | |
windowconfig_e | |
Functions | |
test | |
unittest_graphic_windowconfig | Test windowconfig_t functionality. |
windowconfig_t | Type of a single window configuration attribute. |
lifetime | |
windowconfig_INIT_NONE | Static initializer to mark end of configuration list. |
windowconfig_INIT_FRAME | Static initializer to switch on window frame drawn by the window manager. |
windowconfig_INIT_MAXSIZE | Static initializer to set maximum possible size (width, height) of window. |
windowconfig_INIT_MINSIZE | Static initializer to set minimum possible size (width, height) of window. |
windowconfig_INIT_POS | Static initializer to set initial position (x,y) of window. |
windowconfig_INIT_SIZE | Static initializer to set initial size (width, height) of window. |
windowconfig_INIT_TITLE | Static initializer to set initial size of window. |
windowconfig_INIT_TRANSPARENCY | Static initializer to set transparency of window. |
query | |
readtype_windowconfig | Reads the attribute type windowconfig_e at attrindex in array winconf. |
readmaxsize_windowconfig | Reads a maxsize attribute value at attrindex in array winconf. |
readminsize_windowconfig | Reads a minsize attribute value at attrindex in array winconf. |
readpos_windowconfig | Reads a position attribute value at attrindex in array winconf. |
readsize_windowconfig | Reads a size attribute value at attrindex in array winconf. |
readtitle_windowconfig | Reads a title attribute value at attrindex in array winconf. |
readtransparency_windowconfig | Reads an alpha value at attrindex in array winconf. |
inline implementation | |
Macros | |
readtype_windowconfig | Implements windowconfig_t.readtype_windowconfig. |
readmaxsize_windowconfig | Implements windowconfig_t.readmaxsize_windowconfig. |
readminsize_windowconfig | Implements windowconfig_t.readminsize_windowconfig. |
readpos_windowconfig | Implements windowconfig_t.readpos_windowconfig. |
readsize_windowconfig | Implements windowconfig_t.readsize_windowconfig. |
readtitle_windowconfig | Implements windowconfig_t.readtitle_windowconfig. |
readtransparency_windowconfig | Implements windowconfig_t.readtransparency_windowconfig. |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
© 2014 Jörg Seebohn
Header file Graphic-Window-Configuration.
Implementation file Graphic-Window-Configuration impl.
typedef struct windowconfig_t windowconfig_t
Export windowconfig_t into global namespace.
windowconfig_NONE | Marks end of attribute list. |
windowconfig_FRAME | Sets window frame border flag to true. Default value is false. No additional attribute value is encoded. |
windowconfig_MAXSIZE | Sets the maximum window size. Default value is unlimited. Two additional attribute values are encoded. |
windowconfig_MINSIZE | Sets the minimum window size. Default value is the same as the size attribute. Two additional attribute values are encoded. |
windowconfig_POS | Sets the window position. Default value is either (0,0) or chosen by the window manager. Two additional attribute values are encoded. |
windowconfig_SIZE | Sets the window size. Default value is (100,100). Two additional attribute values are encoded. |
windowconfig_TITLE | Sets the title string of the window utf8. Default value is “”. One additional attribute is encoded. The string is expected to be encoded as UTF8. |
windowconfig_TRANSPARENCY | Sets a transparency value for the whole window. Value 255: Window is fully opaque. Value 0: Window is fully transparent. DEfault value is 255. |
windowconfig_NROFELEMENTS | Gives the number of all valid configuration options excluding windowconfig_NROFELEMENTS. |
test | |
unittest_graphic_windowconfig | Test windowconfig_t functionality. |
int unittest_graphic_windowconfig( void )
Test windowconfig_t functionality.
struct windowconfig_t
Type of a single window configuration attribute.
lifetime | |
windowconfig_INIT_NONE | Static initializer to mark end of configuration list. |
windowconfig_INIT_FRAME | Static initializer to switch on window frame drawn by the window manager. |
windowconfig_INIT_MAXSIZE | Static initializer to set maximum possible size (width, height) of window. |
windowconfig_INIT_MINSIZE | Static initializer to set minimum possible size (width, height) of window. |
windowconfig_INIT_POS | Static initializer to set initial position (x,y) of window. |
windowconfig_INIT_SIZE | Static initializer to set initial size (width, height) of window. |
windowconfig_INIT_TITLE | Static initializer to set initial size of window. |
windowconfig_INIT_TRANSPARENCY | Static initializer to set transparency of window. |
query | |
readtype_windowconfig | Reads the attribute type windowconfig_e at attrindex in array winconf. |
readmaxsize_windowconfig | Reads a maxsize attribute value at attrindex in array winconf. |
readminsize_windowconfig | Reads a minsize attribute value at attrindex in array winconf. |
readpos_windowconfig | Reads a position attribute value at attrindex in array winconf. |
readsize_windowconfig | Reads a size attribute value at attrindex in array winconf. |
readtitle_windowconfig | Reads a title attribute value at attrindex in array winconf. |
readtransparency_windowconfig | Reads an alpha value at attrindex in array winconf. |
windowconfig_e readtype_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex )
Reads the attribute type windowconfig_e at attrindex in array winconf. The attrindex is incremented by one.
#define readtype_windowconfig( winconf, attrindex ) ((windowconfig_e) winconf[(*(attrindex))++].i32)
Implements windowconfig_t.readtype_windowconfig.
#define readmaxsize_windowconfig( winconf, attrindex, width, height ) readsize_windowconfig(winconf, attrindex, width, height)
Implements windowconfig_t.readmaxsize_windowconfig.
#define readminsize_windowconfig( winconf, attrindex, width, height ) readsize_windowconfig(winconf, attrindex, width, height)
Implements windowconfig_t.readminsize_windowconfig.
#define readpos_windowconfig( winconf, attrindex, x, y ) { *(x) = winconf[(*(attrindex))++].i32; *(y) = winconf[(*(attrindex))++].i32; }
Implements windowconfig_t.readpos_windowconfig.
#define readsize_windowconfig( winconf, attrindex, width, height ) { *(width) = winconf[(*(attrindex))++].u16; *(height) = winconf[(*(attrindex))++].u16; }
Implements windowconfig_t.readsize_windowconfig.
#define readtitle_windowconfig( winconf, attrindex ) (winconf[(*(attrindex))++].str)
Implements windowconfig_t.readtitle_windowconfig.
#define readtransparency_windowconfig( winconf, attrindex ) (winconf[(*(attrindex))++].u8)
Implements windowconfig_t.readtransparency_windowconfig.
Export windowconfig_t into global namespace.
typedef struct windowconfig_t windowconfig_t
Type of a single window configuration attribute.
struct windowconfig_t
Test windowconfig_t functionality.
int unittest_graphic_windowconfig( void )
Static initializer to mark end of configuration list.
#define windowconfig_INIT_NONE { .i32 = windowconfig_NONE }
Static initializer to switch on window frame drawn by the window manager.
#define windowconfig_INIT_FRAME { .i32 = windowconfig_FRAME }
Static initializer to set maximum possible size (width, height) of window.
#define windowconfig_INIT_MAXSIZE( maxwidth, maxheight ) { .i32 = windowconfig_MAXSIZE }, { .u16 = maxwidth }, { .u16 = maxheight }
Static initializer to set minimum possible size (width, height) of window.
#define windowconfig_INIT_MINSIZE( minwidth, minheight ) { .i32 = windowconfig_MINSIZE }, { .u16 = minwidth }, { .u16 = minheight }
Static initializer to set initial position (x,y) of window.
#define windowconfig_INIT_POS( x, y ) { .i32 = windowconfig_POS }, { .i32 = x }, { .i32 = y }
Static initializer to set initial size (width, height) of window.
#define windowconfig_INIT_SIZE( width, height ) { .i32 = windowconfig_SIZE }, { .u16 = width }, { .u16 = height }
Static initializer to set initial size of window.
#define windowconfig_INIT_TITLE( title ) { .i32 = windowconfig_TITLE }, { .str = title }
Static initializer to set transparency of window.
#define windowconfig_INIT_TRANSPARENCY( alpha ) { .i32 = windowconfig_TRANSPARENCY }, { .u8 = alpha/*only 0..255*/ }
Reads the attribute type windowconfig_e at attrindex in array winconf.
windowconfig_e readtype_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex )
Reads a maxsize attribute value at attrindex in array winconf.
void readmaxsize_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex, /*out*/uint32_t * width, /*out*/uint32_t * height )
Reads a minsize attribute value at attrindex in array winconf.
void readminsize_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex, /*out*/uint32_t * width, /*out*/uint32_t * height )
Reads a position attribute value at attrindex in array winconf.
void readpos_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex, /*out*/int32_t * x, /*out*/int32_t * y )
Reads a size attribute value at attrindex in array winconf.
void readsize_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex, /*out*/uint32_t * width, /*out*/uint32_t * height )
Reads a title attribute value at attrindex in array winconf.
const char * readtitle_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex )
Reads an alpha value at attrindex in array winconf.
uint8_t readtransparency_windowconfig( const windowconfig_t * winconf, uint_fast8_t * attrindex )
Implements windowconfig_t.readtype_windowconfig.
#define readtype_windowconfig( winconf, attrindex ) ((windowconfig_e) winconf[(*(attrindex))++].i32)
Implements windowconfig_t.readmaxsize_windowconfig.
#define readmaxsize_windowconfig( winconf, attrindex, width, height ) readsize_windowconfig(winconf, attrindex, width, height)
Implements windowconfig_t.readminsize_windowconfig.
#define readminsize_windowconfig( winconf, attrindex, width, height ) readsize_windowconfig(winconf, attrindex, width, height)
Implements windowconfig_t.readpos_windowconfig.
#define readpos_windowconfig( winconf, attrindex, x, y ) { *(x) = winconf[(*(attrindex))++].i32; *(y) = winconf[(*(attrindex))++].i32; }
Implements windowconfig_t.readsize_windowconfig.
#define readsize_windowconfig( winconf, attrindex, width, height ) { *(width) = winconf[(*(attrindex))++].u16; *(height) = winconf[(*(attrindex))++].u16; }
Implements windowconfig_t.readtitle_windowconfig.
#define readtitle_windowconfig( winconf, attrindex ) (winconf[(*(attrindex))++].str)
Implements windowconfig_t.readtransparency_windowconfig.
#define readtransparency_windowconfig( winconf, attrindex ) (winconf[(*(attrindex))++].u8)