JWM Source Documentation

hint.h File Reference

Header for reading and writing X properties. More...

Go to the source code of this file.

Data Structures

struct  ClientState
 Client state information. More...

Defines

#define FIRST_NET_ATOM   ATOM_NET_SUPPORTED
#define LAST_NET_ATOM   ATOM_NET_SYSTEM_TRAY_OPCODE
#define FIRST_MWM_ATOM   ATOM_MOTIF_WM_HINTS
#define LAST_MWM_ATOM   ATOM_MOTIF_WM_HINTS

Typedefs

typedef struct ClientState ClientState
 Client state information.

Enumerations

enum  AtomType {
  ATOM_COMPOUND_TEXT, ATOM_UTF8_STRING, ATOM_XSETROOT_ID, ATOM_WM_STATE,
  ATOM_WM_PROTOCOLS, ATOM_WM_DELETE_WINDOW, ATOM_WM_TAKE_FOCUS, ATOM_WM_LOCALE_NAME,
  ATOM_WM_CHANGE_STATE, ATOM_WM_COLORMAP_WINDOWS, ATOM_NET_SUPPORTED, ATOM_NET_NUMBER_OF_DESKTOPS,
  ATOM_NET_DESKTOP_NAMES, ATOM_NET_DESKTOP_GEOMETRY, ATOM_NET_DESKTOP_VIEWPORT, ATOM_NET_CURRENT_DESKTOP,
  ATOM_NET_ACTIVE_WINDOW, ATOM_NET_WORKAREA, ATOM_NET_SUPPORTING_WM_CHECK, ATOM_NET_SHOWING_DESKTOP,
  ATOM_NET_FRAME_EXTENTS, ATOM_NET_WM_DESKTOP, ATOM_NET_WM_STATE, ATOM_NET_WM_STATE_STICKY,
  ATOM_NET_WM_STATE_MAXIMIZED_VERT, ATOM_NET_WM_STATE_MAXIMIZED_HORZ, ATOM_NET_WM_STATE_SHADED, ATOM_NET_WM_STATE_FULLSCREEN,
  ATOM_NET_WM_STATE_HIDDEN, ATOM_NET_WM_STATE_SKIP_TASKBAR, ATOM_NET_WM_STATE_BELOW, ATOM_NET_WM_STATE_ABOVE,
  ATOM_NET_WM_ALLOWED_ACTIONS, ATOM_NET_WM_ACTION_MOVE, ATOM_NET_WM_ACTION_RESIZE, ATOM_NET_WM_ACTION_MINIMIZE,
  ATOM_NET_WM_ACTION_SHADE, ATOM_NET_WM_ACTION_STICK, ATOM_NET_WM_ACTION_MAXIMIZE_HORZ, ATOM_NET_WM_ACTION_MAXIMIZE_VERT,
  ATOM_NET_WM_ACTION_CHANGE_DESKTOP, ATOM_NET_WM_ACTION_CLOSE, ATOM_NET_WM_ACTION_BELOW, ATOM_NET_WM_ACTION_ABOVE,
  ATOM_NET_CLOSE_WINDOW, ATOM_NET_MOVERESIZE_WINDOW, ATOM_NET_WM_NAME, ATOM_NET_WM_ICON,
  ATOM_NET_WM_WINDOW_TYPE, ATOM_NET_WM_WINDOW_TYPE_DESKTOP, ATOM_NET_WM_WINDOW_TYPE_DOCK, ATOM_NET_WM_WINDOW_TYPE_SPLASH,
  ATOM_NET_WM_WINDOW_TYPE_DIALOG, ATOM_NET_WM_WINDOW_TYPE_NORMAL, ATOM_NET_CLIENT_LIST, ATOM_NET_CLIENT_LIST_STACKING,
  ATOM_NET_WM_STRUT_PARTIAL, ATOM_NET_WM_STRUT, ATOM_NET_SYSTEM_TRAY_OPCODE, ATOM_NET_WM_WINDOW_OPACITY,
  ATOM_MOTIF_WM_HINTS, ATOM_JWM_RESTART, ATOM_JWM_EXIT, ATOM_JWM_RELOAD,
  ATOM_COUNT
}
 Enumeration of atoms. More...
enum  WinLayerType {
  LAYER_BOTTOM = 0, LAYER_BELOW = 2, LAYER_NORMAL = 4, LAYER_ABOVE = 6,
  DEFAULT_TRAY_LAYER = 8, LAYER_TOP = 12, LAYER_COUNT = 13
}
 Enumeration of window layers. More...
enum  ClientProtocolType { PROT_NONE = 0, PROT_DELETE = 1, PROT_TAKE_FOCUS = 2 }
 Client protocols (to be used as a bit mask). More...

Functions

void InitializeHints ()
void StartupHints ()
void ShutdownHints ()
void DestroyHints ()
void ReadCurrentDesktop ()
 Determine the current desktop.
void ReadClientProtocols (struct ClientNode *np)
 Read client protocols.
void ReadWMName (struct ClientNode *np)
 Read a client's name.
void ReadWMClass (struct ClientNode *np)
 Read a client's class.
void ReadWMNormalHints (struct ClientNode *np)
 Read normal hints for a client.
ClientProtocolType ReadWMProtocols (Window w)
 Read the WM_PROTOCOLS property for a window.
void ReadWMColormaps (struct ClientNode *np)
 Read colormap information for a client.
void ReadWinLayer (struct ClientNode *np)
 Determine the layer of a client.
ClientState ReadWindowState (Window win)
 Read the current state of a window.
void WriteState (struct ClientNode *np)
 Set the state of a client window.
int GetCardinalAtom (Window window, AtomType atom, unsigned long *value)
 Read a cardinal atom.
int GetWindowAtom (Window window, AtomType atom, Window *value)
 Read a window atom.
void SetCardinalAtom (Window window, AtomType atom, unsigned long value)
 Set a cardinal atom.
void SetWindowAtom (Window window, AtomType atom, unsigned long value)
 Set a window atom.
void SetPixmapAtom (Window window, AtomType atom, Pixmap value)
 Set a pixmap atom.

Variables

Atom atoms [ATOM_COUNT]

Detailed Description

Header for reading and writing X properties.

Author:
Joe Wingbermuehle
Date:
2004-2006

Definition in file hint.h.


Define Documentation

#define FIRST_MWM_ATOM   ATOM_MOTIF_WM_HINTS

Definition at line 106 of file hint.h.

#define FIRST_NET_ATOM   ATOM_NET_SUPPORTED

Definition at line 103 of file hint.h.

#define LAST_MWM_ATOM   ATOM_MOTIF_WM_HINTS

Definition at line 107 of file hint.h.

#define LAST_NET_ATOM   ATOM_NET_SYSTEM_TRAY_OPCODE

Definition at line 104 of file hint.h.


Typedef Documentation

typedef struct ClientState ClientState

Client state information.


Enumeration Type Documentation

enum AtomType

Enumeration of atoms.

Enumerator:
ATOM_COMPOUND_TEXT 
ATOM_UTF8_STRING 
ATOM_XSETROOT_ID 
ATOM_WM_STATE 
ATOM_WM_PROTOCOLS 
ATOM_WM_DELETE_WINDOW 
ATOM_WM_TAKE_FOCUS 
ATOM_WM_LOCALE_NAME 
ATOM_WM_CHANGE_STATE 
ATOM_WM_COLORMAP_WINDOWS 
ATOM_NET_SUPPORTED 
ATOM_NET_NUMBER_OF_DESKTOPS 
ATOM_NET_DESKTOP_NAMES 
ATOM_NET_DESKTOP_GEOMETRY 
ATOM_NET_DESKTOP_VIEWPORT 
ATOM_NET_CURRENT_DESKTOP 
ATOM_NET_ACTIVE_WINDOW 
ATOM_NET_WORKAREA 
ATOM_NET_SUPPORTING_WM_CHECK 
ATOM_NET_SHOWING_DESKTOP 
ATOM_NET_FRAME_EXTENTS 
ATOM_NET_WM_DESKTOP 
ATOM_NET_WM_STATE 
ATOM_NET_WM_STATE_STICKY 
ATOM_NET_WM_STATE_MAXIMIZED_VERT 
ATOM_NET_WM_STATE_MAXIMIZED_HORZ 
ATOM_NET_WM_STATE_SHADED 
ATOM_NET_WM_STATE_FULLSCREEN 
ATOM_NET_WM_STATE_HIDDEN 
ATOM_NET_WM_STATE_SKIP_TASKBAR 
ATOM_NET_WM_STATE_BELOW 
ATOM_NET_WM_STATE_ABOVE 
ATOM_NET_WM_ALLOWED_ACTIONS 
ATOM_NET_WM_ACTION_MOVE 
ATOM_NET_WM_ACTION_RESIZE 
ATOM_NET_WM_ACTION_MINIMIZE 
ATOM_NET_WM_ACTION_SHADE 
ATOM_NET_WM_ACTION_STICK 
ATOM_NET_WM_ACTION_MAXIMIZE_HORZ 
ATOM_NET_WM_ACTION_MAXIMIZE_VERT 
ATOM_NET_WM_ACTION_CHANGE_DESKTOP 
ATOM_NET_WM_ACTION_CLOSE 
ATOM_NET_WM_ACTION_BELOW 
ATOM_NET_WM_ACTION_ABOVE 
ATOM_NET_CLOSE_WINDOW 
ATOM_NET_MOVERESIZE_WINDOW 
ATOM_NET_WM_NAME 
ATOM_NET_WM_ICON 
ATOM_NET_WM_WINDOW_TYPE 
ATOM_NET_WM_WINDOW_TYPE_DESKTOP 
ATOM_NET_WM_WINDOW_TYPE_DOCK 
ATOM_NET_WM_WINDOW_TYPE_SPLASH 
ATOM_NET_WM_WINDOW_TYPE_DIALOG 
ATOM_NET_WM_WINDOW_TYPE_NORMAL 
ATOM_NET_CLIENT_LIST 
ATOM_NET_CLIENT_LIST_STACKING 
ATOM_NET_WM_STRUT_PARTIAL 
ATOM_NET_WM_STRUT 
ATOM_NET_SYSTEM_TRAY_OPCODE 
ATOM_NET_WM_WINDOW_OPACITY 
ATOM_MOTIF_WM_HINTS 
ATOM_JWM_RESTART 
ATOM_JWM_EXIT 
ATOM_JWM_RELOAD 
ATOM_COUNT 

Definition at line 16 of file hint.h.

Client protocols (to be used as a bit mask).

Enumerator:
PROT_NONE 
PROT_DELETE 
PROT_TAKE_FOCUS 

Definition at line 130 of file hint.h.

Enumeration of window layers.

Enumerator:
LAYER_BOTTOM 
LAYER_BELOW 
LAYER_NORMAL 
LAYER_ABOVE 
DEFAULT_TRAY_LAYER 
LAYER_TOP 
LAYER_COUNT 

Definition at line 110 of file hint.h.


Function Documentation

void DestroyHints ( )
int GetCardinalAtom ( Window  window,
AtomType  atom,
unsigned long *  value 
)

Read a cardinal atom.

Parameters:
windowThe window.
atomThe atom to read.
valueA pointer to the location to save the atom.
Returns:
1 on success, 0 on failure.
int GetWindowAtom ( Window  window,
AtomType  atom,
Window *  value 
)

Read a window atom.

Parameters:
windowThe window.
atomThe atom to read.
valueA pointer to the location to save the atom.
Returns:
1 on success, 0 on failure.
void InitializeHints ( )
void ReadClientProtocols ( struct ClientNode np)

Read client protocols.

Parameters:
npThe client.
void ReadCurrentDesktop ( )

Determine the current desktop.

ClientState ReadWindowState ( Window  win)

Read the current state of a window.

Parameters:
winThe window.
Returns:
The window state.
void ReadWinLayer ( struct ClientNode np)

Determine the layer of a client.

Parameters:
npThe client.
void ReadWMClass ( struct ClientNode np)

Read a client's class.

Parameters:
npThe client.
void ReadWMColormaps ( struct ClientNode np)

Read colormap information for a client.

Parameters:
npThe client.
void ReadWMName ( struct ClientNode np)

Read a client's name.

Parameters:
npThe client.
void ReadWMNormalHints ( struct ClientNode np)

Read normal hints for a client.

Parameters:
npThe client.
ClientProtocolType ReadWMProtocols ( Window  w)

Read the WM_PROTOCOLS property for a window.

Parameters:
wThe window.
Returns:
The protocols.
void SetCardinalAtom ( Window  window,
AtomType  atom,
unsigned long  value 
)

Set a cardinal atom.

Parameters:
windowThe window.
atomThe atom to set.
valueThe value.
void SetPixmapAtom ( Window  window,
AtomType  atom,
Pixmap  value 
)

Set a pixmap atom.

Parameters:
windowThe window.
atomThe atom to set.
valueThe value.
void SetWindowAtom ( Window  window,
AtomType  atom,
unsigned long  value 
)

Set a window atom.

Parameters:
windowThe window.
atomThe atom to set.
valueThe value.
void ShutdownHints ( )
void StartupHints ( )
void WriteState ( struct ClientNode np)

Set the state of a client window.

Parameters:
npThe client.

Variable Documentation

Atom atoms[ATOM_COUNT]