Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_WM Class Reference

The window manager module for eFLTK. More...

#include <Fl_WM.h>

List of all members.

Public Types

enum  WindowTypes {
  NORMAL = 1, DIALOG, UTIL, TOOLBAR,
  DOCK, SPLASH, MENU, DESKTOP
}
 Types for set_window_type function.

enum  ActionTypes {
  NONE = 0, DESKTOP_COUNT = 1<<0, DESKTOP_NAMES = 1<<1, DESKTOP_CHANGED = 1<<2,
  DESKTOP_WORKAREA = 1<<3, WINDOW_LIST = 1<<10, WINDOW_LIST_STACKING = 1<<11, WINDOW_ACTIVE = 1<<12,
  WINDOW_NAME = 1<<13, WINDOW_NAME_VIS = 1<<14, WINDOW_ICONNAME = 1<<15, WINDOW_ICONNAME_VIS = 1<<16,
  WINDOW_DESKTOP = 1<<17
}
 Types of callback actions. More...


Static Public Methods

bool set_window_type (Window xid, int type)
 Set type of window. More...

bool set_window_icon (Window xid, Fl_Image *icon)
 Set application icon for window. More...

bool set_window_title (Window xid, const char *title, int title_len)
 Set window title text. More...

bool set_window_icontitle (Window xid, const char *title, int title_len)
 Set window icon title text. More...

bool set_workspace_count (int count)
 Set number of workspaces, in NET-WM compliant WM. More...

bool set_workspace_names (const char **names, int count)
 Set names to workspaces. More...

bool set_current_workspace (int number)
 Set current active workspace. More...

bool set_active_window (Window xid)
 Set current active window. More...

bool close_window (Window xid)
 Close window 'xid'. More...

bool set_window_strut (Window xid, int left, int right, int top, int bottom)
 Set window strut, i.e. More...

bool get_window_icon (Window xid, Fl_Image *&icon, int w=-1, int h=-1)
 Get icon for window. More...

bool get_window_title (Window xid, char *&title)
 Get title text for window. More...

bool get_window_icontitle (Window xid, char *&title)
 Get icon title text for window. More...

int get_window_desktop (Window xid)
 Get desktop where window is placed on. More...

bool get_geometry (int &width, int &height)
 Get width and height of workspace. More...

bool get_workarea (int &x, int &y, int &width, int &height)
 Get area of workspace, window struts are subtracted from this. More...

int get_windows_stacking (Window *&windows)
 Get WM windows in stacking order. More...

int get_windows_mapping (Window *&windows)
 Get WM windows in mapping order. More...

int get_workspace_count ()
 Returns number of workspaces. More...

int get_workspace_names (char **&names)
 Get workspace names. More...

int get_current_workspace ()
 Returns current number of workspace. More...

Window get_active_window ()
 Returns current active window in WM. More...

void clear_handled ()
 Clear list of handled windows.

bool is_handled (Window w)
 Returns true, if window 'w' is handled.

void handle_window (Window w)
 Handle window 'w'. More...

void unhandle_window (Window w)
 Remove handled window 'w'.

void add_callback (Fl_Callback *cb, void *user_data, int action_mask)
void remove_callback (Fl_Callback *cb, void *user_data)
 Remove callback function from list.

int action ()
 Returns last action (event) happened.

Window window ()
 Returns window where last event received.

void callback (Fl_Callback *cb, void *user_data, int action_mask)
 compatibility. More...


Detailed Description

The window manager module for eFLTK.

You can set and get information from WM with this class. Currently only X11 is supported. NOTE: many of features are supported only NET-WM window managers. Known NET-WM window managers: KDE 2>, GNOME 2>, EDE

Definition at line 34 of file Fl_WM.h.


Member Enumeration Documentation

enum Fl_WM::ActionTypes
 

Types of callback actions.

See also:
add_callback(Fl_Callback *cb, void *user_data, int action_mask)

Definition at line 193 of file Fl_WM.h.


Member Function Documentation

void Fl_WM::callback Fl_Callback *    cb,
void *    user_data,
int    action_mask
[inline, static]
 

compatibility.

See also:
add_callback(Fl_Callback *cb, void *user_data, int action_mask)

Definition at line 256 of file Fl_WM.h.

bool Fl_WM::close_window Window    xid [static]
 

Close window 'xid'.

NET-WM only Returns true on success.

Window Fl_WM::get_active_window   [static]
 

Returns current active window in WM.

NET-WM only.

int Fl_WM::get_current_workspace   [static]
 

Returns current number of workspace.

NET-WM only.

bool Fl_WM::get_geometry int &    width,
int &    height
[static]
 

Get width and height of workspace.

Returns true on success. NET-WM only

int Fl_WM::get_window_desktop Window    xid [static]
 

Get desktop where window is placed on.

Returns: -2=ERROR, -1=STICKY, 0> number of desktop. NET-WM only

bool Fl_WM::get_window_icon Window    xid,
Fl_Image *&    icon,
int    w = -1,
int    h = -1
[static]
 

Get icon for window.

icon is allocated by eFLTK and MUST be freed with delete operator. Returns true on success.

Parameters:
icon  is stored to this.
w,h  preferred size of icon, use -1 for default iconsize.

bool Fl_WM::get_window_icontitle Window    xid,
char *&    title
[static]
 

Get icon title text for window.

title is allocated by eFLTK and must be freed with free() function. Returns true on success.

bool Fl_WM::get_window_title Window    xid,
char *&    title
[static]
 

Get title text for window.

title is allocated by eFLTK and must be freed with free() function. Returns true on success.

int Fl_WM::get_windows_mapping Window *&    windows [static]
 

Get WM windows in mapping order.

windows is allocated by eFLTK and MUST be freed with free() function. This is used mostly by pagers or taskbars. Returns number windows stored in list 'windows'. NET-WM only

int Fl_WM::get_windows_stacking Window *&    windows [static]
 

Get WM windows in stacking order.

windows is allocated by eFLTK and MUST be freed with free() function. This is used mostly by pagers or taskbars. Returns number windows stored in list 'windows'. NET-WM only

bool Fl_WM::get_workarea int &    x,
int &    y,
int &    width,
int &    height
[static]
 

Get area of workspace, window struts are subtracted from this.

Returns true on success. NET-WM only

int Fl_WM::get_workspace_count   [static]
 

Returns number of workspaces.

NET-WM only

int Fl_WM::get_workspace_names char **&    names [static]
 

Get workspace names.

names are stored in variable 'names'. names is allocated by eFLTK and MUST be freef with free() function. Returns number of names in list 'names'. NET-WM only.

void Fl_WM::handle_window Window    w [static]
 

Handle window 'w'.

NOTE: You must call this, in order to receive events from window.

bool Fl_WM::set_active_window Window    xid [static]
 

Set current active window.

NET-WM only. Returns true on success.

bool Fl_WM::set_current_workspace int    number [static]
 

Set current active workspace.

Returns true on success.

bool Fl_WM::set_window_icon Window    xid,
Fl_Image   icon
[static]
 

Set application icon for window.

This does use X11 standard WMHints, so most of window managers will support this. Returns true on success.

bool Fl_WM::set_window_icontitle Window    xid,
const char *    title,
int    title_len
[static]
 

Set window icon title text.

The one shown in taskbar. Returns true on success.

bool Fl_WM::set_window_strut Window    xid,
int    left,
int    right,
int    top,
int    bottom
[static]
 

Set window strut, i.e.

reserve some space from workspace, so e.g. maximized windows doesn't overlap it. Returns true on success. Used commonly in taskbars (panels). NET-WM only.

bool Fl_WM::set_window_title Window    xid,
const char *    title,
int    title_len
[static]
 

Set window title text.

The one shown in titlebar. Returns true on success.

bool Fl_WM::set_window_type Window    xid,
int    type
[static]
 

Set type of window.

Returns true on success.

See also:
enum WindowTypes

bool Fl_WM::set_workspace_count int    count [static]
 

Set number of workspaces, in NET-WM compliant WM.

Returns true on success.

Parameters:
count  number of workspaces.

bool Fl_WM::set_workspace_names const char **    names,
int    count
[static]
 

Set names to workspaces.

Returns true on success.

Parameters:
names  list of names to set
count  number of names in list


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 15:33:57 2003 for eFLTK by doxygen1.2.15