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