1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_awt_XUserInputInterception_idl__ 25#define __com_sun_star_awt_XUserInputInterception_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30 31#ifndef __com_sun_star_awt_XKeyHandler_idl__ 32#include <com/sun/star/awt/XKeyHandler.idl> 33#endif 34 35#ifndef __com_sun_star_awt_XMouseClickHandler_idl__ 36#include <com/sun/star/awt/XMouseClickHandler.idl> 37#endif 38 39module com { module sun { module star { module awt { 40 41/** Interface to add handlers for key and mouse events. A handler is not a passive 42 listener, it can even consume the event. 43 44 @since OpenOffice 1.1.2 45 */ 46published interface XUserInputInterception : ::com::sun::star::uno::XInterface 47{ 48 /** Add a new listener that is called on <type 49 scope="::com::sun::star::awt">KeyEvent</type>s. Every listener is 50 given the opportunity to consume the event, i.e. prevent the not yet 51 called listeners from being called. 52 @param xHandler 53 If this is a valid reference it is inserted into the list of 54 handlers. It is the task of the caller to not register the 55 same handler twice (otherwise that listener will be called 56 twice.) 57 */ 58 [oneway] void addKeyHandler ( 59 [in] ::com::sun::star::awt::XKeyHandler xHandler); 60 61 62 /** Remove the specified listener from the list of listeners. 63 @param xHandler 64 If the reference is empty then nothing will be changed. If the 65 handler has been registered twice (or more) then all references 66 will be removed. 67 */ 68 [oneway] void removeKeyHandler ( 69 [in] ::com::sun::star::awt::XKeyHandler xHandler); 70 71 /** Add a new listener that is called on <type 72 scope="::com::sun::star::awt">MouseEvent</type>s. Every listener is 73 given the opportunity to consume the event, i.e. prevent the not yet 74 called listeners from being called. 75 @param xHandler 76 If this is a valid reference it is inserted into the list of 77 handlers. It is the task of the caller to not register the 78 same handler twice (otherwise that listener will be called 79 twice.) 80 */ 81 [oneway] void addMouseClickHandler ( 82 [in] ::com::sun::star::awt::XMouseClickHandler xHandler); 83 84 /** Remove the specified listener from the list of listeners. 85 @param xHandler 86 If the reference is empty then nothing will be changed. If the 87 handler has been registered twice (or more) then all references 88 will be removed. 89 */ 90 [oneway] void removeMouseClickHandler ( 91 [in] ::com::sun::star::awt::XMouseClickHandler xHandler); 92}; 93 94}; }; }; }; 95 96#endif 97