mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 01:04:50 +01:00 
			
		
		
		
	LCL: Move TLCLPlatform and related non-GUI code to a new unit to be used without GUI.
Organize uses-sections by package so that dependencies can be easier seen. git-svn-id: trunk@53711 -
This commit is contained in:
		
							parent
							
								
									fa1813ea1d
								
							
						
					
					
						commit
						a714a91311
					
				
							
								
								
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @ -7918,6 +7918,7 @@ lcl/lclclasses.pp svneol=native#text/pascal | ||||
| lcl/lclintf.pas svneol=native#text/pascal | ||||
| lcl/lclmemmanager.pas svneol=native#text/pascal | ||||
| lcl/lclmessageglue.pas svneol=native#text/pascal | ||||
| lcl/lclplatformdef.pas svneol=native#text/pascal | ||||
| lcl/lclproc.pas svneol=native#text/pascal | ||||
| lcl/lclrescache.pas svneol=native#text/pascal | ||||
| lcl/lclstrconsts.pas svneol=native#text/pascal | ||||
|  | ||||
| @ -32,8 +32,9 @@ uses | ||||
|   // RTL / FCL | ||||
|   SysUtils, Types, Classes, TypInfo, math, FPCanvas, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLType, LCLIntf, Forms, Buttons, Graphics, GraphType, StdCtrls, | ||||
|   Controls, ComCtrls, ExtCtrls, Menus, Dialogs, Themes, LMessages, LCLProc, | ||||
|   LCLPlatformDef, InterfaceBase, LCLType, LCLIntf, Forms, Buttons, Graphics, | ||||
|   GraphType, StdCtrls, Controls, ComCtrls, ExtCtrls, Menus, Dialogs, Themes, | ||||
|   LMessages, LCLProc, | ||||
|   // LazControls | ||||
|   {$IFnDEF UseOINormalCheckBox} CheckBoxThemed, {$ENDIF} | ||||
|   TreeFilterEdit, ListFilterEdit, | ||||
| @ -42,7 +43,7 @@ uses | ||||
|   // IdeIntf | ||||
|   IDEImagesIntf, IDEHelpIntf, ObjInspStrConsts, | ||||
|   PropEdits, PropEditUtils, ComponentTreeView, OIFavoriteProperties, | ||||
|   ListViewPropEdit, ImageListEditor, ComponentEditors, ChangeParentDlg; | ||||
|   ComponentEditors, ChangeParentDlg; | ||||
| 
 | ||||
| const | ||||
|   OIOptionsFileVersion = 3; | ||||
|  | ||||
| @ -14,7 +14,11 @@ uses | ||||
|   // FCL | ||||
|   SysUtils, Classes, | ||||
|   // LCL | ||||
|   LCLProc, InterfaceBase, LazConfigStorage, PropEdits; | ||||
|   LCLProc, LCLPlatformDef, | ||||
|   // LazUtils | ||||
|   LazConfigStorage, | ||||
|   // IdeIntf | ||||
|   PropEdits; | ||||
| 
 | ||||
| type | ||||
|   TWidgetSetRestrictionsArray = array [TLCLPlatform] of Integer; | ||||
|  | ||||
| @ -35,9 +35,12 @@ unit uDlgSelectPrinter; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, | ||||
|   Buttons, ExtCtrls, Spin, ComCtrls, LCLType, InterfaceBase, | ||||
|   Printers, OsPrinters, CUPSDyn, Math; | ||||
|   Classes, SysUtils, Math, | ||||
|   // LCL | ||||
|   LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Buttons, ExtCtrls, | ||||
|   Spin, ComCtrls, LCLType, LCLPlatformDef, InterfaceBase, Printers, | ||||
|   // Printers | ||||
|   OsPrinters, CUPSDyn; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -25,9 +25,16 @@ unit AboutFrm; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, FPCAdds, Forms, Controls, Graphics, StdCtrls, Buttons, | ||||
|   ExtCtrls, ComCtrls, Menus, LCLIntf, LazConf, LazarusIDEStrConsts, | ||||
|   EnvironmentOpts, Clipbrd, LazFileUtils, lazutf8classes, DefineTemplates; | ||||
|   Classes, SysUtils, | ||||
|   // LCL | ||||
|   Forms, Controls, Graphics, StdCtrls, Buttons, ExtCtrls, ComCtrls, Menus, | ||||
|   LCLIntf, LazConf, InterfaceBase, LCLPlatformDef, Clipbrd, | ||||
|   // LazUtils | ||||
|   FPCAdds, LazFileUtils, lazutf8classes, | ||||
|   // Codetools | ||||
|   DefineTemplates, | ||||
|   // IDE | ||||
|   LazarusIDEStrConsts, EnvironmentOpts; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -49,14 +49,18 @@ uses | ||||
|   Windows, | ||||
|   {$ENDIF} | ||||
|   LCLProc, Forms, Controls, LCLType, StdCtrls, ExtCtrls, Buttons, Dialogs, | ||||
|   LCLPlatformDef, CheckLst, Menus, ComCtrls, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils, LazUTF8, LazLogger, lazutf8classes, LazFileCache, | ||||
|   InterfaceBase, CheckLst, Menus, ComCtrls, DividerBevel, DefineTemplates, | ||||
|   CodeToolManager, | ||||
|   // LazControls | ||||
|   DividerBevel, | ||||
|   // Codetools | ||||
|   CodeToolManager, DefineTemplates, | ||||
|   // IDEIntf | ||||
|   LazIDEIntf, IDEMsgIntf, IDEHelpIntf, IDEImagesIntf, IDEWindowIntf, IDEDialogs, | ||||
|   PackageIntf, IDEExternToolIntf, IDEOptionsIntf, | ||||
|   PackageIntf, IDEExternToolIntf, | ||||
|   // IDE | ||||
|   LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs, | ||||
|   LazarusIDEStrConsts, TransferMacros, LazConf, DialogProcs, | ||||
|   MainBar, EnvironmentOpts, | ||||
|   ApplicationBundle, ModeMatrixOpts, CompilerOptions, BuildProfileManager, | ||||
|   GenericListEditor, GenericCheckList, PackageSystem, PackageDefs; | ||||
|  | ||||
| @ -34,15 +34,15 @@ unit BuildManager; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   // RTL + FCL + LCL | ||||
|   // RTL + FCL | ||||
|   Classes, SysUtils, AVL_Tree, | ||||
|   InterfaceBase, LCLProc, Dialogs, Forms, Controls, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLPlatformDef, LCLProc, Dialogs, Forms, Controls, | ||||
|   // CodeTools | ||||
|   ExprEval, BasicCodeTools, CodeToolManager, DefineTemplates, CodeCache, | ||||
|   FileProcs, CodeToolsCfgScript, | ||||
|   // LazUtils | ||||
|   LConvEncoding, FileUtil, LazFileUtils, LazFileCache, LazUTF8, | ||||
|   Laz2_XMLCfg, | ||||
|   LConvEncoding, FileUtil, LazFileUtils, LazFileCache, LazUTF8, Laz2_XMLCfg, | ||||
|   // IDEIntf | ||||
|   IDEOptionsIntf, ProjectIntf, MacroIntf, IDEDialogs, IDEExternToolIntf, | ||||
|   CompOptsIntf, LazIDEIntf, MacroDefIntf, IDEMsgIntf, | ||||
| @ -329,7 +329,7 @@ begin | ||||
|   inherited Create(AOwner); | ||||
|   fTargetOS:=GetCompiledTargetOS; | ||||
|   fTargetCPU:=GetCompiledTargetCPU; | ||||
|   fLCLWidgetType:=LCLPlatformDirNames[GetDefaultLCLWidgetType]; | ||||
|   fLCLWidgetType:=GetLCLWidgetTypeName; | ||||
|   FUnitSetChangeStamp:=TFPCUnitSetCache.GetInvalidChangeStamp; | ||||
| 
 | ||||
|   OnBackupFileInteractive:=@BackupFileForWrite; | ||||
| @ -2624,7 +2624,7 @@ procedure TBuildManager.SetBuildTarget(const TargetOS, TargetCPU, | ||||
|     else | ||||
|       Result:=''; | ||||
|     if (Result='') or (SysUtils.CompareText(Result,'default')=0) then | ||||
|       Result:=LCLPlatformDirNames[GetDefaultLCLWidgetType]; | ||||
|       Result:=GetLCLWidgetTypeName; | ||||
|     Result:=lowercase(Result); | ||||
|   end; | ||||
| 
 | ||||
|  | ||||
| @ -31,11 +31,18 @@ unit BuildProfileManager; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, FileUtil, Laz2_XMLCfg, LazLogger, LazFileUtils, LazUTF8, | ||||
|   LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls, Buttons, StdCtrls, | ||||
|   ComCtrls, Contnrs, ButtonPanel, DefineTemplates, IDEImagesIntf, | ||||
|   IDEHelpIntf, IDEDialogs, LazarusIDEStrConsts, LazConf, InterfaceBase, | ||||
|   IDEProcs, TransferMacros, CompilerOptions, EnvironmentOpts; | ||||
|   Classes, SysUtils, | ||||
|   // LazUtils | ||||
|   Laz2_XMLCfg, LazLogger, LazFileUtils, LazUTF8, | ||||
|   // LCL | ||||
|   Forms, Controls, Dialogs, ExtCtrls, StdCtrls, ComCtrls, Contnrs, ButtonPanel, | ||||
|   InterfaceBase, LCLPlatformDef, | ||||
|   // Codetools | ||||
|   DefineTemplates, | ||||
|   // IdeIntf | ||||
|   IDEImagesIntf, IDEHelpIntf, IDEDialogs, | ||||
|   // IDE | ||||
|   LazarusIDEStrConsts, IDEProcs, TransferMacros, EnvironmentOpts; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -34,10 +34,15 @@ unit CompatibilityRestrictions; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, Forms, LCLProc, InterfaceBase, StringHashList, | ||||
|   Classes, SysUtils, | ||||
|   // LCL | ||||
|   Forms, LCLProc, InterfaceBase, LCLPlatformDef, StringHashList, | ||||
|   // LazUtils | ||||
|   Laz2_DOM, Laz2_XMLRead, Laz2_XMLWrite, | ||||
|   ObjectInspector, OIFavoriteProperties, PackageIntf, | ||||
|   PackageSystem, PackageDefs, ComponentReg, LazConf; | ||||
|   // IdeIntf | ||||
|   OIFavoriteProperties, PackageIntf, ComponentReg, | ||||
|   // IDE | ||||
|   PackageSystem, PackageDefs; | ||||
| 
 | ||||
| type | ||||
|   TReadRestrictedEvent = procedure (const RestrictedName, WidgetSetName: String) of object; | ||||
|  | ||||
| @ -1063,7 +1063,7 @@ begin | ||||
|       else if CompareIdentifiers(PChar(VarName),'SrcOS2')=0 then | ||||
|         SetCTCSVariableAsString(Value,GetDefaultSrcOS2ForTargetOS(GetCompiledTargetOS)) | ||||
|       else if CompareIdentifiers(PChar(VarName),'LCLWidgetType')=0 then | ||||
|         SetCTCSVariableAsString(Value,LCLPlatformDirNames[GetDefaultLCLWidgetType]) | ||||
|         SetCTCSVariableAsString(Value,GetLCLWidgetTypeName) | ||||
|       else | ||||
|         ClearCTCSVariable(Value); | ||||
|     end else if (CompareIdentifiers(FunctionName,'GetEnv')=0) then | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <CONFIG> | ||||
|   <ProjectOptions> | ||||
|     <Version Value="9"/> | ||||
|     <Version Value="10"/> | ||||
|     <General> | ||||
|       <Flags> | ||||
|         <LRSInOutputDirectory Value="False"/> | ||||
|  | ||||
| @ -30,7 +30,8 @@ uses | ||||
|   {$ENDIF} | ||||
|   Classes, SysUtils, math, CustApp, | ||||
|   Interfaces, // this includes the NoGUI widgetset | ||||
|   LCLProc, Dialogs, Forms, Controls, InterfaceBase, | ||||
|   // LCL | ||||
|   LCLPlatformDef, {InterfaceBase,} LCLProc, Dialogs, Forms, Controls, | ||||
|   // codetools | ||||
|   CodeCache, CodeToolManager, DefineTemplates, FileProcs, | ||||
|   // IDEIntf | ||||
| @ -555,7 +556,7 @@ begin | ||||
|   if WidgetSetOverride<>'' then | ||||
|     CurProf.TargetPlatform:=DirNameToLCLPlatform(WidgetSetOverride) | ||||
|   else | ||||
|     CurProf.TargetPlatform:=GetDefaultLCLWidgetType; | ||||
|     CurProf.TargetPlatform:=GetBuildLCLWidgetType; | ||||
|   if BuildIDEOptions<>'' then | ||||
|   begin | ||||
|     s:=CurProf.ExtraOptions; | ||||
| @ -1818,7 +1819,7 @@ begin | ||||
|   writeln('or --ws=<widgetset>'); | ||||
|   writeln(LongToConsole(Format( | ||||
|     lisOverrideTheProjectWidgetsetEGGtkGtk2QtWin32CarbonD, [space, | ||||
|     LCLPlatformDirNames[LazConf.GetDefaultLCLWidgetType]]))); | ||||
|     LCLPlatformDirNames[GetBuildLCLWidgetType]]))); | ||||
|   writeln(''); | ||||
|   writeln('--cpu=<cpu>'); | ||||
|   writeln(LongToConsole(Format( | ||||
|  | ||||
| @ -46,26 +46,17 @@ interface | ||||
| {$endif} | ||||
| 
 | ||||
| uses | ||||
|   SysUtils, Classes, InterfaceBase, FileUtil, LazFileUtils, | ||||
|   LazUTF8, lazutf8classes, LCLProc, DefineTemplates; | ||||
|   SysUtils, Classes, | ||||
|   // LCL | ||||
|   LCLProc, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils, LazUTF8, LazUTF8Classes, | ||||
|   // Codetools | ||||
|   DefineTemplates; | ||||
| 
 | ||||
| const | ||||
|   LazarusVersionStr = {$I version.inc}; | ||||
| 
 | ||||
|   LCLPlatformDisplayNames: array[TLCLPlatform] of string = ( | ||||
|       'gtk (deprecated)', | ||||
|       'gtk 2', | ||||
|       'gtk3 (alpha)', | ||||
|       'win32/win64', | ||||
|       'wince', | ||||
|       'carbon', | ||||
|       'qt', | ||||
|       'fpGUI (alpha)', | ||||
|       'NoGUI', | ||||
|       'cocoa (alpha)', | ||||
|       'customdraw (alpha)' | ||||
|     ); | ||||
| 
 | ||||
| function CompareLazarusVersion(V1, V2: string): integer; | ||||
| 
 | ||||
| { Config Path Functions } | ||||
| @ -116,10 +107,6 @@ function OSLocksExecutables: boolean; | ||||
| // returns the default browser | ||||
| procedure GetDefaultBrowser(var Browser, Params: string); | ||||
| 
 | ||||
| // LCL | ||||
| function GetDefaultLCLWidgetType: TLCLPlatform; | ||||
| function DirNameToLCLPlatform(const ADirName: string): TLCLPlatform; | ||||
| 
 | ||||
| // Replace OnGetApplicationName, so that Application.Title | ||||
| // doesn't interfere with GetAppConfigDir and related. | ||||
| function GetLazarusApplicationName: string; | ||||
| @ -139,19 +126,6 @@ const | ||||
| const | ||||
|   ExitCodeRestartLazarus = 99; | ||||
| 
 | ||||
| var | ||||
|   // set by lazbuild.lpr and used by GetDefaultLCLWidgetType | ||||
|   BuildLCLWidgetType: TLCLPlatform = | ||||
|     {$IFDEF MSWindows}{$DEFINE WidgetSetDefined} | ||||
|     lpWin32; | ||||
|     {$ENDIF} | ||||
|     {$IFDEF darwin}{$DEFINE WidgetSetDefined} | ||||
|     lpCarbon; | ||||
|     {$ENDIF} | ||||
|     {$IFNDEF WidgetSetDefined} | ||||
|     lpGtk2; | ||||
|     {$ENDIF} | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| {$I lazconf.inc} | ||||
| @ -217,21 +191,6 @@ begin | ||||
|   Result:=TrimFilename(Result); | ||||
| end; | ||||
| 
 | ||||
| function GetDefaultLCLWidgetType: TLCLPlatform; | ||||
| begin | ||||
|   if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then | ||||
|     Result:=WidgetSet.LCLPlatform | ||||
|   else | ||||
|     Result:=BuildLCLWidgetType; | ||||
| end; | ||||
| 
 | ||||
| function DirNameToLCLPlatform(const ADirName: string): TLCLPlatform; | ||||
| begin | ||||
|   for Result:=Low(TLCLPlatform) to High(TLCLPlatform) do | ||||
|     if CompareText(ADirName,LCLPlatformDirNames[Result])=0 then exit; | ||||
|   Result:=lpGtk2; | ||||
| end; | ||||
| 
 | ||||
| function CompareLazarusVersion(V1, V2: string): integer; | ||||
| // compare decimal numbers in strings | ||||
| // For example | ||||
|  | ||||
| @ -61,8 +61,9 @@ uses | ||||
|   // fpc packages | ||||
|   Math, Classes, SysUtils, TypInfo, types, strutils, AVL_Tree, | ||||
|   // LCL | ||||
|   LCLProc, LCLType, LCLIntf, LResources, ComCtrls, HelpIntfs, InterfaceBase, | ||||
|   Forms, Buttons, Menus, Controls, GraphType, Graphics, ExtCtrls, Dialogs, LclStrConsts, | ||||
|   LCLProc, LCLType, LCLIntf, LResources, HelpIntfs, InterfaceBase, LCLPlatformDef, | ||||
|   ComCtrls, Forms, Buttons, Menus, Controls, GraphType, Graphics, ExtCtrls, | ||||
|   Dialogs, LclStrConsts, | ||||
|   // CodeTools | ||||
|   FileProcs, FindDeclarationTool, LinkScanner, BasicCodeTools, CodeToolsStructs, | ||||
|   CodeToolManager, CodeCache, DefineTemplates, KeywordFuncLists, CodeTree, | ||||
| @ -1444,7 +1445,7 @@ begin | ||||
|   CodeToolBoss.SetGlobalValue( | ||||
|     ExternalMacroStart+'ProjPath',VirtualDirectory); | ||||
|   CodeToolBoss.SetGlobalValue( | ||||
|     ExternalMacroStart+'LCLWidgetType',LCLPlatformDirNames[GetDefaultLCLWidgetType]); | ||||
|     ExternalMacroStart+'LCLWidgetType',GetLCLWidgetTypeName); | ||||
|   CodeToolBoss.SetGlobalValue( | ||||
|     ExternalMacroStart+'FPCSrcDir',EnvironmentOptions.GetParsedFPCSourceDirectory); | ||||
| end; | ||||
| @ -9093,7 +9094,7 @@ begin | ||||
|   with CodeToolBoss.GlobalValues do begin | ||||
|     Variables[ExternalMacroStart+'LazarusDir']:=EnvironmentOptions.GetParsedLazarusDirectory; | ||||
|     Variables[ExternalMacroStart+'ProjPath']:=VirtualDirectory; | ||||
|     Variables[ExternalMacroStart+'LCLWidgetType']:=LCLPlatformDirNames[GetDefaultLCLWidgetType]; | ||||
|     Variables[ExternalMacroStart+'LCLWidgetType']:=GetLCLWidgetTypeName; | ||||
|     Variables[ExternalMacroStart+'FPCSrcDir']:=EnvironmentOptions.GetParsedFPCSourceDirectory; | ||||
|   end; | ||||
| 
 | ||||
|  | ||||
| @ -30,11 +30,15 @@ unit RestrictionBrowser; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, InterfaceBase, LCLProc, Contnrs, Forms, Controls, Graphics, | ||||
|   Dialogs, StdCtrls, ComCtrls, TreeFilterEdit, ExtCtrls, Buttons, | ||||
|   IDEImagesIntf, ObjectInspector, | ||||
|   CompatibilityRestrictions, IDEOptionDefs, LazarusIDEStrConsts, | ||||
|   EnvironmentOpts, LazConf; | ||||
|   Classes, Contnrs, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLPlatformDef, LCLProc, Forms, StdCtrls, ComCtrls, ExtCtrls, Buttons, | ||||
|   // LazControls | ||||
|   TreeFilterEdit, | ||||
|   // IdeIntf | ||||
|   IDEImagesIntf, | ||||
|   // IDE | ||||
|   CompatibilityRestrictions, IDEOptionDefs, LazarusIDEStrConsts; | ||||
| 
 | ||||
| type | ||||
|   { TRestrictionBrowserView } | ||||
|  | ||||
| @ -8,23 +8,28 @@ unit alllclunits; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   CheckLst, Clipbrd, ColorBox, ComCtrls, Controls, CustomTimer, DBActns, DbCtrls, DBGrids,  | ||||
|   DefaultTranslator, Dialogs, DynamicArray, DynHashArray, DynQueue, ExtCtrls, ExtDlgs,  | ||||
|   ExtendedStrings, ExtGraphics, FileCtrl, Forms, Graphics, GraphMath, GraphType, GraphUtil, Grids,  | ||||
|   HelpIntfs, IcnsTypes, ImageListCache, ImgList, IniPropStorage, InterfaceBase, IntfGraphics,  | ||||
|   LazHelpHTML, LazHelpIntf, LazLinkedList, LCLClasses, LCLIntf, LCLMemManager, LCLMessageGlue,  | ||||
|   LCLProc, LCLResCache, LCLStrConsts, LCLType, Menus, LCLUnicodeData, LCLVersion, LMessages,  | ||||
|   LResources, Maps, MaskEdit, PairSplitter, PopupNotifier, PostScriptCanvas, PostScriptPrinter,  | ||||
|   PostScriptUnicode, Printers, PropertyStorage, RubberBand, ShellCtrls, Spin, StdActns, StdCtrls,  | ||||
|   StringHashList, TextStrings, Themes, TmSchema, Toolwin, Translations, UTrace, XMLPropStorage,  | ||||
|   TimePopup, Messages, WSButtons, WSCalendar, WSCheckLst, WSComCtrls, WSControls, WSDesigner,  | ||||
|   WSDialogs, WSExtCtrls, WSExtDlgs, WSFactory, WSForms, WSGrids, WSImgList, WSLCLClasses, WSMenus,  | ||||
|   WSPairSplitter, WSProc, WSReferences, WSSpin, WSStdCtrls, WSToolwin, ActnList, AsyncProcess,  | ||||
|   ButtonPanel, Buttons, Calendar, RegisterLCL, ValEdit, LazCanvas, LazDialogs, LazRegions,  | ||||
|   CustomDrawn_Common, CustomDrawnControls, CustomDrawnDrawers, LazDeviceApis, LDockTree,  | ||||
|   LazFreeTypeIntfDrawer, CustomDrawn_WinXP, CustomDrawn_Android, Arrow, EditBtn, ComboEx,  | ||||
|   DBExtCtrls, CustomDrawn_Mac, CalcForm, LCLTranslator, GroupedEdit, LCLTaskDialog,  | ||||
|   WSLazDeviceAPIS, LazarusPackageIntf; | ||||
|   CheckLst, Clipbrd, ColorBox, ComCtrls, Controls, CustomTimer, DBActns,  | ||||
|   DbCtrls, DBGrids, DefaultTranslator, Dialogs, DynamicArray, DynHashArray,  | ||||
|   DynQueue, ExtCtrls, ExtDlgs, ExtendedStrings, ExtGraphics, FileCtrl, Forms,  | ||||
|   Graphics, GraphMath, GraphType, GraphUtil, Grids, HelpIntfs, IcnsTypes,  | ||||
|   ImageListCache, ImgList, IniPropStorage, InterfaceBase, IntfGraphics,  | ||||
|   LazHelpHTML, LazHelpIntf, LazLinkedList, LCLClasses, LCLIntf, LCLMemManager,  | ||||
|   LCLMessageGlue, LCLProc, LCLResCache, LCLStrConsts, LCLType, Menus,  | ||||
|   LCLUnicodeData, LCLVersion, LMessages, LResources, Maps, MaskEdit,  | ||||
|   PairSplitter, PopupNotifier, PostScriptCanvas, PostScriptPrinter,  | ||||
|   PostScriptUnicode, Printers, PropertyStorage, RubberBand, ShellCtrls, Spin,  | ||||
|   StdActns, StdCtrls, StringHashList, TextStrings, Themes, TmSchema, Toolwin,  | ||||
|   Translations, UTrace, XMLPropStorage, TimePopup, Messages, WSButtons,  | ||||
|   WSCalendar, WSCheckLst, WSComCtrls, WSControls, WSDesigner, WSDialogs,  | ||||
|   WSExtCtrls, WSExtDlgs, WSFactory, WSForms, WSGrids, WSImgList, WSLCLClasses,  | ||||
|   WSMenus, WSPairSplitter, WSProc, WSReferences, WSSpin, WSStdCtrls,  | ||||
|   WSToolwin, ActnList, AsyncProcess, ButtonPanel, Buttons, Calendar,  | ||||
|   RegisterLCL, ValEdit, LazCanvas, LazDialogs, LazRegions, CustomDrawn_Common,  | ||||
|   CustomDrawnControls, CustomDrawnDrawers, LazDeviceApis, LDockTree,  | ||||
|   LazFreeTypeIntfDrawer, CustomDrawn_WinXP, CustomDrawn_Android, Arrow,  | ||||
|   EditBtn, ComboEx, DBExtCtrls, CustomDrawn_Mac, CalcForm, LCLTranslator,  | ||||
|   GroupedEdit, LCLTaskDialog, WSLazDeviceAPIS, LCLPlatformDef,  | ||||
|   LazarusPackageIntf; | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
|  | ||||
| @ -22,7 +22,11 @@ unit AsyncProcess; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, Process, LCLProc, FileUtil, InterfaceBase, LCLIntf, UTF8Process; | ||||
|   Classes, Process, | ||||
|   // LazUtils | ||||
|   FileUtil, UTF8Process, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLIntf; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -35,9 +35,13 @@ interface | ||||
| {$ENDIF} | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, TypInfo, Types, LCLStrConsts, LCLType, AvgLvlTree, | ||||
|   LCLProc, GraphType, Graphics, LMessages, LCLIntf, InterfaceBase, ImgList, | ||||
|   PropertyStorage, Menus, ActnList, LCLClasses, LResources; | ||||
|   Classes, SysUtils, TypInfo, Types, | ||||
|   // LazUtils | ||||
|   AvgLvlTree, | ||||
|   // LCL | ||||
|   LCLStrConsts, LCLType, LCLProc, GraphType, Graphics, LMessages, LCLIntf, | ||||
|   InterfaceBase, ImgList, PropertyStorage, Menus, ActnList, LCLClasses, | ||||
|   LResources, LCLPlatformDef; | ||||
| 
 | ||||
| {$I controlconsts.inc} | ||||
| 
 | ||||
|  | ||||
| @ -21,10 +21,11 @@ unit Dialogs; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   // RTL + FCL + LCL | ||||
|   Types, typinfo, Classes, SysUtils, LMessages, | ||||
|   LResources, LCLIntf, InterfaceBase, LCLStrConsts, LCLType, LCLProc, Forms, | ||||
|   Controls, Themes, GraphType, Graphics, Buttons, ButtonPanel, StdCtrls, | ||||
|   // RTL + FCL | ||||
|   Types, typinfo, Classes, SysUtils, | ||||
|   // LCL | ||||
|   LMessages, LResources, LCLIntf, InterfaceBase, LCLStrConsts, LCLType, LCLProc, | ||||
|   Forms, Controls, Themes, GraphType, Graphics, Buttons, ButtonPanel, StdCtrls, | ||||
|   ExtCtrls, LCLClasses, ClipBrd, Menus, LCLTaskDialog, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils; | ||||
|  | ||||
| @ -42,7 +42,10 @@ unit DynHashArray; | ||||
| 
 | ||||
| interface | ||||
| 
 | ||||
| uses Classes, SysUtils, LCLProc; | ||||
| uses | ||||
|   Classes, SysUtils, | ||||
|   // LCL | ||||
|   LCLProc; | ||||
| 
 | ||||
| type | ||||
|   TDynHashArray = class; | ||||
|  | ||||
| @ -16,7 +16,9 @@ unit DynQueue; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LazLoggerBase; | ||||
|   Classes, SysUtils, | ||||
|   // LazUtils | ||||
|   LazLoggerBase; | ||||
|    | ||||
| type | ||||
|   TDynamicQueueItem = record | ||||
|  | ||||
| @ -39,8 +39,8 @@ interface | ||||
| 
 | ||||
| 
 | ||||
| uses | ||||
|   SysUtils, Math, Types, Classes, Contnrs, FPCAdds, LCLVersion, LazUTF8Classes, | ||||
|   FileUtil, | ||||
|   // RTL + FCL | ||||
|   SysUtils, Math, Types, Classes, Contnrs, | ||||
|   FPImage, FPCanvas, | ||||
|   FPWriteBMP,              // bmp support | ||||
|   FPWritePNG, PNGComn,     // png support | ||||
| @ -48,10 +48,11 @@ uses | ||||
|   FPReadJpeg, FPWriteJpeg, // jpg support | ||||
|   FPReadTiff, FPTiffCmn,   // tiff support | ||||
|   FPReadGif, | ||||
|   AvgLvlTree, | ||||
|   IntfGraphics, | ||||
|   LCLStrConsts, LCLType, LCLProc, LMessages, LResources, LCLResCache, | ||||
|   GraphType, IcnsTypes, GraphMath, WSReferences; | ||||
|   // LazUtils | ||||
|   FPCAdds, LazUTF8Classes, FileUtil, AvgLvlTree, | ||||
|   // LCL | ||||
|   LCLVersion, LCLStrConsts, LCLType, LCLProc, LMessages, LResources, LCLResCache, | ||||
|   IntfGraphics, GraphType, IcnsTypes, GraphMath, WSReferences; | ||||
| 
 | ||||
| type | ||||
|   PColor = ^TColor; | ||||
|  | ||||
| @ -29,7 +29,8 @@ unit GraphMath; | ||||
| interface | ||||
| 
 | ||||
| Uses | ||||
|   Types, Classes, SysUtils, Math, LCLProc; | ||||
|   Types, Classes, SysUtils, Math, | ||||
|   LCLProc; | ||||
| 
 | ||||
| Type | ||||
|   TFloatPoint = Record | ||||
|  | ||||
| @ -23,7 +23,11 @@ unit GraphType; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   FPCAdds, Classes, SysUtils, LCLType, LCLProc, types; | ||||
|   Classes, SysUtils, Types, Math, | ||||
|   // LazUtils | ||||
|   FPCAdds, | ||||
|   // LCL | ||||
|   LCLType, LCLProc; | ||||
| 
 | ||||
| {$ifdef Trace} | ||||
| {$ASSERTIONS ON} | ||||
| @ -260,9 +264,6 @@ var | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| uses | ||||
|   Math; | ||||
| 
 | ||||
| {------------------------------------------------------------------------------ | ||||
|   Function: CopyImageData | ||||
|  ------------------------------------------------------------------------------} | ||||
|  | ||||
| @ -21,7 +21,8 @@ unit GraphUtil; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Types, Graphics, GraphType, Math, LCLType, LCLIntf; | ||||
|   Types, Math, | ||||
|   Graphics, GraphType, LCLType, LCLIntf; | ||||
| 
 | ||||
| function ColorToGray(const AColor: TColor): Byte; | ||||
| procedure ColorToHLS(const AColor: TColor; out H, L, S: Byte); | ||||
|  | ||||
| @ -44,8 +44,13 @@ interface | ||||
| {$endif} | ||||
| 
 | ||||
| uses | ||||
|   Types, SysUtils, Classes, FPCAdds, LCLStrConsts, LCLIntf, LResources, LCLType, | ||||
|   LCLProc, Graphics, GraphType, LCLClasses, IntfGraphics, FPReadBMP, | ||||
|   // RTL + FCL | ||||
|   Types, SysUtils, Classes, FPReadBMP, | ||||
|   // LazUtils | ||||
|   FPCAdds, | ||||
|   // LCL | ||||
|   LCLStrConsts, LCLIntf, LResources, LCLType, LCLProc, Graphics, GraphType, | ||||
|   LCLClasses, IntfGraphics, | ||||
|   WSReferences; | ||||
| 
 | ||||
| type | ||||
|  | ||||
| @ -14,7 +14,11 @@ unit IniPropStorage; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, Forms, IniFiles, LazUtf8; | ||||
|   Classes, SysUtils, IniFiles, | ||||
|   // LazUtils | ||||
|   LazUtf8, | ||||
|   // LCL | ||||
|   Forms; | ||||
| 
 | ||||
| type | ||||
|   { TCustomIniPropStorage } | ||||
|  | ||||
| @ -27,8 +27,12 @@ interface | ||||
| {$endif} | ||||
| 
 | ||||
| uses | ||||
|   Types, Classes, SysUtils, Math, LCLStrConsts, LCLType, LCLProc, LMessages, | ||||
|   FPImage, GraphType, GraphMath, IntfGraphics, Themes, LazUTF8; | ||||
|   Types, Classes, SysUtils, Math, FPImage, | ||||
|   // LazUtils | ||||
|   LazUTF8, | ||||
|   // LCL | ||||
|   LCLType, LCLProc, LMessages, LCLPlatformDef, | ||||
|   GraphType, GraphMath, IntfGraphics, Themes; | ||||
| 
 | ||||
| type | ||||
|   PEventHandler = type Pointer; | ||||
| @ -48,22 +52,6 @@ type | ||||
| 
 | ||||
|   TLCLWndMethod = procedure(var TheMessage: TLMessage) of Object; | ||||
| 
 | ||||
|   TLCLPlatform = ( | ||||
|     lpGtk, | ||||
|     lpGtk2, | ||||
|     lpGtk3, | ||||
|     lpWin32, | ||||
|     lpWinCE, | ||||
|     lpCarbon, | ||||
|     lpQT, | ||||
|     lpfpGUI, | ||||
|     lpNoGUI, | ||||
|     lpCocoa, | ||||
|     lpCustomDrawn | ||||
|     ); | ||||
|      | ||||
|   TLCLPlatforms = set of TLCLPlatform; | ||||
| 
 | ||||
|   TLCLCapability = ( | ||||
|     lcAsyncProcess,             // Support for async process | ||||
|     lcCanDrawOutsideOnPaint,    // Support for drawing outside OnPaint event of an control | ||||
| @ -183,21 +171,10 @@ type | ||||
|   end; | ||||
|   TWidgetSetClass = class of TWidgetSet; | ||||
| 
 | ||||
| const | ||||
|   LCLPlatformDirNames: array[TLCLPlatform] of string = ( | ||||
|       'gtk', | ||||
|       'gtk2', | ||||
|       'gtk3', | ||||
|       'win32', | ||||
|       'wince', | ||||
|       'carbon', | ||||
|       'qt', | ||||
|       'fpgui', | ||||
|       'nogui', | ||||
|       'cocoa', | ||||
|       'customdrawn' | ||||
|     ); | ||||
|   function GetDefaultLCLWidgetType: TLCLPlatform; | ||||
|   function GetLCLWidgetTypeName: string; | ||||
| 
 | ||||
| const | ||||
|   { Constants for the routine TWidgetSet.GetLCLCapability } | ||||
|   LCL_CAPABILITY_NO = 0; | ||||
|   LCL_CAPABILITY_YES = 1; | ||||
| @ -235,6 +212,25 @@ var | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| {function GetDefaultLCLWidgetType: TLCLPlatform; | ||||
| begin | ||||
|   Assert(Assigned(WidgetSet), 'GetDefaultLCLWidgetType: WidgetSet is not assigned.'); | ||||
|   if WidgetSet.LCLPlatform<>lpNoGUI then | ||||
|     Result:=WidgetSet.LCLPlatform | ||||
| end; } | ||||
| function GetDefaultLCLWidgetType: TLCLPlatform; | ||||
| begin | ||||
|   if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then | ||||
|     Result:=WidgetSet.LCLPlatform | ||||
|   else | ||||
|     Result:=BuildLCLWidgetType; | ||||
| end; | ||||
| 
 | ||||
| function GetLCLWidgetTypeName: string; | ||||
| begin | ||||
|   Result:=LCLPlatformDirNames[GetDefaultLCLWidgetType]; | ||||
| end; | ||||
| 
 | ||||
| { TDialogButtons } | ||||
| 
 | ||||
| procedure TDialogButtons.SetCancelButton(const AValue: TDialogButton); | ||||
|  | ||||
| @ -45,7 +45,8 @@ uses | ||||
|   {$ifdef DebugBitmaps} | ||||
|     CarbonDebug, | ||||
|   {$endif} | ||||
|   glgrab, LMessages, LCLMessageGlue, LCLProc, LCLIntf, LCLType, IntfGraphics, | ||||
|   glgrab, | ||||
|   LCLPlatformDef, LMessages, LCLMessageGlue, LCLProc, LCLIntf, LCLType, IntfGraphics, | ||||
|   GraphType, GraphMath, Graphics, Controls, Forms, Dialogs, Menus, Maps, Themes; | ||||
| 
 | ||||
| type | ||||
|  | ||||
| @ -33,7 +33,7 @@ uses | ||||
|   // carbon bindings | ||||
|   MacOSAll, | ||||
|   // interfacebase | ||||
|   InterfaceBase, GraphType, | ||||
|   LCLPlatformDef, InterfaceBase, GraphType, | ||||
|   // private | ||||
|   CocoaAll, CocoaPrivate, CocoaUtils, CocoaGDIObjects, | ||||
|   CocoaProc, cocoa_extra, CocoaWSMenus, CocoaWSForms, | ||||
|  | ||||
| @ -48,7 +48,7 @@ uses | ||||
|   // LCL | ||||
|   customdrawn_common, customdrawncontrols, customdrawndrawers, | ||||
|   lazcanvas, lazregions, lazdeviceapis, | ||||
|   InterfaceBase, Themes, Dialogs, Buttons, | ||||
|   LCLPlatformDef, InterfaceBase, Themes, Dialogs, Buttons, | ||||
|   Controls,  Forms, lclproc, IntfGraphics, GraphType, | ||||
|   LCLType, LMessages, Graphics, LCLStrConsts, Menus, LazLoggerBase; | ||||
| 
 | ||||
|  | ||||
| @ -26,9 +26,8 @@ uses | ||||
|   // FCL | ||||
|   Classes, Types, SysUtils, Math, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLProc, LCLType, LMessages, | ||||
|   Controls, ExtCtrls, Forms, Dialogs, StdCtrls, Comctrls, LCLIntf, | ||||
|   GraphType, | ||||
|   LCLPlatformDef, InterfaceBase, LCLProc, LCLType, LMessages, | ||||
|   Controls, ExtCtrls, Forms, Dialogs, StdCtrls, Comctrls, LCLIntf, GraphType, | ||||
|   // Bindings | ||||
|   fpg_main, fpg_form, fpguiproc, fpg_base, fpg_dialogs, | ||||
|   // Widgetset | ||||
|  | ||||
| @ -45,9 +45,9 @@ uses | ||||
|   LineInfo, | ||||
|   {$ENDIF} | ||||
|   // rtl+fcl | ||||
|   Types, Classes, SysUtils, FPCAdds, | ||||
|   // interfacebase | ||||
|   InterfaceBase, | ||||
|   Types, Classes, SysUtils, | ||||
|   // LazUtils | ||||
|   FPCAdds, | ||||
|   // gtk | ||||
|   {$IFDEF gtk2} | ||||
|     glib2, gdk2pixbuf, gdk2, gtk2, Pango, gtk2proc, | ||||
| @ -63,12 +63,12 @@ uses | ||||
|   {$endif} | ||||
|   Math, // after gtk to get the correct Float type | ||||
|   // LCL | ||||
|   LCLPlatformDef, InterfaceBase, | ||||
|   FileUtil, Translations, ExtDlgs, Dialogs, Controls, Forms, LCLStrConsts, | ||||
|   LMessages, LCLProc, LCLIntf, LCLType, DynHashArray, GraphType, GraphMath, | ||||
|   Graphics, Menus, Maps, Themes, | ||||
|   // widgetset | ||||
|   GtkDebug, | ||||
|   GtkFontCache, gtkDef, GtkProc, gtkMsgQueue, GtkExtra, WSLCLClasses; | ||||
|   GtkDebug, GtkFontCache, gtkDef, GtkProc, gtkMsgQueue, GtkExtra, WSLCLClasses; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -34,23 +34,19 @@ uses | ||||
|   Types, Classes, SysUtils, Math, | ||||
|   {$IfNDef GTK2_2} | ||||
|     {$IfDef HasX} | ||||
|      XLib, xatom, X, gdk2x, //XUtil, | ||||
|      XLib, xatom, X, gdk2x, | ||||
|     {$EndIf} | ||||
|   {$EndIf} | ||||
|   gdk2pixbuf, gtk2, gdk2, glib2, Pango, | ||||
|   // LazUtils | ||||
|   LazFileUtils, | ||||
|   // LCL | ||||
|   Maps, LazFileUtils, Dialogs, Controls, Forms, LCLStrConsts, | ||||
|   Maps, Dialogs, Controls, Forms, LCLStrConsts, | ||||
|   LMessages, LCLProc, LazUTF8, LCLIntf, LCLType, DynHashArray, GraphType, GraphMath, | ||||
|   Graphics, Menus, Themes, WSLCLClasses, | ||||
| 
 | ||||
|   Buttons, StdCtrls, CheckLst, | ||||
|   ComCtrls, Spin, | ||||
|   ExtCtrls, LResources, | ||||
| 
 | ||||
|   InterfaceBase, | ||||
|   Gtk2WinApiWindow, | ||||
|   Gtk2Globals, Gtk2Proc, | ||||
|   Gtk2Def, Gtk2FontCache, Gtk2Extra, | ||||
|   Graphics, Menus, Themes, Buttons, StdCtrls, CheckLst, ComCtrls, Spin, ExtCtrls, | ||||
|   LCLPlatformDef, InterfaceBase, | ||||
|   WSLCLClasses, | ||||
|   Gtk2WinApiWindow, Gtk2Globals, Gtk2Proc, Gtk2Def, Gtk2FontCache, Gtk2Extra, | ||||
|   Gtk2MsgQueue; | ||||
| 
 | ||||
| type | ||||
|  | ||||
| @ -25,11 +25,14 @@ uses | ||||
|   BaseUnix, Unix, | ||||
|   {$ENDIF} | ||||
|   SysUtils, Classes, types, | ||||
|   InterfaceBase, Translations, | ||||
|   Controls, Forms, FPImage, Graphics, GraphUtil, GraphType, LCLProc, LazUTF8, | ||||
|   LCLStrConsts, LCLType, LMessages, | ||||
|   // LazUtils | ||||
|   LazUTF8, | ||||
|   // LCL | ||||
|   LCLPlatformDef, InterfaceBase, Translations, | ||||
|   Controls, Forms, FPImage, Graphics, GraphUtil, GraphType, IntfGraphics, | ||||
|   LCLProc, LCLStrConsts, LCLType, LMessages, | ||||
|   LazGtk3, LazGdk3, LazGlib2, LazGObject2, LazCairo1, LazPango1, LazPangoCairo1, LazGio2, | ||||
|   LazGdkPixbuf2, gtk3widgets, gtk3objects, gtk3procs, IntfGraphics; | ||||
|   LazGdkPixbuf2, gtk3widgets, gtk3objects, gtk3procs; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
|  | ||||
| @ -27,7 +27,7 @@ uses | ||||
|   InterfaceBase, | ||||
|   // LCL | ||||
|   Dialogs, Controls, Forms, | ||||
|   LCLProc, LCLIntf, LCLType, GraphType, Graphics, Menus, Themes, | ||||
|   LCLProc, LCLIntf, LCLType, LCLPlatformDef, GraphType, Graphics, Menus, Themes, | ||||
|   // widgetset | ||||
|   WSLCLClasses; | ||||
| 
 | ||||
|  | ||||
| @ -37,10 +37,12 @@ uses | ||||
|   qt4, | ||||
|   // FPC | ||||
|   Classes, SysUtils, Math, Types, maps, | ||||
|   // LazUtils | ||||
|   LazUTF8, | ||||
|   // LCL | ||||
|   InterfaceBase, LCLProc, LazUTF8, LCLType, LMessages, LCLMessageGlue, LCLStrConsts, | ||||
|   Controls, ExtCtrls, Forms, | ||||
|   Dialogs, StdCtrls, LCLIntf, GraphType, GraphUtil, Themes, | ||||
|   LCLPlatformDef, InterfaceBase, LCLProc, LCLType, LCLIntf, | ||||
|   LMessages, LCLMessageGlue, LCLStrConsts, | ||||
|   Controls, ExtCtrls, Forms, StdCtrls, GraphType, GraphUtil, Themes, | ||||
|   // WS | ||||
|   qtproc; | ||||
| 
 | ||||
| @ -347,7 +349,7 @@ uses | ||||
|  QtCaret, | ||||
|  QtThemes, | ||||
| //////////////////////////////////////////////////// | ||||
|   Graphics, buttons, Menus, | ||||
|   Graphics, buttons, | ||||
|   // Bindings | ||||
|   QtWSFactory, qtwidgets, qtobjects, qtsystemtrayicon; | ||||
| 
 | ||||
|  | ||||
| @ -29,12 +29,11 @@ interface | ||||
| } | ||||
| uses | ||||
|   Windows, // keep as first | ||||
|   ActiveX, Classes, | ||||
|   Translations, Controls, Buttons, | ||||
|   LCLIntf, LclProc, LazUTF8, LCLType, LMessages, | ||||
|   Forms, Dialogs, GraphMath, GraphType, InterfaceBase, | ||||
|   StdCtrls, SysUtils, RtlConsts, Win32Def, Graphics, Menus, CommCtrl, ComCtrls, | ||||
|   MultiMon, Themes{, Win32Debug}; | ||||
|   Classes, RtlConsts, ActiveX, MultiMon, | ||||
|   // LCL | ||||
|   LCLPlatformDef, InterfaceBase, LCLIntf, LclProc, LazUTF8, LCLType, LMessages, | ||||
|   Translations, Controls, Buttons, Forms, Dialogs, GraphMath, GraphType, StdCtrls, | ||||
|   SysUtils, Win32Def, Graphics, Menus, CommCtrl, ComCtrls, Themes{, Win32Debug}; | ||||
| 
 | ||||
| const | ||||
|   // standard windows cursors | ||||
|  | ||||
| @ -40,14 +40,16 @@ uses | ||||
|   {$else} | ||||
|     aygshell, | ||||
|   {$endif} | ||||
|   // Libs | ||||
|   Windows, | ||||
|   // RTL, LCL | ||||
|   Classes, ComCtrls, Controls, Buttons, Dialogs, DynHashArray, | ||||
|   ExtCtrls, Forms, GraphMath, GraphType, InterfaceBase, LCLIntf, LCLType, LazUTF8, | ||||
|   LMessages, StdCtrls, SysUtils, Graphics, Menus, | ||||
|   // Libs, RTL | ||||
|   Windows, Classes, | ||||
|   // LCL | ||||
|   LCLIntf, LCLType, ComCtrls, Controls, Buttons, Dialogs, DynHashArray, | ||||
|   ExtCtrls, Forms, GraphMath, GraphType, LCLPlatformDef, InterfaceBase, | ||||
|   LMessages, StdCtrls, SysUtils, Graphics, Menus, Themes, | ||||
|   // LazUtils | ||||
|   LazUTF8, | ||||
|   // Widgetset | ||||
|   WinCEProc, WinCEExtra, WinExt, WinCEDef, Themes; | ||||
|   WinCEProc, WinCEExtra, WinExt, WinCEDef; | ||||
| 
 | ||||
| const | ||||
|   {$ifdef Win32} | ||||
|  | ||||
| @ -25,10 +25,13 @@ unit IntfGraphics; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, fpImage, FPReadBMP, FPWriteBMP, BMPComn, FPCAdds, | ||||
|   AvgLvlTree, LCLType, LCLversion, Math, | ||||
|   LCLProc, GraphType, FPReadPNG, FPWritePNG, FPReadTiff, FPWriteTiff, FPTiffCmn, | ||||
|   IcnsTypes; | ||||
|   // RTL + FCL | ||||
|   Classes, SysUtils, Math, fpImage, FPReadBMP, FPWriteBMP, BMPComn, | ||||
|   FPReadPNG, FPWritePNG, FPReadTiff, FPWriteTiff, FPTiffCmn, | ||||
|   // LazUtils | ||||
|   FPCAdds, AvgLvlTree, | ||||
|   // LCL | ||||
|   LCLType, LCLversion, LCLProc, GraphType, IcnsTypes; | ||||
| 
 | ||||
| type | ||||
|   { TLazIntfImage } | ||||
|  | ||||
| @ -40,9 +40,8 @@ uses | ||||
|   Classes, SysUtils, contnrs, Math, | ||||
|   // FCL-Image | ||||
|   fpimgcanv, fpcanvas, fpimage, clipping, pixtools, fppixlcanv, | ||||
|   intfgraphics, | ||||
|   // regions | ||||
|   lazregions | ||||
|   // LCL | ||||
|   IntfGraphics, LazRegions | ||||
|   {$if defined(lazcanvas_debug) or defined(lazcanvas_profiling)} | ||||
|   , lazutf8sysutils, LCLProc | ||||
|   {$endif} | ||||
|  | ||||
| @ -5,7 +5,11 @@ unit LazFreeTypeIntfDrawer; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, Graphics, EasyLazFreeType, IntfGraphics, FPimage; | ||||
|   Classes, SysUtils, FPimage, | ||||
|   // LazUtils | ||||
|   EasyLazFreeType, | ||||
|   // LCL | ||||
|   GraphType, Graphics, IntfGraphics; | ||||
| 
 | ||||
| type | ||||
|   TLazIntfImageGetPixelAtProc = procedure(p: pointer; out Color: TFPColor); | ||||
| @ -55,8 +59,6 @@ type | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| uses LCLType, GraphType; | ||||
| 
 | ||||
| type | ||||
|   PFPColorBytes = ^TFPColorBytes; | ||||
|   TFPColorBytes = record | ||||
|  | ||||
| @ -18,8 +18,11 @@ unit LazHelpHTML; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLProc, LCLIntf, Forms, Process, LazFileUtils, UTF8Process, | ||||
|   LazConfigStorage, LazUTF8, LCLStrConsts, HelpIntfs, LazHelpIntf; | ||||
|   Classes, SysUtils, | ||||
|   // LazUtils | ||||
|   LazFileUtils, UTF8Process, LazUTF8, LazConfigStorage, | ||||
|   // LCL | ||||
|   LCLProc, LCLIntf, LCLStrConsts, HelpIntfs, LazHelpIntf; | ||||
| 
 | ||||
| type | ||||
|   { THTMLHelpDatabase | ||||
|  | ||||
| @ -25,8 +25,11 @@ unit LazHelpIntf; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLProc, FileUtil, LCLStrConsts, Dialogs, | ||||
|   LazConfigStorage, HelpIntfs, Masks, LazFileUtils, LazUTF8; | ||||
|   Classes, SysUtils, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils, LazUTF8, LazConfigStorage, Masks, | ||||
|   // LCL | ||||
|   LCLProc, LCLStrConsts, Dialogs, HelpIntfs; | ||||
| 
 | ||||
| type | ||||
|   { THelpQueryItem } | ||||
|  | ||||
| @ -10,7 +10,8 @@ unit LazRegions; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLType, fpcanvas; | ||||
|   Classes, SysUtils, fpcanvas, | ||||
|   LCLType; | ||||
| 
 | ||||
| type | ||||
|   TLazRegionFillMode = (rfmOddEven, rfmWinding); | ||||
|  | ||||
| @ -27,7 +27,7 @@ | ||||
|     <License Value="modified LGPL-2 | ||||
| "/> | ||||
|     <Version Major="1" Minor="7"/> | ||||
|     <Files Count="290"> | ||||
|     <Files Count="291"> | ||||
|       <Item1> | ||||
|         <Filename Value="checklst.pas"/> | ||||
|         <UnitName Value="CheckLst"/> | ||||
| @ -1192,6 +1192,10 @@ | ||||
|         <Filename Value="include/customdesigncontrol.inc"/> | ||||
|         <Type Value="Include"/> | ||||
|       </Item290> | ||||
|       <Item291> | ||||
|         <Filename Value="lclplatformdef.pas"/> | ||||
|         <UnitName Value="LCLPlatformDef"/> | ||||
|       </Item291> | ||||
|     </Files> | ||||
|     <LazDoc Paths="../docs/xml/lcl"/> | ||||
|     <i18n> | ||||
|  | ||||
| @ -50,9 +50,11 @@ uses | ||||
|   {$IFDEF Windows}Windows, ShellApi, LazUtf16,{$ENDIF} | ||||
|   {$IFDEF UNIX}Unix, {$ENDIF} | ||||
|   {$IFDEF Darwin}MacOSAll, CocoaAll,{$ENDIF} | ||||
|   Math, Classes, SysUtils, Types, LCLType, LCLProc, GraphType, InterfaceBase, | ||||
|   FileUtil, LazFileUtils, UTF8Process, Maps, LMessages, LazUTF8, lazutf8sysutils, | ||||
|   LCLStrConsts; | ||||
|   Math, Classes, SysUtils, Types, | ||||
|   // LCL | ||||
|   LCLType, LCLProc, LMessages, LCLStrConsts, GraphType, Maps, InterfaceBase, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils, UTF8Process, LazUTF8, LazUTF8SysUtils; | ||||
| 
 | ||||
| {$ifdef Trace} | ||||
|   {$ASSERTIONS ON} | ||||
| @ -66,7 +68,6 @@ uses | ||||
| 
 | ||||
| function PredefinedClipboardFormat(AFormat: TPredefinedClipboardFormat): TClipboardFormat; | ||||
| 
 | ||||
| 
 | ||||
| function MsgKeyDataToShiftState(KeyData: PtrInt): TShiftState; | ||||
| 
 | ||||
| function GetTickCount: DWord; inline; | ||||
|  | ||||
							
								
								
									
										99
									
								
								lcl/lclplatformdef.pas
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										99
									
								
								lcl/lclplatformdef.pas
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,99 @@ | ||||
| { | ||||
|  ***************************************************************************** | ||||
|   This file is part of the Lazarus Component Library (LCL) | ||||
| 
 | ||||
|   See the file COPYING.modifiedLGPL.txt, included in this distribution, | ||||
|   for details about the license. | ||||
|  ***************************************************************************** | ||||
| 
 | ||||
|  Contains the non-GUI dependent parts of LCL Platform definition. | ||||
| } | ||||
| 
 | ||||
| unit LCLPlatformDef; | ||||
| 
 | ||||
| {$mode objfpc}{$H+} | ||||
| 
 | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   SysUtils; | ||||
| 
 | ||||
| type | ||||
|   TLCLPlatform = ( | ||||
|     lpGtk, | ||||
|     lpGtk2, | ||||
|     lpGtk3, | ||||
|     lpWin32, | ||||
|     lpWinCE, | ||||
|     lpCarbon, | ||||
|     lpQT, | ||||
|     lpfpGUI, | ||||
|     lpNoGUI, | ||||
|     lpCocoa, | ||||
|     lpCustomDrawn | ||||
|     ); | ||||
| 
 | ||||
|   TLCLPlatforms = set of TLCLPlatform; | ||||
| 
 | ||||
|   function DirNameToLCLPlatform(const ADirName: string): TLCLPlatform; | ||||
|   function GetBuildLCLWidgetType: TLCLPlatform; | ||||
| 
 | ||||
| const | ||||
|   LCLPlatformDirNames: array[TLCLPlatform] of string = ( | ||||
|     'gtk', | ||||
|     'gtk2', | ||||
|     'gtk3', | ||||
|     'win32', | ||||
|     'wince', | ||||
|     'carbon', | ||||
|     'qt', | ||||
|     'fpgui', | ||||
|     'nogui', | ||||
|     'cocoa', | ||||
|     'customdrawn' | ||||
|     ); | ||||
| 
 | ||||
|   LCLPlatformDisplayNames: array[TLCLPlatform] of string = ( | ||||
|     'gtk (deprecated)', | ||||
|     'gtk 2', | ||||
|     'gtk3 (alpha)', | ||||
|     'win32/win64', | ||||
|     'wince', | ||||
|     'carbon', | ||||
|     'qt', | ||||
|     'fpGUI (alpha)', | ||||
|     'NoGUI', | ||||
|     'cocoa (alpha)', | ||||
|     'customdraw (alpha)' | ||||
|     ); | ||||
| 
 | ||||
| var | ||||
|   // set by lazbuild.lpr and used by GetDefaultLCLWidgetType | ||||
|   BuildLCLWidgetType: TLCLPlatform = | ||||
|     {$IFDEF MSWindows}{$DEFINE WidgetSetDefined} | ||||
|     lpWin32; | ||||
|     {$ENDIF} | ||||
|     {$IFDEF darwin}{$DEFINE WidgetSetDefined} | ||||
|     lpCarbon; | ||||
|     {$ENDIF} | ||||
|     {$IFNDEF WidgetSetDefined} | ||||
|     lpGtk2; | ||||
|     {$ENDIF} | ||||
| 
 | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| function DirNameToLCLPlatform(const ADirName: string): TLCLPlatform; | ||||
| begin | ||||
|   for Result:=Low(TLCLPlatform) to High(TLCLPlatform) do | ||||
|     if CompareText(ADirName,LCLPlatformDirNames[Result])=0 then exit; | ||||
|   Result:=lpGtk2; | ||||
| end; | ||||
| 
 | ||||
| function GetBuildLCLWidgetType: TLCLPlatform; | ||||
| begin | ||||
|   Result:=BuildLCLWidgetType; | ||||
| end; | ||||
| 
 | ||||
| end. | ||||
| 
 | ||||
| @ -27,8 +27,11 @@ interface | ||||
| uses | ||||
|   {$IFDEF Darwin}MacOSAll, {$ENDIF} | ||||
|   {$IFnDEF WithOldDebugln} LazLogger, {$ENDIF} | ||||
|   Classes, SysUtils, Math, TypInfo, Types, FPCAdds, AvgLvlTree, LazFileUtils, | ||||
|   LCLStrConsts, LCLType, WSReferences, LazMethodList, LazUTF8, LazUTF8Classes; | ||||
|   Classes, SysUtils, Math, TypInfo, Types, | ||||
|   // LazUtils | ||||
|   FPCAdds, AvgLvlTree, LazFileUtils, LazMethodList, LazUTF8, LazUTF8Classes, | ||||
|   // LCL | ||||
|   LCLStrConsts, LCLType; | ||||
| 
 | ||||
| type | ||||
|   TMethodList = LazMethodList.TMethodList; | ||||
| @ -140,7 +143,6 @@ function BreakString(const s: string; MaxLineLength, Indent: integer): string; | ||||
| 
 | ||||
| function ComparePointers(p1, p2: Pointer): integer; | ||||
| function CompareHandles(h1, h2: THandle): integer; | ||||
| function CompareLCLHandles(h1, h2: TLCLHandle): integer; | ||||
| function CompareRect(R1, R2: PRect): Boolean; | ||||
| function ComparePoints(const p1, p2: TPoint): integer; | ||||
| function CompareMethods(const m1, m2: TMethod): boolean; | ||||
| @ -1202,16 +1204,6 @@ begin | ||||
|     Result:=0; | ||||
| end; | ||||
| 
 | ||||
| function CompareLCLHandles(h1, h2: TLCLHandle): integer; | ||||
| begin | ||||
|   if h1>h2 then | ||||
|     Result:=1 | ||||
|   else if h1<h2 then | ||||
|     Result:=-1 | ||||
|   else | ||||
|     Result:=0; | ||||
| end; | ||||
| 
 | ||||
| function CompareRect(R1, R2: PRect): Boolean; | ||||
| begin | ||||
|   Result:=(R1^.Left=R2^.Left) and (R1^.Top=R2^.Top) and | ||||
|  | ||||
| @ -19,8 +19,12 @@ unit LCLResCache; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, FPCAdds, Types, LCLType, LCLProc, AvgLvlTree, WSReferences, | ||||
|   syncobjs; | ||||
|   Classes, SysUtils, Types, | ||||
|   // LazUtils | ||||
|   FPCAdds, AvgLvlTree, | ||||
|   // LCL | ||||
|   LCLType, LCLProc, WSReferences, | ||||
|   syncobjs; // This FCL unit must be in the end. | ||||
|    | ||||
| {off $DEFINE CheckResCacheConsistency} | ||||
| 
 | ||||
| @ -142,16 +146,26 @@ type | ||||
|                                            read FOnCompareDescPtrWithDescriptor; | ||||
|   end; | ||||
| 
 | ||||
| function ComparePHandleWithResourceCacheItem(HandlePtr: PLCLHandle; Item: | ||||
|   TResourceCacheItem): integer; | ||||
| function ComparePHandleWithResourceCacheItem(HandlePtr: PLCLHandle; | ||||
|   Item: TResourceCacheItem): integer; | ||||
| function CompareDescPtrWithBlockResDesc(DescPtr: Pointer; | ||||
|   Item: TBlockResourceCacheDescriptor): integer; | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| 
 | ||||
| function ComparePHandleWithResourceCacheItem(HandlePtr: PLCLHandle; Item: | ||||
|   TResourceCacheItem): integer; | ||||
| function CompareLCLHandles(h1, h2: TLCLHandle): integer; | ||||
| begin | ||||
|   if h1>h2 then | ||||
|     Result:=1 | ||||
|   else if h1<h2 then | ||||
|     Result:=-1 | ||||
|   else | ||||
|     Result:=0; | ||||
| end; | ||||
| 
 | ||||
| function ComparePHandleWithResourceCacheItem(HandlePtr: PLCLHandle; | ||||
|   Item: TResourceCacheItem): integer; | ||||
| begin | ||||
|   Result := CompareLCLHandles(HandlePtr^, Item.Handle); | ||||
| end; | ||||
|  | ||||
| @ -35,8 +35,12 @@ in directory where your program translation files are placed. | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LResources, GetText, Controls, typinfo, LazFileUtils, | ||||
|   Translations, Forms, LazUTF8; | ||||
|   // RTL + FCL | ||||
|   Classes, SysUtils, typinfo, GetText, | ||||
|   // LCL | ||||
|   LResources, Translations, Forms, | ||||
|   // LazUtils | ||||
|   LazFileUtils, LazUTF8; | ||||
| 
 | ||||
| type | ||||
| 
 | ||||
| @ -78,8 +82,6 @@ function GetDefaultLang: String; | ||||
| 
 | ||||
| implementation | ||||
| 
 | ||||
| uses | ||||
|   Menus; | ||||
| 
 | ||||
| type | ||||
|   TPersistentAccess = class(TPersistent); | ||||
|  | ||||
| @ -23,7 +23,10 @@ unit LMessages; | ||||
| 
 | ||||
| interface | ||||
| 
 | ||||
| uses Classes, SysUtils, Types, LCLType, GraphType | ||||
| uses | ||||
|   Classes, SysUtils, Types, | ||||
|   // LCL | ||||
|   LCLType, GraphType | ||||
|   {$ifdef WINDOWS} | ||||
|   ,messages | ||||
|   {$endif WINDOWS} | ||||
|  | ||||
| @ -34,7 +34,9 @@ uses | ||||
|   Windows, | ||||
|   {$ENDIF} | ||||
|   Classes, SysUtils, Types, RtlConsts, TypInfo, variants, | ||||
|   // LCL | ||||
|   DynQueue, LCLProc, LCLStrConsts, | ||||
|   // LazUtils | ||||
|   LazConfigStorage, FPCAdds, LazUTF8, LazUTF8Classes; | ||||
| 
 | ||||
| {$DEFINE UseLRS} | ||||
|  | ||||
| @ -24,7 +24,9 @@ unit Maps; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, Math, FPCAdds, AvgLvlTree, typinfo; | ||||
|   Classes, SysUtils, Math, typinfo, | ||||
|   // LazUtils | ||||
|   FPCAdds, AvgLvlTree; | ||||
|    | ||||
| type | ||||
|   TMapIdType = (itu1, its1, itu2, its2, itu4, its4, itu8, its8, itu16, its16, | ||||
|  | ||||
| @ -42,9 +42,13 @@ unit PostScriptCanvas; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, strutils, Math, Types, Graphics, LazFileUtils, | ||||
|   Forms, GraphMath, GraphType, FPImage, IntfGraphics, Printers, LCLType, | ||||
|   LCLIntf, LCLProc, PostScriptUnicode, LazUTF8, LazUTF8Classes; | ||||
|   // RTL + FCL | ||||
|   Classes, SysUtils, strutils, Math, Types, FPImage, | ||||
|   // LCL | ||||
|   Graphics, Forms, GraphMath, GraphType, IntfGraphics, Printers, | ||||
|   LCLType, LCLIntf, LCLProc, PostScriptUnicode, | ||||
|   // LazUtils | ||||
|   LazFileUtils, LazUTF8, LazUTF8Classes; | ||||
|    | ||||
| Type | ||||
| 
 | ||||
|  | ||||
| @ -25,7 +25,7 @@ unit PostScriptPrinter; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLProc, GraphType, Graphics, GraphMath, LCLIntf, Forms; | ||||
|   Classes, SysUtils, LCLProc, Graphics, GraphMath, LCLIntf, Forms; | ||||
|    | ||||
|   // uses lcllinux or winapi for RGB conversions and FORMS for application object | ||||
|    | ||||
|  | ||||
| @ -15,7 +15,8 @@ unit PostScriptUnicode; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils,Math,Maps; | ||||
|   Classes, SysUtils, Math, | ||||
|   Maps; | ||||
| 
 | ||||
| type | ||||
|   TUnicodeBlock = record | ||||
|  | ||||
| @ -24,7 +24,8 @@ unit StringHashList; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLStrConsts; | ||||
|   Classes, SysUtils, | ||||
|   LCLStrConsts; | ||||
| 
 | ||||
| type | ||||
|   PStringHashItem = ^TStringHashItem; | ||||
|  | ||||
| @ -28,7 +28,11 @@ unit TextStrings; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLStrConsts, LazUtf8Classes; | ||||
|   Classes, SysUtils, | ||||
|   // LCL | ||||
|   LCLStrConsts, | ||||
|   // LazUtils | ||||
|   LazUtf8Classes; | ||||
|    | ||||
| type | ||||
|   { TTextStrings } | ||||
|  | ||||
| @ -86,9 +86,12 @@ unit Translations; | ||||
| interface | ||||
| 
 | ||||
| uses | ||||
|   Classes, SysUtils, LCLProc, FileUtil, LazFileUtils, StringHashList, AvgLvlTree, | ||||
|   LConvEncoding, LazUTF8, LazUTF8Classes, | ||||
|   {$IF FPC_FULLVERSION>=30001}jsonscanner,{$ENDIF} jsonparser, fpjson; | ||||
|   Classes, SysUtils, | ||||
|   {$IF FPC_FULLVERSION>=30001}jsonscanner,{$ENDIF} jsonparser, fpjson, | ||||
|   // LCL | ||||
|   LCLProc, StringHashList, | ||||
|   // LazUtils | ||||
|   FileUtil, LazFileUtils, AvgLvlTree, LConvEncoding, LazUTF8, LazUTF8Classes; | ||||
| 
 | ||||
| type | ||||
|   TStringsType = ( | ||||
|  | ||||
| @ -1046,7 +1046,8 @@ begin | ||||
|     if TargetCPU='' then TargetCPU:=GetCompiledTargetCPU; | ||||
|     LCLWidgetType:='$(LCLWidgetType)'; | ||||
|     GlobalMacroList.SubstituteStr(LCLWidgetType); | ||||
|     if LCLWidgetType='' then LCLWidgetType:=LCLPlatformDirNames[GetDefaultLCLWidgetType]; | ||||
|     if LCLWidgetType='' then | ||||
|       LCLWidgetType:=GetLCLWidgetTypeName; | ||||
| 
 | ||||
|     {$IFDEF VerboseCheckInterPkgFiles} | ||||
|     debugln(['CheckInterPkgFiles TargetOS=',TargetOS,' TargetCPU=',TargetCPU,' LCLWidgetType=',LCLWidgetType]); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 juha
						juha