Compare commits

...
353 Commits
Author SHA1 Message Date
xueshuming 59a6a1369d singletouchkey :do not used O_NONBLOCK 2023-09-08 09:13:42 +08:00
Vincent Wei d06ce0683b call __mg_nssurf_map_delete() in server_ServerCleanup 2023-08-28 20:12:50 +08:00
Vincent Wei 5a9b08fe94 initial implementation for named shared surface 2023-08-28 16:51:46 +08:00
Vincent Wei c7569e9d32 add default options to fbcon section in MiniGUI.cfg 2023-08-28 11:25:57 +08:00
Vincent Wei 06fcf2eaa0 New APIs: GetWindowSurfaceBufferFD() and CreateMemDCFromSurfaceBufferFD() for compositing schema. 2023-08-22 11:29:36 +08:00
Vincent Wei 33e5d62da8 Merge remote-tracking branch 'origin/rel-5-0' into drm-dma 2023-08-21 10:19:14 +08:00
Vincent Wei f0bae4444c update version 2023-08-10 09:23:56 +08:00
Vincent Wei 0a5ace7f82 add a new method for DEVFONTOPS: get_feature(). currently used for check whether a devfont contains correct bounding box values for marks 2023-08-09 14:08:40 +08:00
Vincent Wei 5b27cc70fc use draw_one_vowel and DrawVowel for vowel 2023-08-09 11:13:40 +08:00
Vincent Wei cf3340c01d update 2023-08-02 15:29:00 +08:00
Vincent Wei 950f73716a use libsuffix to define the library suffix; use processes-compositing style for runmode 2023-08-02 15:08:45 +08:00
Vincent Wei 295c993d50 make Runmode in pc file as a variable in order that we can use pkg_get_variable() in cmake files to determinate the runtime mode of MiniGUI. 2023-08-02 14:39:23 +08:00
Vincent Wei 95ab7dad2a fix a bug and call sem_wait within retry_syscall_for_eintr() 2023-08-01 19:13:49 +08:00
Vincent Wei 3d42f72e21 debug 2023-08-01 18:00:41 +08:00
Vincent Wei 59d9d08158 debug 2023-08-01 17:55:34 +08:00
Vincent Wei 3a9cbfdd9b initialize last_x and last_y 2023-08-01 16:55:11 +08:00
Vincent Wei bc7d5f6ce0 fix a compositing bug when the wallpaper is empty 2023-08-01 16:33:27 +08:00
Vincent Wei 1131973f7a Fix a bug in PeekMessageEx 2023-08-01 16:14:12 +08:00
Vincent Wei a46804080e Fix a bug in PeekMessageEx 2023-08-01 16:12:31 +08:00
Vincent Wei 81b25968ca do not return ARCH_TYPE_BASIC_VOWEL for Arabic chars 2023-08-01 15:57:27 +08:00
Vincent Wei f1463f41de fix some compilation errors 2023-08-01 14:54:09 +08:00
Vincent Wei 0a10b81499 Merge branch 'rel-5-0' into drm-dma 2023-08-01 14:22:39 +08:00
Vincent Wei fd07118939 enhance fbcon engine to support async updater; tune internal interface shadowScreen_BlitToReal() 2023-08-01 11:33:30 +08:00
Vincent Wei a0a757a621 tune DRM engine for procs runmode and compositing schema 2023-08-01 10:03:19 +08:00
Vincent Wei 7cd7f954c6 make virtual-window enabled by default 2023-08-01 10:02:49 +08:00
Vincent Wei e673452b7d debug 2023-07-31 10:15:14 +08:00
Vincent Wei e24490e92f debug 2023-07-30 12:17:02 +08:00
Vincent Wei 0c2345aed1 change method flush_driver to flush of DrmDriverOps; change member buff to vaddr of DrmSurfaceBuffer 2023-07-30 11:57:02 +08:00
Vincent Wei 95b9def0d5 rename dma_buff to dma_buf 2023-07-28 21:20:18 +08:00
Vincent Wei 563fe9232c remove methods OnBeforeUpdate and OnAfterUpdate 2023-07-28 21:08:44 +08:00
Vincent Wei 5ad525c1d8 fix a bug 2023-07-27 10:58:58 +08:00
Vincent Wei fcde9eb405 Add OnBeforeUpdate() and OnAfterUpdate() operations for Shadow engine 2023-07-27 10:46:58 +08:00
Vincent Wei 39d03be6d7 use DMA_BUF_IOCTL_SYNC 2023-07-27 10:04:53 +08:00
Vincent Wei 43101379ed Support for vowels to fix Issue #121 2023-07-26 16:49:01 +08:00
Vincent Wei bce5b73e1c call pthread_testcancel() in task_do_update 2023-07-25 10:58:27 +08:00
Vincent Wei 0b4a5a1c17 tune 2023-07-25 10:43:20 +08:00
Vincent Wei c609e2e5b1 check number of pixels before calling hardware accecelation operations 2023-07-24 09:56:10 +08:00
Vincent Wei f6bf02aa5c add new operation do_blit in DrmDriverOps; use do_blit instead of returning callback of check_blit 2023-07-24 08:22:10 +08:00
Vincent Wei d52aa4c1a4 do cleanup for free surfaces 2023-07-23 16:03:08 +08:00
Vincent Wei d6a961aa6c enhance GAL_blit to have a pointer to GAL_VideoDevice for hardware acceleration blits 2023-07-23 15:05:54 +08:00
Vincent Wei 2665200eee add new runtime configuration option: min_pixels_using_hwaccl 2023-07-23 13:02:45 +08:00
Vincent Wei 469eb1c05a use hardware accelerated copy_buff 2023-07-23 12:45:24 +08:00
Vincent Wei 6a83f2efbf Remove SetHWColorKey, SetHWAlpha; Tune prototype of FillHWRect; Add CopyHWSurface() 2023-07-23 12:01:18 +08:00
Vincent Wei 6422cb8568 tune 2023-07-22 20:27:52 +08:00
Vincent Wei 6be4b719c8 If FillHWRect() retruns non-zero, use GAL_SoftFillRect() 2023-07-22 19:02:41 +08:00
Vincent Wei 0f566d0342 tune DRM_SURBUF_TYPE 2023-07-22 17:28:20 +08:00
Vincent Wei 1de19f9bee Upgrade DrmDriverOps to version 2 and enhance ChechHWBlit 2023-07-22 16:15:09 +08:00
Vincent Wei 5f8a88c0a2 check euid when creating update thread 2023-07-21 11:52:52 +08:00
Vincent Wei 1611a56754 tune 2023-07-21 11:20:30 +08:00
Vincent Wei 73fcb8d2c3 tune shadow and drm video engines to show FPS 2023-07-21 10:40:31 +08:00
Vincent Wei bc0efac21f cleanup 2023-07-14 18:56:50 +08:00
xueshuming 26341b162e debug 2023-07-14 17:06:54 +08:00
Vincent Wei c6957bec23 debug 2023-07-14 16:32:16 +08:00
Vincent Wei 56ddd87189 debug 2023-07-14 14:38:47 +08:00
Vincent Wei 5cdd258046 use WaitVBlank 2023-07-14 14:06:28 +08:00
Vincent Wei 8b4ab267b6 and an alternative to use semphaore 2023-07-14 13:11:30 +08:00
Vincent Wei 613a19c236 debug: call pthread_mutex_init for update_lock 2023-07-14 12:54:58 +08:00
Vincent Wei e242cbe32f handle all implementations of kernel_ShowCursorForGDI 2023-07-14 11:19:04 +08:00
Vincent Wei 5f921a2908 cleanup 2023-07-14 10:20:34 +08:00
Vincent Wei 39493ef4dc implement LockHWSurface for shadow and drm engines due to the async. updates to real screen 2023-07-14 10:14:23 +08:00
Vincent Wei fef311f0b2 use async. update for shadow engine 2023-07-13 18:37:56 +08:00
Vincent Wei e98aeab8dc debug and tue 2023-07-13 16:37:12 +08:00
Vincent Wei 2ff96ba383 debug and cleanup 2023-07-13 12:21:28 +08:00
Vincent Wei 03d90aec9f debug 2023-07-12 22:29:14 +08:00
Vincent Wei 57293a2896 debug 2023-07-12 22:05:22 +08:00
Vincent Wei cfd3311f86 use drmWaitVBlank 2023-07-12 21:35:32 +08:00
Vincent Wei 51b09bc2ed tune 2023-07-12 20:09:07 +08:00
Vincent Wei ff54c6ffe5 debug 2023-07-12 16:41:54 +08:00
Vincent Wei 4c836603c1 tune DRM_SyncUpdate 2023-07-12 15:09:08 +08:00
Vincent Wei 311d2262d6 some tries 2023-07-11 22:17:59 +08:00
Vincent Wei 209a0c6ab0 initial support for drmDMA 2023-07-11 16:59:21 +08:00
Vincent Wei 4c2b20c49f fix a minor bug 2023-07-11 10:51:35 +08:00
Vincent Wei b7625c5726 tune 2023-07-11 09:02:21 +08:00
Vincent Wei 872e299ad9 fix a bug when using shadow engine and fbcon with double buffering enabled; fix a bug for bad size for destination line 2023-07-10 22:52:28 +08:00
Vincent Wei c60c19aad5 update copyring year 2023-07-10 11:16:39 +08:00
xueshuming 5d216dcc32 tune: use nr_updaters instead of extra_updaters 2023-07-10 11:06:38 +08:00
Vincent Wei 37c122a1de fix a bug reported in Issue #120; update version to 5.0.13 2023-07-05 12:43:04 +08:00
Vincent Wei 50ae4b9b44 add flag legacy_bidi in CHARSETOPS structure, and tune unicode_bidi_type operation for legacy BIDI algorithm. 2023-07-05 11:59:36 +08:00
Vincent Wei 695c55e464 tune: use extra_updaters instead of multi_updater 2023-06-28 18:14:05 +08:00
Vincent Wei a16903d570 use multiple concurrently updaters in Shadow engine if multi_updater=yes 2023-06-28 11:46:12 +08:00
Vincent Wei 3189931910 cleanup 2023-06-15 11:03:22 +08:00
Vincent Wei c3a8dc0798 fix a bug in Shadow NEWGAL engine: SetVideoMode may return another surface, e.g., when using double bufffering of fbcon engine. 2023-06-15 08:53:21 +08:00
Vincent Wei 848ed3fecc change return type of DefaultItemViewProc and DefaultScrolledProc to LRESULT 2023-05-23 08:59:34 +08:00
Vincent Wei 0d1f1f028a update 2023-05-10 09:00:35 +08:00
Vincent Wei d4add19e6a tune GetTickCount for threads mode 2023-05-08 20:09:23 +08:00
Vincent Wei bfaeae0023 call GetTickCount when setting timer 2023-05-08 19:48:21 +08:00
Vincent Wei 70705c7db0 fix bug reported in Issue #116 2023-05-08 19:34:43 +08:00
Vincent Wei 517d74a2d2 update version in configure.ac 2023-05-08 08:35:10 +08:00
Vincent Wei d68eee3c90 use buffer in stack for short text 2023-04-24 11:52:47 +08:00
Vincent Wei e575e7c69d add new APIs: GetTabbedACharsExtentXXX 2023-04-24 11:38:02 +08:00
Vincent Wei d059fc8de2 fix a typo: Achar2UChar 2023-04-24 11:37:35 +08:00
Vincent Wei 5d9d787dac cleanup 2023-04-23 14:02:15 +08:00
Vincent Wei 9696fbb3ba change version to 5.0.12; cleanup 2023-04-23 12:42:47 +08:00
Vincent Wei 800329086e implement new API: GetACharsExtentPointEx(); enhance GetTextExtentPoint() and GetTabbedTextExtentPoint() to support BIDI charsets 2023-04-23 12:36:55 +08:00
Vincent Wei 11be6af9d3 use Amask from real engine 2023-03-03 10:57:15 +08:00
Vincent Wei e0cc3b5580 update version to 5.0.11 2022-12-13 17:10:13 +08:00
Vincent Wei e33d98a702 set pdc->bkmode correctly before calling _gdi_draw_one_glyph() 2022-11-27 16:31:27 +08:00
Vincent Wei 84f3cf048a fix a bug: dx and dy of StretchBlt are reset to zero if it is less than 0 in error 2022-11-27 16:30:34 +08:00
Vincent Wei ea579771a7 tune the implementation of auto-repeat message 2022-11-27 16:28:45 +08:00
Vincent Wei 4db97ead1f rename timeoutusec to __mg_timeout_usec; rename repeatusec to __mg_repeat_usec 2022-11-27 16:21:54 +08:00
Vincent Wei 2338501d21 use CreateMemDCFromMyBitmap instead of common_rgba8888_dc for DrawIcon() 2022-11-27 16:02:22 +08:00
Vincent Wei 81c061c3c8 cleanup 2022-11-27 15:59:52 +08:00
Vincent Wei 356bf08c4b remove code using the obsolete style: TVS_ICONFORSELECT 2022-11-27 15:58:14 +08:00
Vincent Wei 09a27e508f suppress useless print 2022-11-25 16:04:11 +08:00
Vincent Wei 0b636032ee use bkmode_set instead of saving oldbkmode in context, because it may cause the bkmode cannot be restored correctly 2022-11-25 15:25:56 +08:00
Vincent Wei 5f78f6bb37 fix a bug in Issure #106 2022-11-25 11:03:19 +08:00
Vincent Wei 272bc39c84 call __mg_legacy_bidi_map_reorder when getting the visual Achars 2022-11-25 11:01:36 +08:00
Vincent Wei 1e006c0589 cleanup 2022-11-25 11:00:58 +08:00
Vincent Wei 7158eaee0f restore __mg_legacy_bidi_map_reorder function 2022-11-25 11:00:42 +08:00
Vincent Wei abfc47159e tune and add some output for debug 2022-11-25 10:58:03 +08:00
Vincent Wei deade3d887 tuen code for resolve bugs reported in Issue #105 2022-11-13 12:22:12 +08:00
Vincent Wei cf3e0b3d4d tune 2022-11-13 11:54:20 +08:00
Vincent Wei 614deba4b7 cleanup 2022-11-13 11:53:43 +08:00
Vincent Wei 53d40508a4 set bkmode to BM_TRANSPARENT when having WS_EX_TRANSPARENT exStyle 2022-11-13 11:53:16 +08:00
Vincent Wei 39f96f407f use client DC instead of screen DC; restore the alpha component if amask != 0. 2022-11-08 17:28:23 +08:00
Vincent Wei c8c6f470ce tune 2022-11-08 17:23:02 +08:00
Vincent Wei d78b493aad fix a bug mentioned in Issue 96: bad handling for Backspace key 2022-11-08 17:22:40 +08:00
Vincent Wei 26f415f3db update release notes 2022-11-07 20:34:35 +08:00
Vincent Wei b66ef7a2f5 optimize the refresh of scrolled 2022-11-07 20:23:57 +08:00
Vincent Wei 9b89614569 fix bug reported in Issue #96 2022-11-07 19:59:54 +08:00
Vincent Wei 0d170a6f74 use CreateLogFontEx instead of CreateLogFont to follow the new style convention of font name
when creating system logfonts, but the orientation is ignored for the system logfont.
2022-11-03 20:49:50 +08:00
Vincent Wei f0dd4a74d2 Tune implementation of GetTabbedTextExtentPoint: remore odd code 2022-11-03 16:58:24 +08:00
Vincent Wei 692a6b81e0 tune update logical of some controls calling ScrollWindow 2022-11-03 16:11:49 +08:00
Vincent Wei cf49cf2b64 do not call UpdateInvalidClient in ScrollWindow: this may break update logical of control 2022-11-03 16:11:06 +08:00
Vincent Wei b26accf037 cleanup 2022-11-03 15:54:41 +08:00
Vincent Wei 5913d95ff2 debug info 2022-11-03 15:53:44 +08:00
Vincent Wei e1b94799a2 cleanup 2022-11-03 15:53:21 +08:00
Vincent Wei 385db01097 fix some implicit full-through 2022-10-22 11:49:24 +08:00
Vincent Wei d787dea652 call mg_FreeMsgQueueForThisThread immediately in TerminateGUI() 2022-10-19 19:37:06 +08:00
Vincent Wei 0adddb422b fix a bug in dskOnRemoveCtrlInstance for procs runmode 2022-10-19 19:36:16 +08:00
Vincent Wei c444030334 cleanup 2022-10-19 17:54:43 +08:00
Vincent Wei a9da4ddfba Fix a bug reported in Issue #94. 2022-10-19 17:53:39 +08:00
Vincent Wei 57cc74410f fix a minor bug 2022-10-12 15:17:27 +08:00
Vincent Wei 3cc16ababb update release notes 2022-09-28 15:11:52 +08:00
Vincent Wei d4097b577b tune 2022-09-27 21:54:36 +08:00
Vincent Wei 7ef6c14f3f relay MSG_IDLE to active child in PreDefControlProc 2022-09-27 21:54:30 +08:00
Vincent Wei cbb4e32992 Call UpdateInvalidClient in ScrollWindow; Only delaying MSG_IDLE to the child control if the main window is active 2022-09-27 13:20:18 +08:00
Vincent Wei 6bc85062b9 add an internal extended style: WS_EX_ACTIVATED 2022-09-27 13:17:15 +08:00
Vincent Wei b2dee57f4f tune relaying of MSG_IDLE 2022-09-27 11:44:26 +08:00
Vincent Wei a926754a6b Tuning: the MSG_IDLE message will be relayed to the descendant control if the control captured the mouse currently 2022-09-26 20:03:20 +08:00
Vincent Wei 7e470b0e78 tune code according to Issue #90 2022-09-26 20:01:47 +08:00
Vincent Wei 9f81cac662 reset binary age and interface age; update release notes 2022-09-26 14:30:49 +08:00
Vincent Wei a14bdd894a remove #include "window.h" 2022-09-26 14:18:14 +08:00
Vincent Wei 7004e156b8 use inline functions for SetCursor and SetDefaultCursor instead of macros 2022-09-26 14:17:55 +08:00
Vincent Wei e293cf03ba fix bugs when virtual window enabled for sa and procs runmodes 2022-09-26 14:06:09 +08:00
Vincent Wei 07f226f024 tune 2022-09-26 09:45:36 +08:00
Vincent Wei 4b2503e614 fix a bug when quiting dummy engine under compoisiting schema 2022-09-25 22:13:27 +08:00
Vincent Wei 2df5352356 fix a bug which may cause invalid values in log_clusters 2022-09-25 21:13:20 +08:00
Vincent Wei 67ccb2aafd give default RGBA masks for depth 32 when masks not specified 2022-09-24 14:33:49 +08:00
Vincent Wei 9a124dec50 fix a bug in search_win_tree_bfs; send MSG_MANAGE_MSGTHREAD messages only in message.c 2022-09-24 13:42:02 +08:00
Vincent Wei d013822979 add condition for loongarch 2022-09-23 21:45:00 +08:00
Vincent Wei 7f44e948d0 fix a bug mentioned in Issue #89 2022-09-23 16:04:11 +08:00
Vincent Wei 9a94fb9a7c enhance code for some uninitialized fields 2022-09-23 11:20:50 +08:00
Vincent Wei dfc7e95fcd fix the bug reported in Issue #89 2022-09-21 10:40:22 +08:00
Vincent Wei 362b852ec2 update anchor 2022-09-15 15:33:21 +08:00
Vincent Wei 9141e13640 suppress some warnings reported by GCC 12 2022-09-15 15:01:30 +08:00
Vincent Wei 4a22a38e63 update 2022-09-15 15:01:15 +08:00
Vincent Wei c7ce12449b use RUNMODE_LDADD and RUNMODE_SUBDIRS instead of conditions 2022-09-15 15:01:05 +08:00
Vincent Wei 824557b4f1 ignore configure~ 2022-09-15 11:20:18 +08:00
Vincent Wei 022542ef1b tune 2022-09-15 11:08:43 +08:00
Vincent Wei 3b12e71877 update README 2022-09-15 11:01:01 +08:00
Vincent Wei 9593168196 use recursive mutex for locking zorder info if not using *nix 2022-09-15 10:07:50 +08:00
Vincent Wei b5c5c3f8ae fix a deadlock bug (#87): use wrlock_owner to save the current thread holding the wrlock, skip rdlock if the wrlock owner is the current thread 2022-09-14 12:52:29 +08:00
Vincent Wei 492bd649ed update Release Notes for v5.0.10 2022-09-14 08:57:34 +08:00
Vincent Wei bc1a880479 cleanup and enhance shadow engine to use SyncUpdate method 2022-08-21 13:09:00 +08:00
Vincent Wei 0748f26f42 change version to 5.0.10; release notes for 5.0.10 2022-08-20 17:45:45 +08:00
Vincent Wei 2f72f24a49 debug 2022-08-20 17:29:43 +08:00
Vincent Wei 43e174a604 set dirty_rc empty initially 2022-08-20 17:23:16 +08:00
Vincent Wei 13d36a2785 add double_buffering options in fbcon section in MiniGUI.cfg 2022-08-20 16:26:23 +08:00
Vincent Wei 9ec3e9f7e6 support for double buffering for fbcon 2022-08-20 16:21:15 +08:00
Vincent Wei 148f1b1745 fix a typo 2022-04-24 11:48:37 +08:00
Vincent Wei f76c9187a8 remove _ERR_PRINTF 2022-03-21 17:52:01 +08:00
Vincent Wei 2e8eba7dd0 fix a deadlock bug: https://github.com/VincentWei/minigui/issues/83 2022-03-21 17:48:03 +08:00
Vincent Wei abeafa313d tune 2022-02-02 15:19:44 +08:00
Vincent Wei 310c0f3e7a The coordinates should be in device space for BitBlt and StretchBlt 2022-01-30 19:03:46 +08:00
Vincent Wei c426894ac9 change version to 5.0.9; change copyright year to 2022 2022-01-14 11:46:31 +08:00
Vincent Wei bf6998672f tune the fix 2021-12-17 15:02:21 +08:00
Vincent Wei ea83e92a16 Fix a bug: InitClipRgn on lrgn and ergn in InitSubDC; rename InitSubDC to dc_InitSubDC 2021-12-17 14:39:56 +08:00
Vincent Wei d95e827e93 update release notes for version 5.0.8 2021-10-20 16:36:28 +08:00
Vincent Wei 40f53732ff support for WebP is ready now (animation not supported) 2021-10-20 16:22:26 +08:00
Vincent Wei e2d2544ce6 cleanup 2021-10-20 16:20:50 +08:00
Vincent Wei 7cefc7d5ab initial support for WebP images 2021-10-20 12:09:40 +08:00
Vincent Wei b59ed4b7d1 implement __mg_check_webp, __mg_init_webp and __mg_cleanup_webp 2021-10-19 18:46:53 +08:00
Vincent Wei 5e43b76753 skeleton to support WebP file 2021-10-19 16:39:24 +08:00
Vincent Wei 894d0f64a2 Merge branch 'px30' into 'rel-5-0'
add option for platform px30

See merge request VincentWei/minigui!17
2021-06-21 16:29:17 +08:00
gengyue c18e0f3479 add option for platform px30 2021-06-21 16:24:31 +08:00
gengyue 8756b5de9f use inline for find_driver_for_device 2021-06-21 16:07:37 +08:00
gengyue 54a51ab02f add option for platform px30 2021-06-21 15:47:47 +08:00
gengyue 741a93aebd modifed find_driver_for_device for platfrom px30 2021-06-21 15:26:14 +08:00
gengyue aeb6642aad add option for platform px30 2021-06-21 14:45:53 +08:00
Vincent Wei 2fe23fa95b tune version 2021-06-08 14:26:14 +08:00
Vincent Wei a6eb81e916 cleanup: mark as deprected for old configuration options 2021-06-08 14:24:34 +08:00
Vincent Wei 93ec7e48b6 uncomment FBIO_ENABLE_CACHE for R818 2021-06-07 17:08:05 +08:00
Vincent Wei 956003092e fix conditional compilation errors 2021-06-07 16:46:13 +08:00
Vincent Wei 96b75c41c1 cleanup 2021-06-07 15:48:43 +08:00
Vincent Wei d6933b83e3 cleanup for the default values of TTF caches 2021-06-07 15:27:31 +08:00
Vincent Wei e2ba3681a1 cleanup: bad usage of __TARGET_UNKNOWN__ 2021-06-07 14:49:31 +08:00
Vincent Wei 0b47b83849 do not enable cache in fbvideo.c for R818 2021-06-07 10:53:26 +08:00
Vincent Wei 08419c0c95 tune fbcon code for compositing schema 2021-06-04 21:21:26 +08:00
Vincent Wei 03bc5befd5 tune fbcon code for r818 2021-06-04 19:50:41 +08:00
Vincent Wei ed37fa4fc2 tune fbcon code for r818 2021-06-04 19:29:58 +08:00
Vincent Wei 7268bcf92e tune fbcon code for r818 2021-06-04 19:12:30 +08:00
Vincent Wei 2d462ec749 tune fbcon code for r8181 2021-06-04 19:03:04 +08:00
Vincent Wei 11a4941dc7 tune 2021-06-04 17:22:45 +08:00
Vincent Wei d6281fd804 optimize calling of FBIO_CACHE_SYNC for R818 2021-06-04 16:50:41 +08:00
Vincent Wei 550fb04731 ioctls for FBVIDEO on R818 2021-06-04 15:52:03 +08:00
Vincent Wei e08a87fc93 add --with-target=r818 option 2021-06-04 15:29:11 +08:00
Vincent Wei cac16f1324 optimize to avoid using malloc/free for blit_ctxt; reset filter and transform of pixman images 2021-06-03 18:33:31 +08:00
Vincent Wei 2efb66cae0 change version to 5.0.7 2021-06-03 18:32:21 +08:00
Vincent Wei ad49fe0e0e fix warnings for conditional compilation 2021-05-19 13:16:19 +08:00
Vincent Wei ed0521df84 tune constants 2021-05-19 12:00:53 +08:00
Vincent Wei 002a03c087 shrink heap size for fixed string 2021-05-19 11:47:55 +08:00
Vincent Wei 70535c6cb4 new surface pixel format for main window: ST_PIXEL_XRGB565 2021-05-19 11:14:05 +08:00
Vincent Wei 4013dbf70a fix a compilation error 2021-05-19 08:49:38 +08:00
Vincent Wei b288e29eef tune links 2021-05-18 09:37:08 +08:00
Vincent Wei 871a99e22b upgrade Doxygen files 2021-05-18 08:37:31 +08:00
Vincent Wei a965f1023c fix a bug 2021-05-12 09:09:31 +08:00
Vincent Wei a6af326b48 return -1 for INV_GLYPH_VALUE in GetGlyphInfo 2021-05-11 11:18:20 +08:00
Vincent Wei 754b8f3014 Enhance GetGlyphInfo to return the FreeType face, font file path, and glyph index 2021-05-11 10:41:54 +08:00
Vincent Wei a85386499e remove unused valid field 2021-05-11 10:41:46 +08:00
Vincent Wei fe48d1cc64 tune release notes for 5.0.6 2021-05-11 09:43:58 +08:00
Vincent Wei c1aab8bf69 make compositing schema enabled by default 2021-05-11 09:42:32 +08:00
Vincent Wei 65d8a31a35 tune format 2021-05-10 08:39:07 +08:00
Vincent Wei e97ae8bcdb tune 2021-05-06 20:29:57 +08:00
Vincent Wei 883410eb14 tune readme 2021-05-06 20:29:08 +08:00
Vincent Wei 0cb72162e4 tune readme 2021-05-06 19:57:09 +08:00
Vincent Wei 2cb6c4bc9c tune readme 2021-05-06 19:55:04 +08:00
Vincent Wei 5b111d3300 tune readme 2021-05-06 19:51:26 +08:00
Vincent Wei 820689f5f9 tune readme 2021-05-06 19:48:18 +08:00
Vincent Wei 2ae51d70fb tune readme 2021-05-06 19:46:13 +08:00
Vincent Wei 86158f938d fix bad definition of COLOR_BLEND_FLAGS_MASK 2021-05-05 22:08:09 +08:00
Vincent Wei 3f99c7b960 fix conditional compilation errors 2021-05-05 20:53:56 +08:00
Vincent Wei b266bd8e0a fix conditional compilation errors 2021-05-05 20:41:09 +08:00
Vincent Wei f6d25f58aa use 0000 for umask to allow a general process can open the named semaphore 2021-05-05 19:54:01 +08:00
Vincent Wei ccbccc2020 use named semaphore for update lock for drm engine 2021-05-05 19:35:18 +08:00
Vincent Wei 736193d355 use update lock (semaphore) for sharedfb schema under MiniGUI-Processes 2021-05-05 18:42:21 +08:00
Vincent Wei 47e32a812e cleanup 2021-05-05 18:04:04 +08:00
Vincent Wei ac769be3cb fix a minor bug 2021-05-05 18:03:10 +08:00
Vincent Wei 4de7e09c22 Add MSG_WAKEUP_CLIENT to wake up a specific client 2021-05-05 16:43:52 +08:00
Vincent Wei e787c6fbde tune 2021-05-05 15:47:21 +08:00
Vincent Wei a0a0330a6c PixmanBlt only works when source surface and destination surface are not same 2021-05-05 15:25:55 +08:00
Vincent Wei 46854579be refactor use of pixman functions: use GAL_BlittingContext 2021-05-05 13:49:59 +08:00
Vincent Wei d31af448ff cleanup 2021-05-05 13:48:28 +08:00
Vincent Wei 91062be2ac define COLOR_BLEND_FIRST and COLOR_BLEND_LAST 2021-05-05 13:45:57 +08:00
Vincent Wei 6907dba86d use STRETCH_EXTRA_INFO instead of only rotation for StretchBltEx 2021-05-04 21:34:15 +08:00
Vincent Wei d4cadc47e0 use STRETCH_EXTRA_INFO instead of only rotation for StretchBltEx 2021-05-04 21:34:01 +08:00
Vincent Wei 0904ae5dc7 fix a compliation warning 2021-05-04 16:06:24 +08:00
Vincent Wei a431b2ae56 tune release notes 2021-05-04 16:04:46 +08:00
Vincent Wei 4c7e1bcecf disable debug output 2021-05-04 16:00:34 +08:00
Vincent Wei 7364a960bc implementation StretchBltEx; check validation of color blending method 2021-05-04 15:57:27 +08:00
Vincent Wei 77bb2f4433 New API: StretchBltEx; tune API description 2021-05-04 15:56:34 +08:00
Vincent Wei 75077509d6 tune 2021-05-04 10:33:02 +08:00
Vincent Wei 9ebf59e4ad pass correct src_x and src_y for pixman_image_composite32 2021-05-04 10:28:05 +08:00
Vincent Wei 20a50bc094 donot use clipping region for lower blitting 2021-05-04 10:27:02 +08:00
Vincent Wei 180bd4480f reset last_ticks 2021-05-04 10:26:34 +08:00
Vincent Wei 947ce61805 use clip region in GAL_PixmanBlit 2021-05-03 23:55:10 +08:00
Vincent Wei 270648fc73 use GAL_UpperBlit instead of GAL_BlitSurface 2021-05-03 23:54:22 +08:00
Vincent Wei 4ebd23bf56 use MSG_TIMEOUT instead of MSG_TIMER for desktop 2021-05-03 21:26:42 +08:00
Vincent Wei 0ea195a7a2 fix bug for pixman_image_composite32 2021-05-03 20:37:43 +08:00
Vincent Wei 5978175ef8 handle zero width/height for BitBlt and StretchBlt 2021-05-03 19:31:46 +08:00
Vincent Wei f8e144d1f2 tune 2021-05-03 19:17:44 +08:00
Vincent Wei 8c92b16d04 treat coordinates for BitBlt and StretchBlt as logical ones 2021-05-03 19:17:18 +08:00
Vincent Wei a9129c5772 set ct_arg to be 0 for CT_ALPHAPIXEL 2021-05-03 19:16:43 +08:00
Vincent Wei 72551be6b0 tune API description 2021-05-03 19:15:59 +08:00
Vincent Wei 7d4cf8a47d return void for GAL_SoftFillRect 2021-05-03 18:29:06 +08:00
Vincent Wei b967f2f18f ignore format with palette in translate_gal_format 2021-05-03 18:27:53 +08:00
Vincent Wei af3ff13513 fix bug when zoom in the source bits in PixmanStretchBlt 2021-04-30 18:57:51 +08:00
Vincent Wei d543f17606 use pixman to implement GAL_FillBox 2021-04-30 18:03:14 +08:00
Vincent Wei e3e79aaf86 optimize transite_to_layer: skip the next frame if it is too slow in each loop 2021-04-30 17:13:58 +08:00
Vincent Wei 44bb22925f fix another bug in GAL_StretchBltLegacy 2021-04-30 17:01:15 +08:00
Vincent Wei e88a3cd3d8 fix bugs of stretchblt 2021-04-30 16:55:51 +08:00
Vincent Wei 1340a8b81e fix a minor bug 2021-04-29 16:40:16 +08:00
Vincent Wei d07e797f92 use pixman to implement BitBlt and StretchBlt 2021-04-29 16:29:37 +08:00
Vincent Wei cdf4ca3612 fix wrong implementation of search_win_tree_bfs 2021-04-25 14:52:49 +08:00
Vincent Wei ac50ae71c4 fix a minor bug 2021-04-24 12:38:02 +08:00
Vincent Wei 88ec285dc5 implement StrecthBltHW and cleanup 2021-04-24 12:36:13 +08:00
Vincent Wei d5f637f206 set background mode to BM_OPAQUE before calling StretchBlt 2021-04-24 12:35:53 +08:00
Vincent Wei f35c63482f Declare TEST API: StrecthBltHW 2021-04-24 12:35:08 +08:00
Vincent Wei 940060c724 fix a bug of PCXVFB: do not enable SyncUpdate method for clients under compositing schema 2021-04-23 15:51:58 +08:00
Vincent Wei 2466167c93 fix bugs in StrechBlt 2021-04-23 15:29:48 +08:00
Vincent Wei 8e556e6ce1 call SetBkMode to restore the BkMode of HDC_SCREEN_SYS to opaque 2021-04-23 15:29:13 +08:00
Vincent Wei 9c44c1eccb tune 2021-04-20 18:17:57 +08:00
Vincent Wei 70aa7516fc update version to 5.0.6 2021-04-20 14:27:30 +08:00
Vincent Wei fcdeea30d9 update version to 5.0.6 2021-04-20 14:26:04 +08:00
Vincent Wei b4fb53b3c3 link to @DEP_LIBS@ 2021-04-20 11:38:04 +08:00
Vincent Wei 4e752a6f8b fix two bugs in fallback compositor 2021-04-15 12:26:23 +08:00
Vincent Wei a2183ed53a add FCM_SCALE to the fallback compositor 2021-04-15 10:04:46 +08:00
Vincent Wei 182f195a57 force to link -ldl for Linux 2021-04-07 15:47:49 +08:00
Vincent Wei a0214a2956 update release notes for version 5.0.6 2021-04-01 16:37:14 +08:00
Vincent Wei 51da6b7204 tune MAX_NR_LAYERS, DEF_NR_TOPMOSTS, and DEF_NR_NORMALS for procs 2021-04-01 15:46:49 +08:00
Vincent Wei 285a8e1101 Implement SetMainWindowGestureFlags and MSG_SETGESTUREFLAGS 2021-04-01 15:42:58 +08:00
Vincent Wei de315cf780 cleanup 2021-03-31 09:05:40 +08:00
Vincent Wei 7642ead8ce release notes for 5.0.6 2021-03-28 21:16:56 +08:00
Vincent Wei 666fba74cd optimize __mg_get_nr_idle_slots 2021-03-28 21:13:05 +08:00
Vincent Wei 4d1077b759 optimize __mg_lookfor_unused_slot 2021-03-28 20:54:56 +08:00
Vincent Wei 561b4c3ffc expose the struct of BLOCKHEAP 2021-03-28 20:54:14 +08:00
Vincent Wei f970fd377e call mg_TerminateCompositor in TerminateGUI 2021-03-28 19:37:53 +08:00
Vincent Wei 383d70b446 call mg_TerminateCompositor in TerminateGUI 2021-03-28 19:37:38 +08:00
Vincent Wei 82edb53d22 include blockheap.h 2021-03-28 19:37:08 +08:00
Vincent Wei bf127a3f4d Fix memory leaks 2021-03-28 19:36:50 +08:00
Vincent Wei c089adf2b7 Optimized the implementation of BlockHeap 2021-03-28 19:36:05 +08:00
Vincent Wei 6a5c9ba048 allocate more free cliprects for the server 2021-03-28 16:52:12 +08:00
Vincent Wei c9c55c74bf call SetRectEmpty on the dirty rect at the end of SyncUpdate 2021-03-28 16:51:23 +08:00
Vincent Wei 5f854d75c7 tune constants 2021-03-28 16:50:45 +08:00
Vincent Wei 3a3d77042a tune 2021-03-27 11:06:37 +08:00
Vincent Wei 49e714431a enhance composite_layers to support null layers 2021-03-27 11:04:44 +08:00
Vincent Wei f64680082c implement new API: ServerGetCurrentCompositor 2021-03-27 11:03:12 +08:00
Vincent Wei f3c1ea0bc4 always regenerate window region for visible window znode 2021-03-26 11:11:44 +08:00
Vincent Wei 31a2d3c185 fix a bug in ServerGetWinZNodeRegion 2021-03-26 11:01:41 +08:00
Vincent Wei 1621cb7bf5 cleanup 2021-03-26 11:01:23 +08:00
Vincent Wei 89fcfe3979 tune implementation of Tooltip Window 2021-03-26 11:01:06 +08:00
Vincent Wei 5dd702017f use malloc/free instead of mg_slice_alloc0/mg_slice_free; cleanup 2021-03-25 16:57:41 +08:00
Vincent Wei 0f1b251c91 adjust SIZE_CLIPRECTHEAP and SIZE_INVRECTHEAP 2021-03-25 16:57:07 +08:00
Vincent Wei 1fab00bf85 tune BLOCKHEAP structure 2021-03-25 16:56:43 +08:00
Vincent Wei c8fcbd1864 cleanup 2021-03-25 15:46:55 +08:00
Vincent Wei 7802d000fe fix bug in __mg_remove_all_znodes_of_client 2021-03-25 15:45:39 +08:00
Vincent Wei 9978a89991 tune code for potential memory leaks 2021-03-25 15:45:07 +08:00
Vincent Wei 87637f68dd optimize 2021-03-25 14:13:28 +08:00
Vincent Wei 727f4ad5c5 initial implementation of composite_layers 2021-03-25 12:02:00 +08:00
Vincent Wei 30f1488c5c use IS_TYPE_SPECIAL 2021-03-25 12:00:44 +08:00
Vincent Wei 28b04af4f5 add ZOF_IF_SPECIAL; add description for COMBPARAMS_FALLBACK 2021-03-25 12:00:19 +08:00
Vincent Wei 62cb29a435 a simple implementation of transite_to_layer and a blank implementation of composite_layers 2021-03-24 21:59:29 +08:00
Vincent Wei 86d6e12f9e tune operations of CompositorOps 2021-03-24 21:57:52 +08:00
Vincent Wei 30147e9e01 call __mg_sync_special_nodes for new layer 2021-03-24 19:22:05 +08:00
Vincent Wei a966689e88 pass zorder_info to dskSetActiveZOrderNode 2021-03-24 19:21:45 +08:00
Vincent Wei 42e1d5db2c pass zorder_info to dskSetActiveZOrderNode 2021-03-24 19:20:55 +08:00
Vincent Wei 877ed4c382 add old_active and next_active in ZORDERINFO; declare __mg_sync_special_nodes 2021-03-24 19:20:32 +08:00
Vincent Wei 5ccb57c19d fix deadlock buf in sync_special_nodes 2021-03-24 15:20:50 +08:00
Vincent Wei 80d03b2f6f fix bugs in __mg_do_change_topmost_layer 2021-03-24 15:20:23 +08:00
Vincent Wei b31d3860e6 change prototype of __mg_do_change_topmost_layer: change mgTopmostLayer in __mg_do_change_topmost_layer function 2021-03-24 15:19:05 +08:00
Vincent Wei 697177266b fix compilation errors 2021-03-24 12:28:23 +08:00
Vincent Wei 48b84e3100 enhance move_to_layer to handle failure of __mg_move_client_to_layer 2021-03-24 11:35:34 +08:00
Vincent Wei 27122b421d use mgDefaultLayer instead of mg_def_layer 2021-03-24 11:34:46 +08:00
Vincent Wei a305dd85da use sync_special_znodes when allocating or freeing a special znode 2021-03-24 11:34:06 +08:00
Vincent Wei 7bc4ae81dc use sync_special_znodes when change the topmost layer and remove a client 2021-03-24 11:33:30 +08:00
Vincent Wei 8675244823 tune macros: IS_TYPE_GENERAL and IS_TYPE_SPECIAL 2021-03-24 11:32:33 +08:00
Vincent Wei af7df5bcea change prototype of __mg_move_client_to_layer 2021-03-24 11:32:09 +08:00
Vincent Wei 0ceee74091 One client can be moved to another layer only if it has not any window 2021-03-24 11:31:38 +08:00
Vincent Wei 0b023c27de tune description of special znode levels 2021-03-24 11:30:18 +08:00
Vincent Wei e1ea9b7209 declare a new global variable: mgDefaultLayer; tune description of MoveToLayer and ServerMoveToLayer 2021-03-24 11:29:37 +08:00
Vincent Wei 9fa7401542 use mg_def_layer for the first layer 2021-03-23 21:03:38 +08:00
Vincent Wei df65816504 reset usage bitmp when removing special znodes 2021-03-23 21:03:02 +08:00
Vincent Wei 62bcaebe14 tune DEF_NR_TOOLTIPS and DEF_NR_MASKRECTS 2021-03-23 19:08:51 +08:00
Vincent Wei d88d508180 add def_zi_shmid in JOINEDCLIENTINFO 2021-03-23 19:08:25 +08:00
Vincent Wei 0178f28f66 init __mg_def_zorder_info; change the z-index of windows in __mg_client_on_layer_changed 2021-03-23 19:07:58 +08:00
Vincent Wei c226242d6d tune description of WS_EX_WINTYPE_TOOLTIP 2021-03-23 19:06:41 +08:00
Vincent Wei 9a09deee91 Tune ServerSetTopmostLayer 2021-03-23 11:40:34 +08:00
Vincent Wei 2190256165 disable def_paint_desktop for compositing schema; tune call of calc_mainwin_pos 2021-03-23 11:39:49 +08:00
Vincent Wei cdba9dbd17 implement __mg_prepare_layer_for_compositing and __mg_end_up_layer_for_compositing 2021-03-23 11:38:43 +08:00
Vincent Wei df3be3bde0 tune on_showing_win and on_hiding_win; implement on_layer_op for switch layers; tune calc_mainwin_pos for change of interface 2021-03-23 11:38:15 +08:00
Vincent Wei 4e43c9cfee declare __mg_prepare_layer_for_compositing and __mg_end_up_layer_for_compositing 2021-03-23 11:37:04 +08:00
Vincent Wei a2d733392f add client identifier argument for calc_mainwin_pos; add new methods: composite_with_layer and transit_to_layer 2021-03-23 11:36:39 +08:00
Vincent Wei 7a5ad30a92 change version to 5.0.6 2021-03-23 11:34:36 +08:00
189 changed files with 10856 additions and 7714 deletions
+1
View File
@@ -29,3 +29,4 @@ Makefile.in
/src/font/utils/ucd/ /src/font/utils/ucd/
/src/sysres/font_list /src/sysres/font_list
/src/sysres/license/dat_files/ /src/sysres/license/dat_files/
/configure~
+174 -78
View File
File diff suppressed because it is too large Load Diff
+174 -78
View File
File diff suppressed because it is too large Load Diff
+174 -78
View File
File diff suppressed because it is too large Load Diff
+130 -98
View File
@@ -1,14 +1,14 @@
# MiniGUI # MiniGUI
A mature and proven cross-platform windowing system for embedded system and smart IoT devices. A modern and proven cross-platform window system for embedded systems or smart IoT devices.
## TABLE OF CONTENTS _TABLE OF CONTENTS_
- [TABLE OF CONTENTS](#table-of-contents)
- [INTRODUCTION](#introduction) - [INTRODUCTION](#introduction)
+ [What's MiniGUI](#whats-minigui) + [What's MiniGUI](#whats-minigui)
+ [MiniGUI Components](#minigui-components) + [HVML App Framework on MiniGUI](#hvml-app-framework-on-minigui)
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
+ [MiniGUI and HybridOS](#minigui-and-hybridos) + [MiniGUI and HybridOS](#minigui-and-hybridos)
+ [Source Code Repositories](#source-code-repositories) + [Source Code Repositories](#source-code-repositories)
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x) - [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
@@ -23,6 +23,9 @@ A mature and proven cross-platform windowing system for embedded system and smar
+ [Building Whole MiniGUI](#building-whole-minigui) + [Building Whole MiniGUI](#building-whole-minigui)
+ [Building MiniGUI Core](#building-minigui-core) + [Building MiniGUI Core](#building-minigui-core)
+ [Unit Tests](#unit-tests) + [Unit Tests](#unit-tests)
- [Othere Resources](#othere-resources)
+ [MiniGUI Components](#minigui-components)
+ [Open Source Apps Based-on MiniGUI](#open-source-apps-based-on-minigui)
- [HISTORY](#history) - [HISTORY](#history)
- [AUTHORS AND COPYING](#authors-and-copying) - [AUTHORS AND COPYING](#authors-and-copying)
+ [Special Statement](#special-statement) + [Special Statement](#special-statement)
@@ -34,86 +37,45 @@ A mature and proven cross-platform windowing system for embedded system and smar
### What's MiniGUI ### What's MiniGUI
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics MiniGUI aims to provide a fast, stable, full-featured, and cross-platform windowing and GUI support system,
User Interface) support system for embedded systems and smart IoT devices. which is especially fit for embedded systems or smart IoT devices based-on Linux/uClinux, eCos,
This is the version 5.0.x of MiniGUI maintained by WEI Yongming. and other traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II, OSE, and others.
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial This is the source tree of MiniGUI Core, which provides the windowing and graphics interfaces as well as a lot of standard controls (toolkit).
use.
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform MiniGUI is released under GPLv3 and the dual-licensing applies to commercial use.
windowing and GUI support system, which is especially fit for In December 1998, the initiator of FMSoft, [Vincent Wei], began to develop MiniGUI under the GNU General Public License (GPL).
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other In September 2002, the core developers of MiniGUI founded [FMSoft] and started the commercial marketing with the free software.
traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX, By now, FMSoft still continues to release MiniGUI as a free software project.
Nucleus, pSOS, uC/OS-II, OSE, and others.
This is the source tree of MiniGUI Core, which provides the windowing For the live demos, source tarballs, and cases of MiniGUI, you can refer to the following website:
and graphics interfaces as well as a lot of standard controls (toolkit).
### MiniGUI Components
Besides MiniGUI Core, FMSoft also provides some components
for the developers to develop app much easier:
* mGUtils: A MiniGUI component which contains miscellaneous utilities
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
* mGPlus: A MiniGUI component which provides support for advanced graphics
functions like path, gradient, anti-aliased stretch, and color combination.
* mGEff: mGEff provides an animation framework for MiniGUI app.
It also provides some popular UI/UE special effects.
* mGNCS: This component provides a new control set for MiniGUI app.
* mGNCS4Touch: This component provides some new controls, which are
compliant to the new control API spec of mGNCS, for devices with
touch screens.
There are also some legacy MiniGUI components. But we will not maintain these
components since MiniGUI v3.2.0:
* mGi: An input method component for MiniGUI. This component provides
some typical input methods (such as soft keyboard, hand-writing, and predict
text input for mobile phone) for MiniGUI apps.
* mGp: A printing component for MiniGUI. By using mGp, you can print
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
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
License (GPL). In September 2002, the core developers of
MiniGUI founded FMSoft and started the commercial marketing with
the free software. By now, FMSoft still continues to release MiniGUI
as a free software project.
You can download the source code tarball of MiniGUI and the dependent libraries
from the download zone of the site:
<http://www.minigui.com> <http://www.minigui.com>
### Open Source Apps Based-on MiniGUI ### HVML App Framework on MiniGUI
FMSoft also releases some open source apps for MiniGUI on the site above, MiniGUI and its components provide a lot of controls/widgets to help your develop GUI apps in C/C++ programming language.
for examples: However, alternatively, you can use the following software to develop your apps in an easy-to-use programming language [HVML].
* `mDolphin`, licensed under Apache 2.0, is a full-featured * [HVML] is a descriptive programming language proposed and designed by [Vincent Wei].
WEB/WAP browser, which is developed based on the open source browser * [PurC] is the prime interpreter of HVML written in C lauguage.
core WebKit and uses MiniGUI as its underlying graphics support system. * [xGUI Pro] is a full-featured HVML renderer based on the tailored WebKit engine.
* `mGallery`, licensed under Apache 2.0, intends to
provide a total solution for PMP (Portable Multimedia Player), In short, the above software suite provides an Electron-like solution that can help people develop cross-platform applications using web front-end technology.
which uses MiniGUI as the graphics platform. The difference is that the solution replaces JavaScript with HVML and Node.JS with PurC.
* `mSpider`, licensed under GPL 3.0, intends to provide a It provides an entirely new application framework that isolates the interpreter and renderer from running in separate processes, which brings several benefits.
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript) It greatly reduces the size and resource consumption of the entire solution, improves the overall performance, promotes the interactive responsiveness,
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform and provides a simpler mechanism to integrate existing C/C++ code modules.
which addresses the needs of map browse, query, analysis, etc
### MiniGUI and HybridOS ### MiniGUI and HybridOS
[HybridOS](https://github.com/FMSoftCN/hybridos) is another large open source project [HybridOS] is another large open source project initiated by FMSoft.
initiated by FMSoft. It is a totally new open source operating system designed for It is an open source operating system designed for embedded/AIoT devices and cloud computing environment.
embedded and smart IoT devices and cloud computing environment.
In practice, MiniGUI and the software which are used to integrated with GPU HybridOS provides the complete software stack and the app framework based on [HVML] for embedded systems.
constitute the graphics stack of HybridOS. You can easily develop your products which has rich functions and excellent expressiveness by using HybridOS.
In practice, MiniGUI and the software which are used to integrated with GPU constitute the graphics stack of HybridOS.
HybridOS uses MiniGUI as the underlying windowing system, and the members of HybridOS uses MiniGUI as the underlying windowing system, and the members of
HybridOS project are now maintaining the whole graphics stack. HybridOS project are now maintaining the whole graphics stack.
@@ -121,15 +83,15 @@ The following chart shows the graphics stack of HybridOS:
``` ```
----------------------------------------------- -----------------------------------------------
| MiniGUI/HybridOS Apps | | MiniGUI/HVML Apps |
|-----------------------------------------------| |-----------------------------------------------|
| | (Graphics Stack) | | | (Graphics Stack) |
| | ---------------------| | | --------------------|
| | | hiMesa | | | | Mesa-HBD |
| | hiCairo | ------------------| | | Cairo-HBD | ------------------|
| | MiniGUI | | EGL for MiniGUI | | | MiniGUI | | EGL for MiniGUI |
| C++ libs | hiDRMDrivers | | GL, GLES, VG | | C++ libs | HBDDRMDrivers | | GL, GLES, VG |
| C libs | libDRM | | GPU drivers | | C libs | libDRM | | GPU drivers |
|-----------------------------------------------| |-----------------------------------------------|
| Linux Kernel | | Linux Kernel |
| -----------------------------------| | -----------------------------------|
@@ -137,14 +99,13 @@ The following chart shows the graphics stack of HybridOS:
----------------------------------------------- -----------------------------------------------
``` ```
As shown in the chart above, the HybridOS graphics stack consists of As shown in the chart above, the HybridOS graphics stack consists of the following software:
the following software:
- `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure. - `libDRM` provides some user land APIs for Linux Direct Rendering Infrastructure.
- `hiDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for - `HBDDRMDrivers` contains the drivers (user land drivers, not kernel drivers) for
MiniGUI DRM engine. The drivers implement the basic hardware accelerated MiniGUI DRM engine. The drivers implement the basic hardware accelerated
2D graphics operations of various GPUs for MiniGUI. 2D graphics operations of various GPUs for MiniGUI.
- `hiMesa` is the Mesa derivative for HybridOS, while Mesa is the open source - `Mesa-HBD` is the Mesa derivative for HybridOS, while Mesa is the open source
implementation of OpenGL and other graphics APIs, including OpenGL ES implementation of OpenGL and other graphics APIs, including OpenGL ES
(versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following (versions 1, 2, 3), OpenCL, OpenMAX, and Vulkan. It contains the following
components: components:
@@ -152,13 +113,17 @@ the following software:
graphics APIs. graphics APIs.
+ The EGL implementation for MiniGUI platform. + The EGL implementation for MiniGUI platform.
+ The graphics drivers for various GPUs and a software driver called `swrast`. + The graphics drivers for various GPUs and a software driver called `swrast`.
- `hiCairo` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics - `Cairo-HBD` is the Cairo derivative for HybridOS. Cairo is a 2D vector graphics
library for Gtk. We provide support for MiniGUI backend in `hiCairo`. library for Gtk. We provide support for MiniGUI backend in `hiCairo`.
For more information about HybridOS, please refer to: For more information about HybridOS, please refer to:
<https://hybridos.fmsoft.cn/> <https://hybridos.fmsoft.cn/>
For more information about HVML, please refer to:
<https://hvml.fmsoft.cn/> or <https://www.hvml.org>
### Source Code Repositories ### Source Code Repositories
FMSoft had created the public repositories for MiniGUI Core, MiniGUI FMSoft had created the public repositories for MiniGUI Core, MiniGUI
@@ -167,17 +132,18 @@ them on:
<https://github.com/VincentWei> <https://github.com/VincentWei>
and
<https://github.com/FMSoftCN>
We now maintain all documents about MiniGUI on the following public repo: We now maintain all documents about MiniGUI on the following public repo:
<https://github.com/VincentWei/minigui-docs> <https://github.com/VincentWei/minigui-docs>
You can download the source code tarballs of MiniGUI Core, MiniGUI
components, and the dependent libraries from the download zone of the site:
<http://www.minigui.com/download>
## NEW FEATURES IN VERSION 5.0.x ## NEW FEATURES IN VERSION 5.0.x
In version 5.0.0, we introduced some new and exciting features, and refactored In version 5.0.0, we introduced some exciting new features, and refactored
a lot basic modules of MiniGUI Core. a lot basic modules of MiniGUI Core.
### Compositing Schema ### Compositing Schema
@@ -392,15 +358,16 @@ and MiniGUI components, please fetch one of the following repositories
from GitHub and follow the instructions to build MiniGUI Core, from GitHub and follow the instructions to build MiniGUI Core,
MiniGUI components, the samples, and the demonstration programs: MiniGUI components, the samples, and the demonstration programs:
<https://github.com/VincentWei/build-minigui-5.0> [Build MiniGUI 5.0](https://github.com/VincentWei/build-minigui-5.0)
or or
<https://github.com/VincentWei/build-minigui-4.0> [Build MiniGUI 4.0](https://github.com/VincentWei/build-minigui-4.0)
or or
<https://github.com/VincentWei/build-minigui-3.2> [Build MiniGUI 3.2](https://github.com/VincentWei/build-minigui-3.2)
### Building MiniGUI Core ### Building MiniGUI Core
@@ -445,6 +412,52 @@ following repository:
If you are interested in hacking the MiniGUI code, please visit this repository. If you are interested in hacking the MiniGUI code, please visit this repository.
## Othere Resources
### MiniGUI Components
Besides MiniGUI Core, FMSoft also provides some components
for the developers to develop app much easier:
* mGUtils: A MiniGUI component which contains miscellaneous utilities
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
* mGPlus: A MiniGUI component which provides support for advanced graphics
functions like path, gradient, anti-aliased stretch, and color combination.
* mGEff: mGEff provides an animation framework for MiniGUI app.
It also provides some popular UI/UE special effects.
* mGNCS: This component provides a new control set for MiniGUI app.
* mGNCS4Touch: This component provides some new controls, which are
compliant to the new control API spec of mGNCS, for devices with
touch screens.
There are also some legacy MiniGUI components. But we will not maintain these
components since MiniGUI v3.2.0:
* mGi: An input method component for MiniGUI. This component provides
some typical input methods (such as soft keyboard, hand-writing, and predict
text input for mobile phone) for MiniGUI apps.
* mGp: A printing component for MiniGUI. By using mGp, you can print
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.
### Open Source Apps Based-on MiniGUI
FMSoft also releases some open source apps for MiniGUI on the site above,
for examples:
* `mDolphin`, licensed under Apache 2.0, is a full-featured
WEB/WAP browser, which is developed based on the open source browser
core WebKit and uses MiniGUI as its underlying graphics support system.
* `mGallery`, licensed under Apache 2.0, intends to
provide a total solution for PMP (Portable Multimedia Player),
which uses MiniGUI as the graphics platform.
* `mSpider`, licensed under GPL 3.0, intends to provide a
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
* `mEagle`, licensed under GPL 3.0, is an embedded GIS development platform
which addresses the needs of map browse, query, analysis, etc
## HISTORY ## HISTORY
21 years have pasted since MiniGUI was initially created at 21 years have pasted since MiniGUI was initially created at
@@ -549,15 +562,18 @@ A brief history description of the development progress is listed as follow:
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2. 1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0. 1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
1. Mar., 2020: FMSoft released MiniGUI version 5.0.0. 1. Mar., 2020: FMSoft released MiniGUI version 5.0.0.
1. May., 2021: FMSoft released MiniGUI version 5.0.6.
1. Jan., 2022: FMSoft released MiniGUI version 5.0.9.
1. Sep., 2022: FMSoft released MiniGUI version 5.0.10.
1. Aug., 2023: FMSoft released MiniGUI version 5.0.13.
## AUTHORS AND COPYING ## AUTHORS AND COPYING
The original author of MiniGUI is WEI Yongming, and now MiniGUI is The original author of MiniGUI is Vincent Wei, and now MiniGUI is maintained by FMSoft.
maintained by FMSoft. For more information, please refer to For more information, please refer to <http://www.fmsoft.cn>.
<http://www.fmsoft.cn>.
Copyright (C) 2002 ~ 2020, Beijing FMSoft Technologies Co., Ltd. Copyright (C) 2002 ~ 2023, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998 ~ 2002, WEI Yongming Copyright (C) 1998 ~ 2002, Vincent Wei
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@@ -629,3 +645,19 @@ Q: Can I get the tech support from MiniGUI team?
A: Yes, FMSoft can provide you with guaranteed commercial technical A: Yes, FMSoft can provide you with guaranteed commercial technical
support services. Please send messages to <sales@minigui.com>. support services. Please send messages to <sales@minigui.com>.
[Beijing FMSoft Technologies Co., Ltd.]: https://www.fmsoft.cn
[FMSoft Technologies]: https://www.fmsoft.cn
[FMSoft]: https://www.fmsoft.cn
[HybridOS Official Site]: https://hybridos.fmsoft.cn
[MiniGUI Official Site]: https://minigui.fmsoft.cn
[HVML Official Site]: https://hvml.fmsoft.cn
[Vincent Wei]: https://github.com/VincentWei
[MiniGUI]: https://github.com/VincentWei
[HybridOS]: https://github.com/HybridOS2
[HVML]: https://github.com/HVML
[PurC]: https://github.com/HVML/PurC
[xGUI Pro]: https://github.com/HVML/xGUI-Pro
[WebKit]: https://webkit.org
+184
View File
@@ -1,5 +1,21 @@
# Release Notes # Release Notes
- [Version 5.2.0](#version-520)
+ [What's new in version 5.2.0](#whats-new-in-version-520)
- [Version 5.0.13](#version-5013)
+ [What's new in version 5.0.13](#whats-new-in-version-5013)
- [Version 5.0.12](#version-5012)
+ [What's new in version 5.0.12](#whats-new-in-version-5012)
- [Version 5.0.11](#version-5011)
+ [What's new in version 5.0.11](#whats-new-in-version-5011)
- [Version 5.0.10](#version-5010)
+ [What's new in version 5.0.10](#whats-new-in-version-5010)
- [Version 5.0.9](#version-508)
+ [What's new in version 5.0.9](#whats-new-in-version-508)
- [Version 5.0.8](#version-508)
+ [What's new in version 5.0.8](#whats-new-in-version-508)
- [Version 5.0.6](#version-506)
+ [What's new in version 5.0.6](#whats-new-in-version-506)
- [Version 5.0.5](#version-505) - [Version 5.0.5](#version-505)
+ [What's new in version 5.0.5](#whats-new-in-version-505) + [What's new in version 5.0.5](#whats-new-in-version-505)
- [Version 5.0.4](#version-504) - [Version 5.0.4](#version-504)
@@ -18,6 +34,174 @@
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility) + [Changes leading to incompatibility](#changes-leading-to-incompatibility)
+ [Deprecated APIs](#deprecated-apis) + [Deprecated APIs](#deprecated-apis)
## Version 5.2.0
On Nov. 30, 2023, FMSoft announces the availability of MiniGUI 5.2.0,
which is an mainline release with some major enhancements:
* ENHANCEMENTS:
- Optimize NEWGAL engines: `shadow`, `drm`, and `fbcon` for large resolution.
- New APIs: `GetWindowSharedSurfaceFD()` and `CreateMemDCFromSharedSurfaceFD()` for compositing schema.
* CHANGES:
- The operations for DRM userland driver changed.
## Version 5.0.13
On Aug. 31, 2023, FMSoft announces the availability of MiniGUI 5.0.13,
which is an enhancement release with some minor enhancements
of MiniGUI 5.0.x.
### What's new in version 5.0.13
In this version, we made some enhancements:
* ENHANCEMENTS:
- Disable BIDI for text in UTF-8 charset by default.
* CHANGES:
- Add `BIDI_FLAG_NONE` and `BIDI_FLAG_LEGACY`.
* BUGFIXING:
- Ignore C0CTRL characters when renerding text.
- Support for vowels.
## Version 5.0.12
On May 10, 2023, FMSoft announces the availability of MiniGUI 5.0.12,
which is an enhancement release with some minor enhancements
of MiniGUI 5.0.x.
### What's new in version 5.0.12
In this version, we made some enhancements:
* ENHANCEMENTS:
- Add new API `GetACharsExtentPointEx()`.
- Add new APIs `GetTabbedACharsExtent()`, `GetTabbedACharsExtentPoint()`,
and `GetTabbedACharsExtentPointEx()`.
- Enhance two APIs `GetTextExtentPoint()` and `GetTabbedTextExtentPoint()`
to support BIDI charsets.
- Tune management of tick count.
* BUGFIXING:
- Fix a typo: `Achar2UChar()` to `AChar2UChar()`.
## Version 5.0.11
On Dec. 31, 2022, FMSoft announces the availability of MiniGUI 5.0.11,
which is a bug fixing release with bug fixes and some minor enhancements
of MiniGUI 5.0.x.
### What's new in version 5.0.11
In this version, we made some enhancements
* ENHANCEMENTS:
* BUGFIXING:
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/94
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/96
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/105
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/106
* OPTIMIZATIONS:
- Optimize the refresh of scrolled.
* TUNING:
- Call `mg_FreeMsgQueueForThisThread` immediately in `TerminateGUI()`.
- Use `CreateLogFontEx` instead of `CreateLogFont` to follow the new style convention of font name when creating the system logfonts,
but the orientation is ignored for the system logfont.
## Version 5.0.10
On Sep. 30, 2022, FMSoft announces the availability of MiniGUI 5.0.10,
which is a bug fixing release with bug fixes and some minor enhancements
of MiniGUI 5.0.x.
### What's new in version 5.0.10
In this version, we made some enhancements
* ENHANCEMENTS:
- Enhance `fbcon` engine to support double buffering for Threads and Standalone mode. (Runtime option: `fbcon.double_buffering`).
- Cleanup and enhance `shadow` engine to use `SyncUpdate` method.
- Relaying `MSG_IDLE` messages to the active descendant controls in every 0.5s.
* BUGFIXING:
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/83
- Fix a bug reported in https://github.com/VincentWei/minigui/issues/87
- Fix bugs reported in https://github.com/VincentWei/minigui/issues/89
- Fix some bugs when virtual window enabled under Standalone and Processes runtime modes.
* OPTIMIZATIONS:
* TUNING:
- Fix some warnings reported by GCC 12.
- Use inline functions for SetCursor and SetDefaultCursor instead of macros.
## Version 5.0.9
On Jan. 14, 2022, FMSoft announces the availability of MiniGUI 5.0.9,
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
### What's new in version 5.0.9
In this version, we fixed some bugs:
* BUGFIXING:
- Fix a crash bug in `InitSubDC()` of `src/newgdi/gdi.c`.
* ENHANCEMENTS:
* OPTIMIZATIONS:
* TUNING:
- Change copyright year to 2022.
## Version 5.0.8
The MiniGUI development team announces the availability of MiniGUI 5.0.8,
which is a bug fixing release with minor enhancements of MiniGUI 5.0.x.
### What's new in version 5.0.8
In this version, we fixed some bugs and made some optimizations and enhancements:
* BUGFIXING:
* ENHANCEMENTS:
- Support for WebP image format based on `libwebp`.
- Support for two ARM64-based hardware platforms: PX30 and R818.
- New surface pixel format for main window: `ST_PIXEL_XRGB565` under compositing schema.
* OPTIMIZATIONS:
- Shrink heap size for fixed string.
- Optimize the memory use of blitting context.
* TUNING:
- Tune code of fbcon video engine for compositing schema.
- Fix warnings and errors for conditional compilation.
## Version 5.0.6
The MiniGUI development team announces the availability of MiniGUI 5.0.6,
which is the bug fixing release of MiniGUI 5.0.x.
### What's new in version 5.0.6
In this version, we fixed some bugs and made some optimizations and enhancements:
* BUGFIXING:
- Fix bugs of switching layers under MiniGUI-Processes.
- Fix bugs of `FBCon` and `PC_XVFB` engines: the dirty rectangles are
not set empty after calling `SyncUpdate`.
- Fix memory leaks when using block heap.
- Fix a bug in ServerGetWinZNodeRegion.
* ENHANCEMENTS:
- Enhance `GetGlyphInfo` to return the FreeType face, font file path, and glyph
index.
- NEW API `StretchBltEx` to support different scaling filters and rotation.
- Use Pixman to support color blending methods for `BitBlt` and `StretchBlt`.
- Enhance fallback compositor to support animation when switching among layers.
- New API `SetMainWindowGestureFlags` and `MSG_GESTURETEST` message for
gesture test and setting the gesture flags of a specific main window.
- Tune implementation of Tooltip window.
* OPTIMIZATIONS:
- Optimize the fallback compositor for lucent windows.
- Use Pixman to optimize `FillBox`, `BitBlt`, and `StretchBlt`.
- Optimize the management of BLOCKHEAP.
- Optimize the `__mg_lookfor_unused_slot`.
Note that the binary backward-compatibility was broken, two operations added to
`CompositorOps`. You should rebuild all MiniGUI applications.
Also note that the compositing schema is now enabled by default.
## Version 5.0.5 ## Version 5.0.5
The MiniGUI development team announces the availability of MiniGUI 5.0.5, The MiniGUI development team announces the availability of MiniGUI 5.0.5,
+3 -3
View File
@@ -1,11 +1,11 @@
Version 5.0.5 (2021/01/31) Version 5.0.13 (2023/08/31)
This is the first official release of MiniGUI 5.0.x, the stable version. This is a minor enhancement and bugfix release of MiniGUI 5.0.x, the stable version.
Other packages for MiniGUI resource, tools, components, and samples: Other packages for MiniGUI resource, tools, components, and samples:
- GVFB: `gvfb-1.2.5.tar.gz` - GVFB: `gvfb-1.2.5.tar.gz`
- The resource package: `minigui-res-5.0.0.tar.gz` - The resource package: `minigui-res-5.0.6.tar.gz`
- mGUtils component: `libmgutils-1.5.0.tar.gz` - mGUtils component: `libmgutils-1.5.0.tar.gz`
- mGPlus component: `libmgplus-1.5.0.tar.gz` - mGPlus component: `libmgplus-1.5.0.tar.gz`
- mGEff component: `libmgeff-1.5.0.tar.gz` - mGEff component: `libmgeff-1.5.0.tar.gz`
+169 -165
View File
File diff suppressed because it is too large Load Diff
+59 -8
View File
@@ -55,6 +55,36 @@ wallpaper_pattern_size=full
# def_compositor_so= # def_compositor_so=
#}} #}}
#{{ifdef _MGGAL_SHADOW
[shadow]
real_engine=pc_xvfb
defaultmode=800x600-16bpp
# `cw`: rotating screen clock-wise.
# `ccw`: rotating screen counter clock-wise.
# `hflip`: flipping screen horizontally.
# `vflip`: flipping screen vertically.
rotate_screen=ccw
# Whether the async. update is enabled.
# Use `true` or `yes` for enabled, anything else for disabled.
# Since 5.0.13.
async_update=yes
# The synchronization interval for the asyn. updater (milli-seconds).
# This setting is only valid when `async_update` is enabled and
# the real engine does not provide WaitWBlank method.
# Since 5.0.13.
update_interval=15
# The minimal pixels to use the hardware accelerator.
# If the number of pixels to copy is less than this value,
# MiniGUI will use the software copy routine to update the real screen,
# even if the real device provides a hardware accelerator.
# Since 5.0.13.
min_pixels_using_hwaccl=4096
#}}
#{{ifdef _MGGAL_DRM #{{ifdef _MGGAL_DRM
[drm] [drm]
defaultmode=1024x768-32bpp defaultmode=1024x768-32bpp
@@ -78,9 +108,21 @@ dpi=96
# Since 5.0.0. # Since 5.0.0.
double_buffering=true double_buffering=true
# The update interval for the asyn. updater (milli-seconds).
# This setting is only valid when drmWaitVBlank doesn't work correctly.
# Since 5.0.13.
update_interval=15
# The minimal pixels to use the hardware accelerator.
# If the number of pixels to copy is less than this value,
# MiniGUI will use the software copy routine to update the real screen,
# even if the device provides a hardware accelerator.
# Since 5.0.13.
min_pixels_using_hwaccl=4096
# The filename of the shared library for the external driver. # The filename of the shared library for the external driver.
# The equivalent environment variable: MG_GAL_DRM_DRIVER # The equivalent environment variable: MG_GAL_DRM_DRIVER
exdriver=libhidrmdrivers-0.2.so.0 exdriver=libdrmdrivers.so
#}} #}}
#{{ifdef _MGIAL_SINGLETOUCHKEY #{{ifdef _MGIAL_SINGLETOUCHKEY
@@ -105,6 +147,22 @@ seat=seat0
[fbcon] [fbcon]
defaultmode=1024x768-16bpp defaultmode=1024x768-16bpp
dpi=96 dpi=96
# Whether double buffering is enabled (only for threads and standalone runmodes).
# Use `true` or `yes` for enabled, anything else for disabled.
# Note that under compositing schema, double buffering is always enabled.
# Since 5.0.10.
double_buffering=true
# Whether the async. update is enabled.
# Use `true` or `yes` for enabled, anything else for disabled.
# Since 5.0.13.
async_update=yes
# The update interval for the asyn. updater (milli-seconds).
# This setting is only valid when drmWaitVBlank doesn't work correctly.
# Since 5.0.13.
update_interval=15
#}} #}}
#{{ifdef _MGGAL_PCXVFB #{{ifdef _MGGAL_PCXVFB
@@ -117,13 +175,6 @@ exec_file=/usr/local/bin/gvfb
[rtos_xvfb] [rtos_xvfb]
defaultmode=800x600-16bpp defaultmode=800x600-16bpp
#{{ifdef _MGGAL_SHADOW
[shadow]
real_engine=pc_xvfb
defaultmode=800x600-16bpp
rotate_screen=normal
#}}
#{{ifdef _MGGAL_MLSHADOW #{{ifdef _MGGAL_MLSHADOW
[mlshadow] [mlshadow]
real_engine=qvfb real_engine=qvfb
+2
View File
@@ -311,6 +311,7 @@ MGUI_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
defined(__amd64) || \ defined(__amd64) || \
(defined(__alpha__) || defined(__alpha)) || \ (defined(__alpha__) || defined(__alpha)) || \
defined(__arm__) || defined(__aarch64__) || \ defined(__arm__) || defined(__aarch64__) || \
defined(__loongarch__) || \
defined(__riscv) || \ defined(__riscv) || \
(defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \ (defined(__CC_ARM) && !defined(__BIG_ENDIAN)) || \
(defined(__mips__) && defined(__MIPSEL__)) || \ (defined(__mips__) && defined(__MIPSEL__)) || \
@@ -2346,6 +2347,7 @@ int init_minigui_printf (int (*output_char) (int ch),
#define _ERR_PRINTF(fmt, ...) \ #define _ERR_PRINTF(fmt, ...) \
do { \ do { \
TCS_RED (stderr); \ TCS_RED (stderr); \
fprintf (stderr, "%s: ", __FUNCTION__); \
fprintf (stderr, fmt, ##__VA_ARGS__); \ fprintf (stderr, fmt, ##__VA_ARGS__); \
TCS_NONE (stderr); \ TCS_NONE (stderr); \
} while (0) } while (0)
-1
View File
@@ -237,7 +237,6 @@ MG_EXPORT void GUIAPI NotifyParentEx (HWND hwnd, LINT id, int code,
NotifyParentEx(hwnd, id, code, 0) NotifyParentEx(hwnd, id, code, 0)
/** /**
* \var typedef int (*STRCMP) (const char* s1, const char* s2, size_t n)
* \brief Type of general strncmp function. * \brief Type of general strncmp function.
* *
* The function compares the two strings \a s1 and \a s2. It returns * The function compares the two strings \a s1 and \a s2. It returns
-1
View File
@@ -698,7 +698,6 @@ extern "C" {
#define EM_SETREADONLY 0xF0CF #define EM_SETREADONLY 0xF0CF
/** /**
* \var typedef int (*ED_DRAWSEL_FUNC) (HWND hWnd, HDC hdc, int startx, int starty, const char* content, int len, int selout)
* \brief Type of the edit control callback function on drawing selected strings. * \brief Type of the edit control callback function on drawing selected strings.
* *
* \param hWnd Handle of the edit control. * \param hWnd Handle of the edit control.
+24 -25
View File
@@ -131,7 +131,31 @@
#define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084 #define IAL_EVENT_GESTURE_PINCH_UPDATE 0x0084
#define IAL_EVENT_GESTURE_PINCH_END 0x0085 #define IAL_EVENT_GESTURE_PINCH_END 0x0085
#define TABLET_TOOL_CHANGED_X (1 << 0)
#define TABLET_TOOL_CHANGED_Y (1 << 1)
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
#ifndef TABLET_TOOL_X #ifndef TABLET_TOOL_X
#define TABLET_TOOL_X 0
#define TABLET_TOOL_Y 1
#define TABLET_TOOL_PRESSURE 2
#define TABLET_TOOL_DISTANCE 3
#define TABLET_TOOL_TILT_X 4
#define TABLET_TOOL_TILT_Y 5
#define TABLET_TOOL_ROTATION 6
#define TABLET_TOOL_SLIDER 7
#define TABLET_TOOL_SIZE_MAJOR 8
#define TABLET_TOOL_SIZE_MINOR 9
#define TABLET_TOOL_WHEEL 10
#define TABLET_TOOL_PROXIMITY_STATE_INVALID 0 #define TABLET_TOOL_PROXIMITY_STATE_INVALID 0
#define TABLET_TOOL_PROXIMITY_STATE_OUT 1 #define TABLET_TOOL_PROXIMITY_STATE_OUT 1
#define TABLET_TOOL_PROXIMITY_STATE_IN 2 #define TABLET_TOOL_PROXIMITY_STATE_IN 2
@@ -149,31 +173,6 @@
#define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0 #define TABLET_PAD_STRIP_SOURCE_UNKNOWN 0
#define TABLET_PAD_STRIP_SOURCE_FINGER 1 #define TABLET_PAD_STRIP_SOURCE_FINGER 1
#define TABLET_TOOL_CHANGED_X (1 << 0)
#define TABLET_TOOL_CHANGED_Y (1 << 1)
#define TABLET_TOOL_CHANGED_PRESSURE (1 << 2)
#define TABLET_TOOL_CHANGED_DISTANCE (1 << 3)
#define TABLET_TOOL_CHANGED_TILT_X (1 << 4)
#define TABLET_TOOL_CHANGED_TILT_Y (1 << 5)
#define TABLET_TOOL_CHANGED_ROTATION (1 << 6)
#define TABLET_TOOL_CHANGED_SLIDER (1 << 7)
#define TABLET_TOOL_CHANGED_SIZE_MAJOR (1 << 8)
#define TABLET_TOOL_CHANGED_SIZE_MINOR (1 << 9)
#define TABLET_TOOL_CHANGED_WHEEL (1 << 10)
#define TABLET_TOOL_X 0
#define TABLET_TOOL_Y 1
#define TABLET_TOOL_PRESSURE 2
#define TABLET_TOOL_DISTANCE 3
#define TABLET_TOOL_TILT_X 4
#define TABLET_TOOL_TILT_Y 5
#define TABLET_TOOL_ROTATION 6
#define TABLET_TOOL_SLIDER 7
#define TABLET_TOOL_SIZE_MAJOR 8
#define TABLET_TOOL_SIZE_MINOR 9
#define TABLET_TOOL_WHEEL 10
#endif #endif
#define IAL_EVENT_TABLET_TOOL_AXIS 0x0090 #define IAL_EVENT_TABLET_TOOL_AXIS 0x0090
+57 -77
View File
@@ -84,6 +84,14 @@ extern "C" {
* @{ * @{
*/ */
/** The current version of DRM driver. */
#define DRM_DRIVER_VERSION 2
#define DRM_SURBUF_TYPE_OFFSCREEN 0x0000
#define DRM_SURBUF_TYPE_SHADOW 0x0001
#define DRM_SURBUF_TYPE_SCANOUT 0x0002
#define DRM_SURBUF_TYPE_MASK 0x000F
/** /**
* The struct type represents the DRI sub driver. * The struct type represents the DRI sub driver.
* The concrete struct should be defined by the driver. * The concrete struct should be defined by the driver.
@@ -129,6 +137,8 @@ typedef struct _DrmSurfaceBuffer {
uint32_t dumb:1; uint32_t dumb:1;
/** Is it a scanout buffer. Since 5.0.0. */ /** Is it a scanout buffer. Since 5.0.0. */
uint32_t scanout:1; uint32_t scanout:1;
/** The buffer is also a dma-buf. Since 5.0.13. */
uint32_t dma_buf:1;
/** The width of the buffer. */ /** The width of the buffer. */
uint32_t width; uint32_t width;
@@ -154,11 +164,23 @@ typedef struct _DrmSurfaceBuffer {
* The address of the pixel data: * The address of the pixel data:
* uint8_t* pixels = this->buff + this->offset; * uint8_t* pixels = this->buff + this->offset;
*/ */
uint8_t* buff; uint8_t* vaddr;
} DrmSurfaceBuffer; } DrmSurfaceBuffer;
typedef struct _DrmBlitOperations {
BlitCopyOperation cpy;
BlitKeyOperation key;
BlitAlphaOperation alf;
ColorBlendMethod bld;
ColorLogicalOp rop;
ScalingFilter scl;
uint32_t key_min, key_max;
uint8_t alpha;
} DrmBlitOperations;
/** /**
* The structure type defines the operations for a DRM driver. * The structure type defines the operations for a userland DRM driver.
*/ */
typedef struct _DrmDriverOps { typedef struct _DrmDriverOps {
/** /**
@@ -176,12 +198,13 @@ typedef struct _DrmDriverOps {
void (*destroy_driver) (DrmDriver *driver); void (*destroy_driver) (DrmDriver *driver);
/** /**
* This operation flushes the batch buffer of the driver or * This operation flushes the batch buffer of the driver and/or
* the hardware cache. * the specified buffer.
* *
* \note This operation can be NULL. * \note This operation can be NULL.
*/ */
void (* flush_driver) (DrmDriver *driver); void (* flush) (DrmDriver *driver, DrmSurfaceBuffer* buff,
const GAL_Rect *dirty_rect);
/** /**
* This operation creates a surface buffer with the specified pixel format, * This operation creates a surface buffer with the specified pixel format,
@@ -194,7 +217,7 @@ typedef struct _DrmDriverOps {
*/ */
DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver, DrmSurfaceBuffer* (* create_buffer) (DrmDriver *driver,
uint32_t drm_format, uint32_t hdr_size, uint32_t drm_format, uint32_t hdr_size,
uint32_t width, uint32_t height); uint32_t width, uint32_t height, unsigned flags);
/** /**
* This operation creates a buffer from a given and possibly foreign handle * This operation creates a buffer from a given and possibly foreign handle
@@ -207,7 +230,9 @@ typedef struct _DrmDriverOps {
* DrmSurfaceBuffer object. * DrmSurfaceBuffer object.
*/ */
DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver, DrmSurfaceBuffer* (* create_buffer_from_handle) (DrmDriver *driver,
uint32_t handle, size_t size); uint32_t handle, size_t size,
uint32_t drm_format, uint32_t hdr_size,
uint32_t width, uint32_t height, uint32_t pitch);
/** /**
* This operation creates a buffer for the given system global name * This operation creates a buffer for the given system global name
@@ -219,7 +244,9 @@ typedef struct _DrmDriverOps {
* DrmSurfaceBuffer object. * DrmSurfaceBuffer object.
*/ */
DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver, DrmSurfaceBuffer* (* create_buffer_from_name) (DrmDriver *driver,
uint32_t name); uint32_t name,
uint32_t drm_format, uint32_t hdr_size,
uint32_t width, uint32_t height, uint32_t pitch);
/** /**
* This operation creates a buffer for the given PRIME file descriptor * This operation creates a buffer for the given PRIME file descriptor
@@ -231,21 +258,19 @@ typedef struct _DrmDriverOps {
* DrmSurfaceBuffer object. * DrmSurfaceBuffer object.
*/ */
DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver, DrmSurfaceBuffer* (* create_buffer_from_prime_fd) (DrmDriver *driver,
int prime_fd, size_t size); int prime_fd, size_t size,
uint32_t drm_format, uint32_t hdr_size,
uint32_t width, uint32_t height, uint32_t pitch);
/** /**
* This operation maps the buffer into the current process's virtual memory * This operation maps the buffer into the current process's virtual memory
* space, and returns the virtual address. If failed, it returns NULL. * space, and returns the virtual address. If failed, it returns NULL.
* *
* When \a for_scanout is not zero, the buffer will be used for scan out
* frame buffer.
*
* \note The driver must implement this operation. The driver must * \note The driver must implement this operation. The driver must
* set a valid value for buff field of the DrmSurfaceBuffer object * set a valid value for buff field of the DrmSurfaceBuffer object
* on success. * on success.
*/ */
uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer, uint8_t* (* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
int for_scanout);
/** /**
* This operation un-maps a buffer. * This operation un-maps a buffer.
@@ -264,96 +289,51 @@ typedef struct _DrmDriverOps {
void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer); void (* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer* buffer);
/** /**
* This operation clears the specific rectangle area of a buffer * This operation fills the specific rectangle area of a buffer
* with the specific pixel value. If succeed, it returns 0. * with the specific pixel value. If succeed, it returns 0.
* *
* \note If this operation is set as NULL, the driver does not support * \note If this operation is set as NULL, the driver does not support
* hardware accelerated clear operation. * hardware accelerated filling operation.
*/ */
int (* clear_buffer) (DrmDriver *driver, int (* fill_rect) (DrmDriver *driver,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value); DrmSurfaceBuffer* dst_buf, const GAL_Rect* rc, uint32_t pixel_value);
/** /**
* This operation checks whether a hardware accelerated blit * This operation checks whether a specified hardware accelerated blit
* can be done between the source buffer and the destination buffer. * can be done between the source buffer and the destination buffer.
* If succeed, it returns 0. * If succeed, it returns zero, otherwise for failure.
* If succeed, it is safe to call do_blit operation.
* *
* \note If this operation is set as NULL, it will be supposed that * \note If this operation is set as NULL, it will be supposed that
* the driver does not support any hardware accelerated blitting operation. * the driver does not support any hardware accelerated blitting operation.
*/ */
int (* check_blit) (DrmDriver *driver, int (* check_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, DrmSurfaceBuffer* dst_buf);
/**
* This operation copies bits from a source buffer to a destination buffer.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated copy blitting.
*
* \note Currently, the logical operation is ignored.
*/
int (* copy_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc, DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
ColorLogicalOp logic_op); const DrmBlitOperations *ops);
/** /**
* This operation blits pixels from a source buffer with the source alpha * This operation does the real blit. It should not be NULL if check_blit
* value specified to a destination buffer. * is not NULL.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blitting with alpha.
*/ */
int (* alpha_blit) (DrmDriver *driver, int (* do_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc,
uint8_t alpha); const DrmBlitOperations *blit_ops);
/** /**
* This operation blits pixels from a source buffer to a destination buffer, * This operation copies the pixels from the source buffer to
* but skipping the pixel value specified by \a color_key. * the destination buffer, with or without scaling, rotation, and flip.
* *
* \note If this operation is set as NULL, the driver does not support * \note If this operation is set as NULL, the driver does not support
* hardware accelerated blitting with color key. * hardware accelerated copy operation between buffers.
*/ */
int (* key_blit) (DrmDriver *driver, int (* copy_buff) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc, DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc, DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
uint32_t color_key); BlitCopyOperation op);
/**
* This operation blits pixels from a source buffer with the source alpha
* value specified to a destination buffer, but skipping the pixel value
* specified.
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blitting with alpha and color key.
*/
int (* alpha_key_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
uint8_t alpha, uint32_t color_key);
/**
* This operation blits pixels from a source buffer with the source alpha
* value of pixels to the destination buffer, and with the specified color
* compositing/blending method (\a ColorBlendMethod).
*
* \note If this operation is set as NULL, the driver does not support
* hardware accelerated blitting with alpha on basis per pixel.
*
* \note Currently, the color compositing/blending method is ignored.
*/
int (* alpha_pixel_blit) (DrmDriver *driver,
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
ColorBlendMethod blend_method);
} DrmDriverOps; } DrmDriverOps;
/** The current version of DRM driver. */
#define DRM_DRIVER_VERSION 1
/** /**
* Implement this stub to return the DRI driver operations * Implement this stub to return the DRI driver operations
* *
+641 -118
View File
File diff suppressed because it is too large Load Diff
+88 -11
View File
@@ -82,10 +82,16 @@ extern "C" {
#define ZOF_MAXIMIZED 0x00000004 // Since 5.0.0 #define ZOF_MAXIMIZED 0x00000004 // Since 5.0.0
#define ZOF_MINIMIZED 0x00000008 // Since 5.0.0 #define ZOF_MINIMIZED 0x00000008 // Since 5.0.0
/* Since 5.0.6 */
#define ZOF_GESTURE_FLAGS_MASK 0X000000F0
#define ZOF_GF_SWIPE_HORZ 0x00000010
#define ZOF_GF_SWIPE_VERT 0x00000020
/* Since 5.0.0 */ /* Since 5.0.0 */
#define ZOF_INTERNAL_FLAGS_MASK 0X000F0000 #define ZOF_INTERNAL_FLAGS_MASK 0X000F0000
#define ZOF_IF_REFERENCE 0x00010000 #define ZOF_IF_REFERENCE 0x00010000
#define ZOF_IF_ALWAYSTOP 0x00020000 #define ZOF_IF_ALWAYSTOP 0x00020000
#define ZOF_IF_SPECIAL 0x00040000 // Since 5.0.6
#define ZOF_TW_FLAG_MASK 0x00F00000 #define ZOF_TW_FLAG_MASK 0x00F00000
#define ZOF_TW_TROUNDCNS 0x00100000 #define ZOF_TW_TROUNDCNS 0x00100000
@@ -351,9 +357,17 @@ extern MG_EXPORT MG_Client* mgClients;
*/ */
extern MG_EXPORT MG_Layer* mgTopmostLayer; extern MG_EXPORT MG_Layer* mgTopmostLayer;
/**
* \var MG_Layer* mgDefaultLayer
* \brief The pointer to the default layer.
*
* \sa MG_Layer
*/
extern MG_EXPORT MG_Layer* mgDefaultLayer;
/** /**
* \var MG_Layer* mgLayers * \var MG_Layer* mgLayers
* \brief The pointer to the array of layers. * \brief The pointer to the layer list.
* *
* \sa MG_Layer * \sa MG_Layer
*/ */
@@ -562,6 +576,8 @@ MG_EXPORT BOOL GUIAPI DeleteLayer (BOOL handle_name,
* *
* \return TRUE on success, otherwise FALSE. * \return TRUE on success, otherwise FALSE.
* *
* \note Only one client which has no any window can be moved.
*
* \note The client which created a fixed main window * \note The client which created a fixed main window
* (a main window acts as the screen lock, the docker, or the launcher) will * (a main window acts as the screen lock, the docker, or the launcher) will
* be moved to the topmost layer automatically. * be moved to the topmost layer automatically.
@@ -1491,7 +1507,9 @@ MG_EXPORT BOOL GUIAPI ServerDoZNodeOperation (MG_Layer* layer, int idx_znode,
* *
* \return TRUE on success, otherwise FALSE. * \return TRUE on success, otherwise FALSE.
* *
* \note Server-only function. The client which created a fixed main window * \note Server-only function. Only one client which has no any window can be moved.
*
* \note The client which created a fixed main window
* (a main window acts as the screen lock, the docker, or the launcher) will * (a main window acts as the screen lock, the docker, or the launcher) will
* be moved to the topmost layer automatically. * be moved to the topmost layer automatically.
* *
@@ -1600,7 +1618,7 @@ typedef struct _CompositorOps {
* a main window with the extended style WS_EX_AUTOPOSITION. * a main window with the extended style WS_EX_AUTOPOSITION.
*/ */
void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer, void (*calc_mainwin_pos) (CompositorCtxt* ctxt, MG_Layer* layer,
DWORD zt_type, int first_for_type, CALCPOSINFO* info); DWORD zt_type, int first_for_type, int cli, CALCPOSINFO* info);
/** /**
* This operation will be called when there was a layer operation. * This operation will be called when there was a layer operation.
@@ -1729,6 +1747,20 @@ typedef struct _CompositorOps {
void (*on_moved_win) (CompositorCtxt* ctxt, MG_Layer* layer, void (*on_moved_win) (CompositorCtxt* ctxt, MG_Layer* layer,
int zidx, const RECT* rc_org); int zidx, const RECT* rc_org);
/**
* This operation will composite multiple layers on the screen at the same
* time by using the combining paramemters.
*/
unsigned int (*composite_layers) (CompositorCtxt* ctxt, MG_Layer* layers[],
int nr_layers, void* combine_param);
/**
* This operation will be called when transiting to a new topmost layer.
* The compositor can play an animation to transit from the current
* topmost layer to the new topmost layer.
*/
void (*transit_to_layer) (CompositorCtxt* ctxt, MG_Layer* to_layer);
/** /**
* This operation will be called when the system is maximizing a window. * This operation will be called when the system is maximizing a window.
* The compositor can play an animation in this operation. * The compositor can play an animation in this operation.
@@ -1743,12 +1775,35 @@ typedef struct _CompositorOps {
} CompositorOps; } CompositorOps;
#define FCM_HORIZONTAL 0x0000
#define FCM_VERTICAL 0x0001
#define FCM_METHOD_MASK 0x00FF
#define FCM_SCALE 0x0100
/** The combining parameters for the callback compositor. */
typedef struct _CombParamsFallback {
/**
* The combining method, can be one of the following values:
* - FCM_HORIZONTAL
* - FCM_VERTICAL
* and/or OR'd with the following value:
* - FCM_SCALE
*/
unsigned int method;
/** The percentage of the screen occupied by the first layer. */
float percent;
/** The scale factor of non-global z-nodes. */
float scale;
} COMBPARAMS_FALLBACK;
/** /**
* \brief Get the operations of a specific compositor. * \brief Get the operations of a specific compositor.
* *
* This function gets the operations of a specific compositor. * This function gets the operations of a specific compositor.
* *
* \param name The name of the compositor. MiniGUI reserved `default` * \param name The name of the compositor. MiniGUI reserved `fallback`
* as the default compositor which is implemented in MiniGUI Core. * as the default compositor which is implemented in MiniGUI Core.
* You can use some operations of the default compositor as the * You can use some operations of the default compositor as the
* corresponding operations for your own compositor. * corresponding operations for your own compositor.
@@ -1808,7 +1863,7 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
* \brief Select a compositor as the current compositor. * \brief Select a compositor as the current compositor.
* *
* This function selects a compositor as the current compositor * This function selects a compositor as the current compositor
* and returns the compositor object. * and returns the compositor operations.
* It also destroies the old compositor object if there is old one. * It also destroies the old compositor object if there is old one.
* *
* \param name The name of the compositor. If the argument is NULL, * \param name The name of the compositor. If the argument is NULL,
@@ -1826,7 +1881,25 @@ MG_EXPORT BOOL GUIAPI ServerUnregisterCompositor (const char* name);
MG_EXPORT const CompositorOps* GUIAPI ServerSelectCompositor ( MG_EXPORT const CompositorOps* GUIAPI ServerSelectCompositor (
const char* name, CompositorCtxt** ctxt); const char* name, CompositorCtxt** ctxt);
#define COMPSOR_OPS_VERSION 1 /**
* \brief Get the name and the context of the current compositor.
*
* This function gets the name and the context of the current
* compositor.
*
* \param ops The buffer used to return the compositor operations.
* \param ctxt The buffer used to return the compositor context.
*
* \return The name of the current compositor; NULL for error.
*
* \note Only called by the server.
*
* Since 5.0.6.
*/
MG_EXPORT const char* GUIAPI ServerGetCurrentCompositor (
const CompositorOps** ops, CompositorCtxt** ctxt);
#define COMPSOR_OPS_VERSION 2
/** /**
* Implement this stub to return the compositor operations * Implement this stub to return the compositor operations
@@ -1885,7 +1958,7 @@ const CompositorOps* __ex_compositor_get (const char* name,
* *
* \sa RegisterRequestHandler * \sa RegisterRequestHandler
*/ */
#define MAX_SYS_REQID 0x0023 #define MAX_SYS_REQID 0x0024
/** /**
* \def MAX_REQID * \def MAX_REQID
@@ -4024,7 +4097,7 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
#endif /* !_MGHAVE_CURSOR */ #endif /* !_MGHAVE_CURSOR */
/** /**
* \def SetCursor(hcsr) * \fn HCURSOR SetCursor(HCURSOR hcsr)
* \brief Changes the current cursor. * \brief Changes the current cursor.
* *
* This function changes the current cursor to be \a hcsr. * This function changes the current cursor to be \a hcsr.
@@ -4037,10 +4110,12 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
* *
* \sa SetCursorEx, SetDefaultCursor * \sa SetCursorEx, SetDefaultCursor
*/ */
#define SetCursor(hcsr) SetCursorEx (hcsr, FALSE) static inline HCURSOR SetCursor(HCURSOR hcsr) {
return SetCursorEx (hcsr, FALSE);
}
/** /**
* \def SetDefaultCursor(hcsr) * \fn HCURSOR SetDefaultCursor(HCURSOR hcsr)
* \brief Changes the current cursor, and set it as the default cursor. * \brief Changes the current cursor, and set it as the default cursor.
* *
* This function changes the current cursor to be \a hcsr, and set it as * This function changes the current cursor to be \a hcsr, and set it as
@@ -4054,7 +4129,9 @@ static inline int GUIAPI ShowCursor (BOOL fShow) {
* *
* \sa SetCursorEx, SetCursor * \sa SetCursorEx, SetCursor
*/ */
#define SetDefaultCursor(hcsr) SetCursorEx (hcsr, TRUE) static inline HCURSOR SetDefaultCursor(HCURSOR hcsr) {
return SetCursorEx (hcsr, TRUE);
}
/** @} end of cursor_fns */ /** @} end of cursor_fns */
+123 -31
View File
@@ -1448,6 +1448,17 @@ extern DWORD __mg_interval_time;
*/ */
#define MSG_HELP 0x006A #define MSG_HELP 0x006A
/**
* \def MSG_GESTURETEST
* \brief This message will be sent to a main window for gesture test.
*
* The client should call \a SetMainWindowGestureFlags to set the gesture flags
* for a main window after got this message.
*
* Since 5.0.6.
*/
#define MSG_GESTURETEST 0x006B
#define MSG_LASTCREATEMSG 0x006F #define MSG_LASTCREATEMSG 0x006F
/** @} end of creation_msgs */ /** @} end of creation_msgs */
@@ -2463,6 +2474,9 @@ typedef struct _COMPOSITINGINFO {
/* Since 5.0.0 */ /* Since 5.0.0 */
#define MSG_SETAUTOREPEAT 0x0107 #define MSG_SETAUTOREPEAT 0x0107
/* Since 5.0.6 */
#define MSG_SETGESTUREFLAGS 0x0108
#define MSG_SHOWGLOBALCTRL 0x010A #define MSG_SHOWGLOBALCTRL 0x010A
#define MSG_HIDEGLOBALCTRL 0x010B #define MSG_HIDEGLOBALCTRL 0x010B
@@ -2891,6 +2905,9 @@ typedef struct _WINMASKINFO {
* *
* This message is sent to the all main windows when the system * This message is sent to the all main windows when the system
* enters idle loop. * enters idle loop.
*
* Since 5.0.10, this messasge will be relayed to the active child control
* if the main window is currently active.
*/ */
#define MSG_IDLE 0x0142 #define MSG_IDLE 0x0142
@@ -2983,6 +3000,9 @@ typedef struct _WINMASKINFO {
/* Since 5.0.0: for calculating the default position */ /* Since 5.0.0: for calculating the default position */
#define MSG_CALC_POSITION 0x014B #define MSG_CALC_POSITION 0x014B
/* Since 5.0.6: for waking up the client */
#define MSG_WAKEUP_CLIENT 0x014C
/** /**
* \def MSG_DOESNEEDIME * \def MSG_DOESNEEDIME
* \brief Send to a window to query whether the window needs to open * \brief Send to a window to query whether the window needs to open
@@ -4433,16 +4453,12 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
/** /**
* \def WS_EX_WINTYPE_TOOLTIP * \def WS_EX_WINTYPE_TOOLTIP
* \brief The type for a system/global main window. * \brief The type for a tooltip main window.
* *
* Use this style when you want to create a tooltip main window. * Use this style when you want to create a tooltip main window.
* A tooltip main window will be shown above other types of main windows. * A tooltip main window will be shown above other types of main windows.
* *
* \note Under MiniGUI-Processes runtime mode, only the client which creates * \note The maximal number of all main windows in the tooltip level is 16.
* the first main window in the tooltip level can create other main
* windows in this level. For other clients, a main window in the higher
* level will be created.
* \note The maximal number of all main windows in the tooltip level is 8.
* MiniGUI will create a main windows in higher level if there is no room * MiniGUI will create a main windows in higher level if there is no room
* in the tooltip level. * in the tooltip level.
* *
@@ -4458,8 +4474,12 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
* A system/global main window will be shown above other types of main windows. * A system/global main window will be shown above other types of main windows.
* *
* \note Under MiniGUI-Processes runtime mode, only the server (`mginit`) can * \note Under MiniGUI-Processes runtime mode, only the server (`mginit`) can
* create main windows in the system level, and any main windows created * create main windows in the system level, and any main windows created
* by the server is a system main window. * by the server is a system main window.
*
*
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
* visible on all layers.
* *
* Since 5.0.0. * Since 5.0.0.
*/ */
@@ -4473,13 +4493,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
* screen lock level. A main window in the screen lock level will * screen lock level. A main window in the screen lock level will
* be shown below the system main windows and above the other main windows. * be shown below the system main windows and above the other main windows.
* *
* \note Under MiniGUI-Processes runtime mode, only the client which creates * \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
* the first main window in the screen lock level can create other * layer can create a main window in this level, and only the client which creates
* main windows in the this level. For other clients, a main window in * the first main window in the screen lock level can create other
* the higher level will be created. * main windows in the this level. For other clients, a main window in
* the higher level will be created.
*
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
* visible on all layers.
*
* \note The maximal number of all main windows in the screen lock level is 8. * \note The maximal number of all main windows in the screen lock level is 8.
* MiniGUI will create a main windows in higher level if there is no room * MiniGUI will create a main windows in higher level if there is no room
* in the screen lock level. * in the screen lock level.
* *
* Since 5.0.0. * Since 5.0.0.
*/ */
@@ -4494,13 +4519,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
* be shown below the main windows in the screen lock level and * be shown below the main windows in the screen lock level and
* above the main windows in the higher level. * above the main windows in the higher level.
* *
* \note Under MiniGUI-Processes runtime mode, only the client which creates * \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
* the first main window in the docker level can create other main windows * layer can create a main window in this levele, and only the client which creates
* in the docker level. For other clients, a main window in the higher * the first main window in the docker level can create other main windows
* level will be created. * in the docker level. For other clients, a main window in the higher
* level will be created.
*
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
* visible on all layers.
*
* \note The maximal number of all main windows in the docker level is 8. * \note The maximal number of all main windows in the docker level is 8.
* MiniGUI will create a main windows in higher level if there is no room * MiniGUI will create a main windows in higher level if there is no room
* in the docker level. * in the docker level.
* *
* Since 5.0.0. * Since 5.0.0.
*/ */
@@ -4549,13 +4579,18 @@ MG_EXPORT SRVEVTHOOK GUIAPI SetServerEventHook (SRVEVTHOOK SrvEvtHook);
* be shown below the main windows in the normal level and * be shown below the main windows in the normal level and
* above the wallpaper. * above the wallpaper.
* *
* \note Under MiniGUI-Processes runtime mode, only the client which creates * \note Under MiniGUI-Processes runtime mode, only clients on the default (`mginit`)
* the first main window in the launcher level can create other * layer can create a main window in this levele, and only the client which creates
* main windows in the launcher level. For other clients, a main window * the first main window in the launcher level can create other
* in the normal level will be created. * main windows in the launcher level. For other clients, a main window
* in the normal level will be created.
*
* \note Under MiniGUI-Processes runtime mode, the windows in this level will be kept
* visible on all layers.
*
* \note The maximal number of all main windows in the launcher level is 8. * \note The maximal number of all main windows in the launcher level is 8.
* MiniGUI will create a main windows in normal level if there is no room * MiniGUI will create a main windows in normal level if there is no room
* in the launcher level. * in the launcher level.
* *
* Since 5.0.0. * Since 5.0.0.
*/ */
@@ -6884,13 +6919,14 @@ static inline BOOL MainWindowThreadCleanup (HWND hMainWnd)
#define ST_PIXEL_ARGB4444 0x0001 #define ST_PIXEL_ARGB4444 0x0001
#define ST_PIXEL_ARGB1555 0x0002 #define ST_PIXEL_ARGB1555 0x0002
#define ST_PIXEL_ARGB8888 0x0003 #define ST_PIXEL_ARGB8888 0x0003
#define ST_PIXEL_XRGB565 0x0004
/* other flags for future use */ /* other flags for future use */
/* for default surface flags */ /* for default surface flags */
#define ST_DEFAULT (ST_PIXEL_DEFAULT) #define ST_DEFAULT (ST_PIXEL_DEFAULT)
#define CT_SYSTEM_MASK 0X0000FF #define CT_SYSTEM_MASK 0x0000FF
#define CT_OPAQUE 0x000000 #define CT_OPAQUE 0x000000
#define CT_COLORKEY 0x000001 #define CT_COLORKEY 0x000001
#define CT_ALPHACHANNEL 0x000002 #define CT_ALPHACHANNEL 0x000002
@@ -7158,7 +7194,7 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
* \param hWnd The handle to the window. * \param hWnd The handle to the window.
* \param fSet Set or cancel the always top style; TRUE to set, FALSE to cancel. * \param fSet Set or cancel the always top style; TRUE to set, FALSE to cancel.
* *
* \return return TRUE on success, otherwise FALSE. * \return TRUE on success, otherwise FALSE.
* *
* \sa GetWindowStyle, WS_ALWAYSTOP * \sa GetWindowStyle, WS_ALWAYSTOP
* *
@@ -7166,8 +7202,64 @@ MG_EXPORT BOOL GUIAPI SetWindowMaskEx (HWND hWnd, HDC hdc, const BITMAP* mask);
*/ */
MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet); MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
#define GF_SWIPE_HORZ ZOF_GF_SWIPE_HORZ
#define GF_SWIPE_VERT ZOF_GF_SWIPE_VERT
/**
* \fn BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags)
* \brief Set the gesture flags of a main window.
*
* This function sets the gesture flags of a specific main window.
*
* Generally, a main window which needs a specific gesture should handle
* \a MSG_GESTURETEST and call this function to set the correct gesture flags for
* the main window.
*
* The MiniGUI Core will send the MSG_GESTURETEST message as a notification
* to a main window when it tries to handle a gesture globally. If the main window
* sets the flag of the gesture in a specific time, e.g. 100ms, MiniGUI Core will
* pass the gesture events to the main window other than handle the gesture by itself.
*
* \param hWnd The handle to the main window.
* \param dwFlags The new gesture flags, can be OR'd with the following values:
* - GF_SWIPE_HORZ\n
* The main window handles horizontal swipe gesture.
* - GF_SWIPE_VERT\n
* The main window handles vertical swipe gesture.
*
* \return TRUE on success, otherwise FALSE.
*
* \sa MSG_GESTURETEST
*
* Since 5.0.6
*/
MG_EXPORT BOOL GUIAPI SetMainWindowGestureFlags (HWND hWnd, DWORD dwFlags);
#ifdef _MGSCHEMA_COMPOSITING #ifdef _MGSCHEMA_COMPOSITING
/**
* \fn int GUIAPI GetWindowSharedSurfaceFD (HWND hwnd)
* \brief Gets the file descriptor of the surface buffer for a window or
* the main window it locates.
*
* This function gets the file descriptor of the surface buffer for
* the specified window if it is a main window or the main window it locates.
* Note that if the window is a control that has the style `WS_EX_CTRLASMAINWIN`,
* the window will have a separate surface buffer.
*
* \param hwnd The handle to the window.
*
* \return An integer larger than or equal to 0 for a valid file descriptor,
* otherwise a negative value.
*
* \note This function only available when _MGSCHEMA_COMPOSITING is defined.
*
* \sa CreateMemDCFromSharedSurfaceFD
*
* Since 5.0.13
*/
MG_EXPORT int GUIAPI GetWindowSharedSurfaceFD (HWND hWnd);
/** /**
* \fn BOOL GUIAPI SetMainWindowCompositing (HWND hWnd, * \fn BOOL GUIAPI SetMainWindowCompositing (HWND hWnd,
int type, DWORD arg) int type, DWORD arg)
@@ -7189,14 +7281,14 @@ MG_EXPORT BOOL GUIAPI SetMainWindowAlwaysTop (HWND hWnd, BOOL fSet);
* the alpha channel value (0~255) along with the parameter \a arg. * the alpha channel value (0~255) along with the parameter \a arg.
* - CT_LOGICALPIXEL\n * - CT_LOGICALPIXEL\n
* Do the given color logical operation. You should specify the color * Do the given color logical operation. You should specify the color
* logical raster operation along with the pararmeter \a arg. See \a BitBlt. * logical raster operation along with the pararmeter \a arg. See \a ColorLogicalOp.
* - CT_ALPHAPIXEL\n * - CT_ALPHAPIXEL\n
* The alpha component value of the source and/or the destination pixel go * The alpha component value of the source and/or the destination pixel go
* into effect. You can specify the color blend method along * into effect. You can specify the color blend method along
* with the pararmeter \a arg. See \a ColorBlendMethod. Note that a specific * with the pararmeter \a arg. See \a ColorBlendMethod. Note that a specific
* compositor may not support this compositing type. The built-in `fallback` * compositor may not support this compositing type. The built-in `fallback`
* compositor ignores the blend mode argument and only always uses the * compositor uses the blend mode argument when using Pixman, otherwise,
* Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER). * uses the Porter Duff blend mode: source over destination (COLOR_BLEND_PD_SRC_OVER).
* - CT_BLURRED\n * - CT_BLURRED\n
* Apply a Gaussian blur to the background of the main window. You should * Apply a Gaussian blur to the background of the main window. You should
* also specify the radius of the blur (0 ~ 255) in pixles along with the * also specify the radius of the blur (0 ~ 255) in pixles along with the
+2 -1
View File
@@ -2,11 +2,12 @@ prefix=@prefix@
exec_prefix=@exec_prefix@ exec_prefix=@exec_prefix@
libdir=@libdir@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
runmode=@MINIGUI_RUNMODE@
libsuffix=@MGLIB_SUFFIX@
Name: MiniGUI Name: MiniGUI
Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices. Description: A mature cross-platform windowing and GUI system for embedded systems and IoT smart devices.
Version: @MINIGUI_VERSION@ Version: @MINIGUI_VERSION@
Runmode: @MINIGUI_RUNMODE@
Requires: Requires:
Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@ Libs: -L${libdir} -lminigui_@MGLIB_SUFFIX@ @DEP_LIBS@
Libs.private: Libs.private:
+19 -44
View File
@@ -1,56 +1,31 @@
if MG_MINIMALGDI COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit newgal newgdi
COMMON_SUBDIRS = misc kernel sysres include
COMMON_LADD = \ COMMON_LADD = \
kernel/libkernel.la \ libc/liblibc.la \
sysres/libsysres.la \ misc/libmisc.la \
misc/libmisc.la control/libcontrol.la \
else ex_ctrl/libexctrl.la \
COMMON_SUBDIRS = libc misc main kernel sysres ial control ex_ctrl font gui mybmp include textedit font/libfont.la \
COMMON_LADD = \
libc/liblibc.la \
misc/libmisc.la \
control/libcontrol.la \
ex_ctrl/libexctrl.la \
font/libfont.la \
font/in-core/libincore.la \ font/in-core/libincore.la \
ial/libial.la \ ial/libial.la \
gui/libgui.la \ gui/libgui.la \
main/libmain.la \ main/libmain.la \
mybmp/libmybmp.la \ mybmp/libmybmp.la \
kernel/libkernel.la \ kernel/libkernel.la \
sysres/libsysres.la \ sysres/libsysres.la \
textedit/libtextedit.la textedit/libtextedit.la \
endif newgal/libnewgal.la \
newgdi/libnewgdi.la
if MGRM_STANDALONE DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
LITE_LADD = standalone/libstandalone.la SUBDIRS = $(COMMON_SUBDIRS) @RUNMODE_SUBDIRS@
LITE_SUBDIRS = standalone
else
if MGRM_PROCESSES
LITE_LADD = server/libserver.la client/libclient.la
LITE_SUBDIRS = server client
else
LITE_LADD =
LITE_SUBDIRS =
endif
endif
NEWGAL_LADD = newgal/libnewgal.la newgdi/libnewgdi.la
NEWGAL_SUBDIRS = newgal newgdi
DIST_SUBDIRS = $(COMMON_SUBDIRS) newgal newgdi server client standalone
SUBDIRS = $(COMMON_SUBDIRS) $(NEWGAL_SUBDIRS) $(LITE_SUBDIRS)
MGSOURCES = template.c template.h MGSOURCES = template.c template.h
MGLIBADD = $(COMMON_LADD) \ MGLIBADD = $(COMMON_LADD) @RUNMODE_LADD@
$(LITE_LADD) \
$(NEWGAL_LADD)
MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) MGLDFLAGS = -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la lib_LTLIBRARIES=libminigui_@MGLIB_SUFFIX@.la
libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD) libminigui_@MGLIB_SUFFIX@_la_LIBADD=$(MGLIBADD) @DEP_LIBS@
libminigui_@MGLIB_SUFFIX@_la_SOURCES=$(MGSOURCES) libminigui_@MGLIB_SUFFIX@_la_SOURCES=$(MGSOURCES)
libminigui_@MGLIB_SUFFIX@_la_LDFLAGS=$(MGLDFLAGS) libminigui_@MGLIB_SUFFIX@_la_LDFLAGS=$(MGLDFLAGS)
+72 -27
View File
@@ -154,9 +154,31 @@ int GUIAPI GetSockFD2Server (void)
#include "debug.h" #include "debug.h"
static void check_live (BOOL woken)
{
static DWORD last_ticks;
REQUEST req;
__mg_update_tick_count (NULL);
// Since 5.0.6, only send IAMLIVE if the current ticks > (last_ticks + 100)
if (woken || __mg_tick_counter > last_ticks + 100) {
last_ticks = __mg_tick_counter;
/* Tell server that I am live */
req.id = REQID_IAMLIVE;
req.data = &__mg_tick_counter;
req.len_data = sizeof (unsigned int);
ClientRequest (&req, NULL, 0);
}
}
static void process_socket_message (MSG *msg) static void process_socket_message (MSG *msg)
{ {
if (msg->message == MSG_UPDATECLIWIN && if (msg->message == MSG_WAKEUP_CLIENT) {
check_live (TRUE);
}
else if (msg->message == MSG_UPDATECLIWIN &&
__mg_client_check_hwnd (msg->hwnd, __mg_client_id)) { __mg_client_check_hwnd (msg->hwnd, __mg_client_id)) {
__mg_update_window (msg->hwnd, __mg_update_window (msg->hwnd,
LOSWORD(msg->wParam), HISWORD(msg->wParam), LOSWORD(msg->wParam), HISWORD(msg->wParam),
@@ -366,27 +388,6 @@ sock_error:
return -1; return -1;
} }
static void check_live (void)
{
REQUEST req;
#if 0 /* deprecated code */
/* Since 5.0.0, call __mg_update_tick_count instead */
if (__mg_tick_counter != SHAREDRES_TIMER_COUNTER) {
AlertDesktopTimerEvent ();
__mg_tick_counter = SHAREDRES_TIMER_COUNTER;
}
#endif /* deprecated code */
__mg_update_tick_count (NULL);
/* Tell server that I am live */
req.id = REQID_IAMLIVE;
req.data = &__mg_tick_counter;
req.len_data = sizeof (unsigned int);
ClientRequest (&req, NULL, 0);
}
BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait) BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
{ {
static DWORD old_timer; static DWORD old_timer;
@@ -398,7 +399,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
struct timeval sel_timeout; struct timeval sel_timeout;
MSG Msg; MSG Msg;
check_live (); check_live (FALSE);
/* rset gets modified each time around */ /* rset gets modified each time around */
rset = msg_queue->rfdset; rset = msg_queue->rfdset;
@@ -433,14 +434,14 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
static unsigned int old_mouse_move_serial = 0xdeadbeef; static unsigned int old_mouse_move_serial = 0xdeadbeef;
int flag = 0, mouse_x = -1, mouse_y = -1, buttons = -1; int flag = 0, mouse_x = -1, mouse_y = -1, buttons = -1;
check_live (); check_live (FALSE);
if (wait && (__mg_tick_counter - old_timer) >= repeat_timeout) { if (wait && (__mg_tick_counter - old_timer) >= repeat_timeout) {
Msg.hwnd = HWND_DESKTOP; Msg.hwnd = HWND_DESKTOP;
Msg.message = MSG_TIMEOUT; Msg.message = MSG_TIMEOUT;
Msg.wParam = (WPARAM)__mg_tick_counter; Msg.wParam = (WPARAM)__mg_tick_counter;
Msg.lParam = 0; Msg.lParam = 0;
Msg.time = __mg_tick_counter; Msg.time = __mg_tick_counter;
// Since 5.0.0, we do not genenrate MSG_TIMEOUT message any more. // Since 5.0.0, we do not genenrate MSG_TIMEOUT message here.
// kernel_QueueMessage (msg_queue, &Msg); // kernel_QueueMessage (msg_queue, &Msg);
old_timer = __mg_tick_counter; old_timer = __mg_tick_counter;
@@ -507,7 +508,7 @@ BOOL client_IdleHandler4Client (PMSGQUEUE msg_queue, BOOL wait)
/* go through registered listen fds */ /* go through registered listen fds */
n += __mg_kernel_check_listen_fds (msg_queue, &rset, wsetptr, esetptr); n += __mg_kernel_check_listen_fds (msg_queue, &rset, wsetptr, esetptr);
check_live (); check_live (FALSE);
if (n > 0) { if (n > 0) {
old_timer = __mg_tick_counter; old_timer = __mg_tick_counter;
@@ -569,12 +570,23 @@ GHANDLE GUIAPI JoinLayer (const char* layer_name, const char* client_name,
__mg_layer = layer_handle; __mg_layer = layer_handle;
zi = (ZORDERINFO*) shmat (joined_info.zo_shmid, 0, SHM_RDONLY); zi = (ZORDERINFO*) shmat (joined_info.zi_shmid, 0, SHM_RDONLY);
if (zi == (void*)-1) { if (zi == (void*)-1) {
return INV_LAYER_HANDLE; return INV_LAYER_HANDLE;
} }
__mg_zorder_info = zi; __mg_zorder_info = zi;
if (joined_info.zi_shmid == joined_info.def_zi_shmid) {
__mg_def_zorder_info = zi;
}
else {
zi = (ZORDERINFO*) shmat (joined_info.def_zi_shmid, 0, SHM_RDONLY);
if (zi == (void*)-1) {
return INV_LAYER_HANDLE;
}
__mg_def_zorder_info = zi;
}
} }
__mg_tick_counter = SHAREDRES_TIMER_COUNTER; __mg_tick_counter = SHAREDRES_TIMER_COUNTER;
@@ -711,6 +723,39 @@ BOOL __mg_client_on_layer_changed (GHANDLE layer_handle, int zi_shmid)
__mg_layer = layer_handle; __mg_layer = layer_handle;
__mg_zorder_info = zi; __mg_zorder_info = zi;
#if 0 /* obsolete */
ZORDERNODE* nodes;
int slot;
nodes = GET_ZORDERNODE(zi);
slot = zi->first_tooltip;
for (; slot > 0; slot = nodes[slot].next) {
if (nodes [slot].cli == __mg_client_id) {
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
assert (win);
win->idx_znode = slot;
}
}
slot = zi->first_topmost;
for (; slot > 0; slot = nodes[slot].next) {
if (nodes [slot].cli == __mg_client_id) {
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
assert (win);
win->idx_znode = slot;
}
}
slot = zi->first_normal;
for (; slot > 0; slot = nodes[slot].next) {
if (nodes [slot].cli == __mg_client_id) {
PMAINWIN win = (PMAINWIN)nodes [slot].hwnd;
assert (win);
win->idx_znode = slot;
}
}
#endif /* obsolete */
return TRUE; return TRUE;
} }
+56 -46
View File
@@ -210,6 +210,7 @@ static void setup_dc (HWND hWnd, BIDISLEDITDATA *sled, HDC hdc, BOOL bSel)
DWORD dwStyle = GetWindowStyle (hWnd); DWORD dwStyle = GetWindowStyle (hWnd);
if (!bSel) { if (!bSel) {
SetBkMode (hdc, BM_TRANSPARENT);
if (dwStyle & WS_DISABLED) if (dwStyle & WS_DISABLED)
SetTextColor (hdc, SetTextColor (hdc,
@@ -583,7 +584,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled)
/* draw selected chars */ /* draw selected chars */
setup_dc (hWnd, sled, hdc, TRUE); setup_dc (hWnd, sled, hdc, TRUE);
outw += DrawACharString (hdc, startx + outw, starty, outw += DrawACharString (hdc, startx + outw, starty,
achar_string, sled->selEnd - sled->selStart, NULL, NULL); achar_string, sled->selEnd - sled->selStart, NULL, NULL);
achar_string += sled->selEnd - sled->selStart; achar_string += sled->selEnd - sled->selStart;
@@ -1069,6 +1070,7 @@ static int ascii_bidi_type[] = {
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON,
/*0x60~0x6f*/ /*0x60~0x6f*/
BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
@@ -1085,21 +1087,23 @@ static int ascii_bidi_type[] = {
static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv) static int inline get_char_bidi_type (LOGFONT* logfont, Achar32 chv)
{ {
DEVFONT* devfont; DEVFONT* devfont;
int bidi_type = BIDI_TYPE_LTR;
if (IS_MBCHV(chv)) { if (IS_MBCHV(chv)) {
devfont = logfont->devfonts[1]; devfont = logfont->devfonts[1];
if (devfont->charset_ops->bidi_char_type) { if (devfont->charset_ops->bidi_char_type) {
return devfont->charset_ops->bidi_char_type (chv); bidi_type = devfont->charset_ops->bidi_char_type (chv);
}
else {
return BIDI_TYPE_LTR;
} }
} }
else { else {
return ascii_bidi_type[chv]; assert(chv < 0x80);
bidi_type = ascii_bidi_type[chv];
} }
_DBG_PRINTF("chv: %X: bidi_type: %x\n", chv, bidi_type);
return bidi_type;
} }
static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type, static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
int r_char_type, int line_type) int r_char_type, int line_type)
@@ -1108,53 +1112,60 @@ static int get_text_rl_type (PLOGFONT logfont, char* newtext, int l_char_type,
Achar32 chv; Achar32 chv;
chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0); chv = GetACharValue (logfont, newtext, strlen(newtext), NULL, 0);
if (chv == INV_ACHAR_VALUE) int type = CHAR_TYPE_UNKKOWN;
return -1;
if (chv == INV_ACHAR_VALUE) {
goto done;
}
bidi_type = get_char_bidi_type (logfont, chv); bidi_type = get_char_bidi_type (logfont, chv);
if (BIDI_IS_STRONG(bidi_type)) if (BIDI_IS_STRONG(bidi_type)) {
{ if (BIDI_IS_RTL(bidi_type)) {
if (BIDI_IS_RTL(bidi_type)) type = CHAR_TYPE_RTL;
{ goto done;
return CHAR_TYPE_RTL;
} }
else else {
{ type = CHAR_TYPE_LTR;
return CHAR_TYPE_LTR; goto done;
} }
} }
if (BIDI_IS_NUMBER(bidi_type)) if (BIDI_IS_NUMBER(bidi_type)) {
{ type = CHAR_TYPE_LTR;
return CHAR_TYPE_LTR; goto done;
} }
if (l_char_type == r_char_type) if (l_char_type == r_char_type) {
{ type = l_char_type;
return l_char_type; goto done;
} }
/* no left char */ /* no left char */
else if (l_char_type == -1) else if (l_char_type == CHAR_TYPE_UNKKOWN) {
{
if (BIDI_IS_WEAK (bidi_type)) if (BIDI_IS_WEAK (bidi_type))
return r_char_type; type = r_char_type;
else else
return line_type; type = line_type;
goto done;
} }
/* no right char */ /* no right char */
else if (r_char_type == -1) else if (r_char_type == CHAR_TYPE_UNKKOWN) {
{
if (BIDI_IS_WEAK (bidi_type)) if (BIDI_IS_WEAK (bidi_type))
return l_char_type; type = l_char_type;
else else
return line_type; type = line_type;
goto done;
} }
else else {
{ type = line_type;
return line_type;
} }
_DBG_PRINTF("l_char_type: %d, r_char_type: %d, line_type: %d, "
"type for %X: %d\n",
l_char_type, r_char_type, line_type, chv, type);
done:
return type;
} }
static int get_line_rl_type (ACHARMAPINFO* map, int len) static int get_line_rl_type (ACHARMAPINFO* map, int len)
@@ -2133,7 +2144,7 @@ esright_input_char_refresh (HWND hWnd,
scroll_rc.right = cur_caret_x; scroll_rc.right = cur_caret_x;
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL); ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
UpdateWindow(hWnd, FALSE); UpdateInvalidClient(hWnd, TRUE);
edtSetCaretPos (hWnd, sled); edtSetCaretPos (hWnd, sled);
sled->changed = TRUE; sled->changed = TRUE;
@@ -2504,8 +2515,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
unsigned char charBuffer [4]; unsigned char charBuffer [4];
int chars; int chars;
_DBG_PRINTF("get char-----------------char----%p\n", (PVOID)wParam);
if (dwStyle & ES_READONLY) if (dwStyle & ES_READONLY)
return 0; return 0;
@@ -2526,9 +2535,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
else { else {
chars = 1; chars = 1;
if (charBuffer [0] == 127) // BS
charBuffer [0] = '\b';
if (dwStyle & ES_UPPERCASE) { if (dwStyle & ES_UPPERCASE) {
charBuffer [0] = toupper (charBuffer[0]); charBuffer [0] = toupper (charBuffer[0]);
} }
@@ -2537,12 +2543,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
} }
if (chars == 1) { if (chars > 1) {
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME _WRN_PRINTF("BIDISLEDIT only support ISO8859-6 charset\n");
return 0; return 0;
} }
else if (charBuffer [0] == '\b' || charBuffer [0] == 0x7F) {
if (wParam == '\b') { // backspace // BS or DEL
int del = 1; int del = 1;
if (sled->editPos == 0 && sled->selStart == sled->selEnd) if (sled->editPos == 0 && sled->selStart == sled->selEnd)
@@ -2564,9 +2570,12 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
sleBackspaceText (hWnd, sled, del, FALSE, FALSE); sleBackspaceText (hWnd, sled, del, FALSE, FALSE);
} }
} }
else{ else if (charBuffer [0] < 0x20) {
// ignore all other control characters.
return 0;
}
else {
if (dwStyle & ES_LEFT) { if (dwStyle & ES_LEFT) {
//if ((dwStyle&0xffff) == ES_LEFT) {
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars); esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
set_edit_caret_pos(hWnd, sled); set_edit_caret_pos(hWnd, sled);
@@ -2586,6 +2595,7 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE); sleInsertText (hWnd, sled, (char* )charBuffer, chars, FALSE);
} }
} }
return 0; return 0;
} }
+12 -14
View File
@@ -299,7 +299,15 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
} }
} }
/*complete a click if the click if valid /* DK: When the radio or check button state changes do not erase the background,
* and the prospects for direct rendering */
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
InvalidateRect((HWND)pctrl, NULL, TRUE);
else
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
/* complete a click if the click if valid
* (mouse lbutton up in button )*/ * (mouse lbutton up in button )*/
if (old_pose == BST_PUSHED && new_pose != BST_DISABLE if (old_pose == BST_PUSHED && new_pose != BST_DISABLE
&& change_valid) && change_valid)
@@ -312,14 +320,6 @@ static void change_status_from_pose (PCONTROL pctrl, int new_pose,
NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED); NotifyParent ((HWND)pctrl, pctrl->id, BN_CLICKED);
} }
/* DK: When the radio or check button state changes do not erase the background,
* and the prospects for direct rendering */
btnGetRects (pctrl, &rcClient, &rcContent, &rcBitmap);
if (BUTTON_IS_PUSHBTN(pctrl) || (pctrl->dwStyle & BS_PUSHLIKE))
InvalidateRect((HWND)pctrl, NULL, TRUE);
else
InvalidateRect((HWND)pctrl, &rcBitmap, FALSE);
} }
/*btnGetRects: /*btnGetRects:
@@ -423,8 +423,8 @@ static void draw_bitmap_button (PCONTROL pctrl, HDC hdc, DWORD dwStyle,
GetClientRect ((HWND)pctrl, &prcClient); GetClientRect ((HWND)pctrl, &prcClient);
if (dwStyle & BS_REALSIZEIMAGE) { if (dwStyle & BS_REALSIZEIMAGE) {
x += (w - bmp->bmWidth) >> 1; x += (int)(w - bmp->bmWidth) >> 1;
y += (h - bmp->bmHeight) >> 1; y += (int)(h - bmp->bmHeight) >> 1;
w = h = 0; w = h = 0;
if (bmp->bmWidth > RECTW(prcClient)){ if (bmp->bmWidth > RECTW(prcClient)){
@@ -847,8 +847,6 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
break; break;
} }
case BM_SETSTYLE: case BM_SETSTYLE:
pctrl->dwStyle &= 0xFFFF0000; pctrl->dwStyle &= 0xFFFF0000;
pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF); pctrl->dwStyle |= (DWORD)(wParam & 0x0000FFFF);
@@ -1054,7 +1052,7 @@ static LRESULT ButtonCtrlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
} }
default: default:
break; break;
} }
return DefaultControlProc (hWnd, uMsg, wParam, lParam); return DefaultControlProc (hWnd, uMsg, wParam, lParam);
+7 -9
View File
@@ -63,21 +63,17 @@
#include "ctrlmisc.h" #include "ctrlmisc.h"
#define _ID_TIMER 100 #define _ID_TIMER 100
#define _MARGIN 10
static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{ {
static int iBorder;
switch (message) { switch (message) {
case MSG_CREATE: case MSG_CREATE:
{ {
const WINDOWINFO *info;
int timeout = (int)GetWindowAdditionalData (hWnd); int timeout = (int)GetWindowAdditionalData (hWnd);
if (timeout >= 10) if (timeout >= 10)
SetTimer (hWnd, _ID_TIMER, timeout / 10); SetTimer (hWnd, _ID_TIMER, timeout / 10);
info = GetWindowInfo (hWnd);
iBorder =
info->we_rdr->calc_we_area (hWnd, LFRDR_METRICS_BORDER, NULL);
SetWindowFont (hWnd, SetWindowFont (hWnd,
(PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_TOOLTIP)); (PLOGFONT)GetWindowElementAttr(hWnd, WE_FONT_TOOLTIP));
break; break;
@@ -102,7 +98,7 @@ static LRESULT ToolTipWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
SetTextColor (hdc, SetTextColor (hdc,
GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP)); GetWindowElementPixelEx(hWnd, hdc, WE_FGC_TOOLTIP));
TabbedTextOut (hdc, iBorder, iBorder, text); TabbedTextOut (hdc, _MARGIN, _MARGIN, text);
EndPaint (hWnd, hdc); EndPaint (hWnd, hdc);
return 0; return 0;
@@ -164,6 +160,7 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
CreateInfo.dwStyle = WS_VISIBLE; CreateInfo.dwStyle = WS_VISIBLE;
CreateInfo.dwExStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_USEPARENTRDR; CreateInfo.dwExStyle = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_USEPARENTRDR;
CreateInfo.dwExStyle |= WS_EX_WINTYPE_TOOLTIP | WS_EX_TROUNDCNS | WS_EX_BROUNDCNS;
CreateInfo.spCaption = buf ? buf : text; CreateInfo.spCaption = buf ? buf : text;
CreateInfo.hMenu = 0; CreateInfo.hMenu = 0;
CreateInfo.hCursor = GetSystemCursor (IDC_ARROW); CreateInfo.hCursor = GetSystemCursor (IDC_ARROW);
@@ -171,8 +168,8 @@ HWND CreateToolTipWin (HWND hParentWnd, int x, int y, int timeout_ms,
CreateInfo.MainWindowProc = ToolTipWinProc; CreateInfo.MainWindowProc = ToolTipWinProc;
CreateInfo.lx = x; CreateInfo.lx = x;
CreateInfo.ty = y; CreateInfo.ty = y;
CreateInfo.rx = CreateInfo.lx + text_size.cx; CreateInfo.rx = CreateInfo.lx + text_size.cx + _MARGIN * 2;
CreateInfo.by = CreateInfo.ty + text_size.cy; CreateInfo.by = CreateInfo.ty + text_size.cy + _MARGIN * 2;
CreateInfo.iBkColor = CreateInfo.iBkColor =
GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP); GetWindowElementPixelEx (hParentWnd, HDC_SCREEN, WE_BGC_TOOLTIP);
CreateInfo.dwAddData = (DWORD) timeout_ms; CreateInfo.dwAddData = (DWORD) timeout_ms;
@@ -218,7 +215,8 @@ void ResetToolTipWin (HWND hwnd, int x, int y, const char* text, ...)
if (y + text_size.cy > g_rcScr.bottom) if (y + text_size.cy > g_rcScr.bottom)
y = g_rcScr.bottom - text_size.cy; y = g_rcScr.bottom - text_size.cy;
MoveWindow (hwnd, x, y, text_size.cx, text_size.cy, TRUE); MoveWindow (hwnd, x, y,
text_size.cx + _MARGIN * 2, text_size.cy + _MARGIN * 2, TRUE);
ShowWindow (hwnd, SW_SHOWNORMAL); ShowWindow (hwnd, SW_SHOWNORMAL);
} }
+8 -11
View File
@@ -1678,7 +1678,7 @@ esright_input_char_refresh (HWND hWnd,
scroll_rc.right = cur_caret_x; scroll_rc.right = cur_caret_x;
ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL); ScrollWindow(hWnd, -scroll_len, 0, &scroll_rc, NULL);
UpdateWindow(hWnd, FALSE); UpdateInvalidClient(hWnd, TRUE);
edtSetCaretPos (hWnd, sled); edtSetCaretPos (hWnd, sled);
sled->changed = TRUE; sled->changed = TRUE;
@@ -2143,9 +2143,6 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
else { else {
chars = 1; chars = 1;
if (charBuffer [0] == 127) // BS
charBuffer [0] = '\b';
if (dwStyle & ES_UPPERCASE) { if (dwStyle & ES_UPPERCASE) {
charBuffer [0] = toupper (charBuffer[0]); charBuffer [0] = toupper (charBuffer[0]);
} }
@@ -2154,12 +2151,8 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
} }
} }
if (chars == 1) { if (chars == 1 && (charBuffer[0] == '\b' || charBuffer[0] == 0x7F)) {
if (charBuffer [0] < 0x20 && charBuffer[0] != '\b') //FIXME // ASCII BS or DEL
return 0;
}
if (charBuffer[0] == '\b') { //backspace
int del; int del;
if (sled->editPos == 0 && sled->selStart == sled->selEnd) if (sled->editPos == 0 && sled->selStart == sled->selEnd)
@@ -2184,7 +2177,11 @@ SLEditCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
sleInsertText (hWnd, sled, NULL, del); sleInsertText (hWnd, sled, NULL, del);
} }
} }
else{ else if (chars == 1 && charBuffer [0] < 0x20) {
// ignore all other ASCII control characters.
return 0;
}
else {
if (dwStyle & ES_LEFT) { if (dwStyle & ES_LEFT) {
esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars); esleft_input_char_refresh(hWnd, sled, (char*)charBuffer, chars);
set_edit_caret_pos(hWnd, sled); set_edit_caret_pos(hWnd, sled);
+1 -1
View File
@@ -404,7 +404,7 @@ void mglist_set_itemops (MgList *mglst, PMGITEMOPS iop)
mglst->iop = *iop; mglst->iop = *iop;
} }
int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam, LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
PSCRDATA pscrdata, MgList *mglst) PSCRDATA pscrdata, MgList *mglst)
{ {
switch (message) { switch (message) {
+1 -1
View File
@@ -140,7 +140,7 @@ struct _MgList
/* ------------------------- external api -------------------------- */ /* ------------------------- external api -------------------------- */
MG_EXPORT int DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam, MG_EXPORT LRESULT DefaultItemViewProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam,
PSCRDATA pscrdata, MgList *mglst); PSCRDATA pscrdata, MgList *mglst);
MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func); MG_EXPORT SVITEM_DRAWFUNC mglist_set_itemdraw (MgList *mglst, SVITEM_DRAWFUNC draw_func);
+5 -1
View File
@@ -172,6 +172,10 @@ BOOL scrolled_set_cont_pos (HWND hWnd, PSCRDATA pscrdata, int cont_x, int cont_y
SetScrollPos (hWnd, SB_VERT, cont_y); SetScrollPos (hWnd, SB_VERT, cont_y);
bChange = TRUE; bChange = TRUE;
} }
if (bChange)
UpdateInvalidClient(hWnd, FALSE);
return bChange; return bChange;
} }
@@ -585,7 +589,7 @@ int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h)
return 0; return 0;
} }
int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam) LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
{ {
PSCRDATA pscrdata = NULL; PSCRDATA pscrdata = NULL;
+1 -1
View File
@@ -96,7 +96,7 @@ typedef struct _scrdata
typedef SCRDATA *PSCRDATA; typedef SCRDATA *PSCRDATA;
MG_EXPORT int DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam); MG_EXPORT LRESULT DefaultScrolledProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h); MG_EXPORT int scrolled_init (HWND hWnd, PSCRDATA pscrdata, int w, int h);
MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata); MG_EXPORT void scrolled_destroy (PSCRDATA pscrdata);
MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam); MG_EXPORT void scrolled_hscroll (HWND hWnd, PSCRDATA pscrdata, WPARAM wParam, LPARAM lParam);
+9 -4
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming * Copyright (C) 1998~2002, WEI Yongming
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -493,10 +493,15 @@ LRESULT ScrollViewCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
break; break;
} }
case MSG_DESTROY: case MSG_DESTROY: {
scrollview_destroy (psvdata); /* suppress a warning about calling free() before using the pointer */
free (psvdata); PSVDATA svdata = (PSVDATA) GetWindowAdditionalData2 (hWnd);
if (svdata) {
scrollview_destroy(svdata);
free (svdata);
}
break; break;
}
case MSG_GETDLGCODE: case MSG_GETDLGCODE:
return DLGC_WANTARROWS; return DLGC_WANTARROWS;
+1 -4
View File
@@ -2096,7 +2096,6 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
rcInv.right = ptedata->svdata.scrdata.nContWidth; rcInv.right = ptedata->svdata.scrdata.nContWidth;
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH; rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
REFRESH_NODE_EX(node, &rcInv); REFRESH_NODE_EX(node, &rcInv);
// UpdateWindow(hWnd, FALSE);
newlinenr = NODE_LINENR(node); newlinenr = NODE_LINENR(node);
rcInv.left = 0; rcInv.left = 0;
@@ -2104,12 +2103,10 @@ static void teOnChar (HWND hWnd, PTEDATA ptedata, WPARAM wParam)
rcInv.top += ptedata->nLineHeight; rcInv.top += ptedata->nLineHeight;
rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH; rcInv.bottom = rcInv.top + ptedata->nLineHeight - ptedata->nLineBaseH;
REFRESH_NODE_EX(node, &rcInv); REFRESH_NODE_EX(node, &rcInv);
// UpdateWindow(hWnd, FALSE);
} }
/* houhh 20090814, UpdataWindow will invalidate all edit area, but /* houhh 20090814, UpdataWindow will invalidate all edit area, but
* erase area is not same with msg_paint area.*/ * erase area is not same with msg_paint area.*/
UpdateWindow(hWnd, FALSE); UpdateInvalidClient(hWnd, TRUE);
//SendMessage(hWnd, MSG_PAINT, 0, 0);
} }
} }
else { else {
+2 -2
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2002~2022, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming * Copyright (C) 1998~2002, WEI Yongming
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -283,7 +283,7 @@ static void DrawCoolBox (HWND hWnd, HDC hdc, PCOOLBARCTRL pdata)
WINDOWINFO *info; WINDOWINFO *info;
RECT rc; RECT rc;
if (tmpdata->Caption == NULL || tmpdata->Caption [0] == '\0') if (tmpdata->Caption [0] == '\0')
break; break;
GetTextExtent (hdc, tmpdata->Caption, -1, &size); GetTextExtent (hdc, tmpdata->Caption, -1, &size);
+4 -4
View File
@@ -80,17 +80,17 @@ static void update_viewport (gvGridViewData *view, int from, int to, int is_row)
{ {
RECT r; RECT r;
GetClientRect (view->hCtrl, &r); GetClientRect(view->hCtrl, &r);
if (is_row) { if (is_row) {
r.top = from; r.top = from;
ScrollWindow (view->hCtrl, 0, to, &r, NULL); ScrollWindow(view->hCtrl, 0, to, &r, NULL);
} }
else { else {
r.left = from; r.left = from;
ScrollWindow (view->hCtrl, to, 0, &r, NULL); ScrollWindow(view->hCtrl, to, 0, &r, NULL);
} }
UpdateWindow(view->hCtrl, FALSE); UpdateInvalidClient(view->hCtrl, FALSE);
} }
// scroll function {{{ // scroll function {{{
+2
View File
@@ -157,6 +157,8 @@ static int isInItem (MgList *mglst, int mouseX, int mouseY,
index = row * pivlist->nCol + col; index = row * pivlist->nCol + col;
pci = (IconviewItem *)mglist_getitem_byindex (mglst, index); pci = (IconviewItem *)mglist_getitem_byindex (mglst, index);
if (pci == NULL)
return -1;
if (pRet) if (pRet)
*pRet = (MgItem*)pci; *pRet = (MgItem*)pci;
+10 -17
View File
@@ -93,14 +93,15 @@ BOOL RegisterTreeViewControl (void)
const WINDOW_ELEMENT_RENDERER * rdr = const WINDOW_ELEMENT_RENDERER * rdr =
GetDefaultWindowElementRenderer(); GetDefaultWindowElementRenderer();
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
if (!(icon_fold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_FOLD, szValue)))) { SYSICON_FOLD, szValue)))) {
if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) { if (!(icon_fold = LoadSystemIcon (SYSICON_FOLD, 0))) {
return FALSE; return FALSE;
} }
} }
if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name, SYSICON_UNFOLD, szValue)))) { if (!(icon_unfold = (HICON)RetrieveRes(gui_GetIconFile(rdr->name,
SYSICON_UNFOLD, szValue)))) {
if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) { if (!(icon_unfold = LoadSystemIcon (SYSICON_UNFOLD, 0))) {
DestroyIcon (icon_fold); DestroyIcon (icon_fold);
icon_fold = 0; icon_fold = 0;
@@ -180,6 +181,7 @@ static BOOL tvInitTVData (HWND hwnd, PTVDATA pData, DWORD dwStyle, PTVITEMINFO r
tvRoot->hIconFold = root_ii->hIconFold; tvRoot->hIconFold = root_ii->hIconFold;
else else
tvRoot->hIconFold = ICON_FOLD; tvRoot->hIconFold = ICON_FOLD;
if (root_ii && root_ii->hIconUnfold) if (root_ii && root_ii->hIconUnfold)
tvRoot->hIconUnfold = root_ii->hIconUnfold; tvRoot->hIconUnfold = root_ii->hIconUnfold;
else else
@@ -632,22 +634,13 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
centerX += (h>>1) + TV_BOXGAP; centerX += (h>>1) + TV_BOXGAP;
if (pData->dwStyle & TVS_WITHICON) { if (pData->dwStyle & TVS_WITHICON) {
if (!(pData->dwStyle & TVS_ICONFORSELECT) if (p->child != NULL && (p->dwFlags & TVIF_FOLD)) {
&& (!p->child || (p->dwFlags & TVIF_FOLD))) {
if ((p->hIconFold)) { if ((p->hIconFold)) {
DrawIcon (hdc, centerX, centerY - (h>>1), DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconFold);
h, h, p->hIconFold);
}
} else if ((pData->dwStyle & TVS_ICONFORSELECT) && p->dwFlags & TVIF_SELECTED) {
if ((p->hIconFold)) {
DrawIcon (hdc, centerX, centerY - (h>>1),
h, h, p->hIconFold);
}
} else
if ((p->hIconUnfold)) {
DrawIcon (hdc, centerX, centerY - (h>>1),
h, h, p->hIconUnfold);
} }
} else if ((p->hIconUnfold)) {
DrawIcon (hdc, centerX, centerY - (h>>1), h, h, p->hIconUnfold);
}
centerX += h + TV_ICONGAP; centerX += h + TV_ICONGAP;
} }
+12
View File
@@ -202,6 +202,17 @@ static void destroy (GLYPHTREENODE *root)
/*** device font ops ***/ /*** device font ops ***/
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
return DEVFONTGLYPHTYPE_PRERDRBMP; return DEVFONTGLYPHTYPE_PRERDRBMP;
@@ -380,6 +391,7 @@ static int get_glyph_bbox (LOGFONT* logfont, DEVFONT* devfont,
/**************************** Global data ************************************/ /**************************** Global data ************************************/
FONTOPS __mg_bitmap_font_ops = { FONTOPS __mg_bitmap_font_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+19 -16
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming * Copyright (C) 1998~2002, WEI Yongming
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -226,7 +226,7 @@ static int iso8859_6_conv_from_uc32 (Uchar32 wc, unsigned char* mchar)
} }
#endif #endif
/* must attetion the para s is arabic chv value.*/ #if 0
static int is_arabic_char_vowel(Uint8 c) static int is_arabic_char_vowel(Uint8 c)
{ {
@@ -240,6 +240,7 @@ static int is_arabic_char_vowel(Uint8 c)
*/ */
return 0; return 0;
} }
#endif
/* ISO8859-6 charset vowel relative define and judge */ /* ISO8859-6 charset vowel relative define and judge */
#define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN)) #define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN))
@@ -461,15 +462,18 @@ static int iso8859_6_len_first_char (const unsigned char* mstr, int len)
return 2; return 2;
else if (ignore == 2) else if (ignore == 2)
return 3; return 3;
else
return 1;
return 1;
} }
#define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6)) #define ISARABIC_LIG_HALF(s) ((s == 0xa5) || (s == 0xa6))
static unsigned int iso8859_6_char_type (Achar32 chv) static unsigned int iso8859_6_char_type (Achar32 chv)
{ {
chv = REAL_ACHAR(chv);
#if 1
return sb_char_type(chv);
#else
unsigned int ch_type = ACHAR_BASIC_UNKNOWN; unsigned int ch_type = ACHAR_BASIC_UNKNOWN;
if (is_arabic_char_vowel (chv)) { /* is vowel */ if (is_arabic_char_vowel (chv)) { /* is vowel */
@@ -480,10 +484,10 @@ static unsigned int iso8859_6_char_type (Achar32 chv)
} }
return ch_type; return ch_type;
#endif
} }
static BidiType __mg_iso8859_6_bidi_char_type_map[] = { static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
#if 0
/*0x00~0x0f*/ /*0x00~0x0f*/
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
@@ -531,7 +535,6 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
#endif
/*0x80~0x8f*/ /*0x80~0x8f*/
BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_ON, BIDI_TYPE_AL, BIDI_TYPE_AL, BIDI_TYPE_AL,
@@ -606,10 +609,9 @@ static BidiType __mg_iso8859_6_bidi_char_type_map[] = {
static BidiType iso8859_6_bidi_char_type (Achar32 chv) static BidiType iso8859_6_bidi_char_type (Achar32 chv)
{ {
chv = REAL_ACHAR(chv); chv = REAL_ACHAR(chv);
if (chv > 0x7F) assert(chv < TABLESIZE(__mg_iso8859_6_bidi_char_type_map));
return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv - 0x80];
else return (BidiType)__mg_iso8859_6_bidi_char_type_map[chv];
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
} }
static int get_table_index(Uint8 c) static int get_table_index(Uint8 c)
@@ -796,7 +798,7 @@ static const unsigned char* iso8859_6_get_next_word (const unsigned char* mstr,
static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar, static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
int cur_len, int shape_type) int cur_len, int shape_type)
{ {
Achar32 chv = -1; Achar32 chv = INV_ACHAR_VALUE;
int ignore; int ignore;
int index; int index;
@@ -811,15 +813,14 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
} }
} }
if (chv == -1 || chv == 0) { if (chv == INV_ACHAR_VALUE || chv == 0) {
if (ISARABIC_VOWEL(*cur_mchar)){ if (ISARABIC_VOWEL(*cur_mchar)){
chv = fontset_68x_get_vowel_char(*cur_mchar); chv = fontset_68x_get_vowel_char(*cur_mchar);
} }
if (chv == 0 || chv == -1) { if (chv == 0 || chv == INV_ACHAR_VALUE) {
index = get_table_index(*cur_mchar); index = get_table_index(*cur_mchar);
if (index >=0) if (index >=0 ) {
{
switch (shape_type) { switch (shape_type) {
case ACHAR_ISOLATED: case ACHAR_ISOLATED:
chv = shape_info[index].isolated; chv = shape_info[index].isolated;
@@ -841,7 +842,7 @@ static Achar32 iso8859_6_get_shaped_char_value (const unsigned char* cur_mchar,
} }
if (chv == 0) if (chv == 0)
chv =-1; chv = INV_ACHAR_VALUE;
return chv; return chv;
} }
@@ -862,6 +863,7 @@ static const BIDICHAR_MIRROR_MAP __mg_iso8859_68x_mirror_table [] =
static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored) static BOOL iso8859_6_bidi_mirror_char (Achar32 chv, Achar32* mirrored)
{ {
chv = REAL_ACHAR(chv);
return get_mirror_char (__mg_iso8859_68x_mirror_table, return get_mirror_char (__mg_iso8859_68x_mirror_table,
TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored); TABLESIZE (__mg_iso8859_68x_mirror_table), chv, mirrored);
} }
@@ -871,6 +873,7 @@ static CHARSETOPS CharsetOps_iso8859_6 = {
3, 3,
FONT_CHARSET_ISO8859_6, FONT_CHARSET_ISO8859_6,
0, 0,
1,
iso8859_6_len_first_char, iso8859_6_len_first_char,
iso8859_6_get_char_value, iso8859_6_get_char_value,
iso8859_6_get_shaped_char_value, iso8859_6_get_shaped_char_value,
+33 -2
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming * Copyright (C) 1998~2002, WEI Yongming
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -210,6 +210,8 @@ static unsigned int unicode_char_type (Achar32 chv)
mchar_type = ACHAR_BASIC_LF; mchar_type = ACHAR_BASIC_LF;
else if (break_type == UCHAR_BREAK_SPACE) else if (break_type == UCHAR_BREAK_SPACE)
mchar_type = ACHAR_BASIC_SPACE; mchar_type = ACHAR_BASIC_SPACE;
else if (basic_type == UCHAR_CATEGORY_NON_SPACING_MARK)
mchar_type = ACHAR_BASIC_VOWEL;
else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type)) else if (chv != 0x00AD && ISZEROWIDTHTYPE (basic_type))
mchar_type = ACHAR_BASIC_ZEROWIDTH; mchar_type = ACHAR_BASIC_ZEROWIDTH;
else if ((chv >= 0x1160 && chv < 0x1200) else if ((chv >= 0x1160 && chv < 0x1200)
@@ -239,10 +241,36 @@ static const BidiType linear_enum_to_bidi_type[] = {
#undef _UNIBIDI_ADD_TYPE #undef _UNIBIDI_ADD_TYPE
}; };
/* Since 5.0.13: this function only returns BidiType which
is recognizable by the legacy BIDI algorithm. */
static BidiType unicode_bidi_char_type(Achar32 ch) static BidiType unicode_bidi_char_type(Achar32 ch)
{ {
ch = REAL_ACHAR(ch); ch = REAL_ACHAR(ch);
return linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)]; BidiType bt = linear_enum_to_bidi_type[UNIBIDI_GET_BIDI_TYPE(ch)];
switch (bt) {
case BIDI_TYPE_LTR:
case BIDI_TYPE_RTL:
case BIDI_TYPE_AL:
case BIDI_TYPE_EN:
case BIDI_TYPE_AN:
case BIDI_TYPE_ET:
case BIDI_TYPE_CS:
case BIDI_TYPE_NSM:
case BIDI_TYPE_BN:
case BIDI_TYPE_BS:
case BIDI_TYPE_SS:
case BIDI_TYPE_WS:
case BIDI_TYPE_ON:
case BIDI_TYPE_SOT:
case BIDI_TYPE_EOT:
return bt;
default:
_DBG_PRINTF("Not recognizable for char (0x%04x): %u\n", ch, bt);
break;
}
return BIDI_TYPE_WS;
} }
BidiType GUIAPI UCharGetBidiType(Uchar32 uc) BidiType GUIAPI UCharGetBidiType(Uchar32 uc)
@@ -628,6 +656,7 @@ CHARSETOPS __mg_CharsetOps_utf8 = {
6, 6,
FONT_CHARSET_UTF8, FONT_CHARSET_UTF8,
0, 0,
0,
utf8_len_first_char, utf8_len_first_char,
utf8_get_char_value, utf8_get_char_value,
NULL, NULL,
@@ -854,6 +883,7 @@ CHARSETOPS __mg_CharsetOps_utf16le = {
4, 4,
FONT_CHARSET_UTF16LE, FONT_CHARSET_UTF16LE,
0, 0,
0,
utf16le_len_first_char, utf16le_len_first_char,
utf16le_get_char_value, utf16le_get_char_value,
NULL, NULL,
@@ -1080,6 +1110,7 @@ CHARSETOPS __mg_CharsetOps_utf16be = {
4, 4,
FONT_CHARSET_UTF16BE, FONT_CHARSET_UTF16BE,
0, 0,
0,
utf16be_len_first_char, utf16be_len_first_char,
utf16be_get_char_value, utf16be_get_char_value,
NULL, NULL,
+30 -7
View File
@@ -15,7 +15,7 @@
* and Graphics User Interface (GUI) support system for embedded systems * and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices. * and smart IoT devices.
* *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. * Copyright (C) 2002~2023, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming * Copyright (C) 1998~2002, WEI Yongming
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@@ -49,6 +49,8 @@
** Create date: 2000/06/13 ** Create date: 2000/06/13
*/ */
#undef NDEBUG
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -233,6 +235,7 @@ static CHARSETOPS CharsetOps_ascii = {
1, 1,
FONT_CHARSET_US_ASCII, FONT_CHARSET_US_ASCII,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -296,6 +299,7 @@ static CHARSETOPS CharsetOps_iso8859_1 = {
1, 1,
FONT_CHARSET_ISO8859_1, FONT_CHARSET_ISO8859_1,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -407,6 +411,7 @@ static CHARSETOPS CharsetOps_iso8859_2 = {
1, 1,
FONT_CHARSET_ISO8859_2, FONT_CHARSET_ISO8859_2,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -519,6 +524,7 @@ static CHARSETOPS CharsetOps_iso8859_3 = {
1, 1,
FONT_CHARSET_ISO8859_3, FONT_CHARSET_ISO8859_3,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -632,6 +638,7 @@ static CHARSETOPS CharsetOps_iso8859_4 = {
1, 1,
FONT_CHARSET_ISO8859_4, FONT_CHARSET_ISO8859_4,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -726,6 +733,7 @@ static CHARSETOPS CharsetOps_iso8859_5 = {
1, 1,
FONT_CHARSET_ISO8859_5, FONT_CHARSET_ISO8859_5,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -884,6 +892,7 @@ static CHARSETOPS CharsetOps_iso8859_7 = {
1, 1,
FONT_CHARSET_ISO8859_7, FONT_CHARSET_ISO8859_7,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -969,7 +978,6 @@ static const unsigned char* iso8859_8_get_next_word (const unsigned char* mstr,
} }
static BidiType __mg_iso8859_8_bidi_char_type_map[] = { static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
#if 0
/*0x00~0x0f*/ /*0x00~0x0f*/
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
@@ -1017,7 +1025,6 @@ static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR,
BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_LTR, BIDI_TYPE_ON,
BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_ON, BIDI_TYPE_BN,
#endif
/*0x80~0x8f*/ /*0x80~0x8f*/
BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN, BIDI_TYPE_BN,
@@ -1072,10 +1079,9 @@ static BidiType __mg_iso8859_8_bidi_char_type_map[] = {
static BidiType iso8859_8_bidi_char_type (Achar32 chv) static BidiType iso8859_8_bidi_char_type (Achar32 chv)
{ {
chv = REAL_ACHAR(chv); chv = REAL_ACHAR(chv);
if (chv > 0x7F) assert(chv < TABLESIZE(__mg_iso8859_8_bidi_char_type_map));
return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv - 0x80];
else return (BidiType)__mg_iso8859_8_bidi_char_type_map[chv];
return (BidiType)__mg_iso8859_1_bidi_char_type_map[chv];
} }
static const BIDICHAR_MIRROR_MAP __mg_iso8859_8_mirror_table [] = static const BIDICHAR_MIRROR_MAP __mg_iso8859_8_mirror_table [] =
@@ -1160,6 +1166,7 @@ static CHARSETOPS CharsetOps_iso8859_8 = {
2, // This is a trick for bidi reorder only implemented for MBC. 2, // This is a trick for bidi reorder only implemented for MBC.
FONT_CHARSET_ISO8859_8, FONT_CHARSET_ISO8859_8,
0, 0,
1,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1261,6 +1268,7 @@ static CHARSETOPS CharsetOps_iso8859_9 = {
1, 1,
FONT_CHARSET_ISO8859_9, FONT_CHARSET_ISO8859_9,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1374,6 +1382,7 @@ static CHARSETOPS CharsetOps_iso8859_10 = {
1, 1,
FONT_CHARSET_ISO8859_10, FONT_CHARSET_ISO8859_10,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1486,6 +1495,7 @@ static CHARSETOPS CharsetOps_iso8859_11 = {
1, 1,
FONT_CHARSET_ISO8859_11, FONT_CHARSET_ISO8859_11,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1598,6 +1608,7 @@ static CHARSETOPS CharsetOps_iso8859_13 = {
1, 1,
FONT_CHARSET_ISO8859_13, FONT_CHARSET_ISO8859_13,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1710,6 +1721,7 @@ static CHARSETOPS CharsetOps_iso8859_14 = {
1, 1,
FONT_CHARSET_ISO8859_14, FONT_CHARSET_ISO8859_14,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1821,6 +1833,7 @@ static CHARSETOPS CharsetOps_iso8859_15 = {
1, 1,
FONT_CHARSET_ISO8859_15, FONT_CHARSET_ISO8859_15,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -1971,6 +1984,7 @@ static CHARSETOPS CharsetOps_iso8859_16 = {
1, 1,
FONT_CHARSET_ISO8859_16, FONT_CHARSET_ISO8859_16,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -2168,6 +2182,7 @@ static CHARSETOPS CharsetOps_gb2312_0 = {
2, 2,
FONT_CHARSET_GB2312_0, FONT_CHARSET_GB2312_0,
0, 0,
0,
gb2312_0_len_first_char, gb2312_0_len_first_char,
gb2312_0_get_char_value, gb2312_0_get_char_value,
NULL, NULL,
@@ -2325,6 +2340,7 @@ static CHARSETOPS CharsetOps_gbk = {
2, 2,
FONT_CHARSET_GBK, FONT_CHARSET_GBK,
0, 0,
0,
gbk_len_first_char, gbk_len_first_char,
gbk_get_char_value, gbk_get_char_value,
NULL, NULL,
@@ -2593,6 +2609,7 @@ static CHARSETOPS CharsetOps_gb18030_0 = {
4, 4,
FONT_CHARSET_GB18030_0, FONT_CHARSET_GB18030_0,
0, 0,
0,
gb18030_0_len_first_char, gb18030_0_len_first_char,
gb18030_0_get_char_value, gb18030_0_get_char_value,
NULL, NULL,
@@ -2750,6 +2767,7 @@ static CHARSETOPS CharsetOps_big5 = {
2, 2,
FONT_CHARSET_BIG5, FONT_CHARSET_BIG5,
0, 0,
0,
big5_len_first_char, big5_len_first_char,
big5_get_char_value, big5_get_char_value,
NULL, NULL,
@@ -2896,6 +2914,7 @@ static CHARSETOPS CharsetOps_ksc5601_0 = {
2, 2,
FONT_CHARSET_EUCKR, FONT_CHARSET_EUCKR,
0, 0,
0,
ksc5601_0_len_first_char, ksc5601_0_len_first_char,
ksc5601_0_get_char_value, ksc5601_0_get_char_value,
NULL, NULL,
@@ -3020,6 +3039,7 @@ static CHARSETOPS CharsetOps_jisx0201_0 = {
1, 1,
FONT_CHARSET_JISX0201_0, FONT_CHARSET_JISX0201_0,
0, 0,
0,
jisx0201_0_len_first_char, jisx0201_0_len_first_char,
jisx0201_0_get_char_value, jisx0201_0_get_char_value,
NULL, NULL,
@@ -3163,6 +3183,7 @@ static CHARSETOPS CharsetOps_jisx0208_0 = {
2, 2,
FONT_CHARSET_JISX0208_0, FONT_CHARSET_JISX0208_0,
0, 0,
0,
jisx0208_0_len_first_char, jisx0208_0_len_first_char,
jisx0208_0_get_char_value, jisx0208_0_get_char_value,
NULL, NULL,
@@ -3248,6 +3269,7 @@ static CHARSETOPS CharsetOps_jisx0201_1 = {
1, 1,
FONT_CHARSET_JISX0201_1, FONT_CHARSET_JISX0201_1,
0, 0,
0,
sb_len_first_char, sb_len_first_char,
sb_get_char_value, sb_get_char_value,
NULL, NULL,
@@ -3419,6 +3441,7 @@ static CHARSETOPS CharsetOps_jisx0208_1 = {
2, 2,
FONT_CHARSET_JISX0208_1, FONT_CHARSET_JISX0208_1,
0, 0,
0,
jisx0208_1_len_first_char, jisx0208_1_len_first_char,
jisx0208_1_get_char_value, jisx0208_1_get_char_value,
NULL, NULL,
+12
View File
@@ -255,6 +255,17 @@ compute_kernval (TTFINSTANCEINFO* ttf_inst_info)
return kernval; return kernval;
} }
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
if (logfont->style & FS_WEIGHT_BOOK) if (logfont->style & FS_WEIGHT_BOOK)
@@ -792,6 +803,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
} }
/**************************** Global data ************************************/ /**************************** Global data ************************************/
FONTOPS __mg_ttf_ops = { FONTOPS __mg_ttf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+13 -1
View File
@@ -197,6 +197,17 @@ print_bitmap_grey (const BYTE* buffer, int width, int rows, int pitch)
printf("*******************************************\n"); printf("*******************************************\n");
} }
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 1;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
switch (logfont->style & FS_RENDER_MASK) { switch (logfont->style & FS_RENDER_MASK) {
@@ -735,9 +746,9 @@ get_glyph_advance (LOGFONT* logfont, DEVFONT* devfont,
pcache->valid_advance = 1; pcache->valid_advance = 1;
} }
} }
done:
#endif #endif
done:
FT_UNLOCK(&ft_lock); FT_UNLOCK(&ft_lock);
if (px) { if (px) {
@@ -1265,6 +1276,7 @@ void font_TermFreetypeLibrary (void)
/**************************** Global data ************************************/ /**************************** Global data ************************************/
FONTOPS __mg_ttf_ops = { FONTOPS __mg_ttf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+2 -3
View File
@@ -88,7 +88,6 @@ typedef int (* MakeHashKeyFunc)(Glyph32 gv);
typedef struct tagFTFACEINFO { typedef struct tagFTFACEINFO {
char* filepathname; char* filepathname;
FT_Face face; FT_Face face;
BOOL valid;
#ifdef _MGFONT_TTF_CACHE #ifdef _MGFONT_TTF_CACHE
int face_index; int face_index;
int cmap_index; int cmap_index;
@@ -163,13 +162,13 @@ extern void __mg_ttc_sys_deinit(void);
extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size); extern TTFCACHEINFO *__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size);
extern void __mg_ttc_refer(HCACHE hCache); extern void __mg_ttc_refer(HCACHE hCache);
#endif /* _MGFONT_TTF_CACHE */
#ifdef _MGCOMPLEX_SCRIPTS #ifdef _MGCOMPLEX_SCRIPTS
extern void __mg_init_harzbuff_funcs(void); extern void __mg_init_harzbuff_funcs(void);
extern void __mg_term_harzbuff_funcs(void); extern void __mg_term_harzbuff_funcs(void);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
+15 -9
View File
@@ -703,21 +703,20 @@ void __mg_legacy_bidi_get_embeddlevels (const CHARSETOPS* charset_ops,
print_hexstr(achars, len, TRUE); print_hexstr(achars, len, TRUE);
} }
#if 0
static void bidi_map_reverse (void* context, int len, int pos) static void bidi_map_reverse (void* context, int len, int pos)
{ {
GLYPHMAPINFO* str = (GLYPHMAPINFO*)context + pos; ACHARMAPINFO* str = (ACHARMAPINFO*)context + pos;
int i; int i;
for (i = 0; i < len / 2; i++) for (i = 0; i < len / 2; i++)
{ {
GLYPHMAPINFO tmp = str[i]; ACHARMAPINFO tmp = str[i];
str[i] = str[len - 1 - i]; str[i] = str[len - 1 - i];
str[len - 1 - i] = tmp; str[len - 1 - i] = tmp;
} }
} }
Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops, Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, GLYPHMAPINFO* map, int pel) Achar32* achars, int len, int pel, ACHARMAPINFO* map)
{ {
BYTE max_level = 1; BYTE max_level = 1;
TYPERUN *type_rl_list = NULL; TYPERUN *type_rl_list = NULL;
@@ -725,6 +724,7 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
int i; int i;
int run_pos; int run_pos;
int run_len; int run_len;
REORDER_CONTEXT rc;
print_hexstr(achars, len, FALSE); print_hexstr(achars, len, FALSE);
@@ -735,14 +735,15 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
run_pos = node_p->pos; run_pos = node_p->pos;
run_len = node_p->len; run_len = node_p->len;
for (i=0; i<run_len; i++) for (i=0; i<run_len; i++) {
{
(map+run_pos+i)->is_rtol = (node_p)->level & 1; (map+run_pos+i)->is_rtol = (node_p)->level & 1;
} }
} }
bidi_reorder_cb(map, len, &type_rl_list, max_level, rc.achars = NULL;
bidi_map_reverse); rc.extra = map;
rc.cb = bidi_map_reverse;
bidi_reorder(&rc, len, &type_rl_list, max_level);
/* free typerun list.*/ /* free typerun list.*/
free_typerun_list(type_rl_list); free_typerun_list(type_rl_list);
@@ -752,18 +753,23 @@ Achar32* __mg_legacy_bidi_map_reorder (const CHARSETOPS* charset_ops,
return achars; return achars;
} }
#if 0
Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops, Achar32* __mg_legacy_bidi_index_reorder (const CHARSETOPS* charset_ops,
Achar32* achars, int len, int* index_map, int pel) Achar32* achars, int len, int* index_map, int pel)
{ {
BYTE max_level = 1; BYTE max_level = 1;
TYPERUN *type_rl_list = NULL; TYPERUN *type_rl_list = NULL;
REORDER_CONTEXT rc;
print_hexstr(achars, len, FALSE); print_hexstr(achars, len, FALSE);
/* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */ /* W1~W7, N1~N2, I1~I2, Get the Embedding Level. */
bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level); bidi_resolve_string (charset_ops, achars, len, pel, &type_rl_list, &max_level);
bidi_reorder_cb(index_map, len, &type_rl_list, max_level, rc.achars = achars;
rc.extra = extra;
rc.cb = cb_reverse_extra;
bidi_reorder(index_map, len, &type_rl_list, max_level,
bidi_string_reverse); bidi_string_reverse);
/* free typerun list.*/ /* free typerun list.*/
+12
View File
@@ -66,6 +66,17 @@
#define NUF_WIDTH 8 #define NUF_WIDTH 8
#define NUF_HEIGHT 1 #define NUF_HEIGHT 1
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
return DEVFONTGLYPHTYPE_MONOBMP; return DEVFONTGLYPHTYPE_MONOBMP;
@@ -171,6 +182,7 @@ static void unload_font_data (DEVFONT* devfont, void* data)
} }
FONTOPS __mg_null_font_ops = { FONTOPS __mg_null_font_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+12
View File
@@ -287,6 +287,17 @@ static unsigned char def_smooth_bitmap [] =
static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap}; static QPF_GLYPH def_glyph = {&def_metrics, def_bitmap};
static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap}; static QPF_GLYPH def_smooth_glyph = {&def_smooth_metrics, def_smooth_bitmap};
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH) if (QPFONT_INFO_P (devfont)->fm->flags & FLAG_MODE_SMOOTH)
@@ -541,6 +552,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
/**************************** Global data ************************************/ /**************************** Global data ************************************/
FONTOPS __mg_qpf_ops = { FONTOPS __mg_qpf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+12
View File
@@ -151,6 +151,17 @@ static void unload_font_data (DEVFONT* devfont, void* data)
/*************** Raw bitmap font operations *********************************/ /*************** Raw bitmap font operations *********************************/
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
return DEVFONTGLYPHTYPE_MONOBMP; return DEVFONTGLYPHTYPE_MONOBMP;
@@ -280,6 +291,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
/**************************** Global data ************************************/ /**************************** Global data ************************************/
FONTOPS __mg_rbf_ops = { FONTOPS __mg_rbf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_ave_width, // max_width same as ave_width get_ave_width, // max_width same as ave_width
+12
View File
@@ -377,6 +377,17 @@ static int get_max_width (LOGFONT* logfont, DEVFONT* devfont)
return logfont->size; return logfont->size;
} }
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
if (logfont->style & FS_WEIGHT_BOOK) if (logfont->style & FS_WEIGHT_BOOK)
@@ -598,6 +609,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
/**************************** Global data ************************************/ /**************************** Global data ************************************/
static FONTOPS scripteasy_font_ops = { static FONTOPS scripteasy_font_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+4 -1
View File
@@ -155,7 +155,10 @@ BOOL mg_InitSysFont (void)
goto error_load; goto error_load;
} }
if ((sys_fonts[i] = CreateLogFont (type, family, charset, /* VW 20221003: use CreateLogFontEx instead of CreateLogFont to
follow the new style convention of font name,
but the orientation is ignored for the system logfont. */
if ((sys_fonts[i] = CreateLogFontEx (type, family, charset,
style [0], style [1], style [2], style [0], style [1], style [2],
style [3], style [4], style [5], style [3], style [4], style [5],
height, 0)) == NULL) { height, 0)) == NULL) {
+2 -3
View File
@@ -377,8 +377,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD || uc == 0x8E2 || uc == 0xD4E || uc == 0x110BD ||
(uc >= 0x111C2 && uc <= 0x111C3)) { (uc >= 0x111C2 && uc <= 0x111C3)) {
gbt = GB_Prepend; gbt = GB_Prepend;
break;
} }
break;
case UCHAR_CATEGORY_CONTROL: case UCHAR_CATEGORY_CONTROL:
case UCHAR_CATEGORY_LINE_SEPARATOR: case UCHAR_CATEGORY_LINE_SEPARATOR:
@@ -393,8 +393,8 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
if ((uc >= 0xFFF0 && uc <= 0xFFF8) || if ((uc >= 0xFFF0 && uc <= 0xFFF8) ||
(uc >= 0xE0000 && uc <= 0xE0FFF)) { (uc >= 0xE0000 && uc <= 0xE0FFF)) {
gbt = GB_ControlCRLF; gbt = GB_ControlCRLF;
break;
} }
break;
case UCHAR_CATEGORY_OTHER_LETTER: case UCHAR_CATEGORY_OTHER_LETTER:
if (ctxt->makes_hangul_syllable) if (ctxt->makes_hangul_syllable)
@@ -434,7 +434,6 @@ static _GBType resolve_gbt(struct break_ctxt* ctxt,
gbt = GB_RI_Odd; gbt = GB_RI_Odd;
else else
gbt = GB_RI_Odd; gbt = GB_RI_Odd;
break;
} }
break; break;
+12
View File
@@ -148,6 +148,17 @@ static void unload_font_data (DEVFONT* devfont, void* data)
free (((UPFINFO*) data)); free (((UPFINFO*) data));
} }
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir; Uint8* p_upf = (Uint8 *)UPFONT_INFO_P (devfont)->root_dir;
@@ -525,6 +536,7 @@ static int is_rotatable (LOGFONT* logfont, DEVFONT* devfont, int rot_desired)
} }
FONTOPS __mg_upf_ops = { FONTOPS __mg_upf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,
+12
View File
@@ -109,6 +109,17 @@ typedef struct _FONT_PROPT {
int def_glyph; int def_glyph;
} FONT_PROPT; } FONT_PROPT;
static DWORD get_feature (LOGFONT* logfont, DEVFONT* devfont,
enum devfont_feature feature)
{
switch (feature) {
case DEVFONT_FEATURE_MARK_BBOX:
return 0;
}
return 0;
}
static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont) static DWORD get_glyph_bmptype (LOGFONT* logfont, DEVFONT* devfont)
{ {
return DEVFONTGLYPHTYPE_MONOBMP; return DEVFONTGLYPHTYPE_MONOBMP;
@@ -477,6 +488,7 @@ static void unload_font_data (DEVFONT* devfont, void* data)
} }
FONTOPS __mg_vbf_ops = { FONTOPS __mg_vbf_ops = {
get_feature,
get_glyph_bmptype, get_glyph_bmptype,
get_ave_width, get_ave_width,
get_max_width, get_max_width,

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