mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-24 18:31:36 +00:00
misc cleanup
This commit is contained in:
parent
8557f1820f
commit
cd222b3618
4 changed files with 23 additions and 134 deletions
|
@ -137,16 +137,6 @@ struct _QERModelLoad
|
||||||
|
|
||||||
//=========================================
|
//=========================================
|
||||||
// plugin functions
|
// plugin functions
|
||||||
#if 0
|
|
||||||
// NOTE TTimo: hack to make old plugin tech and new plugin tech live together
|
|
||||||
#ifndef _IPLUGIN_H_
|
|
||||||
// toolkit-independant interface, cast hwndMain to GtkWidget*
|
|
||||||
typedef const char* ( WINAPI * PFN_QERPLUG_INIT )( void* hApp, void* hwndMain );
|
|
||||||
typedef const char* ( WINAPI * PFN_QERPLUG_GETNAME )();
|
|
||||||
typedef const char* ( WINAPI * PFN_QERPLUG_GETCOMMANDLIST )();
|
|
||||||
typedef void ( WINAPI * PFN_QERPLUG_DISPATCH )( const char* p, vec3_t vMin, vec3_t vMax, bool bSingleBrush );
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef char* ( WINAPI * PFN_QERPLUG_GETFUNCTABLE )();
|
typedef char* ( WINAPI * PFN_QERPLUG_GETFUNCTABLE )();
|
||||||
|
|
||||||
|
@ -275,115 +265,6 @@ typedef char* ( WINAPI * PFN_QERAPP_PROFILE_LOADSTR )( const char *filename, con
|
||||||
// To use the active or selected brush lists, you must first allocate them (which returns a count) and then
|
// To use the active or selected brush lists, you must first allocate them (which returns a count) and then
|
||||||
// release them when you are finish manipulating brushes in one of those lists.
|
// release them when you are finish manipulating brushes in one of those lists.
|
||||||
|
|
||||||
//++timo NOTE : the #defines here are never used, but can help finding where things are done in the editor
|
|
||||||
#if 0
|
|
||||||
// brush manipulation routines
|
|
||||||
#define QERAPP_CREATEBRUSH "QERApp_CreateBrush"
|
|
||||||
#define QERAPP_CREATEBRUSHHANDLE "QERApp_CreateBrushHandle"
|
|
||||||
#define QERAPP_DELETEBRUSHHANDLE "QERApp_DeleteBrushHandle"
|
|
||||||
#define QERAPP_COMMITBRUSHHANDLETOMAP "QERApp_CommitBrushHandleToMap"
|
|
||||||
//++timo not implemented .. remove
|
|
||||||
// #define QERAPP_BINDHANDLESTOENTITY "QERApp_BindHandlesToEntity"
|
|
||||||
#define QERAPP_ADDFACE "QERApp_AddFace"
|
|
||||||
#define QERAPP_ADDFACEDATA "QERApp_AddFaceData"
|
|
||||||
#define QERAPP_GETFACECOUNT "QERApp_GetFaceCount"
|
|
||||||
#define QERAPP_GETFACEDATA "QERApp_GetFaceData"
|
|
||||||
#define QERAPP_SETFACEDATA "QERApp_SetFaceData"
|
|
||||||
#define QERAPP_DELETEFACE "QERApp_DeleteFace"
|
|
||||||
#define QERAPP_TEXTUREBRUSH "QERApp_TextureBrush"
|
|
||||||
#define QERAPP_BUILDBRUSH "QERApp_BuildBrush" // PGM
|
|
||||||
#define QERAPP_SELECTEDBRUSHCOUNT "QERApp_SelectedBrushCount"
|
|
||||||
#define QERAPP_ALLOCATESELECTEDBRUSHHANDLES "QERApp_AllocateSelectedBrushHandles"
|
|
||||||
#define QERAPP_RELEASESELECTEDBRUSHHANDLES "QERApp_ReleaseSelectedBrushHandles"
|
|
||||||
#define QERAPP_GETSELECTEDBRUSHHANDLE "QERApp_GetSelectedBrushHandle"
|
|
||||||
#define QERAPP_ACTIVEBRUSHCOUNT "QERApp_ActiveBrushCount"
|
|
||||||
#define QERAPP_ALLOCATEACTIVEBRUSHHANDLES "QERApp_AllocateActiveBrushHandles"
|
|
||||||
#define QERAPP_RELEASEACTIVEBRUSHHANDLES "QERApp_ReleaseActiveBrushHandles"
|
|
||||||
#define QERAPP_GETACTIVEBRUSHHANDLE "QERApp_GetActiveBrushHandle"
|
|
||||||
|
|
||||||
// texture stuff
|
|
||||||
#define QERAPP_TEXTURECOUNT "QERApp_TextureCount"
|
|
||||||
#define QERAPP_GETTEXTURE "QERApp_GetTexture"
|
|
||||||
#define QERAPP_GETCURRENTTEXTURE "QERApp_GetCurrentTexture"
|
|
||||||
#define QERAPP_SETCURRENTTEXTURE "QERApp_SetCurrentTexture"
|
|
||||||
|
|
||||||
// selection
|
|
||||||
#define QERAPP_DELETESELECTION "QERApp_DeleteSelection"
|
|
||||||
#define QERAPP_SELECTBRUSH "QERApp_SelectBrush" // PGM
|
|
||||||
#define QERAPP_DESELECTBRUSH "QERApp_DeselectBrush" // PGM
|
|
||||||
#define QERAPP_DESELECTALLBRUSHES "QERApp_DeselectAllBrushes" // PGM
|
|
||||||
|
|
||||||
// data gathering
|
|
||||||
#define QERAPP_GETPOINTS "QERApp_GetPoints"
|
|
||||||
#define QERAPP_SELECTBRUSHES "QERApp_GetBrushes"
|
|
||||||
|
|
||||||
// entity class stuff
|
|
||||||
// the entity handling is very basic for 1.0
|
|
||||||
#define QERAPP_GETECLASSCOUNT "QERApp_GetEClassCount"
|
|
||||||
#define QERAPP_GETECLASS "QERApp_GetEClass"
|
|
||||||
|
|
||||||
// misc
|
|
||||||
#define QERAPP_SYSMSG "QERApp_SysMsg"
|
|
||||||
#define QERAPP_INFOMSG "QERApp_InfoMsg"
|
|
||||||
#define QERAPP_HIDEINFOMSG "QERApp_HideInfoMsg"
|
|
||||||
#define QERAPP_RESET_PLUGINS "QERApp_ResetPlugins"
|
|
||||||
|
|
||||||
// texture loading
|
|
||||||
#define QERAPP_LOADTEXTURERGBA "QERApp_LoadTextureRGBA"
|
|
||||||
|
|
||||||
// FIXME: the following are not implemented yet
|
|
||||||
// hook registrations
|
|
||||||
#define QERAPP_REGISTER_MAPLOADFUNC "QERApp_Register_MapLoadFunc"
|
|
||||||
#define QERAPP_REGISTER_MAPSAVEFUNC "QERApp_Register_MapSaveFunc"
|
|
||||||
|
|
||||||
// FIXME: the following are not implemented yet
|
|
||||||
#define QERAPP_REGISTER_PROJECTLOADFUNC "QERApp_Register_ProjectLoadFunc"
|
|
||||||
#define QERAPP_REGISTER_MOUSEHANDLER "QERApp_Register_MouseHandler"
|
|
||||||
#define QERAPP_REGISTER_KEYHANDLER "QERApp_Register_KeyHandler"
|
|
||||||
|
|
||||||
// FIXME: new primtives do not work in v1.00
|
|
||||||
// primitives are new types of things in the map
|
|
||||||
// for instance, the Q3 curves could have been done as
|
|
||||||
// primitives instead of being built in
|
|
||||||
// it will be a plugins responsibility to hook the map load and save funcs to load
|
|
||||||
// and/or save any additional data (like new primitives of some type)
|
|
||||||
// the editor will call each registered renderer during the rendering process to repaint
|
|
||||||
// any primitives the plugin owns
|
|
||||||
// each primitive object has a temporary sibling brush that lives in the map
|
|
||||||
// FIXME: go backwards on this a bit.. orient it more towards the temp brush mode as it will be cleaner
|
|
||||||
// basically a plugin will hook the map load and save and will add the primitives to the map.. this will
|
|
||||||
// produce a temporary 'primitive' brush and the appropriate renderer will be called as well as the
|
|
||||||
// edit handler (for edge drags, sizes, rotates, etc.. ) and the vertex maker will be called when vertex
|
|
||||||
// mode is attemped on the brush.. there will need to be a GetPrimitiveBounds callback in the edit handler
|
|
||||||
// so the brush can resize appropriately as needed.. this might be the plugins responsibility to set the
|
|
||||||
// sibling brushes size.. it will then be the plugins responsibility to hook map save to save the primitives
|
|
||||||
// as the editor will discard any temp primitive brushes.. (there probably needs to be some kind of sanity check
|
|
||||||
// here as far as keeping the brushes and the plugin in sync.. i suppose the edit handler can deal with all of that
|
|
||||||
// crap but it looks like a nice place for a mess)
|
|
||||||
#define QERAPP_REGISTER_PRIMITIVE "QERApp_Register_Primitive"
|
|
||||||
#define QERAPP_REGISTER_RENDERER "QERApp_Register_Renderer"
|
|
||||||
#define QERAPP_REGISTER_EDITHANDLER "QERApp_Register_EditHandler"
|
|
||||||
#define QERAPP_REGISTER_VERTEXMAKER "QERApp_Register_VertexMaker"
|
|
||||||
#define QERAPP_ADDPRIMITIVE "QERApp_AddPrimitive"
|
|
||||||
|
|
||||||
// v1.70
|
|
||||||
#define QERAPP_GETENTITYCOUNT "QERApp_GetEntityCount"
|
|
||||||
#define QERAPP_GETENTITYHANDLE "QERApp_GetEntityHandle"
|
|
||||||
//++timo not implemented for the moment
|
|
||||||
// #define QERAPP_GETENTITYINFO "QERApp_GetEntityInfo"
|
|
||||||
//++timo does the keyval need some more funcs to add/remove ?
|
|
||||||
// get the pointer and do the changes yourself
|
|
||||||
#define QERAPP_ALLOCATEEPAIR "QERApp_AllocateEpair"
|
|
||||||
#define QERAPP_ALLOCATEENTITYBRUSHHANDLES "QERApp_AllocateEntityBrushHandles"
|
|
||||||
#define QERAPP_RELEASEENTITYBRUSHHANDLES "QERApp_ReleaseEntityBrushHandles"
|
|
||||||
#define QERAPP_GETENTITYBRUSHHANDLE "QERApp_GetEntityBrushHandle"
|
|
||||||
#define QERAPP_CREATEENTITYHANDLE "QERApp_CreateEntityHandle"
|
|
||||||
#define QERAPP_COMMITBRUSHHANDLETOENTITY "QERApp_CommitBrushHandleToEntity"
|
|
||||||
#define QERAPP_COMMITENTITYHANDLETOMAP "QERApp_CommitEntityHandleToMap"
|
|
||||||
#define QERAPP_SETSCREENUPDATE "QERApp_SetScreenUpdate"
|
|
||||||
#define QERAPP_BUILDBRUSH2 "QERApp_BuildBrush2"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// v1.80
|
// v1.80
|
||||||
#define QERAPP_GETDISPATCHPARAMS "QERApp_GetDispatchParams"
|
#define QERAPP_GETDISPATCHPARAMS "QERApp_GetDispatchParams"
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
/*!
|
/*!
|
||||||
=======================================================================
|
=======================================================================
|
||||||
diagnostic printing facility
|
diagnostic printing facility
|
||||||
independently from any API negociation stuff,
|
independently from any API negotiation stuff,
|
||||||
we need a diagnostic facility that's available at all times
|
we need a diagnostic facility that's available at all times
|
||||||
=======================================================================
|
=======================================================================
|
||||||
*/
|
*/
|
||||||
|
@ -219,7 +219,7 @@ void SetType( EAPIManagerType type ) { mType = type; }
|
||||||
set the API matching pattern
|
set the API matching pattern
|
||||||
supported syntax:
|
supported syntax:
|
||||||
any minor for a given major, for instance: PLUGIN_MAJOR, "*"
|
any minor for a given major, for instance: PLUGIN_MAJOR, "*"
|
||||||
a space seperated list of minors for a given major: IMAGE_MAJOR, "tga jpg"
|
a space separated list of minors for a given major: IMAGE_MAJOR, "tga jpg"
|
||||||
*/
|
*/
|
||||||
void SetMatchAPI( const char *major, const char *minor );
|
void SetMatchAPI( const char *major, const char *minor );
|
||||||
|
|
||||||
|
@ -236,8 +236,8 @@ static APIDescriptor_t* PrepareRequireAPI( APIDescriptor_t *pAPI );
|
||||||
bool CheckSetActive();
|
bool CheckSetActive();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
the manager answers wether it wants to load this or not
|
the manager answers whether it wants to load this or not
|
||||||
we provide a default implementation, but this can be completely overriden if needed
|
we provide a default implementation, but this can be completely overridden if needed
|
||||||
see SetMatchAPI for the documentation of the default implementation
|
see SetMatchAPI for the documentation of the default implementation
|
||||||
NOTE: this should only be called on API_MATCH type of managers
|
NOTE: this should only be called on API_MATCH type of managers
|
||||||
*/
|
*/
|
||||||
|
@ -279,8 +279,8 @@ class CSynapseServer; // forward declare
|
||||||
class CSynapseClient : public IRefCounted
|
class CSynapseClient : public IRefCounted
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
this flag indicates wether this client is active
|
this flag indicates whether this client is active
|
||||||
i.e. wether you can ask it for interfaces
|
i.e. whether you can ask it for interfaces
|
||||||
this is either a client for which all required interfaces have been filled in
|
this is either a client for which all required interfaces have been filled in
|
||||||
or a client we are trying to resolve (i.e. load with all it's stuff)
|
or a client we are trying to resolve (i.e. load with all it's stuff)
|
||||||
*/
|
*/
|
||||||
|
@ -324,7 +324,7 @@ APIDescriptor_t* GetAPIDescriptor( int ) const; ///< retrieve specific informati
|
||||||
SYN_PROVIDE: means this is an API we provide if anyone needs it
|
SYN_PROVIDE: means this is an API we provide if anyone needs it
|
||||||
SYN_REQUIRE: means this is an API we will require for operation
|
SYN_REQUIRE: means this is an API we will require for operation
|
||||||
SYN_REQUIRE_ANY: means this is an API we want to load *any* minor found
|
SYN_REQUIRE_ANY: means this is an API we want to load *any* minor found
|
||||||
(for instance a list of image fornats, or the plugins)
|
(for instance a list of image formats, or the plugins)
|
||||||
|
|
||||||
\param pTable
|
\param pTable
|
||||||
the function table
|
the function table
|
||||||
|
@ -363,7 +363,7 @@ CSynapseAPIManager* GetManagerList( int ); ///< get corresponding API manager
|
||||||
virtual bool RequestAPI( APIDescriptor_t *pAPI ) = 0;
|
virtual bool RequestAPI( APIDescriptor_t *pAPI ) = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
return the build date, can be overriden by client module
|
return the build date, can be overridden by client module
|
||||||
*/
|
*/
|
||||||
virtual const char* GetInfo();
|
virtual const char* GetInfo();
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ virtual bool OnActivate() { return true; }
|
||||||
|
|
||||||
\param client_name, the name of the client node to look for. If NULL, use GetName()
|
\param client_name, the name of the client node to look for. If NULL, use GetName()
|
||||||
|
|
||||||
\return wether all APIs given were successfully found in the config
|
\return whether all APIs given were successfully found in the config
|
||||||
*/
|
*/
|
||||||
bool ConfigXML( CSynapseServer *pServer, const char *client_name, const XMLConfigEntry_t entries[] );
|
bool ConfigXML( CSynapseServer *pServer, const char *client_name, const XMLConfigEntry_t entries[] );
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ typedef enum { SYN_SO, SYN_BUILTIN } EClientType;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
server side slot for a synapse client
|
server side slot for a synapse client
|
||||||
is OS dependant, except for the ISynapseClient part
|
is OS dependent, except for the ISynapseClient part
|
||||||
*/
|
*/
|
||||||
class CSynapseClientSlot
|
class CSynapseClientSlot
|
||||||
{
|
{
|
||||||
|
@ -517,7 +517,7 @@ gchar *m_content;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
push required interfaces for this client into the stack of things to be resolved
|
push required interfaces for this client into the stack of things to be resolved
|
||||||
it is possible that several mathing interfaces be in the stack at the same time
|
it is possible that several matching interfaces be in the stack at the same time
|
||||||
(for instance several modules that want to get the VFS)
|
(for instance several modules that want to get the VFS)
|
||||||
but we should never have the same APIDescriptor_t twice
|
but we should never have the same APIDescriptor_t twice
|
||||||
NOTE: as this function is called repeatedly during the resolve (because the list of required things is refining),
|
NOTE: as this function is called repeatedly during the resolve (because the list of required things is refining),
|
||||||
|
@ -567,8 +567,8 @@ void AddSearchPath( char* ); ///< add a new directory to the module search path
|
||||||
/*!
|
/*!
|
||||||
do the big thing, scan for modules, scan their APIs, load up everything
|
do the big thing, scan for modules, scan their APIs, load up everything
|
||||||
providing pf is optional, will set the diagnostics printing
|
providing pf is optional, will set the diagnostics printing
|
||||||
\param conf_file is the XML configuration file for the intialization (see docs/runtime.txt)
|
\param conf_file is the XML configuration file for the initialization (see docs/runtime.txt)
|
||||||
\return false if the init failed (for instance not found/invalid conf file
|
\return false if the init failed (for instance not found/invalid configuration file
|
||||||
*/
|
*/
|
||||||
bool Initialize( const char* conf_file = NULL, PFN_SYN_PRINTF_VA pf = NULL );
|
bool Initialize( const char* conf_file = NULL, PFN_SYN_PRINTF_VA pf = NULL );
|
||||||
|
|
||||||
|
@ -593,8 +593,8 @@ bool Resolve( CSynapseClient *pClient );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief shutdown all the clients. Should only be called when the core is about to exit
|
\brief shutdown all the clients. Should only be called when the core is about to exit
|
||||||
this will force all clients to shutdown. it may destroy refcounted APIs and stuff
|
this will force all clients to shutdown. it may destroy refcounted APIs and such
|
||||||
\todo hafta use the release/refresh code before doing actual shutdown
|
\todo have to use the release/refresh code before doing actual shutdown
|
||||||
(i.e. when that code is written later on)
|
(i.e. when that code is written later on)
|
||||||
we need to 'broadcast' to all the clients .. that all the modules are going to be reloaded sorta
|
we need to 'broadcast' to all the clients .. that all the modules are going to be reloaded sorta
|
||||||
should clear up as many interfaces as possible to avoid unexpected crashes in the final stages of app exit
|
should clear up as many interfaces as possible to avoid unexpected crashes in the final stages of app exit
|
||||||
|
|
|
@ -123,6 +123,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="synapse.cpp" />
|
<ClCompile Include="synapse.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\synapse.h" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
|
|
|
@ -11,4 +11,9 @@
|
||||||
<Filter>src</Filter>
|
<Filter>src</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\synapse.h">
|
||||||
|
<Filter>src</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in a new issue