mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 04:19:31 +02:00
IDE: enabled AROS' system clipboard code also for Amiga and MorphOS
git-svn-id: trunk@29406 -
This commit is contained in:
parent
285f564ed1
commit
e24f59fb9f
@ -115,10 +115,15 @@ const
|
|||||||
hint_editcut = 'Remove the selected text and put it in the clipboard';
|
hint_editcut = 'Remove the selected text and put it in the clipboard';
|
||||||
hint_editcopy = 'Copy the selected text in the clipboard';
|
hint_editcopy = 'Copy the selected text in the clipboard';
|
||||||
hint_editpaste = 'Insert selected text from the clipboard at the cursor position';
|
hint_editpaste = 'Insert selected text from the clipboard at the cursor position';
|
||||||
|
{$ifdef HASAMIGA}
|
||||||
{$ifdef AROS}
|
{$ifdef AROS}
|
||||||
hint_editcopywin = 'Copy the selected text in AROS clipboard';
|
hint_editcopywin = 'Copy the selected text in AROS clipboard';
|
||||||
hint_editpastewin = 'Insert selected text from AROS clipboard at the cursor position';
|
hint_editpastewin = 'Insert selected text from AROS clipboard at the cursor position';
|
||||||
{$else}
|
{$else}
|
||||||
|
hint_editcopywin = 'Copy the selected text to the system clipboard';
|
||||||
|
hint_editpastewin = 'Insert selected text from the system clipboard at the cursor position';
|
||||||
|
{$endif}
|
||||||
|
{$else}
|
||||||
hint_editcopywin = 'Copy the selected text in windows clipboard';
|
hint_editcopywin = 'Copy the selected text in windows clipboard';
|
||||||
hint_editpastewin = 'Insert selected text from windows clipboard at the cursor position';
|
hint_editpastewin = 'Insert selected text from windows clipboard at the cursor position';
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -235,10 +235,15 @@ resourcestring menu_local_gotosource = '~G~oto source';
|
|||||||
menu_file_exit = 'E~x~it';
|
menu_file_exit = 'E~x~it';
|
||||||
|
|
||||||
menu_edit = '~E~dit';
|
menu_edit = '~E~dit';
|
||||||
|
{$ifdef HASAMIGA}
|
||||||
{$ifdef AROS}
|
{$ifdef AROS}
|
||||||
menu_edit_copywin = 'Cop~y~ to AROS';
|
menu_edit_copywin = 'Cop~y~ to AROS';
|
||||||
menu_edit_pastewin = 'Paste from A~R~OS';
|
menu_edit_pastewin = 'Paste from A~R~OS';
|
||||||
{$else}
|
{$else}
|
||||||
|
menu_edit_copywin = 'Cop~y~ to System';
|
||||||
|
menu_edit_pastewin = 'Paste from Syste~m~';
|
||||||
|
{$endif}
|
||||||
|
{$else}
|
||||||
menu_edit_copywin = 'Cop~y~ to Windows';
|
menu_edit_copywin = 'Cop~y~ to Windows';
|
||||||
menu_edit_pastewin = 'Paste from ~W~indows';
|
menu_edit_pastewin = 'Paste from ~W~indows';
|
||||||
{$endif}
|
{$endif}
|
||||||
|
@ -100,10 +100,12 @@
|
|||||||
|
|
||||||
{$ifdef Amiga}
|
{$ifdef Amiga}
|
||||||
{$define FSCaseInsensitive}
|
{$define FSCaseInsensitive}
|
||||||
|
{$define WinClipSupported}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef MorphOS}
|
{$ifdef MorphOS}
|
||||||
{$define FSCaseInsensitive}
|
{$define FSCaseInsensitive}
|
||||||
|
{$define WinClipSupported}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
{$ifdef AROS}
|
{$ifdef AROS}
|
||||||
|
@ -46,11 +46,12 @@ implementation
|
|||||||
strings,windows;
|
strings,windows;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
|
|
||||||
{$ifdef aros}
|
{$ifdef HASAMIGA}
|
||||||
uses
|
uses
|
||||||
clipboard;
|
clipboard,cliputils;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
{$ifdef DOS}
|
{$ifdef DOS}
|
||||||
function WinClipboardSupported : boolean;
|
function WinClipboardSupported : boolean;
|
||||||
var
|
var
|
||||||
@ -134,7 +135,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
|
|
||||||
{$ifdef Aros}
|
{$ifdef HASAMIGA}
|
||||||
function WinClipboardSupported: Boolean;
|
function WinClipboardSupported: Boolean;
|
||||||
begin
|
begin
|
||||||
WinClipboardSupported := True;
|
WinClipboardSupported := True;
|
||||||
@ -162,7 +163,7 @@ begin
|
|||||||
Text := GetTextFromClip(PRIMARY_CLIP);
|
Text := GetTextFromClip(PRIMARY_CLIP);
|
||||||
InternGetDataSize := Length(Text);
|
InternGetDataSize := Length(Text);
|
||||||
end;
|
end;
|
||||||
{$endif Aros}
|
{$endif HASAMIGA}
|
||||||
|
|
||||||
|
|
||||||
function GetTextWinClipboardSize : longint;
|
function GetTextWinClipboardSize : longint;
|
||||||
@ -182,10 +183,10 @@ var
|
|||||||
h : HGlobal;
|
h : HGlobal;
|
||||||
pp : pchar;
|
pp : pchar;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
{$ifdef aros}
|
{$ifdef HASAMIGA}
|
||||||
Text: AnsiString;
|
Text: AnsiString;
|
||||||
pp: PChar;
|
pp: PChar;
|
||||||
{$endif aros}
|
{$endif HASAMIGA}
|
||||||
begin
|
begin
|
||||||
p:=nil;
|
p:=nil;
|
||||||
GetTextWinClipBoardData:=False;
|
GetTextWinClipBoardData:=False;
|
||||||
@ -220,14 +221,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
GetTextWinClipBoardData:=h<>0;
|
GetTextWinClipBoardData:=h<>0;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
{$ifdef aros}
|
{$ifdef HASAMIGA}
|
||||||
Text := GetTextFromClip(0) + #0;
|
Text := GetTextFromClip(0) + #0;
|
||||||
PP := @Text[1];
|
PP := @Text[1];
|
||||||
l := Length(Text);
|
l := Length(Text);
|
||||||
GetMem(p,l);
|
GetMem(p,l);
|
||||||
Move(pp^,p^,l);
|
Move(pp^,p^,l);
|
||||||
GetTextWinClipBoardData := True;
|
GetTextWinClipBoardData := True;
|
||||||
{$endif aros}
|
{$endif HASAMIGA}
|
||||||
CloseWinClipBoard;
|
CloseWinClipBoard;
|
||||||
{$ifdef DOS}
|
{$ifdef DOS}
|
||||||
M.MoveDataFrom(l,P^);
|
M.MoveDataFrom(l,P^);
|
||||||
@ -246,10 +247,10 @@ var
|
|||||||
pp : pchar;
|
pp : pchar;
|
||||||
res : boolean;
|
res : boolean;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
{$ifdef aros}
|
{$ifdef HASAMIGA}
|
||||||
pp: PChar;
|
pp: PChar;
|
||||||
Test: AnsiString;
|
Test: AnsiString;
|
||||||
{$endif aros}
|
{$endif HASAMIGA}
|
||||||
begin
|
begin
|
||||||
SetTextWinClipBoardData:=False;
|
SetTextWinClipBoardData:=False;
|
||||||
if (l=0) or (l>65520) then
|
if (l=0) or (l>65520) then
|
||||||
@ -290,9 +291,9 @@ begin
|
|||||||
GlobalUnlock(h);
|
GlobalUnlock(h);
|
||||||
SetTextWinClipBoardData:=res;
|
SetTextWinClipBoardData:=res;
|
||||||
{$endif Windows}
|
{$endif Windows}
|
||||||
{$ifdef Aros}
|
{$ifdef HASAMIGA}
|
||||||
PutTextToClip(0, AnsiString(p));
|
PutTextToClip(0, AnsiString(p));
|
||||||
{$endif Aros}
|
{$endif HASAMIGA}
|
||||||
CloseWinClipBoard;
|
CloseWinClipBoard;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user