Compare commits

..
45 Commits
Author SHA1 Message Date
Vincent Wei 28e49dd768 Version -> Version.md 2019-12-24 11:49:56 +08:00
Vincent Wei d5200eec58 add ignored subdirectories 2019-12-24 10:44:59 +08:00
Vincent Wei d35bde9a4c fix some misspells 2019-12-24 10:02:49 +08:00
Vincent Wei daab1ae19b Merge branch 'gpu-integration' 2019-12-24 10:00:19 +08:00
Vincent Wei 3e8e8a5984 4.1.0 -> 4.0.4; release notes 2019-12-24 09:59:48 +08:00
Vincent Wei 3f80c9f3c0 check surface for GetVideoHandle 2019-12-12 15:01:44 +08:00
Vincent Wei 548117ac06 call drmModeAddFB2 for scanout buffer 2019-12-02 17:27:48 +08:00
VincentWei 6339a7417b __dri_ex_driver_get to __drm_ex_driver_get 2019-12-02 14:31:48 +08:00
Vincent Wei a2e4b55966 cleanup 2019-12-02 11:09:12 +08:00
Vincent Wei fb90d5e164 debug 2019-12-01 14:01:11 +08:00
Vincent Wei 68a29d0e53 check whether the driver is initialized 2019-12-01 12:46:10 +08:00
Vincent Wei 117b79e51c change default DRM driver name 2019-12-01 12:45:46 +08:00
Vincent Wei 3df060c5da add argument name to InitGUI 2019-11-28 12:30:09 +08:00
Vincent Wei cd558b1739 add prime_fd and name fields for DrmSurface object and info 2019-11-25 17:12:17 +08:00
Vincent Wei 873e88313b dri -> drm 2019-11-21 10:57:33 +08:00
Vincent Wei f0975518b1 change since 4.0.4 to since 4.1.0 2019-11-21 10:25:59 +08:00
Vincent Wei 14075969bd user DRM/drm instead of DRI/dri for DRM engine and APIs 2019-11-21 10:25:03 +08:00
Vincent Wei 47ec0374c5 change version to 4.1.0 2019-11-20 13:52:32 +08:00
Vincent Wei 6af2f7a67b change version to 4.1.0 and fix bad libdrm includ path 2019-11-20 11:28:54 +08:00
Vincent Wei db0956431d add exdrv_handle for the handle of the shared library for the external DRM driver 2019-11-20 10:35:04 +08:00
Vincent Wei de64d2ac96 use dlopen to load external DRM driver 2019-11-20 10:34:21 +08:00
Vincent Wei 38234739e5 add a new argument to __dri_ex_driver_get: device_fd 2019-11-20 10:33:40 +08:00
Vincent Wei c6a4943aae add new key for dri section: exdriver 2019-11-20 10:32:59 +08:00
Vincent Wei 7a7dd5b6e5 implement IsScreenDC and IsWindowDC 2019-11-19 15:59:40 +08:00
Vincent Wei 7123f08da6 add IsScreenDC and IsWindowDC 2019-11-19 15:59:10 +08:00
Vincent Wei 13348f18be tune calls of _WRN_PRINTF 2019-11-19 09:42:08 +08:00
Vincent Wei 064ceade0f tune _WRN_PRINTF and _DBG_PRINTF 2019-11-19 09:41:47 +08:00
Vincent Wei 8832f051a8 add create_buffer_from_prime_fd operation 2019-11-19 09:41:13 +08:00
Vincent Wei add133abd4 add implementation for driCreateDCFromPrimeFd 2019-11-19 09:40:33 +08:00
Vincent Wei def8833037 add driCreateDCFromPrimeFd 2019-11-19 09:40:06 +08:00
Vincent Wei b1913b67d6 tune 2019-11-18 19:02:29 +08:00
Vincent Wei ef9afd0f55 GetSurfaceHandle -> GetVideoHandle; tune driGetDeviceFD and driGetSurfaceInfo; add driCreateDCFromName and driCreateDCFromHandle 2019-11-18 19:02:22 +08:00
Vincent Wei 5b340d82dc GetSurfaceHandle -> GetVideoHandle; tune driGetDeviceFD and driGetSurfaceInfo; add driCreateDCFromName and driCreateDCFromHandle 2019-11-18 19:01:33 +08:00
Vincent Wei 64be953123 tune interface of create_buffer_from_name; add DRI driver method create_buffer_from_handle 2019-11-18 18:59:27 +08:00
Vincent Wei 580cf66695 make fbcon engine disabled by default 2019-11-14 09:04:57 +08:00
Vincent Wei 637dbbce68 change link to licensing policy 2019-11-13 11:53:59 +08:00
Vincent Wei bb63875964 new API: IsMemDC 2019-11-06 17:04:24 +08:00
Vincent Wei fe26d71145 change version to 4.0.3 2019-11-06 17:04:16 +08:00
Vincent Wei 9095139bf7 cleanup DriDriverOps, use DriSurfaceBuffer object for addressing the surface buffer 2019-11-04 11:16:03 +08:00
Vincent Wei 0581365fcd merge pull request for checking AARCH64 and RISCV architectures 2019-11-04 08:47:31 +08:00
Vincent Wei 9ae865eb3e Merge branch 'master' of github.com:VincentWei/minigui into gpu-integration 2019-11-04 08:42:48 +08:00
Vincent Wei 5c531a6154 Merge pull request #24 from wangrunji0408/master
Fix byte order for aarch64 and riscv
2019-11-04 08:34:29 +08:00
Runji Wang df93b74fca fix byte order for aarch64 and riscv 2019-11-02 00:38:50 +08:00
Vincent Wei 9af014c045 New API: GetSurfaceHandle, driGetDeviceFD, driGetSurfaceInfo; Tune operations of DriDriverOps 2019-11-01 17:47:15 +08:00
Vincent Wei 9823a00352 global variable current_video -> __mg_current_video 2019-11-01 14:18:37 +08:00
993 changed files with 2305 additions and 1481 deletions
+4
View File
@@ -24,3 +24,7 @@ Makefile.in
/*config.h.in
/*config.h.in~
/src/font/utils/emoji/
/src/font/utils/ucd/
/src/sysres/font_list
/src/sysres/license/dat_files/
+3 -3
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Processes)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.1
PROJECT_NUMBER = v4.0.4
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.1
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.4
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,7 +2102,7 @@ PREDEFINED = _MGRM_PROCESSES \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRI \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+3 -3
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Standalone)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.1
PROJECT_NUMBER = v4.0.4
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.1
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.4
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,7 +2102,7 @@ PREDEFINED = _MGRM_STANDALONE \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRI \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+3 -3
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Threads)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.1
PROJECT_NUMBER = v4.0.4
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.1
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.4
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,7 +2102,7 @@ PREDEFINED = _MGRM_THREADS \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGGAL_DRI \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+2 -2
View File
@@ -2,8 +2,8 @@ SUBDIRS = src 3rd-party include rtos etc m4 cmake build
EXTRA_DIST = minigui.pc.in \
GNUmakefile makefile.ng makefile.msvc rules.make \
Version INSTALL LICENSE \
README.md RELEASE-NOTES.md \
INSTALL LICENSE \
Version.md README.md RELEASE-NOTES.md \
LICENSE-POLICY-en.md LICENSE-POLICY-zh.md
# The directory where the include files will be installed
+4 -4
View File
@@ -147,11 +147,11 @@ and MiniGUI components, please fetch one of the following repositories
from GitHub and follow the instructions to build the samples and
the demonstration programs:
https://github.com/VincentWei/build-minigui-4.0
<https://github.com/VincentWei/build-minigui-4.0>
or
https://github.com/VincentWei/build-minigui-3.2
<https://github.com/VincentWei/build-minigui-3.2>
### Unit Tests
@@ -159,7 +159,7 @@ https://github.com/VincentWei/build-minigui-3.2
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
following repository:
https://github.com/VincentWei/mg-tests
<https://github.com/VincentWei/mg-tests>
If you are interested in hacking the MiniGUI code, please visit this repository.
@@ -386,7 +386,7 @@ 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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
### Special Statement
+28
View File
@@ -1,5 +1,33 @@
# Release Notes
## Version 4.0.4
The MiniGUI development team announces the availability of MiniGUI 4.0.4.
We strongly recommend that you use this version for any new MiniGUI
apps, especially if the new features of MiniGUI 4.0 are must for your
new apps.
Please report any bugs and incompatibilities in
<https://github.com/VincentWei/minigui>
### What's new in this version
In this version, we mainly enhanced the DRM engine of MiniGUI in order
to integrate MiniGUI with Mesa and Cairo, for example, to implement EGL
for MiniGUI platform.
* MODIFICATIONS:
- Change the name of old `dri` NEWGAL engine to `drm`.
- Change the configuration option of DRM engine to `--enable-videodrm`.
- Change the macro for DRM engine to `_MGGAL_DRM`.
- Change the runtime configuration section for DRM engine to `drm`.
* ENHANCEMENTS:
- New APIs for GPU integration, such as `IsMemDC`, `IsScreenDC`, `IsWindowDC`, `GetVideoHandle`, and `drmGetDeviceFD`.
- Add new operation for DRM engine: `create_buffer_from_prime_fd`.
- Use `dlopen` to load the external DRM driver.
- Add a new runtime configuration key for DRM engine `drm.exdriver` to define the external DRM driver.
## Version 4.0.2
The MiniGUI development team announces the availability of MiniGUI 4.0.2.
-9
View File
@@ -1,9 +0,0 @@
Version 4.0.2 (2019/10/31)
This release needs the following resource packages:
* minigui-res-4.0.0.tar.gz
The latest samples package is:
* mg-samples-4.0.1.tar.gz
+8
View File
@@ -0,0 +1,8 @@
Version 4.0.4 (2019/12/24)
This release needs the following packages:
- The resource package: `minigui-res-4.0.0.tar.gz`
- The sample package: `mg-samples-4.0.1.tar.gz`
- The test cases package: `mg-tests-4.0.4.tar.gz`
+22 -22
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(libminigui, 4.0.2)
AC_INIT(libminigui, 4.0.4)
AC_CONFIG_SRCDIR(src/main/main.c)
dnl Set various version strings - taken gratefully from the SDL sources
@@ -16,9 +16,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
#
MINIGUI_MAJOR_VERSION=4
MINIGUI_MINOR_VERSION=0
MINIGUI_MICRO_VERSION=2
MINIGUI_INTERFACE_AGE=2
MINIGUI_BINARY_AGE=2
MINIGUI_MICRO_VERSION=4
MINIGUI_INTERFACE_AGE=0
MINIGUI_BINARY_AGE=0
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
AC_SUBST(MINIGUI_MAJOR_VERSION)
@@ -264,8 +264,8 @@ enable_video_dfb="no"
enable_video_dfb_st7167="no"
enable_video_stgfb="no"
enable_video_fbcon="yes"
enable_video_dri="yes"
enable_video_drm="yes"
enable_video_fbcon="no"
enable_video_commlcd="no"
enable_video_shadow="no"
enable_video_mlshadow="no"
@@ -886,24 +886,24 @@ dnl Find the DRM includes
CheckDRM()
{
if test "x$runtime_mode" = "xprocs"; then
enable_video_dri="no; DRI engine does not support MiniGUI-Processes runtime mode currently"
enable_video_drm="no; DRI engine does not support MiniGUI-Processes runtime mode currently"
else
AC_ARG_ENABLE(videodri,
[ --enable-videodri include Linux DRI NEWGAL engine <default=yes>],
enable_video_dri=$enableval)
if test "x$enable_video_dri" = "xyes"; then
PKG_CHECK_MODULES(DRM, [libdrm >= 2.4], video_dri="yes",
video_dri="no; Linux DRI NEWGAL engine requires libdrm 2.4+")
if test "x$video_dri" = "xyes"; then
AC_DEFINE(_MGGAL_DRI, 1,
AC_ARG_ENABLE(videodrm,
[ --enable-videodrm include Linux DRI NEWGAL engine <default=yes>],
enable_video_drm=$enableval)
if test "x$enable_video_drm" = "xyes"; then
PKG_CHECK_MODULES(DRM, [libdrm >= 2.4], video_drm="yes",
video_drm="no; Linux DRI NEWGAL engine requires libdrm 2.4+")
if test "x$video_drm" = "xyes"; then
AC_DEFINE(_MGGAL_DRM, 1,
[Define if include Linux DRI NEWGAL engine])
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dri"
VIDEO_DRIVERS="$VIDEO_DRIVERS dri/libvideo_dri.la"
DEP_LIBS="$DEP_LIBS -ldrm"
DRM_INC_DIR="`$PKG_CONFIG --variable includedir libdrm`/drm"
VIDEO_SUBDIRS="$VIDEO_SUBDIRS drm"
VIDEO_DRIVERS="$VIDEO_DRIVERS drm/libvideo_drm.la"
DEP_LIBS="$DEP_LIBS -ldrm -ldl"
DRM_INC_DIR="`$PKG_CONFIG --variable includedir libdrm`/libdrm"
AC_SUBST(DRM_INC_DIR)
else
AC_MSG_WARN([$video_dri])
AC_MSG_WARN([$video_drm])
fi
fi
fi
@@ -2636,7 +2636,7 @@ src/font/Makefile
src/font/in-core/Makefile
src/newgal/Makefile
src/newgal/fbcon/Makefile
src/newgal/dri/Makefile
src/newgal/drm/Makefile
src/newgal/qvfb/Makefile
src/newgal/pcxvfb/Makefile
src/newgal/wvfb/Makefile
@@ -2713,7 +2713,7 @@ AC_MSG_NOTICE([
* dummy: ${enable_video_dummy}
* pc_xvfb: ${enable_video_pc_xvfb}
* usvfb: ${enable_video_usvfb}
* dri: ${enable_video_dri}
* drm: ${enable_video_drm}
* fbcon: ${enable_video_fbcon}
* commlcd: ${enable_video_commlcd}
+10 -2
View File
@@ -22,10 +22,13 @@
[system]
# GAL engine and default options
# The equivalent environment variable: MG_GAL_ENGINE
gal_engine=pc_xvfb
# The equivalent environment variable: MG_DEFAULTMODE
defaultmode=800x600-16bpp
# IAL engine
# The equivalent environment variable: MG_IAL_ENGINE
ial_engine=pc_xvfb
mdev=/dev/input/mice
mtype=IMPS2
@@ -33,8 +36,8 @@ mtype=IMPS2
# Linux IAL engine based on libinput
# ial_engine=libinut
#{{ifdef _MGGAL_DRI
[dri]
#{{ifdef _MGGAL_DRM
[drm]
defaultmode=1024x768-32bpp
# We use DRM fourcc code to defined the pixel format of the video surface.
@@ -44,10 +47,15 @@ pixelformat=XR24
# The DRI device
device=/dev/dri/card0
# The resolution of the display
# It is defined in dots (physical pixels) per inch
# The default value is 96.
dpi=96
# The filename of the shared library for the external driver.
# The equivalent environment variable: MG_GAL_DRM_DRIVER
exdriver=libhidrmdrivers.so.0
#}}
#{{ifdef _MGIAL_LIBINPUT
+5 -4
View File
@@ -50,7 +50,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
@@ -306,7 +306,8 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
*/
#if defined(__i386__) || defined(__ia64__) || defined(__x86_64__) || defined(__amd64) || \
(defined(__alpha__) || defined(__alpha)) || \
defined(__arm__) || \
defined(__arm__) || defined(__aarch64__) || \
defined(__riscv) || \
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
(defined(__mips__) && defined(__MIPSEL__)) || \
defined(__LITTLE_ENDIAN__) || \
@@ -2317,7 +2318,6 @@ int init_minigui_printf (int (*output_char) (int ch),
TCS_BROWN (stderr); \
fprintf (stderr, "%s: ", __FUNCTION__); \
fprintf (stderr, fmt, ##__VA_ARGS__); \
fprintf (stderr, "\n"); \
TCS_NONE (stderr); \
} while (0)
@@ -2332,11 +2332,12 @@ int init_minigui_printf (int (*output_char) (int ch),
# define _DBG_PRINTF(fmt, ...) \
do { \
TCS_YELLOW (stderr); \
fprintf (stderr, "%s: ", __FUNCTION__); \
fprintf (stderr, fmt, ##__VA_ARGS__); \
TCS_NONE (stderr); \
} while (0)
# else
# define _DBG_PRINTF(fmt, ...)
# define _DBG_PRINTF(fmt, ...) do { } while (0)
#endif
#ifdef _MGRM_THREADS
+1 -1
View File
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -48,7 +48,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -47,7 +47,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -52,7 +52,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+98 -54
View File
@@ -24,7 +24,7 @@
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
Copyright (C) 2007~2018, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 2007~2019, 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
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
@@ -62,6 +62,8 @@
#ifndef GUI_EXSTUBS_H
#define GUI_EXSTUBS_H
#include <stdint.h>
/**
* \defgroup external_stubs External Stubs
*
@@ -74,9 +76,7 @@
extern "C" {
#endif /* __cplusplus */
#ifdef _MGGAL_DRI
#include <stdint.h>
#ifdef _MGGAL_DRM
/**
* \defgroup external_stubs_dri External Stubs for DRI sub driver
@@ -88,30 +88,48 @@ extern "C" {
* The struct type represents the DRI sub driver.
* The concrete struct should be defined by the driver.
*/
struct _DriDriver;
typedef struct _DriDriver DriDriver;
struct _DrmDriver;
typedef struct _DrmDriver DrmDriver;
/**
* The struct type represents the bufffer can be used by
* MiniGUI NEWGAL engine for hardware surface.
*/
typedef struct _DriSurfaceBuffer {
uint32_t buff_id;
typedef struct _DrmSurfaceBuffer {
/** The prime fd of the buffer */
int prime_fd;
/** The global name of the buffer */
uint32_t name;
/** The local handle of the buffer */
uint32_t handle;
/** The buffer identifier */
uint32_t id;
/** The widht of the buffer */
uint32_t width;
/** The height of the buffer */
uint32_t height;
/** The pitch (row stride in bytes) of the buffer */
uint32_t pitch;
/** The DRM format of the buffer */
uint32_t drm_format;
uint16_t bpp:8;
uint16_t cpp:8;
/** The bits per pixel */
uint32_t bpp:8;
/** The bytes per pixel */
uint32_t cpp:8;
/** Is foreign surface */
uint32_t foreign:1;
/** The whole size in bytes of the buffer */
unsigned long size;
/** The mapped address of the buffer; NULL when the buffer is not mapped yet. */
uint8_t* pixels;
} DriSurfaceBuffer;
} DrmSurfaceBuffer;
/**
* The color logic operations.
*/
enum DriColorLogicOp {
enum DrmColorLogicOp {
COLOR_LOGICOP_CLEAR = 0,
COLOR_LOGICOP_NOR = 1,
COLOR_LOGICOP_AND_INVERTED = 2,
@@ -133,45 +151,72 @@ enum DriColorLogicOp {
/**
* The struct type defines the operations for a DRI driver.
*/
typedef struct _DriDriverOps {
typedef struct _DrmDriverOps {
/**
* This operation creates the DriDriver object.
* This operation creates the DrmDriver object.
*
* \note The driver must implement this operation.
*/
DriDriver* (*create_driver) (int device_fd);
DrmDriver* (*create_driver) (int device_fd);
/**
* This operation destroies the DriDriver object.
* This operation destroies the DrmDriver object.
*
* \note The driver must implement this operation.
*/
void (*destroy_driver) (DriDriver *driver);
void (*destroy_driver) (DrmDriver *driver);
/**
* This operation flushs the batch buffer of the driver or the hardware cache.
*
* \note This operation can be NULL.
*/
void (* flush_driver) (DriDriver *driver);
void (* flush_driver) (DrmDriver *driver);
/**
* This operation creates a buffer with the specified pixel format,
* width, and height. If succeed, a valid (not zero) buffer identifier
* and the picth (row stride in bytes) will be returned.
* If failed, it returns 0.
* width, and height. If succeed, a valid DrmSurfaceBuffer object will
* be returned; NULL on error. Note that the field of `pixels` of the
* DrmSurfaceBuffer object is NULL until the \a map_buffer was called.
*
* \note The driver must implement this operation.
*/
uint32_t (* create_buffer) (DriDriver *driver,
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
uint32_t drm_format,
unsigned int width, unsigned int height,
unsigned int *pitch);
unsigned int width, unsigned int height);
BOOL (* fetch_buffer) (DriDriver *driver,
uint32_t buffer_id,
unsigned int *width, unsigned int *height,
unsigned int *pitch);
/**
* This operation creates a buffer for the given handle
* with the specified pixel format, width, and height. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
uint32_t handle, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation creates a buffer for the given system global name
* with the specified pixel format, width, and height. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
uint32_t name, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation creates a buffer for the given PRIME file descriptor
* with the specified pixel format, width, height, and pitch. If succeed,
* a valid DrmSurfaceBuffer object will be returned; NULL on error.
*
* \note This operation can be NULL.
*/
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
int prime_fd, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, unsigned int pitch);
/**
* This operation maps the buffer into the current process's virtual memory
@@ -179,22 +224,21 @@ typedef struct _DriDriverOps {
*
* \note The driver must implement this operation.
*/
DriSurfaceBuffer* (* map_buffer) (DriDriver *driver,
uint32_t buffer_id);
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation un-maps a buffer.
*
* \note The driver must implement this operation.
*/
void (* unmap_buffer) (DriDriver *driver, DriSurfaceBuffer* buffer);
void (* unmap_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation destroies a buffer.
*
* \note The driver must implement this operation.
*/
void (* destroy_buffer) (DriDriver *driver, uint32_t buffer_id);
void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/**
* This operation clears the specific rectangle area of a buffer
@@ -203,8 +247,8 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated clear operation.
*/
int (* clear_buffer) (DriDriver *driver,
DriSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
int (* clear_buffer) (DrmDriver *driver,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
/**
* This operation checks whether a hardware accelerated blit
@@ -214,8 +258,8 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, it will be supposed that
* the driver does not support any hardware accelerated blit operation.
*/
int (* check_blit) (DriDriver *driver,
DriSurfaceBuffer* src_buf, DriSurfaceBuffer* dst_buf);
int (* check_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
/**
* This operation copies bits from a source buffer to a destination buffer.
@@ -223,10 +267,10 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated copy blit.
*/
int (* copy_blit) (DriDriver *driver,
DriSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DriSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
enum DriColorLogicOp logic_op);
int (* copy_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
enum DrmColorLogicOp logic_op);
/**
* This operation blits pixles from a source buffer with the source alpha value
@@ -235,9 +279,9 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with alpha.
*/
int (* alpha_blit) (DriDriver *driver,
DriSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DriSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint8_t alpha);
int (* alpha_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint8_t alpha);
/**
* This operation blits pixles from a source buffer to a destination buffer,
@@ -246,9 +290,9 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with color key.
*/
int (* key_blit) (DriDriver *driver,
DriSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DriSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint32_t color_key);
int (* key_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, uint32_t color_key);
/**
* This operation blits pixles from a source buffer with the source alpha value
@@ -257,19 +301,19 @@ typedef struct _DriDriverOps {
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blit with alpha and color key.
*/
int (* alpha_key_blit) (DriDriver *driver,
DriSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DriSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
int (* alpha_key_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
uint8_t alpha, uint32_t color_key);
} DriDriverOps;
} DrmDriverOps;
/** Implement this stub to return the DRI driver operations */
DriDriverOps* __dri_ex_driver_get (const char* driver_name);
DrmDriverOps* __drm_ex_driver_get (const char* driver_name, int device_fd);
/** @} end of external_stubs_dri */
#endif /* _MGGAL_DRI */
#endif /* _MGGAL_DRM */
#ifdef _MGGAL_COMMLCD
+1 -1
View File
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+179 -2
View File
@@ -23,7 +23,7 @@
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) 2002~2019, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998~2002, WEI Yongming
This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
@@ -1389,6 +1389,48 @@ MG_EXPORT HDC GUIAPI CreateCompatibleDCEx (HDC hdc, int width, int height);
*/
MG_EXPORT BOOL GUIAPI IsCompatibleDC (HDC hdc1, HDC hdc2);
/**
* \fn BOOL GUIAPI IsMemDC (HDC hdc)
* \brief Check whether a given DC is a memory DC.
*
* This function checks whether a give DC \a hdc is a memory DC.
*
* \param hdc The handle to the DC.
*
* \return TRUE for memory DC, otherwise FALSE.
*
* \sa CreateMemDCEx
*/
MG_EXPORT BOOL GUIAPI IsMemDC (HDC hdc);
/**
* \fn BOOL GUIAPI IsScreenDC (HDC hdc)
* \brief Check whether a given DC is a screen DC.
*
* This function checks whether a give DC \a hdc is a screen DC.
*
* \param hdc The handle to the DC.
*
* \return TRUE for screen DC, otherwise FALSE.
*
* \sa CreateMemDCEx
*/
MG_EXPORT BOOL GUIAPI IsScreenDC (HDC hdc);
/**
* \fn BOOL GUIAPI IsWindowDC (HDC hdc)
* \brief Check whether a given DC is a window DC.
*
* This function checks whether a give DC \a hdc is a window DC.
*
* \param hdc The handle to the DC.
*
* \return TRUE for window DC, otherwise FALSE.
*
* \sa CreateMemDCEx
*/
MG_EXPORT BOOL GUIAPI IsWindowDC (HDC hdc);
/**
* \fn HDC GUIAPI CreateMemDCEx (int width, int height, int depth, DWORD flags, \
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask,
@@ -13646,6 +13688,141 @@ MG_EXPORT int GUIAPI SetUserCompositionOps (HDC hdc,
CB_COMP_PUTHLINE comp_puthline,
void* user_comp_ctxt);
/**
* This function gets the video handle which corresponds to the given
* device context.
*
* \param hdc The device context.
*
* \return The handle to the video; NULL on error.
*
* Since 4.0.4
*/
MG_EXPORT GHANDLE GetVideoHandle (HDC hdc);
#ifdef _MGGAL_DRM
/**
* \defgroup gdi_drm_fns Functions for Linux DRM integration
*
* These functions can be used to get the DRM device file descriptor and the
* information of the hardware surface corresponding to the DC which is
* created by the Linux DRM engine. By using the information, we can
* integrate MiniGUI with other graphics libraries, such as Cairo
* (vector graphics) and Mesa (3D graphics).
*
* \note Only available when support for Linuxe DRM NEWGAL engine
* (`_MGGAL_DRM`) is enabled.
*
* Since 4.0.4
*
* @{
*/
/**
* This function gets the file descriptor opened by the Linux DRM engine.
*
* \param video The video handle returned by \a GetVideoHandle.
*
* \return The DRM device file descriptor opened by the Linux DRM engine;
* >= 0 for success and < 0 on error. If \a surface is not a hardware
* surface created by the DRM engine, this function returns -1.
*/
MG_EXPORT int drmGetDeviceFD (GHANDLE video);
/**
* THe struct type defines the DRM surface information.
*/
typedef struct _DrmSurfaceInfo {
/** The prime fd of the buffer object. */
int prime_fd;
/** The global name of the buffer object. */
uint32_t name;
/** The local handle of the buffer object. */
uint32_t handle;
/** The buffer identifier. */
uint32_t id;
/** The width of the surface. */
uint32_t width;
/** The height of the surface. */
uint32_t height;
/** The row stride of the surface. */
uint32_t pitch;
/** The DRM pixel format. */
uint32_t drm_format;
/** Size in bytes of the buffer object. */
unsigned long size;
} DrmSurfaceInfo;
/**
* This function gets the DRM surface information from specified device context.
*
* \param video The handle to the video.
* \param hdc The handle to the device context.
* \param info The pointer to a DrmSurfaceInfo structure to hold
* the surface information.
*
* \return TRUE for success, FALSE for failure.
*/
MG_EXPORT BOOL drmGetSurfaceInfo (GHANDLE video, HDC hdc, DrmSurfaceInfo* info);
/**
* This function creates a memory DC with a DRM surface which is created by
* a foreign process and identified by a global name handle.
*
* \param video The video handle.
* \param name The name handle of the DRM surface.
* \param drm_format The DRM pixel format.
* \param width The width of the DRM surface.
* \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface.
*
* \return The handle to the memory DC for success, HDC_INVALID for failure.
*/
MG_EXPORT HDC drmCreateDCFromName (GHANDLE video,
uint32_t name, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch);
/**
* This function creates a memory DC with a DRM surface which is created by
* a foreign process and identified by a PRIME file descriptor.
*
* \param video The video handle.
* \param prime_fd The PRIME file descriptor.
* \param size The size of the DRM surface in bytes.
* \param drm_format The DRM pixel format.
* \param width The width of the DRM surface.
* \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface.
*
* \return The handle to the memory DC for success, HDC_INVALID for failure.
*/
MG_EXPORT HDC drmCreateDCFromPrimeFd (GHANDLE video,
int prime_fd, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch);
/**
* This function creates a memory DC with a DRM surface which is created by
* a foreign graphics component.
*
* \param video The video handle.
* \param handle The handle of the DRM surface.
* \param size The size of the DRM surface in bytes.
* \param drm_format The DRM pixel format.
* \param width The width of the DRM surface.
* \param height The height of the DRM surface.
* \param pitch The pitch (row stride) of the DRM surface.
*
* \return The handle to the memory DC for success, HDC_INVALID for failure.
*/
MG_EXPORT HDC drmCreateDCFromHandle (GHANDLE video,
uint32_t handle, unsigned long size, uint32_t drm_format,
unsigned int width, unsigned int height, uint32_t pitch);
/** @} end of gdi_drm_fns */
#endif /* _MGGAL_DRM */
/** @} end of gdi_fns */
#ifdef _MGGAL_HI3560
+3 -3
View File
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
@@ -274,13 +274,13 @@ extern MG_EXPORT MG_Layer* mgLayers;
*/
/**
* \fn int GUIAPI InitGUI (int, const char **)
* \fn int GUIAPI InitGUI (int argc, const char *argv[])
* \brief Initialize MiniGUI.
*
* The meaning of two parameters is same with parameters of main function.
*
**/
MG_EXPORT int GUIAPI InitGUI (int, const char **);
MG_EXPORT int GUIAPI InitGUI (int argc, const char *argv[]);
/**
* \fn void GUIAPI TerminateGUI (int not_used)
+1 -1
View File
@@ -54,7 +54,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -57,7 +57,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -57,7 +57,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -49,7 +49,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -57,7 +57,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -57,7 +57,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/
+1 -1
View File
@@ -56,7 +56,7 @@
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/>.
<http://www.minigui.com/blog/minigui-licensing-policy/>.
\endverbatim
*/

Some files were not shown because too many files have changed in this diff Show More