]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - contrib/prtview/stdafx.h
uncrustify! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / contrib / prtview / stdafx.h
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 <gtk/gtk.h>
24
25 #if defined( __linux__ ) || defined( __APPLE__ )
26 #include <GL/glx.h>
27
28 // Necessary for proper boolean type declaration
29 #include "qertypes.h"
30
31 typedef guint32 COLORREF;
32 typedef void* LPVOID;
33 typedef char* LPCSTR;
34 typedef void* HMODULE;
35 typedef int BOOL;
36
37 #define RGB( r, g, b ) ( (guint32)( ( (guint8) ( r ) | ( (guint16) ( g ) << 8 ) ) | ( ( (guint32) (guint8) ( b ) ) << 16 ) ) )
38 #define GetRValue( rgb )      ( (guint8)( rgb ) )
39 #define GetGValue( rgb )      ( (guint8)( ( (guint16)( rgb ) ) >> 8 ) )
40 #define GetBValue( rgb )      ( (guint8)( ( rgb ) >> 16 ) )
41
42 #define _MAX_PATH PATH_MAX
43
44 #define IDOK                1
45 #define IDCANCEL            2
46
47 #endif // __linux__
48
49 #include "synapse.h"
50
51 // plugin
52 #include "iplugin.h"
53 #define USE_QERTABLE_DEFINE
54 #include "qerplugin.h"
55 #include "ibspfrontend.h"
56 #include "igl.h"
57 #include "version.h"
58
59 // PrtView
60 #include "gtkdlgs.h"
61 #include "prtview.h"
62 #include "portals.h"
63 #include "resource.h"       // main symbols
64
65 #define MSG_PREFIX "Portal Viewer plugin: "
66 #define PRTVIEW_MINOR "prtview"
67
68 #define UPDATE_2D ( W_XY | W_XZ | W_YZ )
69 #define UPDATE_3D ( W_CAMERA )
70 #define UPDATE_ALL ( UPDATE_2D | UPDATE_3D )
71
72 int INIGetInt( const char *key, int def );
73 void INISetInt( const char *key, int val, const char *comment = NULL );
74
75 extern bool interfaces_started;
76
77 extern _QERFuncTable_1 g_FuncTable;
78 extern _QERQglTable g_QglTable;
79
80 #endif