mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 09:14:09 +08:00
Compare commits
3
Commits
ver-5-0-10
...
rel-3-0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eca9813a47 | ||
|
|
33d744c37a | ||
|
|
b397b79ca1 |
+32
@@ -0,0 +1,32 @@
|
|||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.la
|
||||||
|
*.al
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
\#
|
||||||
|
am--include-marker
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
.deps/
|
||||||
|
.libs/
|
||||||
|
/acinclude.m4
|
||||||
|
/aclocal.m4
|
||||||
|
/autom4te.cache
|
||||||
|
/compile
|
||||||
|
/missing
|
||||||
|
/stamp-h1
|
||||||
|
/config.*
|
||||||
|
/configure
|
||||||
|
/depcomp
|
||||||
|
/install-sh
|
||||||
|
/libtool
|
||||||
|
/*.pc
|
||||||
|
/*config.h
|
||||||
|
/*config.h.in
|
||||||
|
/*config.h.in~
|
||||||
|
/src/font/utils/emoji/
|
||||||
|
/src/font/utils/ucd/
|
||||||
|
/src/sysres/font_list
|
||||||
|
/src/sysres/license/dat_files/
|
||||||
|
/configure~
|
||||||
@@ -6,13 +6,14 @@ A mature cross-platform windowing system and GUI system for embedded and IoT dev
|
|||||||
## TABLE OF CONTENTS
|
## TABLE OF CONTENTS
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
|
1. A brief building instruction
|
||||||
1. The runtime modes of MiniGUI
|
1. The runtime modes of MiniGUI
|
||||||
1. History
|
1. History
|
||||||
1. About the authors
|
1. About the authors
|
||||||
1. If you have a problem
|
1. If you have a problem
|
||||||
1. A little FAQ
|
1. A little FAQ
|
||||||
1. Copying
|
|
||||||
1. Not free for commercial use
|
1. Not free for commercial use
|
||||||
|
1. Copying
|
||||||
|
|
||||||
|
|
||||||
## INTRODUCTION
|
## INTRODUCTION
|
||||||
@@ -53,15 +54,15 @@ for the developers to develop app much easier:
|
|||||||
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
* mGUtils: A MiniGUI component which contains miscellaneous utilities
|
||||||
like ColorSelectionDialogBox, FileOpenDialogBox, and so on.
|
like ColorSelectionDialogBox, FileOpenDialogBox, and so on.
|
||||||
|
|
||||||
|
* mG3d: A simple three-dimension component for MiniGUI. This component
|
||||||
|
provides a simple 3D API for app. You can use mG3d to create simple
|
||||||
|
3D UI.
|
||||||
|
|
||||||
There are also some legacy MiniGUI components:
|
There are also some legacy MiniGUI components:
|
||||||
|
|
||||||
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
* mGp: A printing component for MiniGUI. By using mGp, you can print
|
||||||
out the graphics created by MiniGUI app to general-purpose printers.
|
out the graphics created by MiniGUI app to general-purpose printers.
|
||||||
|
|
||||||
* mG3d: A simple three-dimension component for MiniGUI. This component
|
|
||||||
provides a simple 3D API for app. You can use mG3d to create simple
|
|
||||||
3D UI.
|
|
||||||
|
|
||||||
MiniGUI is a free software project. In December 1998, the initiator of
|
MiniGUI is a free software project. In December 1998, the initiator of
|
||||||
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
|
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
|
||||||
License (GPL). In September 2002, the core developers of
|
License (GPL). In September 2002, the core developers of
|
||||||
@@ -100,6 +101,42 @@ FMSoft releases miniStudio, which is a WYSIWYG IDE for MiniGUI, as a shareware.
|
|||||||
You can also download it from the official site of MiniGUI.
|
You can also download it from the official site of MiniGUI.
|
||||||
|
|
||||||
|
|
||||||
|
## A BRIEF BUILDING INSTRUCTION
|
||||||
|
|
||||||
|
This instruction assumes that you are using Ubuntu Linux.
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
You can run `apt install <package_name>` to install the software on Ubuntu Linux.
|
||||||
|
|
||||||
|
* Building tools:
|
||||||
|
* autoconf
|
||||||
|
* Dependent libraries (all are optional):
|
||||||
|
* libjpeg64-dev
|
||||||
|
* libpng12-dev
|
||||||
|
* libfreetype6-dev
|
||||||
|
|
||||||
|
### Building
|
||||||
|
|
||||||
|
MiniGUI core uses GNU autoconf/automake scripts to configure and build the project.
|
||||||
|
|
||||||
|
Run
|
||||||
|
|
||||||
|
$ ./configure; make; sudo make install
|
||||||
|
|
||||||
|
to configure, make, and install the headers and the libraries. If there is not
|
||||||
|
`configure` file, please run
|
||||||
|
|
||||||
|
$ ./autogen.sh
|
||||||
|
|
||||||
|
to generate the script.
|
||||||
|
|
||||||
|
MiniGUI core also provides some configuration options to customize the features.
|
||||||
|
For more information, please run
|
||||||
|
|
||||||
|
$ ./configure --help
|
||||||
|
|
||||||
|
|
||||||
## THE RUNTIME MODES OF MINIGUI
|
## THE RUNTIME MODES OF MINIGUI
|
||||||
|
|
||||||
You can configure and compile MiniGUI as one of three runtime modes:
|
You can configure and compile MiniGUI as one of three runtime modes:
|
||||||
@@ -288,12 +325,6 @@ Q: Does MiniGUI offer the support for grey LCD with 4bpp (bits per pixel)?
|
|||||||
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
|
A: Yes, it offers. It even offers the support for 1bpp and 2bpp LCD.
|
||||||
|
|
||||||
|
|
||||||
## COPYING
|
|
||||||
|
|
||||||
Copyright (C) 2002~2017, Beijing FMSoft Technologies Co., Ltd.
|
|
||||||
|
|
||||||
Copyright (C) 1998~2002, WEI Yongming
|
|
||||||
|
|
||||||
## NOT FREE FOR COMMERCIAL USE
|
## NOT FREE FOR COMMERCIAL USE
|
||||||
|
|
||||||
MiniGUI and its components are licensed under the GPL license.
|
MiniGUI and its components are licensed under the GPL license.
|
||||||
@@ -305,3 +336,34 @@ We provide you the commercial license of MiniGUI according to the number
|
|||||||
of the run-time binary copies of MiniGUI. If you are interested in
|
of the run-time binary copies of MiniGUI. If you are interested in
|
||||||
the commercial license of MiniGUI, please write to sales@minigui.com.
|
the commercial license of MiniGUI, please write to sales@minigui.com.
|
||||||
|
|
||||||
|
|
||||||
|
## COPYING
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -1,12 +1,25 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
|
## Version 3.0.14
|
||||||
|
|
||||||
|
On July 31, 2023, FMSoft announces the availability of MiniGUI 3.0.13,
|
||||||
|
which is a bug fixing release of MiniGUI 3.0.x.
|
||||||
|
|
||||||
|
### What's new in version 3.0.14
|
||||||
|
|
||||||
|
In this version, we fixed some bugs:
|
||||||
|
|
||||||
|
* ENHANCEMENTS:
|
||||||
|
- Ignore C0CTRL characters when renerding text.
|
||||||
|
- Tune some code to suppress compilation warings.
|
||||||
|
|
||||||
## Version 3.0.13
|
## Version 3.0.13
|
||||||
|
|
||||||
The MiniGUI development team announces the availability of MiniGUI 3.0.13.
|
The MiniGUI development team announces the availability of MiniGUI 3.0.13.
|
||||||
All users of MiniGUI are encouraged to test this version carefully, and
|
All users of MiniGUI are encouraged to test this version carefully, and
|
||||||
report any bugs and incompatibilities in
|
report any bugs and incompatibilities in
|
||||||
|
|
||||||
https://github.com/VincentWei/minigui.
|
https://github.com/VincentWei/minigui
|
||||||
|
|
||||||
### What's new in this version
|
### What's new in this version
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Version 3.0.13 (2017/12/06)
|
Version 3.0.14 (2023/07/31)
|
||||||
|
|
||||||
This release needs the following resource packages:
|
This release needs the following resource packages:
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
AC_INIT(libminigui, 3.0.13)
|
AC_INIT(libminigui, 3.0.14)
|
||||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||||
|
|
||||||
dnl Set various version strings - taken gratefully from the SDL sources
|
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=3
|
MINIGUI_MAJOR_VERSION=3
|
||||||
MINIGUI_MINOR_VERSION=0
|
MINIGUI_MINOR_VERSION=0
|
||||||
MINIGUI_MICRO_VERSION=13
|
MINIGUI_MICRO_VERSION=14
|
||||||
MINIGUI_INTERFACE_AGE=0
|
MINIGUI_INTERFACE_AGE=1
|
||||||
MINIGUI_BINARY_AGE=0
|
MINIGUI_BINARY_AGE=1
|
||||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||||
|
|
||||||
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
AC_SUBST(MINIGUI_MAJOR_VERSION)
|
||||||
|
|||||||
@@ -284,7 +284,8 @@ char * __mg_msgstr3 [] =
|
|||||||
"", // 0x0136
|
"", // 0x0136
|
||||||
"", // 0x0137
|
"", // 0x0137
|
||||||
"", // 0x0138
|
"", // 0x0138
|
||||||
"", // 0x0139 "", // 0x013A
|
"", // 0x0139
|
||||||
|
"", // 0x013A
|
||||||
"", // 0x013B
|
"", // 0x013B
|
||||||
"", // 0x013C
|
"", // 0x013C
|
||||||
"", // 0x013D
|
"", // 0x013D
|
||||||
|
|||||||
+8
-4
@@ -1055,8 +1055,10 @@ int GUIAPI GetGlyphsExtentPoint(
|
|||||||
(glyphs[i]);
|
(glyphs[i]);
|
||||||
|
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|| (glyph_type & MCHAR_TYPE_NOSPACING_MARK)) {
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2 ||
|
||||||
|
(glyph_type & MCHAR_TYPE_NOSPACING_MARK)) {
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1112,8 +1114,10 @@ int GUIAPI GetGlyphsExtent(
|
|||||||
glyph_type = devfont->charset_ops->glyph_type
|
glyph_type = devfont->charset_ops->glyph_type
|
||||||
(glyphs[i]);
|
(glyphs[i]);
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|| (glyph_type & MCHAR_TYPE_NOSPACING_MARK)) {
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2 ||
|
||||||
|
(glyph_type & MCHAR_TYPE_NOSPACING_MARK)) {
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -295,6 +295,8 @@ static BOOL cb_drawtextex2 (void* context, Glyph32 glyph_value,
|
|||||||
|
|
||||||
switch (glyph_type) {
|
switch (glyph_type) {
|
||||||
case MCHAR_TYPE_ZEROWIDTH:
|
case MCHAR_TYPE_ZEROWIDTH:
|
||||||
|
case MCHAR_TYPE_CTRL1:
|
||||||
|
case MCHAR_TYPE_CTRL2:
|
||||||
case MCHAR_TYPE_CR:
|
case MCHAR_TYPE_CR:
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+3
-1
@@ -137,7 +137,9 @@ int GUIAPI DrawGlyph (HDC hdc, int x, int y, Glyph32 glyph_value,
|
|||||||
|
|
||||||
glyph_type = devfont->charset_ops->glyph_type (glyph_value);
|
glyph_type = devfont->charset_ops->glyph_type (glyph_value);
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH) {
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2) {
|
||||||
if (adv_x) *adv_x = 0;
|
if (adv_x) *adv_x = 0;
|
||||||
if (adv_y) *adv_y = 0;
|
if (adv_y) *adv_y = 0;
|
||||||
advance = 0;
|
advance = 0;
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ static BOOL cb_tabbedtextout (void* context, Glyph32 glyph_value,
|
|||||||
|
|
||||||
switch (glyph_type) {
|
switch (glyph_type) {
|
||||||
case MCHAR_TYPE_ZEROWIDTH:
|
case MCHAR_TYPE_ZEROWIDTH:
|
||||||
|
case MCHAR_TYPE_CTRL1:
|
||||||
|
case MCHAR_TYPE_CTRL2:
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -176,6 +178,8 @@ static BOOL cb_tabbedtextoutex (void* context, Glyph32 glyph_value,
|
|||||||
|
|
||||||
switch (glyph_type) {
|
switch (glyph_type) {
|
||||||
case MCHAR_TYPE_ZEROWIDTH:
|
case MCHAR_TYPE_ZEROWIDTH:
|
||||||
|
case MCHAR_TYPE_CTRL1:
|
||||||
|
case MCHAR_TYPE_CTRL2:
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -546,6 +550,8 @@ int GUIAPI GetTabbedTextExtentPoint (HDC hdc, const char* text,
|
|||||||
|
|
||||||
switch (glyph_type) {
|
switch (glyph_type) {
|
||||||
case MCHAR_TYPE_ZEROWIDTH:
|
case MCHAR_TYPE_ZEROWIDTH:
|
||||||
|
case MCHAR_TYPE_CTRL1:
|
||||||
|
case MCHAR_TYPE_CTRL2:
|
||||||
case MCHAR_TYPE_VOWEL:
|
case MCHAR_TYPE_VOWEL:
|
||||||
break;
|
break;
|
||||||
case MCHAR_TYPE_LF:
|
case MCHAR_TYPE_LF:
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ static BOOL cb_draw_glyph (void* context, Glyph32 glyph_value, int glyph_type)
|
|||||||
int adv_x, adv_y;
|
int adv_x, adv_y;
|
||||||
int bkmode;
|
int bkmode;
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH) {
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2) {
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
}
|
}
|
||||||
else if (glyph_type == MCHAR_TYPE_VOWEL){
|
else if (glyph_type == MCHAR_TYPE_VOWEL){
|
||||||
@@ -142,7 +144,9 @@ static BOOL cb_textout (void* context, Glyph32 glyph_value, int glyph_type)
|
|||||||
int adv_x, adv_y;
|
int adv_x, adv_y;
|
||||||
int bkmode;
|
int bkmode;
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH) {
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2) {
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
}
|
}
|
||||||
else if (glyph_type == MCHAR_TYPE_VOWEL){
|
else if (glyph_type == MCHAR_TYPE_VOWEL){
|
||||||
@@ -308,7 +312,9 @@ static BOOL cb_textout_omitted (void* context, Glyph32 glyph_value, int glyph_ty
|
|||||||
//BBOX bbox;
|
//BBOX bbox;
|
||||||
int bkmode = ctxt->pdc->bkmode;
|
int bkmode = ctxt->pdc->bkmode;
|
||||||
|
|
||||||
if (glyph_type == MCHAR_TYPE_ZEROWIDTH) {
|
if (glyph_type == MCHAR_TYPE_ZEROWIDTH ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL1 ||
|
||||||
|
glyph_type == MCHAR_TYPE_CTRL2) {
|
||||||
adv_x = adv_y = 0;
|
adv_x = adv_y = 0;
|
||||||
}
|
}
|
||||||
else if(glyph_type == MCHAR_TYPE_VOWEL) {
|
else if(glyph_type == MCHAR_TYPE_VOWEL) {
|
||||||
|
|||||||
+37
-2
@@ -13,6 +13,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "minigui.h"
|
#include "minigui.h"
|
||||||
@@ -200,6 +201,33 @@ BOOL ncsInstanceOf(mObject *object, mObjectClass* clss)
|
|||||||
return objClss != NULL;
|
return objClss != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int _va_check (va_list va)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
union {
|
||||||
|
va_list va;
|
||||||
|
DWORD dva;
|
||||||
|
} _va;
|
||||||
|
|
||||||
|
if (va == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
va_copy (_va.va, va);
|
||||||
|
if(_va.dva == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
intptr_t zero = 0;
|
||||||
|
size_t n = sizeof (intptr_t);
|
||||||
|
|
||||||
|
if (sizeof (va_list) < n) {
|
||||||
|
n = sizeof (va_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
return memcmp (&zero, &va, n);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
int ncsParseConstructParams(va_list args, const char* signature, ...)
|
int ncsParseConstructParams(va_list args, const char* signature, ...)
|
||||||
{
|
{
|
||||||
@@ -207,8 +235,15 @@ int ncsParseConstructParams(va_list args, const char* signature, ...)
|
|||||||
int argc;
|
int argc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(GET_ARG_COUNT(args) <= 0)
|
/*
|
||||||
return 0;
|
** the implementation of GET_ARG_COUNT is bad, because some systems
|
||||||
|
** define va_list as a pointer, and others define it as an array of
|
||||||
|
** pointers (of length 1).
|
||||||
|
if(GET_ARG_COUNT(args) <= 0)
|
||||||
|
return 0;
|
||||||
|
*/
|
||||||
|
if (_va_check (args) == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
argc = va_arg(args, int);
|
argc = va_arg(args, int);
|
||||||
if(argc <= 0)
|
if(argc <= 0)
|
||||||
|
|||||||
@@ -266,6 +266,11 @@ MGNCS_EXPORT mObject* mgInitObjectArgs(mObject* pobj, mObjectClass* _class, ...)
|
|||||||
#define INIT_OBJ(Clss, pobj) INIT_OBJEX(Clss, pobj, 0)
|
#define INIT_OBJ(Clss, pobj) INIT_OBJEX(Clss, pobj, 0)
|
||||||
#define INIT_OBJV(Clss, pobj, ...) ((Clss* )initObjectArgs((mObject*)((void*)(pobj)), \
|
#define INIT_OBJV(Clss, pobj, ...) ((Clss* )initObjectArgs((mObject*)((void*)(pobj)), \
|
||||||
(mObjectClass*)((void*)(&(Class(Clss)))), ##__VA_ARGS__))
|
(mObjectClass*)((void*)(&(Class(Clss)))), ##__VA_ARGS__))
|
||||||
|
|
||||||
|
/*
|
||||||
|
** the implementation of GET_ARG_COUNT is bad, because some systems
|
||||||
|
** define va_list as a pointer, and others define it as an array of
|
||||||
|
** pointers (of length 1).
|
||||||
static inline int MGGET_ARG_COUNT(va_list va)
|
static inline int MGGET_ARG_COUNT(va_list va)
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
@@ -282,6 +287,8 @@ static inline int MGGET_ARG_COUNT(va_list va)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#define GET_ARG_COUNT MGGET_ARG_COUNT
|
#define GET_ARG_COUNT MGGET_ARG_COUNT
|
||||||
|
*/
|
||||||
|
|
||||||
#define UNIT_OBJ(pobj) (_c(pobj)->destroy(pobj))
|
#define UNIT_OBJ(pobj) (_c(pobj)->destroy(pobj))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user