1 /*
2 PrtView plugin for GtkRadiant
3 Copyright (C) 2001 Geoffrey Dewan, Loki software and qeradiant.com
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 */
19 
20 #ifndef __PRTVIEW_AFX_H__
21 #define __PRTVIEW_AFX_H__
22 
23 #include "mathlib.h"
24 #include <string.h>
25 #include "qertypes.h"
26 #include <stdio.h>
27 
28 #include "iscenegraph.h"
29 #define USE_QERTABLE_DEFINE
30 #include "qerplugin.h"
31 extern _QERFuncTable_1 g_FuncTable;
32 
33 // plugin
34 #include "iplugin.h"
35 #include "ibspfrontend.h"
36 #include "igl.h"
37 #include "version.h"
38 
39 
40 #include <gtk/gtk.h>
41 
42 #ifdef WIN32
43 #include <windows.h>
44 #endif
45 
46 #if defined(__linux__) || defined(__APPLE__) || defined (__FreeBSD__)
47 #include <GL/glx.h>
48 
49 typedef guint32 COLORREF;
50 typedef void* LPVOID;
51 typedef char* LPCSTR;
52 typedef void* HMODULE;
53 typedef int   BOOL;
54 
55 #define RGB(r, g, b) ((guint32)(((guint8) (r) | ((guint16) (g) << 8))|(((guint32) (guint8) (b)) << 16)))
56 #define GetRValue(rgb)      ((guint8)(rgb))
57 #define GetGValue(rgb)      ((guint8)(((guint16)(rgb)) >> 8))
58 #define GetBValue(rgb)      ((guint8)((rgb)>>16))
59 
60 #define IDOK                1
61 #define IDCANCEL            2
62 
63 #endif // __linux__
64 
65 #define PATH_MAX 260
66 
67 // PrtView
68 #include "gtkdlgs.h"
69 #include "prtview.h"
70 #include "portals.h"
71 
72 #define MSG_PREFIX "Portal Viewer plugin: "
73 #define PRTVIEW_MINOR "prtview"
74 
75 #define UPDATE_2D (W_XY | W_XZ | W_YZ)
76 #define UPDATE_3D (W_CAMERA)
77 #define UPDATE_ALL (UPDATE_2D | UPDATE_3D)
78 
79 int INIGetInt(char *key, int def);
80 void INISetInt(char *key, int val, char *comment = NULL);
81 
82 extern bool interfaces_started;
83 
84 extern _QERFuncTable_1 g_FuncTable;
85 extern _QERQglTable g_QglTable;
86 
87 #endif
88