2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 //-----------------------------------------------------------------------------
25 // interface for BSP frontends plugins
28 // DONE: - change BSP menu to Q3Build menu ?
29 // DONE: - detect when Q3Build dies ?
30 // DELAYED: - hotkeys !
31 // SUCCESS: - try again getting feedback from Q3Build
33 #ifndef __IBSPFRONTEND_H_
34 #define __IBSPFRONTEND_H_
36 // define a GUID for this interface so plugins can access and reference it
37 // {8ED6A480-BA5E-11d3-A3E3-0004AC96D4C3}
38 static const GUID QERPlugBSPFrontendTable_GUID =
39 { 0x8ed6a480, 0xba5e, 0x11d3, { 0xa3, 0xe3, 0x0, 0x4, 0xac, 0x96, 0xd4, 0xc3 } };
41 // ask the plugin about the items to show up in the BSP menu
42 typedef char * (WINAPI* PFN_GETBSPMENU) ();
43 // dispatch a BSP menu command
44 typedef void (WINAPI* PFN_DISPATCHBSPCOMMAND) (char *);
45 // this one gets called after a monitoring loop ends
47 // 1: timed out / Radiant didn't get the connection
48 // 2: got a connection, compilation ended with an error
49 typedef void (WINAPI* PFN_ENDLISTEN) (int status);
51 struct _QERPlugBSPFrontendTable
54 PFN_GETBSPMENU m_pfnGetBSPMenu;
55 PFN_DISPATCHBSPCOMMAND m_pfnDispatchBSPCommand;
56 PFN_ENDLISTEN m_pfnEndListen;
59 // interface provided by Radiant to the plugin
60 // {A2CCF366-BA60-11d3-A3E3-0004AC96D4C3}
61 static const GUID QERAppBSPFrontendTable_GUID =
62 { 0xa2ccf366, 0xba60, 0x11d3, { 0xa3, 0xe3, 0x0, 0x4, 0xac, 0x96, 0xd4, 0xc3 } };
64 typedef char * (WINAPI* PFN_GETMAPNAME) ();
65 typedef void (WINAPI* PFN_LISTEN) ();
66 typedef void (WINAPI* PFN_SLEEP) ();
68 struct _QERAppBSPFrontendTable
71 PFN_GETMAPNAME m_pfnGetMapName;
72 PFN_LISTEN m_pfnListen;
74 //++timo TODO: needs a hook to reset the debug window (in regular mode it's done at startup of the BSP operation)