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

Fl_WM.h

00001 /*
00002  * $Id: Fl_WM.h,v 1.12 2003/04/01 20:02:29 laza2000 Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_WM_H_
00023 #define _FL_WM_H_
00024 
00025 #include "Fl_Widget.h"
00026 #include "x.h"
00027 
00034 class Fl_WM
00035 {
00036 public:
00040     enum WindowTypes {
00041         NORMAL=1,
00042         DIALOG,
00043         UTIL,
00044         TOOLBAR,
00045         DOCK,
00046         SPLASH,
00047         MENU,
00048         DESKTOP
00049     };
00050 
00056     static bool set_window_type(Window xid, int type);
00057 
00062     static bool set_window_icon(Window xid, Fl_Image *icon);
00063 
00068     static bool set_window_title(Window xid, const char *title, int title_len);
00069 
00074     static bool set_window_icontitle(Window xid, const char *title, int title_len);
00075 
00081     static bool set_workspace_count(int count);
00082 
00089     static bool set_workspace_names(const char **names, int count);
00090 
00095     static bool set_current_workspace(int number);
00096 
00101     static bool set_active_window(Window xid);
00102 
00107     static bool close_window(Window xid);
00108 
00114     static bool set_window_strut(Window xid, int left, int right, int top, int bottom);
00115 
00122     static bool get_window_icon(Window xid, Fl_Image *&icon, int w=-1, int h=-1);
00123 
00128     static bool get_window_title(Window xid, char *&title);
00129 
00134     static bool get_window_icontitle(Window xid, char *&title);
00135 
00140     static int get_window_desktop(Window xid);
00141 
00146     static bool get_geometry(int &width, int &height);
00147 
00152     static bool get_workarea(int &x, int &y, int &width, int &height);
00153 
00159     static int get_windows_stacking(Window *&windows);
00160 
00166     static int get_windows_mapping(Window *&windows);
00167 
00171     static int get_workspace_count();
00172 
00177     static int get_workspace_names(char **&names);
00178 
00182     static int get_current_workspace();
00183 
00187     static Window get_active_window();
00188 
00193     enum ActionTypes {
00194         NONE = 0,
00195         DESKTOP_COUNT    = 1<<0,
00196         DESKTOP_NAMES    = 1<<1,
00197         DESKTOP_CHANGED  = 1<<2,
00198         DESKTOP_WORKAREA = 1<<3,
00199 
00200         WINDOW_LIST          = 1<<10,
00201         WINDOW_LIST_STACKING = 1<<11,
00202         WINDOW_ACTIVE        = 1<<12,
00203         WINDOW_NAME          = 1<<13,
00204         WINDOW_NAME_VIS      = 1<<14,
00205         WINDOW_ICONNAME      = 1<<15,
00206         WINDOW_ICONNAME_VIS  = 1<<16,
00207         WINDOW_DESKTOP       = 1<<17
00208     };
00209 
00213     static void clear_handled();
00214 
00218     static bool is_handled(Window w);
00219 
00223     static void handle_window(Window w);
00224 
00228     static void unhandle_window(Window w);
00229 
00230     /*
00231      * Set callback function and action mask.
00232      * Callback is only done, when received event defined in action mask.
00233      * user_data is passed to callback function.
00234      */
00235     static void add_callback(Fl_Callback *cb, void *user_data, int action_mask);
00236 
00240     static void remove_callback(Fl_Callback *cb, void *user_data);
00241 
00245     static int action();
00246 
00250     static Window window();
00251 
00256     static void callback(Fl_Callback *cb, void *user_data, int action_mask) {
00257         add_callback(cb, user_data, action_mask);
00258     }
00259 };
00260 
00261 #endif

Generated on Thu Jul 31 15:33:45 2003 for eFLTK by doxygen1.2.15