Added the plugins directory to CVS and updated the files

This commit is contained in:
Christian Hammacher
2005-12-11 17:31:06 +00:00
parent 7cc586bd0c
commit 3f36b51f6c
23 changed files with 2529 additions and 0 deletions

View File

@ -0,0 +1,113 @@
# Microsoft Developer Studio Project File - Name="Hello_World" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** NICHT BEARBEITEN **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=Hello_World - Win32 Debug
!MESSAGE Dies ist kein g<>ltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und f<>hren Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "Hello_World.mak".
!MESSAGE
!MESSAGE Sie k<>nnen beim Ausf<73>hren von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "Hello_World.mak" CFG="Hello_World - Win32 Debug"
!MESSAGE
!MESSAGE F<>r die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "Hello_World - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "Hello_World - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Hello_World - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
!ELSEIF "$(CFG)" == "Hello_World - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "Hello_World - Win32 Release"
# Name "Hello_World - Win32 Debug"
# Begin Group "Quellcodedateien"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\sample.cpp
# End Source File
# End Group
# Begin Group "Header-Dateien"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\sample.h
# End Source File
# Begin Source File
SOURCE=.\studio_api.h
# End Source File
# End Group
# Begin Group "Ressourcendateien"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL<45>SCHT WERDEN!
###############################################################################
Project: "Hello_World"=".\Hello_World.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

Binary file not shown.

View File

@ -0,0 +1,33 @@
<html>
<body>
<pre>
<h1>Erstellungsprotokoll</h1>
<h3>
--------------------Konfiguration: Hello_World - Win32 Release--------------------
</h3>
<h3>Befehlszeilen</h3>
Erstellen der tempor<6F>ren Datei "C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSP9.tmp" mit Inhalten
[
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HELLO_WORLD_EXPORTS" /Fp"Release/Hello_World.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
"C:\Dokumente und Einstellungen\Basic-Master\Eigene Dateien\Programmieren\AMXX-Studio\plugins\Hello_World CPP\sample.cpp"
]
Creating command line "cl.exe @"C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSP9.tmp""
Erstellen der tempor<6F>ren Datei "C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSPA.tmp" mit Inhalten
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/Hello_World.pdb" /machine:I386 /out:"Release/Hello_World.dll" /implib:"Release/Hello_World.lib"
".\Release\sample.obj"
]
Erstellen der Befehlzeile "link.exe @"C:\DOKUME~1\BASIC-~1\LOKALE~1\Temp\RSPA.tmp""
<h3>Ausgabefenster</h3>
Kompilierung l<>uft...
sample.cpp
Linker-Vorgang l<>uft...
Bibliothek Release/Hello_World.lib und Objekt Release/Hello_World.exp wird erstellt
<h3>Ergebnisse</h3>
Hello_World.dll - 0 Fehler, 0 Warnung(en)
</pre>
</body>
</html>

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hello_World", "Hello_World.vcproj", "{A6E5B144-7439-4F23-A679-B6E8B42B606E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A6E5B144-7439-4F23-A679-B6E8B42B606E}.Debug|Win32.ActiveCfg = Debug|Win32
{A6E5B144-7439-4F23-A679-B6E8B42B606E}.Debug|Win32.Build.0 = Debug|Win32
{A6E5B144-7439-4F23-A679-B6E8B42B606E}.Release|Win32.ActiveCfg = Release|Win32
{A6E5B144-7439-4F23-A679-B6E8B42B606E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -0,0 +1,255 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Hello_World"
ProjectGUID="{A6E5B144-7439-4F23-A679-B6E8B42B606E}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/Hello_World.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HELLO_WORLD_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/Hello_World.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib user32.lib"
OutputFile=".\Release/Hello_World.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/Hello_World.pdb"
ImportLibrary=".\Release/Hello_World.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/Hello_World.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/Hello_World.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HELLO_WORLD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/Hello_World.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1031"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="odbc32.lib odbccp32.lib"
OutputFile=".\Debug/Hello_World.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/Hello_World.pdb"
ImportLibrary=".\Debug/Hello_World.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/Hello_World.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Quellcodedateien"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="sample.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header-Dateien"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="sample.h"
>
</File>
<File
RelativePath="studio_api.h"
>
</File>
</Filter>
<Filter
Name="Ressourcendateien"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="PC-BASIC"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="PC-BASIC"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@ -0,0 +1,26 @@
#include "sample.h"
#include "studio_api.h"
#include <stdio.h>
#include <windows.h>
#include <string.h>
EXPORT void PluginLoad(load_info *LoadInfo) {
LoadInfo->sPluginName = "C(++) Example"; // Set PlugIn-name
LoadInfo->sPluginDescription = "Simple example for creating plugins with C(++)"; // Set description
SendStudioMsg(SCM_MENU_ADDITEM, "Tools->Hello World! [C++]", -1); // Register menu items
/* [...] */
}
EXPORT void PluginUnload() {
SendStudioMsg(SCM_REMOVE_MENUITEM, "Hello World! [C++]", 0);
}
EXPORT int CustomItemClick(CHAR *Caption) {
if (strcmp(Caption, "Hello World! [C++]") == 0) { // If caption is equal set text and return PLUGIN_HANDLED
SendStudioMsg(SCM_EDITOR_SETTEXT, "Hello World!\n\nThis is an example for C(++) plugins for AMXX-Studio.", 0);
return PLUGIN_HANDLED;
}
else
return PLUGIN_CONTINUE;
}

View File

@ -0,0 +1,9 @@
#ifndef _MYPLUGIN_INCLUDE_H
#define _MYPLUGIN_INCLUDE_H
#include "studio_api.h"
EXPORT void PluginLoad(load_info *pInfo);
EXPORT void PluginUnload();
#endif //_MYPLUGIN_INCLUDE_H

View File

@ -0,0 +1,195 @@
/* studio_api.h by the AMX Mod X Dev Team */
#ifndef _INCLUDE_STUDIO_H
#define _INCLUDE_STUDIO_H
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
// DLL Export
#define EXPORT extern "C" __declspec(dllexport)
// Return values for functions
#define PLUGIN_CONTINUE 0
#define PLUGIN_STOP 1
#define PLUGIN_HANDLED 2
// Important values for events
#define COMP_DEFAULT 0
#define COMP_STARTHL 1
#define COMP_UPLOAD 2
#define HELP_DEFAULT 0
#define HELP_SEARCH 1
#define HELP_FORUMS 2
#define HELP_ABOUT 3
#define CTRL_OUTPUT 0 // Output list
#define CTRL_CODETOOLS_MAIN 1 // Code-Tools window
#define CTRL_CODETOOLS_ITEM 2 // Code-Tools tab
#define CTRL_NOTES 3 // Notes tab
#define NEW_PAWN_PLUGIN 0
#define NEW_PAWN_EMPTYPLUGIN 1
#define NEW_PAWN_HEADER 2
#define NEW_CPP_MODULE 3
#define NEW_CPP_UNIT 4
#define NEW_CPP_HEADER 5
#define NEW_OTHER_TEXTFILE 6
#define NEW_OTHER_HTML 7
#define NEW_OTHER_SQL 8
#define NEW_OTHER_XML 9
// Messages (see "Functions and Events.txt" for further information)
#define SCM_SHOWPROGRESS WM_USER + 0x100 // Show progressbar
#define SCM_HIDEPROGRESS WM_USER + 0x101 // Hide progressbar
#define SCM_UPDATEPROGRESS WM_USER + 0x102 // Update progress
#define SCM_LOADCODESNIPPETS WM_USER + 0x103 // Load Code-Snippets of a language
#define SCM_CODESNIPPETCLICK WM_USER + 0x104 // Simulate click on a Code-Snippet
#define SCM_MIRC_CMD WM_USER + 0x105 // Send a command to mIRC (like /msg #amxmodx hello)
#define SCM_RELOADINI WM_USER + 0x106 // Reload configuration ini (Hint: This is not the whole configuration!)
#define SCM_SELECTLANGUAGE WM_USER + 0x107 // Set the highlighter language of the active document
#define SCM_LOADFILE WM_USER + 0x108 // Load a custom file
#define SCM_CURRPROJECTS WM_USER + 0x109 // Returns the current projects index
#define SCM_COMPILE WM_USER + 0x110 // Simulate click on the "Compile"-button
#define SCM_COMPILE_UPLOAD WM_USER + 0x111 // Simulate click on the "Compile and upload"-button
#define SCM_COMPILE_STARTHL WM_USER + 0x112 // Simulate click on the "Compile and Start HL"-button
#define SCM_MENU_LOADIMAGE WM_USER + 0x113 // Load an image (bitmap), returns the image index
#define SCM_MENU_ADDITEM WM_USER + 0x114 // Add a menu item
#define SCM_MENU_ADDSUBITEM WM_USER + 0x115 // Add a submenu item
#define SCM_MENU_FAKECLICK WM_USER + 0x116 // Fake a click on a custom menu item
#define SCM_MENU_SHOWITEM WM_USER + 0x117 // Show an item
#define SCM_MENU_HIDEITEM WM_USER + 0x118 // Hide an item
#define SCM_PLUGIN_LOAD WM_USER + 0x119 // Load a plugin
#define SCM_PLUGIN_UNLOAD WM_USER + 0x120 // Unload a plugin
#define SCM_SETTINGS_CREATEPAGE WM_USER + 0x121 // Create a new settings-page, returns the new HWND
#define SCM_SETTINGS_REMOVEPAGE WM_USER + 0x194 // Removes a page from the settings dialog
#define SCM_CODEINSPECTOR_CLEAR WM_USER + 0x122 // Clear the code-inspector
#define SCM_CODEINSPECTOR_ADD WM_USER + 0x123 // Add a field to the code-inspector
#define SCM_CODEINSPECTOR_ADDCOMBO WM_USER + 0x124 // Add a combobox-item to the code-inspector
#define SCM_CODEINSPECTOR_SETVALUE WM_USER + 0x125 // Set a field of the code-inspector
#define SCM_CODEINSPECTOR_SETNAME WM_USER + 0x126 // Set the name of an item
#define SCM_CODEINSPECTOR_GETVALUE WM_USER + 0x127 // Get the value of an item
#define SCM_CODEINSPECTOR_GETNAME WM_USER + 0x128 // Get the name of an item
#define SCM_CODEINSPECTOR_COUNT WM_USER + 0x129 // Gets the count
#define SCM_CODEINSPECTOR_BEGINUPDATE WM_USER + 0x130 // Begin update
#define SCM_CODEINSPECTOR_ENDUPDATE WM_USER + 0x131 // End update
#define SCM_CODEINSPECTOR_DELETE WM_USER + 0x132 // Deletes a field in the code-inspector
#define SCM_PAWN_NEWFILE WM_USER + 0x133 // Create new Pawn-file
#define SCM_PAWN_SAVEFILE WM_USER + 0x134 // Save a Pawn-file
#define SCM_PAWN_CLOSEFILE WM_USER + 0x135 // Close a Pawn-file
#define SCM_PAWN_ISUNTITLED WM_USER + 0x136 // Returns 1 if untitled, otherwise 0
#define SCM_PAWN_ACTIVATE WM_USER + 0x137 // Activate the Pawn Projects
#define SCM_PAWN_ACTIVATEDOC WM_USER + 0x138 // Activate a Pawn document
#define SCM_PAWN_GETNOTES WM_USER + 0x139 // Gets the notes text (RTF)
#define SCM_PAWN_SETNOTES WM_USER + 0x140 // Set the notes text (RTF)
#define SCM_PAWN_GETFILENAME WM_USER + 0x141 // Gets the filename of a document
#define SCM_PAWN_SETFILENAME WM_USER + 0x142 // Sets the filename
#define SCM_PAWN_FILECOUNT WM_USER + 0x195 // Returns the number of loaded scripts
#define SCM_PAWN_GETTEXT WM_USER + 0x143 // Gets the text of a document
#define SCM_PAWN_SETTEXT WM_USER + 0x144 // Sets the text of a document
#define SCM_CPP_NEWFILE WM_USER + 0x145 // Create new Pawn-file
#define SCM_CPP_SAVEFILE WM_USER + 0x146 // Save a Pawn-file
#define SCM_CPP_CLOSEFILE WM_USER + 0x147 // Close a Pawn-file
#define SCM_CPP_ISUNTITLED WM_USER + 0x148 // Returns 1 if untitled, otherwise 0
#define SCM_CPP_ACTIVATE WM_USER + 0x149 // Activate the Pawn Projects
#define SCM_CPP_ACTIVATEDOC WM_USER + 0x150 // Activate a Pawn document
#define SCM_CPP_ACTIVATEIDE WM_USER + 0x151 // Activate the C++ IDE
#define SCM_CPP_GETNOTES WM_USER + 0x152 // Gets the notes text (RTF)
#define SCM_CPP_SETNOTES WM_USER + 0x153 // Set the notes text (RTF)
#define SCM_CPP_GETFILENAME WM_USER + 0x154 // Gets the filename of a document
#define SCM_CPP_SETFILENAME WM_USER + 0x155 // Sets the filename
#define SCM_CPP_FILECOUNT WM_USER + 0x196 // Returns the number of loaded C(++) files
#define SCM_CPP_GETTEXT WM_USER + 0x156 // Gets the text of a document
#define SCM_CPP_SETTEXT WM_USER + 0x157 // Sets the text of a document
#define SCM_OTHER_NEWFILE WM_USER + 0x158 // Create a new file
#define SCM_OTHER_SAVEFILE WM_USER + 0x159 // Save a file
#define SCM_OTHER_CLOSEFILE WM_USER + 0x160 // Close a file
#define SCM_OTHER_ISUNTITLED WM_USER + 0x161 // Returns 1 if untitled, otherwise 0
#define SCM_OTHER_ACTIVATE WM_USER + 0x162 // Activate a file
#define SCM_OTHER_ACTIVATEDOC WM_USER + 0x163 // Activate a document
#define SCM_OTHER_GETNOTES WM_USER + 0x164 // Gets the notes text (RTF)
#define SCM_OTHER_SETNOTES WM_USER + 0x165 // Set the notes text (RTF)
#define SCM_OTHER_GETFILENAME WM_USER + 0x166 // Gets the filename of a document
#define SCM_OTHER_SETFILENAME WM_USER + 0x167 // Sets the filename
#define SCM_OTHER_FILECOUNT WM_USER + 0x197 // Returns the number of loaded files
#define SCM_OTHER_GETTEXT WM_USER + 0x168 // Gets the text of a document
#define SCM_OTHER_SETTEXT WM_USER + 0x169 // Sets the text of a document
#define SCM_OUTPUT_SHOW WM_USER + 0x170 // Show the output
#define SCM_OUTPUT_HIDE WM_USER + 0x171 // Hide the output
#define SCM_OUTPUT_ADD WM_USER + 0x172 // Add an item to the output
#define SCM_OUTPUT_CLEAR WM_USER + 0x173 // Clear the output
#define SCM_OUTPUT_DELETE WM_USER + 0x174 // Delete an item in the output
#define SCM_OUTPUT_GETTEXT WM_USER + 0x175 // Get the whole output
#define SCM_OUTPUT_GETITEM WM_USER + 0x176 // Get the text of a specific item
#define SCM_OUTPUT_INDEXOF WM_USER + 0x177 // Gets the item index of an item, returns -1 if not found
#define SCM_ACTIVE_DOCUMENT WM_USER + 0x178 // Returns the index of the active document
#define SCM_ACTIVE_PROJECTS WM_USER + 0x179 // Returns the index of the active projects
#define SCM_EDITOR_SETTEXT WM_USER + 0x180 // Sets the editor's text
#define SCM_EDITOR_GETTEXT WM_USER + 0x181 // Gets the editor's text
#define SCM_EDTIOR_SETCALLTIPS WM_USER + 0x182 // Sets the calltips
#define SCM_EDITOR_SHOWCALLTIP WM_USER + 0x183 // Shows the calltip
#define SCM_EDITOR_SETAUTOCOMPLETE WM_USER + 0x184 // Sets the autocomplete list
#define SCM_EDITOR_SHOWAUTOCOMPLETE WM_USER + 0x185 // Show the autocomplete list
#define SCM_EDITOR_GETSELSTART WM_USER + 0x186 // Gets the sel start
#define SCM_EDITOR_GETSELLENGTH WM_USER + 0x187 // Gets the sel length
#define SCM_EDITOR_SETSELSTART WM_USER + 0x188 // Set sel start
#define SCM_EDITOR_SETSELLENGH WM_USER + 0x189 // Set sel length
#define SCM_REMOVE_MENUITEM WM_USER + 0x190 // Remove an item from the menu
#define SCM_REMOVE_IMAGE WM_USER + 0x191 // Remove an image from the image list
#define SCM_SETTHEME WM_USER + 0x192 // Set theme
#define SCM_GETTHEME WM_USER + 0x193 // Get theme
struct load_info {
/* Plugin Values */
const CHAR *sPluginName;
const CHAR *sPluginDescription;
/* Form Handles */
HWND *hModuleHandle;
HWND *hAllFilesForm;
HWND *hAutoIndent;
HWND *hClose;
HWND *hConnGen;
HWND *hGoToLine;
HWND *hHTMLPreview;
HWND *hHudMsgGenerator;
HWND *hInfo;
HWND *hIRCPaster;
HWND *hMainForm;
HWND *hMenuGenerator;
HWND *hMOTDGen;
HWND *hPluginsIniEditor;
HWND *hReplace;
HWND *hSearch;
HWND *hSelectColor;
HWND *hSettings;
HWND *hSocketsTerminal;
HWND *hParamEdit;
/* Important Control Handles */
HWND *hOutput;
HWND *hCodeExplorer;
HWND *hCodeInspector;
HWND *hNotes;
/* Other */
void *pApplication;
};
int SendStudioMsg(int Message, const CHAR *Data, int IntData) {
HWND StudioHandle;
StudioHandle = FindWindow("TfrmMain", "AMXX-Studio");
if (StudioHandle != 0) {
COPYDATASTRUCT sMessage;
sMessage.dwData = IntData;
sMessage.cbData = strlen(Data) + 1;
sMessage.lpData = (void *) Data;
return SendMessage(StudioHandle, WM_COPYDATA, (WPARAM)Message, (LPARAM)&sMessage);
}
else
return -1;
}
// If you receive strings as integer, simply cast them with (CHAR *) SendStudioMsg(...);
#endif