1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XExtendedToolkit.idl,v $
* $Revision: 1.10 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_awt_XExtendedToolkit_idl__
#define __com_sun_star_awt_XExtendedToolkit_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_awt_XTopWindow_idl__
#include <com/sun/star/awt/XTopWindow.idl>
#endif
#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
#endif
#ifndef __com_sun_star_awt_XTopWindowListener_idl__
#include <com/sun/star/awt/XTopWindowListener.idl>
#endif
#ifndef __com_sun_star_awt_XKeyHandler_idl__
#include <com/sun/star/awt/XKeyHandler.idl>
#endif
#ifndef __com_sun_star_awt_XFocusListener_idl__
#include <com/sun/star/awt/XFocusListener.idl>
#endif
//=============================================================================
module com { module sun { module star { module awt {
//=============================================================================
/** The <type>XExtendedToolkit</type> is an extension of the <type
scope="::com::sun::star::awt">XToolkit</type> interface. It basically
provides access to three event broadcasters which are used for instance
in the context of accessibility. It is, however, not restricted to
accessibility.
<p>The first event broadcaster lets you keep track of the open top-level
windows (frames). To get the set of currently open top-level window use
the <member>XExtendedToolkit::getTopWindowCount</member> and
<member>XExtendedToolkit::getTopWindow</member> methods.</p>
<p>The second event broadcaster informs its listeners of key events.
Its listeners can, unlike with most other broadcasters/listeners,
consume events, so that other listeners will not be called for consumed
events.</p>
<p>The last event broadcaster sends events on focus changes of all
elements that can have the input focus.</p>
@deprecated
This interface was only implemented in an intermediate developer
release anyway.
@since OOo 1.1.2
*/
published interface XExtendedToolkit : ::com::sun::star::uno::XInterface
{
//-------------------------------------------------------------------------
/** This function returns the number of currently existing top-level
windows.
@return
Returns the number of top-level windows. This includes all
top-level windows, regardless of whether they are iconized,
visible, or active.
*/
long getTopWindowCount ();
//-------------------------------------------------------------------------
/** Return a reference to the specified top-level window. Note that the
number of top-level windows may change between a call to
<member>getTopWindowCount()</member> and successive calls to this
function.
@param nIndex
The index should be in the intervall from 0 up to but not
including the number of top-level windows as returned by
<member>getTopWindowCount()</member>.
@return
The returned value is a valid reference to a top-level window.
@throws IndexOutOfBoundsException
when the specified index is outside the valid range.
*/
::com::sun::star::awt::XTopWindow getTopWindow ([in] long nIndex)
raises (::com::sun::star::lang::IndexOutOfBoundsException);
//-------------------------------------------------------------------------
/** Return the currently active top-level window, i.e. which has
currently the input focus.
@return
The returned reference may be empty when no top-level window is
active.
*/
::com::sun::star::awt::XTopWindow getActiveTopWindow ();
/** Add a new listener that is called for events that involve <type
scope="::com::sun::star::awt">XTopWindow</type>s. After having
obtained the current list of exisiting top-level windows you can
keep this list up-to-date by listening to opened or closed top-level
windows. Wait for activations or deactivations of top-level windows
to keep track of the currently active frame.
@param xListener
If this is a valid reference it is inserted into the list of
listeners. It is the task of the caller to not register the
same listener twice (otherwise that listener will be called
twice.)
*/
[oneway] void addTopWindowListener (
[in] ::com::sun::star::awt::XTopWindowListener xListener);
//-------------------------------------------------------------------------
/** Remove the specified listener from the list of listeners.
@param xListener
If the reference is empty then nothing will be changed. If the
listener has been registered twice (or more) then all refrences
will be removed.
*/
[oneway] void removeTopWindowListener (
[in] ::com::sun::star::awt::XTopWindowListener xListener);
//-------------------------------------------------------------------------
/** Add a new listener that is called on <type
scope="::com::sun::star::awt">KeyEvent</type>s. Every listener is
given the opportunity to consume the event, i.e. prevent the not yet
called listeners from being called.
@param xHandler
If this is a valid reference it is inserted into the list of
handlers. It is the task of the caller to not register the
same handler twice (otherwise that listener will be called
twice.)
*/
[oneway] void addKeyHandler (
[in] ::com::sun::star::awt::XKeyHandler xHandler);
//-------------------------------------------------------------------------
/** Remove the specified listener from the list of listeners.
@param xHandler
If the reference is empty then nothing will be changed. If the
handler has been registered twice (or more) then all refrences
will be removed.
*/
[oneway] void removeKeyHandler (
[in] ::com::sun::star::awt::XKeyHandler xHandler);
//-------------------------------------------------------------------------
/** Add a new listener that is called on <type
scope="::com::sun::star::awt">FocusEvent</type>s. Use this focus
broadcaster to keep track of the object that currently has the input
focus.
@param xListener
If this is a valid reference it is inserted into the list of
listeners. It is the task of the caller to not register the
same listener twice (otherwise that listener will be called
twice.)
*/
[oneway] void addFocusListener (
[in] ::com::sun::star::awt::XFocusListener xListener);
//-------------------------------------------------------------------------
/** Remove the specified listener from the list of listeners.
@param xListener
If the reference is empty then nothing will be changed. If the
listener has been registered twice (or more) then all refrences
will be removed.
*/
[oneway] void removeFocusListener (
[in] ::com::sun::star::awt::XFocusListener xListener);
//-------------------------------------------------------------------------
/** Broadcasts the a focusGained on all registered focus listeners
@param source
The object that has gained the input focus. It should implement
<type scope="com::sun::star::accessibility">XAccessible</type>.
*/
[oneway] void fireFocusGained (
[in] ::com::sun::star::uno::XInterface source);
//-------------------------------------------------------------------------
/** Broadcasts the a focusGained on all registered focus listeners
@param source
The object that has lost the input focus. It should implement
<type scope="com::sun::star::accessibility">XAccessible</type>.
*/
[oneway] void fireFocusLost (
[in] ::com::sun::star::uno::XInterface source);
};
}; }; }; };
#endif
|