1 // THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
2 // EDITING IS PROBABLY UNWISE
3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // Copyright (c) 2007, 2008 Novell, Inc.
25 // Andreia Gaita (avidigal@novell.com)
29 using System
.Runtime
.InteropServices
;
30 using System
.Runtime
.CompilerServices
;
33 namespace Mono
.Mozilla
{
35 [Guid ("436a83fa-b396-11d9-bcfa-00112478d626")]
36 [InterfaceType (ComInterfaceType
.InterfaceIsIUnknown
)]
38 internal interface nsITimer
{
41 [PreserveSigAttribute
]
42 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
43 int init ([MarshalAs (UnmanagedType
.Interface
) ] nsIObserver aObserver
,
47 [PreserveSigAttribute
]
48 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
49 int initWithFuncCallback ( nsITimerCallbackDelegate aCallback
,
54 [PreserveSigAttribute
]
55 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
56 int initWithCallback ([MarshalAs (UnmanagedType
.Interface
) ] nsITimerCallback aCallback
,
60 [PreserveSigAttribute
]
61 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
64 [PreserveSigAttribute
]
65 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
66 int getDelay (out uint ret
);
68 [PreserveSigAttribute
]
69 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
70 int setDelay (uint value);
72 [PreserveSigAttribute
]
73 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
74 int getType (out uint ret
);
76 [PreserveSigAttribute
]
77 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
78 int setType (uint value);
80 [PreserveSigAttribute
]
81 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
82 int getClosure ( IntPtr ret
);
84 [PreserveSigAttribute
]
85 [MethodImpl (MethodImplOptions
.InternalCall
, MethodCodeType
= MethodCodeType
.Runtime
)]
86 int getCallback ([MarshalAs (UnmanagedType
.Interface
) ] out nsITimerCallback ret
);
92 internal class nsTimer
{
93 public static nsITimer
GetProxy (Mono
.WebBrowser
.IWebBrowser control
, nsITimer obj
)
95 object o
= Base
.GetProxyForObject (control
, typeof(nsITimer
).GUID
, obj
);
103 using System
.Runtime
.InteropServices
;
104 using System
.Runtime
.CompilerServices
;
107 internal class Timer
: nsITimer
{
110 int nsITimer
.init ([MarshalAs (UnmanagedType
.Interface
) ] nsIObserver aObserver
,
119 int nsITimer
.initWithFuncCallback ( nsITimerCallbackDelegate aCallback
,
129 int nsITimer
.initWithCallback ([MarshalAs (UnmanagedType
.Interface
) ] nsITimerCallback aCallback
,
138 int nsITimer
.cancel ()
145 int nsITimer
.getDelay (out uint ret
)
151 int nsITimer
.setDelay (uint value)
158 int nsITimer
.getType (out uint ret
)
164 int nsITimer
.setType (uint value)
171 int nsITimer
.getClosure ( IntPtr ret
)
177 int nsITimer
.getCallback ([MarshalAs (UnmanagedType
.Interface
) ] out nsITimerCallback ret
)