mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-23 08:33:55 +08:00
Merge branch '64b'
This commit is contained in:
@@ -6,6 +6,7 @@ A mature cross-platform windowing system and GUI system for embedded and IoT dev
|
||||
## TABLE OF CONTENTS
|
||||
|
||||
1. Introduction
|
||||
1. New features in version 3.2.x
|
||||
1. The runtime modes of MiniGUI
|
||||
1. History
|
||||
1. About the authors
|
||||
@@ -18,20 +19,21 @@ A mature cross-platform windowing system and GUI system for embedded and IoT dev
|
||||
## INTRODUCTION
|
||||
|
||||
MiniGUI is a mature cross-platform windowing system and GUI (Graphics
|
||||
User Interface) support system for embedded systems and IoT devices. This
|
||||
is the mainline release of MiniGUI maintained by WEI Yongming.
|
||||
User Interface) support system for embedded systems and smart IoT devices.
|
||||
This is the version 3.2.x of MiniGUI maintained by WEI Yongming
|
||||
(Vincent Wei, https://github.com/VincentWei).
|
||||
|
||||
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
|
||||
use.
|
||||
|
||||
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
|
||||
windowing and GUI support system, which is especially fit for
|
||||
embedded systems or IoT devices based-on Linux/uClinux, eCos, and other
|
||||
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
|
||||
traditional RTOSes, such as VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
|
||||
and OSE.
|
||||
|
||||
This is the MiniGUI core source tarball, which provides windowing
|
||||
and graphics interfaces as well as a lot of standard controls.
|
||||
and graphics interfaces as well as a lot of standard controls (tookit).
|
||||
|
||||
Besides MiniGUI core, FMSoft also provides some components
|
||||
for the developers to develop app much easier:
|
||||
@@ -96,9 +98,22 @@ components, and other open source apps on GitHub. You can visit them on:
|
||||
|
||||
https://github.com/VincentWei
|
||||
|
||||
FMSoft releases miniStudio, which is a WYSIWYG IDE for MiniGUI, as a shareware.
|
||||
FMSoft also releases miniStudio, which is a WYSIWYG IDE for MiniGUI, as a shareware.
|
||||
You can also download it from the official site of MiniGUI.
|
||||
|
||||
http://www.minigui.com/en/download
|
||||
|
||||
|
||||
## NEW FEATURES IN VERSION 3.2.x
|
||||
|
||||
We introduce some new features in MiniGUI Version 3.2.x:
|
||||
|
||||
* The support for 64-bit platform. Note that some APIs have changed
|
||||
to support 64-bit platform. For more information, please refer to
|
||||
RELEASE-NOTES.md file.
|
||||
|
||||
Because of the changes of some APIs, we recommended strongly that you
|
||||
use this version for new projects.
|
||||
|
||||
## THE RUNTIME MODES OF MINIGUI
|
||||
|
||||
@@ -182,7 +197,7 @@ A brief history description of the development progress lay below:
|
||||
0) 1994 ~ 1996: MiniGUI DOS version.
|
||||
1) Dec, 1998: Began to write.
|
||||
2) Apr, 1999: The skeleton of MiniGUI, windowing sub-system
|
||||
and basic graphics device interfaces.
|
||||
and basic graphics device interfaces.
|
||||
3) May, 1999: Timer, menu, and the skeleton of control sub-system.
|
||||
4) Jun, 1999: Chinese input method (by Kang Xiaoning).
|
||||
5) July, 1999: GIF and JPG loading support (by LI Zhuo).
|
||||
@@ -191,43 +206,33 @@ A brief history description of the development progress lay below:
|
||||
8) Sep, 1999: Snapshot of screen or window.
|
||||
9) Jan., 2000: VCOnGUI (Virtual Console on MiniGUI) version 0.2.02.
|
||||
10) Mar., 2000: Linux distribution installer based-on MiniGUI for
|
||||
HappyLinux 1.0.
|
||||
HappyLinux 1.0.
|
||||
11) Jun., 2000: Began to develop version 1.0.xx.
|
||||
12) Sep., 2000: MiniGUI version 0.3.06 released.
|
||||
13) Oct., 2000: MiniGUI version 0.9.00 released.
|
||||
14) Nov., 2000: MiniGUI version 0.9.96 released.
|
||||
15) Jan., 2001: MiniGUI version 0.9.98 released. You can build
|
||||
MiniGUI-Lite from this version.
|
||||
MiniGUI-Lite from this version.
|
||||
16) Jan., 2001: MiniGUI version 1.0.00Beta1 released.
|
||||
17) Feb., 2001: MiniGUI version 1.0.00Pre1 released.
|
||||
18) Apr., 2001: MiniGUI version 1.0.00 released (2001/04/16).
|
||||
18) Sep., 2001: MiniGUI version 1.1.0Pre1 released (2001/09/12).
|
||||
19) Sep., 2001: MiniGUI version 1.0.9 released (2001/09/17),
|
||||
this will be the last version of
|
||||
source branch 1.0.x.
|
||||
this will be the last version of source branch 1.0.x.
|
||||
20) Oct., 2001: MiniGUI version 1.1.0Pre4 released (2001/10/22).
|
||||
This version have new GAL and GDI interfaces.
|
||||
21) Mar., 2002: MiniGUI official version 1.1.0 released
|
||||
(2002/03/08).
|
||||
MiniGUI API Reference documentation
|
||||
version 0.9 released.
|
||||
22) Mar., 2002: MiniGUI API Reference documentation
|
||||
version 1.0 released.
|
||||
23) Apr., 2002: MiniGUI the new stable version 1.2.0 released
|
||||
(2002/04/11).
|
||||
This version have new GAL and GDI interfaces.
|
||||
21) Mar., 2002: MiniGUI official version 1.1.0 released (2002/03/08).
|
||||
MiniGUI API Reference documentation version 0.9 released.
|
||||
22) Mar., 2002: MiniGUI API Reference documentation version 1.0 released.
|
||||
23) Apr., 2002: MiniGUI the new stable version 1.2.0 released (2002/04/11).
|
||||
24) Sep., 2002: The main developers of MiniGUI founded a
|
||||
new software corporation: Beijing FMSoft
|
||||
Technology Co., Ltd.. And the development and
|
||||
maintenance of MiniGUI changes from
|
||||
loosely-knit team to business organization.
|
||||
25) Mar., 2003: MiniGUI official version 1.2.5 released
|
||||
(2003/03/23).
|
||||
25) May., 2003: MiniGUI official version 1.2.6 released
|
||||
(2003/05/18).
|
||||
26) Sep., 2003: MiniGUI official version 1.3.1 released
|
||||
(2003/09/11).
|
||||
27) Jan., 2004: MiniGUI official version 1.5.1 released
|
||||
(2004/01/18).
|
||||
new software corporation: Beijing FMSoft Technology Co., Ltd..
|
||||
And the development and maintenance of MiniGUI changes from
|
||||
loosely-knit team to business organization.
|
||||
25) Mar., 2003: MiniGUI official version 1.2.5 released (2003/03/23).
|
||||
25) May., 2003: MiniGUI official version 1.2.6 released (2003/05/18).
|
||||
26) Sep., 2003: MiniGUI official version 1.3.1 released (2003/09/11).
|
||||
27) Jan., 2004: MiniGUI official version 1.5.1 released (2004/01/18).
|
||||
28) Feb., 2004: MiniGUI tested on eCos and uC/OS-II.
|
||||
29) Jun., 2004: MiniGUI tested on VxWorks.
|
||||
30) Jan., 2005: MiniGUI tested on ThreadX and pSOS.
|
||||
@@ -247,6 +252,7 @@ A brief history description of the development progress lay below:
|
||||
44) Aug., 2017: FMSoft released the latest source code of MiniGUI under GPL 3.0.
|
||||
45) Aug., 2017: FMSoft released the latest source code of mDolphin under Apache 2.0.
|
||||
46) Dec., 2017: FMSoft updated MiniGUI and miniStudio for latest Linux distributions.
|
||||
47) Feb., 2018: FMSoft released MiniGUI version 3.2.
|
||||
|
||||
|
||||
## ABOUT THE AUTHORS
|
||||
|
||||
+168
-2
@@ -1,5 +1,171 @@
|
||||
# Release Notes
|
||||
|
||||
## Version 3.2.0
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.2.0.
|
||||
All users of MiniGUI are recommended strongly to use this version for new
|
||||
MiniGUI apps. Please report any bugs and incompatibilities in
|
||||
|
||||
https://github.com/VincentWei/minigui.
|
||||
|
||||
### What's new in this version
|
||||
|
||||
* Support for 64-bit platform. Note that the definitions of some types
|
||||
and APIs changed.
|
||||
* Eliminate all compilation warnings.
|
||||
|
||||
### Type changes
|
||||
|
||||
#### Changes of handle types
|
||||
|
||||
All handle types, including `GHANDLE`, `HWND`, `HDC`, etc.,
|
||||
are now defined as aliases of `PVOID` (`typedef void* PVOID`).
|
||||
You may need to check your code to reflect this change.
|
||||
|
||||
#### Changes of integer types.
|
||||
|
||||
The type of `DWORD` now has the pointer precision. That is,
|
||||
the size of `DWORD` will be 4 bytes on 32-bit platform, and 8 bytes on
|
||||
64-bit platform.
|
||||
|
||||
Similarly, `WPARAM` and `LPARAM` are now have the pointer precision.
|
||||
|
||||
`WORD` and `SWORD` has a half of pointer precision. The size of these
|
||||
two types is 2 bytes on 32-bit platform, and 4 bytes on 64-bit platform.
|
||||
|
||||
`RGBCOLOR` now is defined as an alias of `DWORD32` (see below).
|
||||
|
||||
Note that the type of `BYTE` always has the size of 8-bit on both
|
||||
32-bit and 64-bit platforms.
|
||||
|
||||
#### New integer types:
|
||||
|
||||
We introduce `DWORD32` and `SDWORD32` types,
|
||||
which have the size of 4 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 32-bit integers from
|
||||
a binary files for the portability. Of course, you can also use
|
||||
`Uint32` or `Sint32` types.
|
||||
|
||||
Similarly, we introduce `WORD16` and `SWORD16` types,
|
||||
which have the size of 2 bytes on both 32-bit and 64-bit platforms.
|
||||
You should use these types when reading/writing 16-bit integers from
|
||||
a binary file for the portability. Of course, you can also use
|
||||
`Uint16` or `SUint16` types.
|
||||
|
||||
`LRESULT` is defined for window callback procedure, and it has
|
||||
the pointer precision.
|
||||
|
||||
`LINT` is a new integer type with pointer precision.
|
||||
|
||||
### API changes
|
||||
|
||||
#### Integer macros
|
||||
|
||||
`MAKEWORD16`: this new macro makes a 16-bit word by using two bytes.
|
||||
Meanwhile, `MAKEWORD` makes a 16-bit word on 32-bit platform, and a 32-bit
|
||||
word on 64-bit platform.
|
||||
|
||||
`LOBYTE_WORD16` and `HIBYTE_WORD16`: these two new macros get the low byte
|
||||
and the high byte in a 16-bit word respectively.
|
||||
|
||||
Note that `MAKELONG` macro always makes a DWORD integer, which has the pointer
|
||||
precision.
|
||||
|
||||
Note that 'MakeRGB` and `MakeRGBA` macros always make DWORD32 integers.
|
||||
In contract, GetRValue, GetRValue, GetBValue, GetAValue always get Red,
|
||||
green, blue, and alpha components from a DWORD32 integer respectively.
|
||||
|
||||
Note that you should use `(-1)` instead of `0xFFFFFFFF` for the invalid
|
||||
pointer-type value for good portability.
|
||||
|
||||
#### Structure and functions
|
||||
|
||||
The main changes in structure and functions:
|
||||
|
||||
* We now use a `UINT` instead of an `int` integer for the message identifier.
|
||||
This is not a very important change.
|
||||
|
||||
* We now use a `DWORD` integer for the time tick count. Meanwhile, you can
|
||||
create 64 timers on 64-bit platform.
|
||||
|
||||
* We now use a `LRESULT` integer for the return value of a window callback
|
||||
procedure. Now it is safe to return a pointer from the callback procedure
|
||||
on 64-bit platform. This is a very important change, and it will break the
|
||||
source compatibilty of your code. You should check the source code (use
|
||||
gcc option `-Wall`) carefully.
|
||||
|
||||
* We now use a `LINT` integer for the identifier of a timer. So you can pass
|
||||
a pointer as the identifier of the timer on 64-bit platform. mGNCS uses
|
||||
MiniGUI timer in this manner.
|
||||
|
||||
As a result, the strcuture `MSG` and all message-related functions changed.
|
||||
For example, the prototype of `SendMessage` changed from
|
||||
|
||||
int SendMessage (HWND hWnd, int nMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
to
|
||||
|
||||
LRESULT SendMessage (HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
Furthermore, the structure and functions to register window class,
|
||||
create main window, and create dialog box changed. For example, the prototype
|
||||
of `WNDPROC` changed from
|
||||
|
||||
typedef int (* WNDPROC)(HWND, int, WPARAM, LPARAM)
|
||||
|
||||
to
|
||||
|
||||
typedef LRESULT (* WNDPROC)(HWND, UINT, WPARAM, LPARAM)
|
||||
|
||||
Therefore, the prototype of `DefaultWindowProc` changed from
|
||||
|
||||
int DefaultWindowProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
to
|
||||
|
||||
LRESULT DefaultWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
All main window procedures, control class procedures, and dialog box procedures
|
||||
defined by your app should change the implementation to reflect the change above.
|
||||
|
||||
The prototype of `GetTickCount` changed from
|
||||
|
||||
unsigned int GetTickCount (void)
|
||||
|
||||
to
|
||||
|
||||
DWORD GetTickCount (void);
|
||||
|
||||
And the prototye of `TIMERPROC` changed from
|
||||
|
||||
typedef BOOL (* TIMERPROC)(HWND, int, DWORD)
|
||||
|
||||
to
|
||||
|
||||
typedef BOOL (* TIMERPROC)(HWND, LINT, DWORD)
|
||||
|
||||
In additio, we correct the bad or wrong definitions of some APIs:
|
||||
|
||||
1. `DWORD2PIXEL` to `DWORD2Pixel`. The old one has a bad name.
|
||||
2. `GetWindowRendererFromName`: The return type changes from
|
||||
`const WINDOW_ELEMENT_RENDERER*` to `WINDOW_ELEMENT_RENDERER*`.
|
||||
So you can overload some methods directly of a renderer.
|
||||
3. `GetDefaultWindowElementRenderer`: The return type changes from
|
||||
`const WINDOW_ELEMENT_RENDERER*` to `WINDOW_ELEMENT_RENDERER*`.
|
||||
So you can overload some methods directly of the default renderer.
|
||||
|
||||
### Configuration option changes
|
||||
|
||||
We add some new options for autoconf script (`configure`):
|
||||
|
||||
* `--with-runmode`: Now you can use this option to specify the runtime
|
||||
mode of MiniGUI. The old enable options for runmode were removed.
|
||||
Note that MiniGUI-Processes now is the default runmode.
|
||||
|
||||
* `--enable-develmode`: You should use this option to define `_DEBUG` macro,
|
||||
enable `-Wall -Werror` option, and enable all features of MiniGUI,
|
||||
if you were a MiniGUI developer.
|
||||
|
||||
## Version 3.0.13
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 3.0.13.
|
||||
@@ -20,7 +186,7 @@ report any bugs and incompatibilities in
|
||||
|
||||
* [NEW] CopyCursor: Copies a cursor object.
|
||||
* [NEW] GetKeyboardState: Gets status of all keys on keyboard.
|
||||
* [NEW] ToUnicode/ToAscii: Converts the key code between unicode and ASCII.
|
||||
* [NEW] ToUnicode/ToAscii: Converts the key code between Unicode and ASCII.
|
||||
* [NEW] GetWindowRegion: The function obtains a copy of the window region of a window.
|
||||
* [NEW] InvalidateRegion: Invalidates the client area within the specified region.
|
||||
* [NEW] ValidateRect: Validates the client area within a rectangle by removing the
|
||||
@@ -31,7 +197,7 @@ report any bugs and incompatibilities in
|
||||
* [NEW] AdjustWindowRectEx: Calculates the required size of the window rectangle
|
||||
based on the desired size of the client rectangle.
|
||||
* [NEW] WindowFromPointEx: Retrieves a handle to the window that contains the specified point.
|
||||
* [NEW] ChildWindowFromPointEx: Retrives a handle to the child window that contains the
|
||||
* [NEW] ChildWindowFromPointEx: Retrieves a handle to the child window that contains the
|
||||
speicified point and meets the certain criteria.
|
||||
* [NEW] ScrollWindowEx: Scrolls the content of a window's client area.
|
||||
* [ADJUST] GetIMEPos/SetIMEPos: inline functions -> normal functions.
|
||||
|
||||
+152
-99
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 3.0.13)
|
||||
AC_INIT(libminigui, 3.2.0)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -15,8 +15,8 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=3
|
||||
MINIGUI_MINOR_VERSION=0
|
||||
MINIGUI_MICRO_VERSION=13
|
||||
MINIGUI_MINOR_VERSION=2
|
||||
MINIGUI_MICRO_VERSION=0
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
@@ -82,11 +82,15 @@ dnl ========================================================================
|
||||
dnl User selectable options
|
||||
|
||||
dnl System wide options
|
||||
devel_mode="no"
|
||||
use_debug="no"
|
||||
trace_message="no"
|
||||
message_string="no"
|
||||
procs_version="no"
|
||||
|
||||
runtime_mode="procs"
|
||||
|
||||
stand_alone="no"
|
||||
|
||||
incore_res="no"
|
||||
use_miniguientry="no"
|
||||
fixed_math="yes"
|
||||
@@ -159,7 +163,7 @@ build_incorefont_times="yes"
|
||||
|
||||
build_sef_support="no"
|
||||
build_qpf_support="no"
|
||||
use_ttf_lib="none"
|
||||
use_ttf_lib="ft2"
|
||||
build_ttfcache_support="no"
|
||||
build_bmpf_support="yes"
|
||||
|
||||
@@ -278,6 +282,10 @@ build_productid="no"
|
||||
build_splash="yes"
|
||||
build_screensaver="no"
|
||||
|
||||
AC_ARG_ENABLE(develmode,
|
||||
[ --enable-develmode developer mode <default=no>],
|
||||
devel_mode=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug build with debugging messages <default=no>],
|
||||
use_debug=$enableval)
|
||||
@@ -290,9 +298,9 @@ AC_ARG_ENABLE(msgstr,
|
||||
[ --enable-msgstr include symbol name of message <default=no>],
|
||||
message_string=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(procs,
|
||||
[ --enable-procs build MiniGUI-Processes version <default=no>],
|
||||
procs_version=$enableval)
|
||||
AC_ARG_WITH(runmode,
|
||||
[ --with-runmode=procs/ths/sa the MiniGUI runtime mode <default=procs>],
|
||||
runtime_mode=$withval)
|
||||
|
||||
AC_ARG_ENABLE(standalone,
|
||||
[ --enable-standalone build MiniGUI-Standalone version <default=no>],
|
||||
@@ -524,35 +532,11 @@ build_sef_support=$enableval)
|
||||
|
||||
AC_ARG_WITH(ttfsupport,
|
||||
[ --with-ttfsupport=ft1/ft2/none How to support TrueType font (FreeType 1/FreeType 2/None) <default=none>],
|
||||
[ case "$with_ttfsupport" in
|
||||
ft1)
|
||||
use_ttf_lib="ft1"
|
||||
dnl Check for FreeType1 library
|
||||
AC_CHECK_LIB(ttf, TT_FreeType_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lttf",
|
||||
use_ttf_lib="none")
|
||||
dnl ttf cache
|
||||
AC_ARG_ENABLE(ttfcache,
|
||||
[ --enable-ttfcache include ttf cache support <default=no>],
|
||||
build_ttfcache_support=$enableval)
|
||||
;;
|
||||
use_ttf_lib=$withval)
|
||||
|
||||
ft2)
|
||||
use_ttf_lib="ft2"
|
||||
dnl Check for FreeType2 library
|
||||
AC_CHECK_LIB(freetype, FT_Library_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype -lz -lpng12",
|
||||
use_ttf_lib="none")
|
||||
dnl ttf cache
|
||||
AC_ARG_ENABLE(ttfcache,
|
||||
[ --enable-ttfcache include ttf cache support <default=no>],
|
||||
build_ttfcache_support=$enableval)
|
||||
;;
|
||||
*)
|
||||
use_ttf_lib="none"
|
||||
;;
|
||||
esac ]
|
||||
)
|
||||
AC_ARG_ENABLE(ttfcache,
|
||||
[ --enable-ttfcache include ttf cache support <default=no>],
|
||||
build_ttfcache_support=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(bmpfsupport,
|
||||
[ --enable-bmpfsupport build support for Bitmap Font (bmpf) <default=yes>],
|
||||
@@ -1289,12 +1273,6 @@ CheckS3C6410Video()
|
||||
dnl ========================================================================
|
||||
dnl Checks for option-specific libraries and headers.
|
||||
|
||||
if test "x$procs_version" = "xyes"; then
|
||||
use_threads="no"
|
||||
else
|
||||
use_threads="yes"
|
||||
fi
|
||||
|
||||
dnl Checks NewGAL Engine.
|
||||
{
|
||||
CheckDummyVideo
|
||||
@@ -1327,25 +1305,6 @@ dnl Checks NewGAL Engine.
|
||||
dnl ========================================================================
|
||||
dnl Checks for libraries.
|
||||
|
||||
have_pthreads=no
|
||||
if test "x$use_threads" != "xno"; then
|
||||
AC_MSG_CHECKING(for pthread library)
|
||||
TMP_SAVE_LIBS=$LIBS
|
||||
AC_TRY_LINK([
|
||||
#include "confdefs.h"
|
||||
#define __C_ASM_H /* fix for retarded Digital Unix headers */
|
||||
#include <pthread.h>],[
|
||||
void foo(void)
|
||||
{
|
||||
pthread_exit (0);
|
||||
}
|
||||
],
|
||||
have_pthreads=yes
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no))
|
||||
LIBS=$TMP_SAVE_LIBS
|
||||
fi
|
||||
|
||||
dnl Check for JPEG library.
|
||||
if test "x$build_jpg_support" != "xno"; then
|
||||
AC_CHECK_LIB(jpeg, jpeg_std_error,
|
||||
@@ -1402,15 +1361,17 @@ case "$with_libsuffix" in
|
||||
;;
|
||||
"")
|
||||
conf="MiniGUI.cfg"
|
||||
if test "x$procs_version" = "xyes"; then
|
||||
if test "x$stand_alone" = "xyes"; then
|
||||
case "$runtime_mode" in
|
||||
sa)
|
||||
MGLIB_SUFFIX="sa"
|
||||
else
|
||||
;;
|
||||
ths)
|
||||
MGLIB_SUFFIX="ths"
|
||||
;;
|
||||
*)
|
||||
MGLIB_SUFFIX="procs"
|
||||
fi
|
||||
else
|
||||
MGLIB_SUFFIX="ths"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
conf="MiniGUI.cfg"
|
||||
@@ -1616,29 +1577,30 @@ fi
|
||||
|
||||
CFLAGS="$CFLAGS -D__MINIGUI_LIB__"
|
||||
|
||||
if test "x$stand_alone" = "xyes"; then
|
||||
procs_version="yes"
|
||||
fi
|
||||
|
||||
if test "x$procs_version" = "xyes"; then
|
||||
if test "x$stand_alone" = "xyes"; then
|
||||
case "$runtime_mode" in
|
||||
sa)
|
||||
AC_DEFINE(_MGRM_STANDALONE, 1,
|
||||
[Define if build MiniGUI-Standalone])
|
||||
AC_DEFINE(_STAND_ALONE, 1,
|
||||
[Define if build MiniGUI-Standalone (back-compatibility definition)])
|
||||
AC_DEFINE(_LITE_VERSION, 1,
|
||||
[Define if build MiniGUI-Standalone (back-compatibility definition)])
|
||||
else
|
||||
MINIGUI_RUNMODE="sa"
|
||||
;;
|
||||
ths)
|
||||
AC_DEFINE(_MGRM_THREADS, 1,
|
||||
[Define if build MiniGUI-Threads])
|
||||
CFLAGS="$CFLAGS -D_REENTRANT"
|
||||
MINIGUI_RUNMODE="ths"
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(_MGRM_PROCESSES, 1,
|
||||
[Define if build MiniGUI-Processes])
|
||||
AC_DEFINE(_LITE_VERSION, 1,
|
||||
[Define if build MiniGUI-Processes (back-compatibility definition)])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(_MGRM_THREADS, 1,
|
||||
[Define if build MiniGUI-Threads])
|
||||
CFLAGS="$CFLAGS -D_REENTRANT"
|
||||
fi
|
||||
MINIGUI_RUNMODE="procs"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$incore_res" = "xno"; then
|
||||
AC_DEFINE_UNQUOTED(ETCFILENAME, "${conf}", [MiniGUI configure file name])
|
||||
@@ -1679,6 +1641,76 @@ if test "x$fixed_math" = "xyes"; then
|
||||
[Define if include fixed math routines])
|
||||
fi
|
||||
|
||||
if test "x$devel_mode" = "xyes"; then
|
||||
use_debug="yes"
|
||||
message_string="yes"
|
||||
trace_message="no"
|
||||
|
||||
build_auto_ial_engine="yes"
|
||||
build_random_ial_engine="yes"
|
||||
build_net_ial_engine="yes"
|
||||
|
||||
build_qpf_support="yes"
|
||||
|
||||
build_latin2_support="yes"
|
||||
build_latin3_support="yes"
|
||||
build_latin4_support="yes"
|
||||
build_cyrillic_support="yes"
|
||||
build_arabic_support="yes"
|
||||
build_greek_support="yes"
|
||||
build_hebrew_support="yes"
|
||||
build_latin5_support="yes"
|
||||
build_latin6_support="yes"
|
||||
build_thai_support="yes"
|
||||
build_latin7_support="yes"
|
||||
build_latin8_support="yes"
|
||||
build_latin10_support="yes"
|
||||
|
||||
build_gb18030_support="yes"
|
||||
build_big5_support="yes"
|
||||
build_euckr_support="yes"
|
||||
build_eucjp_support="yes"
|
||||
build_shiftjis_support="yes"
|
||||
|
||||
use_kbd_hebrewpc="yes"
|
||||
use_kbd_arabicpc="yes"
|
||||
use_kbd_frpc="yes"
|
||||
use_kbd_fr="yes"
|
||||
use_kbd_de="yes"
|
||||
use_kbd_delatin1="yes"
|
||||
use_kbd_it="yes"
|
||||
use_kbd_es="yes"
|
||||
use_kbd_escp850="yes"
|
||||
|
||||
build_ctrl_bidisledit="yes"
|
||||
build_ctrl_textedit="yes"
|
||||
build_ctrl_scrollview="yes"
|
||||
build_ctrl_monthcal="yes"
|
||||
build_ctrl_treeview="yes"
|
||||
build_ctrl_treeview_rdr="yes"
|
||||
build_ctrl_spinbox="yes"
|
||||
build_ctrl_coolbar="yes"
|
||||
build_ctrl_listview="yes"
|
||||
build_ctrl_iconview="yes"
|
||||
build_ctrl_gridview="yes"
|
||||
|
||||
enable_video_commlcd="yes"
|
||||
enable_video_shadow="yes"
|
||||
enable_video_mlshadow="yes"
|
||||
enable_video_custom="yes"
|
||||
|
||||
build_screensaver="yes"
|
||||
fi
|
||||
|
||||
dnl Depedencies
|
||||
if test "x$build_ctrl_treeview" = "xyes"; then
|
||||
build_ctrl_scrollview="yes"
|
||||
fi
|
||||
|
||||
if test "x$build_ctrl_treeview_rdr" = "xyes"; then
|
||||
build_ctrl_scrollview="yes"
|
||||
fi
|
||||
|
||||
if test "x$use_debug" = "xyes"; then
|
||||
AC_DEFINE(_DEBUG, 1,
|
||||
[Define if build with debugging messages])
|
||||
@@ -1922,6 +1954,22 @@ if test "x$build_upf_support" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check FreeType lib
|
||||
case "$use_ttf_lib" in
|
||||
ft1)
|
||||
dnl Check for FreeType1 library
|
||||
AC_CHECK_LIB(ttf, TT_FreeType_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lttf",
|
||||
use_ttf_lib="none")
|
||||
;;
|
||||
ft2)
|
||||
dnl Check for FreeType2 library
|
||||
AC_CHECK_LIB(freetype, FT_Library_Version,
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype -lz -lpng12",
|
||||
use_ttf_lib="none")
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Dealing with TTF cache size
|
||||
case "$use_ttf_lib" in
|
||||
ft1|ft2)
|
||||
@@ -2000,6 +2048,7 @@ case "$use_ttf_lib" in
|
||||
FT1_INC_DIR="-I$with_ft1_includes"
|
||||
fi
|
||||
|
||||
DEP_LIBS="$DEP_LIBS -lttf"
|
||||
AC_SUBST(FT1_INC_DIR)
|
||||
;;
|
||||
ft2)
|
||||
@@ -2011,11 +2060,12 @@ case "$use_ttf_lib" in
|
||||
[ --with-ft2-includes=DIR where the FreeType2 includes are])
|
||||
|
||||
if test "x$with_ft2_includes" = "x"; then
|
||||
FT2_INC_DIR="`freetype-config --cflags`"
|
||||
FT2_INC_DIR="-I/usr/include/freetype2"
|
||||
else
|
||||
FT2_INC_DIR="-I$with_ft2_includes"
|
||||
fi
|
||||
|
||||
DEP_LIBS="$DEP_LIBS -lfreetype"
|
||||
AC_SUBST(FT2_INC_DIR)
|
||||
;;
|
||||
esac
|
||||
@@ -2382,28 +2432,33 @@ if test "x$build_productid" = "xyes"; then
|
||||
[Define if insert a productid into the library file])
|
||||
fi
|
||||
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -pipe"
|
||||
fi
|
||||
|
||||
# define _GNU_SOURCE for pthread_rwlock_t
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
# define _GNU_SOURCE for pthread_rwlock_t
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
|
||||
if test "x$have_pthreads" = "xyes"; then
|
||||
DEP_LIBS="$DEP_LIBS -lpthread"
|
||||
fi
|
||||
|
||||
dnl ========================================================================
|
||||
dnl Write output
|
||||
|
||||
dnl define _GNU_SOURCE for pthread_rwlock_t
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE"
|
||||
|
||||
if test "x$devel_mode" = "xyes"; then
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -Wall -Werror"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$ac_cv_prog_gcc" = "yes"; then
|
||||
CFLAGS="$CFLAGS -O2 -Wstrict-prototypes -pipe"
|
||||
fi
|
||||
|
||||
if test "x$runtime_mode" = "xths"; then
|
||||
DEP_LIBS="$DEP_LIBS -lpthread"
|
||||
fi
|
||||
|
||||
AC_SUBST(VIDEO_SUBDIRS)
|
||||
AC_SUBST(VIDEO_DRIVERS)
|
||||
AC_SUBST(DEP_LIBS)
|
||||
AC_SUBST(MINIGUI_RUNMODE)
|
||||
|
||||
AM_CONDITIONAL(MGRM_PROCESSES, test "x$procs_version" = "xyes")
|
||||
AM_CONDITIONAL(MGRM_STANDALONE, test "x$stand_alone" = "xyes")
|
||||
AM_CONDITIONAL(MGRM_PROCESSES, test "x$runtime_mode" = "xprocs")
|
||||
AM_CONDITIONAL(MGRM_STANDALONE, test "x$runtime_mode" = "xsa")
|
||||
AM_CONDITIONAL(MGIAL_CONSOLE, test "x$build_console_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_NEXUS, test "x$build_nexus_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_DLCUSTOM, test "x$build_dlcustom_ial_engine" = "xyes")
|
||||
@@ -2417,8 +2472,6 @@ AM_CONDITIONAL(MGLIB_MVFB, test "x$with_libsuffix" = "xmvfb")
|
||||
AM_CONDITIONAL(MG_MINIMALGDI, test "x$build_minimalgdi" = "xyes")
|
||||
AM_CONDITIONAL(MG_ENABLE_SPLASH, test "x$build_splash" = "xyes")
|
||||
AM_CONDITIONAL(MG_ENABLE_SCREENSAVER, test "x$build_screensaver" = "xyes")
|
||||
#AM_CONDITIONAL(MGPLUS_FONT_SEF, test "x$build_sef_support" = "xyes")
|
||||
|
||||
|
||||
AC_OUTPUT(
|
||||
minigui.pc
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This example trys to handle the event when the user presses
|
||||
* left button and right button of the mouse at the same time.
|
||||
*/
|
||||
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_LBUTTONDOWN:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define IDC_EDIT1 130
|
||||
#define IDC_EDIT2 140
|
||||
|
||||
int ControlTestWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static HWND hStaticWnd1, hStaticWnd2, hButton1, hButton2, hEdit1, hEdit2;
|
||||
switch (message) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* The following code defines the dialog box callback procedure
|
||||
* and displays the dialog box by calling DialogBoxIndirectParam function.
|
||||
*/
|
||||
static int InitDialogBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_INITDIALOG:
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <minigui/gdi.h>
|
||||
#include <minigui/window.h>
|
||||
|
||||
static int HelloWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT HelloWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
* This example trys to handle the event when the user
|
||||
* presses <C> key as the <Ctrl> key is down.
|
||||
*/
|
||||
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_KEYDOWN:
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
...
|
||||
|
||||
/* The window procedure. */
|
||||
static int VCOnGUIMainWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT VCOnGUIMainWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONINFO pConInfo;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
static int DepInfoBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
struct _DepInfo *info;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Use RectVisible to optimize the repaint of the window.
|
||||
*/
|
||||
MSG_PAINT:
|
||||
case MSG_PAINT:
|
||||
{
|
||||
HDC hdc = BeginPaint (hWnd);
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#define MSG_SET_STEP_INFO (MSG_USER + 1)
|
||||
#define MSG_SET_CURR_STEP (MSG_USER + 2)
|
||||
|
||||
static int StepControlProc (HWND hwnd,
|
||||
int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT StepControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
HELPWININFO* info;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* The following MSG_SETCURSOR handler set the cursor
|
||||
* shape to the arrow cursor when the window is disabled.
|
||||
*/
|
||||
case MSG_SETCURSOR:
|
||||
if (GetWindowStyle (hwnd) & WS_DISABLED) {
|
||||
SetCursor (GetSystemCursor (IDC_ARROW));
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case MSG_SETCURSOR:
|
||||
if (GetWindowStyle (hwnd) & WS_DISABLED) {
|
||||
SetCursor (GetSystemCursor (IDC_ARROW));
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* A typical handling of timer.
|
||||
*/
|
||||
int FlyingGUIWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT FlyingGUIWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_CREATE:
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ BOOL listen_socket (HWND hwnd)
|
||||
* the window hwnd will receive a MSG_FDEVENT message.
|
||||
* Now the server can accept the request.
|
||||
*/
|
||||
int MyWndProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT MyWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
#define MY_ES_DIGIT_ONLY 0x0001
|
||||
#define MY_ES_ALPHA_ONLY 0x0002
|
||||
static WNDPROC old_edit_proc;
|
||||
static int RestrictedEditBox (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT RestrictedEditBox (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (message == MSG_CHAR) {
|
||||
DWORD my_style = GetWindowAdditionalData (hwnd);
|
||||
@@ -28,7 +28,7 @@ static int RestrictedEditBox (HWND hwnd, int message, WPARAM wParam, LPARAM lPar
|
||||
return (*old_edit_proc) (hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
static int ControlTestWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
case MSG_CREATE:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <minigui/gdi.h>
|
||||
#include <minigui/window.h>
|
||||
|
||||
static int HelloWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT HelloWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
|
||||
|
||||
+381
-175
File diff suppressed because it is too large
Load Diff
@@ -70,7 +70,7 @@ extern "C" {
|
||||
/** Default container window procedure
|
||||
* \sa DefaultDialogProc
|
||||
*/
|
||||
MG_EXPORT int GUIAPI DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
MG_EXPORT LRESULT GUIAPI DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
/** Scrollview item object, use this handle to access a scrollview item */
|
||||
typedef GHANDLE HSVITEM;
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@
|
||||
*
|
||||
\verbatim
|
||||
|
||||
Copyright (C) 2002-2012 FMSoft.
|
||||
Copyright (C) 2002-2018 FMSoft.
|
||||
Copyright (C) 1998-2002 Wei Yongming.
|
||||
|
||||
All rights reserved by FMSoft (http://www.fmsoft.cn).
|
||||
@@ -1090,19 +1090,19 @@ MG_EXPORT BOOL GUIAPI InitPolygonRegion (PCLIPRGN dst,
|
||||
* \note MiniGUI does not do any clipping operation for this DC,
|
||||
* so use this DC may make a mess of other windows.
|
||||
*/
|
||||
#define HDC_SCREEN 0
|
||||
#define HDC_SCREEN ((HDC)0)
|
||||
|
||||
/*
|
||||
* This is a system screen DC create for MiniGUI internal usage, for example,
|
||||
* menu and z-order operations
|
||||
*/
|
||||
#define HDC_SCREEN_SYS 1
|
||||
#define HDC_SCREEN_SYS ((HDC)1)
|
||||
|
||||
/**
|
||||
* \def HDC_INVALID
|
||||
* \brief Indicates an invalid handle to device context.
|
||||
*/
|
||||
#define HDC_INVALID 0xFFFFFFFF
|
||||
#define HDC_INVALID ((HDC)-1)
|
||||
|
||||
#define GDCAP_COLORNUM 0
|
||||
#define GDCAP_HPIXEL 1
|
||||
@@ -2853,7 +2853,7 @@ static inline DWORD Pixel2DWORD (HDC hdc, gal_pixel pixel)
|
||||
#define PIXEL2DWORD(hdc, pixel) Pixel2DWORD(hdc, pixel)
|
||||
|
||||
/**
|
||||
* \fn gal_pixel DWORD2PIXEL (HDC hdc, DWORD dword)
|
||||
* \fn gal_pixel DWORD2Pixel (HDC hdc, DWORD dword)
|
||||
* \brief An inline function to convert DWORD color to gal_pixel.
|
||||
*
|
||||
* This function converts a color in DWORD to pixel value.
|
||||
@@ -2862,7 +2862,7 @@ static inline DWORD Pixel2DWORD (HDC hdc, gal_pixel pixel)
|
||||
* \param dword The color value in DWORD.
|
||||
* \return The converted pixel value.
|
||||
*/
|
||||
static inline gal_pixel DWORD2PIXEL (HDC hdc, DWORD dword)
|
||||
static inline gal_pixel DWORD2Pixel (HDC hdc, DWORD dword)
|
||||
{
|
||||
return RGBA2Pixel (hdc,
|
||||
GetRValue(dword), GetGValue(dword),
|
||||
@@ -8891,20 +8891,20 @@ MG_EXPORT void GUIAPI BIDIGetVisualEmbeddLevels (LOGFONT* log_font,
|
||||
*
|
||||
*/
|
||||
typedef struct _COMP_CTXT {
|
||||
/** the step of current pixel operations. */
|
||||
int step;
|
||||
|
||||
/** the pointer to the destination */
|
||||
gal_uint8* cur_dst;
|
||||
|
||||
/** The user context passed to SetUserCompositionOps */
|
||||
void* user_comp_ctxt;
|
||||
|
||||
/** the pixel value shoulb be skipped (the color key) */
|
||||
gal_pixel skip_pixel;
|
||||
|
||||
/** the current pixel value for setpixel and setpixels operation */
|
||||
gal_pixel cur_pixel;
|
||||
|
||||
/** The user context passed to SetUserCompositionOps */
|
||||
void* user_comp_ctxt;
|
||||
/** the step of current pixel operations. */
|
||||
int step;
|
||||
} COMP_CTXT;
|
||||
|
||||
/*
|
||||
|
||||
@@ -209,9 +209,9 @@
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300 || defined(__DMC__)
|
||||
/*
|
||||
* VC++6.0 or early compiler's header has no DWORD_PTR type.
|
||||
* VC++6.0 or early compiler's header has no DWORD type.
|
||||
*/
|
||||
typedef unsigned long DWORD_PTR;
|
||||
typedef unsigned long DWORD;
|
||||
#endif
|
||||
/*
|
||||
* -----------------
|
||||
|
||||
+130
-106
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -4,8 +4,9 @@ libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: MiniGUI
|
||||
Description: A mature cross-platform windowing system and GUI system for embedded and IoT devices.
|
||||
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
|
||||
Version: @MINIGUI_VERSION@
|
||||
Runmode: @MINIGUI_RUNMODE@
|
||||
Requires:
|
||||
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
|
||||
Libs.private:
|
||||
|
||||
+2
-2
@@ -235,8 +235,8 @@ static void check_live (void)
|
||||
|
||||
BOOL client_IdleHandler4Client (PMSGQUEUE msg_que)
|
||||
{
|
||||
static unsigned int old_timer;
|
||||
static int repeat_timeout = TIMEOUT_START_REPEAT;
|
||||
static DWORD old_timer;
|
||||
static long repeat_timeout = TIMEOUT_START_REPEAT;
|
||||
fd_set rset, wset, eset;
|
||||
fd_set* wsetptr = NULL;
|
||||
fd_set* esetptr = NULL;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
static void set_line_width (HWND hWnd, PBIDISLEDITDATA sled);
|
||||
static void mySetCaretPos (HWND hWnd, PBIDISLEDITDATA sled, int x);
|
||||
static int SLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
static void sledit_refresh_caret (HWND hWnd, PBIDISLEDITDATA sled, BOOL bInited);
|
||||
|
||||
#define check_caret() \
|
||||
@@ -2316,8 +2316,8 @@ static int sledit_reset_text (HWND hWnd, PBIDISLEDITDATA sled, char* str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
SLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT
|
||||
SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
DWORD dwStyle;
|
||||
HDC hdc;
|
||||
@@ -2466,7 +2466,7 @@ SLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
unsigned char charBuffer [3];
|
||||
int chars;
|
||||
|
||||
_MG_PRINTF("get char-----------------char----%x\n", wParam);
|
||||
_MG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam);
|
||||
|
||||
if (wParam == 127) // BS
|
||||
wParam = '\b';
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
#define BUTTON_OFFSET 1
|
||||
|
||||
static int ButtonCtrlProc (HWND hWnd, int uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static void btnGetRects (PCONTROL pctrl, RECT* prcClient,
|
||||
RECT* prcContent,
|
||||
RECT* prcBitmap);
|
||||
@@ -652,7 +652,7 @@ static inline BOOL mouse_in_client(LPARAM lParam, PCONTROL pctrl)
|
||||
return (PtInRect ((PRECT) &(pctrl->cl), x, y));
|
||||
}
|
||||
|
||||
static int ButtonCtrlProc (HWND hWnd, int uMsg, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
PCONTROL pctrl;
|
||||
@@ -941,8 +941,9 @@ static int ButtonCtrlProc (HWND hWnd, int uMsg, WPARAM wParam, LPARAM lParam)
|
||||
case MSG_LBUTTONDOWN:
|
||||
if (GetCapture () == hWnd)
|
||||
break;
|
||||
|
||||
SetCapture (hWnd);
|
||||
|
||||
|
||||
BUTTON_STATUS(pctrl) |= BST_FOCUS;
|
||||
change_status_from_pose(pctrl, BST_PUSHED, TRUE, TRUE);
|
||||
break;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#define DEC_BOX 2
|
||||
static int mouse_old = 0;
|
||||
|
||||
static int ComboBoxCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT ComboBoxCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterComboBoxControl (void)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ BOOL RegisterComboBoxControl (void)
|
||||
return AddNewControlClass (&WndClass) == ERR_OK;
|
||||
}
|
||||
|
||||
static int AutoSpinEditBoxProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT AutoSpinEditBoxProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
WNDPROC old_edit_proc;
|
||||
|
||||
@@ -315,7 +315,7 @@ static void OnSizeChanged (PCONTROL pCtrl, DWORD dwStyle, const RECT* rcClient)
|
||||
}
|
||||
}
|
||||
|
||||
static int ComboBoxCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ComboBoxCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTROL pCtrl = gui_Control (hwnd);
|
||||
PCOMBOBOXDATA pData = (PCOMBOBOXDATA)pCtrl->dwAddData2;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#define _ID_TIMER 100
|
||||
|
||||
static int ToolTipWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int iBorder;
|
||||
switch (message) {
|
||||
@@ -253,7 +253,7 @@ DefaultPageProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
IncludeWindowStyle (hNewDef, BS_DEFPUSHBUTTON);
|
||||
InvalidateRect (hNewDef, NULL, TRUE);
|
||||
|
||||
return (int)hOldDef;
|
||||
return (LRESULT)hOldDef;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -43,7 +43,7 @@
|
||||
|
||||
static void set_line_width (HWND hWnd, PSLEDITDATA sled);
|
||||
static void mySetCaretPos (HWND hWnd, PSLEDITDATA sled, int x);
|
||||
static int SLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
static void sledit_refresh_caret (HWND hWnd, PSLEDITDATA sled, BOOL bInited);
|
||||
static BOOL make_charpos_visible (HWND hWnd, PSLEDITDATA sled, int charPos, int *cx);
|
||||
|
||||
@@ -1897,8 +1897,8 @@ sledit_insert_text (HWND hWnd, PSLEDITDATA sled, const char* newtext, int len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
SLEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT
|
||||
SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
DWORD dwStyle;
|
||||
HDC hdc;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/** minimum height of checkmark */
|
||||
#define LFRDR_LB_CHECKBMP_MIN 6
|
||||
|
||||
static int ListboxCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT ListboxCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterListboxControl (void)
|
||||
{
|
||||
@@ -850,7 +850,7 @@ static void lstSetScrollInfo (HWND hwnd, PLISTBOXDATA pData, BOOL fRedraw)
|
||||
lstSetHScrollInfo (hwnd, pData, fRedraw);
|
||||
}
|
||||
|
||||
static int ListboxCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ListboxCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
PCONTROL pCtrl;
|
||||
|
||||
@@ -409,27 +409,27 @@ int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||
return 0;
|
||||
|
||||
case SVM_SETITEMDRAW:
|
||||
return (int)mglist_set_itemdraw (mglst, (SVITEM_DRAWFUNC)lParam);
|
||||
return (LRESULT)mglist_set_itemdraw (mglst, (SVITEM_DRAWFUNC)lParam);
|
||||
|
||||
case SVM_SETITEMINIT:
|
||||
{
|
||||
SVITEM_INITFUNC old_pfn;
|
||||
old_pfn = mglst->iop.initItem;
|
||||
mglst->iop.initItem = (SVITEM_INITFUNC)lParam;
|
||||
return (int)old_pfn;
|
||||
return (LRESULT)old_pfn;
|
||||
}
|
||||
case SVM_SETITEMDESTROY:
|
||||
{
|
||||
SVITEM_DESTROYFUNC old_pfn;
|
||||
old_pfn = mglst->iop.destroyItem;
|
||||
mglst->iop.destroyItem = (SVITEM_DESTROYFUNC)lParam;
|
||||
return (int)old_pfn;
|
||||
return (LRESULT)old_pfn;
|
||||
}
|
||||
|
||||
case SVM_GETITEMADDDATA:
|
||||
{
|
||||
if (lParam)
|
||||
return mglist_get_item_adddata(lParam);
|
||||
return mglist_get_item_adddata((HITEM)lParam);
|
||||
else {
|
||||
HITEM hitem = (HITEM)mglist_getitem_byindex(mglst, wParam);
|
||||
return mglist_get_item_adddata(hitem);
|
||||
@@ -523,7 +523,7 @@ int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
|
||||
{
|
||||
SVITEM_CMP oldcmp = mglst->itemCmp;
|
||||
mglst->itemCmp = (SVITEM_CMP)lParam;
|
||||
return (int)oldcmp;
|
||||
return (LRESULT)oldcmp;
|
||||
}
|
||||
|
||||
case SVM_SORTITEMS:
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#define _INTER_BARTEXT 4
|
||||
|
||||
static int MenuButtonCtrlProc (HWND hWnd, int message, WPARAM wParam,
|
||||
static LRESULT MenuButtonCtrlProc (HWND hWnd, UINT message, WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
|
||||
BOOL RegisterMenuButtonControl (void)
|
||||
@@ -453,7 +453,7 @@ error:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int MenuButtonCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT MenuButtonCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PMENUBTNDATA mb_data;
|
||||
WINDOWINFO *wnd_info;
|
||||
|
||||
+12
-12
@@ -40,7 +40,7 @@
|
||||
#define MARGIN_HORZ 5
|
||||
#define MARGIN_V_VERT 5
|
||||
#endif
|
||||
static int NewToolbarCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterNewToolbarControl (void)
|
||||
{
|
||||
@@ -87,8 +87,8 @@ static void draw_left_right_line_vert (HWND hwnd, HDC hdc, RECT *rc)
|
||||
lighter_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_LIGHTEST);
|
||||
|
||||
darker_pixel = DWORD2PIXEL (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2PIXEL (hdc, lighter_dword);
|
||||
darker_pixel = DWORD2Pixel (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2Pixel (hdc, lighter_dword);
|
||||
|
||||
rc->bottom -= 1;
|
||||
rc->right -= 1;
|
||||
@@ -182,8 +182,8 @@ static void draw_separator_vert (HWND hwnd, HDC hdc, int l, int t, NTBCTRLDATA *
|
||||
lighter_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_LIGHTEST);
|
||||
|
||||
darker_pixel = DWORD2PIXEL (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2PIXEL (hdc, lighter_dword);
|
||||
darker_pixel = DWORD2Pixel (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2Pixel (hdc, lighter_dword);
|
||||
|
||||
pta.x = l;
|
||||
pta.y = t + 1;
|
||||
@@ -230,7 +230,7 @@ static void draw_checked_item_vert (HWND hwnd, HDC hdc, PNTBCTRLDATA ntb_data,
|
||||
bgc_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_DARKEST);
|
||||
|
||||
bgc_pixel = DWORD2PIXEL (hdc, bgc_dword);
|
||||
bgc_pixel = DWORD2Pixel (hdc, bgc_dword);
|
||||
|
||||
pta.x = l; pta.y = t;
|
||||
ptb.x = l; ptb.y = b;
|
||||
@@ -446,8 +446,8 @@ static void draw_top_bottom_line_horz (HWND hwnd, HDC hdc, RECT *rc)
|
||||
lighter_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_LIGHTEST);
|
||||
|
||||
darker_pixel = DWORD2PIXEL (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2PIXEL (hdc, lighter_dword);
|
||||
darker_pixel = DWORD2Pixel (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2Pixel (hdc, lighter_dword);
|
||||
|
||||
rc->bottom -= 1;
|
||||
rc->right -= 1;
|
||||
@@ -506,8 +506,8 @@ static void draw_separator_horz (HWND hwnd, HDC hdc, int l, int t, NTBITEM *it)
|
||||
lighter_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_LIGHTEST);
|
||||
|
||||
darker_pixel = DWORD2PIXEL (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2PIXEL (hdc, lighter_dword);
|
||||
darker_pixel = DWORD2Pixel (hdc, darker_dword);
|
||||
lighter_pixel = DWORD2Pixel (hdc, lighter_dword);
|
||||
|
||||
pta.x = l + 1;
|
||||
pta.y = t;
|
||||
@@ -568,7 +568,7 @@ static void draw_checked_item_horz (HWND hwnd, HDC hdc, PNTBCTRLDATA ntb_data,
|
||||
bgc_dword = pWin->we_rdr->calc_3dbox_color
|
||||
(bgc_dword, LFRDR_3DBOX_COLOR_DARKEST);
|
||||
|
||||
bgc_pixel = DWORD2PIXEL (hdc, bgc_dword);
|
||||
bgc_pixel = DWORD2Pixel (hdc, bgc_dword);
|
||||
|
||||
pta.x = l; pta.y = t;
|
||||
ptb.x = l; ptb.y = b;
|
||||
@@ -1255,7 +1255,7 @@ static void ShowCurItemHintText (HWND hWnd, NTBCTRLDATA *ntb_data , NTBITEM * pi
|
||||
}
|
||||
}
|
||||
|
||||
static int NewToolbarCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTROL myself;
|
||||
PNTBCTRLDATA ntb_data;
|
||||
|
||||
@@ -67,8 +67,8 @@ pbarOnNewPos (const CONTROL* pCtrl,
|
||||
InvalidateRect ((HWND)pCtrl, NULL, FALSE);
|
||||
}
|
||||
|
||||
static int
|
||||
ProgressBarCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT
|
||||
ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
PCONTROL pCtrl;
|
||||
|
||||
+11
-13
@@ -43,9 +43,8 @@
|
||||
#define WEC_TAB_LIGHT 32
|
||||
#define TAB_MARGIN 8
|
||||
|
||||
static int
|
||||
PropSheetCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
static LRESULT
|
||||
PropSheetCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterPropSheetControl (void)
|
||||
{
|
||||
@@ -112,7 +111,7 @@ static void show_hide_page (PPROPPAGE page, int show_cmd)
|
||||
ShowWindow (page->hwnd, show_cmd);
|
||||
|
||||
focus = GetNextDlgTabItem (page->hwnd, (HWND)0, 0);
|
||||
if (SendMessage (page->hwnd, MSG_SHOWPAGE, focus, show_cmd) &&
|
||||
if (SendMessage (page->hwnd, MSG_SHOWPAGE, (WPARAM)focus, show_cmd) &&
|
||||
show_cmd == SW_SHOW) {
|
||||
if (focus) {
|
||||
SetFocus (focus);
|
||||
@@ -628,7 +627,7 @@ static void draw_propsheet (HWND hwnd, HDC hdc, PCONTROL ctrl,
|
||||
scrollbtn_left = propsheet->head_rc.right - get_metrics (MWM_SB_WIDTH);
|
||||
}
|
||||
|
||||
old_brush_c = SetBrushColor (hdc, DWORD2PIXEL (hdc, main_c));
|
||||
old_brush_c = SetBrushColor (hdc, DWORD2Pixel (hdc, main_c));
|
||||
while (page) {
|
||||
if (((ctrl->dwStyle & 0x0fL) == PSS_SCROLLABLE) && propsheet->overload == TRUE)
|
||||
if (((title_rc.right + page->width > scrollbtn_left) || (page->width == 0))
|
||||
@@ -674,7 +673,7 @@ static void draw_propsheet (HWND hwnd, HDC hdc, PCONTROL ctrl,
|
||||
propsheet->overload == TRUE)
|
||||
draw_scroll_button (hwnd, hdc, &title_rc, propsheet, ctrl->dwStyle);
|
||||
|
||||
SetBrushColor (hdc, DWORD2PIXEL(hdc, old_brush_c));
|
||||
SetBrushColor (hdc, DWORD2Pixel(hdc, old_brush_c));
|
||||
}
|
||||
|
||||
static int insert_new_page_normal_style (HWND hwnd, PPROPSHEETDATA propsheet,
|
||||
@@ -919,8 +918,8 @@ static BOOL delete_page (HWND hwnd, PCONTROL ctrl, PPROPSHEETDATA propsheet,
|
||||
|
||||
|
||||
/* window procedure of the property sheet. */
|
||||
static int
|
||||
PropSheetCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT
|
||||
PropSheetCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTROL ctrl;
|
||||
PPROPSHEETDATA propsheet;
|
||||
@@ -1046,8 +1045,7 @@ PropSheetCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
|
||||
case PSM_GETACTIVEPAGE: {
|
||||
return (propsheet->active) ?
|
||||
propsheet->active->hwnd : HWND_INVALID;
|
||||
return (LRESULT)((propsheet->active) ? propsheet->active->hwnd : HWND_INVALID);
|
||||
}
|
||||
|
||||
case PSM_GETPAGE: {
|
||||
@@ -1055,19 +1053,19 @@ PropSheetCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
PPROPPAGE page = propsheet->head;
|
||||
while (page) {
|
||||
if (index == wParam) {
|
||||
return page->hwnd;
|
||||
return (LRESULT)page->hwnd;
|
||||
}
|
||||
index ++;
|
||||
page = page->next;
|
||||
}
|
||||
return HWND_INVALID;
|
||||
return (LRESULT)HWND_INVALID;
|
||||
}
|
||||
|
||||
case PSM_GETPAGEINDEX: {
|
||||
int index = 0;
|
||||
PPROPPAGE page = propsheet->head;
|
||||
while (page) {
|
||||
if (page->hwnd == wParam) {
|
||||
if (page->hwnd == (HWND)wParam) {
|
||||
return index;
|
||||
}
|
||||
index ++;
|
||||
|
||||
@@ -325,7 +325,7 @@ int track_thumb (HWND hwnd, PSCROLLBARDATA data, int x, int y)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ScrollBarCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ScrollBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PSCROLLBARDATA data;
|
||||
PCONTROL pCtrl;
|
||||
|
||||
@@ -430,7 +430,7 @@ void scrollview_destroy (PSVDATA psvdata)
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------- */
|
||||
int ScrollViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PSVDATA psvdata = NULL;
|
||||
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
**
|
||||
** scrollview.h: header file of ScrollView control.
|
||||
**
|
||||
** Copyright (C) 2004 ~ 2007 Feynman Software.
|
||||
** Copyright (C) 2004 ~ 2018 FMSoft
|
||||
*/
|
||||
|
||||
#ifndef _SCROLLVIEW_IMPL_H_
|
||||
#define _SCROLLVIEW_IMPL_H_
|
||||
|
||||
|
||||
#include "listmodel.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -81,7 +79,8 @@ typedef SVDATA *PSVDATA;
|
||||
|
||||
/* ------------------------- external api -------------------------- */
|
||||
|
||||
MG_EXPORT int ScrollViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
MG_EXPORT LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
MG_EXPORT int scrollview_init (HWND hWnd, PSVDATA psv);
|
||||
MG_EXPORT void scrollview_destroy (PSVDATA psvdata);
|
||||
MG_EXPORT HSVITEM scrollview_add_item (HWND hWnd, PSVDATA psvdata, HSVITEM hsvi, PSVITEMINFO pii, int *idx);
|
||||
|
||||
@@ -185,7 +185,7 @@ void scrollwnd_reset_content (HWND hWnd, PSWDATA pswdata)
|
||||
|
||||
/* --------------------------------------------------------------------------------- */
|
||||
|
||||
int ScrollWndCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ScrollWndCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PSWDATA pswdata = NULL;
|
||||
|
||||
@@ -220,7 +220,7 @@ int ScrollWndCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
|
||||
case SVM_GETCTRL:
|
||||
return GetDlgItem (pswdata->hContainer, wParam);
|
||||
return (LRESULT)GetDlgItem (pswdata->hContainer, wParam);
|
||||
|
||||
case SVM_RESETCONTENT:
|
||||
scrollwnd_reset_content (hWnd, pswdata);
|
||||
@@ -231,7 +231,7 @@ int ScrollWndCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
|
||||
case SVM_GETFOCUSCHILD:
|
||||
return (int)GetFocus (pswdata->hContainer);
|
||||
return (LRESULT)GetFocus (pswdata->hContainer);
|
||||
|
||||
}/* end switch */
|
||||
|
||||
@@ -285,8 +285,8 @@ static void container_destroy (HWND hWnd, PCONTDATA pcontdata)
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
||||
int GUIAPI
|
||||
DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
LRESULT GUIAPI
|
||||
DefaultContainerProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTDATA pcontdata = NULL;
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@ typedef struct _swdata
|
||||
} SWDATA;
|
||||
typedef SWDATA *PSWDATA;
|
||||
|
||||
|
||||
int ScrollWndCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
|
||||
int scrollwnd_init (HWND hWnd, PSWDATA psv);
|
||||
void scrollwnd_destroy (PSWDATA pswdata);
|
||||
void scrollwnd_hscroll (HWND hWnd, PSWDATA pswdata, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
#include "static_impl.h"
|
||||
|
||||
static int
|
||||
StaticControlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT
|
||||
StaticControlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
RECT rcClient;
|
||||
HDC hdc;
|
||||
|
||||
+3
-1
@@ -31,7 +31,9 @@ typedef struct strbuffer_s
|
||||
#if 1
|
||||
#define te_alloc malloc
|
||||
#define te_free free
|
||||
#define te_realloc(ptr, size, cpysize) realloc(ptr, size)
|
||||
static inline void* te_realloc (void* ptr, size_t size, size_t cpysize) {
|
||||
return realloc (ptr, size);
|
||||
}
|
||||
#else
|
||||
#define te_alloc FixStrAlloc
|
||||
#define te_free FixStrFree
|
||||
|
||||
@@ -3025,7 +3025,7 @@ static void init_bufdc (HWND hWnd, PTEDATA ptedata)
|
||||
ReleaseDC(hdc);
|
||||
}
|
||||
|
||||
static int TextEditCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT TextEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PTEDATA ptedata = NULL;
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ static int NormalizeMousePos (HWND hwnd, TRACKBARDATA* pData, int mousepos)
|
||||
return (int)((pData->nMax - pData->nMin) * pos / (float)len + 0.5) + pData->nMin;
|
||||
}
|
||||
|
||||
static int TrackBarCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PCONTROL pCtrl;
|
||||
TRACKBARDATA* pData;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "ctrlclass.h"
|
||||
#include "ctrl/animation.h"
|
||||
|
||||
static int AnimationCtrlProc (HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT AnimationCtrlProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterAnimationControl (void)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ static void setup_anim_mem_dc (HWND hwnd, ANIMATIONINFO* anim_info)
|
||||
ReleaseDC (hdc);
|
||||
}
|
||||
|
||||
static int AnimationCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT AnimationCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATIONINFO* anim_info = (ANIMATIONINFO*)GetWindowAdditionalData2 (hwnd);
|
||||
|
||||
@@ -362,11 +362,11 @@ static int AnimationCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lPar
|
||||
//SetTimer (hwnd, ID_TIMER, anim_info->anim->time_unit);
|
||||
SetTimer (hwnd, ID_TIMER, 1);
|
||||
}
|
||||
return (int)old;
|
||||
return (LRESULT)old;
|
||||
}
|
||||
|
||||
case ANM_GETANIMATION:
|
||||
return (int)anim_info->anim;
|
||||
return (LRESULT)anim_info->anim;
|
||||
|
||||
case ANM_STARTPLAY: {
|
||||
|
||||
@@ -407,8 +407,8 @@ static int AnimationCtrlProc (HWND hwnd, int message, WPARAM wParam, LPARAM lPar
|
||||
NotifyParent (hwnd, GetDlgCtrlID (hwnd), ANNC_CLICKED);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return DefaultControlProc (hwnd, message, wParam, lParam);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#define ITEMBARWIDTH 8
|
||||
|
||||
static int CoolBarCtrlProc (HWND hWnd, int uMsg, WPARAM wParam, LPARAM lParam);
|
||||
static LRESULT CoolBarCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL RegisterCoolBarControl (void)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ static void set_item_rect (HWND hwnd, PCOOLBARCTRL TbarData, COOLBARITEMDATA* pt
|
||||
ptemp->hinty = ptemp->RcTitle.bottom;
|
||||
}
|
||||
|
||||
static int CoolBarCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT CoolBarCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HDC hdc;
|
||||
PCOOLBARCTRL TbarData;
|
||||
|
||||
+11
-11
@@ -911,7 +911,7 @@ static BOOL gridview_is_pt_in_control(gvGridViewData* view, int x, int y)
|
||||
if(cell != NULL)
|
||||
{
|
||||
HWND ctrl = cell->func->get_control(cell, view, row, col);
|
||||
if(ctrl != -1 && gridview_is_pt_in_hwnd_rect(view->hCtrl, ctrl, x, y))
|
||||
if(ctrl != HWND_INVALID && gridview_is_pt_in_hwnd_rect(view->hCtrl, ctrl, x, y))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -1293,7 +1293,7 @@ static int gridview_init(HWND hWnd, GRIDVIEWDATA* data)
|
||||
// set window handles
|
||||
view->ctrl_id = GetDlgCtrlID(hWnd);
|
||||
view->hCtrl = hWnd;
|
||||
view->hEdit = -1;
|
||||
view->hEdit = HWND_INVALID;
|
||||
//initialize modal
|
||||
view->modal = GridDataModalArray_new_modal(data->nr_rows, data->nr_cols);
|
||||
//set table properties
|
||||
@@ -1583,7 +1583,7 @@ void GridDataModalArray_delete_modal(gvGridDataModal* modal)
|
||||
// }}}
|
||||
|
||||
|
||||
static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT GridViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
gvGridViewData* view = NULL;
|
||||
if (message != MSG_CREATE)
|
||||
@@ -1616,7 +1616,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
int row, col;
|
||||
HDC hdc = BeginPaint(hWnd);
|
||||
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
{
|
||||
RECT r;
|
||||
GetWindowRect(view->hEdit, &r);
|
||||
@@ -1689,7 +1689,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
int x = LOSWORD (lParam);
|
||||
int y = HISWORD (lParam);
|
||||
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
{
|
||||
int row, col;
|
||||
if(!gridview_is_pt_in_hwnd_rect(view->hCtrl, view->hEdit, x, y))
|
||||
@@ -1749,7 +1749,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
ScreenToClient(hWnd, &x, &y);
|
||||
ReleaseCapture();
|
||||
}
|
||||
else if(view->hEdit != -1)
|
||||
else if(view->hEdit != HWND_INVALID)
|
||||
break;
|
||||
|
||||
switch(view->mouse_status)
|
||||
@@ -1786,7 +1786,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
int y = HISWORD (lParam);
|
||||
|
||||
GetClientRect(hWnd, &rect);
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
break;
|
||||
is_capture = (GetCapture() == hWnd);
|
||||
if (is_capture) {
|
||||
@@ -1827,7 +1827,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
// MiniGUI key Messages {{{
|
||||
case MSG_KEYDOWN:
|
||||
{
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
return DefaultControlProc(hWnd, message, wParam, lParam);
|
||||
else
|
||||
{
|
||||
@@ -1971,7 +1971,7 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
RECT rect;
|
||||
if(view->current_row > 0 && view->current_col > 0)
|
||||
{
|
||||
if (view->hEdit == -1 && isalnum(wParam))
|
||||
if (view->hEdit == HWND_INVALID && isalnum(wParam))
|
||||
{
|
||||
get_cell_rect(view, view->current_row, view->current_col, &rect);
|
||||
gridview_make_rect_visible(view, &rect);
|
||||
@@ -1987,13 +1987,13 @@ static int GridViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
// MiniGUI scroll Messages {{{
|
||||
case MSG_HSCROLL:
|
||||
{
|
||||
if (view->hEdit != -1)
|
||||
if (view->hEdit != HWND_INVALID)
|
||||
SendMessage(view->hEdit, MSG_KEYDOWN, SCANCODE_ENTER, 0);
|
||||
break;
|
||||
}
|
||||
case MSG_VSCROLL:
|
||||
{
|
||||
if (view->hEdit != -1)
|
||||
if (view->hEdit != HWND_INVALID)
|
||||
SendMessage(view->hEdit, MSG_KEYDOWN, SCANCODE_ENTER, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ static inline void GridCell_get_ctrl_rect(gvGridCellData* cell, gvGridViewData*
|
||||
|
||||
// Editor Proc {{{
|
||||
|
||||
static int GridCell_EditDefaultProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT GridCell_EditDefaultProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
GridCellEditData* editdata
|
||||
= (GridCellEditData*)GetWindowAdditionalData(hWnd);
|
||||
@@ -78,7 +78,7 @@ static int GridCell_EditDefaultProc(HWND hWnd, int message, WPARAM wParam, LPARA
|
||||
return editdata->old_proc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
static int GridCell_EditBgColorProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT GridCell_EditBgColorProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
GridCellEditData* editdata
|
||||
= (GridCellEditData*)GetWindowAdditionalData(hWnd);
|
||||
@@ -138,7 +138,7 @@ static void GridCell_SelectionNotify(HWND hWnd, int id, int nc, DWORD add_data)
|
||||
switch(nc)
|
||||
{
|
||||
case CBN_DROPDOWN:
|
||||
if (editdata->view->hEdit != -1)
|
||||
if (editdata->view->hEdit != HWND_INVALID)
|
||||
{
|
||||
if (editdata->view->hEdit != hWnd)
|
||||
{
|
||||
@@ -321,7 +321,7 @@ double GridCellTypeNull_get_double_value(gvGridCellData* cell, int row, int col)
|
||||
|
||||
HWND GridCellTypeNull_get_control(gvGridCellData* cell, gvGridViewData* view, int row, int col)
|
||||
{
|
||||
return (HWND)-1;
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
void GridCellTypeNull_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, GridCellFormat* format)
|
||||
@@ -350,7 +350,7 @@ int GridCellTypeNull_draw(gvGridCellData* cell, gvGridViewData* view,
|
||||
is_highlight = FALSE;
|
||||
|
||||
ctrl = cell->func->get_control(cell, view, row, col);
|
||||
if(ctrl != -1)
|
||||
if(ctrl != HWND_INVALID)
|
||||
{
|
||||
RECT r;
|
||||
GetWindowRect(ctrl, &r);
|
||||
@@ -887,12 +887,12 @@ HWND GridCellTypeText_create_edit_ctrl(gvGridViewData* view, gvGridCellData* cel
|
||||
if(real_cell == NULL || real_cell != cell)
|
||||
is_default = TRUE;
|
||||
if(cell == NULL)
|
||||
return -1;
|
||||
return HWND_INVALID;
|
||||
if( cell->style & GVS_MULTLINE )
|
||||
ctrl_type = CTRL_MLEDIT;
|
||||
else
|
||||
ctrl_type = CTRL_SLEDIT;
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
{
|
||||
editdata = (GridCellEditData*)GetWindowAdditionalData(view->hEdit);
|
||||
editdata->commit = FALSE;
|
||||
@@ -903,7 +903,7 @@ HWND GridCellTypeText_create_edit_ctrl(gvGridViewData* view, gvGridCellData* cel
|
||||
WS_CHILD|WS_VISIBLE, col,
|
||||
rect->left, rect->top, RECTWP(rect), RECTHP(rect),
|
||||
view->hCtrl, 0);
|
||||
if(view->hEdit != -1)
|
||||
if(view->hEdit != HWND_INVALID)
|
||||
{
|
||||
editdata = calloc(1, sizeof(GridCellEditData));
|
||||
editdata->view = view;
|
||||
@@ -922,7 +922,7 @@ int GridCellTypeText_begin_edit(gvGridCellData* cell, gvGridViewData* view,
|
||||
int row, int col, RECT* rect)
|
||||
{
|
||||
RECT r;
|
||||
HWND hEdit = -1;
|
||||
HWND hEdit = HWND_INVALID;
|
||||
int len;
|
||||
char* text;
|
||||
if( gvGridCell_is_readonly(cell) )
|
||||
@@ -933,7 +933,7 @@ int GridCellTypeText_begin_edit(gvGridCellData* cell, gvGridViewData* view,
|
||||
GridCell_get_ctrl_rect(cell, view, row, col, rect, &r);
|
||||
hEdit = GridCellTypeText_create_edit_ctrl(view, cell, row, col, &r, text);
|
||||
free(text);
|
||||
if (hEdit != -1)
|
||||
if (hEdit != HWND_INVALID)
|
||||
SetFocusChild(hEdit);
|
||||
return 0;
|
||||
}
|
||||
@@ -945,7 +945,7 @@ int GridCellTypeText_end_edit(gvGridCellData* cell, gvGridViewData* view, int ro
|
||||
gvGridCellData tmp_cell;
|
||||
gvGridCellData* p_cell = cell;
|
||||
GridCellEditData* editdata;
|
||||
if(view->hEdit == -1)
|
||||
if(view->hEdit == HWND_INVALID)
|
||||
return -1;
|
||||
editdata = (GridCellEditData*)GetWindowAdditionalData(hEdit);
|
||||
if(editdata->commit)
|
||||
@@ -965,7 +965,7 @@ int GridCellTypeText_end_edit(gvGridCellData* cell, gvGridViewData* view, int ro
|
||||
free(buf);
|
||||
}
|
||||
DestroyWindow(hEdit);
|
||||
view->hEdit = -1;
|
||||
view->hEdit = HWND_INVALID;
|
||||
free(editdata);
|
||||
InvalidateRect(view->hCtrl, NULL, FALSE);
|
||||
return 0;
|
||||
@@ -1179,7 +1179,7 @@ int GridCellTypeCheckBox_init(gvGridCellData* cell)
|
||||
memset(cell, 0, sizeof(gvGridCellData));
|
||||
cell->celltype = GV_TYPE_CHECKBOX;
|
||||
cell->func = gvGridCellTypeCheckBox;
|
||||
cell->data.checkbox.handle = -1;
|
||||
cell->data.checkbox.handle = HWND_INVALID;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1244,7 +1244,7 @@ int GridCellTypeCheckBox_merge(gvGridCellData* cell, gvGridCellData* data)
|
||||
int GridCellTypeCheckBox_copy(gvGridCellData* to, gvGridCellData* from)
|
||||
{
|
||||
memcpy(to, from, sizeof(gvGridCellData));
|
||||
to->data.checkbox.handle = -1;
|
||||
to->data.checkbox.handle = HWND_INVALID;
|
||||
to->data.checkbox.dirty = FALSE;
|
||||
if(from->data.checkbox.text != NULL)
|
||||
to->data.checkbox.text = strdup(from->data.checkbox.text);
|
||||
@@ -1318,8 +1318,8 @@ HWND GridCellTypeCheckBox_create_checkbox_ctrl(gvGridViewData* view, gvGridCellD
|
||||
HWND ctrl;
|
||||
GridCellEditData* editdata = NULL;
|
||||
if(cell == NULL)
|
||||
return -1;
|
||||
if(cell->data.checkbox.handle != -1)
|
||||
return HWND_INVALID;
|
||||
if(cell->data.checkbox.handle != HWND_INVALID)
|
||||
return cell->data.checkbox.handle;
|
||||
ctrl = CreateWindow(CTRL_BUTTON,
|
||||
text,
|
||||
@@ -1327,10 +1327,10 @@ HWND GridCellTypeCheckBox_create_checkbox_ctrl(gvGridViewData* view, gvGridCellD
|
||||
row*0x10000+col,
|
||||
rect->left, rect->top, RECTWP(rect), RECTHP(rect),
|
||||
view->hCtrl, 0);
|
||||
if(ctrl == -1)
|
||||
if(ctrl == HWND_INVALID)
|
||||
{
|
||||
cell->data.checkbox.handle = -1;
|
||||
return -1;
|
||||
cell->data.checkbox.handle = HWND_INVALID;
|
||||
return HWND_INVALID;
|
||||
}
|
||||
cell->data.checkbox.handle = ctrl;
|
||||
editdata = calloc(1, sizeof(GridCellEditData));
|
||||
@@ -1360,7 +1360,7 @@ int GridCellTypeCheckBox_draw_content(gvGridCellData* cell, gvGridViewData* view
|
||||
if(EqualRect(&r_bound, &view->cells_rect))
|
||||
{
|
||||
int checked = cell->data.checkbox.checked?BST_CHECKED:BST_UNCHECKED;
|
||||
if(ctrl == -1)
|
||||
if(ctrl == HWND_INVALID)
|
||||
{
|
||||
char* text = cell->data.checkbox.text;
|
||||
if(text == NULL)
|
||||
@@ -1383,11 +1383,11 @@ int GridCellTypeCheckBox_invisible_draw(gvGridCellData* cell, gvGridViewData* vi
|
||||
HDC hdc, int row, int col, RECT* rect)
|
||||
{
|
||||
HWND ctrl = cell->data.checkbox.handle;
|
||||
if(ctrl != -1)
|
||||
if(ctrl != HWND_INVALID)
|
||||
{
|
||||
GridCellEditData* editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
DestroyWindow(ctrl);
|
||||
cell->data.checkbox.handle = -1;
|
||||
cell->data.checkbox.handle = HWND_INVALID;
|
||||
free(editdata);
|
||||
}
|
||||
return 0;
|
||||
@@ -1407,7 +1407,7 @@ int GridCellTypeCheckBox_end_edit(gvGridCellData* cell, gvGridViewData* view, in
|
||||
if(cell == NULL)
|
||||
return -1;
|
||||
ctrl = cell->data.checkbox.handle;
|
||||
if (ctrl == -1)
|
||||
if (ctrl == HWND_INVALID)
|
||||
return -1;
|
||||
editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
if(editdata->commit)
|
||||
@@ -1430,12 +1430,12 @@ int GridCellTypeCheckBox_on_destroy(gvGridCellData* cell)
|
||||
free(cell->data.checkbox.text);
|
||||
cell->data.checkbox.text = NULL;
|
||||
}
|
||||
if(cell->data.checkbox.handle != -1)
|
||||
if(cell->data.checkbox.handle != HWND_INVALID)
|
||||
{
|
||||
HWND ctrl = cell->data.checkbox.handle;
|
||||
GridCellEditData* editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
DestroyWindow(ctrl);
|
||||
cell->data.checkbox.handle = -1;
|
||||
cell->data.checkbox.handle = HWND_INVALID;
|
||||
free(editdata);
|
||||
}
|
||||
return 0;
|
||||
@@ -1450,7 +1450,7 @@ int GridCellTypeSelection_init(gvGridCellData* cell)
|
||||
memset(cell, 0, sizeof(gvGridCellData));
|
||||
cell->celltype = GV_TYPE_SELECTION;
|
||||
cell->func = gvGridCellTypeSelection;
|
||||
cell->data.selection.handle = -1;
|
||||
cell->data.selection.handle = HWND_INVALID;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1514,7 +1514,7 @@ int GridCellTypeSelection_merge(gvGridCellData* cell, gvGridCellData* data)
|
||||
int GridCellTypeSelection_copy(gvGridCellData* to, gvGridCellData* from)
|
||||
{
|
||||
memcpy(to, from, sizeof(gvGridCellData));
|
||||
to->data.selection.handle = -1;
|
||||
to->data.selection.handle = HWND_INVALID;
|
||||
to->data.selection.dirty = FALSE;
|
||||
if(from->data.selection.text != NULL)
|
||||
to->data.selection.text = strdup(from->data.selection.text);
|
||||
@@ -1590,8 +1590,8 @@ HWND GridCellTypeSelection_create_selection_ctrl(gvGridViewData* view, gvGridCel
|
||||
char *tmp = NULL;
|
||||
|
||||
if(cell == NULL)
|
||||
return -1;
|
||||
if(cell->data.selection.handle != -1)
|
||||
return HWND_INVALID;
|
||||
if(cell->data.selection.handle != HWND_INVALID)
|
||||
return cell->data.selection.handle;
|
||||
|
||||
ctrl = CreateWindow(CTRL_COMBOBOX,
|
||||
@@ -1601,9 +1601,9 @@ HWND GridCellTypeSelection_create_selection_ctrl(gvGridViewData* view, gvGridCel
|
||||
rect->left, rect->top, RECTWP(rect), RECTHP(rect),
|
||||
view->hCtrl, 0);
|
||||
|
||||
if(ctrl == -1) {
|
||||
cell->data.selection.handle = -1;
|
||||
return -1;
|
||||
if(ctrl == HWND_INVALID) {
|
||||
cell->data.selection.handle = HWND_INVALID;
|
||||
return HWND_INVALID;
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -1645,7 +1645,7 @@ int GridCellTypeSelection_draw_content(gvGridCellData* cell, gvGridViewData* vie
|
||||
GetBoundRect(&r_bound, &r, &view->cells_rect);
|
||||
if(EqualRect(&r_bound, &view->cells_rect))
|
||||
{
|
||||
if(ctrl == -1)
|
||||
if(ctrl == HWND_INVALID)
|
||||
{
|
||||
char* text = cell->data.selection.text;
|
||||
if(text == NULL)
|
||||
@@ -1666,11 +1666,11 @@ int GridCellTypeSelection_invisible_draw(gvGridCellData* cell, gvGridViewData* v
|
||||
HDC hdc, int row, int col, RECT* rect)
|
||||
{
|
||||
HWND ctrl = cell->data.selection.handle;
|
||||
if(ctrl != -1)
|
||||
if(ctrl != HWND_INVALID)
|
||||
{
|
||||
GridCellEditData* editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
DestroyWindow(ctrl);
|
||||
cell->data.selection.handle = -1;
|
||||
cell->data.selection.handle = HWND_INVALID;
|
||||
free(editdata);
|
||||
}
|
||||
return 0;
|
||||
@@ -1690,7 +1690,7 @@ int GridCellTypeSelection_end_edit(gvGridCellData* cell, gvGridViewData* view, i
|
||||
if(cell == NULL)
|
||||
return -1;
|
||||
ctrl = cell->data.selection.handle;
|
||||
if(ctrl == -1)
|
||||
if(ctrl == HWND_INVALID)
|
||||
return -1;
|
||||
editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
index = SendMessage(ctrl, CB_GETCURSEL, 0, 0);
|
||||
@@ -1702,7 +1702,7 @@ int GridCellTypeSelection_end_edit(gvGridCellData* cell, gvGridViewData* view, i
|
||||
else
|
||||
cell->data.selection.cur_index = 0;
|
||||
if(view->hEdit == ctrl)
|
||||
view->hEdit = -1;
|
||||
view->hEdit = HWND_INVALID;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1713,12 +1713,12 @@ int GridCellTypeSelection_on_destroy(gvGridCellData* cell)
|
||||
free(cell->data.selection.text);
|
||||
cell->data.selection.text = NULL;
|
||||
}
|
||||
if(cell->data.selection.handle != -1)
|
||||
if(cell->data.selection.handle != HWND_INVALID)
|
||||
{
|
||||
HWND ctrl = cell->data.selection.handle;
|
||||
GridCellEditData* editdata = (GridCellEditData*)GetWindowAdditionalData(ctrl);
|
||||
DestroyWindow(ctrl);
|
||||
cell->data.selection.handle = -1;
|
||||
cell->data.selection.handle = HWND_INVALID;
|
||||
free(editdata);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -466,8 +466,7 @@ void iconview_destroy (IconviewData* pivdata)
|
||||
ivlist_reset_content (hivwnd, &pivdata->ivlist);
|
||||
}
|
||||
|
||||
static int
|
||||
IconViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT IconViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
IconviewData* pivdata = NULL;
|
||||
IconviewList* pivlist = NULL;
|
||||
|
||||
+10
-10
@@ -1314,7 +1314,7 @@ static void listview_destroy (HWND hWnd, PLVDATA plvdata)
|
||||
|
||||
#define RETURN_DIRECT return DefaultControlProc(hWnd, message, wParam, lParam)
|
||||
|
||||
static int ListViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
|
||||
static LRESULT ListViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PLVDATA plvdata = NULL;
|
||||
|
||||
@@ -1724,17 +1724,17 @@ static int ListViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
else if (pprev) {
|
||||
ptmp = lvGetLastChild (plvdata, pprev);
|
||||
hsvi = ptmp->addData;
|
||||
hsvi = (HICON)ptmp->addData;
|
||||
pnew->addData = (DWORD) scrollview_add_item (hWnd,
|
||||
&plvdata->svdata, hsvi, &svii, &nItem);
|
||||
}
|
||||
else {
|
||||
hsvi = parent->addData;
|
||||
hsvi = (HICON)parent->addData;
|
||||
pnew->addData = (DWORD) scrollview_add_item (hWnd,
|
||||
&plvdata->svdata, hsvi, &svii, &nItem);
|
||||
}
|
||||
|
||||
return (int)pnew;
|
||||
return (LRESULT)pnew;
|
||||
}
|
||||
|
||||
case LVM_GETITEM:
|
||||
@@ -1770,7 +1770,7 @@ static int ListViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
|
||||
hsvi = scrollview_get_hilighted_item (&plvdata->svdata);
|
||||
pi = LV_GET_ITEM (hsvi);
|
||||
return (int)pi;
|
||||
return (LRESULT)pi;
|
||||
}
|
||||
|
||||
case LVM_GETRELATEDITEM:
|
||||
@@ -1781,16 +1781,16 @@ static int ListViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
return 0;
|
||||
|
||||
if (wParam == LVIR_PARENT) {
|
||||
return (int)pi->parent;
|
||||
return (LRESULT)pi->parent;
|
||||
}
|
||||
else if (wParam == LVIR_FIRSTCHILD) {
|
||||
return (int)pi->child;
|
||||
return (LRESULT)pi->child;
|
||||
}
|
||||
else if (wParam == LVIR_NEXTSIBLING) {
|
||||
return (int)pi->next;
|
||||
return (LRESULT)pi->next;
|
||||
}
|
||||
else if (wParam == LVIR_PREVSIBLING) {
|
||||
return (int)lvGetPrevSib(plvdata, pi);
|
||||
return (LRESULT)lvGetPrevSib(plvdata, pi);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1918,7 +1918,7 @@ static int ListViewCtrlProc (HWND hWnd, int message, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
case LVM_FINDITEM:
|
||||
{
|
||||
return (int)lvFindItem(plvdata, (PITEMDATA)wParam, (PLVFINDINFO)lParam);
|
||||
return (LRESULT)lvFindItem(plvdata, (PITEMDATA)wParam, (PLVFINDINFO)lParam);
|
||||
}
|
||||
case LVM_DELITEM:
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user