1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-apple-macosx10.7.2
6 typedef unsigned char PRUint8
;
7 typedef unsigned int PRUint32
;
9 typedef PRUint32 nsresult
;
19 template < class T
> struct nsCOMTypeInfo
21 static const nsIID
& GetIID ()
23 static const nsIID i
= {};
29 class nsIDOMEvent
:public nsISupports
32 class nsIDOMEventListener
:public nsISupports
34 public:static const nsIID
& GetIID ()
36 static const nsIID i
= {};
40 __attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent
* event
) =
43 class nsIDOMMouseListener
:public nsIDOMEventListener
45 public:static const nsIID
& GetIID ()
47 static const nsIID iid
= {
52 __attribute__ ((regparm (0),
53 cdecl)) MouseDown (nsIDOMEvent
* aMouseEvent
) = 0;
56 typeof (&nsIDOMEventListener::HandleEvent
)
58 struct EventDispatchData
61 GenericHandler method
;
66 const EventDispatchData
*events
;
70 static const EventDispatchData sMouseEvents
[] = {
73 reinterpret_cast < GenericHandler
> (&nsIDOMMouseListener::MouseDown
),
76 static const EventTypeData sEventTypes
[] = {
78 sMouseEvents
, (sizeof (sMouseEvents
) / sizeof (sMouseEvents
[0])),
79 &nsCOMTypeInfo
< nsIDOMMouseListener
>::GetIID ()}