Commits

Anonymous committed 0299605

Ludo's fix for dllproc, added forgotten laz files

  • Participants
  • Parent commits aab6102

Comments (0)

Files changed (6)

File ANSI/AboutForms.lfm

+inherited AboutForm: TAboutForm
+  Caption = 'About Hello World'
+  PixelsPerInch = 96
+  object Label1: TLabel
+    Left = 24
+    Top = 24
+    Width = 71
+    Height = 13
+    Caption = 'Example plugin'
+  end
+  object Label2: TLabel
+    Left = 24
+    Top = 48
+    Width = 195
+    Height = 13
+    Caption = 'Damjan Zobo Cvetko, zobo@users.sf.net'
+  end
+  object Button1: TButton
+    Left = 136
+    Top = 224
+    Width = 75
+    Height = 25
+    Caption = 'Ok'
+    ModalResult = 1
+    TabOrder = 0
+  end
+end

File ANSI/helloworld.lpi

+<?xml version="1.0"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <PathDelim Value="\"/>
+    <General>
+      <Flags>
+        <MainUnitHasUsesSectionForAllUnits Value="False"/>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="helloworld"/>
+      <UseAppBundle Value="False"/>
+      <ResourceType Value="res"/>
+    </General>
+    <i18n>
+      <EnableI18N LFM="False"/>
+    </i18n>
+    <VersionInfo>
+      <StringTable ProductVersion=""/>
+    </VersionInfo>
+    <BuildModes Count="1">
+      <Item1 Name="Default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+      <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+      <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+      </local>
+    </RunParams>
+    <RequiredPackages Count="1">
+      <Item1>
+        <PackageName Value="LCL"/>
+      </Item1>
+    </RequiredPackages>
+    <Units Count="8">
+      <Unit0>
+        <Filename Value="helloworld.lpr"/>
+        <IsPartOfProject Value="True"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="lib\nppplugin.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="nppplugin"/>
+      </Unit1>
+      <Unit2>
+        <Filename Value="lib\SciSupport.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="scisupport"/>
+      </Unit2>
+      <Unit3>
+        <Filename Value="lib\NppForms.pas"/>
+        <IsPartOfProject Value="True"/>
+        <HasResources Value="True"/>
+        <UnitName Value="NppForms"/>
+      </Unit3>
+      <Unit4>
+        <Filename Value="lib\NppDockingForms.pas"/>
+        <IsPartOfProject Value="True"/>
+        <HasResources Value="True"/>
+        <UnitName Value="NppDockingForms"/>
+      </Unit4>
+      <Unit5>
+        <Filename Value="helloworldplugin.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="helloworldplugin"/>
+      </Unit5>
+      <Unit6>
+        <Filename Value="AboutForms.pas"/>
+        <IsPartOfProject Value="True"/>
+        <HasResources Value="True"/>
+        <UnitName Value="AboutForms"/>
+      </Unit6>
+      <Unit7>
+        <Filename Value="helloworlddockingforms.pas"/>
+        <IsPartOfProject Value="True"/>
+        <HasResources Value="True"/>
+        <UnitName Value="helloworlddockingforms"/>
+      </Unit7>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <SearchPaths>
+      <IncludeFiles Value="lib"/>
+      <OtherUnitFiles Value="lib"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <SyntaxMode Value="delphi"/>
+      </SyntaxOptions>
+    </Parsing>
+    <Linking>
+      <Options>
+        <Win32>
+          <GraphicApplication Value="True"/>
+        </Win32>
+        <ExecutableType Value="Library"/>
+      </Options>
+    </Linking>
+    <Other>
+      <CompilerMessages>
+        <MsgFileName Value=""/>
+      </CompilerMessages>
+      <CompilerPath Value="$(CompPath)"/>
+    </Other>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

File ANSI/helloworld.lpr

+library helloworld;
+
+{$ifdef fpc}
+{$MODE Delphi}
+{$endif}
+
+{ Important note about DLL memory management: ShareMem must be the
+  first unit in your library's USES clause AND your project's (select
+  Project-View Source) USES clause if your DLL exports any procedures or
+  functions that pass strings as parameters or function results. This
+  applies to all strings passed to and from your DLL--even those that
+  are nested in records and classes. ShareMem is the interface unit to
+  the BORLNDMM.DLL shared memory manager, which must be deployed along
+  with your DLL. To avoid using BORLNDMM.DLL, pass string information
+  using PChar or ShortString parameters. }
+
+{$R 'helloworldres.res' 'helloworldres.rc'}
+
+uses
+  SysUtils,
+  Classes,
+  Types,
+  Windows,
+  Messages,
+  nppplugin in 'lib\nppplugin.pas',
+  scisupport in 'lib\SciSupport.pas',
+  NppForms in 'lib\NppForms.pas' {NppForm},
+  NppDockingForms in 'lib\NppDockingForms.pas' {NppDockingForm},
+  helloworldplugin in 'helloworldplugin.pas',
+  AboutForms in 'AboutForms.pas' {AboutForm},
+  helloworlddockingforms in 'helloworlddockingforms.pas' {HelloWorldDockingForm};
+
+{$R *.res}
+
+{$ifdef fpc}
+{$Include 'lib\NppPluginInclude.pas'}
+{$else}
+// original code though I doubt that's correct - there is no paslib directory??!?
+{$Include '.paslib\NppPluginInclude.pas'}
+{$endif}
+
+begin
+  {$ifdef fpc}
+  Dll_Process_Detach_Hook := @DLLEntryPoint;
+  Dll_Thread_Attach_Hook:= @DLLEntryPoint;
+  Dll_Thread_Detach_Hook:= @DLLEntryPoint;
+  {$else}
+  // Delphi
+  { First, assign the procedure to the DLLProc variable }
+  DllProc := @DLLEntryPoint;
+  { Now invoke the procedure to reflect that the DLL is attaching to the process }
+  DLLEntryPoint(DLL_PROCESS_ATTACH);
+  {$endif fpc}
+end.

File ANSI/helloworlddockingforms.lfm

+inherited HelloWorldDockingForm: THelloWorldDockingForm
+  BorderStyle = bsSizeToolWin
+  Caption = 'HelloWorldDockingForm'
+  OnCreate = FormCreate
+  OnHide = FormHide
+  OnKeyPress = FormKeyPress
+  OnShow = FormShow
+  PixelsPerInch = 96
+  object Button1: TButton
+    Left = 8
+    Top = 112
+    Width = 75
+    Height = 25
+    Caption = 'Update Info'
+    TabOrder = 0
+    OnClick = Button1Click
+  end
+  object Button2: TButton
+    Left = 96
+    Top = 112
+    Width = 75
+    Height = 25
+    Caption = 'Close'
+    TabOrder = 1
+    OnClick = Button2Click
+  end
+  object Memo1: TMemo
+    Left = 8
+    Top = 8
+    Width = 185
+    Height = 89
+    Lines.Strings = (
+      'Memo1')
+    TabOrder = 2
+  end
+end

File ANSI/lib/NppDockingForms.lfm

+object NppDockingForm: TNppDockingForm
+  Left = 244
+  Top = 211
+  Width = 320
+  Height = 240
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  PixelsPerInch = 96
+end

File ANSI/lib/NppForms.lfm

+object NppForm: TNppForm
+  Left = 647
+  Top = 454
+  Width = 351
+  Height = 294
+  BorderStyle = bsSizeToolWin
+  Caption = 'NppForm'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  PixelsPerInch = 96
+end