* Use cdecl instead of stdcall on non-Windows

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1346 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Loesje_
2010-10-13 19:00:37 +00:00
parent 1f22a672ad
commit 2ce72c0953
26 changed files with 5092 additions and 4980 deletions

View File

@@ -34,6 +34,14 @@
* ***** END LICENSE BLOCK ***** *)
unit GeckoBrowser;
{$MACRO on}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
{$ELSE Windows}
{$DEFINE extdecl:=cdecl}
{$ENDIF}
{$IFDEF LCLCocoa}
{$MODESWITCH ObjectiveC1}
{$ENDIF}
@@ -507,7 +515,7 @@ type
procedure SetTitle(const aTitle: PWideChar); override;
function GetSiteWindow(): Pointer; override; {$IFDEF FPC} safecall; {$ENDIF}
// nsIInterfaceRequestor
function NS_GetInterface(const uuid: TGUID; out _result): nsresult; stdcall;
function NS_GetInterface(const uuid: TGUID; out _result): nsresult; extdecl;
function nsIInterfaceRequestor_std19.GetInterface = NS_GetInterface;
// nsIContextMenuListener2
procedure OnShowContextMenu(aContextFlags: PRUint32;
@@ -555,12 +563,12 @@ type
FOnNewWindow: TGeckoBrowserNewWindow;
// nsISHistoryListener
function OnHistoryNewEntry(aNewURI: nsIURI): Longword; stdcall;
function OnHistoryGoBack(aBackURI: nsIURI; out aContinue: LongBool): Longword; stdcall;
function OnHistoryGoForward(aForwardURI: nsIURI; out aContinue: LongBool): Longword; stdcall;
function OnHistoryReload(aReloadURI: nsIURI; aReloadFlags: Longword; out aContinue: LongBool): Longword; stdcall;
function OnHistoryGotoIndex(aIndex: Longint; aGotoURI: nsIURI; out aContinue: LongBool): Longword; stdcall;
function OnHistoryPurge(aNumEntries: Longint; out aContinue: LongBool): Longword; stdcall;
function OnHistoryNewEntry(aNewURI: nsIURI): Longword; extdecl;
function OnHistoryGoBack(aBackURI: nsIURI; out aContinue: LongBool): Longword; extdecl;
function OnHistoryGoForward(aForwardURI: nsIURI; out aContinue: LongBool): Longword; extdecl;
function OnHistoryReload(aReloadURI: nsIURI; aReloadFlags: Longword; out aContinue: LongBool): Longword; extdecl;
function OnHistoryGotoIndex(aIndex: Longint; aGotoURI: nsIURI; out aContinue: LongBool): Longword; extdecl;
function OnHistoryPurge(aNumEntries: Longint; out aContinue: LongBool): Longword; extdecl;
function GetHistoryEntry(index: Integer): TGeckoBrowserHisoty;
function GetHistoryPosition: Integer;

View File

@@ -34,6 +34,14 @@
* ***** END LICENSE BLOCK ***** *)
unit GeckoChromeWindow;
{$MACRO on}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
{$ELSE Windows}
{$DEFINE extdecl:=cdecl}
{$ENDIF}
{$IFDEF LCLCocoa}
{$MODESWITCH ObjectiveC1}
{$ENDIF}
@@ -91,7 +99,7 @@ type
procedure OnStatusChange(aWebProgress: nsIWebProgress; aRequest: nsIRequest; aStatus: nsresult; const aMessage: PWideChar); safecall;
procedure OnSecurityChange(aWebProgress: nsIWebProgress; aRequest: nsIRequest; state: PRUint32); safecall;
// nsIInterfaceRequestor
function NS_GetInterface(const uuid: TGUID; out Intf): nsresult; stdcall;
function NS_GetInterface(const uuid: TGUID; out Intf): nsresult; extdecl;
function nsIInterfaceRequestor_std19.GetInterface = NS_GetInterface;
// for nsIWeakReference
procedure QueryReferent(const IID: TGUID; out Obj); safecall;

View File

@@ -1,5 +1,13 @@
unit GeckoDirectoryService;
{$MACRO on}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
{$ELSE Windows}
{$DEFINE extdecl:=cdecl}
{$ENDIF}
interface
uses
@@ -70,9 +78,9 @@ type
FOwner: TCustomDirectoryServiceProvider;
constructor Create(AOwner: TCustomDirectoryServiceProvider);
function GetFile(const prop: PAnsiChar; out persistent: PRBool;
out _retval: nsIFile_std19): nsresult; stdcall;
out _retval: nsIFile_std19): nsresult; extdecl;
function GetFiles(const prop: PAnsiChar;
out _retval: nsISimpleEnumerator_std19): nsresult; stdcall;
out _retval: nsISimpleEnumerator_std19): nsresult; extdecl;
end;
procedure Register;