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
24extern "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
55mir_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_ */
struct MirSurface MirWindow
Definition: client_types.h:43
struct MirConnection MirConnection
Definition: client_types.h:41
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
Definition: window_coordinate_translation.h:50
MirExtensionWindowTranslateCoordinates window_translate_coordinates
Definition: window_coordinate_translation.h:51
struct MirExtensionWindowCoordinateTranslationV1 MirExtensionWindowCoordinateTranslationV1
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

Copyright © 2012-2022 Canonical Ltd.
Generated on Sun Oct 9 06:13:38 UTC 2022
This documentation is licensed under the GPL version 2 or 3.