Changeset 423 for trunk/Packages


Ignore:
Timestamp:
Apr 25, 2022, 6:01:01 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Do not use explicit mode delphi directive as it is already set in project.
  • Modified: Use UNIX instead of LINUX for conditional code to work also on FreeBSD.
Location:
trunk/Packages
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/DrawDlg.pas

    r413 r423  
    11unit DrawDlg;
    22
    3 {$mode delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF LINUX}LMessages,{$ENDIF}
     6  Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF}
    97  Messages, Graphics, Controls, ButtonBase, ButtonA, ButtonB, Area, ScreenTools
    108  {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF};
     
    7674  MoveActive := False;
    7775  AddHandlerOnVisibleChanged(VisibleChangedHandler);
    78   {$IFDEF LINUX}
     76  {$IFDEF UNIX}
    7977  OnDeactivate := DoDeactivate;
    8078  {$ENDIF}
     
    131129  MousePos1: TPoint;
    132130  MousePos2: TPoint;
    133 {$IFDEF LINUX}
     131{$IFDEF UNIX}
    134132  MousePosNew: TPoint;
    135133  NewFormPos: TPoint;
     
    139137  inherited;
    140138  MousePos2 := Mouse.CursorPos;
    141   {$IFDEF LINUX}
     139  {$IFDEF UNIX}
    142140  // Only if client is not doing own mouse move handling
    143141  if not Assigned(OnMouseDown) or not Assigned(OnMouseMove) or not Assigned(OnMouseUp) then begin
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r417 r423  
    16471647  I: Integer;
    16481648begin
    1649   {$IFDEF LINUX}
     1649  {$IFDEF UNIX}
    16501650  // Wait and process messages little bit to avoid crash or force repaint under Gtk2
    16511651  for I := 0 to 10 do begin
  • trunk/Packages/CevoComponents/Sound.pas

    r383 r423  
    77  StringTables, Directories, LCLType
    88  {$IFDEF WINDOWS}, MMSystem, Windows{$ENDIF}
    9   {$IFDEF LINUX}, Process, AsyncProcess2{$ENDIF};
     9  {$IFDEF UNIX}, Process, AsyncProcess2{$ENDIF};
    1010
    1111type
     
    2929  TSound = class
    3030  private
    31     {$IFDEF LINUX}
     31    {$IFDEF UNIX}
    3232    PlayCommand: string;
    3333    SoundPlayerAsyncProcess: TAsyncProcess;
     
    6363{$R *.lfm}
    6464
    65 {$IFDEF LINUX}
     65{$IFDEF UNIX}
    6666resourcestring
    6767  SUnableToPlay = 'PlayStyle=%s: Unable to play %s Message:%s';
     
    8888  end
    8989  {$ENDIF}
    90   {$IFDEF LINUX}
     90  {$IFDEF UNIX}
    9191  PlayCommand := GetNonWindowsPlayCommand;
    9292  FDeviceID := 1;
     
    100100    mciSendCommand(FDeviceID, MCI_CLOSE, MCI_WAIT, 0);
    101101  {$ENDIF}
    102   {$IFDEF LINUX}
     102  {$IFDEF UNIX}
    103103  FreeAndNil(SoundPlayerSyncProcess);
    104104  FreeAndNil(SoundPlayerAsyncProcess);
     
    162162  PlayParm: TMCI_Play_Parms;
    163163{$ENDIF}
    164 {$IFDEF LINUX}
     164{$IFDEF UNIX}
    165165var
    166166  L: TStringList;
     
    175175  end
    176176  {$ENDIF}
    177   {$IFDEF LINUX}
     177  {$IFDEF UNIX}
    178178  // How to play in Linux? Use generic Linux commands
    179179  // Use asyncprocess to play sound as SND_ASYNC
     
    232232  mciSendCommand(FDeviceID, MCI_STOP, 0, 0);
    233233  {$ENDIF}
    234   {$IFDEF LINUX}
     234  {$IFDEF UNIX}
    235235  if SoundPlayerSyncProcess <> nil then SoundPlayerSyncProcess.Terminate(1);
    236236  if SoundPlayerAsyncProcess <> nil then SoundPlayerAsyncProcess.Terminate(1);
  • trunk/Packages/Common/StopWatch.pas

    r396 r423  
    55
    66uses
    7   {$IFDEF Windows}Windows,{$ENDIF}
     7  {$IFDEF WINDOWS}Windows,{$ENDIF}
    88  SysUtils, DateUtils;
    99
     
    3232  end;
    3333
     34
    3435implementation
    3536
     
    4041  fIsRunning := False;
    4142
    42   {$IFDEF Windows}
     43  {$IFDEF WINDOWS}
    4344  fIsHighResolution := QueryPerformanceFrequency(fFrequency) ;
    4445  {$ELSE}
  • trunk/Packages/Common/UAboutDialog.pas

    r420 r423  
    11unit UAboutDialog;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UApplicationInfo.pas

    r396 r423  
    11unit UApplicationInfo;
    2 
    3 {$mode delphi}
    42
    53interface
     
    5957procedure Register;
    6058
     59
    6160implementation
    6261
  • trunk/Packages/Common/UCommon.pas

    r420 r423  
    11unit UCommon;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   {$ifdef Windows}Windows,{$endif}
    9   {$ifdef Linux}baseunix,{$endif}
     6  {$IFDEF WINDOWS}Windows,{$ENDIF}
     7  {$IFDEF UNIX}baseunix,{$ENDIF}
    108  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
    119  FileUtil; //, ShFolder, ShellAPI;
     
    3533  DLLHandle1: HModule;
    3634
    37 {$IFDEF Windows}
     35{$IFDEF WINDOWS}
    3836  GetUserNameEx: procedure (NameFormat: DWORD;
    3937    lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
     
    302300end;
    303301
    304 {$IFDEF Windows}
     302{$IFDEF WINDOWS}
    305303function GetUserName: string;
    306304const
     
    323321  end;
    324322end;
    325 {$endif}
     323{$ENDIF}
    326324
    327325function ComputerName: string;
    328 {$ifdef mswindows}
     326{$IFDEF WINDOWS}
    329327const
    330328 INFO_BUFFER_SIZE = 32767;
     
    341339  end;
    342340end;
    343 {$endif}
    344 {$ifdef unix}
     341{$ENDIF}
     342{$IFDEF UNIX}
    345343var
    346344  Name: UtsName;
     
    349347  Result := Name.Nodename;
    350348end;
    351 {$endif}
    352 
    353 {$ifdef windows}
     349{$ENDIF}
     350
     351{$IFDEF WINDOWS}
    354352function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    355353const
     
    429427procedure LoadLibraries;
    430428begin
    431   {$IFDEF Windows}
     429  {$IFDEF WINDOWS}
    432430  DLLHandle1 := LoadLibrary('secur32.dll');
    433431  if DLLHandle1 <> 0 then
     
    440438procedure FreeLibraries;
    441439begin
    442   {$IFDEF Windows}
     440  {$IFDEF WINDOWS}
    443441  if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1);
    444442  {$ENDIF}
  • trunk/Packages/Common/UDebugLog.pas

    r396 r423  
    11unit UDebugLog;
    2 
    3 {$mode delphi}
    42
    53interface
     
    4442
    4543procedure Register;
     44
    4645
    4746implementation
  • trunk/Packages/Common/UDelay.pas

    r396 r423  
    11unit UDelay;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UFindFile.pas

    r396 r423  
    5959  FilterAll = '*.*';
    6060{$ENDIF}
    61 {$IFDEF LINUX}
     61{$IFDEF UNIX}
    6262  FilterAll = '*';
    6363{$ENDIF}
  • trunk/Packages/Common/UFormAbout.pas

    r420 r423  
    11unit UFormAbout;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UGeometric.pas

    r396 r423  
    11unit UGeometric;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2624function RectEnlarge(Rect: TRect; Value: Integer): TRect;
    2725function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
     26
    2827
    2928implementation
  • trunk/Packages/Common/UJobProgressView.pas

    r396 r423  
    11unit UJobProgressView;
    2 
    3 {$MODE Delphi}
    42
    53interface
  • trunk/Packages/Common/ULanguages.pas

    r416 r423  
    11unit ULanguages;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
  • trunk/Packages/Common/ULastOpenedList.pas

    r396 r423  
    11unit ULastOpenedList;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UListViewSort.pas

    r420 r423  
    22
    33// Date: 2019-05-17
    4 
    5 {$mode delphi}
    64
    75interface
  • trunk/Packages/Common/UMemory.pas

    r396 r423  
    11unit UMemory;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4341    property Position: Integer read FPosition write FPosition;
    4442  end;
     43
    4544
    4645implementation
  • trunk/Packages/Common/UMetaCanvas.pas

    r420 r423  
    11unit UMetaCanvas;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UPersistentForm.pas

    r396 r423  
    11unit UPersistentForm;
    2 
    3 {$mode delphi}
    42
    53// Date: 2020-11-26
  • trunk/Packages/Common/UPool.pas

    r396 r423  
    11unit UPool;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
  • trunk/Packages/Common/UPrefixMultiplier.pas

    r396 r423  
    22
    33// Date: 2010-06-01
    4 
    5 {$mode delphi}
    64
    75interface
  • trunk/Packages/Common/URegistry.pas

    r396 r423  
    11unit URegistry;
    2 
    3 {$MODE delphi}
    42
    53interface
     
    132130function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean;
    133131begin
    134   {$IFDEF Linux}
     132  {$IFDEF UNIX}
    135133  //CloseKey;
    136134  {$ENDIF}
  • trunk/Packages/Common/UResetableThread.pas

    r396 r423  
    11unit UResetableThread;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
  • trunk/Packages/Common/UScaleDPI.pas

    r420 r423  
    22
    33{ See: http://wiki.lazarus.freepascal.org/High_DPI }
    4 
    5 {$mode delphi}{$H+}
    64
    75interface
     
    227225    Temp[I] := TBitmap.Create;
    228226    Temp[I].SetSize(NewWidth, NewHeight);
    229     {$IFDEF Linux}
     227    {$IFDEF UNIX}
    230228    Temp[I].PixelFormat := pf24bit;
    231229    {$ELSE}
  • trunk/Packages/Common/USyncCounter.pas

    r396 r423  
    11unit USyncCounter;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2523    procedure Assign(Source: TSyncCounter);
    2624  end;
     25
    2726
    2827implementation
  • trunk/Packages/Common/UThreading.pas

    r420 r423  
    11unit UThreading;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UTranslator.pas

    r418 r423  
    11unit UTranslator;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
  • trunk/Packages/Common/UURI.pas

    r396 r423  
    22
    33// Date: 2011-04-04
    4 
    5 {$mode delphi}
    64
    75interface
     
    8482    property AsString: string read GetAsString write SetAsString;
    8583  end;
     84
    8685
    8786implementation
  • trunk/Packages/Common/UXMLUtils.pas

    r396 r423  
    11unit UXMLUtils;
    2 
    3 {$mode delphi}
    42
    53interface
Note: See TracChangeset for help on using the changeset viewer.