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