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

Header for client placement functions. More...

#include "client.h"

Go to the source code of this file.

Data Structures

struct  BoundingBox
 Bounding box. More...
 

Typedefs

typedef struct BoundingBox BoundingBox
 Bounding box.
 

Functions

void RemoveClientStrut (ClientNode *np)
 Remove struts associated with a client.
 
void ReadClientStrut (ClientNode *np)
 Read struts associated with a client.
 
void PlaceClient (ClientNode *np, char alreadyMapped)
 Place a client on the screen.
 
void PlaceMaximizedClient (ClientNode *np, MaxFlags flags)
 Place a maximized client on the screen.
 
void GravitateClient (ClientNode *np, char negate)
 Move a client window for a border.
 
void GetGravityDelta (const ClientNode *np, int gravity, int *x, int *y)
 Get the x and y deltas for gravitating a client.
 
char ConstrainSize (ClientNode *np)
 Constrain the size of a client.
 
void ConstrainPosition (ClientNode *np)
 Constrain the position of a client.
 
void GetScreenBounds (const struct ScreenType *sp, BoundingBox *box)
 Get the bounding box for the screen.
 
#define InitializePlacement()   (void)(0)
 
#define DestroyPlacement()   (void)(0)
 
void StartupPlacement (void)
 Startup placement.
 
void ShutdownPlacement (void)
 Shutdown placement.
 

Detailed Description

Header for client placement functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file place.h.

Macro Definition Documentation

#define DestroyPlacement ( )    (void)(0)

Definition at line 30 of file place.h.

Referenced by Destroy().

#define InitializePlacement ( )    (void)(0)

Definition at line 27 of file place.h.

Referenced by Initialize().

Typedef Documentation

typedef struct BoundingBox BoundingBox

Bounding box.

Function Documentation

void ConstrainPosition ( ClientNode np)
char ConstrainSize ( ClientNode np)
void GetGravityDelta ( const ClientNode np,
int  gravity,
int *  x,
int *  y 
)

Get the x and y deltas for gravitating a client.

Parameters
npThe client.
gravityThe gravity to use.
xLocation to store the x delta.
yLocation to store the y delta.

Definition at line 876 of file place.c.

References GetBorderSize(), and ClientNode::state.

Referenced by GravitateClient(), HandleConfigureRequest(), HandleNetMoveResize(), and HandleNetWMMoveResize().

void GetScreenBounds ( const struct ScreenType sp,
BoundingBox box 
)

Get the bounding box for the screen.

Parameters
spA pointer to the screen whose bounds to get.
boxThe bounding box for the screen.
void GravitateClient ( ClientNode np,
char  negate 
)

Move a client window for a border.

Parameters
npThe client.
negate0 to gravitate for a border, 1 to gravitate for no border.

Definition at line 925 of file place.c.

References GetGravityDelta(), ClientNode::gravity, ClientNode::x, and ClientNode::y.

Referenced by HandleUnmapNotify(), PlaceClient(), and RemoveClient().

void PlaceClient ( ClientNode np,
char  alreadyMapped 
)

Place a client on the screen.

Parameters
npThe client to place.
alreadyMapped1 if already mapped, 0 if unmapped.

Definition at line 640 of file place.c.

References Assert, Strut::box, CascadeClient(), CenterClient(), ConstrainPosition(), ConstrainSize(), GetMouseScreen(), GetScreenBounds(), GravitateClient(), ClientState::layer, ClientNode::sizeFlags, STAT_CENTERED, STAT_PIGNORE, STAT_TILED, ClientNode::state, ClientState::status, SubtractStrutBounds(), SubtractTrayBounds(), and TileClient().

Referenced by AddClientWindow().

void PlaceMaximizedClient ( ClientNode np,
MaxFlags  flags 
)
void ReadClientStrut ( ClientNode np)
void RemoveClientStrut ( ClientNode np)

Remove struts associated with a client.

Parameters
npThe client.

Definition at line 80 of file place.c.

References DoRemoveClientStrut(), and SetWorkarea().

Referenced by RemoveClient().

void ShutdownPlacement ( void  )

Shutdown placement.

Definition at line 64 of file place.c.

References cascadeOffsets, Strut::next, and Release.

Referenced by Shutdown().

void StartupPlacement ( void  )

Startup placement.

Definition at line 47 of file place.c.

References Allocate, Settings::borderWidth, cascadeOffsets, Settings::desktopCount, GetScreenCount(), GetTitleHeight(), settings, and SetWorkarea().

Referenced by Startup().

joewing.net / Projects / JWM