summaryrefslogtreecommitdiff
path: root/src/corelib/gdi/fpg_utils_impl.inc
blob: d3bb2f0c797c308bb264b8034d8536b5053e1110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{%mainunit fpg_utils.pas}

uses
  Shellapi;
  
// GDI specific implementations of encoding functions

function fpgToOSEncoding(aString: TfpgString): string;
begin
  Result := Utf8ToAnsi(aString);
end;

function fpgFromOSEncoding(aString: string): TfpgString;
begin
  Result := AnsiToUtf8(aString);
end;

procedure fpgOpenURL(const aURL: TfpgString);
begin
  try
    {$IFNDEF wince}
    ShellExecute(0, 'open', PChar(aURL), nil, nil, 1 {SW_SHOWNORMAL});
    {$ENDIF}
  except
    // do nothing
  end;
end;