mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-28 16:17:09 +08:00
introduce exstubs.h header file to define the interfaces for commlcd NEWGAL engine, comm IAL engine, and custom IAL engine
This commit is contained in:
+19
-15
@@ -389,7 +389,7 @@ AC_ARG_ENABLE(netial,
|
||||
build_net_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(cisco_touchpad_ial,
|
||||
[ --enable-cisco_touchpad_ial build the IAL engine for Cisco Touchpad <default=no>],
|
||||
[ --enable-cisco_touchpad_ial build the IAL engine for Cisco Touchpad <default=no>],
|
||||
build_cisco_touchpad_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(mstar_ial,
|
||||
@@ -892,21 +892,21 @@ CheckXVFB()
|
||||
[ --enable-videortosxvfb include RTOS Virtual FrameBuffer NEWGAL engine <default=no>. Please disable pcxvfb to enable rtosxvfb],
|
||||
enable_video_rtos_xvfb=$enableval)
|
||||
|
||||
if test "x$enable_video_pc_xvfb" = "xyes"; then
|
||||
dnl CheckPCXVFB
|
||||
if test "x$enable_video_pc_xvfb" = "xyes"; then
|
||||
dnl CheckPCXVFB
|
||||
AC_DEFINE(_MGGAL_PCXVFB, 1,
|
||||
[Define if include PC Virtual FrameBuffer NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS pcxvfb"
|
||||
VIDEO_DRIVERS="$VIDEO_DRIVERS pcxvfb/libvideo_pcxvfb.la"
|
||||
else
|
||||
if test "x$enable_video_rtos_xvfb" = "xyes"; then
|
||||
dnl CheckRTOSXVFB
|
||||
else
|
||||
if test "x$enable_video_rtos_xvfb" = "xyes"; then
|
||||
dnl CheckRTOSXVFB
|
||||
AC_DEFINE(_MGGAL_RTOSXVFB, 1,
|
||||
[Define if include RTOS Virtual FrameBuffer NEWGAL engine])
|
||||
VIDEO_SUBDIRS="$VIDEO_SUBDIRS rtos_xvfb"
|
||||
VIDEO_DRIVERS="$VIDEO_DRIVERS rtos_xvfb/libvideo_rtos_xvfb.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1509,17 +1509,21 @@ dnl ;;
|
||||
dnl esac
|
||||
|
||||
AC_ARG_WITH(targetname,
|
||||
[ --with-targetname=unknown/customer/fmsoft/mstudio/stb810/vfanvil/vxi386/qvfb/fbcon/mx21/monaco/c33l05/bfin/vxppc/
|
||||
[ --with-targetname=unknown/external/fmsoft/mstudio/stb810/vfanvil/vxi386/qvfb/fbcon/mx21/monaco/c33l05/bfin/vxppc/
|
||||
S3C6410/S3C2440/S3C2410/hi3560a Define the target board name])
|
||||
|
||||
case "$with_targetname" in
|
||||
external)
|
||||
AC_DEFINE(__TARGET_EXTERNAL__, 1,
|
||||
[Define for targets which use GAL and/or IAL engines and define the interfaces externally])
|
||||
;;
|
||||
fmsoft)
|
||||
AC_DEFINE(__TARGET_FMSOFT__, 1,
|
||||
[Define for FMSoft internal use])
|
||||
[Define for FMSoft internal use])
|
||||
;;
|
||||
mstudio)
|
||||
AC_DEFINE(__TARGET_MSTUDIO__, 1,
|
||||
[Define for FMSoft miniStudio])
|
||||
[Define for FMSoft miniStudio])
|
||||
;;
|
||||
stb810)
|
||||
AC_DEFINE(__TARGET_STB810__, 1,
|
||||
@@ -1547,11 +1551,11 @@ case "$with_targetname" in
|
||||
;;
|
||||
bfin)
|
||||
AC_DEFINE(__TARGET_BLACKFIN__, 1,
|
||||
[Define for Blackfin run uClinux])
|
||||
[Define for Blackfin run uClinux])
|
||||
;;
|
||||
c33l05)
|
||||
AC_DEFINE(__TARGET_C33L05__, 1,
|
||||
[Define for EPSON C33L05 (axLinux)])
|
||||
[Define for EPSON C33L05 (axLinux)])
|
||||
;;
|
||||
S3C6410)
|
||||
CFLAGS="$CFLAGS -D_WITH_TARGET_S3C6410"
|
||||
@@ -2430,8 +2434,8 @@ fi
|
||||
if test "x$build_ctrl_textedit_new" = "xyes"; then
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT, 1,
|
||||
[Define if include TEXTEDIT control])
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT_USE_NEW_IMPL, 1,
|
||||
[Define if use new implementation of TEXTEDIT control])
|
||||
AC_DEFINE(_MGCTRL_TEXTEDIT_USE_NEW_IMPL, 1,
|
||||
[Define if use new implementation of TEXTEDIT control])
|
||||
fi
|
||||
|
||||
if test "x$build_splash" = "xyes"; then
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ COMM_HDRS = \
|
||||
common.h endianrw.h fixedmath.h \
|
||||
minigui.h gdi.h window.h control.h \
|
||||
own_malloc.h own_stdio.h \
|
||||
xvfb.h customial.h \
|
||||
dti.c
|
||||
xvfb.h customial.h exstubs.h \
|
||||
dti.c
|
||||
|
||||
UCOSII_HDRS=ucos2_pthread.h ucos2_semaphore.h
|
||||
THREADX_HDRS=threadx_pthread.h threadx_semaphore.h
|
||||
|
||||
+1
-55
@@ -51,61 +51,7 @@
|
||||
#ifndef GUI_IAL_CUSTOM_H
|
||||
#define GUI_IAL_CUSTOM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define IAL_MOUSE_LEFTBUTTON 1
|
||||
#define IAL_MOUSE_RIGHTBUTTON 2
|
||||
#define IAL_MOUSE_MIDDLEBUTTON 4
|
||||
#define IAL_MOUSE_FOURTHBUTTON 8
|
||||
#define IAL_MOUSE_FIFTHBUTTON 16
|
||||
#define IAL_MOUSE_SIXTHBUTTON 32
|
||||
#define IAL_MOUSE_RESETBUTTON 64
|
||||
|
||||
#define IAL_MOUSEEVENT 1
|
||||
#define IAL_KEYEVENT 2
|
||||
|
||||
typedef struct tagINPUT
|
||||
{
|
||||
char* id;
|
||||
|
||||
// Initialization and termination
|
||||
BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype);
|
||||
void (*term_input) (void);
|
||||
|
||||
// Mouse operations
|
||||
int (*update_mouse) (void);
|
||||
void (*get_mouse_xy) (int* x, int* y);
|
||||
void (*set_mouse_xy) (int x, int y);
|
||||
int (*get_mouse_button) (void);
|
||||
void (*set_mouse_range) (int minx, int miny, int maxx, int maxy);
|
||||
void (*suspend_mouse) (void);
|
||||
int (*resume_mouse) (void);
|
||||
|
||||
// Keyboard operations
|
||||
int (*update_keyboard) (void);
|
||||
const char* (*get_keyboard_state) (void);
|
||||
void (*suspend_keyboard) (void);
|
||||
int (*resume_keyboard) (void);
|
||||
void (*set_leds) (unsigned int leds);
|
||||
|
||||
// Event
|
||||
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
|
||||
fd_set *except, struct timeval *timeout);
|
||||
|
||||
char mdev [MAX_PATH + 1];
|
||||
}INPUT;
|
||||
|
||||
#ifdef _MGIAL_CUSTOM
|
||||
extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
|
||||
extern void TermCustomInput (void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#warning "Please use <minigui/exstubs.h> instead."
|
||||
|
||||
#endif /* GUI_IAL_CUSTOM_H */
|
||||
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* \file exstubs.h
|
||||
* \author Wei Yongming <vincent@minigui.org>
|
||||
* \date 2019/04/07
|
||||
*
|
||||
* \brief This file is the header for NEWGAL/IAL engines which should be
|
||||
* implemented by an external module.
|
||||
*
|
||||
\verbatim
|
||||
|
||||
This file is part of MiniGUI, a mature cross-platform windowing
|
||||
and Graphics User Interface (GUI) support system for embedded systems
|
||||
and smart IoT devices.
|
||||
|
||||
Copyright (C) 2007~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Or,
|
||||
|
||||
As this program is a library, any link to this program must follow
|
||||
GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||
GPLv3, you need to be licensed from FMSoft.
|
||||
|
||||
If you have got a commercial license of this program, please use it
|
||||
under the terms and conditions of the commercial license.
|
||||
|
||||
For more information about the commercial license, please refer to
|
||||
<http://www.minigui.com/en/about/licensing-policy/>.
|
||||
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
/*
|
||||
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
|
||||
* pSOS, ThreadX, NuCleus, OSE, and Win32.
|
||||
*/
|
||||
|
||||
#ifndef GUI_EXSTUBS_H
|
||||
#define GUI_EXSTUBS_H
|
||||
|
||||
/* external stubs for COMMLCD NEWGAL engine */
|
||||
|
||||
#ifdef _MGGAL_COMMLCD
|
||||
|
||||
/* The pixel format defined by depth */
|
||||
#define COMMLCD_PSEUDO_RGB332 1
|
||||
#define COMMLCD_TRUE_RGB555 2
|
||||
#define COMMLCD_TRUE_RGB565 3
|
||||
#define COMMLCD_TRUE_RGB888 4
|
||||
#define COMMLCD_TRUE_RGB0888 5
|
||||
#define COMMLCD_TRUE_ARGB1555 6
|
||||
#define COMMLCD_TRUE_ARGB8888 7
|
||||
#define COMMLCD_TRUE_ABRG8888 8
|
||||
|
||||
#define COMMLCD_UPDATE_NONE 0
|
||||
#define COMMLCD_UPDATE_SYNC 1
|
||||
#define COMMLCD_UPDATE_ASYNC 2
|
||||
|
||||
struct commlcd_info {
|
||||
int height; // vertical resolution of the screen
|
||||
int width; // horinzontal resolution of the screen
|
||||
int pitch; // Length of one scan line in bytes
|
||||
int bpp; // Depth (bits-per-pixel)
|
||||
int type; // Pixel type
|
||||
int update_method; // Update method: none, asynchronously, or synchronously.
|
||||
Uint8* fb; // Frame buffer
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
int __commlcd_drv_init (void);
|
||||
int __commlcd_drv_getinfo (struct commlcd_info *li,
|
||||
int width, int height, int depth);
|
||||
int __commlcd_drv_release (void);
|
||||
int __commlcd_drv_setclut (int firstcolor, int ncolors, GAL_Color *colors);
|
||||
int __commlcd_drv_update (const RECT* rc_dirty);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGGAL_COMMLCD */
|
||||
|
||||
#ifdef _MGIAL_COMM
|
||||
|
||||
#define COMM_MOUSEINPUT 0x01
|
||||
#define COMM_KBINPUT 0x02
|
||||
|
||||
#define COMM_MOUSELBUTTON 0x01
|
||||
#define COMM_MOUSERBUTTON 0x04
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
int __comminput_init (void);
|
||||
int __comminput_ts_getdata (short *x, short *y, short *button);
|
||||
int __comminput_kb_getdata (short *key, short *status);
|
||||
int __comminput_wait_for_input (struct timeval *timeout);
|
||||
void __comminput_deinit (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGIAL_COMM */
|
||||
|
||||
#ifdef _MGIAL_CUSTOM
|
||||
|
||||
#define IAL_MOUSE_LEFTBUTTON 1
|
||||
#define IAL_MOUSE_RIGHTBUTTON 2
|
||||
#define IAL_MOUSE_MIDDLEBUTTON 4
|
||||
#define IAL_MOUSE_FOURTHBUTTON 8
|
||||
#define IAL_MOUSE_FIFTHBUTTON 16
|
||||
#define IAL_MOUSE_SIXTHBUTTON 32
|
||||
#define IAL_MOUSE_RESETBUTTON 64
|
||||
|
||||
#define IAL_MOUSEEVENT 1
|
||||
#define IAL_KEYEVENT 2
|
||||
|
||||
typedef struct tagINPUT
|
||||
{
|
||||
char* id;
|
||||
|
||||
// Initialization and termination
|
||||
BOOL (*init_input) (struct tagINPUT *input, const char* mdev,
|
||||
const char* mtype);
|
||||
void (*term_input) (void);
|
||||
|
||||
// Mouse operations
|
||||
int (*update_mouse) (void);
|
||||
void (*get_mouse_xy) (int* x, int* y);
|
||||
void (*set_mouse_xy) (int x, int y);
|
||||
int (*get_mouse_button) (void);
|
||||
void (*set_mouse_range) (int minx, int miny, int maxx, int maxy);
|
||||
void (*suspend_mouse) (void);
|
||||
int (*resume_mouse) (void);
|
||||
|
||||
// Keyboard operations
|
||||
int (*update_keyboard) (void);
|
||||
const char* (*get_keyboard_state) (void);
|
||||
void (*suspend_keyboard) (void);
|
||||
int (*resume_keyboard) (void);
|
||||
void (*set_leds) (unsigned int leds);
|
||||
|
||||
// Event
|
||||
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
|
||||
fd_set *except, struct timeval *timeout);
|
||||
|
||||
char mdev [MAX_PATH + 1];
|
||||
} INPUT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
|
||||
extern void TermCustomInput (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _MGIAL_CUSTOM */
|
||||
|
||||
#endif /* GUI_EXSTUBS_H */
|
||||
|
||||
+12
-27
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* and smart IoT devices.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 1998~2002, WEI Yongming
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
*
|
||||
* As this program is a library, any link to this program must follow
|
||||
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||
* GPLv3, you need to be licensed from FMSoft.
|
||||
*
|
||||
*
|
||||
* If you have got a commercial license of this program, please use it
|
||||
* under the terms and conditions of the commercial license.
|
||||
*
|
||||
*
|
||||
* For more information about the commercial license, please refer to
|
||||
* <http://www.minigui.com/en/about/licensing-policy/>.
|
||||
*/
|
||||
/*
|
||||
** comminput.c: Common Input Engine for eCos, uC/OS-II, VxWorks, ...
|
||||
**
|
||||
**
|
||||
** Created by Zhong Shuyi, 2004/02/29
|
||||
*/
|
||||
|
||||
@@ -50,24 +50,9 @@
|
||||
|
||||
#include "comminput.h"
|
||||
|
||||
#define COMM_MOUSEINPUT 0x01
|
||||
#define COMM_KBINPUT 0x02
|
||||
|
||||
#define COMM_MOUSELBUTTON 0x01
|
||||
#define COMM_MOUSERBUTTON 0x04
|
||||
#include "exstubs.h"
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
// OS input driver or application must implement these input functions
|
||||
// hardware must be initialized before this engine can be used.
|
||||
|
||||
extern int __comminput_init (void);
|
||||
extern int __comminput_ts_getdata (short *x, short *y, short *button);
|
||||
extern int __comminput_kb_getdata (short *key, short *status);
|
||||
extern int __comminput_wait_for_input (struct timeval *timeout);
|
||||
extern void __comminput_deinit (void);
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
static short MOUSEX = 0, MOUSEY = 0, MOUSEBUTTON = 0;
|
||||
static short KEYCODE = 0, KEYSTATUS = 0;
|
||||
|
||||
@@ -142,7 +127,7 @@ static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *ex
|
||||
else if (retvalue < 0) {
|
||||
retvalue = -1;
|
||||
}
|
||||
|
||||
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ static int L2F50113T00_getscreeninfo (struct commlcd_info *li, int width, int he
|
||||
li->width = SCREEN_WIDTH;
|
||||
li->fb = (void*)VRAM_ADDR_1;
|
||||
li->bpp = LCD_BPP;
|
||||
li->rlen = SCREEN_WIDTH * LCD_BPP_UNIT;
|
||||
li->pitch = SCREEN_WIDTH * LCD_BPP_UNIT;
|
||||
li->async_update = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "sysvideo.h"
|
||||
|
||||
#include "exstubs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -56,26 +58,6 @@ struct GAL_PrivateVideoData {
|
||||
pthread_mutex_t update_lock;
|
||||
};
|
||||
|
||||
/* The pixel format defined by depth */
|
||||
#define COMMLCD_PSEUDO_RGB332 1
|
||||
#define COMMLCD_TRUE_RGB555 2
|
||||
#define COMMLCD_TRUE_RGB565 3
|
||||
#define COMMLCD_TRUE_RGB888 4
|
||||
#define COMMLCD_TRUE_RGB0888 5
|
||||
#define COMMLCD_TRUE_ARGB1555 6
|
||||
#define COMMLCD_TRUE_ARGB8888 7
|
||||
|
||||
struct commlcd_info {
|
||||
short height; // vertical resolution of the screen
|
||||
short width; // horinzontal resolution of the screen
|
||||
short bpp; // Depth (bits-per-pixel)
|
||||
short type; // Pixel type
|
||||
short rlen; // Length of one scan line in bytes
|
||||
void *fb; // Frame buffer
|
||||
|
||||
short async_update; // update asynchronously or synchronously. 0 for synchronously; others for asynchronously.
|
||||
};
|
||||
|
||||
struct commlcd_ops {
|
||||
/* return value: zero for OK */
|
||||
int (*init) (void);
|
||||
|
||||
@@ -71,7 +71,7 @@ static int a_getinfo (struct commlcd_info *li, int width, int height, int bpp)
|
||||
li->width = ecos_lcd_info.width;
|
||||
li->fb = ecos_lcd_info.fb;
|
||||
li->bpp = ecos_lcd_info.bpp;
|
||||
li->rlen = ecos_lcd_info.rlen;
|
||||
li->pitch = ecos_lcd_info.pitch;
|
||||
li->async_update = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ static int a_getinfo (struct commlcd_info *li, int width, int height, int bpp)
|
||||
li->height = 240;
|
||||
li->width = 320;
|
||||
li->bpp = 32;
|
||||
li->rlen = 320 * 32 / 8;
|
||||
li->pitch = 320 * 32 / 8;
|
||||
li->fb = 0xe40000;
|
||||
li->type = COMMLCD_TRUE_RGB0888;
|
||||
return 0;
|
||||
|
||||
+12
-26
@@ -1,50 +1,44 @@
|
||||
/*
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||
* and Graphics User Interface (GUI) support system for embedded systems
|
||||
* and smart IoT devices.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
* Copyright (C) 1998~2002, WEI Yongming
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
*
|
||||
* As this program is a library, any link to this program must follow
|
||||
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||
* GPLv3, you need to be licensed from FMSoft.
|
||||
*
|
||||
*
|
||||
* If you have got a commercial license of this program, please use it
|
||||
* under the terms and conditions of the commercial license.
|
||||
*
|
||||
*
|
||||
* For more information about the commercial license, please refer to
|
||||
* <http://www.minigui.com/en/about/licensing-policy/>.
|
||||
*/
|
||||
/*
|
||||
** extern.c: A subdriver of CommonLCD NEWGAL engine for some targets
|
||||
** which are defined by the external module.
|
||||
** which are defined by the external module (__TARGET_EXTERNAL__).
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGGAL_COMMLCD
|
||||
|
||||
#if defined (__VXWORKS__) || defined (__TARGET_UNKNOWN__)
|
||||
#if defined(_MGGAL_COMMLCD) && defined(__TARGET_EXTERNAL__)
|
||||
|
||||
#include "minigui.h"
|
||||
#include "newgal.h"
|
||||
@@ -52,12 +46,6 @@
|
||||
#include "pixels_c.h"
|
||||
#include "commlcd.h"
|
||||
|
||||
extern int __commlcd_drv_init (void);
|
||||
extern int __commlcd_drv_getinfo (struct commlcd_info *li, int width, int height, int bpp);
|
||||
extern int __commlcd_drv_release (void);
|
||||
extern int __commlcd_drv_setclut (int firstcolor, int ncolors, GAL_Color *colors);
|
||||
extern int __commlcd_drv_update (const RECT* rc_dirty);
|
||||
|
||||
struct commlcd_ops __mg_commlcd_ops = {
|
||||
__commlcd_drv_init,
|
||||
__commlcd_drv_getinfo,
|
||||
@@ -66,7 +54,5 @@ struct commlcd_ops __mg_commlcd_ops = {
|
||||
__commlcd_drv_update
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _MGGAL_COMMLCD */
|
||||
#endif /* _MGGAL_COMMLCD && __TARGET_EXTERNAL__ */
|
||||
|
||||
|
||||
@@ -101,8 +101,8 @@ static int a_getinfo (struct commlcd_info *li, int width, int height, int bpp)
|
||||
li->width = fbinfo->width;
|
||||
li->fb = fbinfo->fb_ptr;
|
||||
li->bpp = fbinfo->depth;
|
||||
li->rlen = (li->bpp*li->width + 7) / 8;
|
||||
/*li->rlen = fbinfo->fb_size;*/
|
||||
li->pitch = (li->bpp*li->width + 7) / 8;
|
||||
/*li->pitch = fbinfo->fb_size;*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ static int a_getinfo (struct lcd_info *li, int width, int height, int bpp)
|
||||
li->width = modeInfo.width;
|
||||
li->fb = modeInfo.fbAddress;
|
||||
li->bpp = modeInfo.colorDepth;
|
||||
li->rlen = (li->bpp*li->width + 7) / 8;
|
||||
li->pitch = (li->bpp*li->width + 7) / 8;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ static int a_getinfo (struct lcd_info *li, int width, int height, int bpp)
|
||||
//li->bpp = modeInfo.colorDepth;
|
||||
li->bpp = 32;
|
||||
printf ("Current color depth is %d \n", modeInfo.colorDepth);
|
||||
li->rlen = (li->bpp*1024 + 7) / 8;
|
||||
li->pitch = (li->bpp*1024 + 7) / 8;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user