Upgraded plugin-system (other command call and now 93 commands)
Customizable IRC Paster Updated version number from 1.01 to 1.1
This commit is contained in:
@ -10,7 +10,7 @@ type TCodeSnippetClick = function (pTitle, pCategory: PChar; pCode: PChar): Inte
|
||||
TProjectsChange = function (pOldIndex, pNewIndex: DWord): Integer; cdecl;
|
||||
TCreateNewFile = function (Item: PByte): Integer; cdecl;
|
||||
TDisplaySearch = function (pSearchList: PChar; pSelected: PChar): Integer; cdecl;
|
||||
TSearch = function (pExpression: PChar; pCaseSensivity, pWholeWords, pSearchFromCaret, pSelectedOnly, pRegEx, pForward: Boolean): Integer; cdecl;
|
||||
TSearch = function (pExpression, pSearchList: PChar; pCaseSensivity, pWholeWords, pSearchFromCaret, pSelectedOnly, pRegEx, pForward: Boolean): Integer; cdecl;
|
||||
TSearchReplace = function (pExpression, pReplace, pExpList, pRepList: PChar; pCaseSensivity, pWholeWords, pSearchFromCaret, pSelectedOnly, pRegEx, pForward: Boolean): Integer; cdecl;
|
||||
TVisibleControlChange = function (pControl: DWord; pShow: Boolean): Integer; cdecl;
|
||||
TCompile = function (pCompileType: DWord; Lang, Filename: PChar): Integer; cdecl;
|
||||
@ -19,7 +19,7 @@ type TCodeSnippetClick = function (pTitle, pCategory: PChar; pCode: PChar): Inte
|
||||
TThemeChanged = function (pTheme: PChar): Integer; cdecl;
|
||||
|
||||
TModified = function (pText: PChar): Integer; cdecl;
|
||||
TKeyPress = function (var pKey: Char): Integer; cdecl;
|
||||
TKeyPress = function (pKey: PChar): Integer; cdecl;
|
||||
TEditorClick = function (pDoubleClick: Boolean): Integer; cdecl;
|
||||
TUpdateSel = function (pSelStart, pSelLength, pFirstVisibleLine: DWord): Integer; cdecl;
|
||||
TCallTipShow = function (pList: PChar): Integer; cdecl;
|
||||
@ -46,6 +46,7 @@ type TLoadInfo = record
|
||||
hHTMLPreview: HWND;
|
||||
hHudMsgGenerator: HWND;
|
||||
hInfo: HWND;
|
||||
hIRCPaster: HWND;
|
||||
hMainForm: HWND;
|
||||
hMenuGenerator: HWND;
|
||||
hMOTDGen: HWND;
|
||||
@ -69,7 +70,7 @@ type PLoadInfo = ^TLoadInfo;
|
||||
TLoadPlugin = procedure (LoadInfo: PLoadInfo); cdecl;
|
||||
TUnloadPlugin = procedure; cdecl;
|
||||
|
||||
procedure SendToMainApp(eData: String);
|
||||
function SendStudioMsg(eMessage: Integer; eData: String; eIntData: Integer): Integer;
|
||||
|
||||
function LoadPlugin(ListItem: TListItem): Boolean;
|
||||
procedure UnloadPlugin(ListItem: TListItem);
|
||||
@ -80,7 +81,7 @@ function Plugin_FileSave(Filename: String; Saving: Boolean): Boolean;
|
||||
function Plugin_DocChange(Index: Integer; Filename, Highlighter: String; RestoreCaret, Changing: Boolean): Boolean;
|
||||
function Plugin_ProjectsChange(OldIndex, NewIndex: Integer; Changing: Boolean): Boolean;
|
||||
function Plugin_CreateNewFile(Item: Byte; Creating: Boolean): Boolean;
|
||||
function Plugin_Search(SearchList, Selected: String; Displaying, SearchAgain: Boolean): Boolean;
|
||||
function Plugin_Search(SearchList, Selected: String; Displaying, SearchAgain: Boolean; CaseSensivity, WholeWords, SearchFromCaret, SelectedOnly, RegEx, Forward: Boolean): Boolean;
|
||||
function Plugin_SearchReplace(Expression, Replace, ExpList, RepList: String; CaseSensivity, WholeWords, SearchFromCaret, SelectedOnly, RegEx, Forward: Boolean): Boolean;
|
||||
function Plugin_VisibleControlChange(Control: Integer; Show: Boolean): Boolean;
|
||||
function Plugin_Compile(CompileType: Integer; Lang, Filename: String; Compiling: Boolean): Boolean;
|
||||
@ -89,7 +90,7 @@ function Plugin_CustomItemClick(Caption: String): Boolean;
|
||||
function Plugin_ThemeChange(Theme: String): Boolean;
|
||||
|
||||
function Plugin_Modified(Code: PChar): Boolean;
|
||||
function Plugin_KeyPress(var Key: Char): Boolean;
|
||||
function Plugin_KeyPress(Key: Char): Boolean;
|
||||
function Plugin_EditorClick(DoubleClick: Boolean): Boolean;
|
||||
function Plugin_UpdateSel(SelStart, SelLength, FirstVisibleLine: Integer): Boolean;
|
||||
function Plugin_CallTipShow(List: PChar): Boolean;
|
||||
@ -133,6 +134,106 @@ const { Return values for dlls }
|
||||
NEW_OTHER_SQL = 8;
|
||||
NEW_OTHER_XML = 9;
|
||||
|
||||
const SCM_SHOWPROGRESS = WM_USER + $100;
|
||||
SCM_HIDEPROGRESS = WM_USER + $101;
|
||||
SCM_UPDATEPROGRESS = WM_USER + $102;
|
||||
SCM_LOADCODESNIPPETS = WM_USER + $103;
|
||||
SCM_CODESNIPPETCLICK = WM_USER + $104;
|
||||
SCM_MIRC_CMD = WM_USER + $105;
|
||||
SCM_RELOADINI = WM_USER + $106;
|
||||
SCM_SELECTLANGUAGE = WM_USER + $107;
|
||||
SCM_LOADFILE = WM_USER + $108;
|
||||
SCM_CURRPROJECTS = WM_USER + $109;
|
||||
SCM_COMPILE = WM_USER + $110;
|
||||
SCM_COMPILE_UPLOAD = WM_USER + $111;
|
||||
SCM_COMPILE_STARTHL = WM_USER + $112;
|
||||
SCM_MENU_LOADIMAGE = WM_USER + $113;
|
||||
SCM_MENU_ADDITEM = WM_USER + $114;
|
||||
SCM_MENU_ADDSUBITEM = WM_USER + $115;
|
||||
SCM_MENU_FAKECLICK = WM_USER + $116;
|
||||
SCM_MENU_SHOWITEM = WM_USER + $117;
|
||||
SCM_MENU_HIDEITEM = WM_USER + $118;
|
||||
SCM_PLUGIN_LOAD = WM_USER + $119;
|
||||
SCM_PLUGIN_UNLOAD = WM_USER + $120;
|
||||
SCM_SETTINGS_CREATEPAGE = WM_USER + $121;
|
||||
SCM_CODEINSPECTOR_CLEAR = WM_USER + $122;
|
||||
SCM_CODEINSPECTOR_ADD = WM_USER + $123;
|
||||
SCM_CODEINSPECTOR_ADDCOMBO = WM_USER + $124;
|
||||
SCM_CODEINSPECTOR_SETVALUE = WM_USER + $125;
|
||||
SCM_CODEINSPECTOR_SETNAME = WM_USER + $126;
|
||||
SCM_CODEINSPECTOR_GETVALUE = WM_USER + $127;
|
||||
SCM_CODEINSPECTOR_GETNAME = WM_USER + $128;
|
||||
SCM_CODEINSPECTOR_COUNT = WM_USER + $129;
|
||||
SCM_CODEINSPECTOR_BEGINUPDATE = WM_USER + $130;
|
||||
SCM_CODEINSPECTOR_ENDUPDATE = WM_USER + $131;
|
||||
SCM_CODEINSPECTOR_DELETE = WM_USER + $132;
|
||||
|
||||
SCM_PAWN_NEWFILE = WM_USER + $133;
|
||||
SCM_PAWN_SAVEFILE = WM_USER + $134;
|
||||
SCM_PAWN_CLOSEFILE = WM_USER + $135;
|
||||
SCM_PAWN_ISUNTITLED = WM_USER + $136;
|
||||
SCM_PAWN_ACTIVATE = WM_USER + $137;
|
||||
SCM_PAWN_ACTIVATEDOC = WM_USER + $138;
|
||||
SCM_PAWN_GETNOTES = WM_USER + $139;
|
||||
SCM_PAWN_SETNOTES = WM_USER + $140;
|
||||
SCM_PAWN_GETFILENAME = WM_USER + $141;
|
||||
SCM_PAWN_SETFILENAME = WM_USER + $142;
|
||||
SCM_PAWN_GETTEXT = WM_USER + $143;
|
||||
SCM_PAWN_SETTEXT = WM_USER + $144;
|
||||
|
||||
SCM_CPP_NEWFILE = WM_USER + $145;
|
||||
SCM_CPP_SAVEFILE = WM_USER + $146;
|
||||
SCM_CPP_CLOSEFILE = WM_USER + $147;
|
||||
SCM_CPP_ISUNTITLED = WM_USER + $148;
|
||||
SCM_CPP_ACTIVATE = WM_USER + $149;
|
||||
SCM_CPP_ACTIVATEDOC = WM_USER + $150;
|
||||
SCM_CPP_ACTIVATEIDE = WM_USER + $151;
|
||||
SCM_CPP_GETNOTES = WM_USER + $152;
|
||||
SCM_CPP_SETNOTES = WM_USER + $153;
|
||||
SCM_CPP_GETFILENAME = WM_USER + $154;
|
||||
SCM_CPP_SETFILENAME = WM_USER + $155;
|
||||
SCM_CPP_GETTEXT = WM_USER + $156;
|
||||
SCM_CPP_SETTEXT = WM_USER + $157;
|
||||
|
||||
SCM_OTHER_NEWFILE = WM_USER + $158;
|
||||
SCM_OTHER_SAVEFILE = WM_USER + $159;
|
||||
SCM_OTHER_CLOSEFILE = WM_USER + $160;
|
||||
SCM_OTHER_ISUNTITLED = WM_USER + $161;
|
||||
SCM_OTHER_ACTIVATE = WM_USER + $162;
|
||||
SCM_OTHER_ACTIVATEDOC = WM_USER + $163;
|
||||
SCM_OTHER_GETNOTES = WM_USER + $164;
|
||||
SCM_OTHER_SETNOTES = WM_USER + $165;
|
||||
SCM_OTHER_GETFILENAME = WM_USER + $166;
|
||||
SCM_OTHER_SETFILENAME = WM_USER + $167;
|
||||
SCM_OTHER_GETTEXT = WM_USER + $168;
|
||||
SCM_OTHER_SETTEXT = WM_USER + $169;
|
||||
|
||||
SCM_OUTPUT_SHOW = WM_USER + $170;
|
||||
SCM_OUTPUT_HIDE = WM_USER + $171;
|
||||
SCM_OUTPUT_ADD = WM_USER + $172;
|
||||
SCM_OUTPUT_CLEAR = WM_USER + $173;
|
||||
SCM_OUTPUT_DELETE = WM_USER + $174;
|
||||
SCM_OUTPUT_GETTEXT = WM_USER + $175;
|
||||
SCM_OUTPUT_GETITEM = WM_USER + $176;
|
||||
SCM_OUTPUT_INDEXOF = WM_USER + $177;
|
||||
SCM_ACTIVE_DOCUMENT = WM_USER + $178;
|
||||
SCM_ACTIVE_PROJECTS = WM_USER + $179;
|
||||
SCM_EDITOR_SETTEXT = WM_USER + $180;
|
||||
SCM_EDITOR_GETTEXT = WM_USER + $181;
|
||||
SCM_EDTIOR_SETCALLTIPS = WM_USER + $182;
|
||||
SCM_EDITOR_SHOWCALLTIP = WM_USER + $183;
|
||||
SCM_EDITOR_SETAUTOCOMPLETE = WM_USER + $184;
|
||||
SCM_EDITOR_SHOWAUTOCOMPLETE = WM_USER + $185;
|
||||
SCM_EDITOR_GETSELSTART = WM_USER + $186;
|
||||
SCM_EDTIOR_GETSELLENGTH = WM_USER + $187;
|
||||
SCM_EDITOR_SETSELSTART = WM_USER + $188;
|
||||
SCM_EDITOR_SETSELLENGH = WM_USER + $189;
|
||||
|
||||
SCM_REMOVE_MENUITEM = WM_USER + $190;
|
||||
SCM_REMOVE_IMAGE = WM_USER + $191;
|
||||
SCM_SETTHEME = WM_USER + $192;
|
||||
SCM_GETTHEME = WM_USER + $193;
|
||||
|
||||
implementation
|
||||
|
||||
uses UnitfrmSettings, UnitMainTools, UnitfrmAllFilesForm,
|
||||
@ -140,7 +241,10 @@ uses UnitfrmSettings, UnitMainTools, UnitfrmAllFilesForm,
|
||||
UnitfrmHTMLPreview, UnitfrmHudMsgGenerator, UnitfrmInfo, UnitfrmMain,
|
||||
UnitfrmMenuGenerator, UnitfrmMOTDGen, UnitfrmPluginsIniEditor,
|
||||
UnitfrmReplace, UnitfrmSearch, UnitfrmSelectColor,
|
||||
UnitfrmSocketsTerminal, UnitfrmSplashscreen, UnitLanguages;
|
||||
UnitfrmSocketsTerminal, UnitfrmSplashscreen, UnitLanguages,
|
||||
UnitCodeExplorerUpdater, UnitCodeInspector, UnitCodeSnippets,
|
||||
UnitCodeUtils, UnitCompile, UnitfrmIRCPaster, UnitMenuGenerators,
|
||||
UnitReadThread, UnitTextAnalyze;
|
||||
|
||||
function LoadPlugin(ListItem: TListItem): Boolean;
|
||||
var eLoadInfo: TLoadInfo;
|
||||
@ -162,6 +266,7 @@ begin
|
||||
hHTMLPreview := frmHTMLPreview.Handle;
|
||||
hHudMsgGenerator := frmHudMsgGenerator.Handle;
|
||||
hInfo := frmInfo.Handle;
|
||||
hIRCPaster := frmIRCPaster.Handle;
|
||||
hMainForm := frmMain.Handle;
|
||||
hMenuGenerator := frmMenuGenerator.Handle;
|
||||
hMOTDGen := frmMOTDGen.Handle;
|
||||
@ -183,8 +288,8 @@ begin
|
||||
|
||||
eHandle := LoadLibrary(PChar(ExtractFilePath(ParamStr(0)) + 'plugins\' + ListItem.SubItems[0]));
|
||||
if eHandle = 0 then exit;
|
||||
@eFunc := GetProcAddress(eHandle, 'pftPluginLoad');
|
||||
@eFunc2 := GetProcAddress(eHandle, 'pftPluginUnload');
|
||||
@eFunc := GetProcAddress(eHandle, 'PluginLoad');
|
||||
@eFunc2 := GetProcAddress(eHandle, 'PluginUnload');
|
||||
|
||||
if @eFunc2 <> nil then begin
|
||||
if @eFunc <> nil then begin
|
||||
@ -201,16 +306,16 @@ begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
MessageBox(Application.Handle, PChar('Error loading plugin:' + #13 + 'pftPluginLoad function not found.'), PChar(ExtractFileName(ExtractFilePath(ParamStr(0)) + 'plugins\' + ListItem.SubItems[0])), MB_ICONERROR);
|
||||
MessageBox(Application.Handle, PChar('Error loading plugin:' + #13 + 'PluginLoad function not found.'), PChar(ExtractFileName(ExtractFilePath(ParamStr(0)) + 'plugins\' + ListItem.SubItems[0])), MB_ICONERROR);
|
||||
end
|
||||
else
|
||||
MessageBox(Application.Handle, PChar('Error loading plugin:' + #13 + 'pftPluginUnload function not found.'), PChar(ExtractFileName(ExtractFilePath(ParamStr(0)) + 'plugins\' + ListItem.SubItems[0])), MB_ICONERROR);
|
||||
MessageBox(Application.Handle, PChar('Error loading plugin:' + #13 + 'PluginUnload function not found.'), PChar(ExtractFileName(ExtractFilePath(ParamStr(0)) + 'plugins\' + ListItem.SubItems[0])), MB_ICONERROR);
|
||||
end;
|
||||
|
||||
procedure UnloadPlugin(ListItem: TListItem);
|
||||
var eFunc: TUnloadPlugin;
|
||||
begin
|
||||
@eFunc := GetProcAddress(Cardinal(ListItem.Data), 'pftPluginUnload');
|
||||
@eFunc := GetProcAddress(Cardinal(ListItem.Data), 'PluginUnload');
|
||||
if @eFunc <> nil then
|
||||
eFunc;
|
||||
FreeLibrary(Cardinal(ListItem.Data));
|
||||
@ -221,20 +326,21 @@ begin
|
||||
ListItem.SubItems[2] := 'Unloaded';
|
||||
end;
|
||||
|
||||
procedure SendToMainApp(eData: String);
|
||||
var HTargetWnd: HWND;
|
||||
ACopyDataStruct: TCopyDataStruct;
|
||||
function SendStudioMsg(eMessage: Integer; eData: String; eIntData: Integer): Integer;
|
||||
var eStudioHandle: HWND;
|
||||
eCopyDataStruct: TCopyDataStruct;
|
||||
begin
|
||||
with ACopyDataStruct do
|
||||
begin
|
||||
dwData := 0;
|
||||
with eCopyDataStruct do begin
|
||||
dwData := eIntData;
|
||||
cbData := Length(eData) + 1;
|
||||
lpData := PChar(eData);
|
||||
end;
|
||||
|
||||
HTargetWnd := FindWindow('TfrmMain', 'AMXX-Studio');
|
||||
if HTargetWnd <> 0 then
|
||||
SendMessage(HTargetWnd, WM_COPYDATA, 0, LongInt(@ACopyDataStruct));
|
||||
eStudioHandle := FindWindow('TfrmMain', 'AMXX-Studio');
|
||||
if eStudioHandle <> 0 then
|
||||
Result := SendMessage(eStudioHandle, WM_COPYDATA, eMessage, LongInt(@eCopyDataStruct))
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
||||
@ -264,7 +370,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftCodeSnippetClick');
|
||||
@Func := GetProcAddress(Handles[i], 'CodeSnippetClick');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Title), PChar(Category), PChar(Code)) of
|
||||
@ -288,9 +394,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Loading then
|
||||
@Func := GetProcAddress(Handles[i], 'pftLoading')
|
||||
@Func := GetProcAddress(Handles[i], 'Loading')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftLoaded');
|
||||
@Func := GetProcAddress(Handles[i], 'Loaded');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Filename)) of
|
||||
@ -314,9 +420,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Saving then
|
||||
@Func := GetProcAddress(Handles[i], 'pftSaving')
|
||||
@Func := GetProcAddress(Handles[i], 'Saving')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftSaved');
|
||||
@Func := GetProcAddress(Handles[i], 'Saved');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Filename)) of
|
||||
@ -340,9 +446,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Changing then
|
||||
@Func := GetProcAddress(Handles[i], 'pftDocChanging')
|
||||
@Func := GetProcAddress(Handles[i], 'DocChanging')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftDocChanged');
|
||||
@Func := GetProcAddress(Handles[i], 'DocChanged');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Index, PChar(Filename), PChar(Highlighter), RestoreCaret) of
|
||||
@ -366,9 +472,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Changing then
|
||||
@Func := GetProcAddress(Handles[i], 'pftProjectsChanging')
|
||||
@Func := GetProcAddress(Handles[i], 'ProjectsChanging')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftProjectsChanged');
|
||||
@Func := GetProcAddress(Handles[i], 'ProjectsChanged');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(OldIndex, NewIndex) of
|
||||
@ -392,9 +498,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Creating then
|
||||
@Func := GetProcAddress(Handles[i], 'pftCreatingNewFile')
|
||||
@Func := GetProcAddress(Handles[i], 'CreatingNewFile')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftCreatedNewFile');
|
||||
@Func := GetProcAddress(Handles[i], 'CreatedNewFile');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PByte(Item)) of
|
||||
@ -408,8 +514,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function Plugin_Search(SearchList, Selected: String; Displaying, SearchAgain: Boolean): Boolean;
|
||||
var Func: TDisplaySearch;
|
||||
function Plugin_Search(SearchList, Selected: String; Displaying, SearchAgain: Boolean; CaseSensivity, WholeWords, SearchFromCaret, SelectedOnly, RegEx, Forward: Boolean): Boolean;
|
||||
var Func: TSearch;
|
||||
i: integer;
|
||||
Handles: TIntegerArray;
|
||||
begin
|
||||
@ -418,14 +524,14 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Displaying then
|
||||
@Func := GetProcAddress(Handles[i], 'pftDisplayingSearch')
|
||||
@Func := GetProcAddress(Handles[i], 'DisplayingSearch')
|
||||
else if SearchAgain then
|
||||
@Func := GetProcAddress(Handles[i], 'pftSearchAgain')
|
||||
@Func := GetProcAddress(Handles[i], 'SearchAgain')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftSearch');
|
||||
@Func := GetProcAddress(Handles[i], 'Search');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(SearchList), PChar(Selected)) of
|
||||
case Func(PChar(Selected), PChar(SearchList), CaseSensivity, WholeWords, SearchFromCaret, SelectedOnly, RegEx, Forward) of
|
||||
PLUGIN_HANDLED: Result := False;
|
||||
PLUGIN_STOP: begin
|
||||
Result := False;
|
||||
@ -445,7 +551,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftSearchReplace');
|
||||
@Func := GetProcAddress(Handles[i], 'SearchReplace');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Expression), PChar(Replace), PChar(ExpList), PChar(RepList), CaseSensivity, WholeWords, SearchFromCaret, SelectedOnly, RegEx, Forward) of
|
||||
@ -468,7 +574,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftVisibleControlChange');
|
||||
@Func := GetProcAddress(Handles[i], 'VisibleControlChange');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Control, Show) of
|
||||
@ -492,9 +598,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Compiling then
|
||||
@Func := GetProcAddress(Handles[i], 'pftCompiling')
|
||||
@Func := GetProcAddress(Handles[i], 'Compiling')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftCompile');
|
||||
@Func := GetProcAddress(Handles[i], 'Compile');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(CompileType, PChar(Lang), PChar(Filename)) of
|
||||
@ -517,7 +623,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftShowHelp');
|
||||
@Func := GetProcAddress(Handles[i], 'ShowHelp');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(HelpType) of
|
||||
@ -540,7 +646,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftCustomItemClick');
|
||||
@Func := GetProcAddress(Handles[i], 'CustomItemClick');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Caption)) of
|
||||
@ -563,7 +669,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftThemeChanged');
|
||||
@Func := GetProcAddress(Handles[i], 'ThemeChanged');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Theme)) of
|
||||
@ -586,7 +692,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftModified');
|
||||
@Func := GetProcAddress(Handles[i], 'Modified');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Code) of
|
||||
@ -600,7 +706,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function Plugin_KeyPress(var Key: Char): Boolean;
|
||||
function Plugin_KeyPress(Key: Char): Boolean;
|
||||
var Func: TKeyPress;
|
||||
i: integer;
|
||||
Handles: TIntegerArray;
|
||||
@ -609,10 +715,10 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftKeyPress');
|
||||
@Func := GetProcAddress(Handles[i], 'KeyPress');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Key) of
|
||||
case Func(PChar(String(Key))) of
|
||||
PLUGIN_HANDLED: Result := False;
|
||||
PLUGIN_STOP: begin
|
||||
Result := False;
|
||||
@ -633,9 +739,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if DoubleClick then
|
||||
@Func := GetProcAddress(Handles[i], 'pftDoubleClick')
|
||||
@Func := GetProcAddress(Handles[i], 'DoubleClick')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftClick');
|
||||
@Func := GetProcAddress(Handles[i], 'Click');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(DoubleClick) of
|
||||
@ -658,7 +764,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftUpdateSel');
|
||||
@Func := GetProcAddress(Handles[i], 'UpdateSel');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(SelStart, SelLength, FirstVisibleLine) of
|
||||
@ -681,7 +787,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftCallTipShow');
|
||||
@Func := GetProcAddress(Handles[i], 'CallTipShow');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(List) of
|
||||
@ -704,7 +810,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftCallTipClick');
|
||||
@Func := GetProcAddress(Handles[i], 'CallTipClick');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Position) of
|
||||
@ -727,7 +833,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftAutoCompleteShow');
|
||||
@Func := GetProcAddress(Handles[i], 'AutoCompleteShow');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(List) of
|
||||
@ -750,7 +856,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftAutoCompleteSelect');
|
||||
@Func := GetProcAddress(Handles[i], 'AutoCompleteSelect');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(Text) of
|
||||
@ -773,7 +879,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftMessage');
|
||||
@Func := GetProcAddress(Handles[i], 'Message');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(hwnd, Message, wParam, lParam, time, pt) of
|
||||
@ -797,9 +903,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Updating then
|
||||
@Func := GetProcAddress(Handles[i], 'pftUpdatingCodeExplorer')
|
||||
@Func := GetProcAddress(Handles[i], 'UpdatingCodeExplorer')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftUpdatedCodeExplorer');
|
||||
@Func := GetProcAddress(Handles[i], 'UpdatedCodeExplorer');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Lang), PChar(Filename), PChar(CurrProjects)) of
|
||||
@ -823,9 +929,9 @@ begin
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
if Updating then
|
||||
@Func := GetProcAddress(Handles[i], 'pftUpdatingCodeInspector')
|
||||
@Func := GetProcAddress(Handles[i], 'UpdatingCodeInspector')
|
||||
else
|
||||
@Func := GetProcAddress(Handles[i], 'pftUpdatedCodeInspector');
|
||||
@Func := GetProcAddress(Handles[i], 'UpdatedCodeInspector');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(PChar(Lang), PChar(Filename), PChar(CurrProjects)) of
|
||||
@ -848,7 +954,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftOutputDoubleClick');
|
||||
@Func := GetProcAddress(Handles[i], 'OutputDoubleClick');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(ItemIndex) of
|
||||
@ -871,7 +977,7 @@ begin
|
||||
|
||||
Handles := GetDLLHandles;
|
||||
for i := 0 to High(Handles) do begin
|
||||
@Func := GetProcAddress(Handles[i], 'pftOutputPopup');
|
||||
@Func := GetProcAddress(Handles[i], 'OutputPopup');
|
||||
|
||||
if @Func <> nil then begin
|
||||
case Func(ItemIndex) of
|
||||
|
Reference in New Issue
Block a user