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