| 1 | |
| 2 | /* |
| 3 | * Copyright (c) 2013 Jolla Ltd. |
| 4 | * Contact: Thomas Perl <thomas.perl@jollamobile.com> |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | |
| 21 | #ifndef LIBHYBRIS_EGL_HELPER_H |
| 22 | #define LIBHYBRIS_EGL_HELPER_H |
| 23 | |
| 24 | |
| 25 | #include <EGL/egl.h> |
| 26 | |
| 27 | |
| 28 | #ifdef __cplusplus |
| 29 | extern "C" { |
| 30 | #endif |
| 31 | |
| 32 | |
| 33 | /* Add new mapping from surface to window */ |
| 34 | void egl_helper_push_mapping(EGLSurface surface, EGLNativeWindowType window); |
| 35 | |
| 36 | /* Check if a mapping for a surface exist */ |
| 37 | int egl_helper_has_mapping(EGLSurface surface); |
| 38 | |
| 39 | /* Return and remove the mapping for a surface */ |
| 40 | EGLNativeWindowType egl_helper_pop_mapping(EGLSurface surface); |
| 41 | |
| 42 | |
| 43 | #ifdef __cplusplus |
| 44 | }; |
| 45 | #endif |
| 46 | |
| 47 | #endif /* LIBHYBRIS_EGL_HELPER_H */ |