25 #ifndef __taskmanager_h__
26 #define __taskmanager_h__
28 #include <sys/types.h>
32 #include <tqvaluelist.h>
33 #include <tqptrlist.h>
36 #include <dcopobject.h>
38 #include <tdestartupinfo.h>
39 #include "karambaapp.h"
49 class Task:
public TQObject
53 TQ_PROPERTY( TQString name READ name )
54 TQ_PROPERTY( TQString visibleName READ visibleName )
55 TQ_PROPERTY( TQString visibleNameWithState READ visibleNameWithState )
56 TQ_PROPERTY( TQString iconName READ iconName )
57 TQ_PROPERTY( TQString visibleIconName READ visibleIconName )
62 TQ_PROPERTY(
bool active READ
isActive )
78 WId window()
const {
return _win; }
80 TQString name()
const {
return _info.name(); }
81 TQString visibleName()
const {
return _info.visibleName(); }
85 int desktop()
const {
return _info.desktop(); }
87 TQString name()
const {
return _info.name; }
88 TQString visibleName()
const {
return _info.visibleName; }
92 int desktop()
const {
return _info.desktop; }
94 TQString visibleNameWithState()
const {
return _info.visibleNameWithState(); }
95 TQString iconName()
const;
96 TQString visibleIconName()
const;
98 TQString classClass();
111 TQPixmap
pixmap()
const {
return _pixmap; }
127 TQPixmap
bestIcon(
int size,
bool &isStaticIcon );
138 TQPixmap
icon(
int width,
int height,
bool allowResize =
false );
144 static bool idMatch(
const TQString &,
const TQString &);
201 void refresh(
bool icon =
false);
203 void addTransient( WId w ) { _transients.append( w ); }
205 void removeTransient( WId w ) { _transients.remove( w ); }
207 bool hasTransient( WId w )
const {
return _transients.contains( w ); }
209 void setActive(
bool a);
286 void toggleAlwaysOnTop();
346 void generateThumbnail();
353 KWin::WindowInfo _info;
357 TQValueList<WId> _transients;
368 class TaskPrivate *d;
380 TQ_PROPERTY( TQString
text READ
text )
381 TQ_PROPERTY( TQString
bin READ
bin )
382 TQ_PROPERTY( TQString
icon READ
icon )
385 Startup(
const TDEStartupInfoId&
id,
const TDEStartupInfoData& data, TQObject * parent,
386 const char *name = 0);
392 TQString
text()
const {
return _data.findName(); }
397 TQString
bin()
const {
return _data.bin(); }
402 TQString
icon()
const {
return _data.findIcon(); }
403 void update(
const TDEStartupInfoData& data );
404 const TDEStartupInfoId& id()
const {
return _id; }
413 TDEStartupInfoId _id;
414 TDEStartupInfoData _data;
415 class StartupPrivate *d;
418 typedef TQPtrList<Task> TaskList;
419 typedef TQPtrList<Startup> StartupList;
440 TaskManager( TQObject *parent = 0,
const char *name = 0 );
447 TaskList
tasks()
const {
return _tasks; }
514 void windowAdded(WId);
516 void windowRemoved(WId);
521 void activeWindowChanged(WId);
523 void currentDesktopChanged(
int);
525 void killStartup(
const TDEStartupInfoId& );
530 void gotNewStartup(
const TDEStartupInfoId&,
const TDEStartupInfoData& );
532 void gotStartupChange(
const TDEStartupInfoId&,
const TDEStartupInfoData& );
534 void gotRemoveStartup(
const TDEStartupInfoId& );
541 void configure_startup();
546 TQValueList< WId > _skiptaskbar_windows;
547 StartupList _startups;
548 TDEStartupInfo* _startup_info;
550 class TaskManagerPrivate *d;