1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_awt_XUserInputInterception_idl__ 29#define __com_sun_star_awt_XUserInputInterception_idl__ 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_awt_XKeyHandler_idl__ 36#include <com/sun/star/awt/XKeyHandler.idl> 37#endif 38 39#ifndef __com_sun_star_awt_XMouseClickHandler_idl__ 40#include <com/sun/star/awt/XMouseClickHandler.idl> 41#endif 42 43module com { module sun { module star { module awt { 44 45/** Interface to add handlers for key and mouse events. A handler is not a passive 46 listener, it can even consume the event. 47 48 @since OOo 1.1.2 49 */ 50published interface XUserInputInterception : ::com::sun::star::uno::XInterface 51{ 52 /** Add a new listener that is called on <type 53 scope="::com::sun::star::awt">KeyEvent</type>s. Every listener is 54 given the opportunity to consume the event, i.e. prevent the not yet 55 called listeners from being called. 56 @param xHandler 57 If this is a valid reference it is inserted into the list of 58 handlers. It is the task of the caller to not register the 59 same handler twice (otherwise that listener will be called 60 twice.) 61 */ 62 [oneway] void addKeyHandler ( 63 [in] ::com::sun::star::awt::XKeyHandler xHandler); 64 65 66 /** Remove the specified listener from the list of listeners. 67 @param xHandler 68 If the reference is empty then nothing will be changed. If the 69 handler has been registered twice (or more) then all refrences 70 will be removed. 71 */ 72 [oneway] void removeKeyHandler ( 73 [in] ::com::sun::star::awt::XKeyHandler xHandler); 74 75 /** Add a new listener that is called on <type 76 scope="::com::sun::star::awt">MouseEvent</type>s. Every listener is 77 given the opportunity to consume the event, i.e. prevent the not yet 78 called listeners from being called. 79 @param xHandler 80 If this is a valid reference it is inserted into the list of 81 handlers. It is the task of the caller to not register the 82 same handler twice (otherwise that listener will be called 83 twice.) 84 */ 85 [oneway] void addMouseClickHandler ( 86 [in] ::com::sun::star::awt::XMouseClickHandler xHandler); 87 88 /** Remove the specified listener from the list of listeners. 89 @param xHandler 90 If the reference is empty then nothing will be changed. If the 91 handler has been registered twice (or more) then all refrences 92 will be removed. 93 */ 94 [oneway] void removeMouseClickHandler ( 95 [in] ::com::sun::star::awt::XMouseClickHandler xHandler); 96}; 97 98}; }; }; }; 99 100#endif 101