00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLUGIN_INTERFACE_H
00021 #define PLUGIN_INTERFACE_H
00022
00023
00024 #include <QObject>
00025 #include <QSettings>
00026 #include "catalog.h"
00027
00028 #ifdef Q_WS_WIN
00029 #define VC_EXTRALEAN
00030 #ifndef WINVER
00031 #define WINVER 0x05100
00032 #define _WIN32_WINNT 0x0510
00033 #define _WIN32_WINDOWS 0x0510
00034 #define _WIN32_IE 0x0600
00035 #endif
00036
00037 #include <windows.h>
00038 #include <shlobj.h>
00039 #endif
00040
00041 #ifndef UNICODE
00042 #define UNICODE
00043 #endif
00044
00045
00046 #define DESKTOP_WINDOWS 0
00047 #define DESKTOP_GNOME 1
00048 #define DESKTOP_KDE 2
00049
00074 #define MSG_GET_ID 0
00075
00130 #define MSG_GET_LABELS 1
00131
00132
00133
00178 #define MSG_GET_RESULTS 2
00179
00216 #define MSG_GET_CATALOG 3
00217
00218
00285 #define MSG_LAUNCH_ITEM 4
00286
00287
00317 #define MSG_INIT 5
00318
00319
00343 #define MSG_HAS_DIALOG 6
00344
00376 #define MSG_DO_DIALOG 7
00377
00378
00406 #define MSG_GET_NAME 8
00407
00440 #define MSG_END_DIALOG 9
00441
00442
00449 #define MSG_LAUNCHY_SHOW 10
00450
00457 #define MSG_LAUNCHY_HIDE 11
00458
00459
00460
00461 #define MSG_CONTROL_OPTIONS 500
00462 #define MSG_CONTROL_EXIT 501
00463 #define MSG_CONTROL_REBUILD 502
00464
00473 class PluginInterface
00474 {
00475 public:
00476 virtual ~PluginInterface() {};
00477
00478
00542 virtual int msg(int msgId, void* wParam = NULL, void* lParam = NULL) = 0;
00543
00544
00559 QSettings** settings;
00560 };
00561
00562
00570 void runProgram(QString file, QString args);
00571 int getDesktop();
00572
00573
00574 Q_DECLARE_INTERFACE(PluginInterface,
00575 "net.launchy.PluginInterface/1.0")
00576
00577
00578
00579 #endif