X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ftextool%2FStdAfx.h;h=aee23c538b6e938777239c077da82cfbbb966edb;hb=863f0c456612fb427cafb1a50c180c3705351129;hp=f54bb59155630d59fd9b5c8b643042d0891c0a3c;hpb=99980506540d9546dad31223a6eadf126ba68121;p=xonotic%2Fnetradiant.git diff --git a/plugins/textool/StdAfx.h b/plugins/textool/StdAfx.h index f54bb591..aee23c53 100644 --- a/plugins/textool/StdAfx.h +++ b/plugins/textool/StdAfx.h @@ -1,35 +1,34 @@ /* -Copyright (C) 1999-2007 id Software, Inc. and contributors. -For a list of contributors, see the accompanying CONTRIBUTORS file. + Copyright (C) 1999-2006 Id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. -This file is part of GtkRadiant. + This file is part of GtkRadiant. -GtkRadiant is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. + GtkRadiant is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. -GtkRadiant is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + GtkRadiant is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with GtkRadiant; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ // stdafx.h // precompiled headers +#include "globaldefs.h" + // standard headers -#include -#include #include #include -#if defined(__linux__) || defined(__APPLE__) - +#if !GDEF_OS_WINDOWS // Necessary for proper boolean type declaration #include "qertypes.h" @@ -43,25 +42,25 @@ typedef char* LPCSTR; #define MB_YESNOCANCEL 0x00000003L #define MB_YESNO 0x00000004L #define MB_RETRYCANCEL 0x00000005L - - + + #define MB_ICONHAND 0x00000010L #define MB_ICONQUESTION 0x00000020L #define MB_ICONEXCLAMATION 0x00000030L #define MB_ICONASTERISK 0x00000040L - + #define MB_USERICON 0x00000080L #define MB_ICONWARNING MB_ICONEXCLAMATION #define MB_ICONERROR MB_ICONHAND #define MB_ICONINFORMATION MB_ICONASTERISK #define MB_ICONSTOP MB_ICONHAND - + #define MB_TYPEMASK 0x0000000FL #define MB_ICONMASK 0x000000F0L #define MB_DEFMASK 0x00000F00L #define MB_MODEMASK 0x00003000L #define MB_MISCMASK 0x0000C000L - + #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 @@ -72,17 +71,16 @@ typedef char* LPCSTR; typedef struct tagRECT { - long left; - long top; - long right; - long bottom; + long left; + long top; + long right; + long bottom; } RECT, *PRECT, *LPRECT; - -#endif // __linux__ +#endif // !GDEF_OS_WINDOWS // plugin // FIXME TTimo: drop this -extern "C" void Sys_Printf (char *text, ...); +extern "C" void Sys_Printf( char *text, ... ); #include "synapse.h" #include "iplugin.h" @@ -99,39 +97,43 @@ extern "C" void Sys_Printf (char *text, ...); // NOTE: I'm not too sure about the bool flags being any use.. they are supposed to tell if we handle the event or not class CWindowListener : public IWindowListener { - int refCount; +int refCount; public: - // Increment the number of references to this object - void IncRef () { refCount++; } - // Decrement the reference count - void DecRef () { if ( --refCount <= 0 ) delete this; } - // IWindowListener --------------------------------------- - bool OnLButtonDown(guint32 nFlags, double x, double y); - bool OnMButtonDown(guint32 nFlags, double x, double y) { return false; } - bool OnRButtonDown(guint32 nFlags, double x, double y); - bool OnLButtonUp(guint32 nFlags, double x, double y); - bool OnMButtonUp(guint32 nFlags, double x, double y) { return false; } - bool OnRButtonUp(guint32 nFlags, double x, double y); - bool OnMouseMove(guint32 nFlags, double x, double y); - bool OnKeyPressed(char *s); - bool Paint(); - void Close(); +// Increment the number of references to this object +void IncRef() { refCount++; } +// Decrement the reference count +void DecRef() { + if ( --refCount <= 0 ) { + delete this; + } +} +// IWindowListener --------------------------------------- +bool OnLButtonDown( guint32 nFlags, double x, double y ); +bool OnMButtonDown( guint32 nFlags, double x, double y ) { return false; } +bool OnRButtonDown( guint32 nFlags, double x, double y ); +bool OnLButtonUp( guint32 nFlags, double x, double y ); +bool OnMButtonUp( guint32 nFlags, double x, double y ) { return false; } +bool OnRButtonUp( guint32 nFlags, double x, double y ); +bool OnMouseMove( guint32 nFlags, double x, double y ); +bool OnKeyPressed( char *s ); +bool Paint(); +void Close(); }; #include "2DView.h" typedef struct { - float data[MAX_POINTS_ON_WINDING][2]; + float data[MAX_POINTS_ON_WINDING][2]; } CtrlPts_t; #include "ControlPointsManager.h" -extern _QERQglTable g_QglTable; -extern _QERFuncTable_1 g_FuncTable; +extern OpenGLBinding g_QglTable; +extern _QERFuncTable_1 g_FuncTable; // prefs globals // NOTE: these are used by the CControlPointsManager classes, not very C++ish -extern bool g_bPrefsUpdateCameraView; -extern _QERSelectedFaceTable g_SelectedFaceTable; -extern _QERFaceData g_CancelFaceData; +extern bool g_bPrefsUpdateCameraView; +extern _QERSelectedFaceTable g_SelectedFaceTable; +extern _QERFaceData g_CancelFaceData; #define Sys_Printf g_FuncTable.m_pfnSysPrintf #define Sys_FPrintf g_FuncTable.m_pfnSysFPrintf @@ -143,12 +145,12 @@ extern void Textool_Cancel(); class CSynapseClientTexTool : public CSynapseClient { public: - // CSynapseClient API - bool RequestAPI(APIDescriptor_t *pAPI); - const char* GetInfo(); - - CSynapseClientTexTool() { } - virtual ~CSynapseClientTexTool() { } +// CSynapseClient API +bool RequestAPI( APIDescriptor_t *pAPI ); +const char* GetInfo(); + +CSynapseClientTexTool() { } +virtual ~CSynapseClientTexTool() { } }; extern IWindow *g_pToolWnd;