edelib
2.1.0
|
Typedefs | |
typedef void(* | NetwmCallback )(int action, Window xid, void *data) |
Functions | |
void | netwm_callback_add (NetwmCallback cb, void *data=0) |
void | netwm_callback_remove (NetwmCallback cb) |
bool | netwm_workarea_get_size (int &x, int &y, int &w, int &h) |
int | netwm_workspace_get_count (void) |
void | netwm_workspace_change (int n) |
int | netwm_workspace_get_current (void) |
int | netwm_workspace_get_names (char **&names) |
void | netwm_workspace_free_names (char **names) |
void | netwm_window_set_type (Window win, int t) |
int | netwm_window_get_type (Window win) |
void | netwm_window_set_strut (Window win, int left, int right, int top, int bottom) |
void | netwm_window_set_strut_partial (Window win, int sizes[12]) |
void | netwm_window_remove_strut (Window win) |
void | netwm_window_remove_strut_partial (Window win) |
int | netwm_window_get_all_mapped (Window **windows) |
int | netwm_window_get_workspace (Window win) |
int | netwm_window_is_manageable (Window win) |
char * | netwm_window_get_title (Window win) |
Fl_RGB_Image * | netwm_window_get_icon (Window win, unsigned int requested_width=0) |
Window | netwm_window_get_active (void) |
void | netwm_window_set_active (Window win, int source=0) |
void | netwm_window_maximize (Window win) |
void | netwm_window_close (Window win) |
void | wm_window_ede_restore (Window win) |
void | netwm_window_set_state (Window win, NetwmStateValue val, NetwmStateAction action) |
bool | netwm_window_get_all_states (Window win, list< NetwmStateValue > &ret) |
bool | netwm_window_have_state (Window win, NetwmStateValue val) |
WmStateValue | wm_window_get_state (Window win) |
void | wm_window_set_state (Window win, WmStateValue state) |
typedef void(* NetwmCallback)(int action, Window xid, void *data) |
Callback type for netwm_callback_add().
anonymous enum |
Various codes reported to callback added with netwm_callback_add().
anonymous enum |
Window type codes. Codes marked as (part of 1.4) are added in Window Manager Specification 1.4 and not all window managers support it. The rest of codes are part of 1.3 specification version.
enum NetwmStateAction |
enum NetwmStateValue |
State of the window. These values represent newer EWMH standard states.
enum WmStateValue |
void edelib::netwm_callback_add | ( | NetwmCallback | cb, |
void * | data = 0 |
||
) |
Register callback for events related to windows and environment. This function will open display by calling fl_open_display().
When actions get reported, window id will be set to target id. If action wasn't figured, it will be set to -1.
void edelib::netwm_callback_remove | ( | NetwmCallback | cb | ) |
Remove callback if exists.
void edelib::netwm_window_close | ( | Window | win | ) |
Close window.
Window edelib::netwm_window_get_active | ( | void | ) |
Return ID of currently focused window. If fails, return -1.
int edelib::netwm_window_get_all_mapped | ( | Window ** | windows | ) |
Get array of mapped windows. Returns array size or -1 if fails. Call XFree() to free allocation.
bool edelib::netwm_window_get_all_states | ( | Window | win, |
list< NetwmStateValue > & | ret | ||
) |
Get all window states. Returns false if wasn't able to retrieve window state.
Fl_RGB_Image* edelib::netwm_window_get_icon | ( | Window | win, |
unsigned int | requested_width = 0 |
||
) |
Return window icon set with _NET_WM_ICON property. Since application can have multiple icons, with this function you can set desired size to be returned, via requested_width. If icon with requested size wasn't found, it will return the first one.
char* edelib::netwm_window_get_title | ( | Window | win | ) |
Return window title or NULL if fails. Call free() on returned string.
int edelib::netwm_window_get_type | ( | Window | win | ) |
Return window type by returning one of NETWM_WINDOW_TYPE_* codes. If fails, the function returns -1.
int edelib::netwm_window_get_workspace | ( | Window | win | ) |
Get workspace given window resides. If fails returns -2 or return -1 if window is sticky (present on all workspaces).
bool edelib::netwm_window_have_state | ( | Window | win, |
NetwmStateValue | val | ||
) |
Check if window has given state. Returns false if not.
int edelib::netwm_window_is_manageable | ( | Window | win | ) |
Return 1 if given window is manageable (window can be moved or closed) or 0 if not. Desktop, dock and splash types are not manageable. In case it could not figure out this property, it will return -1.
void edelib::netwm_window_maximize | ( | Window | win | ) |
Maximize window.
void edelib::netwm_window_remove_strut | ( | Window | win | ) |
Remove offset, previously set with netwm_window_set_strut. If offset not set, it will do nothing.
void edelib::netwm_window_remove_strut_partial | ( | Window | win | ) |
Remove offset, previously set with netwm_window_set_strut_partial. If offset not set, it will do nothing.
void edelib::netwm_window_set_active | ( | Window | win, |
int | source = 0 |
||
) |
Try to focus or raise given window. source must be set to 1 if request comes from application, and 2 when it comes from pager. By default, source is 0 so it (by specification) indicates using older specification version.
void edelib::netwm_window_set_state | ( | Window | win, |
NetwmStateValue | val, | ||
NetwmStateAction | action | ||
) |
Set window state to one of NetwmStateValue values. Value will be set, removed or toggled according to NetwmStateAction action.
void edelib::netwm_window_set_strut | ( | Window | win, |
int | left, | ||
int | right, | ||
int | top, | ||
int | bottom | ||
) |
Resize area by setting offsets to each side. win will be outside that area.
void edelib::netwm_window_set_strut_partial | ( | Window | win, |
int | sizes[12] | ||
) |
Resize area by setting offsets to each side and win will be outside that area. This function will use newer _NET_WM_STRUT_PARTIAL hint, which is highly likely to be supported by newer window managers.
Array is in offset form: left, right, top, bottom, left_start_y, left_end_y, right_start_y, right_end_y, top_start_x, top_end_x, bottom_start_x, bottom_end_x.
void edelib::netwm_window_set_type | ( | Window | win, |
int | t | ||
) |
Set window type by using one of NETWM_WINDOW_TYPE_* codes. Depending on window managers some types will be applied correctly when window is showed and for some, application must be restarted.
bool edelib::netwm_workarea_get_size | ( | int & | x, |
int & | y, | ||
int & | w, | ||
int & | h | ||
) |
Get workarea set by window manager. Return false if fails.
void edelib::netwm_workspace_change | ( | int | n | ) |
Change current workspace.
void edelib::netwm_workspace_free_names | ( | char ** | names | ) |
Free allocated names array with netwm_workspace_get_names().
int edelib::netwm_workspace_get_count | ( | void | ) |
Return number of available workspaces. Returns -1 if failed to fetch workspaces count.
int edelib::netwm_workspace_get_current | ( | void | ) |
Currently visible workspace. Workspaces are starting from 0. Returns -1 if failed.
int edelib::netwm_workspace_get_names | ( | char **& | names | ) |
Get array of workspace names. Function returns number of allocated items in array and should be freed with netwm_workspace_free_names().
void edelib::wm_window_ede_restore | ( | Window | win | ) |
edewm specific: restore window to previous state
WmStateValue edelib::wm_window_get_state | ( | Window | win | ) |
Not part of NETWM. Set window state to one of WmStateValue.
void edelib::wm_window_set_state | ( | Window | win, |
WmStateValue | state | ||
) |
Not part of NETWM. Get one of WmStateValue for given window.