JWM Source Documentation

border.h File Reference

Header file for border functions. More...

#include "gradient.h"

Go to the source code of this file.

Enumerations

enum  BorderPixmapType {
  BP_CLOSE, BP_MINIMIZE, BP_MAXIMIZE, BP_MAXIMIZE_ACTIVE,
  BP_COUNT
}
 Border button image masks. More...
enum  BorderActionType {
  BA_NONE = 0, BA_RESIZE = 1, BA_MOVE = 2, BA_CLOSE = 3,
  BA_MAXIMIZE = 4, BA_MINIMIZE = 5, BA_MENU = 6, BA_RESIZE_N = 0x10,
  BA_RESIZE_S = 0x20, BA_RESIZE_E = 0x40, BA_RESIZE_W = 0x80
}
 Flags to determine what action to take on the border. More...

Functions

BorderActionType GetBorderActionType (const struct ClientNode *np, int x, int y)
 Determine the action to take for a client.
void DrawBorder (const struct ClientNode *np, const XExposeEvent *expose)
 Draw a window border.
int GetBorderIconSize ()
 Get the size of a border icon.
void GetBorderSize (const struct ClientNode *np, int *north, int *south, int *east, int *west)
 Get the size of a window border.
void SetBorderWidth (const char *str)
 Set the size of window borders.
void SetTitleHeight (const char *str)
 Set the size of window title bars.
void ExposeCurrentDesktop ()
 Redraw all borders on the current desktop.
void ResetRoundedRectWindow (Window w)
 Reset a rounded rectangle window.
void ShapeRoundedRectWindow (Window w, int width, int height)
 Shape a rounded rectangle window.
void SetButtonMask (BorderPixmapType pt, const char *filename)
 Set the bitmask to use for a button.
void DrawRoundedRectangle (Drawable d, GC gc, int x, int y, int width, int height, int radius)
 Draw a rounded rectangle.
void FillRoundedRectangle (Drawable d, GC gc, int x, int y, int width, int height, int radius)
 Fill a rounded rectangle.
void InitializeBorders ()
void StartupBorders ()
void ShutdownBorders ()
void DestroyBorders ()

Detailed Description

Header file for border functions.

Author:
Joe Wingbermuehle
Date:
2004-2006

Definition in file border.h.


Enumeration Type Documentation

Flags to determine what action to take on the border.

Enumerator:
BA_NONE 

Do nothing.

BA_RESIZE 

Resize the window.

BA_MOVE 

Move the window.

BA_CLOSE 

Close the window.

BA_MAXIMIZE 

Maximize the window.

BA_MINIMIZE 

Minimize the window.

BA_MENU 

Show the window menu.

BA_RESIZE_N 

Resize north.

BA_RESIZE_S 

Resize south.

BA_RESIZE_E 

Resize east.

BA_RESIZE_W 

Resize west.

Definition at line 27 of file border.h.

Border button image masks.

Enumerator:
BP_CLOSE 
BP_MINIMIZE 
BP_MAXIMIZE 
BP_MAXIMIZE_ACTIVE 
BP_COUNT 

Definition at line 18 of file border.h.


Function Documentation

void DestroyBorders ( )
void DrawBorder ( const struct ClientNode np,
const XExposeEvent *  expose 
)

Draw a window border.

Parameters:
npThe client whose frame to draw.
exposeThe expose event causing the redraw (or NULL).
void DrawRoundedRectangle ( Drawable  d,
GC  gc,
int  x,
int  y,
int  width,
int  height,
int  radius 
)

Draw a rounded rectangle.

void ExposeCurrentDesktop ( )

Redraw all borders on the current desktop.

void FillRoundedRectangle ( Drawable  d,
GC  gc,
int  x,
int  y,
int  width,
int  height,
int  radius 
)

Fill a rounded rectangle.

BorderActionType GetBorderActionType ( const struct ClientNode np,
int  x,
int  y 
)

Determine the action to take for a client.

Parameters:
npThe client.
xThe x-coordinate of the mouse (frame relative).
yThe y-coordinate of the mouse (frame relative).
Returns:
The action to take.
int GetBorderIconSize ( )

Get the size of a border icon.

Returns:
The size in pixels (note that icons are square).
void GetBorderSize ( const struct ClientNode np,
int *  north,
int *  south,
int *  east,
int *  west 
)

Get the size of a window border.

Parameters:
npThe client.
northPointer to the value to contain the north border size.
southPointer to the value to contain the south border size.
eastPointer to the value to contain the east border size.
westPointer to the value to contain the west border size.
void InitializeBorders ( )
void ResetRoundedRectWindow ( Window  w)

Reset a rounded rectangle window.

Parameters:
wThe window.
void SetBorderWidth ( const char *  str)

Set the size of window borders.

Parameters:
strThe size to use in string form.
void SetButtonMask ( BorderPixmapType  pt,
const char *  filename 
)

Set the bitmask to use for a button.

Parameters:
ptThe button bitmask to set.
filenameThe name of the file containing the bitmask.
void SetTitleHeight ( const char *  str)

Set the size of window title bars.

Parameters:
strThe size to use in string form.
void ShapeRoundedRectWindow ( Window  w,
int  width,
int  height 
)

Shape a rounded rectangle window.

Parameters:
wThe window to shape.
widthThe width of the window.
heightThe height of the window.
void ShutdownBorders ( )
void StartupBorders ( )