1
2 /**************************************************************************
3 *
4 * Copyright (C) 2013 DENSO CORPORATION
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 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 #include <memory.h>
23 #include <unistd.h>
24 #include <pthread.h>
25 #include <signal.h>
26 #include <stdint.h>
27 #include "ilm_client.h"
28 #include "ilm_client_platform.h"
29
30 ILM_EXPORT ilmErrorTypes
ilmClient_init(t_ilm_nativedisplay nativedisplay)31 ilmClient_init(t_ilm_nativedisplay nativedisplay)
32 {
33 init_ilmClientPlatformTable();
34
35 return gIlmClientPlatformFunc.init(nativedisplay);
36 }
37
38 ILM_EXPORT ilmErrorTypes
ilmClient_destroy(void)39 ilmClient_destroy(void)
40 {
41 return gIlmClientPlatformFunc.destroy();
42 }
43
44 ILM_EXPORT ilmErrorTypes
ilm_surfaceCreate(t_ilm_nativehandle nativehandle,t_ilm_int width,t_ilm_int height,ilmPixelFormat pixelFormat,t_ilm_surface * pSurfaceId)45 ilm_surfaceCreate(t_ilm_nativehandle nativehandle,
46 t_ilm_int width, t_ilm_int height,
47 ilmPixelFormat pixelFormat, t_ilm_surface* pSurfaceId)
48 {
49 return gIlmClientPlatformFunc.surfaceCreate(
50 nativehandle, width, height, pixelFormat, pSurfaceId);
51 }
52
53 ILM_EXPORT ilmErrorTypes
ilm_surfaceRemove(t_ilm_surface surfaceId)54 ilm_surfaceRemove(t_ilm_surface surfaceId)
55 {
56 return gIlmClientPlatformFunc.surfaceRemove(surfaceId);
57 }
58