diff --git a/Contributors.md b/Contributors.md
new file mode 100644
index 00000000..f6cce9d7
--- /dev/null
+++ b/Contributors.md
@@ -0,0 +1,20 @@
+## Contributors
+
+### Fpc and Lazarus support:
+- Alexey-T (https://github.com/Alexey-T)
+### Early Contributors:
+- Grzegorz Makarewicz (mak@mikroplan.com.pl)
+- Samuel Iseli (iseli@vertec.ch)
+- Andrew Robinson (andy@hps1.demon.co.uk)
+- Mark Watts(mark_watts@hotmail.com)
+- Olivier Deckmyn (olivier.deckmyn@mail.dotcom.fr)
+- Sigve Tjora (public@tjora.no)
+- Mark Derricutt (mark@talios.com)
+- Igor E. Poteryaev (jah@mail.ru)
+- Yuri Filimonov (fil65@mail.ru)
+- Stefan Hoffmeister (Stefan.Hoffmeister@Econos.de)
+- Michiel du Toit (micdutoit@hsbfn.com) - Lazarus Port
+- Chris Nicolai (nicolaitanes@gmail.com)
+- Andrey Gruzdev (andrey.gruzdev@gmail.com)
+
+More recent contributors can be seen at the [project contributors graph](https://github.com/pyscripter/python4delphi/graphs/contributors).
diff --git a/Packages/Delphi/Delphi 10.4+/Python.dproj b/Packages/Delphi/Delphi 10.4+/Python.dproj
index 33ce2c07..b56abb83 100644
--- a/Packages/Delphi/Delphi 10.4+/Python.dproj
+++ b/Packages/Delphi/Delphi 10.4+/Python.dproj
@@ -178,6 +178,7 @@
+
Base
diff --git a/Packages/Delphi/Delphi 10.4+/PythonFmxLinux.dproj b/Packages/Delphi/Delphi 10.4+/PythonFmxLinux.dproj
index 847fef71..445f21ac 100644
--- a/Packages/Delphi/Delphi 10.4+/PythonFmxLinux.dproj
+++ b/Packages/Delphi/Delphi 10.4+/PythonFmxLinux.dproj
@@ -1,968 +1,968 @@
-
-
- {B0F48139-24FB-42F3-93E8-05DA2E142904}
- PythonFmxLinux.dpk
- True
- Release
- 128
- Package
- FMX
- 19.5
- Linux64
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_1
- true
- true
-
-
- true
- Base
- true
-
-
- true
- Cfg_2
- true
- true
-
-
- true
- Cfg_2
- true
- true
-
-
- true
- Cfg_2
- true
- true
-
-
- true
- Cfg_2
- true
- true
-
-
- false
- false
- false
- false
- false
- 00400000
- true
- true
- PythonFmxLinux
- Python4Delphi - Run-time Engine Package for FMXLinux
- $(Auto)
- true
- 1046
- CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
- System;Xml;Data;Datasnap;Web;Soap;REST.Authenticator.OAuth.WebForm;$(DCC_Namespace)
- $(BDSCatalogRepositoryAllUsers)\FmxLinux-1.71\redist;$(DCC_UnitSearchPath)
-
-
- package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
- Debug
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar
-
-
- $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
- annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar
-
-
- $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png
-
-
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
- Debug
- true
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
- 1033
-
-
- RELEASE;$(DCC_Define)
- 0
- false
- 0
-
-
- /usr/bin/gnome-terminal -- "%debuggee%"
-
-
- DEBUG;$(DCC_Define)
- false
- true
- true
- true
-
-
- Debug
-
-
- Debug
-
-
- Debug
-
-
- Debug
-
-
-
- MainSource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Base
-
-
- Cfg_1
- Base
-
-
- Cfg_2
- Base
-
-
-
- Delphi.Personality.12
- Package
-
-
-
- PythonFmxLinux.dpk
-
-
- Embarcadero C++Builder Office 2000 Servers Package
- Embarcadero C++Builder Office XP Servers Package
- Microsoft Office 2000 Sample Automation Server Wrapper Components
- Microsoft Office XP Sample Automation Server Wrapper Components
-
-
-
- False
- False
- False
- False
- True
- False
- False
- False
- False
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- true
-
-
-
-
- bplPythonFmxLinux.so
- true
-
-
-
-
- PythonFmxLinux.bpl
- true
-
-
-
-
- 1
-
-
- 0
-
-
-
-
- classes
- 64
-
-
- classes
- 64
-
-
-
-
- res\xml
- 1
-
-
- res\xml
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\armeabi
- 1
-
-
- library\lib\armeabi
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- library\lib\mips
- 1
-
-
- library\lib\mips
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\values-v21
- 1
-
-
- res\values-v21
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- res\drawable
- 1
-
-
- res\drawable
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-ldpi
- 1
-
-
- res\drawable-ldpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-mdpi
- 1
-
-
- res\drawable-mdpi
- 1
-
-
-
-
- res\drawable-hdpi
- 1
-
-
- res\drawable-hdpi
- 1
-
-
-
-
- res\drawable-xhdpi
- 1
-
-
- res\drawable-xhdpi
- 1
-
-
-
-
- res\drawable-xxhdpi
- 1
-
-
- res\drawable-xxhdpi
- 1
-
-
-
-
- res\drawable-xxxhdpi
- 1
-
-
- res\drawable-xxxhdpi
- 1
-
-
-
-
- res\drawable-small
- 1
-
-
- res\drawable-small
- 1
-
-
-
-
- res\drawable-normal
- 1
-
-
- res\drawable-normal
- 1
-
-
-
-
- res\drawable-large
- 1
-
-
- res\drawable-large
- 1
-
-
-
-
- res\drawable-xlarge
- 1
-
-
- res\drawable-xlarge
- 1
-
-
-
-
- res\values
- 1
-
-
- res\values
- 1
-
-
-
-
- 1
-
-
- 1
-
-
- 0
-
-
-
-
- 1
- .framework
-
-
- 1
- .framework
-
-
- 1
- .framework
-
-
- 0
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 0
- .dll;.bpl
-
-
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 1
- .dylib
-
-
- 0
- .bpl
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
- ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
- ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
- 1
-
-
-
-
-
-
-
- 1
-
-
- 1
-
-
- 1
-
-
-
-
-
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
- Contents\Resources
- 1
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
- library\lib\arm64-v8a
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 1
-
-
- 0
-
-
-
-
- library\lib\armeabi-v7a
- 1
-
-
-
-
- 1
-
-
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
- Assets
- 1
-
-
- Assets
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 12
-
-
-
-
-
+
+
+ {B0F48139-24FB-42F3-93E8-05DA2E142904}
+ PythonFmxLinux.dpk
+ True
+ Release
+ 128
+ Package
+ FMX
+ 19.5
+ Linux64
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ false
+ false
+ false
+ false
+ false
+ 00400000
+ true
+ true
+ PythonFmxLinux
+ Python4Delphi - Run-time Engine Package for FMXLinux
+ $(Auto)
+ true
+ 1046
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ System;Xml;Data;Datasnap;Web;Soap;REST.Authenticator.OAuth.WebForm;$(DCC_Namespace)
+ $(BDSCatalogRepositoryAllUsers)\FmxLinux-1.71\redist;$(DCC_UnitSearchPath)
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
+ annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar
+
+
+ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
+ annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar
+
+
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ Debug
+ true
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
+ 1033
+
+
+ RELEASE;$(DCC_Define)
+ 0
+ false
+ 0
+
+
+ /usr/bin/gnome-terminal -- "%debuggee%"
+
+
+ DEBUG;$(DCC_Define)
+ false
+ true
+ true
+ true
+
+
+ Debug
+
+
+ Debug
+
+
+ Debug
+
+
+ Debug
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+ Cfg_2
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ PythonFmxLinux.dpk
+
+
+ Embarcadero C++Builder Office 2000 Servers Package
+ Embarcadero C++Builder Office XP Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+
+ False
+ False
+ False
+ False
+ True
+ False
+ False
+ False
+ False
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ bplPythonFmxLinux.so
+ true
+
+
+
+
+ PythonFmxLinux.bpl
+ true
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 64
+
+
+ classes
+ 64
+
+
+
+
+ res\xml
+ 1
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+ ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ library\lib\arm64-v8a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/Packages/Delphi/Delphi 10.4+/PythonVcl.dproj b/Packages/Delphi/Delphi 10.4+/PythonVcl.dproj
index 5e059dc0..3f40f175 100644
--- a/Packages/Delphi/Delphi 10.4+/PythonVcl.dproj
+++ b/Packages/Delphi/Delphi 10.4+/PythonVcl.dproj
@@ -118,6 +118,7 @@
+
Base
diff --git a/Packages/Delphi/P4DComponentSuite.groupproj b/Packages/Delphi/P4DComponentSuite.groupproj
index 4995cf22..0811f31e 100644
--- a/Packages/Delphi/P4DComponentSuite.groupproj
+++ b/Packages/Delphi/P4DComponentSuite.groupproj
@@ -1,96 +1,96 @@
-
-
- {8BE1193B-E609-445D-9BA3-F57DBEA042F5}
-
-
-
-
-
-
- Delphi 10.4+\Python.dproj
-
-
- Delphi 10.4+\Python.dproj
-
-
- Delphi 10.4+\PythonVcl.dproj
-
-
-
-
-
-
-
-
-
- Default.Personality.12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {8BE1193B-E609-445D-9BA3-F57DBEA042F5}
+
+
+
+
+
+
+ Delphi 10.4+\Python.dproj
+
+
+ Delphi 10.4+\Python.dproj
+
+
+ Delphi 10.4+\PythonVcl.dproj
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/MethodCallBack.pas b/Source/MethodCallBack.pas
index f5eaec11..82b25a8e 100644
--- a/Source/MethodCallBack.pas
+++ b/Source/MethodCallBack.pas
@@ -1,28 +1,18 @@
(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
(* *)
-(* Module: Unit 'MethodCallback' Copyright (c) 1998 *)
-(* *)
-(* Version: 0.0 Dr. Dietmar Budelsky *)
-(* Sub-Version: 0.3 dbudelsky@web.de *)
-(* Germany *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
(**************************************************************************)
(* Functionality: Generates synthetic callback functions which calls *)
(* DELPHI Class Methods. A callback mechanism (DDE, PYTHON, TCL) can now *)
(* use DELPHI objects. *)
-(* *)
-(**************************************************************************)
-(* Contributors: *)
-(* Grzegorz Makarewicz (mak@mikroplan.com.pl) *)
-(* Morgan Martinet (p4d@mmm-experts.com) *)
-(* Samuel Iseli (iseli@vertec.ch) *)
-(* Andrey Gruzdev (andrey.gruzdev@gmail.com) *)
-(* Lucas Belo (lucas.belo@live.com) *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free, as long as this *)
-(* header and its copyright text is intact. *)
-(* Dr. Dietmar Budelsky, 1998-01-07 *)
(**************************************************************************)
{$I Definition.Inc}
diff --git a/Source/PythonAction.pas b/Source/PythonAction.pas
index c1532fab..60af65e5 100644
--- a/Source/PythonAction.pas
+++ b/Source/PythonAction.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit PythonAction;
interface
diff --git a/Source/PythonEngine.pas b/Source/PythonEngine.pas
index 8b5ccb35..ce17562e 100644
--- a/Source/PythonEngine.pas
+++ b/Source/PythonEngine.pas
@@ -1,56 +1,14 @@
-(**************************************************************************)
-(* *)
-(* Module: Unit 'PythonEngine' Copyright (c) 1997 *)
-(* *)
-(* Dr. Dietmar Budelsky *)
-(* dbudelsky@web.de *)
-(* Germany *)
-(* *)
-(* Morgan Martinet *)
-(* 4723 rue Brebeuf *)
-(* H2J 3L2 MONTREAL (QC) *)
-(* CANADA *)
-(* e-mail: p4d@mmm-experts.com *)
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
(* *)
-(* PyScripter *)
-(* e-mail: pyscripter@gmail.com *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
(* *)
-(* Project page: https://github.com/pyscripter/python4delphi *)
-(**************************************************************************)
-(* Functionality: Delphi Components that provide an interface to the *)
-(* Python language (see python.txt for more infos on *)
-(* Python itself). *)
-(* *)
-(**************************************************************************)
-(* Contributors: *)
-(* Grzegorz Makarewicz (mak@mikroplan.com.pl) *)
-(* Andrew Robinson (andy@hps1.demon.co.uk) *)
-(* Mark Watts(mark_watts@hotmail.com) *)
-(* Olivier Deckmyn (olivier.deckmyn@mail.dotcom.fr) *)
-(* Sigve Tjora (public@tjora.no) *)
-(* Mark Derricutt (mark@talios.com) *)
-(* Igor E. Poteryaev (jah@mail.ru) *)
-(* Yuri Filimonov (fil65@mail.ru) *)
-(* Stefan Hoffmeister (Stefan.Hoffmeister@Econos.de) *)
-(* Michiel du Toit (micdutoit@hsbfn.com) - Lazarus Port *)
-(* Chris Nicolai (nicolaitanes@gmail.com) *)
-(* Andrey Gruzdev (andrey.gruzdev@gmail.com) *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free for his own tasks *)
-(* and projects, as long as this header and its copyright text is intact. *)
-(* For changed versions of this code, which are public distributed the *)
-(* following additional conditions have to be fullfilled: *)
-(* 1) The header has to contain a comment on the change and the author of *)
-(* it. *)
-(* 2) A copy of the changed source has to be sent to the above E-Mail *)
-(* address or my then valid address, if this is possible to the *)
-(* author. *)
-(* The second condition has the target to maintain an up to date central *)
-(* version of the component. If this condition is not acceptable for *)
-(* confidential or legal reasons, everyone is free to derive a component *)
-(* or to generate a diff file to my or other original sources. *)
-(* Dr. Dietmar Budelsky, 1997-11-17 *)
+(* LICENCE and Copyright: MIT (see project home) *)
(**************************************************************************)
{$I Definition.Inc}
@@ -1958,8 +1916,9 @@ TPythonEngine = class(TPythonInterface)
function ArrayToPyDict( const items : array of const) : PPyObject;
function StringsToPyList( strings : TStrings ) : PPyObject;
function StringsToPyTuple( strings : TStrings ) : PPyObject;
- procedure PyListToStrings(list: PPyObject; Strings: TStrings; ClearStrings: Boolean = True);
+ procedure PyListToStrings(list: PPyObject; Strings: TStrings; ClearStrings: Boolean = True);
procedure PyTupleToStrings( tuple: PPyObject; strings : TStrings );
+ function GetSequenceItem( sequence : PPyObject; idx : Integer ) : Variant;
function ReturnNone : PPyObject;
function ReturnTrue : PPyObject;
function ReturnFalse : PPyObject;
@@ -4691,7 +4650,7 @@ procedure TPythonEngine.SetProgramArgs;
for I := 0 to argc do begin
{
... the first entry should refer to the script file to be executed rather
- than the executable hosting the Python interpreter. If there isn’t a
+ than the executable hosting the Python interpreter. If there isn’t a
script that will be run, the first entry in argv can be an empty string.
}
if I = 0 then
@@ -4795,6 +4754,19 @@ function TPythonEngine.GetPythonPath: UnicodeString;
{$ENDIF}
end;
+function TPythonEngine.GetSequenceItem(sequence: PPyObject;
+ idx: Integer): Variant;
+ var
+ val : PPyObject;
+ begin
+ val := PySequence_GetItem( sequence, idx );
+ try
+ Result := PyObjectAsVariant( val );
+ finally
+ Py_XDecRef( val );
+ end;
+end;
+
function TPythonEngine.GetProgramName: UnicodeString;
begin
{$IFDEF POSIX}
@@ -5752,18 +5724,6 @@ function TPythonEngine.PyObjectAsVariant( obj : PPyObject ) : Variant;
end;
end;
- function GetSequenceItem( sequence : PPyObject; idx : Integer ) : Variant;
- var
- val : PPyObject;
- begin
- val := PySequence_GetItem( sequence, idx );
- try
- Result := PyObjectAsVariant( val );
- finally
- Py_XDecRef( val );
- end;
- end;
-
var
i, seq_length : Integer;
begin
@@ -6091,7 +6051,8 @@ function TPythonEngine.PyUnicodeAsString(obj : PPyObject): UnicodeString;
Exit;
// The second argument is the size of the destination (Result) including #0
- NewSize := Utf8ToUnicode(PChar(Result), Cardinal(Size + 1), Buffer, Cardinal(Size));
+ NewSize := Utf8ToUnicode(PWideChar(Result), Cardinal(Size + 1), Buffer, Cardinal(Size));
+
// NewSize includes #0
SetLength(Result, NewSize - 1);
end
@@ -6395,6 +6356,10 @@ constructor TEngineClient.Create( AOwner : TComponent );
destructor TEngineClient.Destroy;
begin
+ // if the client is destroyed before the Python Engine then
+ // we need to finalize it. Otherwise it will already be finalized
+ if FInitialized then
+ Finalize;
Engine := nil; // This detaches the client from the Engine.
if Assigned( FOnDestroy ) then
FOnDestroy( Self );
@@ -8684,7 +8649,8 @@ procedure TPythonType.Initialize;
procedure TPythonType.Finalize;
begin
- Engine.Py_CLEAR(FCreateFunc);
+ if Assigned(Engine) then
+ Engine.Py_CLEAR(FCreateFunc);
FCreateFunc := nil;
inherited;
end;
diff --git a/Source/PythonVersions.pas b/Source/PythonVersions.pas
index 2a596d5d..569ba52f 100644
--- a/Source/PythonVersions.pas
+++ b/Source/PythonVersions.pas
@@ -1,11 +1,17 @@
-{-----------------------------------------------------------------------------
- Unit Name: PythonVersions
- Author: PyScripter
- Purpose: Discover and get info about Python versions
- Part of the Python for Delphi library
-
- History:
------------------------------------------------------------------------------}
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+(* Purpose: Discover and get info about Python versions *)
+(**************************************************************************)
unit PythonVersions;
diff --git a/Source/VarPyth.pas b/Source/VarPyth.pas
index a7310eab..e6df031a 100644
--- a/Source/VarPyth.pas
+++ b/Source/VarPyth.pas
@@ -1,17 +1,14 @@
-{$I Definition.Inc}
-
-unit VarPyth;
-
(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
(* *)
-(* Module: Unit 'VarPyth' Copyright (c) 2001 *)
-(* *)
-(* Version: 1.0 Morgan Martinet *)
-(* Sub-Version: 0.7 4723 rue Brebeuf *)
-(* H2J 3L2 MONTREAL (QC) *)
-(* CANADA *)
-(* e-mail: p4d@mmm-experts.com *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
(**************************************************************************)
(* Functionality: This allows you to use Python objects like COM *)
(* automation objects, inside your Delphi source code. *)
@@ -19,23 +16,10 @@
(* that uses the new custom variant types introduced *)
(* in Delphi6. *)
(**************************************************************************)
-(* Contributors: *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free for his own tasks *)
-(* and projects, as long as this header and its copyright text is intact. *)
-(* For changed versions of this code, which are public distributed the *)
-(* following additional conditions have to be fullfilled: *)
-(* 1) The header has to contain a comment on the change and the author of *)
-(* it. *)
-(* 2) A copy of the changed source has to be sent to the above E-Mail *)
-(* address or my then valid address, if this is possible to the *)
-(* author. *)
-(* The second condition has the target to maintain an up to date central *)
-(* version of the component. If this condition is not acceptable for *)
-(* confidential or legal reasons, everyone is free to derive a component *)
-(* or to generate a diff file to my or other original sources. *)
-(**************************************************************************)
+
+{$I Definition.Inc}
+
+unit VarPyth;
interface
diff --git a/Source/WrapActions.pas b/Source/WrapActions.pas
index ff7ac700..3e527f52 100644
--- a/Source/WrapActions.pas
+++ b/Source/WrapActions.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapActions;
interface
diff --git a/Source/WrapDelphi.pas b/Source/WrapDelphi.pas
index 15cc136f..b3c4e350 100644
--- a/Source/WrapDelphi.pas
+++ b/Source/WrapDelphi.pas
@@ -1,12 +1,19 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
(*-----------------------------------------------------------------------------
- Unit Name: WrapDelphi
- Author: Kiriakos Vlahos
- Date: 24-Feb-2005
Purpose: Provide automatic wrapping of Delphi variables utilising RTTI
- Contributors:
- Morgan Martinet (mmm@free.fr)
-
Features:
Published properties and methods compiled with {$METHODINFO ON} are
handled automatically (Note that METHODINFO can be used only with Delphi7
@@ -3427,6 +3434,7 @@ function TPyDelphiObject.Dir_Wrapper(args: PPyObject): PPyObject;
{$ELSE}
_PropList: PPropList;
_propCount : Integer;
+ i: Integer;
{$ENDIF}
begin
Adjust(@Self);
diff --git a/Source/WrapDelphiClasses.pas b/Source/WrapDelphiClasses.pas
index 9ec04101..5a00f9aa 100644
--- a/Source/WrapDelphiClasses.pas
+++ b/Source/WrapDelphiClasses.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I Definition.Inc}
unit WrapDelphiClasses;
@@ -5,7 +18,8 @@
interface
uses
- Classes, SysUtils, PythonEngine, WrapDelphi;
+ Classes, SysUtils, PythonEngine, WrapDelphi
+ {$IFDEF FPC}, bufstream{$ENDIF};
type
{
@@ -2220,10 +2234,24 @@ TBufferedFileStreamClass = class of TBufferedFileStream;
LArgCount := APythonType.Engine.PyTuple_Size(args);
if (LArgCount = 2) then begin
if (APythonType.Engine.PyArg_ParseTupleAndKeywords(args, kwds, 'sH|i:Create', @LKwArgs1[0], @LFileName, @LMode, @LBufferSize) <> 0) then
+ {$IFDEF FPC}
+ begin
+ DelphiObject := TBufferedFileStreamClass(DelphiObjectClass).Create(String(LFileName), LMode);
+ DelphiObject.Size:= LBufferSize;
+ end;
+ {$ELSE}
DelphiObject := TBufferedFileStreamClass(DelphiObjectClass).Create(String(LFileName), LMode, LBufferSize);
+ {$ENDIF}
end else if (LArgCount = 3) then begin
if (APythonType.Engine.PyArg_ParseTupleAndKeywords(args, kwds, 'sHI|i:Create', @LKwArgs2[0], @LFileName, @LMode, @LRights, @LBufferSize) <> 0) then
+ {$IFDEF FPC}
+ begin
+ DelphiObject := TBufferedFileStreamClass(DelphiObjectClass).Create(String(LFileName), LMode, LRights);
+ DelphiObject.Size:= LBufferSize;
+ end;
+ {$ELSE}
DelphiObject := TBufferedFileStreamClass(DelphiObjectClass).Create(String(LFileName), LMode, LRights, LBufferSize);
+ {$ENDIF}
end;
//Maybe it was created on the next attempt...
@@ -2385,14 +2413,14 @@ TResourceStreamClass = class of TResourceStream;
{$ELSE}
if APythonType.Engine.PyArg_ParseTuple(args, 'Iss:Create', @LHandle, @LResName, @LResType) <> 0 then
{$ENDIF}
- DelphiObject := TResourceStreamClass(DelphiObjectClass).Create(LHandle, String(LResName), PWideChar(String(LResType)))
+ DelphiObject := TResourceStreamClass(DelphiObjectClass).Create(LHandle, String(LResName), PChar(String(LResType)))
else
{$IFDEF CPUX64}
if APythonType.Engine.PyArg_ParseTuple(args, 'Kis:Create', @LHandle, @LResId, @LResType) <> 0 then
{$ELSE}
if APythonType.Engine.PyArg_ParseTuple(args, 'Iis:Create', @LHandle, @LResId, @LResType) <> 0 then
{$ENDIF}
- DelphiObject := TResourceStreamClass(DelphiObjectClass).CreateFromID(LHandle, LResId, PWideChar(String(LResType)));
+ DelphiObject := TResourceStreamClass(DelphiObjectClass).CreateFromID(LHandle, LResId, PChar(String(LResType)));
except
on E: Exception do
with GetPythonEngine do
diff --git a/Source/WrapDelphiDataBind.pas b/Source/WrapDelphiDataBind.pas
index 01dd5fb3..2d2938cb 100644
--- a/Source/WrapDelphiDataBind.pas
+++ b/Source/WrapDelphiDataBind.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapDelphiDataBind;
interface
diff --git a/Source/WrapDelphiImageList.pas b/Source/WrapDelphiImageList.pas
index 29f2635c..0017847c 100644
--- a/Source/WrapDelphiImageList.pas
+++ b/Source/WrapDelphiImageList.pas
@@ -1,3 +1,15 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
{$I Definition.Inc}
unit WrapDelphiImageList;
diff --git a/Source/WrapDelphiTypes.pas b/Source/WrapDelphiTypes.pas
index 451f3e2c..76c22c85 100644
--- a/Source/WrapDelphiTypes.pas
+++ b/Source/WrapDelphiTypes.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I Definition.Inc}
unit WrapDelphiTypes;
@@ -10,9 +23,9 @@ interface
PythonEngine,
Types,
WrapDelphi
- {$IFDEF DELPHI10_OR_HIGHER}
+ {$IFNDEF FPC}
, System.UITypes
- {$ENDIF DELPHI10_OR_HIGHER}
+ {$ENDIF FPC}
;
type
@@ -99,9 +112,9 @@ TPyDelphiSize = class(TPyObject)
function CheckRectAttribute(AAttribute : PPyObject; const AAttributeName : string; out AValue : TRect) : Boolean;
function CheckSizeAttribute(AAttribute : PPyObject; const AAttributeName : string; out AValue : TSize) : Boolean;
- {$IFDEF DELPHI10_OR_HIGHER}
+ {$IFNDEF FPC}
function MouseButtonToPython(const AMouseButton: TMouseButton): PPyObject;
- {$ENDIF DELPHI10_OR_HIGHER}
+ {$ENDIF FPC}
implementation
@@ -122,7 +135,7 @@ TTypesRegistration = class(TRegisteredUnit)
procedure TTypesRegistration.DefineVars(APyDelphiWrapper: TPyDelphiWrapper);
begin
inherited;
- {$IFDEF DELPHI10_OR_HIGHER}
+ {$IFNDEF FPC}
APyDelphiWrapper.DefineVar('crDefault', crDefault);
APyDelphiWrapper.DefineVar('crNone', crNone);
APyDelphiWrapper.DefineVar('crArrow', crArrow);
@@ -146,7 +159,7 @@ procedure TTypesRegistration.DefineVars(APyDelphiWrapper: TPyDelphiWrapper);
APyDelphiWrapper.DefineVar('crHelp', crHelp);
APyDelphiWrapper.DefineVar('crHandPoint', crHandPoint);
APyDelphiWrapper.DefineVar('crSizeAll', crSizeAll);
- {$ENDIF DELPHI10_OR_HIGHER}
+ {$ENDIF FPC}
end;
function TTypesRegistration.Name: string;
@@ -162,13 +175,13 @@ procedure TTypesRegistration.RegisterWrappers(APyDelphiWrapper: TPyDelphiWrapper
APyDelphiWrapper.RegisterHelperType(TPyDelphiSize);
end;
-{$IFDEF DELPHI10_OR_HIGHER}
+{$IFNDEF FPC}
function MouseButtonToPython(const AMouseButton: TMouseButton): PPyObject;
begin
Result := GetPythonEngine.PyUnicodeFromString(
TRttiEnumerationType.GetName(AMouseButton));
end;
-{$ENDIF DELPHI10_OR_HIGHER}
+{$ENDIF FPC}
{ Helper functions }
diff --git a/Source/WrapDelphiWindows.pas b/Source/WrapDelphiWindows.pas
index 1ce14454..102a1724 100644
--- a/Source/WrapDelphiWindows.pas
+++ b/Source/WrapDelphiWindows.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I Definition.Inc}
unit WrapDelphiWindows;
diff --git a/Source/WrapFireDAC.pas b/Source/WrapFireDAC.pas
index 195a1e45..eefa7af9 100644
--- a/Source/WrapFireDAC.pas
+++ b/Source/WrapFireDAC.pas
@@ -1,9 +1,19 @@
-{$REGION 'Licence'}
-{
- Wrapper classes for FireDAC TFDTable and TFDQuery
- Original Code by https://github.com/hartmutdavid
-==============================================================================}
-{$ENDREGION}
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+(* Wrapper classes for FireDAC TFDTable and TFDQuery *)
+(* Original Code by https://github.com/hartmutdavid *)
+(**************************************************************************)
+
unit WrapFireDAC;
interface
diff --git a/Source/fmx/FMX.PythonGUIInputOutput.pas b/Source/fmx/FMX.PythonGUIInputOutput.pas
index 36aa61c1..2d90884f 100644
--- a/Source/fmx/FMX.PythonGUIInputOutput.pas
+++ b/Source/fmx/FMX.PythonGUIInputOutput.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit FMX.PythonGUIInputOutput;
diff --git a/Source/fmx/WrapDelphiFmx.pas b/Source/fmx/WrapDelphiFmx.pas
index 5b0e6af6..0bcc5f45 100644
--- a/Source/fmx/WrapDelphiFmx.pas
+++ b/Source/fmx/WrapDelphiFmx.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapDelphiFmx;
interface
diff --git a/Source/fmx/WrapFmxActnList.pas b/Source/fmx/WrapFmxActnList.pas
index 0083be93..bc7278b0 100644
--- a/Source/fmx/WrapFmxActnList.pas
+++ b/Source/fmx/WrapFmxActnList.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxActnList;
diff --git a/Source/fmx/WrapFmxColors.pas b/Source/fmx/WrapFmxColors.pas
index bef6dad8..6a2f90e7 100644
--- a/Source/fmx/WrapFmxColors.pas
+++ b/Source/fmx/WrapFmxColors.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxColors;
interface
diff --git a/Source/fmx/WrapFmxComCtrls.pas b/Source/fmx/WrapFmxComCtrls.pas
index 0093e614..84b92dfa 100644
--- a/Source/fmx/WrapFmxComCtrls.pas
+++ b/Source/fmx/WrapFmxComCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxComCtrls;
diff --git a/Source/fmx/WrapFmxControls.pas b/Source/fmx/WrapFmxControls.pas
index 3ae4a506..ac177c02 100644
--- a/Source/fmx/WrapFmxControls.pas
+++ b/Source/fmx/WrapFmxControls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxControls;
diff --git a/Source/fmx/WrapFmxDataBind.pas b/Source/fmx/WrapFmxDataBind.pas
index 3ad2eef4..6bc3b8b7 100644
--- a/Source/fmx/WrapFmxDataBind.pas
+++ b/Source/fmx/WrapFmxDataBind.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxDataBind;
interface
diff --git a/Source/fmx/WrapFmxDateTime.pas b/Source/fmx/WrapFmxDateTime.pas
index 1fc12e31..7da8b56a 100644
--- a/Source/fmx/WrapFmxDateTime.pas
+++ b/Source/fmx/WrapFmxDateTime.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxDateTime;
interface
diff --git a/Source/fmx/WrapFmxDialogs.pas b/Source/fmx/WrapFmxDialogs.pas
index 059dcd66..6a9b06be 100644
--- a/Source/fmx/WrapFmxDialogs.pas
+++ b/Source/fmx/WrapFmxDialogs.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxDialogs;
diff --git a/Source/fmx/WrapFmxEdit.pas b/Source/fmx/WrapFmxEdit.pas
index 05a0cee5..ac9a11b0 100644
--- a/Source/fmx/WrapFmxEdit.pas
+++ b/Source/fmx/WrapFmxEdit.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxEdit;
diff --git a/Source/fmx/WrapFmxForms.pas b/Source/fmx/WrapFmxForms.pas
index 1dc5fb31..0c63147e 100644
--- a/Source/fmx/WrapFmxForms.pas
+++ b/Source/fmx/WrapFmxForms.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxForms;
diff --git a/Source/fmx/WrapFmxGrids.pas b/Source/fmx/WrapFmxGrids.pas
index 841c75b6..85b680a8 100644
--- a/Source/fmx/WrapFmxGrids.pas
+++ b/Source/fmx/WrapFmxGrids.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxGrids;
interface
diff --git a/Source/fmx/WrapFmxImgList.pas b/Source/fmx/WrapFmxImgList.pas
index c270d456..c9b4c736 100644
--- a/Source/fmx/WrapFmxImgList.pas
+++ b/Source/fmx/WrapFmxImgList.pas
@@ -1,3 +1,15 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
{$I Definition.Inc}
unit WrapFmxImgList;
diff --git a/Source/fmx/WrapFmxLayouts.pas b/Source/fmx/WrapFmxLayouts.pas
index f3433d99..ea7c5178 100644
--- a/Source/fmx/WrapFmxLayouts.pas
+++ b/Source/fmx/WrapFmxLayouts.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxLayouts;
diff --git a/Source/fmx/WrapFmxListBox.pas b/Source/fmx/WrapFmxListBox.pas
index c2c390e4..9bce17f6 100644
--- a/Source/fmx/WrapFmxListBox.pas
+++ b/Source/fmx/WrapFmxListBox.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxListBox;
diff --git a/Source/fmx/WrapFmxListView.pas b/Source/fmx/WrapFmxListView.pas
index bcd49632..10270d4c 100644
--- a/Source/fmx/WrapFmxListView.pas
+++ b/Source/fmx/WrapFmxListView.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxListView;
interface
diff --git a/Source/fmx/WrapFmxMedia.pas b/Source/fmx/WrapFmxMedia.pas
index b884f697..7b1d3fd2 100644
--- a/Source/fmx/WrapFmxMedia.pas
+++ b/Source/fmx/WrapFmxMedia.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxMedia;
diff --git a/Source/fmx/WrapFmxMemo.pas b/Source/fmx/WrapFmxMemo.pas
index 5dcf7295..462f383e 100644
--- a/Source/fmx/WrapFmxMemo.pas
+++ b/Source/fmx/WrapFmxMemo.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxMemo;
interface
diff --git a/Source/fmx/WrapFmxMenus.pas b/Source/fmx/WrapFmxMenus.pas
index 84096ef4..e34bfb62 100644
--- a/Source/fmx/WrapFmxMenus.pas
+++ b/Source/fmx/WrapFmxMenus.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxMenus;
diff --git a/Source/fmx/WrapFmxScrollBox.pas b/Source/fmx/WrapFmxScrollBox.pas
index 8b73b4bf..bb46808e 100644
--- a/Source/fmx/WrapFmxScrollBox.pas
+++ b/Source/fmx/WrapFmxScrollBox.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapFmxScrollBox;
interface
diff --git a/Source/fmx/WrapFmxShapes.pas b/Source/fmx/WrapFmxShapes.pas
index 08607a8f..b098b750 100644
--- a/Source/fmx/WrapFmxShapes.pas
+++ b/Source/fmx/WrapFmxShapes.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxShapes;
diff --git a/Source/fmx/WrapFmxStdActns.pas b/Source/fmx/WrapFmxStdActns.pas
index 7f7eaeed..e28cea86 100644
--- a/Source/fmx/WrapFmxStdActns.pas
+++ b/Source/fmx/WrapFmxStdActns.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxStdActns;
diff --git a/Source/fmx/WrapFmxStdCtrls.pas b/Source/fmx/WrapFmxStdCtrls.pas
index e1af1763..5711db8b 100644
--- a/Source/fmx/WrapFmxStdCtrls.pas
+++ b/Source/fmx/WrapFmxStdCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxStdCtrls;
diff --git a/Source/fmx/WrapFmxStyles.pas b/Source/fmx/WrapFmxStyles.pas
index 36965919..8bd2a761 100644
--- a/Source/fmx/WrapFmxStyles.pas
+++ b/Source/fmx/WrapFmxStyles.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxStyles;
diff --git a/Source/fmx/WrapFmxTypes.pas b/Source/fmx/WrapFmxTypes.pas
index efc3c7f4..68023bf3 100644
--- a/Source/fmx/WrapFmxTypes.pas
+++ b/Source/fmx/WrapFmxTypes.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapFmxTypes;
diff --git a/Source/lcl/Lcl.PythonGUIInputOutput.pas b/Source/lcl/Lcl.PythonGUIInputOutput.pas
index d29e9cbb..f6390ec8 100644
--- a/Source/lcl/Lcl.PythonGUIInputOutput.pas
+++ b/Source/lcl/Lcl.PythonGUIInputOutput.pas
@@ -1,47 +1,18 @@
-{$I ..\Definition.Inc}
-unit Lcl.PythonGUIInputOutput;
-
(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
(* *)
-(* Module: Unit 'PythonGUIInputOutput' Copyright (c) 1997 *)
-(* *)
-(* Dr. Dietmar Budelsky *)
-(* dbudelsky@web.de *)
-(* Germany *)
-(* *)
-(* Morgan Martinet *)
-(* 4723 rue Brebeuf *)
-(* H2J 3L2 MONTREAL (QC) *)
-(* CANADA *)
-(* e-mail: p4d@mmm-experts.com *)
-(* *)
-(* look our page at: http://mmm-experts.com/ *)
-(**************************************************************************)
-(* Functionality: Delphi Components that provide an interface to the *)
-(* Python language (see python.txt for more infos on *)
-(* Python itself). *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
(**************************************************************************)
-(* Contributors: *)
-(* Mark Watts(mark_watts@hotmail.com) *)
-(* Michiel du Toit (micdutoit@hsbfn.com) *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free for his own tasks *)
-(* and projects, as long as this header and its copyright text is intact. *)
-(* For changed versions of this code, which are public distributed the *)
-(* following additional conditions have to be fullfilled: *)
-(* 1) The header has to contain a comment on the change and the author of *)
-(* it. *)
-(* 2) A copy of the changed source has to be sent to the above E-Mail *)
-(* address or my then valid address, if this is possible to the *)
-(* author. *)
-(* The second condition has the target to maintain an up to date central *)
-(* version of the component. If this condition is not acceptable for *)
-(* confidential or legal reasons, everyone is free to derive a component *)
-(* or to generate a diff file to my or other original sources. *)
-(* Dr. Dietmar Budelsky, 1997-11-17 *)
-(**************************************************************************)
+
+{$I ..\Definition.Inc}
+unit Lcl.PythonGUIInputOutput;
interface
diff --git a/Source/vcl/Vcl.PythonGUIInputOutput.pas b/Source/vcl/Vcl.PythonGUIInputOutput.pas
index 4eddaee3..5f800346 100644
--- a/Source/vcl/Vcl.PythonGUIInputOutput.pas
+++ b/Source/vcl/Vcl.PythonGUIInputOutput.pas
@@ -1,47 +1,18 @@
-{$I ..\Definition.Inc}
-unit Vcl.PythonGUIInputOutput;
-
(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
(* *)
-(* Module: Unit 'PythonGUIInputOutput' Copyright (c) 1997 *)
-(* *)
-(* Dr. Dietmar Budelsky *)
-(* dbudelsky@web.de *)
-(* Germany *)
-(* *)
-(* Morgan Martinet *)
-(* 4723 rue Brebeuf *)
-(* H2J 3L2 MONTREAL (QC) *)
-(* CANADA *)
-(* e-mail: p4d@mmm-experts.com *)
-(* *)
-(* look our page at: http://mmm-experts.com/ *)
-(**************************************************************************)
-(* Functionality: Delphi Components that provide an interface to the *)
-(* Python language (see python.txt for more infos on *)
-(* Python itself). *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
(**************************************************************************)
-(* Contributors: *)
-(* Mark Watts(mark_watts@hotmail.com) *)
-(* Michiel du Toit (micdutoit@hsbfn.com) *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free for his own tasks *)
-(* and projects, as long as this header and its copyright text is intact. *)
-(* For changed versions of this code, which are public distributed the *)
-(* following additional conditions have to be fullfilled: *)
-(* 1) The header has to contain a comment on the change and the author of *)
-(* it. *)
-(* 2) A copy of the changed source has to be sent to the above E-Mail *)
-(* address or my then valid address, if this is possible to the *)
-(* author. *)
-(* The second condition has the target to maintain an up to date central *)
-(* version of the component. If this condition is not acceptable for *)
-(* confidential or legal reasons, everyone is free to derive a component *)
-(* or to generate a diff file to my or other original sources. *)
-(* Dr. Dietmar Budelsky, 1997-11-17 *)
-(**************************************************************************)
+
+{$I ..\Definition.Inc}
+unit Vcl.PythonGUIInputOutput;
interface
diff --git a/Source/vcl/WrapDelphiVCL.pas b/Source/vcl/WrapDelphiVCL.pas
index 3bdd24c4..dd44d169 100644
--- a/Source/vcl/WrapDelphiVCL.pas
+++ b/Source/vcl/WrapDelphiVCL.pas
@@ -1,3 +1,16 @@
+
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
unit WrapDelphiVCL;
{
diff --git a/Source/vcl/WrapVclActnList.pas b/Source/vcl/WrapVclActnList.pas
index 3a0bdf08..0729120a 100644
--- a/Source/vcl/WrapVclActnList.pas
+++ b/Source/vcl/WrapVclActnList.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclActnList;
diff --git a/Source/vcl/WrapVclButtons.pas b/Source/vcl/WrapVclButtons.pas
index cf4e7801..26ebf124 100644
--- a/Source/vcl/WrapVclButtons.pas
+++ b/Source/vcl/WrapVclButtons.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclButtons;
diff --git a/Source/vcl/WrapVclComCtrls.pas b/Source/vcl/WrapVclComCtrls.pas
index f69bffdd..b12d5d3b 100644
--- a/Source/vcl/WrapVclComCtrls.pas
+++ b/Source/vcl/WrapVclComCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclComCtrls;
@@ -1041,6 +1054,7 @@ function TPyDelphiPageControl.GetHitTestInfoAt_Wrapper(
function TPyDelphiPageControl.Get_ActivePage(AContext: Pointer): PPyObject;
begin
+ Adjust(@Self);
Result := Wrap(DelphiObject.ActivePage);
end;
@@ -1054,6 +1068,7 @@ function TPyDelphiPageControl.Get_ActivePageIndex(
{$IFNDEF FPC}
function TPyDelphiPageControl.Get_Canvas(AContext: Pointer): PPyObject;
begin
+ Adjust(@Self);
Result := Wrap(DelphiObject.Canvas);
end;
{$ENDIF FPC}
diff --git a/Source/vcl/WrapVclControls.pas b/Source/vcl/WrapVclControls.pas
index 066ea13f..acc42e23 100644
--- a/Source/vcl/WrapVclControls.pas
+++ b/Source/vcl/WrapVclControls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclControls;
diff --git a/Source/vcl/WrapVclDialogs.pas b/Source/vcl/WrapVclDialogs.pas
index fc0a137e..8d7c88a9 100644
--- a/Source/vcl/WrapVclDialogs.pas
+++ b/Source/vcl/WrapVclDialogs.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclDialogs;
diff --git a/Source/vcl/WrapVclExtCtrls.pas b/Source/vcl/WrapVclExtCtrls.pas
index 8fcbae88..85c5b4d3 100644
--- a/Source/vcl/WrapVclExtCtrls.pas
+++ b/Source/vcl/WrapVclExtCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclExtCtrls;
diff --git a/Source/vcl/WrapVclForms.pas b/Source/vcl/WrapVclForms.pas
index f250c28a..ad62a6cf 100644
--- a/Source/vcl/WrapVclForms.pas
+++ b/Source/vcl/WrapVclForms.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclForms;
@@ -1045,9 +1058,9 @@ class procedure TPyDelphiScreen.RegisterGetSets(PythonType: TPythonType);
AddGetSet('DesktopRect', @TPyDelphiScreen.Get_DesktopRect, nil,
'Specifies the boundaries of the virtual desktop relative to the upper-left corner of the primary monitor.', nil);
AddGetSet('DesktopLeft', @TPyDelphiScreen.Get_DesktopLeft, nil,
- 'Specifies the x-coordinate of the desktop’s left edge relative to the upper-left corner of the primary monitor.', nil);
+ 'Specifies the x-coordinate of the desktop’s left edge relative to the upper-left corner of the primary monitor.', nil);
AddGetSet('DesktopTop', @TPyDelphiScreen.Get_DesktopTop, nil,
- 'Specifies the y-coordinate of the entire desktop’s top edge relative to the upper-left corner of the primary monitor.', nil);
+ 'Specifies the y-coordinate of the entire desktop’s top edge relative to the upper-left corner of the primary monitor.', nil);
{$ENDIF FPC}
AddGetSet('DesktopWidth', @TPyDelphiScreen.Get_DesktopWidth, nil,
'Specifies the width of the entire virtual desktop.', nil);
@@ -1109,7 +1122,7 @@ class procedure TPyDelphiScreen.RegisterMethods(PythonType: TPythonType);
'Allows forms to be aligned in the screen.');
PythonType.AddMethod('Realign', @TPyDelphiScreen.Realign_Wrapper,
'TScreen.Realign()'#10 +
- 'Realigns the screen’s forms according to their Align properties.');
+ 'Realigns the screen’s forms according to their Align properties.');
PythonType.AddMethod('ResetFonts', @TPyDelphiScreen.ResetFonts_Wrapper,
'TScreen.ResetFonts()'#10 +
'Reinitializes the fonts listed in the Fonts property.');
@@ -1401,7 +1414,7 @@ class procedure TPyDelphiMonitor.RegisterGetSets(PythonType: TPythonType);
AddGetSet('Handle', @TPyDelphiMonitor.Get_Handle, nil,
'Indicates the Windows handle for the monitor.', nil);
AddGetSet('MonitorNum', @TPyDelphiMonitor.Get_MonitorNum, nil,
- 'Specifies the index of the monitor in the global screen object’s Monitors list.', nil);
+ 'Specifies the index of the monitor in the global screen object’s Monitors list.', nil);
AddGetSet('Left', @TPyDelphiMonitor.Get_Left, nil,
'Indicates the logical position of the left edge of the monitor.', nil);
AddGetSet('Height', @TPyDelphiMonitor.Get_Height, nil,
@@ -1795,7 +1808,7 @@ class procedure TPyDelphiApplication.RegisterGetSets(
AddGetSet('HintHidePause', @TPyDelphiApplication.Get_HintHidePause, @TPyDelphiApplication.Set_HintHidePause,
'Specifies the time interval to wait before hiding the Help Hint if the mouse has not moved from the control or menu item.', nil);
AddGetSet('HintShortCuts', @TPyDelphiApplication.Get_HintShortCuts, @TPyDelphiApplication.Set_HintShortCuts,
- 'Specifies whether the application’s pop-up hints include shortcut information.', nil);
+ 'Specifies whether the application’s pop-up hints include shortcut information.', nil);
AddGetSet('HintShortPause', @TPyDelphiApplication.Get_HintShortPause, @TPyDelphiApplication.Set_HintShortPause,
'Specifies the time period to wait before bringing up a hint if another hint has already been shown.', nil);
AddGetSet('Icon', @TPyDelphiApplication.Get_Icon, @TPyDelphiApplication.Set_Icon,
diff --git a/Source/vcl/WrapVclGraphics.pas b/Source/vcl/WrapVclGraphics.pas
index 3771c8b6..8859d75a 100644
--- a/Source/vcl/WrapVclGraphics.pas
+++ b/Source/vcl/WrapVclGraphics.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclGraphics;
diff --git a/Source/vcl/WrapVclGrids.pas b/Source/vcl/WrapVclGrids.pas
index 46410f66..0d74cf7e 100644
--- a/Source/vcl/WrapVclGrids.pas
+++ b/Source/vcl/WrapVclGrids.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclGrids;
@@ -717,7 +730,7 @@ function TPyDelphiStringGrid.SetCell(args: PPyObject): PPyObject;
with GetPythonEngine do begin
// adjust the transmitted self argument
Adjust(@Self);
- if PyArg_ParseTuple( args, 'iiO:GetCell',@col, @row, @value ) <> 0 then
+ if PyArg_ParseTuple( args, 'iiO:SetCell',@col, @row, @value ) <> 0 then
begin
DelphiObject.Cells[col, row]:= PyObjectAsString(value);
result:=ReturnNone;
diff --git a/Source/vcl/WrapVclImgList.pas b/Source/vcl/WrapVclImgList.pas
index d10ab0d8..5b807953 100644
--- a/Source/vcl/WrapVclImgList.pas
+++ b/Source/vcl/WrapVclImgList.pas
@@ -1,3 +1,15 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
{$I Definition.Inc}
unit WrapVclImgList;
diff --git a/Source/vcl/WrapVclMedia.pas b/Source/vcl/WrapVclMedia.pas
index 30f5706d..f8ee1d55 100644
--- a/Source/vcl/WrapVclMedia.pas
+++ b/Source/vcl/WrapVclMedia.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclMedia;
diff --git a/Source/vcl/WrapVclMenus.pas b/Source/vcl/WrapVclMenus.pas
index 8a755c75..30e49f1b 100644
--- a/Source/vcl/WrapVclMenus.pas
+++ b/Source/vcl/WrapVclMenus.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclMenus;
diff --git a/Source/vcl/WrapVclSamplesSpin.pas b/Source/vcl/WrapVclSamplesSpin.pas
index 98d9b0e7..859ad414 100644
--- a/Source/vcl/WrapVclSamplesSpin.pas
+++ b/Source/vcl/WrapVclSamplesSpin.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclSamplesSpin;
diff --git a/Source/vcl/WrapVclStdCtrls.pas b/Source/vcl/WrapVclStdCtrls.pas
index 07e11f57..c0e9e234 100644
--- a/Source/vcl/WrapVclStdCtrls.pas
+++ b/Source/vcl/WrapVclStdCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclStdCtrls;
diff --git a/Source/vcl/WrapVclThemes.pas b/Source/vcl/WrapVclThemes.pas
index f77b49ee..a5c3a850 100644
--- a/Source/vcl/WrapVclThemes.pas
+++ b/Source/vcl/WrapVclThemes.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclThemes;
diff --git a/Source/vcl/WrapVclWinXCtrls.pas b/Source/vcl/WrapVclWinXCtrls.pas
index fd027c70..5d7c4bc6 100644
--- a/Source/vcl/WrapVclWinXCtrls.pas
+++ b/Source/vcl/WrapVclWinXCtrls.pas
@@ -1,3 +1,16 @@
+(**************************************************************************)
+(* This unit is part of the Python for Delphi (P4D) library *)
+(* Project home: https://github.com/pyscripter/python4delphi *)
+(* *)
+(* Project Maintainer: PyScripter (pyscripter@gmail.com) *)
+(* Original Authors: Dr. Dietmar Budelsky (dbudelsky@web.de) *)
+(* Morgan Martinet (https://github.com/mmm-experts) *)
+(* Core developer: Lucas Belo (lucas.belo@live.com) *)
+(* Contributors: See contributors.md at project home *)
+(* *)
+(* LICENCE and Copyright: MIT (see project home) *)
+(**************************************************************************)
+
{$I ..\Definition.Inc}
unit WrapVclWinXCtrls;
diff --git a/Tests/FMX/Android/WrapDelphiTest.pas b/Tests/FMX/Android/WrapDelphiTest.pas
index 2535d77f..6e73312e 100644
--- a/Tests/FMX/Android/WrapDelphiTest.pas
+++ b/Tests/FMX/Android/WrapDelphiTest.pas
@@ -1,534 +1,534 @@
-(**************************************************************************)
-(* *)
-(* Module: Unit 'WrapDelphiTest' Copyright (c) 2021 *)
-(* *)
-(* Lucas Moura Belo - lmbelo *)
-(* lucas.belo@live.com *)
-(* BH, Brazil *)
-(* *)
-(* PyScripter *)
-(* e-mail: pyscripter@gmail.com *)
-(* *)
-(* Project pages: https://github.com/Embarcadero/python4delphi *)
-(* https://github.com/pyscripter/python4delphi *)
-(**************************************************************************)
-(* Functionality: Test unit for WrapDelphi module *)
-(* *)
-(* *)
-(**************************************************************************)
-(* This source code is distributed with no WARRANTY, for no reason or use.*)
-(* Everyone is allowed to use and change this code free for his own tasks *)
-(* and projects, as long as this header and its copyright text is intact. *)
-(* For changed versions of this code, which are public distributed the *)
-(* following additional conditions have to be fullfilled: *)
-(* 1) The header has to contain a comment on the change and the author of *)
-(* it. *)
-(* 2) A copy of the changed source has to be sent to the above E-Mail *)
-(* address or my then valid address, if this is possible to the *)
-(* author. *)
-(* The second condition has the target to maintain an up to date central *)
-(* version of the component. If this condition is not acceptable for *)
-(* confidential or legal reasons, everyone is free to derive a component *)
-(* or to generate a diff file to my or other original sources. *)
-(**************************************************************************)
-
-unit WrapDelphiTest;
-
-interface
-
-uses
- Types,
- DUnitX.TestFramework,
- PythonEngine,
- WrapDelphi;
-
-type
- TFruit = (Apple, Banana, Orange);
- TFruits = set of TFruit;
-
- {$M+}
- ITestInterface = interface(IInterface)
- ['{AD50ADF2-2691-47CA-80AB-07AF1EDA8C89}']
- procedure SetString(const S: string);
- function GetString: string;
- end;
- {$M-}
-
- TSubRecord = record
- DoubleField: double;
- end;
-
- TTestRecord = record
- StringField: string;
- SubRecord: TSubRecord;
- procedure SetStringField(S: string);
- end;
-
- TFruitDynArray = TArray;
- TStaticArray = array[0..999] of Int64;
- TTestRttiAccess = class
- private
- FFruit: TFruit;
- FFruits: TFruits;
- public
- FruitField :TFruit;
- FruitsField: TFruits;
- StringField: string;
- DoubleField: double;
- ObjectField: TObject;
- RecordField: TTestRecord;
- InterfaceField: ITestInterface;
- function GetData: TObject;
- procedure BuyFruits(AFruits: TFruits);
- procedure SellFruits(const AFruits: TFruitDynArray);
- procedure SellFruitsInt(const AFruits:TIntegerDynArray);
- function GetDynArray: TInt64DynArray;
- function GetStaticArray: TStaticArray;
- property Fruit: TFruit read FFruit write FFruit;
- property Fruits: TFruits read FFruits write FFruits;
- function SetStringField(var Value: Integer): string; overload;
- function SetStringField(const Value: string): string; overload;
- procedure PassVariantArray(const Value: Variant);
- end;
-
- TTestInterfaceImpl = class(TInterfacedObject, ITestInterface)
- private
- FString: string;
- procedure SetString(const S: string);
- function GetString: string;
- end;
-
- [TestFixture]
- TTestWrapDelphi = class(TObject)
- private
- FPythonEngine: TPythonEngine;
- DelphiModule: TPythonModule;
- PyDelphiWrapper: TPyDelphiWrapper;
- Rtti_Var: Variant;
- TestRttiAccess: TTestRttiAccess;
- Rec: TTestRecord;
- Rtti_Rec: Variant;
- FTestInterface: ITestInterface;
- Rtti_Interface: Variant;
- public
- [SetupFixture]
- procedure SetupFixture;
- [TearDownFixture]
- procedure TearDownFixture;
- [Test]
- procedure TestEnumProperty;
- [Test]
- procedure TestSetProperty;
- [Test]
- procedure TestDoubleField;
- [Test]
- procedure TestEnumField;
- [Test]
- procedure TestSetField;
- [Test]
- procedure TestStringField;
- [Test]
- procedure TestSetProps;
- [Test]
- procedure TestObjectField;
- [Test]
- procedure TestMethodCall;
- [Test]
- procedure TestRecord;
- [Test]
- procedure TestRecordField;
- [Test]
- procedure TestInterface;
- [Test]
- procedure TestInterfaceField;
- [Test]
- procedure TestDynArrayParameters;
- [Test]
- procedure TestGetDynArray;
- [Test]
- procedure TestGetStaticArray;
- [Test]
- procedure TestMethodWithVarAndOverload;
- [Test]
- procedure TestFreeReturnedObject;
- [Test]
- procedure TestPassVariantArray;
- end;
-
-implementation
-
-Uses
- System.SysUtils,
- System.Variants,
- System.Classes,
- System.Rtti,
- VarPyth,
- WrapDelphiClasses,
- PythonLoad;
-
-
-{ TTestRTTIAccess }
-
-procedure TTestRttiAccess.BuyFruits(AFruits: TFruits);
-begin
- Fruits := AFruits;
-end;
-
-{ TTestWrapDelphi }
-
-procedure TTestWrapDelphi.TestFreeReturnedObject;
-begin
- FPythonEngine.ExecString(
- 'from delphi import rtti_var' + sLineBreak +
- 'obj = rtti_var.GetData()' + sLineBreak +
- 'obj.Free()'
- );
- Assert.Pass;
-end;
-
-procedure TTestWrapDelphi.SetupFixture;
-var
- Py : PPyObject;
-begin
- FPythonEngine := TPythonEngine.Create(nil);
- FPythonEngine.Name := 'PythonEngine';
- TPythonLoad.Configure(FPythonEngine);
-
- DelphiModule := TPythonModule.Create(nil);
-
- DelphiModule.Name := 'DelphiModule';
- DelphiModule.Engine := FPythonEngine;
- DelphiModule.ModuleName := 'delphi';
-
- PyDelphiWrapper := TPyDelphiWrapper.Create(nil);
-
- PyDelphiWrapper.Name := 'PyDelphiWrapper';
- PyDelphiWrapper.Engine := FPythonEngine;
- PyDelphiWrapper.Module := DelphiModule;
-
- FPythonEngine.LoadDll;
- // Then wrap the an instance our TTestRTTIAccess
- // It will allow us to to test access to public fields and methods as well
- // public (as well as published) properties.
- // This time we would like the object to be destroyed when the PyObject
- // is destroyed, so we need to set its Owned property to True;
- TestRttiAccess := TTestRTTIAccess.Create;
- TestRttiAccess.InterfaceField := TTestInterfaceImpl.Create;
- Py := PyDelphiWrapper.Wrap(TestRttiAccess, TObjectOwnership.soReference);
- DelphiModule.SetVar('rtti_var', Py);
- FPythonEngine.Py_DecRef(Py);
- Py := PyDelphiWrapper.WrapRecord(@Rec, TRttiContext.Create.GetType(TypeInfo(TTestRecord)) as TRttiStructuredType);
- DelphiModule.SetVar('rtti_rec', Py);
- FPythonEngine.Py_DecRef(Py);
- FTestInterface := TTestInterfaceImpl.Create;
- Py := PyDelphiWrapper.WrapInterface(TValue.From(FTestInterface));
- DelphiModule.SetVar('rtti_interface', Py);
- FPythonEngine.Py_DecRef(Py);
- FPythonEngine.ExecString('from delphi import rtti_var, rtti_rec, rtti_interface');
- Rtti_Var := MainModule.rtti_var;
- Rtti_Rec := MainModule.rtti_rec;
- Rtti_Interface := MainModule.rtti_interface;
-end;
-
-procedure TTestWrapDelphi.TearDownFixture;
-begin
- VarClear(Rtti_Var);
- VarClear(Rtti_Rec);
- VarClear(Rtti_Interface);
- FPythonEngine.Free;
- PyDelphiWrapper.Free;
- DelphiModule.Free;
- TestRttiAccess.Free;
-end;
-
-procedure TTestWrapDelphi.TestDoubleField;
-begin
- TestRttiAccess.DoubleField := 3.14;
- Assert.AreEqual(double(TestRttiAccess.DoubleField), double(3.14));
- Rtti_Var.DoubleField := variant(double(1.23)); //implicitly cast to a variant to avoid a bug present in 10.4.2
- Assert.AreEqual(double(Rtti_Var.DoubleField), double(1.23));
-end;
-
-procedure TTestWrapDelphi.TestEnumField;
-begin
- TestRttiAccess.FruitField := Apple;
- Assert.IsTrue(RTTI_var.FruitField = 'Apple');
- Rtti_Var.FruitField := 'Banana';
- Assert.IsTrue(TestRttiAccess.FruitField = Banana);
-end;
-
-procedure TTestWrapDelphi.TestEnumProperty;
-// Enumeration values are converted to/from strings
-begin
- TestRttiAccess.Fruit := Apple;
- Assert.IsTrue(RTTI_var.Fruit = 'Apple');
- Rtti_Var.Fruit := 'Banana';
- Assert.IsTrue(TestRttiAccess.Fruit = Banana);
-end;
-
-procedure TTestWrapDelphi.TestGetDynArray;
-var
- List: Variant;
-begin
- List := Rtti_Var.GetDynArray();
- Assert.IsTrue(VarIsPythonList(List));
- Assert.AreEqual(1000000, Integer(len(List)));
- Assert.AreEqual(Int64(999999), Int64(FPythonEngine.PyObjectAsVariant(FPythonEngine.PyList_GetItem(ExtractPythonObjectFrom(List), 999999))));
-end;
-
-procedure TTestWrapDelphi.TestGetStaticArray;
-var
- List: Variant;
-begin
- List := Rtti_Var.GetStaticArray();
- Assert.IsTrue(VarIsPythonList(List));
- Assert.AreEqual(1000, Integer(len(List)));
- Assert.AreEqual(Int64(999), Int64(FPythonEngine.PyObjectAsVariant(FPythonEngine.PyList_GetItem(ExtractPythonObjectFrom(List), 999))));
-end;
-
-procedure TTestWrapDelphi.TestInterface;
-begin
- Rtti_Interface.SetString('Test');
- Assert.IsTrue(Rtti_Interface.GetString() = 'Test');
-end;
-
-procedure TTestWrapDelphi.TestInterfaceField;
-begin
- Rtti_Interface.SetString('New Value');
- Assert.IsTrue(Rtti_Interface.GetString() = 'New Value');
- Rtti_Var.InterfaceField.SetString('Old Value');
- Assert.IsTrue(Rtti_Var.InterfaceField.GetString() = 'Old Value');
- // Assign interface
- Rtti_Var.InterfaceField := Rtti_Interface;
- Assert.IsTrue(Rtti_Var.InterfaceField.GetString() = 'New Value');
- Rtti_Var.InterfaceField := None;
- Assert.IsTrue(VarIsNone(Rtti_Var.InterfaceField));
-end;
-
-procedure TTestWrapDelphi.TestMethodCall;
-begin
- TestRttiAccess.Fruits := [];
- Assert.AreEqual(string(Rtti_Var.Fruits), '[]');
- Rtti_Var.BuyFruits(VarPythonCreate(['Apple', 'Banana'], stList));
- Assert.AreEqual(string(Rtti_Var.Fruits), '[''Apple'', ''Banana'']');
-end;
-
-procedure TTestWrapDelphi.TestObjectField;
-{
- Demonstrating and testing:
- Subclassing Delphi components in Python
- Creating Delphi objects in Python
- Assigning objects to object fields
-}
-Var
- Script: AnsiString;
- myComp: Variant;
-begin
- Script :=
- 'from delphi import Component' + sLineBreak +
- 'class MyComponent(Component):' + SLineBreak +
- ' def __init__(self, Owner):' + SLineBreak +
- ' self._x = None' + SLineBreak +
- '' + SLineBreak +
- ' @property' + SLineBreak +
- ' def x(self):' + SLineBreak +
- ' return self._x' + SLineBreak +
- '' + SLineBreak +
- ' @x.setter' + SLineBreak +
- ' def x(self, value):' + SLineBreak +
- ' self._x = value' + SLineBreak +
- '' + SLineBreak +
- 'myComp = MyComponent(None)';
- ;
-
- FPythonEngine.ExecString(Script);
- myComp := MainModule.myComp;
- // accessing inherited property
- Assert.IsTrue(myComp.Name = '');
- myComp.Name := 'NoName';
- Assert.IsTrue(myComp.Name = 'NoName');
- // accessing subclass property
- myComp.x := variant(double(3.14)); //implicitly cast to a variant to avoid a bug present in 10.4.2
- Assert.IsTrue(myComp.x = 3.14);
-
- // Setting an object field
- rtti_var.ObjectField := myComp;
- Assert.IsTrue(rtti_var.ObjectField.Name = 'NoName');
- Assert.AreEqual(TComponent(TestRttiAccess.ObjectField).Name, 'NoName');
- rtti_var.ObjectField := None;
- Assert.IsTrue(rtti_var.ObjectField = None);
-end;
-
-procedure TTestWrapDelphi.TestPassVariantArray;
-begin
- FPythonEngine.ExecString(
- 'from delphi import rtti_var' + sLineBreak +
- 'rtti_var.PassVariantArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])'
- );
- Assert.Pass;
-end;
-
-procedure TTestWrapDelphi.TestRecord;
-begin
- Rtti_rec.StringField := 'abcd';
- Assert.IsTrue(rtti_rec.StringField = 'abcd');
- Rtti_rec.SetStringField('1234');
- Assert.IsTrue(rtti_rec.StringField = '1234');
- Assert.AreEqual(Rec.StringField, '1234');
- Rtti_rec.SubRecord.DoubleField := variant(double(3.14)); //implicitly cast to a variant to avoid a bug present in 10.4.2
- Assert.IsTrue(rtti_rec.SubRecord.DoubleField = 3.14);
- Assert.AreEqual(Rec.SubRecord.DoubleField, 3.14);
-end;
-
-procedure TTestWrapDelphi.TestRecordField;
-Var
- RecValue: Variant;
-begin
- RecValue := rtti_var.RecordField;
- RecValue.StringField := 'abc';
- rtti_var.RecordField := RecValue;
- Assert.IsTrue(rtti_var.RecordField.StringField = 'abc');
-end;
-
-procedure TTestWrapDelphi.TestSetField;
-// Sets are converted to/from list of strings
-begin
- TestRttiAccess.FruitsField := [];
- Assert.AreEqual(string(Rtti_Var.FruitsField), '[]');
- Rtti_Var.FruitsField := VarPythonCreate(['Apple', 'Banana'], stList);
- Assert.AreEqual(string(Rtti_Var.FruitsField), '[''Apple'', ''Banana'']');
- Assert.IsTrue(TestRttiAccess.FruitsField = [Apple, Banana]);
-end;
-
-procedure TTestWrapDelphi.TestSetProperty;
-begin
- TestRttiAccess.Fruits := [];
- Assert.AreEqual(string(Rtti_Var.Fruits), '[]');
- Rtti_Var.Fruits := VarPythonCreate(['Apple', 'Banana'], stList);
- Assert.AreEqual(string(Rtti_Var.Fruits), '[''Apple'', ''Banana'']');
- Assert.IsTrue(TestRttiAccess.Fruits = [Apple, Banana]);
-end;
-
-procedure TTestWrapDelphi.TestSetProps;
-begin
- rtti_var.SetProps(StringField := 'abc', DoubleField := 1.234);
- Assert.AreEqual(TestRttiAccess.StringField, 'abc');
- Assert.AreEqual(TestRttiAccess.DoubleField, 1.234);
-end;
-
-procedure TTestWrapDelphi.TestStringField;
-begin
- TestRttiAccess.StringField := 'Hi';
- Assert.AreEqual(string(Rtti_Var.StringField), 'Hi');
- Rtti_Var.StringField := 'P4D';
- Assert.AreEqual(TestRttiAccess.StringField, 'P4D');
-end;
-
-procedure TTestWrapDelphi.TestDynArrayParameters;
-{var
- rc: TRttiContext;
- rt: TRttiType;
- rm: TRttiMethod;
- rp: TArray;
- ra: TArray;}
-begin
-{ rc := TRttiContext.Create;
- rt := rc.GetType(TypeInfo(TTestRttiAccess));
- rm := rt.GetMethod('SellFruitsInt');
- rp := rm.GetParameters;
- SetLength(ra, 1);
- ra[0] := TValue.FromArray(TypeInfo(TIntegerDynArray), [TValue.From(0)]);
- rm.Invoke(TestRttiAccess, ra);}
- TestRttiAccess.Fruits := [TFruit.Apple, TFruit.Banana, TFruit.Orange];
- Rtti_Var.SellFruitsInt(VarPythonCreate([0, 1], stList));
- Assert.IsTrue(TestRttiAccess.Fruits = [Orange]);
- TestRttiAccess.Fruits := [TFruit.Apple, TFruit.Banana, TFruit.Orange];
- Rtti_Var.SellFruits(VarPythonCreate([Ord(TFruit.Apple), Ord(TFruit.Banana)], stList));
- Assert.IsTrue(TestRttiAccess.Fruits = [Orange]);
-end;
-
-procedure TTestWrapDelphi.TestMethodWithVarAndOverload;
-begin
- Rtti_Var.SetStringField('test');
- Assert.AreEqual('test', TestRttiAccess.StringField);
-end;
-
-function TTestRttiAccess.SetStringField(const Value: string): string;
-begin
- StringField := Value;
- Result := StringField;
-end;
-
-function TTestRttiAccess.SetStringField(var Value: Integer): string;
-begin
- StringField := IntToStr(Value);
- Result := StringField;
-end;
-
-function TTestRttiAccess.GetData: TObject;
-begin
- Result := TStringList.Create;
-end;
-
-function TTestRttiAccess.GetDynArray: TInt64DynArray;
-var
- I: Integer;
-begin
- SetLength(Result, 1000000);
- for I := 0 to Length(Result) - 1 do
- Result[I] := I;
-end;
-
-function TTestRttiAccess.GetStaticArray: TStaticArray;
-var
- I: Integer;
-begin
- for I := 0 to Length(Result) - 1 do
- Result[I] := I;
-end;
-
-procedure TTestRttiAccess.PassVariantArray(const Value: Variant);
-begin
- Assert.IsTrue(VarIsArray(Value) and (VarArrayHighBound(Value, 1) = 9));
-end;
-
-procedure TTestRttiAccess.SellFruits(const AFruits: TFruitDynArray);
-var
- Fruit: TFruit;
-begin
- for Fruit in AFruits do
- Exclude(FFruits, Fruit);
-end;
-
-procedure TTestRttiAccess.SellFruitsInt(const AFruits:TIntegerDynArray);
-var
- Fruit: Integer;
-begin
- for Fruit in AFruits do
- Exclude(FFruits, TFruit(Fruit));
-end;
-
-{ TTestRecord }
-
-procedure TTestRecord.SetStringField(S: string);
-begin
- Self.StringField := S;
-end;
-
-{ TTestInterfaceImpl }
-
-function TTestInterfaceImpl.GetString: string;
-begin
- Result := FString;
-end;
-
-procedure TTestInterfaceImpl.SetString(const S: string);
-begin
- FString := S;
-end;
-
-initialization
- TDUnitX.RegisterTestFixture(TTestWrapDelphi);
- ReportMemoryLeaksOnShutdown := True;
-
-end.
+(**************************************************************************)
+(* *)
+(* Module: Unit 'WrapDelphiTest' Copyright (c) 2021 *)
+(* *)
+(* Lucas Moura Belo - lmbelo *)
+(* lucas.belo@live.com *)
+(* BH, Brazil *)
+(* *)
+(* PyScripter *)
+(* e-mail: pyscripter@gmail.com *)
+(* *)
+(* Project pages: https://github.com/Embarcadero/python4delphi *)
+(* https://github.com/pyscripter/python4delphi *)
+(**************************************************************************)
+(* Functionality: Test unit for WrapDelphi module *)
+(* *)
+(* *)
+(**************************************************************************)
+(* This source code is distributed with no WARRANTY, for no reason or use.*)
+(* Everyone is allowed to use and change this code free for his own tasks *)
+(* and projects, as long as this header and its copyright text is intact. *)
+(* For changed versions of this code, which are public distributed the *)
+(* following additional conditions have to be fullfilled: *)
+(* 1) The header has to contain a comment on the change and the author of *)
+(* it. *)
+(* 2) A copy of the changed source has to be sent to the above E-Mail *)
+(* address or my then valid address, if this is possible to the *)
+(* author. *)
+(* The second condition has the target to maintain an up to date central *)
+(* version of the component. If this condition is not acceptable for *)
+(* confidential or legal reasons, everyone is free to derive a component *)
+(* or to generate a diff file to my or other original sources. *)
+(**************************************************************************)
+
+unit WrapDelphiTest;
+
+interface
+
+uses
+ Types,
+ DUnitX.TestFramework,
+ PythonEngine,
+ WrapDelphi;
+
+type
+ TFruit = (Apple, Banana, Orange);
+ TFruits = set of TFruit;
+
+ {$M+}
+ ITestInterface = interface(IInterface)
+ ['{AD50ADF2-2691-47CA-80AB-07AF1EDA8C89}']
+ procedure SetString(const S: string);
+ function GetString: string;
+ end;
+ {$M-}
+
+ TSubRecord = record
+ DoubleField: double;
+ end;
+
+ TTestRecord = record
+ StringField: string;
+ SubRecord: TSubRecord;
+ procedure SetStringField(S: string);
+ end;
+
+ TFruitDynArray = TArray;
+ TStaticArray = array[0..999] of Int64;
+ TTestRttiAccess = class
+ private
+ FFruit: TFruit;
+ FFruits: TFruits;
+ public
+ FruitField :TFruit;
+ FruitsField: TFruits;
+ StringField: string;
+ DoubleField: double;
+ ObjectField: TObject;
+ RecordField: TTestRecord;
+ InterfaceField: ITestInterface;
+ function GetData: TObject;
+ procedure BuyFruits(AFruits: TFruits);
+ procedure SellFruits(const AFruits: TFruitDynArray);
+ procedure SellFruitsInt(const AFruits:TIntegerDynArray);
+ function GetDynArray: TInt64DynArray;
+ function GetStaticArray: TStaticArray;
+ property Fruit: TFruit read FFruit write FFruit;
+ property Fruits: TFruits read FFruits write FFruits;
+ function SetStringField(var Value: Integer): string; overload;
+ function SetStringField(const Value: string): string; overload;
+ procedure PassVariantArray(const Value: Variant);
+ end;
+
+ TTestInterfaceImpl = class(TInterfacedObject, ITestInterface)
+ private
+ FString: string;
+ procedure SetString(const S: string);
+ function GetString: string;
+ end;
+
+ [TestFixture]
+ TTestWrapDelphi = class(TObject)
+ private
+ FPythonEngine: TPythonEngine;
+ DelphiModule: TPythonModule;
+ PyDelphiWrapper: TPyDelphiWrapper;
+ Rtti_Var: Variant;
+ TestRttiAccess: TTestRttiAccess;
+ Rec: TTestRecord;
+ Rtti_Rec: Variant;
+ FTestInterface: ITestInterface;
+ Rtti_Interface: Variant;
+ public
+ [SetupFixture]
+ procedure SetupFixture;
+ [TearDownFixture]
+ procedure TearDownFixture;
+ [Test]
+ procedure TestEnumProperty;
+ [Test]
+ procedure TestSetProperty;
+ [Test]
+ procedure TestDoubleField;
+ [Test]
+ procedure TestEnumField;
+ [Test]
+ procedure TestSetField;
+ [Test]
+ procedure TestStringField;
+ [Test]
+ procedure TestSetProps;
+ [Test]
+ procedure TestObjectField;
+ [Test]
+ procedure TestMethodCall;
+ [Test]
+ procedure TestRecord;
+ [Test]
+ procedure TestRecordField;
+ [Test]
+ procedure TestInterface;
+ [Test]
+ procedure TestInterfaceField;
+ [Test]
+ procedure TestDynArrayParameters;
+ [Test]
+ procedure TestGetDynArray;
+ [Test]
+ procedure TestGetStaticArray;
+ [Test]
+ procedure TestMethodWithVarAndOverload;
+ [Test]
+ procedure TestFreeReturnedObject;
+ [Test]
+ procedure TestPassVariantArray;
+ end;
+
+implementation
+
+Uses
+ System.SysUtils,
+ System.Variants,
+ System.Classes,
+ System.Rtti,
+ VarPyth,
+ WrapDelphiClasses,
+ PythonLoad;
+
+
+{ TTestRTTIAccess }
+
+procedure TTestRttiAccess.BuyFruits(AFruits: TFruits);
+begin
+ Fruits := AFruits;
+end;
+
+{ TTestWrapDelphi }
+
+procedure TTestWrapDelphi.TestFreeReturnedObject;
+begin
+ FPythonEngine.ExecString(
+ 'from delphi import rtti_var' + sLineBreak +
+ 'obj = rtti_var.GetData()' + sLineBreak +
+ 'obj.Free()'
+ );
+ Assert.Pass;
+end;
+
+procedure TTestWrapDelphi.SetupFixture;
+var
+ Py : PPyObject;
+begin
+ FPythonEngine := TPythonEngine.Create(nil);
+ FPythonEngine.Name := 'PythonEngine';
+ TPythonLoad.Configure(FPythonEngine);
+
+ DelphiModule := TPythonModule.Create(nil);
+
+ DelphiModule.Name := 'DelphiModule';
+ DelphiModule.Engine := FPythonEngine;
+ DelphiModule.ModuleName := 'delphi';
+
+ PyDelphiWrapper := TPyDelphiWrapper.Create(nil);
+
+ PyDelphiWrapper.Name := 'PyDelphiWrapper';
+ PyDelphiWrapper.Engine := FPythonEngine;
+ PyDelphiWrapper.Module := DelphiModule;
+
+ FPythonEngine.LoadDll;
+ // Then wrap the an instance our TTestRTTIAccess
+ // It will allow us to to test access to public fields and methods as well
+ // public (as well as published) properties.
+ // This time we would like the object to be destroyed when the PyObject
+ // is destroyed, so we need to set its Owned property to True;
+ TestRttiAccess := TTestRTTIAccess.Create;
+ TestRttiAccess.InterfaceField := TTestInterfaceImpl.Create;
+ Py := PyDelphiWrapper.Wrap(TestRttiAccess, TObjectOwnership.soReference);
+ DelphiModule.SetVar('rtti_var', Py);
+ FPythonEngine.Py_DecRef(Py);
+ Py := PyDelphiWrapper.WrapRecord(@Rec, TRttiContext.Create.GetType(TypeInfo(TTestRecord)) as TRttiStructuredType);
+ DelphiModule.SetVar('rtti_rec', Py);
+ FPythonEngine.Py_DecRef(Py);
+ FTestInterface := TTestInterfaceImpl.Create;
+ Py := PyDelphiWrapper.WrapInterface(TValue.From(FTestInterface));
+ DelphiModule.SetVar('rtti_interface', Py);
+ FPythonEngine.Py_DecRef(Py);
+ FPythonEngine.ExecString('from delphi import rtti_var, rtti_rec, rtti_interface');
+ Rtti_Var := MainModule.rtti_var;
+ Rtti_Rec := MainModule.rtti_rec;
+ Rtti_Interface := MainModule.rtti_interface;
+end;
+
+procedure TTestWrapDelphi.TearDownFixture;
+begin
+ VarClear(Rtti_Var);
+ VarClear(Rtti_Rec);
+ VarClear(Rtti_Interface);
+ FPythonEngine.Free;
+ PyDelphiWrapper.Free;
+ DelphiModule.Free;
+ TestRttiAccess.Free;
+end;
+
+procedure TTestWrapDelphi.TestDoubleField;
+begin
+ TestRttiAccess.DoubleField := 3.14;
+ Assert.AreEqual(double(TestRttiAccess.DoubleField), double(3.14));
+ Rtti_Var.DoubleField := variant(double(1.23)); //implicitly cast to a variant to avoid a bug present in 10.4.2
+ Assert.AreEqual(double(Rtti_Var.DoubleField), double(1.23));
+end;
+
+procedure TTestWrapDelphi.TestEnumField;
+begin
+ TestRttiAccess.FruitField := Apple;
+ Assert.IsTrue(RTTI_var.FruitField = 'Apple');
+ Rtti_Var.FruitField := 'Banana';
+ Assert.IsTrue(TestRttiAccess.FruitField = Banana);
+end;
+
+procedure TTestWrapDelphi.TestEnumProperty;
+// Enumeration values are converted to/from strings
+begin
+ TestRttiAccess.Fruit := Apple;
+ Assert.IsTrue(RTTI_var.Fruit = 'Apple');
+ Rtti_Var.Fruit := 'Banana';
+ Assert.IsTrue(TestRttiAccess.Fruit = Banana);
+end;
+
+procedure TTestWrapDelphi.TestGetDynArray;
+var
+ List: Variant;
+begin
+ List := Rtti_Var.GetDynArray();
+ Assert.IsTrue(VarIsPythonList(List));
+ Assert.AreEqual(1000000, Integer(len(List)));
+ Assert.AreEqual(Int64(999999), Int64(FPythonEngine.PyObjectAsVariant(FPythonEngine.PyList_GetItem(ExtractPythonObjectFrom(List), 999999))));
+end;
+
+procedure TTestWrapDelphi.TestGetStaticArray;
+var
+ List: Variant;
+begin
+ List := Rtti_Var.GetStaticArray();
+ Assert.IsTrue(VarIsPythonList(List));
+ Assert.AreEqual(1000, Integer(len(List)));
+ Assert.AreEqual(Int64(999), Int64(FPythonEngine.PyObjectAsVariant(FPythonEngine.PyList_GetItem(ExtractPythonObjectFrom(List), 999))));
+end;
+
+procedure TTestWrapDelphi.TestInterface;
+begin
+ Rtti_Interface.SetString('Test');
+ Assert.IsTrue(Rtti_Interface.GetString() = 'Test');
+end;
+
+procedure TTestWrapDelphi.TestInterfaceField;
+begin
+ Rtti_Interface.SetString('New Value');
+ Assert.IsTrue(Rtti_Interface.GetString() = 'New Value');
+ Rtti_Var.InterfaceField.SetString('Old Value');
+ Assert.IsTrue(Rtti_Var.InterfaceField.GetString() = 'Old Value');
+ // Assign interface
+ Rtti_Var.InterfaceField := Rtti_Interface;
+ Assert.IsTrue(Rtti_Var.InterfaceField.GetString() = 'New Value');
+ Rtti_Var.InterfaceField := None;
+ Assert.IsTrue(VarIsNone(Rtti_Var.InterfaceField));
+end;
+
+procedure TTestWrapDelphi.TestMethodCall;
+begin
+ TestRttiAccess.Fruits := [];
+ Assert.AreEqual(string(Rtti_Var.Fruits), '[]');
+ Rtti_Var.BuyFruits(VarPythonCreate(['Apple', 'Banana'], stList));
+ Assert.AreEqual(string(Rtti_Var.Fruits), '[''Apple'', ''Banana'']');
+end;
+
+procedure TTestWrapDelphi.TestObjectField;
+{
+ Demonstrating and testing:
+ Subclassing Delphi components in Python
+ Creating Delphi objects in Python
+ Assigning objects to object fields
+}
+Var
+ Script: AnsiString;
+ myComp: Variant;
+begin
+ Script :=
+ 'from delphi import Component' + sLineBreak +
+ 'class MyComponent(Component):' + SLineBreak +
+ ' def __init__(self, Owner):' + SLineBreak +
+ ' self._x = None' + SLineBreak +
+ '' + SLineBreak +
+ ' @property' + SLineBreak +
+ ' def x(self):' + SLineBreak +
+ ' return self._x' + SLineBreak +
+ '' + SLineBreak +
+ ' @x.setter' + SLineBreak +
+ ' def x(self, value):' + SLineBreak +
+ ' self._x = value' + SLineBreak +
+ '' + SLineBreak +
+ 'myComp = MyComponent(None)';
+ ;
+
+ FPythonEngine.ExecString(Script);
+ myComp := MainModule.myComp;
+ // accessing inherited property
+ Assert.IsTrue(myComp.Name = '');
+ myComp.Name := 'NoName';
+ Assert.IsTrue(myComp.Name = 'NoName');
+ // accessing subclass property
+ myComp.x := variant(double(3.14)); //implicitly cast to a variant to avoid a bug present in 10.4.2
+ Assert.IsTrue(myComp.x = 3.14);
+
+ // Setting an object field
+ rtti_var.ObjectField := myComp;
+ Assert.IsTrue(rtti_var.ObjectField.Name = 'NoName');
+ Assert.AreEqual(TComponent(TestRttiAccess.ObjectField).Name, 'NoName');
+ rtti_var.ObjectField := None;
+ Assert.IsTrue(rtti_var.ObjectField = None);
+end;
+
+procedure TTestWrapDelphi.TestPassVariantArray;
+begin
+ FPythonEngine.ExecString(
+ 'from delphi import rtti_var' + sLineBreak +
+ 'rtti_var.PassVariantArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])'
+ );
+ Assert.Pass;
+end;
+
+procedure TTestWrapDelphi.TestRecord;
+begin
+ Rtti_rec.StringField := 'abcd';
+ Assert.IsTrue(rtti_rec.StringField = 'abcd');
+ Rtti_rec.SetStringField('1234');
+ Assert.IsTrue(rtti_rec.StringField = '1234');
+ Assert.AreEqual(Rec.StringField, '1234');
+ Rtti_rec.SubRecord.DoubleField := variant(double(3.14)); //implicitly cast to a variant to avoid a bug present in 10.4.2
+ Assert.IsTrue(rtti_rec.SubRecord.DoubleField = 3.14);
+ Assert.AreEqual(Rec.SubRecord.DoubleField, 3.14);
+end;
+
+procedure TTestWrapDelphi.TestRecordField;
+Var
+ RecValue: Variant;
+begin
+ RecValue := rtti_var.RecordField;
+ RecValue.StringField := 'abc';
+ rtti_var.RecordField := RecValue;
+ Assert.IsTrue(rtti_var.RecordField.StringField = 'abc');
+end;
+
+procedure TTestWrapDelphi.TestSetField;
+// Sets are converted to/from list of strings
+begin
+ TestRttiAccess.FruitsField := [];
+ Assert.AreEqual(string(Rtti_Var.FruitsField), '[]');
+ Rtti_Var.FruitsField := VarPythonCreate(['Apple', 'Banana'], stList);
+ Assert.AreEqual(string(Rtti_Var.FruitsField), '[''Apple'', ''Banana'']');
+ Assert.IsTrue(TestRttiAccess.FruitsField = [Apple, Banana]);
+end;
+
+procedure TTestWrapDelphi.TestSetProperty;
+begin
+ TestRttiAccess.Fruits := [];
+ Assert.AreEqual(string(Rtti_Var.Fruits), '[]');
+ Rtti_Var.Fruits := VarPythonCreate(['Apple', 'Banana'], stList);
+ Assert.AreEqual(string(Rtti_Var.Fruits), '[''Apple'', ''Banana'']');
+ Assert.IsTrue(TestRttiAccess.Fruits = [Apple, Banana]);
+end;
+
+procedure TTestWrapDelphi.TestSetProps;
+begin
+ rtti_var.SetProps(StringField := 'abc', DoubleField := 1.234);
+ Assert.AreEqual(TestRttiAccess.StringField, 'abc');
+ Assert.AreEqual(TestRttiAccess.DoubleField, 1.234);
+end;
+
+procedure TTestWrapDelphi.TestStringField;
+begin
+ TestRttiAccess.StringField := 'Hi';
+ Assert.AreEqual(string(Rtti_Var.StringField), 'Hi');
+ Rtti_Var.StringField := 'P4D';
+ Assert.AreEqual(TestRttiAccess.StringField, 'P4D');
+end;
+
+procedure TTestWrapDelphi.TestDynArrayParameters;
+{var
+ rc: TRttiContext;
+ rt: TRttiType;
+ rm: TRttiMethod;
+ rp: TArray;
+ ra: TArray;}
+begin
+{ rc := TRttiContext.Create;
+ rt := rc.GetType(TypeInfo(TTestRttiAccess));
+ rm := rt.GetMethod('SellFruitsInt');
+ rp := rm.GetParameters;
+ SetLength(ra, 1);
+ ra[0] := TValue.FromArray(TypeInfo(TIntegerDynArray), [TValue.From(0)]);
+ rm.Invoke(TestRttiAccess, ra);}
+ TestRttiAccess.Fruits := [TFruit.Apple, TFruit.Banana, TFruit.Orange];
+ Rtti_Var.SellFruitsInt(VarPythonCreate([0, 1], stList));
+ Assert.IsTrue(TestRttiAccess.Fruits = [Orange]);
+ TestRttiAccess.Fruits := [TFruit.Apple, TFruit.Banana, TFruit.Orange];
+ Rtti_Var.SellFruits(VarPythonCreate([Ord(TFruit.Apple), Ord(TFruit.Banana)], stList));
+ Assert.IsTrue(TestRttiAccess.Fruits = [Orange]);
+end;
+
+procedure TTestWrapDelphi.TestMethodWithVarAndOverload;
+begin
+ Rtti_Var.SetStringField('test');
+ Assert.AreEqual('test', TestRttiAccess.StringField);
+end;
+
+function TTestRttiAccess.SetStringField(const Value: string): string;
+begin
+ StringField := Value;
+ Result := StringField;
+end;
+
+function TTestRttiAccess.SetStringField(var Value: Integer): string;
+begin
+ StringField := IntToStr(Value);
+ Result := StringField;
+end;
+
+function TTestRttiAccess.GetData: TObject;
+begin
+ Result := TStringList.Create;
+end;
+
+function TTestRttiAccess.GetDynArray: TInt64DynArray;
+var
+ I: Integer;
+begin
+ SetLength(Result, 1000000);
+ for I := 0 to Length(Result) - 1 do
+ Result[I] := I;
+end;
+
+function TTestRttiAccess.GetStaticArray: TStaticArray;
+var
+ I: Integer;
+begin
+ for I := 0 to Length(Result) - 1 do
+ Result[I] := I;
+end;
+
+procedure TTestRttiAccess.PassVariantArray(const Value: Variant);
+begin
+ Assert.IsTrue(VarIsArray(Value) and (VarArrayHighBound(Value, 1) = 9));
+end;
+
+procedure TTestRttiAccess.SellFruits(const AFruits: TFruitDynArray);
+var
+ Fruit: TFruit;
+begin
+ for Fruit in AFruits do
+ Exclude(FFruits, Fruit);
+end;
+
+procedure TTestRttiAccess.SellFruitsInt(const AFruits:TIntegerDynArray);
+var
+ Fruit: Integer;
+begin
+ for Fruit in AFruits do
+ Exclude(FFruits, TFruit(Fruit));
+end;
+
+{ TTestRecord }
+
+procedure TTestRecord.SetStringField(S: string);
+begin
+ Self.StringField := S;
+end;
+
+{ TTestInterfaceImpl }
+
+function TTestInterfaceImpl.GetString: string;
+begin
+ Result := FString;
+end;
+
+procedure TTestInterfaceImpl.SetString(const S: string);
+begin
+ FString := S;
+end;
+
+initialization
+ TDUnitX.RegisterTestFixture(TTestWrapDelphi);
+ ReportMemoryLeaksOnShutdown := True;
+
+end.