1999-10-01 12:19:08 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code is the Mozilla browser.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1999 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Stuart Parmenter <pavlov@netscape.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
native int(int);
|
1999-10-22 01:34:57 +04:00
|
|
|
[ptr] native nsIEventQueue(nsIEventQueue);
|
1999-10-01 13:55:20 +04:00
|
|
|
[ptr] native UndefinednsIWidget(nsIWidget);
|
1999-10-01 12:19:08 +04:00
|
|
|
[ref] native PRBoolRef(PRBool);
|
2000-06-03 13:46:12 +04:00
|
|
|
[ref] native voidPtrRef(void *);
|
1999-10-01 12:19:08 +04:00
|
|
|
|
|
|
|
%{ C++
|
2001-07-16 06:40:48 +04:00
|
|
|
class nsIEventQueue;
|
1999-10-01 12:19:08 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Flags for the getNativeData function.
|
|
|
|
* See GetNativeData()
|
|
|
|
*/
|
|
|
|
#define NS_NATIVE_SHELL 0
|
|
|
|
|
|
|
|
class nsIWidget;
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
|
|
[uuid(a0757c31-eeac-11d1-9ec1-00aa002fb821)]
|
|
|
|
interface nsIAppShell : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Creates an application shell
|
|
|
|
*/
|
|
|
|
|
|
|
|
void Create(inout int argc, inout string argv);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enter an event loop.
|
|
|
|
* Don't leave until application exits.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void Run();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare to process events.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void Spinup();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare to stop processing events.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void Spindown();
|
|
|
|
|
1999-10-22 01:34:57 +04:00
|
|
|
/**
|
|
|
|
* An event queue has been created or destroyed. Hook or unhook it from
|
|
|
|
* your system, as necessary.
|
|
|
|
* @param aQueue the queue in question
|
|
|
|
* @param aListen PR_TRUE for a new queue wanting hooking up. PR_FALSE
|
|
|
|
* for a queue wanting to be unhooked.
|
|
|
|
*/
|
|
|
|
void ListenToEventQueue(in nsIEventQueue aQueue, in PRBool aListen);
|
|
|
|
|
1999-10-01 12:19:08 +04:00
|
|
|
/**
|
|
|
|
* After event dispatch execute app specific code
|
|
|
|
*/
|
|
|
|
|
2000-06-03 13:46:12 +04:00
|
|
|
void GetNativeEvent(in PRBoolRef aRealEvent, in voidPtrRef aEvent);
|
1999-10-01 12:19:08 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* After event dispatch execute app specific code
|
|
|
|
*/
|
|
|
|
|
2000-06-03 13:46:12 +04:00
|
|
|
void DispatchNativeEvent(in PRBool aRealEvent, in voidPtr aEvent);
|
1999-10-01 12:19:08 +04:00
|
|
|
|
|
|
|
/**
|
2003-05-13 08:25:01 +04:00
|
|
|
* Exit the handle event loop
|
1999-10-01 12:19:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
void Exit();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsIAppShell_h__
|
|
|
|
|
|
|
|
|