X11-Screen

Describes a single monitor (or group of monitors depending on configuration).

Summary
X11-ScreenDescribes a single monitor (or group of monitors depending on configuration).
CopyrightThis program is free software.
Files
C-kern/api/platform/X11/x11screen.hHeader file X11-Screen.
C-kern/platform/X11/x11screen.cImplementation file X11-Screen impl.
Types
struct x11screen_tExport x11screen_t into global namespace.
Functions
test
unittest_platform_X11_x11screenTest x11screen_t functionality.
x11screen_tAssociates a x11display_t with a screen number.
lifetime
x11screen_FREEStatic initializer.
x11screen_INITStatic initializer.
init_x11screenInitializes x11screen_t with reference to x11display_t and screen number.
query
display_x11screenReturns the display of the screen of.
number_x11screenReturns the number of the screen of x11display_t.
isequal_x11screenReturns true if the two objects refer to the same screen.
inline implementation
x11screen_t
display_x11screenImplements x11screen_t.display_x11screen.
number_x11screenImplements x11screen_t.number_x11screen.

Copyright

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.

Author

© 2013 Jörg Seebohn

Files

C-kern/api/platform/X11/x11screen.h

Header file X11-Screen.

C-kern/platform/X11/x11screen.c

Implementation file X11-Screen impl.

Types

struct x11screen_t

typedef struct x11screen_t x11screen_t

Export x11screen_t into global namespace.

Functions

test

unittest_platform_X11_x11screen

int unittest_platform_X11_x11screen(void)

Test x11screen_t functionality.

x11screen_t

struct x11screen_t

Associates a x11display_t with a screen number.  A display normally corresponds to a graphics card and the screen to an attached monitor.

Summary
lifetime
x11screen_FREEStatic initializer.
x11screen_INITStatic initializer.
init_x11screenInitializes x11screen_t with reference to x11display_t and screen number.
query
display_x11screenReturns the display of the screen of.
number_x11screenReturns the number of the screen of x11display_t.
isequal_x11screenReturns true if the two objects refer to the same screen.

lifetime

x11screen_FREE

#define x11screen_FREE { 0, 0 }

Static initializer.

x11screen_INIT

#define x11screen_INIT(display,
nrscreen) { display, nrscreen }

Static initializer.

init_x11screen

int init_x11screen(/*out*/x11screen_t *x11screen,
struct x11display_t *display,
uint32_t nrscreen)

Initializes x11screen_t with reference to x11display_t and screen number.  If nrscreen >= <nrofscreens_x11display>(display) then error EINVAL is returned.  Do not free the display as long as x11screen_t is not freed.

query

display_x11screen

struct x11display_t * display_x11screen(const x11screen_t *x11screen)

Returns the display of the screen of.

number_x11screen

int32_t number_x11screen(const x11screen_t *x11screen)

Returns the number of the screen of x11display_t.

isequal_x11screen

bool isequal_x11screen(const x11screen_t *lx11screen,
const x11screen_t *rx11screen)

Returns true if the two objects refer to the same screen.

x11screen_t

display_x11screen

#define display_x11screen(x11screen) ((x11screen)->display)

Implements x11screen_t.display_x11screen.

number_x11screen

#define number_x11screen(x11screen) ((x11screen)->nrscreen)

Implements x11screen_t.number_x11screen.

Describes a single monitor (or group of monitors depending on configuration).
Implements X11-Screen.
typedef struct x11screen_t x11screen_t
Export x11screen_t into global namespace.
struct x11screen_t
Associates a x11display_t with a screen number.
int unittest_platform_X11_x11screen(void)
Test x11screen_t functionality.
#define x11screen_FREE { 0, 0 }
Static initializer.
#define x11screen_INIT(display,
nrscreen) { display, nrscreen }
Static initializer.
int init_x11screen(/*out*/x11screen_t *x11screen,
struct x11display_t *display,
uint32_t nrscreen)
Initializes x11screen_t with reference to x11display_t and screen number.
struct x11display_t * display_x11screen(const x11screen_t *x11screen)
Returns the display of the screen of.
int32_t number_x11screen(const x11screen_t *x11screen)
Returns the number of the screen of x11display_t.
bool isequal_x11screen(const x11screen_t *lx11screen,
const x11screen_t *rx11screen)
Returns true if the two objects refer to the same screen.
#define display_x11screen(x11screen) ((x11screen)->display)
Implements x11screen_t.display_x11screen.
#define number_x11screen(x11screen) ((x11screen)->nrscreen)
Implements x11screen_t.number_x11screen.
Close