Ignore:
Timestamp:
Apr 25, 2022, 6:01:01 PM (3 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/CevoComponents
Files:
3 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);
Note: See TracChangeset for help on using the changeset viewer.