Mir
window_coordinate_translation.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2017 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_EXTENSIONS_WINDOW_COORDINATE_TRANSLATION_H_
20 #define MIR_CLIENT_EXTENSIONS_WINDOW_COORDINATE_TRANSLATION_H_
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Important note about extension:
28  * There are many cases where such a mapping does not exist or would be expensive
29  * to calculate. Only Mir servers started with the --debug option will ever provide
30  * this extension, and even when --debug is enabled servers are free to
31  * return nothing.
32  */
33 
45  MirWindow* window,
46  int x, int y,
47  int* screen_x, int* screen_y);
48 
50 {
53 
55 mir_extension_window_coordinate_translation_v1(MirConnection* connection)
56 {
58  connection, "mir_extension_window_coordinate_translation", 1);
59 }
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif /* MIR_CLIENT_EXTENSIONS_WINDOW_COORDINATE_TRANSLATION_H_ */
MirExtensionWindowCoordinateTranslationV1
Definition: window_coordinate_translation.h:49
MirExtensionWindowCoordinateTranslationV1
struct MirExtensionWindowCoordinateTranslationV1 MirExtensionWindowCoordinateTranslationV1
mir_connection_request_extension
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
MirWindow
struct MirSurface MirWindow
Definition: client_types.h:43
MirExtensionWindowTranslateCoordinates
void(* MirExtensionWindowTranslateCoordinates)(MirWindow *window, int x, int y, int *screen_x, int *screen_y)
Get the screen coordinates corresponding to a pair of window coordinates.
Definition: window_coordinate_translation.h:44
MirConnection
struct MirConnection MirConnection
Definition: client_types.h:41
mir_extension_core.h
MirExtensionWindowCoordinateTranslationV1::window_translate_coordinates
MirExtensionWindowTranslateCoordinates window_translate_coordinates
Definition: window_coordinate_translation.h:51

Copyright © 2012-2020 Canonical Ltd.
Generated on Fri Apr 10 09:30:49 UTC 2020
This documentation is licensed under the GPL version 2 or 3.