Committing changes to support the new nsIEventQueue interface.

This commit is contained in:
hyatt%netscape.com 1999-05-04 23:35:25 +00:00
Родитель e6fc4a4a7d
Коммит e74697248f
7 изменённых файлов: 116 добавлений и 49 удалений

Просмотреть файл

@ -29,6 +29,7 @@ plvector.h
nsXPComFactory.h
nsXPComCIID.h
nsXPIDLString.h
nsIEventQueue.h
nsIEventQueueService.h
nsICollection.h
nsIAllocator.h

Просмотреть файл

@ -52,6 +52,7 @@ EXPORTS = \
nsXPComCIID.h \
nsXPIDLString.h \
nsIEventQueueService.h \
nsIEventQueue.h \
nsIGenericFactory.h \
nsIRegistry.h \
nsrootidl.h \

Просмотреть файл

@ -47,6 +47,7 @@ EXPORTS = \
nsXPComCIID.h \
nsXPIDLString.h \
nsIEventQueueService.h \
nsIEventQueue.h \
nsIAllocator.h \
nsIRegistry.h \
nsIGenericFactory.h \

Просмотреть файл

@ -0,0 +1,53 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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/NPL/
*
* 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 Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are Copyright (C) 1998
* Netscape Communications Corporation. All Rights Reserved.
*/
#ifndef nsIEventQueue_h__
#define nsIEventQueue_h__
#include "nsISupports.h"
#include "prthread.h"
#include "plevent.h"
// {176AFB41-00A4-11d3-9F2A-00400553EEF0}
#define NS_IEVENTQUEUE_IID \
{ 0x176afb41, 0xa4, 0x11d3, { 0x9f, 0x2a, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
// {13D86C61-00A9-11d3-9F2A-00400553EEF0}
#define NS_EVENTQUEUE_CID \
{ 0x13d86c61, 0xa9, 0x11d3, { 0x9f, 0x2a, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
class nsIEventQueue : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IEVENTQUEUE_IID; return iid;}
NS_IMETHOD_(PRStatus) PostEvent(PLEvent* aEvent) = 0;
NS_IMETHOD PostSynchronousEvent(PLEvent* aEvent) = 0;
NS_IMETHOD ProcessPendingEvents() = 0;
NS_IMETHOD EventAvailable(PRBool& aResult) = 0;
NS_IMETHOD GetEvent(PLEvent** aResult) = 0;
NS_IMETHOD_(PRInt32) GetEventQueueSelectFD() = 0;
NS_IMETHOD Init() = 0;
NS_IMETHOD InitFromPLQueue(PLEventQueue* aQueue) = 0;
};
#endif /* nsIEventQueue_h___ */

Просмотреть файл

@ -1,47 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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/NPL/
*
* 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 Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are Copyright (C) 1998
* Netscape Communications Corporation. All Rights Reserved.
*/
#ifndef nsIEventQueueService_h__
#define nsIEventQueueService_h__
#include "nsISupports.h"
#include "prthread.h"
#include "plevent.h"
/* a6cf90dc-15b3-11d2-932e-00805f8add32 */
#define NS_IEVENTQUEUESERVICE_IID \
{ 0xa6cf90dc, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
class nsIEventQueueService : public nsISupports
{
public:
NS_IMETHOD CreateThreadEventQueue(void) = 0;
NS_IMETHOD DestroyThreadEventQueue(void) = 0;
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult) = 0;
#ifdef XP_MAC
// This is ment to be temporary until something better is worked out
NS_IMETHOD ProcessEvents() = 0;
#endif
};
#endif /* nsIEventQueueService_h___ */

Просмотреть файл

@ -0,0 +1,53 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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/NPL/
*
* 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 Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are Copyright (C) 1998
* Netscape Communications Corporation. All Rights Reserved.
*/
#ifndef nsIEventQueue_h__
#define nsIEventQueue_h__
#include "nsISupports.h"
#include "prthread.h"
#include "plevent.h"
// {176AFB41-00A4-11d3-9F2A-00400553EEF0}
#define NS_IEVENTQUEUE_IID \
{ 0x176afb41, 0xa4, 0x11d3, { 0x9f, 0x2a, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
// {13D86C61-00A9-11d3-9F2A-00400553EEF0}
#define NS_EVENTQUEUE_CID \
{ 0x13d86c61, 0xa9, 0x11d3, { 0x9f, 0x2a, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
class nsIEventQueue : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IEVENTQUEUE_IID; return iid;}
NS_IMETHOD_(PRStatus) PostEvent(PLEvent* aEvent) = 0;
NS_IMETHOD PostSynchronousEvent(PLEvent* aEvent) = 0;
NS_IMETHOD ProcessPendingEvents() = 0;
NS_IMETHOD EventAvailable(PRBool& aResult) = 0;
NS_IMETHOD GetEvent(PLEvent** aResult) = 0;
NS_IMETHOD_(PRInt32) GetEventQueueSelectFD() = 0;
NS_IMETHOD Init() = 0;
NS_IMETHOD InitFromPLQueue(PLEventQueue* aQueue) = 0;
};
#endif /* nsIEventQueue_h___ */

Просмотреть файл

@ -23,20 +23,25 @@
#include "nsISupports.h"
#include "prthread.h"
#include "plevent.h"
#include "nsIEventQueue.h"
/* a6cf90dc-15b3-11d2-932e-00805f8add32 */
#define NS_IEVENTQUEUESERVICE_IID \
{ 0xa6cf90dc, 0x15b3, 0x11d2, \
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} }
class nsIEventQueueService : public nsISupports
{
public:
NS_IMETHOD CreateThreadEventQueue(void) = 0;
NS_IMETHOD DestroyThreadEventQueue(void) = 0;
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, PLEventQueue** aResult) = 0;
NS_IMETHOD CreateFromPLEventQueue(PLEventQueue* aPLEventQueue, nsIEventQueue** aResult) = 0;
NS_IMETHOD PushThreadEventQueue(void) = 0;
NS_IMETHOD PopThreadEventQueue(void) = 0;
NS_IMETHOD GetThreadEventQueue(PRThread* aThread, nsIEventQueue** aResult) = 0;
#ifdef XP_MAC
// This is ment to be temporary until something better is worked out