JWM Source Documentation
Data Structures | Typedefs | Functions
screen.h File Reference

Header for screen functions. More...

Go to the source code of this file.

Data Structures

struct  ScreenType
 Structure to contain information about a screen. More...
 

Typedefs

typedef struct ScreenType ScreenType
 Structure to contain information about a screen.
 

Functions

const ScreenTypeGetCurrentScreen (int x, int y)
 Get the screen of the specified coordinates.
 
const ScreenTypeGetMouseScreen (void)
 Get the screen containing the mouse.
 
const ScreenTypeGetScreen (int index)
 Get the screen of the specified index.
 
int GetScreenCount (void)
 Get the number of screens.
 
#define InitializeScreens()   (void)(0)
 
#define DestroyScreens()   (void)(0)
 
void StartupScreens (void)
 Startup screens.
 
void ShutdownScreens (void)
 Shutdown screens.
 

Detailed Description

Header for screen functions.

Author
Joe Wingbermuehle
Date
2005-2006

Note that screen here refers to physical monitors. Screens are determined using the xinerama extension (if available). There will always be at least one screen.

Definition in file screen.h.

Macro Definition Documentation

#define DestroyScreens ( )    (void)(0)

Definition at line 28 of file screen.h.

Referenced by Destroy().

#define InitializeScreens ( )    (void)(0)

Definition at line 25 of file screen.h.

Referenced by Initialize().

Typedef Documentation

typedef struct ScreenType ScreenType

Structure to contain information about a screen.

Function Documentation

const ScreenType* GetCurrentScreen ( int  x,
int  y 
)

Get the screen of the specified coordinates.

Parameters
xThe x-coordinate.
yThe y-coordinate.
Returns
The screen.

Definition at line 81 of file screen.c.

References ScreenType::height, Max, Min, rootHeight, rootWidth, screenCount, ScreenType::width, ScreenType::x, and ScreenType::y.

Referenced by ComputeTraySize(), ConstrainSize(), GetMouseScreen(), GetMoveResizeCoordinates(), HideTray(), MapMenu(), PlaceMaximizedClient(), ProcessActionPress(), SendConfigureEvent(), SetClientFullScreen(), ShowClientList(), and ShowPopup().

const ScreenType* GetMouseScreen ( void  )

Get the screen containing the mouse.

Returns
The screen containing the mouse.

Definition at line 105 of file screen.c.

References GetCurrentScreen(), GetMousePosition(), Menu::x, and Menu::y.

Referenced by CascadeClient(), ComputeDimensions(), and PlaceClient().

const ScreenType* GetScreen ( int  index)

Get the screen of the specified index.

Parameters
indexThe screen index (0 based).
Returns
The screen.

Definition at line 123 of file screen.c.

References Assert, and screenCount.

Referenced by DoSnapScreen().

int GetScreenCount ( void  )

Get the number of screens.

Returns
The number of screens.

Definition at line 134 of file screen.c.

References screenCount.

Referenced by DoSnapScreen(), and StartupPlacement().

void ShutdownScreens ( void  )

Shutdown screens.

Definition at line 72 of file screen.c.

References Release.

Referenced by Shutdown().

void StartupScreens ( void  )

joewing.net / Projects / JWM