Make it compatible with XULRunner 2.0.0.8pre
It must be compiled with -dXULRUNNER2 as some interfaces has changed the iid and interface. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1398 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
039afe9efa
commit
bfef390ae7
@ -2927,6 +2927,15 @@ type
|
|||||||
procedure SizeToContent(); safecall;
|
procedure SizeToContent(); safecall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF XULRUNNER2}
|
||||||
|
nsIDOMWindow2 = interface(nsIDOMWindow)
|
||||||
|
['{a6cf906b-15b3-11d2-932e-00805f8add32}']
|
||||||
|
function GetWindowRoot(): nsIDOMEventTarget; safecall;
|
||||||
|
property WindowRoot: nsIDOMEventTarget read GetWindowRoot;
|
||||||
|
function GetApplicationCache(): nsIDOMOfflineResourceList; safecall;
|
||||||
|
property ApplicationCache: nsIDOMOfflineResourceList read GetApplicationCache;
|
||||||
|
end;
|
||||||
|
{$ELSE XULRUNNER2}
|
||||||
nsIDOMWindow2 = interface(nsIDOMWindow)
|
nsIDOMWindow2 = interface(nsIDOMWindow)
|
||||||
['{73c5fa35-3add-4c87-a303-a850ccf4d65a}']
|
['{73c5fa35-3add-4c87-a303-a850ccf4d65a}']
|
||||||
function GetWindowRoot(): nsIDOMEventTarget; safecall;
|
function GetWindowRoot(): nsIDOMEventTarget; safecall;
|
||||||
@ -2934,6 +2943,7 @@ type
|
|||||||
function GetApplicationCache(): nsIDOMOfflineResourceList; safecall;
|
function GetApplicationCache(): nsIDOMOfflineResourceList; safecall;
|
||||||
property ApplicationCache: nsIDOMOfflineResourceList read GetApplicationCache;
|
property ApplicationCache: nsIDOMOfflineResourceList read GetApplicationCache;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
nsIDOMWindowCollection = interface(nsISupports)
|
nsIDOMWindowCollection = interface(nsISupports)
|
||||||
['{a6cf906f-15b3-11d2-932e-00805f8add32}']
|
['{a6cf906f-15b3-11d2-932e-00805f8add32}']
|
||||||
@ -3829,6 +3839,24 @@ type
|
|||||||
function GetWeakReference(): nsIWeakReference; safecall;
|
function GetWeakReference(): nsIWeakReference; safecall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF XULRUNNER2}
|
||||||
|
nsIWebBrowser = interface(nsISupports)
|
||||||
|
['{33e9d001-caab-4ba9-8961-54902f197202}']
|
||||||
|
procedure AddWebBrowserListener(aListener: nsIWeakReference; constref aIID: TGUID); safecall;
|
||||||
|
procedure RemoveWebBrowserListener(aListener: nsIWeakReference; constref aIID: TGUID); safecall;
|
||||||
|
function GetContainerWindow(): nsIWebBrowserChrome; safecall;
|
||||||
|
procedure SetContainerWindow(aContainerWindow: nsIWebBrowserChrome); safecall;
|
||||||
|
property ContainerWindow: nsIWebBrowserChrome read GetContainerWindow write SetContainerWindow;
|
||||||
|
function GetParentURIContentListener(): nsIURIContentListener; safecall;
|
||||||
|
procedure SetParentURIContentListener(aParentURIContentListener: nsIURIContentListener); safecall;
|
||||||
|
property ParentURIContentListener: nsIURIContentListener read GetParentURIContentListener write SetParentURIContentListener;
|
||||||
|
function GetContentDOMWindow(): nsIDOMWindow; safecall;
|
||||||
|
property ContentDOMWindow: nsIDOMWindow read GetContentDOMWindow;
|
||||||
|
function GetIsActive: PRBool; safecall;
|
||||||
|
procedure SetIsActive(aIsActive: PRBool); safecall;
|
||||||
|
property IsActive: PRBool read GetIsActive write SetIsActive;
|
||||||
|
end;
|
||||||
|
{$ELSE XULRUNNER2}
|
||||||
nsIWebBrowser = interface(nsISupports)
|
nsIWebBrowser = interface(nsISupports)
|
||||||
['{69e5df00-7b8b-11d3-af61-00a024ffc08c}']
|
['{69e5df00-7b8b-11d3-af61-00a024ffc08c}']
|
||||||
procedure AddWebBrowserListener(aListener: nsIWeakReference; constref aIID: TGUID); safecall;
|
procedure AddWebBrowserListener(aListener: nsIWeakReference; constref aIID: TGUID); safecall;
|
||||||
@ -3842,6 +3870,7 @@ type
|
|||||||
function GetContentDOMWindow(): nsIDOMWindow; safecall;
|
function GetContentDOMWindow(): nsIDOMWindow; safecall;
|
||||||
property ContentDOMWindow: nsIDOMWindow read GetContentDOMWindow;
|
property ContentDOMWindow: nsIDOMWindow read GetContentDOMWindow;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
nsIWebBrowserChrome = interface(nsISupports)
|
nsIWebBrowserChrome = interface(nsISupports)
|
||||||
['{ba434c60-9d52-11d3-afb0-00a024ffc08c}']
|
['{ba434c60-9d52-11d3-afb0-00a024ffc08c}']
|
||||||
|
@ -120,6 +120,12 @@ var
|
|||||||
aAppDirProvider: nsIDirectoryServiceProvider;
|
aAppDirProvider: nsIDirectoryServiceProvider;
|
||||||
const aStaticComponents: PStaticModuleInfoArray;
|
const aStaticComponents: PStaticModuleInfoArray;
|
||||||
aStaticComponentCount: PRUint32): nsresult; cdecl;
|
aStaticComponentCount: PRUint32): nsresult; cdecl;
|
||||||
|
{$IFDEF XULRUNNER2}
|
||||||
|
initEmbedding2Func :
|
||||||
|
function (aLibXulDirectory: nsILocalFile;
|
||||||
|
aAppDirectory: nsILocalFile;
|
||||||
|
aAppDirProvider: nsIDirectoryServiceProvider): nsresult; cdecl;
|
||||||
|
{$ENDIF}
|
||||||
notifyProfileFunc : procedure (); cdecl;
|
notifyProfileFunc : procedure (); cdecl;
|
||||||
termEmbeddingFunc : procedure (); cdecl;
|
termEmbeddingFunc : procedure (); cdecl;
|
||||||
createAppDataFunc :
|
createAppDataFunc :
|
||||||
@ -291,6 +297,9 @@ begin
|
|||||||
getStaticComponentsFunc := GetProcAddress(xulModule, 'XRE_GetStaticComponents');
|
getStaticComponentsFunc := GetProcAddress(xulModule, 'XRE_GetStaticComponents');
|
||||||
lockProfileDirectoryFunc := GetProcAddress(xulModule, 'XRE_LockProfileDirectory');
|
lockProfileDirectoryFunc := GetProcAddress(xulModule, 'XRE_LockProfileDirectory');
|
||||||
initEmbeddingFunc := GetProcAddress(xulModule, 'XRE_InitEmbedding');
|
initEmbeddingFunc := GetProcAddress(xulModule, 'XRE_InitEmbedding');
|
||||||
|
{$IFDEF XULRUNNER2}
|
||||||
|
initEmbedding2Func := GetProcAddress(xulModule, 'XRE_InitEmbedding2');
|
||||||
|
{$ENDIF}
|
||||||
notifyProfileFunc := GetProcAddress(xulModule, 'XRE_NotifyProfile');
|
notifyProfileFunc := GetProcAddress(xulModule, 'XRE_NotifyProfile');
|
||||||
termEmbeddingFunc := GetProcAddress(xulModule, 'XRE_TermEmbedding');
|
termEmbeddingFunc := GetProcAddress(xulModule, 'XRE_TermEmbedding');
|
||||||
createAppDataFunc := GetProcAddress(xulModule, 'XRE_CreateAppData');
|
createAppDataFunc := GetProcAddress(xulModule, 'XRE_CreateAppData');
|
||||||
@ -478,6 +487,13 @@ begin
|
|||||||
aStaticComponents,
|
aStaticComponents,
|
||||||
aStaticComponentCount)
|
aStaticComponentCount)
|
||||||
else
|
else
|
||||||
|
{$IFDEF XULRUNNER2}
|
||||||
|
if Assigned(initEmbedding2Func) then
|
||||||
|
Result := initEmbedding2Func(aLibXulDirectory,
|
||||||
|
aAppDirectory,
|
||||||
|
aAppDirProvider)
|
||||||
|
else
|
||||||
|
{$ENDIF}
|
||||||
Result := NS_ERROR_NOT_IMPLEMENTED;
|
Result := NS_ERROR_NOT_IMPLEMENTED;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user