Fix Second Framebuffer's position calculation
[platform/core/system/initrd-recovery.git] / src / librui / fbdev.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 /*
4  * Copyright (c) 2007 The Android Open Source Project
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #pragma once
21
22 #include <stdbool.h>
23
24 #include <linux/fb.h>
25
26 #include "graphics.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 typedef struct {
33         int                             fd,
34                                         displayed_buffer;
35         gr_surface                      gr_draw;
36         GRSurface                       gr_framebuffer[2];
37         struct fb_var_screeninfo        vi;
38         struct fb_fix_screeninfo        fi;
39 } fbdev_common;
40
41 bool fbdev_init_common(gr_backend *backend);
42 bool fbdev_exit_common(gr_backend *backend);
43
44 #ifdef __cplusplus
45 }
46 #endif