Skip to content

Enums and variables

ItsZariep edited this page Sep 9, 2024 · 1 revision

This page contains enums and variables used in SGXPos code. You probably don't need this page, as it is intended for SGXPos development purposes, and most of the variables are in the static scope.

Enums

sgxposedge

Defines possible edges for positioning.

Name Description
SGX_POS_EDGE_LEFT Represents the left edge of the screen or window.
SGX_POS_EDGE_RIGHT Represents the right edge of the screen or window.
SGX_POS_EDGE_TOP Represents the top edge of the screen or window.
SGX_POS_EDGE_BOTTOM Represents the bottom edge of the screen or window.
SGX_POS_EDGE_NONE No edge is specified (NULL value).
SGX_POS_EDGE_COUNT Represents the count of enum values, used for bounds checking.

Definition:

typedef enum
{
	SGX_POS_EDGE_LEFT,
	SGX_POS_EDGE_RIGHT,
	SGX_POS_EDGE_TOP,
	SGX_POS_EDGE_BOTTOM,
	SGX_POS_EDGE_NONE,
	SGX_POS_EDGE_COUNT,
} sgxposedge;

sgxlayer

Defines possible window layers, referring to the _NET_WM_WINDOW_TYPE and _NET_WM_STATE standards.

Name Description
SGX_LAYER_MENU Refers to _NET_WM_WINDOW_TYPE_MENU, indicating a menu layer.
SGX_LAYER_DOCK Refers to _NET_WM_WINDOW_TYPE_DOCK, indicating a dock layer.
SGX_LAYER_NORMAL Refers to _NET_WM_WINDOW_TYPE_NORMAL, indicating a normal window layer.
SGX_LAYER_BELOW Refers to _NET_WM_STATE_BELOW, indicating that the window is below other windows.
SGX_LAYER_BACKGROUND Refers to _NET_WM_WINDOW_TYPE_DESKTOP, indicating a background layer.
SGX_LAYER_COUNT Represents the count of enum values, used for bounds checking.

Definition:

typedef enum
{
	SGX_LAYER_MENU,
	SGX_LAYER_DOCK,
	SGX_LAYER_NORMAL,
	SGX_LAYER_BELOW,
	SGX_LAYER_BACKGROUND,
	SGX_LAYER_COUNT,
} sgxlayer;

Variables

Display Type (Display)

Variable Scope Description
*SGXDisplay Global Represents the screen display used for window management.

Boolean Flags (gboolean)

Variable Scope Description Default Value
TMPREDIM Static Temporary REDIM declaration
SGXSETEXCLUSIVEZONE Static Flag to set the exclusive zone, with an initial value of 0.
WTOP Static Indicates whether the window is set to the top edge.
WBOTTOM Static Indicates whether the window is set to the bottom edge.
WLEFT Static Indicates whether the window is set to the left edge.
WRIGHT Static Indicates whether the window is set to the right edge.
top_set Static Flag indicating if the top edge has been set. FALSE
bottom_set Static Flag indicating if the bottom edge has been set. FALSE
left_set Static Flag indicating if the left edge has been set. FALSE
right_set Static Flag indicating if the right edge has been set. FALSE

Integer Variables (int)

Variable Scope Description Default Value
edgewrapped Static Counter or flag for edge wrapping status. 0
layerwrapped Static Counter or flag for layer wrapping status. 0
strutwrapped Static Counter or flag for strut wrapping status. 0
original_width Static Stores the original width of the window, default is -1. -1
original_height Static Stores the original height of the window, default is -1. -1
mtop Static Margin or offset value for the top edge. 0
mbottom Static Margin or offset value for the bottom edge. 0
mleft Static Margin or offset value for the left edge. 0
mright Static Margin or offset value for the right edge. 0
SGXPos_VERSION Global Specifies the version of the SGXPos

Others

Variable Scope Type Description
TMPEDGE Static sgxposedge Temporary EDGE declaration
TMPLAYER Static sgxlayer Temporary LAYER declaration