Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / awt / XKeyHandler.idl
bloba913694c38da4448c8b779c4fb03f8d8c2857ef1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_awt_XKeyHandler_idl__
21 #define __com_sun_star_awt_XKeyHandler_idl__
23 #include <com/sun/star/lang/XEventListener.idl>
25 #include <com/sun/star/awt/KeyEvent.idl>
28 module com { module sun { module star { module awt {
30 /** This key handler is similar to
31 ::com::sun::star::awt::XKeyListener but allows the
32 consumption of key events. If a key event is consumed by one
33 handler both the following handlers, with respect to the list of key
34 handlers of the broadcaster, and a following handling by the
35 broadcaster will not take place.
37 @since OOo 1.1.2
39 published interface XKeyHandler : ::com::sun::star::lang::XEventListener
41 /** This function is called by the broadcaster, an
42 ::com::sun::star::awt::XExtendedToolkit for
43 instance, after a key has been pressed but before it is released.
44 The return value decides about whether other handlers will be
45 called and a handling by the broadcaster will take place.
47 <p>Consume the event if the action performed by the implementation
48 is mutually exclusive with the default action of the broadcaster or,
49 when known, with that of other handlers.</p>
51 <p>Consuming this event does not prevent the pending key-release
52 event from being broadcasted.</p>
54 @param aEvent
55 The key event informs about the pressed key.
56 @return
57 When `FALSE` is returned the other handlers are called and a
58 following handling of the event by the broadcaster takes place.
59 Otherwise, when `TRUE` is returned, no other handler will be
60 called and the broadcaster will take no further actions
61 regarding the event.
63 boolean keyPressed ([in] com::sun::star::awt::KeyEvent aEvent);
65 /** This function is called by the broadcaster, an
66 ::com::sun::star::awt::XExtendedToolkit for
67 instance, after a key has been pressed and released. The return
68 value decides about whether other handlers will be called and a
69 handling by the broadcaster will take place.
71 <p>Consume the event if the action performed by the implementation
72 is mutually exclusive with the default action of the broadcaster or,
73 when known, with that of other handlers.</p>
75 @param aEvent
76 The key event informs about the pressed key.
77 @return
78 When `FALSE` is returned the other handlers are called and a
79 following handling of the event by the broadcaster takes place.
80 Otherwise, when `TRUE` is returned, no other handler will be
81 called and the broadcaster will take no further actions
82 regarding the event.
84 boolean keyReleased ([in] com::sun::star::awt::KeyEvent aEvent);
87 }; }; }; };
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */