Commit | Line | Data |
---|---|---|
d42e7319 JB |
1 | /* |
2 | * Copyright (C) 2013 Canonical Ltd | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | * | |
16 | * Authored by: Michael Frey <michael.frey@canonical.com> | |
17 | * Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> | |
18 | */ | |
19 | ||
20 | #include <EGL/egl.h> | |
21 | #include <dlfcn.h> | |
22 | #include <stddef.h> | |
23 | ||
24 | #include <hybris/internal/binding.h> | |
25 | #include <hybris/surface_flinger/surface_flinger_compatibility_layer.h> | |
26 | ||
27 | #define COMPAT_LIBRARY_PATH "/system/lib/libsf_compat_layer.so" | |
28 | ||
29 | HYBRIS_LIBRARY_INITIALIZE(sf, COMPAT_LIBRARY_PATH); | |
30 | ||
31 | HYBRIS_IMPLEMENT_VOID_FUNCTION1(sf, sf_blank, size_t); | |
32 | HYBRIS_IMPLEMENT_VOID_FUNCTION1(sf, sf_unblank, size_t); | |
33 | HYBRIS_IMPLEMENT_FUNCTION1(sf, size_t, sf_get_display_width, size_t); | |
34 | HYBRIS_IMPLEMENT_FUNCTION1(sf, size_t, sf_get_display_height, size_t); | |
35 | HYBRIS_IMPLEMENT_FUNCTION1(sf, struct SfClient*, sf_client_create_full, int); | |
36 | HYBRIS_IMPLEMENT_FUNCTION0(sf, struct SfClient*, sf_client_create); | |
37 | HYBRIS_IMPLEMENT_FUNCTION1(sf, EGLDisplay, sf_client_get_egl_display, | |
38 | struct SfClient*); | |
39 | HYBRIS_IMPLEMENT_FUNCTION1(sf, EGLConfig, sf_client_get_egl_config, | |
40 | struct SfClient*); | |
41 | HYBRIS_IMPLEMENT_VOID_FUNCTION1(sf, sf_client_begin_transaction, | |
42 | struct SfClient*); | |
43 | HYBRIS_IMPLEMENT_VOID_FUNCTION1(sf, sf_client_end_transaction, | |
44 | struct SfClient*); | |
45 | HYBRIS_IMPLEMENT_FUNCTION2(sf, struct SfSurface*, sf_surface_create, | |
46 | struct SfClient*, SfSurfaceCreationParameters*); | |
47 | HYBRIS_IMPLEMENT_FUNCTION1(sf, EGLSurface, sf_surface_get_egl_surface, | |
48 | struct SfSurface*); | |
49 | HYBRIS_IMPLEMENT_FUNCTION1(sf, EGLNativeWindowType, | |
50 | sf_surface_get_egl_native_window, struct SfSurface*); | |
51 | HYBRIS_IMPLEMENT_VOID_FUNCTION1(sf, sf_surface_make_current, struct SfSurface*); | |
52 | HYBRIS_IMPLEMENT_VOID_FUNCTION3(sf, sf_surface_move_to, | |
53 | struct SfSurface*, int, int); | |
54 | HYBRIS_IMPLEMENT_VOID_FUNCTION3(sf, sf_surface_set_size, | |
55 | struct SfSurface*, int, int); | |
56 | HYBRIS_IMPLEMENT_VOID_FUNCTION2(sf, sf_surface_set_layer, | |
57 | struct SfSurface*, int); | |
58 | HYBRIS_IMPLEMENT_VOID_FUNCTION2(sf, sf_surface_set_alpha, | |
59 | struct SfSurface*, float); |