VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/threads/nsIEventQueue.idl@ 106112

Last change on this file since 106112 was 106112, checked in by vboxsync, 4 weeks ago

libs/xpcom: Fix building code using the XPCOM SDK bindings outside of VirtualBox, ticketref:22714 bugref:10773

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is Mozilla Communicator client code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 * David Hyatt <hyatt@netscape.com>
24 * Suresh Duddi <dp@netscape.com>
25 * Doug Turner <dougt@netscape.com>
26 * Judson Valeski <valeski@netscape.com>
27 * Dan Matejka <danm@netscape.com>
28 * Ray Whitmer <rayw@netscape.com>
29 * Dan Mosedale <dmose@mozilla.org>
30 *
31 * Alternatively, the contents of this file may be used under the terms of
32 * either of the GNU General Public License Version 2 or later (the "GPL"),
33 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
34 * in which case the provisions of the GPL or the LGPL are applicable instead
35 * of those above. If you wish to allow use of your version of this file only
36 * under the terms of either the GPL or the LGPL, and not to allow others to
37 * use your version of this file under the terms of the MPL, indicate your
38 * decision by deleting the provisions above and replace them with the notice
39 * and other provisions required by the GPL or the LGPL. If you do not delete
40 * the provisions above, a recipient may use your version of this file under
41 * the terms of any one of the MPL, the GPL or the LGPL.
42 *
43 * ***** END LICENSE BLOCK ***** */
44
45#include "nsIEventTarget.idl"
46
47%{C++
48#ifdef VBOX
49# include <iprt/thread.h>
50#else
51typedef struct RTTHREADINT *RTTHREAD;
52#endif
53
54// {13D86C61-00A9-11d3-9F2A-00400553EEF0}
55#define NS_EVENTQUEUE_CID \
56{ 0x13d86c61, 0xa9, 0x11d3, { 0x9f, 0x2a, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
57
58#define NS_EVENTQUEUE_CONTRACTID "@mozilla.org/event-queue;1"
59#define NS_EVENTQUEUE_CLASSNAME "Event Queue"
60
61%}
62
63// some forward decls
64//
65[ptr] native PLEventQueuePtr(PLEventQueue);
66[ptr] native RTTHREAD(RTTHREADINT);
67native PRStatus(PRStatus);
68[ref] native PRBoolRef(PRBool);
69native PLHandleEventProc(PLHandleEventProc);
70native PLDestroyEventProc(PLDestroyEventProc);
71
72[scriptable, uuid(176AFB41-00A4-11d3-9F2A-00400553EEF0)]
73interface nsIEventQueue : nsIEventTarget
74{
75 [noscript] void initEvent(in PLEventPtr aEvent,
76 in voidPtr owner,
77 in PLHandleEventProc handler,
78 in PLDestroyEventProc destructor);
79
80 [noscript] void postSynchronousEvent(in PLEventPtr aEvent,
81 out voidPtr aResult);
82
83 boolean pendingEvents();
84 void processPendingEvents();
85 void eventLoop();
86
87 [noscript] void eventAvailable(in PRBoolRef aResult);
88 [noscript] PLEventPtr getEvent();
89 [noscript] void handleEvent(in PLEventPtr aEvent);
90 [noscript] PLEventPtr waitForEvent();
91
92 [notxpcom] PRInt32 getEventQueueSelectFD();
93
94 void init(in boolean aNative);
95 [noscript] void initFromPRThread(in RTTHREAD thread,
96 in boolean aNative);
97 [noscript] void initFromPLQueue(in PLEventQueuePtr aQueue);
98
99 void enterMonitor();
100 void exitMonitor();
101
102 [noscript] void revokeEvents(in voidPtr owner);
103 [noscript] PLEventQueuePtr getPLEventQueue();
104
105 boolean isQueueNative();
106
107 // effectively kill the queue. warning: the queue is allowed to delete
108 // itself any time after this.
109 void stopAcceptingEvents();
110};
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette