plugin_interface.h

Go to the documentation of this file.
00001 /*
00002 Launchy: Application Launcher
00003 Copyright (C) 2007  Josh Karlin
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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

Generated on Sat Jun 14 15:07:34 2008 for LaunchyPluginAPI by  doxygen 1.5.4