X11-Videomode

Allows to query and change the video mode of a screen of x11screen_t.

Summary
X11-VideomodeAllows to query and change the video mode of a screen of x11screen_t.
CopyrightThis program is free software.
Files
C-kern/api/platform/X11/x11videomode.hHeader file X11-Videomode.
C-kern/platform/X11/x11videomode.cImplementation file X11-Videomode impl.
Types
struct x11videomode_tExport x11videomode_t into global namespace.
struct x11videomode_iterator_tExport x11videomode_iterator_t into global namespace.
Functions
test
unittest_platform_X11_x11videomodeTest x11videomode_t functionality.
x11videomode_tDescribes a single supported videmode.
width_in_pixelPixel size in horizontal direction.
height_in_pixelPixel size in vertical direction.
modeidInternal implementation specific id.
lifetime
x11videomode_FREEStatic initializer.
initfromvalues_x11videomodeInitializes xvidmode with the parameter values.
initcurrent_x11videomodeReturns the current active video mode of the default screen.
change x11screen_t
set_x11videomodeSets a new videomode of x11screen_t.
x11videomode_iterator_tAllows to query all supported videmodes of a x11screen_t.
lifetime
x11videomode_iterator_FREEStatic initializer.
init_x11videomodeiteratorReturns an iterator to a list of all video modes supported by x11screen_t.
free_x11videomodeiteratorFrees the iterator and the associated list of all videomodes.
iterator
gofirst_x11videomodeiteratorResets iterator to first element.
next_x11videomodeiteratorReturns next videomode element.
inline implementation
x11videomode_t
initfromvalues_x11videomodeImplements x11videomode_t.initfromvalues_x11videomode.

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/x11videomode.h

Header file X11-Videomode.

C-kern/platform/X11/x11videomode.c

Implementation file X11-Videomode impl.

Types

struct x11videomode_t

typedef struct x11videomode_t x11videomode_t

Export x11videomode_t into global namespace.

struct x11videomode_iterator_t

typedef struct x11videomode_iterator_t x11videomode_iterator_t

Export x11videomode_iterator_t into global namespace.

Functions

test

unittest_platform_X11_x11videomode

int unittest_platform_X11_x11videomode(void)

Test x11videomode_t functionality.

x11videomode_t

struct x11videomode_t

Describes a single supported videmode.

Summary
width_in_pixelPixel size in horizontal direction.
height_in_pixelPixel size in vertical direction.
modeidInternal implementation specific id.
lifetime
x11videomode_FREEStatic initializer.
initfromvalues_x11videomodeInitializes xvidmode with the parameter values.
initcurrent_x11videomodeReturns the current active video mode of the default screen.
change x11screen_t
set_x11videomodeSets a new videomode of x11screen_t.

width_in_pixel

uint32_t width_in_pixel

Pixel size in horizontal direction.

height_in_pixel

uint32_t height_in_pixel

Pixel size in vertical direction.

modeid

uint16_t modeid

Internal implementation specific id.

lifetime

x11videomode_FREE

#define x11videomode_FREE { 0, 0, 0 }

Static initializer.

initfromvalues_x11videomode

void initfromvalues_x11videomode(/*out*/x11videomode_t *xvidmode,
uint32_t width_in_pixel,
uint32_t height_in_pixel,
uint16_t modeid)

Initializes xvidmode with the parameter values.

initcurrent_x11videomode

int initcurrent_x11videomode(/*out*/x11videomode_t *current_xvidmode,
struct x11screen_t *x11screen)

Returns the current active video mode of the default screen.

change x11screen_t

set_x11videomode

int set_x11videomode(const x11videomode_t *xvidmode,
struct x11screen_t *x11screen)

Sets a new videomode of x11screen_t.

x11videomode_iterator_t

struct x11videomode_iterator_t

Allows to query all supported videmodes of a x11screen_t.

Summary
lifetime
x11videomode_iterator_FREEStatic initializer.
init_x11videomodeiteratorReturns an iterator to a list of all video modes supported by x11screen_t.
free_x11videomodeiteratorFrees the iterator and the associated list of all videomodes.
iterator
gofirst_x11videomodeiteratorResets iterator to first element.
next_x11videomodeiteratorReturns next videomode element.

lifetime

x11videomode_iterator_FREE

#define x11videomode_iterator_FREE { 0, 0, 0 }

Static initializer.

init_x11videomodeiterator

int init_x11videomodeiterator(/*out*/x11videomode_iterator_t *xvidit,
struct x11screen_t *x11screen)

Returns an iterator to a list of all video modes supported by x11screen_t.

free_x11videomodeiterator

int free_x11videomodeiterator(x11videomode_iterator_t *xvidit)

Frees the iterator and the associated list of all videomodes.

iterator

gofirst_x11videomodeiterator

void gofirst_x11videomodeiterator(x11videomode_iterator_t *xvidit)

Resets iterator to first element.

next_x11videomodeiterator

bool next_x11videomodeiterator(x11videomode_iterator_t *xvidit,
/*out*/x11videomode_t *xvidmode)

Returns next videomode element.  The first call after gofirst_x11videomodeiterator returns the first element.

x11videomode_t

initfromvalues_x11videomode

#define initfromvalues_x11videomode(
   xvidmode,
   width_in_pixel,
   height_in_pixel,
   modeid
) ((void)(*(xvidmode) = (x11videomode_t) { width_in_pixel, height_in_pixel, modeid }))

Implements x11videomode_t.initfromvalues_x11videomode.

Allows to query and change the video mode of a screen of x11screen_t.
Implements X11-Videomode.
typedef struct x11videomode_t x11videomode_t
Export x11videomode_t into global namespace.
struct x11videomode_t
Describes a single supported videmode.
typedef struct x11videomode_iterator_t x11videomode_iterator_t
Export x11videomode_iterator_t into global namespace.
struct x11videomode_iterator_t
Allows to query all supported videmodes of a x11screen_t.
int unittest_platform_X11_x11videomode(void)
Test x11videomode_t functionality.
uint32_t width_in_pixel
Pixel size in horizontal direction.
uint32_t height_in_pixel
Pixel size in vertical direction.
uint16_t modeid
Internal implementation specific id.
#define x11videomode_FREE { 0, 0, 0 }
Static initializer.
void initfromvalues_x11videomode(/*out*/x11videomode_t *xvidmode,
uint32_t width_in_pixel,
uint32_t height_in_pixel,
uint16_t modeid)
Initializes xvidmode with the parameter values.
int initcurrent_x11videomode(/*out*/x11videomode_t *current_xvidmode,
struct x11screen_t *x11screen)
Returns the current active video mode of the default screen.
int set_x11videomode(const x11videomode_t *xvidmode,
struct x11screen_t *x11screen)
Sets a new videomode of x11screen_t.
#define x11videomode_iterator_FREE { 0, 0, 0 }
Static initializer.
int init_x11videomodeiterator(/*out*/x11videomode_iterator_t *xvidit,
struct x11screen_t *x11screen)
Returns an iterator to a list of all video modes supported by x11screen_t.
int free_x11videomodeiterator(x11videomode_iterator_t *xvidit)
Frees the iterator and the associated list of all videomodes.
void gofirst_x11videomodeiterator(x11videomode_iterator_t *xvidit)
Resets iterator to first element.
bool next_x11videomodeiterator(x11videomode_iterator_t *xvidit,
/*out*/x11videomode_t *xvidmode)
Returns next videomode element.
#define initfromvalues_x11videomode(
   xvidmode,
   width_in_pixel,
   height_in_pixel,
   modeid
) ((void)(*(xvidmode) = (x11videomode_t) { width_in_pixel, height_in_pixel, modeid }))
Implements x11videomode_t.initfromvalues_x11videomode.
Close