de782ec37b
and it kept segfaulting because I wasn't releasing windows, and b) The plugins didn't want to resolve anything in the kwin executable, only to the other libs. I finally solved this by using -rdynamic in kwin's LDFLAGS, which I hope is okay ;-) svn path=/trunk/kdebase/kwin/; revision=37234
45 lines
796 B
C++
45 lines
796 B
C++
#ifndef __PLUGINS_H
|
|
#define __PLUGINS_H
|
|
|
|
#include <qpopupmenu.h>
|
|
#include <qstringlist.h>
|
|
#include <ltdl.h>
|
|
|
|
|
|
class Client;
|
|
class Workspace;
|
|
|
|
class QFileInfo;
|
|
|
|
class PluginMgr : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
PluginMgr();
|
|
~PluginMgr();
|
|
Client *allocateClient(Workspace *ws, WId w);
|
|
void loadPlugin(QString name);
|
|
signals:
|
|
void resetAllClients();
|
|
protected:
|
|
Client* (*alloc_ptr)(Workspace *ws, WId w);
|
|
lt_dlhandle handle;
|
|
};
|
|
|
|
class PluginMenu : public QPopupMenu
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
PluginMenu(PluginMgr *manager, QWidget *parent=0, const char *name=0);
|
|
protected slots:
|
|
void slotAboutToShow();
|
|
void slotActivated(int id);
|
|
protected:
|
|
void parseDesktop(QFileInfo *fi);
|
|
QStringList fileList;
|
|
int idCount;
|
|
PluginMgr *mgr;
|
|
};
|
|
|
|
|
|
#endif
|