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