mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-25 02:33:59 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26a0527e55 | ||
|
|
165b89e5be | ||
|
|
e5ac135443 | ||
|
|
fc6d3a686e | ||
|
|
f16a629ade | ||
|
|
b074ebf3d7 | ||
|
|
3cfc964836 |
@@ -1,5 +1,7 @@
|
||||
# Release Notes For MiniGUI Core 4.0.x
|
||||
|
||||
- [Version 4.0.8](#version-408)
|
||||
+ [What's new in version 4.0.8](#whats-new-in-version-408)
|
||||
- [Version 4.0.7](#version-407)
|
||||
+ [What's new in version 4.0.7](#whats-new-in-version-407)
|
||||
- [Version 4.0.6](#version-406)
|
||||
@@ -24,6 +26,27 @@
|
||||
+ [Backward compatibility issues](#backward-compatibility-issues)
|
||||
+ [Deprecated features](#deprecated-features)
|
||||
|
||||
## Version 4.0.8
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 4.0.8.
|
||||
We strongly recommend that you use this version for any new MiniGUI
|
||||
apps, especially if the new features of MiniGUI 4.0.8 are must for your
|
||||
new apps.
|
||||
|
||||
Please report any bugs and incompatibilities in
|
||||
|
||||
<https://github.com/VincentWei/minigui/tree/rel-4-0>
|
||||
|
||||
### What's new in version 4.0.8
|
||||
|
||||
In this version, we tuned some code for GCC 9 and fixed some bugs:
|
||||
|
||||
* ADJUSTMENTS:
|
||||
- Use mainstream HarfBuzz for glyph shaping of complex scripts instead
|
||||
of the modified version.
|
||||
* TUNING:
|
||||
- Tune some code to depress compilation warnings.
|
||||
|
||||
## Version 4.0.7
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 4.0.7.
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 4.0.7)
|
||||
AC_INIT(libminigui, 4.0.8)
|
||||
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=7
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_MICRO_VERSION=8
|
||||
MINIGUI_INTERFACE_AGE=8
|
||||
MINIGUI_BINARY_AGE=8
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||
@@ -2088,7 +2088,7 @@ if test "x$build_ttf_support" = "xyes"; then
|
||||
if test "x$build_complex_scripts" = "xyes"; then
|
||||
dnl Check for HarfBuzz library
|
||||
AC_CHECK_LIB(harfbuzz, hb_version,
|
||||
DEP_LIBS="$DEP_LIBS -lharfbuzzex -lfreetype",
|
||||
DEP_LIBS="$DEP_LIBS -lharfbuzz -lfreetype",
|
||||
build_complex_scripts="no; support for complex scripts requires libharfbuzz")
|
||||
else
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype",
|
||||
@@ -2168,7 +2168,7 @@ if test "x$build_complex_scripts" = "xyes"; then
|
||||
[ --with-hb-includes=DIR where the HarfBuzz includes are])
|
||||
|
||||
if test "x$with_hb_includes" = "x"; then
|
||||
HB_INC_DIR="-I/usr/local/include/harfbuzz"
|
||||
HB_INC_DIR="-I/usr/include/harfbuzz"
|
||||
else
|
||||
HB_INC_DIR="-I$with_hb_includes"
|
||||
fi
|
||||
|
||||
@@ -1428,10 +1428,12 @@ static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARA
|
||||
item_info->add_data = item->add_data;
|
||||
|
||||
if (item_info->which & MTB_WHICH_TEXT)
|
||||
strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
//strncpy (item_info->text, item->text, NTB_TEXT_LEN);
|
||||
strcpy (item_info->text, item->text);
|
||||
|
||||
if (item_info->which & MTB_WHICH_TIP)
|
||||
strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
//strncpy (item_info->tip, item->tip, NTB_TIP_LEN);
|
||||
strcpy (item_info->tip, item->tip);
|
||||
|
||||
return NTB_OKAY;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1010,8 +1010,9 @@ void GUIAPI DestroyDynamicDevFont (DEVFONT** devfont)
|
||||
{
|
||||
char font_name [LEN_UNIDEVFONT_NAME + 1];
|
||||
|
||||
memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
//memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1);
|
||||
//strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME);
|
||||
strcpy(font_name, (*devfont)->name);
|
||||
|
||||
font_DelDevFont (font_name);
|
||||
*devfont = NULL;
|
||||
|
||||
@@ -120,47 +120,42 @@ hb_minigui_unicode_decompose (hb_unicode_funcs_t *ufuncs,
|
||||
return UCharDecompose(ab, a, b);
|
||||
}
|
||||
|
||||
static hb_unicode_funcs_t *_funcs;
|
||||
static hb_unicode_funcs_t *get_unicode_funcs(void)
|
||||
{
|
||||
if (_funcs)
|
||||
return _funcs;
|
||||
|
||||
_funcs = hb_unicode_funcs_create (NULL);
|
||||
|
||||
hb_unicode_funcs_set_combining_class_func (_funcs,
|
||||
hb_minigui_unicode_combining_class, NULL, NULL);
|
||||
hb_unicode_funcs_set_general_category_func (_funcs,
|
||||
hb_minigui_unicode_general_category, NULL, NULL);
|
||||
hb_unicode_funcs_set_mirroring_func (_funcs,
|
||||
hb_minigui_unicode_mirroring, NULL, NULL);
|
||||
hb_unicode_funcs_set_script_func (_funcs,
|
||||
hb_minigui_unicode_script, NULL, NULL);
|
||||
hb_unicode_funcs_set_compose_func (_funcs,
|
||||
hb_minigui_unicode_compose, NULL, NULL);
|
||||
hb_unicode_funcs_set_decompose_func (_funcs,
|
||||
hb_minigui_unicode_decompose, NULL, NULL);
|
||||
|
||||
hb_unicode_funcs_make_immutable (_funcs);
|
||||
|
||||
return _funcs;
|
||||
}
|
||||
|
||||
typedef hb_unicode_funcs_t *(*hb_get_unicode_funcs) (void);
|
||||
extern hb_get_unicode_funcs __hb_extern_get_unicode_funcs;
|
||||
/* extern hb_unicode_funcs_t *__mg_hb_unifuncs */
|
||||
hb_unicode_funcs_t *__mg_hb_unifuncs;
|
||||
|
||||
void __mg_init_harzbuff_funcs(void)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
__hb_extern_get_unicode_funcs = get_unicode_funcs;
|
||||
|
||||
if (__mg_hb_unifuncs)
|
||||
return;
|
||||
|
||||
__mg_hb_unifuncs = hb_unicode_funcs_create (NULL);
|
||||
|
||||
hb_unicode_funcs_set_combining_class_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_combining_class, NULL, NULL);
|
||||
hb_unicode_funcs_set_general_category_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_general_category, NULL, NULL);
|
||||
hb_unicode_funcs_set_mirroring_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_mirroring, NULL, NULL);
|
||||
hb_unicode_funcs_set_script_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_script, NULL, NULL);
|
||||
hb_unicode_funcs_set_compose_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_compose, NULL, NULL);
|
||||
hb_unicode_funcs_set_decompose_func (__mg_hb_unifuncs,
|
||||
hb_minigui_unicode_decompose, NULL, NULL);
|
||||
|
||||
hb_unicode_funcs_make_immutable (__mg_hb_unifuncs);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void __mg_term_harzbuff_funcs(void)
|
||||
{
|
||||
_DBG_PRINTF("%s: called\n", __FUNCTION__);
|
||||
|
||||
if (_funcs) {
|
||||
hb_unicode_funcs_destroy(_funcs);
|
||||
if (__mg_hb_unifuncs) {
|
||||
hb_unicode_funcs_destroy(__mg_hb_unifuncs);
|
||||
}
|
||||
else {
|
||||
_ERR_PRINTF("%s: hb_unicode_funcs_t object is NULL\n",
|
||||
|
||||
@@ -1243,11 +1243,9 @@ static int wait_event_ex (int maxfd, fd_set *in, fd_set *out, fd_set *except,
|
||||
break;
|
||||
}
|
||||
|
||||
#if 0
|
||||
default:
|
||||
_DBG_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
libinput_event_destroy(event);
|
||||
|
||||
@@ -800,9 +800,9 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
|
||||
uint32_t name, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch);
|
||||
|
||||
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
|
||||
uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch);
|
||||
//GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
|
||||
// uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
// uint32_t width, uint32_t height, uint32_t pitch);
|
||||
|
||||
GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video,
|
||||
int prime_fd, size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
|
||||
+3
-1
@@ -1432,7 +1432,9 @@ char * strtrimall( char *src)
|
||||
return src;
|
||||
}
|
||||
|
||||
strcpy (src, src + nIndex1);
|
||||
// VW: use memmove instead of strcpy to avoid overlapping
|
||||
// strcpy (src, src + nIndex1);
|
||||
memmove (src, src + nIndex1, nLen - nIndex1 + 1);
|
||||
|
||||
nLen = strlen (src);
|
||||
nIndex1 = nLen - 1;
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include <sys/select.h>
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
char* strdup (const char *string)
|
||||
{
|
||||
|
||||
@@ -1681,7 +1681,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
|
||||
surface_buffer->handle,
|
||||
surface_buffer->width, surface_buffer->height,
|
||||
surface_buffer->pitch,
|
||||
surface_buffer->size, surface_buffer->offset);
|
||||
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
|
||||
|
||||
/* prepare buffer for memory mapping */
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
@@ -1810,7 +1810,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
|
||||
}
|
||||
|
||||
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);
|
||||
|
||||
+5
-1
@@ -3813,6 +3813,10 @@ HDC drmCreateDCFromNameEx (GHANDLE video, uint32_t name, uint32_t drm_format,
|
||||
return (HDC)pmem_dc;
|
||||
}
|
||||
|
||||
extern GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
|
||||
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch);
|
||||
|
||||
HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
|
||||
uint32_t drm_format, off_t offset,
|
||||
uint32_t width, uint32_t height, uint32_t pitch)
|
||||
@@ -3824,7 +3828,7 @@ HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
|
||||
return HDC_INVALID;
|
||||
|
||||
LOCK (&__mg_gdilock);
|
||||
surface = __drm_create_surface_from_handle (video, handle, size,
|
||||
surface = (GAL_Surface *)__drm_create_surface_from_handle (video, handle, size,
|
||||
drm_format, offset, width, height, pitch);
|
||||
UNLOCK (&__mg_gdilock);
|
||||
|
||||
|
||||
@@ -75,6 +75,9 @@
|
||||
#include <hb.h>
|
||||
#include <hb-ft.h>
|
||||
|
||||
/* __mg_hb_unifuncs is implemented in src/font/harzbuff-minigui-funcs.c */
|
||||
extern hb_unicode_funcs_t *__mg_hb_unifuncs;
|
||||
|
||||
// define _CACHED_HB_FONT if you want use the cached HB fonts
|
||||
#define _CACHED_HB_FONT 1
|
||||
|
||||
@@ -216,6 +219,14 @@ static BOOL shape_layout_run(SEInstance* inst,
|
||||
if (hb_buf == NULL)
|
||||
goto error;
|
||||
|
||||
/* use our own unicode functions */
|
||||
if (__mg_hb_unifuncs) {
|
||||
hb_buffer_set_unicode_funcs(hb_buf, __mg_hb_unifuncs);
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF("Unicode functions for HarfBuzz does not initialized\n");
|
||||
}
|
||||
|
||||
hb_buffer_set_content_type(hb_buf, HB_BUFFER_CONTENT_TYPE_UNICODE);
|
||||
for (i = 0; i < run->len; i++) {
|
||||
hb_buffer_add(hb_buf, run->ucs[i], i);
|
||||
|
||||
Reference in New Issue
Block a user