1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_awt_XUserInputInterception_idl__
30 #define __com_sun_star_awt_XUserInputInterception_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #include
<com
/sun
/star
/awt
/XKeyHandler.idl
>
34 #include
<com
/sun
/star
/awt
/XMouseClickHandler.idl
>
36 module com
{ module sun
{ module star
{ module awt
{
38 /** Interface to add handlers for key and mouse events. A handler is not a passive
39 listener, it can even consume the event.
43 published
interface XUserInputInterception
: ::com
::sun
::star
::uno
::XInterface
45 /** Add a new listener that is called on <type
46 scope="::com::sun::star::awt">KeyEvent</type>s. Every listener is
47 given the opportunity to consume the event, i.e. prevent the not yet
48 called listeners from being called.
50 If this is a valid reference it is inserted into the list of
51 handlers. It is the task of the caller to not register the
52 same handler twice (otherwise that listener will be called
55 [oneway
] void addKeyHandler
(
56 [in] ::com
::sun
::star
::awt
::XKeyHandler xHandler
);
59 /** Remove the specified listener from the list of listeners.
61 If the reference is empty then nothing will be changed. If the
62 handler has been registered twice (or more) then all references
65 [oneway
] void removeKeyHandler
(
66 [in] ::com
::sun
::star
::awt
::XKeyHandler xHandler
);
68 /** Add a new listener that is called on <type
69 scope="::com::sun::star::awt">MouseEvent</type>s. Every listener is
70 given the opportunity to consume the event, i.e. prevent the not yet
71 called listeners from being called.
73 If this is a valid reference it is inserted into the list of
74 handlers. It is the task of the caller to not register the
75 same handler twice (otherwise that listener will be called
78 [oneway
] void addMouseClickHandler
(
79 [in] ::com
::sun
::star
::awt
::XMouseClickHandler xHandler
);
81 /** Remove the specified listener from the list of listeners.
83 If the reference is empty then nothing will be changed. If the
84 handler has been registered twice (or more) then all references
87 [oneway
] void removeMouseClickHandler
(
88 [in] ::com
::sun
::star
::awt
::XMouseClickHandler xHandler
);
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */