-StateRemove = 0
-"""For the state_* callbacks. Indicates the state should be removed from the
- window."""
-StateAdd = 1
-"""For the state_* callbacks. Indicates the state should be add to the
- window."""
-StateToggle = 2
-"""For the state_* callbacks. Indicates the state should be toggled on the
- window."""
-
-def state_above(data, add=StateAdd):
- """Toggles, adds or removes the 'above' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_above)
-
-def state_below(data, add=StateAdd):
- """Toggles, adds or removes the 'below' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_below)
-
-def state_shaded(data, add=StateAdd):
- """Toggles, adds or removes the 'shaded' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_shaded)
-
-def state_maximize(data, add=StateAdd):
- """Toggles, adds or removes the horizontal and vertical 'maximized' state
- on a window. The second paramater should one of: StateRemove, StateAdd,
- or StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_maximized_horz,
- otk.Property_atoms().net_wm_state_maximized_vert)
-
-def state_maximize_horz(data, add=StateAdd):
- """Toggles, adds or removes the horizontal 'maximized' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_maximized_horz)
-
-def state_maximize_vert(data, add=StateAdd):
- """Toggles, adds or removes the vertical 'maximized' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_maximized_vert)
-
-def state_skip_taskbar(data, add=StateAdd):
- """Toggles, adds or removes the 'skip_taskbar' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_skip_taskbar)
-
-def state_skip_pager(data, add=StateAdd):
- """Toggles, adds or removes the 'skip_pager' state on a window.
- The second paramater should one of: StateRemove, StateAdd, or
- StateToggle."""
- if not data.client: return
- ob.send_client_msg(otk.display.screenInfo(data.screen).rootWindow(),
- otk.Property_atoms().net_wm_state, data.client.window(),
- add, otk.Property_atoms().net_wm_state_skip_pager)
-