Changeset 206
- Timestamp:
- 03/16/08 03:08:45 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/branches/ZeroRadiant/plugins/sample/plugin.cpp
r205 r206 22 22 #include "plugin.h" 23 23 24 #define CMD_SEP "-" 24 #define CMD_SEP "-" 25 25 #define CMD_ABOUT "About..." 26 26 // ============================================================================= … … 43 43 44 44 //backwards for some reason 45 static const char *PLUGIN_COMMANDS = CMD_ABOUT "; -";45 static const char *PLUGIN_COMMANDS = CMD_ABOUT ";" CMD_SEP; 46 46 static const char *PLUGIN_ABOUT = "Sample plugin\n"; 47 47 … … 61 61 } toolbar_button_info_t; 62 62 63 static const toolbar_button_info_t toolbar_buttons[NUM_TOOLBAR_BUTTONS] = 63 static const toolbar_button_info_t toolbar_buttons[NUM_TOOLBAR_BUTTONS] = 64 64 { 65 65 { … … 143 143 CSynapseServer* g_pSynapseServer = NULL; 144 144 CSynapseClientSample g_SynapseClient; 145 145 146 146 #if __GNUC__ >= 4 147 147 #pragma GCC visibility push(default) 148 148 #endif 149 extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) 149 extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) 150 150 { 151 151 #if __GNUC__ >= 4 … … 162 162 g_SynapseClient.AddAPI(TOOLBAR_MAJOR, SAMPLE_MINOR, sizeof(_QERPlugToolbarTable)); 163 163 g_SynapseClient.AddAPI(PLUGIN_MAJOR, SAMPLE_MINOR, sizeof(_QERPluginTable)); 164 164 165 165 g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(g_FuncTable), SYN_REQUIRE, &g_FuncTable); 166 166 g_SynapseClient.AddAPI(QGL_MAJOR, NULL, sizeof(g_QglTable), SYN_REQUIRE, &g_QglTable); … … 178 178 if (!strcmp(pAPI->major_name, PLUGIN_MAJOR)) { 179 179 _QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable); 180 180 181 181 pTable->m_pfnQERPlug_Init = QERPlug_Init; 182 182 pTable->m_pfnQERPlug_GetName = QERPlug_GetName; … … 186 186 } else if (!strcmp(pAPI->major_name, TOOLBAR_MAJOR)) { 187 187 _QERPlugToolbarTable* pTable= static_cast<_QERPlugToolbarTable*>(pAPI->mpTable); 188 188 189 189 pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount; 190 190 pTable->m_pfnGetToolbarButton = &GetToolbarButton; 191 191 return true; 192 192 } 193 193 194 194 Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo()); 195 195 return false;
