Compare commits

..
900 Commits
Author SHA1 Message Date
Vincent Wei f80333141b change version to 4.9.1 2020-03-11 20:35:53 +08:00
Vincent Wei ec641f0207 remove duplicated getMsgQueueForThisThread 2020-03-11 19:28:41 +08:00
Vincent Wei 666aeea115 tune implementation of MSG_ENDSESSION for THS runmode 2020-03-11 19:22:34 +08:00
Vincent Wei 0059a3226c rename mg_GetMsgQueueForThisThread to getMsgQueueForThisThread and make it inline; Register message queue when allocating it 2020-03-11 19:21:24 +08:00
Vincent Wei 0a42eadb4c no need to check compositing when calling GAL_GetVideo 2020-03-11 18:33:21 +08:00
Vincent Wei e3a167002d fix conditional compilation errors 2020-03-11 18:02:58 +08:00
Vincent Wei 6832e6e469 use a trick to allocate shadow screen buffer from hardware; cleanup 2020-03-11 17:49:57 +08:00
Vincent Wei 48f63aaae7 disable alpha and colorkey for shadow screen 2020-03-11 17:16:02 +08:00
Vincent Wei 1f9fd7b0ec use common helpers of shadow screen for SetCursor, MoveCursor, UpdateRects, and SyncUpdate methods 2020-03-11 17:12:00 +08:00
Vincent Wei e51dc25c01 use double buffering for compositing schema 2020-03-11 17:10:57 +08:00
Vincent Wei 091ee787ee add shadow-screen.c and shadow-screen.h 2020-03-11 17:07:00 +08:00
Vincent Wei ed5005abd4 common helpers for double buffering screen 2020-03-11 17:06:31 +08:00
Vincent Wei 7601b99f59 cleanup 2020-03-11 10:24:56 +08:00
Vincent Wei 8e79449de1 fix a memory leak: we must free the surface for popup menu when delete the memdc, or it can not be freed actually due to the referenced count. 2020-03-11 10:23:31 +08:00
Vincent Wei 3769b1d38f do not call any GDI functions in mg_TerminateScreenDC 2020-03-11 09:31:33 +08:00
Vincent Wei 2843b1319e tune nr_of_all_znodes for zorder levels; make ENDSESSION works 2020-03-11 09:31:01 +08:00
Vincent Wei b8c5ad5c64 tune README 2020-03-10 22:30:56 +08:00
Vincent Wei 9a3d8cece3 tune doxygen words 2020-03-10 21:49:18 +08:00
Vincent Wei 6a2d2fccc8 enable RequestHWSurface for compositing schema 2020-03-10 18:50:28 +08:00
Vincent Wei f56529febf enable RequestHWSurface for compositing schema 2020-03-10 18:50:09 +08:00
Vincent Wei c6742049b7 copy mdev and free mdev 2020-03-10 18:49:33 +08:00
Vincent Wei e15ed80dba add mdev field to INPUT 2020-03-10 18:48:54 +08:00
Vincent Wei b48e05dfac tune options for console IAL engine. 2020-03-10 18:48:34 +08:00
Vincent Wei 8637e88a32 enable console IAL engine 2020-03-10 18:44:52 +08:00
Vincent Wei 4907004aec cleanup 2020-03-10 16:46:22 +08:00
Vincent Wei 0a6cd9070f do not check whether a GAL engine is ready for compositing schema 2020-03-10 16:46:06 +08:00
Vincent Wei 2a7564563a fix a typo 2020-03-10 16:44:19 +08:00
Vincent Wei bac4c54338 fix a bug: use (pci_accel_driver > 0) instead of (pci_accel_driver) 2020-03-10 16:43:38 +08:00
Vincent Wei 9dea1bb27f make some structures for PROCS avaialble for sharedfb schema 2020-03-10 16:42:29 +08:00
Vincent Wei b85fe42332 enable fbcon engine by default 2020-03-10 16:41:08 +08:00
Vincent Wei 7c39c22f7c tune __mg_throw_away_messages to handle TYPE_TODEL windows correctly; fix wrong handling of notification message list; do not reset idle counter when got a message for HWND_DESKTOP 2020-03-10 15:31:37 +08:00
Vincent Wei 76ca7b53dd change datatype to TYPE_WINTODEL before throwing away messages 2020-03-10 15:29:55 +08:00
Vincent Wei 5df58bdcbe no need force to close the menu when moving a window under compositing schema 2020-03-10 11:03:46 +08:00
Vincent Wei 1244daf153 tune description words 2020-03-10 11:03:18 +08:00
Vincent Wei b8a84b94aa more words 2020-03-10 11:01:55 +08:00
Vincent Wei 27ad9ee4b2 tune TOC 2020-03-09 17:49:42 +08:00
Vincent Wei 198e971fbd more description words; remove release notes for 4.0.x 2020-03-09 17:46:14 +08:00
Vincent Wei 2306767fd7 tune description words 2020-03-09 11:46:38 +08:00
Vincent Wei c063acb4a6 fix a bug: call SyncUpdate when cursor moved; cursor surface lost when it was moved 2020-03-08 19:52:40 +08:00
Vincent Wei 4214de8490 tune versions 2020-03-08 17:29:48 +08:00
Vincent Wei e67324ff91 update splash pictures 2020-03-07 19:31:24 +08:00
Vincent Wei ba5113ad1a handle auto-repeat messages 2020-03-06 21:52:19 +08:00
Vincent Wei f8b8e1b5fe change DESKTOP_TIMER_INERTVAL to 10 ticks to handle auto repeat messages 2020-03-06 21:51:50 +08:00
Vincent Wei f0414cddc1 Tune implementation of SetAutoRepeatMessage. We use mechanism like caret 2020-03-06 21:51:12 +08:00
Vincent Wei ff8b0af8b3 cleanup 2020-03-06 21:50:24 +08:00
Vincent Wei 33e33902a4 we do not genenrate MSG_TIMEOUT message any more 2020-03-06 21:48:31 +08:00
Vincent Wei f882b79a76 we do not genenrate MSG_TIMEOUT message any more 2020-03-06 21:47:23 +08:00
Vincent Wei 5b885ccee1 add MSG_SETAUTOREPEAT message 2020-03-06 21:46:30 +08:00
Vincent Wei da0cf8be8a restore the behavior of IncludeWindowStyle, ExcludeWindowStyle, IncludeExWindowStyle, and ExcludeWindowExStyle 2020-03-06 17:53:27 +08:00
Vincent Wei ae56fea196 tune IncludeWindowStyle, ExcludeWindowStyle, IncludeExWindowStyle, and ExcludeWindowExStyle to not allow change the system styles 2020-03-06 17:43:10 +08:00
Vincent Wei fd3662cea0 fix a bug: return HOOK_STOP for mouse messages sent to client 2020-03-06 17:31:37 +08:00
Vincent Wei 0d7a90d546 cleanup 2020-03-06 17:30:47 +08:00
Vincent Wei 38053abaa6 cleanup 2020-03-06 17:30:20 +08:00
Vincent Wei 70b310ec36 restore the old implementation of NotifyParentEx 2020-03-06 17:30:05 +08:00
Vincent Wei f8b939766a fix a bug: under compositing schema, for the secondary DC, we need to offset more based on the origin of the main window when updating the secondary DC 2020-03-06 15:53:19 +08:00
Vincent Wei 85a18df3ea remove old deprecated code 2020-03-06 15:52:16 +08:00
Vincent Wei b18460fe3a tune some constants 2020-03-06 15:51:51 +08:00
Vincent Wei 8a845ac965 fix some conditional compilation errors 2020-03-06 14:11:35 +08:00
Vincent Wei 1974d27deb make sure the event parsor thread is joinable 2020-03-06 11:09:08 +08:00
Vincent Wei 7f58a1775e tune 2020-03-06 11:08:44 +08:00
Vincent Wei 792359eb62 fix possible memory leaks for free notification message objects 2020-03-06 11:08:33 +08:00
Vincent Wei f23949349b add some helpers 2020-03-06 10:32:47 +08:00
Vincent Wei 50d0ec55eb fix memory leaks in ReleaseDC: do not set region for released DC in slots 2020-03-06 10:32:31 +08:00
Vincent Wei 243f24d0a3 fix memory leaks in VirtualWindwoCleanup and MainWindowCleanup 2020-03-06 10:31:31 +08:00
Vincent Wei b718a9a0aa fix memory leak for not deleting null devfonts 2020-03-06 10:31:09 +08:00
Vincent Wei 05802cee73 Remove unused field sync_msg in MSGQUEUE; improve __mg_throw_away_messages to free notification messages to block heap and compress the post message queue 2020-03-05 21:42:22 +08:00
Vincent Wei b85901dad0 tune description words; declare new API SendPriorNotifyMessage; Make EmptyMessageQueue available for all runmodes 2020-03-05 20:47:21 +08:00
Vincent Wei 030671ad7e add ERR_MSG_CANCELED and tune the error values 2020-03-05 20:44:09 +08:00
Vincent Wei 283c4e4bc4 mark a window as TODEL after calling ThrowAwayMessages; tune name of some internal inline functions 2020-03-05 13:04:31 +08:00
Vincent Wei 5812c11f7c tune GetRootWindow to return the number of windows 2020-03-04 22:52:36 +08:00
Vincent Wei 5224e31084 cleanup 2020-03-04 21:54:28 +08:00
Vincent Wei 71d0da248d use DFS for broadcast message 2020-03-04 20:58:23 +08:00
Vincent Wei 627a71346b cleanup 2020-03-04 20:57:09 +08:00
Vincent Wei 2c58b6aeab fix a bug: wrong values for WIN_SEARCH_FILTER_MAIN and WIN_SEARCH_FILTER_VIRT 2020-03-04 20:56:44 +08:00
Vincent Wei 90371bd793 rename GetSecondarySubDC to GetDCInSecondarySurface 2020-03-04 15:37:01 +08:00
Vincent Wei 152f97b82d implement GetDCEX; improve CreatePrivateDC and CreatePrivateClientDC to use secondary DC; tune GetSecondaryDC; implement __mg_delete_secondary_dc and tune DestroySecondaryDC; GetSecondarySubDC -> GetDCInSecondarySurface; implement GetEffectiveCDC; implement __mg_update_dc_on_surface_resized and __mg_update_dc_on_secondary_dc_changed 2020-03-04 15:36:34 +08:00
Vincent Wei e2c6225d22 always use CreatePrivateClientDC and DeletePrivateDC; call __mg_delete_secondary_dc instead of DeleteSecondaryDC when remove a main window; call __mg_update_dc_on_surface_changed for compositing schema when the underlying surface resized. 2020-03-04 15:30:26 +08:00
Vincent Wei 10c32236e7 always use CreatePrivateClientDC and DeletePrivateDC; call __mg_delete_secondary_dc instead of DeleteSecondaryDC when remove a main window 2020-03-04 15:29:23 +08:00
Vincent Wei 097e379ec2 add MG_IS_GRAPHICS_WINDOW 2020-03-04 15:28:00 +08:00
Vincent Wei bef9c5e476 add dump_gal_rect and dump_surface 2020-03-04 15:27:43 +08:00
Vincent Wei 88603deb44 tune get_effective_dc and release_effective_dc 2020-03-04 15:27:16 +08:00
Vincent Wei 38e189ad17 Always use CeratePrivateClientDC for private CDC; use __mg_delete_secondary_dc when destroying a window; call __mg_update_dc_on_secondary_dc_changed if secondary DC changed; cleanup code 2020-03-04 15:23:34 +08:00
Vincent Wei f27d0a96b4 introduce GetDCEx, GetDCInSecondarySurface, GetEffectiveCD; mark GetSecondaryClientDC, ReleaseSecondaryDC as deprecated; tune the description words 2020-03-04 15:21:04 +08:00
Vincent Wei 6d0fc20092 do not call dc_GenerateMemDCECRgn by force in __mg_check_ecrgn 2020-03-03 18:43:49 +08:00
Vincent Wei 4111e5a1b1 restore memset for a new RGBSurface 2020-03-03 18:38:36 +08:00
Vincent Wei 022b23ff32 inuse -> bInUse 2020-03-03 18:37:58 +08:00
Vincent Wei 56c5ddee01 tune __mg_check_ecrgn for seondary dc and compositing dc; fix a bug: calculate the correct DevRC for controls as main window under compositing schema. 2020-03-03 15:42:22 +08:00
Vincent Wei 039fa8a86a cleanup 2020-03-03 15:40:37 +08:00
Vincent Wei 01579a0a89 for invalid widht and or height, set a minimal size for the surface 2020-03-03 15:40:22 +08:00
Vincent Wei 06b783e0a8 cleanup 2020-03-03 15:38:38 +08:00
Vincent Wei 262bf68807 move gui_Control to ctrlclass.h as inline function 2020-03-03 15:38:17 +08:00
Vincent Wei cc20828ddd more words for 4.9.0 release notes 2020-03-02 21:31:14 +08:00
Vincent Wei 48037493f5 improve the fallback compositor 2020-03-02 19:29:15 +08:00
Vincent Wei 38c4a3e632 assign value to __mg_tick_counter when startup 2020-03-02 19:28:52 +08:00
Vincent Wei 404349dd45 tune the implementation of map: make sure that the operation to the map is atomical 2020-03-02 14:54:17 +08:00
Vincent Wei 3ce11d8882 move copy_key_string, free_key_string, and comp_key_string to map.h as static inline functions 2020-03-02 14:39:10 +08:00
Vincent Wei 9f1a7940c5 implement __mg_map_find_replace_or_insert 2020-03-02 14:38:14 +08:00
Vincent Wei 9fdfea572d declare __mg_map_find_replace_or_insert, mark __mg_map_find_or_insert and __mg_map_find_or_insert_ex as deprecated 2020-03-02 14:37:59 +08:00
Vincent Wei a6a9388fdf destroy local data map in DestroyMainWindow, DestroyVirtualWindow, and DestroyWindow; implement SetWindowLocalData, RemoveWindowLocalData, and GetWindowLocalData 2020-03-02 14:36:54 +08:00
Vincent Wei 000ff2fbab tune description text 2020-03-02 14:34:00 +08:00
Vincent Wei 0906c88c1f tune code according to the new prototype of CreaetMainWindowEx2 2020-03-02 11:17:06 +08:00
Vincent Wei 7f45d5232d improve the implementation of map based on rbtree to having the alternative free function per entry 2020-03-02 11:16:13 +08:00
Vincent Wei e1c44ebaa9 add mapLocalData fields for all kinds of window 2020-03-02 11:15:16 +08:00
Vincent Wei c0869dc898 tune implementation of CreateMainWindowEx2 2020-03-02 11:14:37 +08:00
Vincent Wei 94692e0f2d tune CreateMainWindowEx2 and MAINWINCREATE: use function argument intead of new dwBkColor field of structure; declare SetWindowLocalData, GetWindowLocalData, and RemoveWindowLocalData; tune WINDOWINFO structure for new field for local data map 2020-03-02 11:13:09 +08:00
Vincent Wei ea43d9e3ce disable set the pixels to 0 for a new RGB surface 2020-03-01 23:01:40 +08:00
Vincent Wei 837872c8bb handle resized surface correctly 2020-03-01 23:01:10 +08:00
Vincent Wei cf71cd059c handle KS_MIDDLEBUTTON 2020-03-01 19:32:05 +08:00
Vincent Wei 8f01d078d9 adjust to a reasonable position for a main window with style WS_EX_AUTOPOSITION 2020-03-01 18:38:52 +08:00
Vincent Wei 48c2ad5388 tune the implementation of NotifyParentEx 2020-03-01 18:19:17 +08:00
Vincent Wei e816245b91 use DWORD instead of int for timeoutusec, repeatusec, and dblclicktime 2020-03-01 18:17:24 +08:00
Vincent Wei 08eace2093 handle middle button for MSG_MBUTTONDOWN, MSG_MBUTTONUP. and MSG_MBUTTONDBLCLK messages 2020-03-01 18:16:55 +08:00
Vincent Wei 37b0e11146 handle middle button for MSG_MBUTTONDOWN, MSG_MBUTTONUP. and MSG_MBUTTONDBLCLK messages 2020-03-01 18:16:42 +08:00
Vincent Wei 08506e3cbb remove unnecessary kernel_GetGCRgnInfo functions 2020-03-01 17:34:21 +08:00
Vincent Wei 94b4a7eedb tune 2020-02-29 22:34:21 +08:00
Vincent Wei 7d5a6dbd54 fix a conditional compilation error 2020-02-29 22:33:22 +08:00
Vincent Wei dfe6869108 improve dummy engine to support PROCS runmode (sharedfb schema) 2020-02-29 22:23:47 +08:00
Vincent Wei 36ac251b21 improve dskDumpZOrder for PROCS runmode 2020-02-29 22:23:05 +08:00
Vincent Wei 513618d4ca rename notif_proc to NotifProc in CONTROL structure; fix conditional compilation errors 2020-02-29 17:52:40 +08:00
Vincent Wei df03ad014f Improve implementation of DumpWindow and moved to window.c 2020-02-29 17:44:01 +08:00
Vincent Wei e0b89ef232 add dump_window_details 2020-02-29 17:39:37 +08:00
Vincent Wei 44fc55701d special handle for procs runmode in dskDumpZOrder 2020-02-29 17:14:06 +08:00
Vincent Wei fc3bcabd67 handle MSG_DUMPZORDER 2020-02-29 17:13:28 +08:00
Vincent Wei f789ea719d allow HWND_NULL for GetNextChild and GetNextMainWindow 2020-02-29 17:13:04 +08:00
Vincent Wei 634fc28413 cleanup: remove deprecated code; implement dskDumpZOrder 2020-02-29 16:08:15 +08:00
Vincent Wei a7cfd21020 fix a bug in travel_all_hosted: duplicated calling of callback; tune travel_all_hosted: use breadth first traveling policy due to overflow of the post message queue; tune format 2020-02-29 16:07:34 +08:00
Vincent Wei 6d04b42191 fix a bug: __kernel_get_next_znode may returns -1; handle MSG_DUMPZORDER 2020-02-29 16:04:53 +08:00
Vincent Wei 8151cc2428 add message strings for MSG_MOVEWINDOW and MSG_DUMPZORDER 2020-02-29 16:03:23 +08:00
Vincent Wei dd34cd58a5 tune CreateMainWindowEx2 for error handling; Call SendNotifyMessage in the end of MoveWindow 2020-02-29 16:03:01 +08:00
Vincent Wei 734debce34 add MSG_MOVEWINDOW which will be sent as a notification after calling MoveWindow; add new internal message MSG_DUMPZORDER 2020-02-29 16:02:00 +08:00
Vincent Wei 04535d691f use new inline functions for checking and returning the window ptr 2020-02-28 17:12:05 +08:00
Vincent Wei 92a20d4cb8 add macros MG_IS_APP_WINDOW, MG_IS_CONTROL_WINDOW, MG_IS_DESTROYED_MAIN_WINDOW, and MG_IS_DESTROYED_VIRT_WINDOW; tune all macros for window type; add inline functions: checkAndGetMainWindowPtrOfMainWin and checkAndGetMainWindowPtrOfControl 2020-02-28 17:11:18 +08:00
Vincent Wei d9e14139cf cleanup 2020-02-28 17:09:45 +08:00
Vincent Wei 2d8fda08e7 cleanup the checking of window type for various window APIs 2020-02-28 17:08:14 +08:00
Vincent Wei e2e2b1ef94 check length of class name and reserved names 2020-02-28 17:07:40 +08:00
Vincent Wei 69ab18b5ab list functions work for virtual window; add class name for virtual window 2020-02-28 16:56:24 +08:00
Vincent Wei dfe6c026ef fix a fatal bug: call __mg_throw_away_messages in CreateMainWindowEx2, CreateVirtualWindow, and CreateWindowEx2 when failed to create a new window. 2020-02-27 21:10:23 +08:00
Vincent Wei ace5a0d263 tune 2020-02-27 21:04:15 +08:00
Vincent Wei 6b1b850312 implement __mg_throw_away_messages and tune ThrowAwayMessages 2020-02-27 21:04:02 +08:00
Vincent Wei ba2e8358b2 declare internal function __mg_throw_away_messages 2020-02-27 21:02:31 +08:00
Vincent Wei 851fc9aeff fix a bug: bad value for WS_EX_WINTYPE_LAUNCHER 2020-02-27 21:00:31 +08:00
Vincent Wei ecf1e9db90 tune words 2020-02-27 10:50:56 +08:00
Vincent Wei 16d3a63fbb rename get_valid_dc to get_effective_dc; rename release_valid_dc to release_effective_dc 2020-02-27 10:40:17 +08:00
Vincent Wei 98cdfd9bfb Call SyncUpdate in ReleaseDC instead of EndPaint 2020-02-27 10:38:05 +08:00
Vincent Wei 366bbb1ff0 always call ReleaseDC even if it is a private CDC in release_valid_dc 2020-02-27 10:36:11 +08:00
Vincent Wei 2ae820992f debug output 2020-02-27 09:59:37 +08:00
Vincent Wei f005efe2e5 do not call SetCursor in handling low level events 2020-02-27 09:59:14 +08:00
Vincent Wei 40628a7fbe do not call GAL_SyncUpdate for screen surface in ShowCursorForGDI 2020-02-27 09:58:45 +08:00
Vincent Wei 283d421721 tune 2020-02-27 09:57:49 +08:00
Vincent Wei ccb176419a fix a bug: bad handle for backspace 2020-02-27 09:57:20 +08:00
Vincent Wei e8a26956d7 tune 2020-02-27 09:56:53 +08:00
Vincent Wei 7c914cdca4 fix a bug: uninitialize the callback functions for the map of system bitmaps; add __mg_map_get_size 2020-02-27 00:47:09 +08:00
Vincent Wei e50c8424e0 Only call SyncUpdateDC in EndPaint 2020-02-27 00:25:50 +08:00
Vincent Wei 18ca90eb37 conver to upper before hashing 2020-02-27 00:25:19 +08:00
Vincent Wei b9d71cd489 tune order of terminating functions 2020-02-26 23:02:24 +08:00
Vincent Wei bdb4bbefe4 use Str2Key for hash function of class name 2020-02-26 23:01:53 +08:00
Vincent Wei ba65912bb1 fix a bug in __mg_map_insert 2020-02-26 22:13:42 +08:00
Vincent Wei e76dcef46e add gui_ prefix to AddNewControlClass and so on 2020-02-26 22:06:37 +08:00
Vincent Wei fde80cdb1b define __mg_sys_bmp_map 2020-02-26 22:05:59 +08:00
Vincent Wei 5c5a33afd5 fix conditional compilation errors 2020-02-26 22:05:44 +08:00
Vincent Wei 6ab06b320f implement GetSystemBitmapEx2; tune RegisterSystemBitmap and UnregisterSystemBitmap by using the map for system bitmaps 2020-02-26 21:37:32 +08:00
Vincent Wei d9bac8ca6d declare __mg_sys_bmp_map 2020-02-26 21:36:09 +08:00
Vincent Wei d089ba70aa add resource operations for MYBITMAP; initialize/terminate map for system bitmaps; cleanup code 2020-02-26 21:35:45 +08:00
Vincent Wei d6645c1ff7 string for MSG_REINITDESKOPS 2020-02-26 21:33:46 +08:00
Vincent Wei 5873faa559 include dependent headers 2020-02-26 21:33:28 +08:00
Vincent Wei 2191e6ea1a add new files: rbtree.h, rbtree.c, map.h, map.c 2020-02-26 21:32:54 +08:00
Vincent Wei 6ee2617eb7 use GetSystemBitmapEx2 instead of GetSystemBitmapEx 2020-02-26 21:32:11 +08:00
Vincent Wei 3627f32f25 declare GetSystemBitmapEx2; cleanup APIs for system bitmaps 2020-02-26 21:31:44 +08:00
Vincent Wei 28a4843b40 tune code for change of init operation of _DESKTOPOPS; use GetSystemBitmapEx2 instead of GetSystemBitmapEx; add a new desktop message MSG_REINITDESKOPS 2020-02-26 21:30:30 +08:00
Vincent Wei c5ff5ff992 add HDC for init operation of _DESKTOPOPS 2020-02-26 21:29:06 +08:00
Vincent Wei 7355a55610 removed 2020-02-26 21:28:28 +08:00
Vincent Wei ecdfabe41d implement a map based on rbtree 2020-02-26 21:28:00 +08:00
Vincent Wei aceae83f93 implement a red-black tree 2020-02-26 21:27:41 +08:00
Vincent Wei 5849ce8e04 implementation calc_mainwin_pos for fallback compositor 2020-02-26 12:33:46 +08:00
Vincent Wei dce4dadebf implement calculate default position for main windows 2020-02-26 12:25:54 +08:00
Vincent Wei e16419183b define DEF_OVERLAPPED_OFFSET_X and DEF_OVERLAPPED_OFFSET_Y 2020-02-26 12:24:11 +08:00
Vincent Wei 8fab85b8c1 move typedef CALCPOSINFO to minigui.h 2020-02-26 12:23:50 +08:00
Vincent Wei 17b92420f1 tune implementation for MSG_CALC_POSITION message 2020-02-26 12:23:19 +08:00
Vincent Wei 43cc858d58 fix a typo 2020-02-26 12:22:30 +08:00
Vincent Wei a6790b2ca7 move typedef CALCPOSINFO from window.h to minigui.h; tune interface of calc_mainwin_pos 2020-02-26 12:22:11 +08:00
Vincent Wei 3fde7981ed fix typos: Checks -> Check, Determines -> Determine 2020-02-26 11:13:11 +08:00
Vincent Wei 53f8be5826 add request handler for REQID_CALCPOSITION 2020-02-26 11:12:38 +08:00
Vincent Wei ca85b950fe send MSG_CALC_POSITION messge to desktop for calculating default position 2020-02-26 11:11:28 +08:00
Vincent Wei e9950cf6a9 add REQID_CALCPOSITION and CALCPOSINFO; check REQID_SYS_LAST is not larger than MAX_SYS_REQID 2020-02-26 11:09:53 +08:00
Vincent Wei 81fd2ee5d5 add string for MSG_CALC_POSITION 2020-02-26 11:08:59 +08:00
Vincent Wei ff779368d6 add calc_mainwin_pos to struct _CompositorOps 2020-02-26 11:08:27 +08:00
Vincent Wei 6ae96a3f96 tune styles; add WS_EX_AUTOPOSITION; add MSG_CALC_POSITION; fix typos: Checks -> Check, Determines -> Determine 2020-02-26 11:07:48 +08:00
Vincent Wei 881776c7a9 fix typos: Gets -> Get, Sets -> Set, Retrieves -> Retrieve 2020-02-26 08:55:38 +08:00
Vincent Wei db9ed261d8 use size_t instead of int for the size of one memroy area 2020-02-25 23:46:34 +08:00
Vincent Wei 571867720b load icon from bitmap files 2020-02-25 23:46:01 +08:00
Vincent Wei 0f0effc37e return size of memory res if user param is not null 2020-02-25 23:45:09 +08:00
Vincent Wei 882bc9d821 remove bad code 2020-02-25 23:44:39 +08:00
Vincent Wei 20f44981dd fix a old bug in load_cursor_from_mem: imageh must be 64 2020-02-25 23:43:33 +08:00
Vincent Wei 0b72715b8c tune description text 2020-02-25 23:41:50 +08:00
Vincent Wei f59fe557f3 cleanup 2020-02-25 19:07:45 +08:00
Vincent Wei 91246c8771 remove some deprecated code 2020-02-25 18:28:37 +08:00
Vincent Wei fc2c171d96 fix a bug of __mg_update_tick_count; remove some deprecated code; tune SetTimerEx to allow duplicated call for same timer 2020-02-25 18:27:57 +08:00
Vincent Wei a64292a926 use __mg_os_get_time_ticks instead of __mg_os_get_elapsed_ms; update __mg_tick_counter in GetTickCount 2020-02-25 17:18:49 +08:00
Vincent Wei 8a362818de rename __mg_os_start_time_ms to __mg_os_start_time; remove __mg_os_get_elapsed_ms; add __mg_os_get_time_ticks 2020-02-25 17:17:10 +08:00
Vincent Wei 0e9b23efec always check timers in the idle handler 2020-02-25 17:16:09 +08:00
Vincent Wei 2d9b3a68b5 add UL postfix 2020-02-25 16:21:00 +08:00
Vincent Wei 6dd8235d90 tune 2020-02-25 16:20:31 +08:00
Vincent Wei c9d1a47a32 tune description text 2020-02-25 09:59:55 +08:00
Vincent Wei 3d38112ab6 tune description text 2020-02-25 09:19:02 +08:00
Vincent Wei 0777c34039 two version of ExitGUISafely for different runmods 2020-02-25 08:22:12 +08:00
Vincent Wei 76cd3d6f27 GetMainVirtWindowById -> GetHostedById 2020-02-25 08:21:25 +08:00
Vincent Wei 2cbf9b25c9 tune search_win_tree; bugfix: forget removing the virtual window from hosting tree in DestroyVirtualWindow 2020-02-24 21:20:59 +08:00
Vincent Wei 0336fa1670 use _DBG_PRINTF instead of _WRN_PRINTF for no UpdateRects method of a video driver 2020-02-24 15:01:34 +08:00
Vincent Wei 16503269fb detailed debug info for no free znode slot 2020-02-24 15:00:55 +08:00
Vincent Wei 08d1b85e10 tune CreateVirtualWindow and GetMainVirtWindowById; implement GetWindowId and SetWindowId 2020-02-24 15:00:13 +08:00
Vincent Wei f9026712ca tune CreateVirtualWindow and GetMainVirtWindowById, declare GetWindowId and SetWindowId 2020-02-24 14:59:49 +08:00
Vincent Wei db7c5a821c tune 2020-02-23 19:07:23 +08:00
Vincent Wei afa4b891e0 tuen for change of CreateMainWindowEx2 2020-02-23 19:07:09 +08:00
Vincent Wei ec5eec69ef isWindowInThisThread -> getMainWinIfWindowInThisThread 2020-02-23 19:06:33 +08:00
Vincent Wei cef9216dd8 cleanup 2020-02-23 19:05:33 +08:00
Vincent Wei 0ec15b624f isWindowInThisThread -> getMainWinIfWindowInThisThread 2020-02-23 19:05:03 +08:00
Vincent Wei 05bc9e9b3c implement GetRootWindow and GetMainVirtWindowById; tune implementation of GetHosting, GetFirstHosted, and GetNextHosted to support virtual window 2020-02-23 19:03:35 +08:00
Vincent Wei 1d577c248f declare GetRootWindow and GetMainVirtWindowById; tune CreateMainWindowEx2 to pass identifier of the main window; cleanup the description words 2020-02-23 19:02:48 +08:00
Vincent Wei 44ea69baea pAdd of _MSG struct renamed to pSyncMsg 2020-02-23 15:37:03 +08:00
Vincent Wei 51d7ba8f7d declare NotifyWindow and MSG_NOTIFICATION; tune description words 2020-02-23 15:36:34 +08:00
Vincent Wei 8ceee008b0 implement NotifyWindow and tune DispatchMessage for MSG_NOTIFICATION 2020-02-23 15:35:18 +08:00
Vincent Wei 630a6046a6 add message string for MSG_NOTIFICATION 2020-02-23 15:34:01 +08:00
Vincent Wei c54c05ce57 use MG_IS_NOT_VIRT_WINDOW for GetParent 2020-02-23 15:33:28 +08:00
Vincent Wei c560fa9daf add MG_IS_MAIN_VIRT_WINDOW 2020-02-23 15:33:00 +08:00
Vincent Wei d2a5bea737 use NotifyWindow to implement NotifyParentEx 2020-02-23 15:32:24 +08:00
Vincent Wei 308464b5d3 make updateregion enabled by default 2020-02-23 15:31:50 +08:00
Vincent Wei aaa6b1379d include WS_EX_DIALOGBOX before create main window for dialog box 2020-02-23 11:25:14 +08:00
Vincent Wei 2b55d9d0e5 donot use quiting stage 2020-02-22 19:35:11 +08:00
Vincent Wei d36be5fb7f remove delcaration of __mg_desktop, __mg_parsor, __mg_timer 2020-02-22 19:34:33 +08:00
Vincent Wei 523ceb4dc5 fix conditional compilation errors 2020-02-22 19:32:59 +08:00
Vincent Wei 8d8d5143ea cleanup 2020-02-22 17:18:01 +08:00
Vincent Wei 097dcc2af7 donot use inline function to set/remove timer flags 2020-02-22 17:17:43 +08:00
Vincent Wei cf7cb4c831 timer_count -> tick_count; use __mg_update_tick_count; cleanup MSG_TIMER handling of desktop 2020-02-22 16:06:57 +08:00
Vincent Wei 98cc4ce10b change the idle handler of main thread with a tailored version 2020-02-22 16:05:27 +08:00
Vincent Wei 26a94f541e tune std_idle_handler; cleanup 2020-02-22 16:04:18 +08:00
Vincent Wei 3fe0294782 tune __mg_update_tick_count and post MSG_TIMER to desktop 2020-02-22 16:03:11 +08:00
Vincent Wei 1f98843053 implement __mg_os_get_elapsed_ms by using clock_gettime and for WIN32 2020-02-22 16:01:41 +08:00
Vincent Wei 298db53fb1 declare __mg_os_get_elapsed_ms 2020-02-22 15:54:30 +08:00
Vincent Wei c74c515b63 cleanup 2020-02-22 15:54:11 +08:00
Vincent Wei 41c709b1c8 add MAX_IDLE_COUNTER and DESKTOP_TIMER_INERTVAL 2020-02-22 15:53:50 +08:00
Vincent Wei 1192bba572 cleanup 2020-02-22 15:53:24 +08:00
Vincent Wei 90636dd869 bugfix: wrong WinType for virtual window; bad counting of nrWindows 2020-02-22 15:53:09 +08:00
Vincent Wei 6fee78e3d7 use __mg_update_tick_count 2020-02-22 15:52:13 +08:00
Vincent Wei 32939cf0af cleanup 2020-02-21 20:06:50 +08:00
Vincent Wei f3b1401a90 tune field name of TIMER structure 2020-02-21 20:06:22 +08:00
Vincent Wei 3e3a7c92e1 use WS_EX_DIALOGBOX style for IsDialog() instead of sending message to window procedure 2020-02-21 20:05:44 +08:00
Vincent Wei a3b76f2f9d cleanup handler of MSG_TIMER of desktop for threads mode 2020-02-21 20:04:33 +08:00
Vincent Wei f9a1525421 bugfix: use 0x01UL instead of 0x01 2020-02-21 20:03:57 +08:00
Vincent Wei 07106925c6 tune implmentation of timer 2020-02-21 20:03:26 +08:00
Vincent Wei c015eff8f0 call __mg_check_expired_timers in the idle handler 2020-02-21 20:02:28 +08:00
Vincent Wei 864be6b36d tune code for no timer thread for MiniGUI-Threads runmode; remove mg_InstallIntervalTimer and mg_UninstallIntervalTimer, always use mg_InitTimer and mg_TerminateTimer instead 2020-02-21 12:54:24 +08:00
Vincent Wei 0519637d62 Call SetActiveWindow in OpenAboutDialog if there is already a about dialog instance 2020-02-21 11:49:43 +08:00
Vincent Wei 17ba967eb2 fix a bug: check again after calling sem_wait in PeekMesageEx 2020-02-21 11:48:53 +08:00
Vincent Wei 246809f46e allocate and free mssage queue for main thread 2020-02-21 11:46:42 +08:00
Vincent Wei 32dc8c3f57 use dump_message; cleanup 2020-02-21 11:44:48 +08:00
Vincent Wei 2d8d6f0ba8 cleanup 2020-02-21 11:44:13 +08:00
Vincent Wei 9b4c325ba2 fix bug of CreateThreadForMessaging 2020-02-21 11:43:53 +08:00
Vincent Wei e33b61fcbb undef _DEBUG_DEVFONT 2020-02-21 10:12:52 +08:00
Vincent Wei 03774e2fa4 always initialize vector font engines for all runtime modes 2020-02-21 09:54:25 +08:00
Vincent Wei df61109fc5 cleanup 2020-02-21 09:53:44 +08:00
Vincent Wei 042c1f19b6 use _MG_PRINTF instead of _WRN_PRINTF for dumpers 2020-02-21 09:53:19 +08:00
Vincent Wei ec6c22f666 fix bug of bad traveling the hosted windows 2020-02-21 09:52:50 +08:00
Vincent Wei 240e9e05dc use _MG_PRINTF instead of _WRN_PRINTF for dumpers; disable InitVectorialFonts and TermVectorialFonts functions 2020-02-21 09:51:51 +08:00
Vincent Wei b971ca6d80 define a dummy implementation of JoinLayer for non-threads runtime modes 2020-02-21 09:49:57 +08:00
Vincent Wei a6974206c2 mark InitVectorialFonts and TermVectorialFonts as deprecated and define them as static inline functions 2020-02-21 09:49:04 +08:00
Vincent Wei aa2d13c5a2 message strings for new messages 2020-02-20 22:09:33 +08:00
Vincent Wei c846af5a2a fix conditional compilation errors 2020-02-20 22:08:27 +08:00
Vincent Wei 708bf8c489 tune description words 2020-02-20 22:00:21 +08:00
Vincent Wei 31ddac8281 tune description words 2020-02-20 21:53:49 +08:00
Vincent Wei 147cbb2152 Call SetActiveWindow 2020-02-20 21:14:48 +08:00
Vincent Wei 3f9939955d SetDesktopTimerFlag -> AlertDesktopTimerEvent 2020-02-20 19:36:16 +08:00
Vincent Wei b6a2fb3263 always use QS_DESKTIMER for desktop timer 2020-02-20 19:35:48 +08:00
Vincent Wei 98fa7ca872 skip desktop and virtual windows when checking invalid region of windows 2020-02-20 18:36:43 +08:00
Vincent Wei 46197de302 call createThreadInfoKey and deleteThreadInfoKey in InitGUI and TerminateGUI 2020-02-20 18:33:14 +08:00
Vincent Wei d484102dae add +dump_message_queue 2020-02-20 18:31:57 +08:00
Vincent Wei f555fc9c8f tune debug info 2020-02-20 17:47:39 +08:00
Vincent Wei aa90e9c7fa tune desktop menus for windows 2020-02-20 17:47:27 +08:00
Vincent Wei 8a63b551f6 tune macros 2020-02-20 17:41:57 +08:00
Vincent Wei 96005abb1a tune description words 2020-02-20 16:05:57 +08:00
Vincent Wei afed837806 ZOF_TYPE_TOPMOST -> ZOF_TYPE_HIGHER 2020-02-20 15:51:57 +08:00
Vincent Wei c0bd1a98d1 use ZOF_TYPE_BOTTOMMOST and ZOF_TYPE_TOPMOST 2020-02-20 15:51:33 +08:00
Vincent Wei 9f85525afb tune menuitems for main windows 2020-02-20 15:51:03 +08:00
Vincent Wei 9632e5f76a cleanup 2020-02-20 15:49:41 +08:00
Vincent Wei 5c248bb669 define IS_INVALID_ZIDX_LOOSE for not checking idx < 0 2020-02-20 15:49:20 +08:00
Vincent Wei 4ca3ac2e4b cleanup: remove _MG_CONFIG_FAST_MOUSEMOVE 2020-02-20 15:48:31 +08:00
Vincent Wei e3443bf9f3 cleanup 2020-02-20 15:48:15 +08:00
Vincent Wei 4ac66cae57 redefine ZOF_TYPE_TOPMOST for the topmost level; define ZOF_TYPE_BOTTOMMOST for the bottommost level; tune description words 2020-02-20 15:47:48 +08:00
Vincent Wei d75c881ed9 remove special handle of MSG_PAINT for HWND_DESKTOP 2020-02-20 12:42:06 +08:00
Vincent Wei bae0a64b6e cleanup 2020-02-20 12:41:16 +08:00
Vincent Wei a49cdd6ddc move call of mg_AllocMsgQueueForThisThread for desktop message queue to init-lite.c 2020-02-20 12:40:57 +08:00
Vincent Wei c0abd545f6 use IS_INVALID_ZIDX instead of max_nr_xxx 2020-02-20 12:39:57 +08:00
Vincent Wei 4aa5e04da1 add dump_mouse_message, dump_message_with_retval, dump_message, and dump_window functions (static inline) 2020-02-20 12:39:02 +08:00
Vincent Wei 52ddec51de move _MG_CONFIG_FAST_MOUSEMOVE to constants.h from cursor.h 2020-02-20 12:37:41 +08:00
Vincent Wei 1b598de5cc tune 2020-02-20 12:37:00 +08:00
Vincent Wei c77d618b7d WINDOWINFO structure changed, do not assume the first field of the structure is the position of the window 2020-02-20 12:36:30 +08:00
Vincent Wei ab1dbb767a fix conditional compilation errors and tune 2020-02-19 22:12:54 +08:00
Vincent Wei d24788134f tune code for eight levels of zorder nodes 2020-02-19 19:38:25 +08:00
Vincent Wei c6547026d5 tune for eight levels of zorder nodes; add some macros 2020-02-19 19:37:51 +08:00
Vincent Wei d0c1728ba1 tune for eight levels of zorder nodes 2020-02-19 19:37:21 +08:00
Vincent Wei 0f416f990c convert style WS_EX_TOPMOST to WS_EX_WINTYPE_HIGHER 2020-02-19 19:36:34 +08:00
Vincent Wei e602448df7 tune styles for eight levels of zorder nodes 2020-02-19 19:35:29 +08:00
Vincent Wei ea91c40beb tune for eight levels of zorder nodes 2020-02-19 19:34:51 +08:00
Vincent Wei 49d56b85f7 fallback implementaion of mgslice_xxx 2020-02-18 22:23:52 +08:00
Vincent Wei 0b3ed4808b testcancel in PeekMessageEx and WaitMessage 2020-02-18 22:23:22 +08:00
Vincent Wei ad59a477c6 call __mg_join_all_message_threads() 2020-02-18 22:22:42 +08:00
Vincent Wei dfae20dc5e implement dskRegisterMsgQueue, dskUnregisterMsgQueue, and __mg_join_all_message_threads 2020-02-18 22:22:19 +08:00
Vincent Wei 32e0725bae handle MSG_MANAGE_MSGTHREAD message 2020-02-18 22:21:39 +08:00
Vincent Wei fb3a5202b7 handle MSG_MANAGE_MSGTHREAD message 2020-02-18 22:21:33 +08:00
Vincent Wei fca9418188 add list_head in MSGQUEUE; declare __mg_join_all_message_threads() 2020-02-18 22:21:15 +08:00
Vincent Wei f4f711e660 register/unregister message thread to desktop 2020-02-18 22:20:30 +08:00
Vincent Wei a153b2cdf3 add system message MSG_MANAGE_MSGTHREAD 2020-02-18 22:18:34 +08:00
Vincent Wei 5bc3c411af add --enable-mgslicefallback option (_MGSLICE_FALLBACK) 2020-02-18 22:18:06 +08:00
Vincent Wei 231985fce3 fix condiitonal compilation errors 2020-02-18 20:27:35 +08:00
Vincent Wei 6f132886c3 4.2.0 -> 5.0.0 2020-02-18 18:44:42 +08:00
Vincent Wei 4c23130844 tune code for enhancement of event hook 2020-02-18 18:44:08 +08:00
Vincent Wei 5f3b100f19 implement RegisterEventHookFunc, RegisterEventHookWindow, and UnregisterEventHookWindow; tune implementation of old hook APIs 2020-02-18 18:43:14 +08:00
Vincent Wei f8224aeaa8 declare RegisterEventHookFunc, RegisterEventHookWindow, and UnregisterEventHookWindow; change since 4.2.0 -> since 5.0.0 2020-02-18 18:42:25 +08:00
Vincent Wei a765f784c6 change version to 4.9.0 2020-02-18 18:40:29 +08:00
Vincent Wei bc68c27578 fix conditional compilation errors 2020-02-17 23:00:32 +08:00
Vincent Wei 689ab4f7a3 fix conditional compilation errors 2020-02-17 23:00:19 +08:00
Vincent Wei b2f25b788a cleanup; use static idle handler for HAVE_SELECT 2020-02-17 21:36:46 +08:00
Vincent Wei 14fbd906d1 tuen and do not change OnIdle 2020-02-17 21:31:30 +08:00
Vincent Wei ccd1751016 do not call InitDskMsgQueue and DestroyDskMsgQueue 2020-02-17 21:28:13 +08:00
Vincent Wei ef69f34bd4 set OnIdle of desktop message queue NULL for threads runmode 2020-02-17 21:27:40 +08:00
Vincent Wei 6aa9e4ae7d cleanup and declare __mg_idle_handler_with_fds 2020-02-17 21:27:09 +08:00
Vincent Wei eb1630db47 cleanup 2020-02-17 21:26:10 +08:00
Vincent Wei 67dc1ab569 tune 2020-02-17 19:31:48 +08:00
Vincent Wei c5bac09fd2 tune for virtual window 2020-02-17 19:31:40 +08:00
Vincent Wei 8fc32dab6a implement BroadcastMessageInThisThread 2020-02-17 19:31:02 +08:00
Vincent Wei 81177f5d2d check timer in idle_handler_for_msg_thread 2020-02-17 19:30:32 +08:00
Vincent Wei 4db196d1d5 tune management of __mg_dsk_msg_queue 2020-02-17 19:29:04 +08:00
Vincent Wei 4d42697b18 use BroadcastMessageInThisThread instead of BroadcastMessage 2020-02-17 19:28:13 +08:00
Vincent Wei 4b8ecb169d tune management of __mg_dsk_msg_queue 2020-02-17 19:27:14 +08:00
Vincent Wei 0135699829 standalone version of mg_TerminateDesktop 2020-02-17 19:26:23 +08:00
Vincent Wei 7ba6d891eb __mg_dispatch_timer_message -> __mg_check_expired_timers 2020-02-17 19:22:45 +08:00
Vincent Wei 79913277b5 tuen for timer; add a internal helper: __mg_broadcast_message 2020-02-17 19:22:12 +08:00
Vincent Wei 59b21e9418 define USEC_TIMEOUT\ 2020-02-17 19:20:47 +08:00
Vincent Wei cd92e4b7fe declare BroadcastMessageInThisThread 2020-02-17 19:20:12 +08:00
Vincent Wei 3a2224cd4b rename getMsgQueueByWindowInThisThread to getMsgQueueIfWindowInThisThread 2020-02-17 16:21:55 +08:00
Vincent Wei 00fd9fea0f init pre default virtual window proc 2020-02-17 16:21:19 +08:00
Vincent Wei fe2e439fca init pre default virtual window proc 2020-02-17 16:21:13 +08:00
Vincent Wei 7608e5a5fe cleanup 2020-02-17 16:20:37 +08:00
Vincent Wei 2adb9954a8 tune __mg_def_proc 2020-02-17 16:20:25 +08:00
Vincent Wei 5cb8662ec8 rename getMsgQueueByWindowInThisThread to getMsgQueueIfWindowInThisThread 2020-02-17 16:20:07 +08:00
Vincent Wei 628c27fc7a declare IsWindowInThisThread, PreDefVirtualWinProc, DefaultVirtualWinProc, and IsVirtualWindow; tune some description words 2020-02-17 16:19:34 +08:00
Vincent Wei 3e9847ab13 declare IsWindowInThisThread, PreDefVirtualWinProc, DefaultVirtualWinProc, and IsVirtualWindow; tune some description words 2020-02-17 16:19:15 +08:00
Vincent Wei b225c095c7 tune 2020-02-16 22:41:25 +08:00
Vincent Wei 049a39548a move code handling hosting to window.c 2020-02-16 22:40:58 +08:00
Vincent Wei 4c782a1b7e move hosting handling to window.c 2020-02-16 22:40:18 +08:00
Vincent Wei fbc9a630f7 cleanup 2020-02-16 22:39:29 +08:00
Vincent Wei 9c9bd2fe2b handle hosting of virtual windows and main windows 2020-02-16 22:38:48 +08:00
Vincent Wei 3aa8424b90 tune code for listen fd sets from message queue 2020-02-16 18:51:04 +08:00
Vincent Wei cd6ba8e838 tune code for listen fd sets from message queue 2020-02-16 18:50:52 +08:00
Vincent Wei 664c30fb94 tune code for listen fd sets from message queue 2020-02-16 18:50:36 +08:00
Vincent Wei 464c18dc74 remove listenfd.c 2020-02-16 18:50:11 +08:00
Vincent Wei 490ae66cde tune code for listen fd sets and OnIdle 2020-02-16 18:49:56 +08:00
Vincent Wei 274500ffa0 cleanup 2020-02-16 18:49:06 +08:00
Vincent Wei 7370ae6864 cleanup 2020-02-16 18:48:18 +08:00
Vincent Wei 5782f3c40a add listenfd.c 2020-02-16 18:47:31 +08:00
Vincent Wei 0882bf8270 move USEC_1S and USEC_10MS to constants.h 2020-02-16 18:47:08 +08:00
Vincent Wei f86e977e3d cleanup 2020-02-16 18:46:40 +08:00
Vincent Wei 9c2be6c69b cleanup 2020-02-16 18:45:51 +08:00
Vincent Wei 4ed95b12b3 tune code for OnIdle method of message queue 2020-02-16 18:45:33 +08:00
Vincent Wei 847ccdcab7 move USEC_1S and USEC_10MS from timer.h to constants.h 2020-02-16 18:44:39 +08:00
Vincent Wei df10bf5ae0 call mg_GetMsgQueueForThisThread and mg_FreeMsgQueueForThisThread only for _MGHAVE_VIRTUAL_WINDOW 2020-02-16 18:44:08 +08:00
Vincent Wei 1babb4fcd5 call mg_GetMsgQueueForThisThread and mg_FreeMsgQueueForThisThread only for _MGHAVE_VIRTUAL_WINDOW 2020-02-16 18:43:45 +08:00
Vincent Wei 03f7321651 move listened fd sets to message queue and introduce the intrnal __mg_kernel_check_listen_fds funtion 2020-02-16 18:43:07 +08:00
Vincent Wei 26d976cc61 move listen fd APIs from minigui.h to window.h 2020-02-16 18:41:50 +08:00
Vincent Wei 1ce7bef76b move listen fd APIs to window.h 2020-02-16 18:41:20 +08:00
Vincent Wei e1a932c04c check poll, select, and sys/select.h 2020-02-16 18:40:55 +08:00
Vincent Wei 608dade15f move from misc/ to kernel/; tune code for virtual window and listen fd API 2020-02-16 18:40:21 +08:00
Vincent Wei 786f9f90a0 move timer slots to message queue and tune code. now we allocate timer slots per thread, and manage the time slots in message queue 2020-02-16 10:30:37 +08:00
Vincent Wei 2727e0c2db tune code for virtual window 2020-02-15 23:02:51 +08:00
Vincent Wei a12b75cd1b tune code for virtual window 2020-02-15 23:01:27 +08:00
Vincent Wei 59677752a7 tune code for virtual window 2020-02-15 22:53:08 +08:00
Vincent Wei 0ee62da119 tune code for virtual window 2020-02-15 22:51:56 +08:00
Vincent Wei 9d21d8a549 tune MainWindowThreadCleanup and MainWindowCleanup 2020-02-15 22:50:43 +08:00
Vincent Wei f1f49032b9 tune code for virtual window; rename pMessages -> pMsgQueue 2020-02-15 18:22:48 +08:00
Vincent Wei c5df42a44b implement CreateThreadForMessaging, GetThreadByWindow, CreateVirtualWindow, DestroyVirtualWindow, and VirtualWindowCleanup; move GetMainWinThread from desktop-ths.c to window.c 2020-02-15 18:22:14 +08:00
Vincent Wei 7f7b769660 tune for virtual window 2020-02-15 18:20:20 +08:00
Vincent Wei f7dd21c9cb tune and cleanup 2020-02-15 12:44:54 +08:00
Vincent Wei ca01773775 description words for virtual window; declare CreateThreadForMessaging, GetThreadByWindow, and VirtualWindowCleanup 2020-02-15 12:44:23 +08:00
Vincent Wei 32d5aa068b make --enable-virtualwindow available for standalone runmode 2020-02-15 12:40:45 +08:00
Vincent Wei 3b639d59d7 cleanup 2020-02-14 22:43:13 +08:00
Vincent Wei 0b3450bf97 move mg_InitMsgQueueThisThread, mg_FreeMsgQueueThisThread, and __mg_threadinfo_key to kernel/message.c 2020-02-14 22:41:22 +08:00
Vincent Wei aadcdfca83 tune WS_EX_WINTYPE_XXX to avoid conflict with WS_EX_INTERAL_MASK; declare CreateVirtualWindow and DestroyVirtuWindow; tune some description word 2020-02-14 22:39:53 +08:00
Vincent Wei 0b0a50791b tune VIRTWIN, MAINWIN, and MSGQUEUE structures 2020-02-14 22:37:44 +08:00
Vincent Wei ae40205947 tune CONTROL structure 2020-02-14 22:36:47 +08:00
Vincent Wei 54a269d389 add new configuration option: virtualwindow 2020-02-14 22:35:51 +08:00
Vincent Wei 48caa7cde0 adjust WINDOWINFO, CONTROL, and MAINWIN structures for virtual window; remove iFgColor field in CONTROL, MAINWIN, and CTRLCLASSINFO; add VIRTWIN structure 2020-02-14 17:53:03 +08:00
Vincent Wei 21160fb01d rename internal symbols for better coding style 2020-02-14 12:54:54 +08:00
Vincent Wei 6745220e84 fix a bug of dskScrollMainWindow for compositing schema 2020-02-13 21:54:58 +08:00
Vincent Wei 3bbdd9d647 UPDATERGIN -> -UPDATERGN 2020-02-13 21:54:29 +08:00
Vincent Wei 96a90aa73b Use client DC instead of HDC_SCREEN_SYS to get the caret bitmaps 2020-02-13 21:53:48 +08:00
Vincent Wei 35ae59cfec add version info of mgeff package 2020-02-13 21:12:14 +08:00
Vincent Wei b9586ed96b tune 2020-02-13 20:53:54 +08:00
Vincent Wei 1347fa020b Use pWin->pMainWin->left and pWin->pMainWin->top to calculate 2020-02-13 20:52:46 +08:00
Vincent Wei af794cb523 add inline dump_rect 2020-02-13 20:52:23 +08:00
Vincent Wei ded48a69ea tune 2020-02-13 20:52:03 +08:00
Vincent Wei 0a2b9749bd fix a bug in FreeZOrderNodeEx 2020-02-13 20:51:29 +08:00
Vincent Wei 725b7eecb1 fix a bug of PCXVFB_MoveCursor 2020-02-13 12:37:57 +08:00
Vincent Wei cc9d420a71 tune SyncUpdate and fix a bug of ShowCurosr(FALSE) for hardware cursor 2020-02-13 12:37:26 +08:00
Vincent Wei 11c8cd43ef only check pdc->surface->dirty_info for wallpaper patter when it is not empty 2020-02-13 12:36:08 +08:00
Vincent Wei 31d43fd4e8 define or undefine _MGSCHEMA_SHAREDFB for all runmodes 2020-02-13 12:34:18 +08:00
Vincent Wei e2687724b7 call GAL_SyncUpdate in kernel_ShowCursorForGDI when showing cursor 2020-02-13 10:44:28 +08:00
Vincent Wei c5c31a2030 tune description words 2020-02-13 10:43:35 +08:00
Vincent Wei a0d747fcc6 call SyncUpdateDC in __mg_update_secondary_dc 2020-02-12 23:41:41 +08:00
Vincent Wei d136f23dc4 call SyncUpdateDC or GAL_SyncUpdate for cursor and dc_desktop 2020-02-12 23:23:10 +08:00
Vincent Wei 22b9609a8a use mg_slice_delete instead of free for CURSOR objects 2020-02-12 22:16:54 +08:00
Vincent Wei db68c34b27 _MGUSE_SYNC_UPDATE -> _MGUSE_UPDATE_REGION 2020-02-12 21:53:50 +08:00
Vincent Wei 6bec1b2f84 implement SyncUpdate method 2020-02-12 21:53:25 +08:00
Vincent Wei e0364e5031 add field to store the dirty bound rectangle for SyncUpdate method 2020-02-12 21:53:14 +08:00
Vincent Wei b985c4976a add SyncUpdate method 2020-02-12 21:51:46 +08:00
Vincent Wei ce81d223ce restore calls of GAL_SyncUpdate without conditional compilation 2020-02-12 21:50:45 +08:00
Vincent Wei ba1bf265a2 always call SyncUpdateDC for change of popup menus 2020-02-12 21:49:15 +08:00
Vincent Wei 8e6ffda4a8 always implement SyncUpdateDC and SyncUpdateSurface 2020-02-12 21:46:02 +08:00
Vincent Wei 8b16889136 syncupdate -> updateregion; _MGUSE_SYNC_UPDATE -> _MGUSE_UPDATE_REGION 2020-02-12 21:45:32 +08:00
Vincent Wei b0d99d63c8 remove bad rgn assertion 2020-02-12 18:27:05 +08:00
Vincent Wei cf09f73f4c do not lock draw sem when not using sync update 2020-02-12 18:26:47 +08:00
Vincent Wei 92d36bdb20 use MSG_CSIZECHANGED message instead of MSG_SIZECHANGED to move the button 2020-02-12 18:15:59 +08:00
Vincent Wei 169e163202 cleanup 2020-02-12 17:58:41 +08:00
Vincent Wei c3d869e62d allocate znodes for fixed main windows 2020-02-12 17:56:51 +08:00
Vincent Wei 0b1fadec95 debug.h 2020-02-12 17:54:05 +08:00
Vincent Wei dc100bc7bc initial commit; dump_region 2020-02-12 17:53:45 +08:00
Vincent Wei df2d74fb0a use GetWindowElementPixelEx instead of GetWindowElementPixel or GetWindowElementColor 2020-02-12 13:26:01 +08:00
Vincent Wei 575ef72246 tune and cleanup 2020-02-12 11:38:28 +08:00
Vincent Wei d2f9a9a857 use palette when passed a valid pal argument 2020-02-12 11:34:07 +08:00
Vincent Wei 1b05430a61 use __mg_get_common_rgba8888_dc; use mg_slice_new/mg_slice_delete for CURSOR objects instead of malloc/free 2020-02-12 11:29:55 +08:00
Vincent Wei 3f25347a2e tune implementation of CreateIconEx and DrawIcon; implement LoadBitmapIconEx, LoadBitmapIconFromFile, and LoadBitmapIconFromMem 2020-02-12 11:29:05 +08:00
Vincent Wei 7dee411aaa implement __mg_get_common_rgba8888_dc and __mg_reset_common_rgba8888_dc 2020-02-12 11:27:24 +08:00
Vincent Wei 8b81d71c5a change ICON structure: we always decode an icon into RGBA8888 compliant pixels 2020-02-12 11:26:49 +08:00
Vincent Wei 8900845cf1 declare __mg_get_common_rgba8888_dc and __mg_reset_common_rgba8888_dc 2020-02-12 11:26:21 +08:00
Vincent Wei 5c920f3732 tune description words; declare LoadBitmapIconEx, LoadBitmapIconFromFile, and LoadBitmapIconFromMem 2020-02-12 11:26:00 +08:00
Vincent Wei 7635e41d25 do not call kernel_ReShowCursor for compositing schema 2020-02-11 23:59:53 +08:00
Vincent Wei 084babc389 cleanup 2020-02-11 23:59:20 +08:00
Vincent Wei c27afc62dd do not use dwBkColor if surf_flag has ST_PIXEL_DEFAULT 2020-02-11 23:58:38 +08:00
Vincent Wei 46d30558b1 use RGBA_xxx instead of COLOR_xxxx 2020-02-11 21:20:18 +08:00
Vincent Wei 53033675ad cleanup and fix conditional compilation errors 2020-02-11 21:01:48 +08:00
Vincent Wei 62d9c39ac6 restore original definitions of COLOR_xxx macros; add new RGBA_xxx macros 2020-02-11 21:01:23 +08:00
Vincent Wei b7965b3940 use dwBkColor for compositing schema 2020-02-11 18:09:30 +08:00
Vincent Wei b7f1c15a2a add enum for indexes of system standard colors 2020-02-11 18:08:10 +08:00
Vincent Wei dd502454ee add surf_flag to GAL_CreateSurfaceForZNode; declare GAL_CreateSurfaceForZNodeAs 2020-02-11 18:07:16 +08:00
Vincent Wei 71fd40831f add dwBkColor for compositing schema; change prototype of CreateMainWindowEx2; declare DWORD2PixelByWindow 2020-02-11 18:06:28 +08:00
Vincent Wei 76efcc3d3e tune code for change of GAL_CreateSurfaceForZNode 2020-02-11 18:03:46 +08:00
Vincent Wei 36fbbdecda Enhance CreateMainWindowEx2 to handle surface flag.
Implement DWORD2PixelByWindow.
Use dwBkColor for compositing schema.
2020-02-11 18:01:45 +08:00
Vincent Wei 08cadfd991 use GAL_CreateSurfaceForZNodeAs instead of GAL_CreateSurfaceForZNode 2020-02-11 17:58:04 +08:00
Vincent Wei 52a6b1ec87 cleanup 2020-02-11 17:57:22 +08:00
Vincent Wei 482eaa2535 tune for compositing schema 2020-02-11 17:56:51 +08:00
Vincent Wei 696f553005 tune GAL_CreateSurfaceForZNode and implement GAL_CreateSurfaceForZNodeAs; allocate dirty_info only for surface for znode 2020-02-11 17:53:58 +08:00
Vincent Wei eff7cbe74c remove code to allocate dirty_info for all newly created surfaces 2020-02-11 17:52:39 +08:00
Vincent Wei 798afbd9aa remove code for handling dirty_info 2020-02-11 17:52:01 +08:00
Vincent Wei 395f9ae250 support for hardware cursor 2020-02-11 12:16:20 +08:00
Vincent Wei 503c5dd592 enable double buffering 2020-02-11 11:12:03 +08:00
Vincent Wei e2a6d667d0 enable double buffering 2020-02-11 11:11:58 +08:00
Vincent Wei 41cd8938cf call kernel_ReShowCursor for compositing schema 2020-02-11 11:11:15 +08:00
Vincent Wei 4d9455310b only call GAL_SyncUpdate in showcursor and use the method for sharedfb schema to optimize the cursor refresh in order to resolve the mess screen caused by update the cursor in BitBlt. 2020-02-11 11:10:23 +08:00
Vincent Wei f00ae8e932 fix bugs of recursive lock of znode surface 2020-02-10 22:54:04 +08:00
Vincent Wei 5c59c26c83 add const for the first arguments of PtInRegion and RectInRegion 2020-02-10 22:53:35 +08:00
Vincent Wei 10bab8bdda define alpha component for system colors 2020-02-10 22:53:02 +08:00
Vincent Wei cf241cd871 use GetBoundRect instead of UnionRect; free dirty_info for screen surfaces 2020-02-10 22:52:30 +08:00
Vincent Wei 59781d1e28 use GAL_MapRGBA instead of GAL_MapRGB for system pixel values 2020-02-10 22:51:16 +08:00
Vincent Wei ceffbddec6 send message MSG_WINDOWDROPPED for mouse message other than MSG_MOUSEMOVE 2020-02-10 22:49:53 +08:00
Vincent Wei 94a0e2fdb7 lock and unlock surface before calling on_dirty_xxx 2020-02-10 22:49:02 +08:00
Vincent Wei a871d4b344 debug composite lucent window znodes 2020-02-10 22:48:18 +08:00
Vincent Wei 2442ccc6ca tune format 2020-02-10 22:47:39 +08:00
Vincent Wei fb26beb997 define COLOR_xxx as the RGBA quadruple instead of pixel value; new API (inline) AreRegionsIntersected 2020-02-10 22:47:01 +08:00
Vincent Wei ef693e21de fix conditional compilation errors 2020-02-07 23:03:48 +08:00
Vincent Wei e926150d6b handle special main windows 2020-02-07 23:02:09 +08:00
Vincent Wei 0cb02d4c34 exclude the special window type style if failed; refuse to create global controls in a special main window 2020-02-07 23:01:29 +08:00
Vincent Wei 26da7c759f cleanup 2020-02-07 23:00:13 +08:00
Vincent Wei 738cc6e3ed handle MSG_SIZECHANGED to move button 2020-02-07 19:12:38 +08:00
Vincent Wei f9dc61c75e cleanup 2020-02-07 19:06:41 +08:00
Vincent Wei bfefb0b6b5 fix conditional compilation error 2020-02-07 19:04:46 +08:00
Vincent Wei d9e5043c12 comment out _cb_exclude_rc for compositing schema 2020-02-07 19:04:08 +08:00
Vincent Wei 7ba3929d9f tune drag-and-drop main window for compositing schema 2020-02-07 19:03:38 +08:00
Vincent Wei dd6793b27b cleanup 2020-02-07 19:02:37 +08:00
Vincent Wei 472e132844 tune dskScrollMainWindow for compositing schema 2020-02-07 17:10:34 +08:00
Vincent Wei 9c3c6481c7 cleanup 2020-02-07 17:10:08 +08:00
Vincent Wei a0bfb4b0b1 tune 2020-02-07 16:51:42 +08:00
Vincent Wei bd9e49888b declare ColorBlendMethod and tune ColorLogicalOp 2020-02-07 16:51:25 +08:00
Vincent Wei e324e53c0a call on_layer_op for compositor 2020-02-07 12:11:11 +08:00
Vincent Wei 1fb95ac4be move call of on_changed_ct to dskSetZNodeCompositing 2020-02-07 12:10:48 +08:00
Vincent Wei fcb7632780 define DO_COMPSOR_OP and DO_COMPSOR_OP_ARGS 2020-02-07 12:08:20 +08:00
Vincent Wei f626523116 tune compositing type and add CT_LOGICALPIXEL 2020-02-07 12:07:55 +08:00
Vincent Wei 9e9d13623c define ZOF_TF_CONTROL to 0x04000000; add on_layer_op in CompositorOps 2020-02-07 11:53:58 +08:00
Vincent Wei ce33d28b68 add ColorCompositingOp and ColorLogicalOp 2020-02-07 11:52:57 +08:00
Vincent Wei 9bbf09c9a6 cleanup 2020-02-07 11:52:33 +08:00
Vincent Wei a2f202b535 fix wrong conditionla compilation error 2020-02-07 10:52:04 +08:00
Vincent Wei 32c5c3c58f cleanup; use MSG_SETWINDOWMASK instead of __kernel_change_z_node_mask_rect 2020-02-07 10:18:30 +08:00
Vincent Wei 3b8b5ffabc cleanup: assert(znode_hdr) instead of _DBG_PRINTF 2020-02-06 22:24:17 +08:00
Vincent Wei 00b36e2b78 enhancee cliMoveWindow and srvMoveWindow to support resized surface 2020-02-06 21:55:51 +08:00
Vincent Wei 6ea023aab1 change mem_dc of znode for compositing schema when the surface resized in dskMoveWindow 2020-02-06 21:53:57 +08:00
Vincent Wei 02795323d6 change dskMoveMainWindow and dskMoveGlobalControl to return value, and pass HDC_INVALID to dskMoveWindow 2020-02-06 21:52:47 +08:00
Vincent Wei 5e5101ea38 check the return value of message MSG_MOVEMAINWIN 2020-02-06 21:51:10 +08:00
Vincent Wei 67580a65e9 implement get_znode_mask_bound for compositing schema 2020-02-06 18:20:37 +08:00
Vincent Wei 0c0d93ac3f implement on_changed_rgn and on_moved_win 2020-02-06 18:19:42 +08:00
Vincent Wei 9276b695ac calculate the original region boundn for change of region 2020-02-06 18:17:43 +08:00
Vincent Wei 921036a3f2 tune for change of window mask 2020-02-06 18:16:39 +08:00
Vincent Wei a4bf2e0c2c cleanup 2020-02-06 18:15:48 +08:00
Vincent Wei a4fbd10f1d call on_changed_ct and on_changed_rgn 2020-02-06 17:50:29 +08:00
Vincent Wei e77410462b __kernel_change_z_order_mask_rect -> __kernel_change_z_node_mask_rect 2020-02-06 17:49:35 +08:00
Vincent Wei 5064a14de6 get_next_visible_mainwin -> get_next_activable_mainwin; get next activable window znode before freeing the current znode 2020-02-06 16:04:09 +08:00
Vincent Wei 888c8089cd fix a bug of duplicated calls to __mg_free_sem_for_shared_surf 2020-02-06 12:41:42 +08:00
Vincent Wei bc62083911 call SyncUpdateDC for all showing popup menus 2020-02-06 12:40:08 +08:00
Vincent Wei 16817e8e55 2018 -> 2020 2020-02-06 11:58:48 +08:00
Vincent Wei c7a124658f call on_dirty_screen for removed znodes 2020-02-06 11:58:30 +08:00
Vincent Wei e98816f392 optimize fallback compositor 2020-02-06 10:58:04 +08:00
Vincent Wei 49f1ac7ef7 initialize lock_count for new znode to zero 2020-02-06 10:57:39 +08:00
Vincent Wei 739d90a15f tune to support recursive lock 2020-02-06 10:57:02 +08:00
Vincent Wei 75ba1cfdaa add lock_count to support recursive lock 2020-02-06 10:56:20 +08:00
Vincent Wei c797ed6bdc continue to implement the fallback compsoitor 2020-02-05 22:27:49 +08:00
Vincent Wei a19b2c9f19 ignore the attempt to free the first semaphore for shared surface (reserved for wallpaper pattern 2020-02-05 22:26:19 +08:00
Vincent Wei 87ee4d5917 cleanup 2020-02-05 22:24:43 +08:00
Vincent Wei 4b9dca95a2 on_raising_win -> on_raised_win 2020-02-05 22:24:25 +08:00
Vincent Wei d47b150f4b on_raising_win -> on_raised_win 2020-02-05 22:24:04 +08:00
Vincent Wei fa40fb4efe do not check video in GAL_UpdateRect 2020-02-05 17:28:58 +08:00
Vincent Wei df94f00ae6 tune comment words 2020-02-05 17:28:23 +08:00
Vincent Wei 2ff668e11a do not forget to call SyncUpdateDC even if left_rgn is empty 2020-02-05 17:27:54 +08:00
Vincent Wei 3d826ff7cb disable age in ZNODEHEADER for _MGSCHEMA_COMPOSITING 2020-02-05 17:26:09 +08:00
Vincent Wei 5a70fa1f42 use WS_EX_TROUNDCNS and WS_EX_BROUNDCNS styles for AboutDialog 2020-02-05 12:37:09 +08:00
Vincent Wei da815e2779 check out of bound of znode rectangle in cb_circle_corners 2020-02-05 12:36:36 +08:00
Vincent Wei 120ed895df use SubtractRegion instead of SubtractClipRect 2020-02-05 12:36:07 +08:00
Vincent Wei b868dc71c6 change RADIUS_WINDOW_CORNERS to 7 2020-02-05 12:35:29 +08:00
Vincent Wei 784476b449 tune description words 2020-02-05 12:35:09 +08:00
Vincent Wei 10971de518 create shared surface for WS_EX_CTRLASMAINWIN 2020-02-05 12:06:28 +08:00
Vincent Wei f0c77d4def call GAL_SyncUpdate in ReleaseDC 2020-02-05 12:05:27 +08:00
Vincent Wei 9b7e6007ac continue to implement the fallback compositor: wallpaper and popup menus are almost ready now. 2020-02-05 11:08:11 +08:00
Vincent Wei dcb79f71d2 disable field age of ZORDERNODE for compositing schema 2020-02-05 11:06:31 +08:00
Vincent Wei 2622843202 tune argument name: rc -> rc_dirty of on_dirty_screen 2020-02-05 11:05:41 +08:00
Vincent Wei d480eb5cf0 move __mg_is_valid_layer to server.h and make it inline 2020-02-04 21:46:29 +08:00
Vincent Wei 37de21cc42 tune calls of compositor operations 2020-02-04 21:46:03 +08:00
Vincent Wei e74b13f462 continue to implement the fallback compositor 2020-02-04 21:45:09 +08:00
Vincent Wei 0c40391322 travel all window znodes on all layers 2020-02-04 21:44:27 +08:00
Vincent Wei dfe51d7b26 new inline functions: __mg_is_valid_layer and __mg_get_layer_from_zi 2020-02-04 21:43:45 +08:00
Vincent Wei ef44119c2d tune the operations of CompositorOps 2020-02-04 21:43:06 +08:00
Vincent Wei 3d6eca8258 call on_dirty_rect 2020-02-04 12:11:16 +08:00
Vincent Wei bdc1231a41 check available of purge_ppp_data and purge_win_data 2020-02-04 12:09:54 +08:00
Vincent Wei b0d434b857 initial implementation of on_dirty_rect 2020-02-04 12:09:32 +08:00
Vincent Wei 53ab99def2 Tune CompositorOps: new operation on_dirty_rect, on_moving_to_top -> on_raising_win 2020-02-04 12:08:40 +08:00
Vincent Wei 464adfa3e2 Under compositing schema, we do not allocate mask rectangles
for round corners. Instead, we get the region of window znode
in ServerGetWinZNodeRegion.
2020-02-04 10:37:52 +08:00
Vincent Wei 217e5971b4 new inline function: __mg_get_nr_idle_slots (moved from desktop.c) 2020-02-04 10:37:24 +08:00
Vincent Wei 07a790e284 debug fallback compositor: on_dirty_ppp 2020-02-03 22:32:43 +08:00
Vincent Wei 2f1f520151 _REGION_DEBUG -> _DEBUG_REGION 2020-02-03 22:32:01 +08:00
Vincent Wei 5a344f8102 _REGION_DEBUG -> _DEBUG_REGION 2020-02-03 22:31:47 +08:00
Vincent Wei f2e476b9ff debug ServerGetPopupMenuZNodeRegion 2020-02-03 22:30:37 +08:00
Vincent Wei 2a38ea9695 fix typos 2020-02-03 22:29:28 +08:00
Vincent Wei 11872c1288 initial version of on_dirty_ppp 2020-02-03 17:58:13 +08:00
Vincent Wei 61b4b4adf9 check shared_header 2020-02-03 17:57:29 +08:00
Vincent Wei 930f99f151 check dirty_info instead of shared_header for update rects 2020-02-03 16:24:05 +08:00
Vincent Wei 4a54b94e08 tune 2020-02-03 16:08:36 +08:00
Vincent Wei d1f499a8e0 initialize update_region of cursor surface 2020-02-03 16:08:03 +08:00
Vincent Wei b8963ba3b1 always create a new memdc for popup menus 2020-02-03 16:07:20 +08:00
Vincent Wei e4bb441f1d call SyncUpdateDC after handle use input events 2020-02-03 16:06:10 +08:00
Vincent Wei ed9ce0b065 change prototype of purge_win_data 2020-02-03 16:05:14 +08:00
Vincent Wei 7f8a7c5f10 tune description words 2020-02-03 16:04:50 +08:00
Vincent Wei 5d3d051d6b use dirty_info instead of shared_surfae 2020-02-03 11:55:47 +08:00
Vincent Wei bdf5eafad8 convert_region_to_rects -> __mg_convert_region_to_rects; use dirty_info instead of shared_header 2020-02-03 11:55:18 +08:00
Vincent Wei 3ea00c7752 allocate and free dirty_info for general memory surafce 2020-02-03 11:54:11 +08:00
Vincent Wei 2cef670adc initialize dirty_info 2020-02-03 11:53:25 +08:00
Vincent Wei 84f1da38c1 initialize dirty_info to NULL 2020-02-03 11:53:05 +08:00
Vincent Wei 48f0bd1426 use dirty_info instead of shared_header 2020-02-03 11:52:46 +08:00
Vincent Wei 12e4d7bcf5 introduce GAL_DirtyInfo structure to maintain dirty info of memory dc for both shared and no shared surface 2020-02-03 11:52:19 +08:00
Vincent Wei 8f575fd887 declare __mg_convert_region_to_rects 2020-02-03 11:51:17 +08:00
Vincent Wei fa9aacf3af rename __mg_compsor_check_znodes to __mg_composite_dirty_znodes 2020-02-02 22:36:17 +08:00
Vincent Wei f8503f6943 support for private data of z-node; implement ServerSetWinZNodePrivateData and ServerSetPopupMenuZNodePrivateData 2020-02-02 22:35:51 +08:00
Vincent Wei 3560f58248 initialize priv_data of z-node to NULL 2020-02-02 22:35:09 +08:00
Vincent Wei 43fa4603d5 support of private data of z-node 2020-02-02 22:34:40 +08:00
Vincent Wei fc514cd4c4 support of private data of z-node 2020-02-02 22:34:15 +08:00
Vincent Wei 07585edb1e support for private data of z-node; new APIS: ServerSetWinZNodePrivateData and ServerSetPopupMenuZNodePrivateData 2020-02-02 22:33:37 +08:00
Vincent Wei fddf3bdc45 implement ServerGetWinZNodeRegion and ServerGetPopupMenuZNodeRegion 2020-02-02 16:59:42 +08:00
Vincent Wei 5983ad2db8 message strings for new window messages 2020-02-02 16:58:58 +08:00
Vincent Wei 7ce2eea112 add RADIUS_WINDOW_CORNERS and RADIUS_POPUPMENU_CORNERS constants 2020-02-02 16:58:32 +08:00
Vincent Wei 4d4d18499c add Since 4.2.0 for new window styles and window messages 2020-02-02 16:57:36 +08:00
Vincent Wei 54bc586e39 declare ServerGetWinZNodeRegion and ServerGetPopupMenuZNodeRegion 2020-02-02 16:56:48 +08:00
Vincent Wei 14d020cccf cleanup: convert tab to spaces and trim tail spaces 2020-02-02 10:53:31 +08:00
Vincent Wei 8dbe2c63f1 cleanup code, see cleanup-code.sh 2020-02-02 10:46:29 +08:00
Vincent Wei d7c398fd4d use semaphore set instead of posix semaphore 2020-02-01 22:54:42 +08:00
Vincent Wei 3870cd4ccb request handlers: alloc_sem_for_shared_surf and free_sem_for_shared_surf; enhance del_global_res to work with semaphore 2020-02-01 21:47:51 +08:00
Vincent Wei 485f2602cd implement __mg_alloc_sem_for_shared_surf and __mg_free_sem_for_shared_surf; create semphore set manager for shared surfaces 2020-02-01 21:46:24 +08:00
Vincent Wei af9e425dd0 use system v semphore set instead of poxis semaphore 2020-02-01 21:44:34 +08:00
Vincent Wei ccfe97326b discard semaphore set for shared surfaces 2020-02-01 21:43:47 +08:00
Vincent Wei 01cf335f6e enhance semaphore set manager 2020-02-01 21:43:15 +08:00
Vincent Wei 2747dcaaf1 add semid_shared_surf and SHAREDRES_SEMID_SHARED_SURF 2020-02-01 21:42:49 +08:00
Vincent Wei d6eae17d0f use system v semaphore set instead of poxis semaphore 2020-02-01 21:42:16 +08:00
Vincent Wei 65d6c5305e declare __mg_alloc_sem_for_shared_surf and __mg_free_sem_for_shared_surf 2020-02-01 21:41:36 +08:00
Vincent Wei 3398824940 declare functions for semaphore set manager 2020-02-01 21:41:06 +08:00
Vincent Wei 73ef5db613 tune my_sem_op and define LOCK_SURFACE_SEM and UNLOCK_SURFACE_SEM 2020-02-01 21:40:32 +08:00
Vincent Wei 4bfabc20a7 use System V semaphore set instead of posix semphore for shared surface 2020-02-01 21:39:29 +08:00
Vincent Wei 8bfded59be define MAX_NR_SHARED_SURF 2020-02-01 21:37:51 +08:00
Vincent Wei 71f7cb3efe add new request ids: REQID_ALLOC_SURF_SEM and REQID_FREE_SURF_SEM 2020-02-01 21:37:26 +08:00
Vincent Wei 1aa5f30f19 change MAX_SYS_REQID to 0x0022 2020-02-01 21:36:46 +08:00
Vincent Wei eed7f70cf9 ServerGetZNodeHeader -> ServerGetWinZNodeHeader, ServerReleaseZNodeHeader -> ServerReleaseWinZNodeHeader 2020-01-22 16:19:33 +08:00
Vincent Wei 95f7b67489 tune SyncUpdateDC and SyncUpdateSurface 2020-01-22 16:19:15 +08:00
Vincent Wei 7062128ab1 fix a bug of set pixels to NULL 2020-01-22 16:18:20 +08:00
Vincent Wei 6319fe06f9 tune fallback operatings to support changes of wallpaper pattern 2020-01-22 16:17:57 +08:00
Vincent Wei 025ac76316 ServerGetZNodeHeader -> ServerGetWinZNodeHeader, ServerReleaseZNodeHeader -> ServerReleaseWinZNodeHeader 2020-01-22 16:16:59 +08:00
Vincent Wei ef0a6b9520 make SyncUpdateDC and SyncUpdateSurface inline for not defined _MGUSE_SYNC_UPDATE and/or not defined _MGSCHEMA_COMPOSITING 2020-01-22 16:16:14 +08:00
Vincent Wei 8670da5d62 fix conditional compilation errors 2020-01-22 14:04:39 +08:00
Vincent Wei 54a991098e call __compsor_check_znodes 2020-01-22 11:55:47 +08:00
Vincent Wei fcdd26fdea declare __compsor_check_znodes 2020-01-22 11:55:28 +08:00
Vincent Wei 93b0ab5f0a tune and implement ServerReleaseZNodeHeader and ServerReleasePopupMenuZNodeHeader 2020-01-22 11:50:17 +08:00
Vincent Wei 693292d8bf initialize dirty_rcs to NULL for allocated new z-nodes 2020-01-22 11:49:26 +08:00
Vincent Wei d2be775e37 implement __compsor_check_znodes 2020-01-22 11:48:39 +08:00
Vincent Wei 84d32199a6 tune fallback compositor 2020-01-22 11:48:19 +08:00
Vincent Wei b4a53b64c5 add dirty_age, nr_dirty_rcs, and dirty_rcs fields in ZORDERNODE 2020-01-22 11:47:52 +08:00
Vincent Wei db321712ac add dependent headers. 2020-01-22 11:47:13 +08:00
Vincent Wei f601edf7a5 cleanup and add dependent headers. 2020-01-22 11:46:50 +08:00
Vincent Wei 3ed116b53b add dirty_age, nr_dirty_rcs, and dirty_rcs fields in ZNODEHEADER for compositing schema; lock shared surface in ServerGetZNodeHeader and ServerGetPopupMenuZNodeHeader if specified and return the dirty rects info; declare ServerReleaseZNodeHeader and ServerReleasePopupMenuZNodeHeader; tune compositor operations: on_dirty_ppp, on_dirty_win, and on_dirty_wpp 2020-01-22 11:46:18 +08:00
Vincent Wei 280b55ac7c mark deprecated 2020-01-22 09:10:32 +08:00
Vincent Wei 02115fb258 use mg_slice_alloc0 and mg_slice_free 2020-01-22 09:10:05 +08:00
Vincent Wei 3289d74a83 cleanup 2020-01-22 09:09:26 +08:00
Vincent Wei ba29a38202 interset with screen before calling GAL_BlitSurface 2020-01-22 08:39:53 +08:00
Vincent Wei 17656af74a move GAL_IntersectRect from surface.c to newgal.h; galrect_2_rect -> GAL_Rect2RECT and move it to newgal.h; add RECT2GAL_Rect 2020-01-22 08:39:17 +08:00
Vincent Wei ddaa8cd3a0 debug cursor showing 2020-01-21 20:03:01 +08:00
Vincent Wei 2d9c6afda8 cleanup 2020-01-21 20:01:41 +08:00
Vincent Wei a8bd261aec cleanup 2020-01-21 18:31:56 +08:00
Vincent Wei 0e0319a737 cleanup 2020-01-21 18:31:42 +08:00
Vincent Wei 9874a9385f remove MAX_CURSORWIDTH and MAX_CURSORHEIGHT 2020-01-21 18:30:53 +08:00
Vincent Wei 2de5a41851 use get_sem_key_for_layers instead of get_sem_key 2020-01-21 17:39:55 +08:00
Vincent Wei d5d7fff646 return before notsupport in GAL_UpdateRects 2020-01-21 17:39:24 +08:00
Vincent Wei 96a702642d tune GAL_SetCursor and GAL_MoveCursor 2020-01-21 17:38:30 +08:00
Vincent Wei b0e780dfd8 use surface width and height for screen width and height when it is the server 2020-01-21 17:38:07 +08:00
Vincent Wei be2f3a2546 call SyncUpdateDC 2020-01-21 17:37:14 +08:00
Vincent Wei 7ed4d9244b enhance kernel_IsOnlyMe to remove old semaphore sets; use flock to check IsOnlyMe 2020-01-21 17:36:58 +08:00
Vincent Wei b1d9b3eb4f cleanup 2020-01-21 17:35:40 +08:00
Vincent Wei 5b55d1b7ac cleanup 2020-01-21 17:35:30 +08:00
Vincent Wei a01908e56f support for software cursor for compositing schema 2020-01-21 17:35:18 +08:00
Vincent Wei 528ed6589d add inline functions: get_shm_key_for_system, get_sem_key_for_system, and get_sem_key_for_layers 2020-01-21 17:34:44 +08:00
Vincent Wei d595ffe76f add a flag to video info: hw_cursor 2020-01-21 17:34:04 +08:00
Vincent Wei ffb6112e25 mark HDC_SCREEN as a memory dc for compositing schema; implement SyncUpdateSurface 2020-01-21 14:38:51 +08:00
Vincent Wei 6ff853f735 lock/unlock surface when syncupdate shared surface 2020-01-21 14:38:14 +08:00
Vincent Wei c5b83c9498 declare SyncUpdateSurface 2020-01-21 14:37:33 +08:00
Vincent Wei 82497a4032 fix conditional compilation errors 2020-01-21 12:20:04 +08:00
Vincent Wei dc1d0a8016 fix conditional compilation errors 2020-01-21 12:16:24 +08:00
Vincent Wei d4d9fe3bc4 Call GAL_UpdateRect for shared surfaces when leaving drawing 2020-01-21 12:11:39 +08:00
Vincent Wei 22799cda37 use IS_SCREEN_SURFACE to check whether hide/show cursor in BitBlt 2020-01-21 12:10:53 +08:00
Vincent Wei fe22d61639 Tune GAL_UpdateRects for shared surfaces 2020-01-21 12:10:11 +08:00
Vincent Wei 44cea5b587 init video, dirty_age, nr_dirty_rcs to zero 2020-01-21 12:08:38 +08:00
Vincent Wei 947cde2e9b tune kernel_ShowCursorForGDI for compositing schema 2020-01-21 12:08:07 +08:00
Vincent Wei 4dec634bd9 add nr_dirty_rcs field and use unsigned int for dirty_age 2020-01-21 12:07:25 +08:00
Vincent Wei 21866051b5 add macro: IS_SCREEN_SURFACE 2020-01-21 12:06:53 +08:00
Vincent Wei 10c69afbf7 define NR_DIRTY_RECTS to 16 2020-01-21 12:06:31 +08:00
Vincent Wei 733d1c3377 lock_mousemove_sem -> LOCK_MOUSEMOVE_SEM, unlock_mousemove_sem -> UNLOCK_MOUSEMOVE_SEM 2020-01-21 10:39:19 +08:00
Vincent Wei 4f1527c898 lock_draw_sem -> LOCK_DRAW_SEM; unlock_draw_sem -> UNLOCK_DRAW_SEM 2020-01-21 10:38:49 +08:00
Vincent Wei fc42d28f65 remove unnecessary compilation conditions 2020-01-21 10:38:20 +08:00
Vincent Wei 4aa7904db7 tune implementation of mg_InitScreenDC; remove unnecessary compilation conditions 2020-01-21 10:37:28 +08:00
Vincent Wei 805c7f5bb2 define __mg_switch_away and cleanup 2020-01-21 10:36:13 +08:00
Vincent Wei 8e6336d2f3 cleanup. This is file is marked deprecated 2020-01-21 10:35:34 +08:00
Vincent Wei 6440db4446 reflect the change of mg_InitScreenDC 2020-01-21 10:34:49 +08:00
Vincent Wei e0c4874bb9 move definitaion of __mg_layer to src/newgal/video.c 2020-01-21 10:33:47 +08:00
Vincent Wei be051b59ea move definitaion of __mg_layer to src/newgal/video.c 2020-01-21 10:33:34 +08:00
Vincent Wei 3544a587d3 lock_cursor_sem -> LOCK_CURSOR_SEM, unlock_cursor_sem -> UNLOCK_CURSOR_SEM 2020-01-21 10:32:55 +08:00
Vincent Wei 5a5bee347c change prototype of mg_InitScreenDC to no argument 2020-01-21 10:32:11 +08:00
Vincent Wei 11c0821afb make __mg_switch_away available for all runtime modes; remove declaration for unlock_draw_sem and lock_draw_sem 2020-01-21 10:31:28 +08:00
Vincent Wei 1b5e3e3a45 cleanup: uppercase macros 2020-01-21 10:30:36 +08:00
Vincent Wei 4f662c216b CHECK_DRAWING -> WITHOUT_DRAWING; add BLOCK_DRAW_SEM, UNBLOCK_DRAW_SEM, and WITHOUT_DRAWING for compositing schema 2020-01-21 10:29:31 +08:00
Vincent Wei a110882134 cleanup: lock_mousemove_sem -> LOCK_MOUSEMOVE_SEM, unlock_mousemove_sem -> UNLOCK_MOUSEMOVE_SEM 2020-01-21 10:27:49 +08:00
Vincent Wei dc0ff60b80 init compositor manager in ServerStartup 2020-01-20 18:47:57 +08:00
Vincent Wei 371038040f add changes to ZNODEHEADER and init it to zero when allocating a new znode 2020-01-20 18:36:30 +08:00
Vincent Wei 3b1351b128 add changes in ZNODEHEADER and tune the operation names 2020-01-20 18:20:30 +08:00
Vincent Wei 6b2197ea1d fix compilation error 2020-01-20 16:55:32 +08:00
Vincent Wei 9aec7a85cf disable use of sg_FreeClipRectList, sg_ScrGCRInfo, and sg_UpdateRgn for compositing schema; call compositing operations when znode changed. 2020-01-20 16:52:41 +08:00
Vincent Wei ed904a3e92 tune operations 2020-01-20 16:51:30 +08:00
Vincent Wei 5b169494be tune ZORDERNODE 2020-01-20 16:51:00 +08:00
Vincent Wei 2120020801 tune CompositorOps 2020-01-20 16:50:37 +08:00
Vincent Wei 9b48b966cf optimize composite_with_wallpaper 2020-01-20 12:14:24 +08:00
Vincent Wei 5840f4f1a8 reset clipping rect of HDC_SCREEN_SYS before composting 2020-01-20 12:07:37 +08:00
Vincent Wei 56c2c7ec17 implement on_dirty_win 2020-01-20 11:56:37 +08:00
Vincent Wei d3835670ac tune CompositorOps 2020-01-20 11:55:14 +08:00
Vincent Wei e2b3c31e3d fix a compilation error 2020-01-20 08:39:10 +08:00
Vincent Wei 4b89ff7d19 comment out get_text_char_pos and tune srvChangeCaption to use strdup 2020-01-19 19:32:58 +08:00
Vincent Wei 50fa5b53f8 tune zorder_op 2020-01-19 19:20:38 +08:00
Vincent Wei f2b8663e29 implement ServerGetPopupMenuZNodeHeader, ServerGetPopupMenusCount, ServerGetZNodeHeader, ServerGetPrevZNode; tune implementation of ServerDoZNodeOperation, ServerGetZNodeInfo, and ServerGetNextZNode 2020-01-19 19:19:58 +08:00
Vincent Wei 740f26624e use strdup for caption and implement kernel_get_prev_znode 2020-01-19 19:18:18 +08:00
Vincent Wei 02747e6077 use extra data of request to pass the caption 2020-01-19 19:17:20 +08:00
Vincent Wei 2b06635b43 tune ZORDERNODE order of fields to keep same layout with ZNODEHEADER 2020-01-19 19:16:45 +08:00
Vincent Wei 546d35c895 change prototype of __mg_do_zorder_operation to include caption 2020-01-19 19:15:37 +08:00
Vincent Wei ba13aabc13 remove MAX_CAPTION_LEN 2020-01-19 19:15:04 +08:00
Vincent Wei 0017afe21e use extra data to pass caption of znode 2020-01-19 19:14:21 +08:00
Vincent Wei 30353afdf8 declare ServerGetPrevZNode, ZNODEHEADER, ServerGetZNodeHeader, ServerGetPopupMenusCount, and ServerGetPopupMenuZNodeHeader 2020-01-19 19:13:33 +08:00
Vincent Wei e0537490c0 empty implementation of fallback compositor 2020-01-19 16:23:10 +08:00
Vincent Wei afa496324e implement mg_InitCompositor, mg_TerminateCompositor, ServerGetCompositorOps, ServerRegisterCompositor, ServerUnregisterCompositor, and ServerSelectCompositor 2020-01-19 16:22:35 +08:00
Vincent Wei 9cd099e793 LEN_DRIVER_FILENAME -> LEN_SO_NAME 2020-01-19 16:21:10 +08:00
Vincent Wei d6c06a7b9e add compsor-manager.c compsor-fallback.c 2020-01-19 16:20:44 +08:00
Vincent Wei 533090acd1 call mg_InitCompositor and mg_TerminateCompositor 2020-01-19 16:20:25 +08:00
Vincent Wei d69070e5e8 declare mg_InitCompositor and mg_TerminateCompositor 2020-01-19 16:19:56 +08:00
Vincent Wei bca256ec7f add constant: LEN_SO_NAME 2020-01-19 16:19:35 +08:00
Vincent Wei b5b49d5658 cleanup 2020-01-19 16:19:07 +08:00
Vincent Wei c1ad338f12 declare ServerRegisterCompositor, ServerUnregisterCompositor, ServerGetCompositorOps, ServerSelectCompositor, __ex_compositor_get, and struct _CompositorOps 2020-01-19 16:18:46 +08:00
Vincent Wei 8f2b0dbfe1 description of key def_compositor_so in compositing_schema section 2020-01-19 16:16:23 +08:00
Vincent Wei b6b9abdf33 cleanup 2020-01-17 18:55:12 +08:00
Vincent Wei db4bc6b190 draft of notes for version 4.1.0 2020-01-17 18:55:05 +08:00
Vincent Wei 9c22494d4c more words for compositing schema 2020-01-17 18:54:38 +08:00
Vincent Wei d13bbf9d33 zi->nr_globals set to 0 initially 2020-01-17 17:25:39 +08:00
Vincent Wei 7030edd84e add AllocZOrderNodeEx and FreeZOrderNodeEx 2020-01-17 17:24:25 +08:00
Vincent Wei e5bc4374ad implement __mg_move_client_to_layer 2020-01-17 17:23:14 +08:00
Vincent Wei 6e38c0c889 count in DEF_NR_FIXEDZNODES 2020-01-17 17:22:16 +08:00
Vincent Wei 1e60b08457 move index for znodes to constants.h 2020-01-17 17:21:03 +08:00
Vincent Wei 500b85d74a handle fixed znodes 2020-01-17 15:53:08 +08:00
Vincent Wei 1e8f5fc1de handle fixed znodes; implement kernel_get_next_znode 2020-01-17 15:52:26 +08:00
Vincent Wei 80a528ffc0 declare kernel_get_next_znode 2020-01-17 15:50:41 +08:00
Vincent Wei a5134fec40 cleanup 2020-01-17 15:50:23 +08:00
Vincent Wei acd0c95301 tune implementation of do_alloc_layer for fixed znodes 2020-01-17 12:02:15 +08:00
Vincent Wei 6707987965 cleanup 2020-01-17 12:01:40 +08:00
Vincent Wei 0eda746112 tune AllocaZOrderNode and FreeZOrderNode for fixed znodes 2020-01-17 12:01:20 +08:00
Vincent Wei 9d0e3aaf24 handle window style if failed to allocate znode for fixed ones 2020-01-17 12:00:11 +08:00
Vincent Wei d240c4ceb3 handle window style if failed to allocate znode for fixed ones 2020-01-17 11:59:57 +08:00
Vincent Wei 5ba5476441 tune constants for znode 2020-01-17 11:59:28 +08:00
Vincent Wei a4355c6b9d use field ct instead of znode flag 2020-01-17 08:54:11 +08:00
Vincent Wei 903a42d193 cleanup 2020-01-16 18:13:34 +08:00
Vincent Wei 138271050f implement move_to_layer as the handler for REQID_MOVETOLAYER 2020-01-16 18:13:11 +08:00
Vincent Wei 8caeb31f79 implement ServerMoveClientToLayer and initialize fixed znode for new layers 2020-01-16 18:11:43 +08:00
Vincent Wei 867f416513 implement __mg_move_client_to_layer and handle MSG_LAYERCHANGED 2020-01-16 18:10:47 +08:00
Vincent Wei 589d81f756 declare __mg_move_client_to_layer 2020-01-16 18:09:42 +08:00
Vincent Wei 2bc03c662b declare MOVETOLAYERINFO, MOVEDCLIENTINFO, and __mg_client_on_layer_changed 2020-01-16 18:09:25 +08:00
Vincent Wei 32d8260430 cleanup 2020-01-16 18:08:45 +08:00
Vincent Wei 88dec30c67 implement __mg_client_on_layer_changed and MoveToLayer 2020-01-16 18:08:17 +08:00
Vincent Wei 26d0cec9a9 add MSG_UPDATECLIWIN 2020-01-16 18:07:27 +08:00
Vincent Wei 0c697163ba cleanup; declare ServerMoveClientToLayer and MoveToLayer 2020-01-16 18:06:46 +08:00
Vincent Wei 3bc45510b7 cleanup 2020-01-16 15:01:54 +08:00
Vincent Wei 85480871fb tune and cleanup 2020-01-16 14:59:31 +08:00
Vincent Wei 3a2a363c4f copy ct_arg in ServerGetZNodeInfo 2020-01-16 14:59:23 +08:00
Vincent Wei 46621017c8 enhance to support compositing type and argument for CreateMainWindowEx2 2020-01-16 12:15:34 +08:00
Vincent Wei 4f6a0aebf5 implement SetMainWindowAlwaysTop and SetMainWindowCompositing 2020-01-16 11:45:19 +08:00
Vincent Wei 8ea2493132 tune flags for znode; add new types for popupmenu, screenlock, docker, and launcher; add new flags for maximized and minimized for future use 2020-01-16 09:37:14 +08:00
Vincent Wei b9718351f7 rename ZOF_COMPOS_XXX macros 2020-01-15 18:37:54 +08:00
Vincent Wei f22b545315 CreateMainWindowEx -> CreateMainWindowEx2 2020-01-15 18:37:05 +08:00
Vincent Wei 38287abb1c declare CreateMainWindowEx2, WS_ALWAYSTOP, WS_EX_WINTYPE_MASK, WS_EX_WINTYPE_SCREENLOCK, WS_EX_WINTYPE_DOCKER, WS_EX_WINTYPE_LAUNCHER, SetMainWindowAlwaysTop, SetMainWindowCompositing 2020-01-15 18:36:32 +08:00
Vincent Wei 7fad5d2752 cleanup 2020-01-15 18:34:34 +08:00
Vincent Wei d4e066cbc9 cleanup 2020-01-15 17:32:22 +08:00
Vincent Wei 1b7c1ffaf4 ZOF_TF_TOPFOREVER -> ZOF_TF_STUCK 2020-01-15 15:41:26 +08:00
Vincent Wei a6d904f854 make SIZE_USAGE_BMP and SIZE_MASKRECT_USAGE_BMP to be multiples of 8 2020-01-15 15:40:56 +08:00
Vincent Wei 5099d79e4c cleanup 2020-01-15 15:10:10 +08:00
Vincent Wei 8a6bf58a35 delete memdc in srvForceCloseMenu 2020-01-15 15:09:55 +08:00
Vincent Wei 68a591acef remove wrong refcount-- 2020-01-15 14:34:35 +08:00
Vincent Wei c05087bfd5 enhance cliStartTrackPopupMenu to support compositing schema 2020-01-15 14:33:52 +08:00
Vincent Wei 92eabc3373 tune for change of srvStartTrackPopupMenu 2020-01-15 14:33:13 +08:00
Vincent Wei b1dcef2d66 enhance srvStartTrackPopupMenu to support compositing schema 2020-01-15 14:32:44 +08:00
Vincent Wei 35c8e50c8d fix compilation errors 2020-01-15 12:35:27 +08:00
Vincent Wei 429ff88691 fix compilation errors 2020-01-15 12:34:32 +08:00
Vincent Wei fcfb830ac5 fix compilation errors 2020-01-15 12:33:37 +08:00
Vincent Wei ace6e87eaf use refcount of surface when calling CreateMemDCFromSurface and DeleteMemDC; implement GetSurfaceFromDC 2020-01-15 12:31:27 +08:00
Vincent Wei cd01d85a41 check return value of MSG_INITMENU 2020-01-15 12:30:25 +08:00
Vincent Wei 1e26154f8f check return value of MSG_INITMENU 2020-01-15 12:30:07 +08:00
Vincent Wei dc58ee6d20 some new flags for znode 2020-01-15 12:29:45 +08:00
Vincent Wei 2b970b17bf introduce dc field for menu 2020-01-15 12:29:20 +08:00
Vincent Wei 1a14f8f1bc declare some internal apis 2020-01-15 12:28:38 +08:00
Vincent Wei aec75c3232 move some declartions to internals.h 2020-01-15 12:28:17 +08:00
Vincent Wei 2b18f81b1c cleanup; implement create_memdc_from_menu and delete_memdc_for_menu for compositing 2020-01-15 12:27:55 +08:00
Vincent Wei 23a46ce08f use SHAREDSURFINFO to return the wallpaper pattern surface information 2020-01-15 10:15:31 +08:00
Vincent Wei 39cfda8384 tune prototype of AttachSharedHWSurface 2020-01-15 10:14:49 +08:00
Vincent Wei a97e344b45 tune implementation of GAL_AttachSharedRGBSurface 2020-01-15 10:14:20 +08:00
Vincent Wei ddc4453be4 use SHAREDSURFINFO to get the wallpaper surface info 2020-01-15 10:13:44 +08:00
Vincent Wei 164d39917c pass surface flags and surface map size to srvAllocZOrderNode 2020-01-15 10:13:17 +08:00
Vincent Wei b63b34c26c fix bad argument name 2020-01-15 10:12:32 +08:00
Vincent Wei 43e4c29c6e add SHAREDSURFINFO structure 2020-01-15 10:11:54 +08:00
Vincent Wei 5ca8683356 fix bug: bad depth 2020-01-15 09:05:20 +08:00
Vincent Wei d88718bbc8 cleanup 2020-01-14 19:14:58 +08:00
Vincent Wei e8d6e479e1 field surf for compositing schema 2020-01-14 18:21:40 +08:00
Vincent Wei 944b3fd116 cleanup 2020-01-14 18:21:15 +08:00
Vincent Wei c53f8229b2 cleanup 2020-01-14 18:20:54 +08:00
Vincent Wei 8fa5253b6a restore old calls of kernel_alloc_z_order_info 2020-01-14 12:16:12 +08:00
Vincent Wei 44b7420a61 enhance zorder_op to support shared surface (use version 1 handler); 2020-01-14 12:12:25 +08:00
Vincent Wei 2dd3c89848 restore shared znode info 2020-01-14 12:11:33 +08:00
Vincent Wei fd94643d55 implement CreateMemDCFromSurface 2020-01-14 12:11:00 +08:00
Vincent Wei eee8aa9836 enhance to get file_size as map_size; implement GAL_CreateSurfaceForZNode 2020-01-14 12:10:41 +08:00
Vincent Wei 7b87a03ff3 REQID_NEXUS_CLIENT_GET_SURFACE -> REQID_NEXUS_HWSURFACE 2020-01-14 12:09:43 +08:00
Vincent Wei 71459366d5 restore old implementation for shared znode info 2020-01-14 12:09:12 +08:00
Vincent Wei f479377b4e change AllocZOrderNode and FreeZOrderNode for compositing schema 2020-01-14 12:08:49 +08:00
Vincent Wei 138c378665 create memdc for shared surface of window and delete it 2020-01-14 12:08:10 +08:00
Vincent Wei 20450fdca3 change for extra argument for AllocZOrderNode and FreeZOrderNode 2020-01-14 12:07:12 +08:00
Vincent Wei 65f0f4894e restore old implementation of kernel_alloc_z_order_info 2020-01-14 12:06:26 +08:00
Vincent Wei 25c57d84ba restore id of semaphore set for shared znode info 2020-01-14 12:05:56 +08:00
Vincent Wei 898d457701 introduce argument fd for __mg_do_zorder_operation 2020-01-14 12:04:40 +08:00
Vincent Wei 50718d3ac4 declaration of GAL_CreateSurfaceForZNode 2020-01-14 12:03:35 +08:00
Vincent Wei 94add6464f declaration of CreateMemDCFromSurface 2020-01-14 12:03:04 +08:00
Vincent Wei 09490187b0 introduct REQMASK_JOINLAYERFIRST and map_size field in ZORDEROPINFO 2020-01-14 12:02:31 +08:00
Vincent Wei 1843c94fed create shared surface for main window or global control 2020-01-14 12:01:33 +08:00
Vincent Wei a0d069b5b6 use REQMASK_JOINLAYERFIRST to check whether need call JoinLayer first 2020-01-14 12:00:34 +08:00
Vincent Wei cd5c13bf3e restore shared znode info and add mem_dc field for compositing schema 2020-01-14 11:59:44 +08:00
Vincent Wei 8d2adaa61d For LoadCursorFromPNGMem, the array of offsets must have NR_CURSORS + 1 units 2020-01-14 08:50:18 +08:00
Vincent Wei aec634797b make DesktopWinProc static; DesktopMain -> __kernel_desktop_main 2020-01-13 18:27:28 +08:00
Vincent Wei 9c392a3229 _MGUSE_COMPOSITING -> _MGSCHEMA_COMPOSITING; _MGUSE_SHAREDFB -> _MGSCHEMA_SHAREDFB 2020-01-13 18:10:01 +08:00
Vincent Wei 8020e09de5 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:09:04 +08:00
Vincent Wei c3d0a19898 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:08:44 +08:00
Vincent Wei 006508c84f use POSIX semaphore instead of System V semaphore set 2020-01-13 18:08:15 +08:00
Vincent Wei 2d56b56826 cleanup 2020-01-13 18:07:26 +08:00
Vincent Wei 1db2ef3a71 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:06:40 +08:00
Vincent Wei 5abad6d6b1 cleanup 2020-01-13 18:05:59 +08:00
Vincent Wei d52863c6ae do not use System V semaphore set for shared surfaces 2020-01-13 18:05:37 +08:00
Vincent Wei a45688ae83 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:04:44 +08:00
Vincent Wei 0b5fca91e9 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:04:31 +08:00
Vincent Wei 4620c06a74 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:04:12 +08:00
Vincent Wei 3a66595c4d tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:03:42 +08:00
Vincent Wei b45562d171 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:02:56 +08:00
Vincent Wei eead702d78 tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:02:30 +08:00
Vincent Wei 29c155ba1d cleanup 2020-01-13 18:01:59 +08:00
Vincent Wei 07eeec685c tune code for _MGSCHEMA_COMPOSITING 2020-01-13 18:01:12 +08:00
Vincent Wei 6c5302967e disable code if not defined _MGSCHEMA_COMPOSITING 2020-01-13 18:00:34 +08:00
Vincent Wei af359e7fd1 move some constants from zorder.h 2020-01-13 17:59:51 +08:00
Vincent Wei 8c1b087b27 disable code if not defined _MGSCHEMA_COMPOSITING 2020-01-13 17:59:20 +08:00
Vincent Wei 76d99caff7 zorder_shmid only for _MGSCHEMA_SHAREDFB; _MGUSE_COMPOSITING -> _MGSCHEMA_COMPOSITING 2020-01-13 17:58:28 +08:00
Vincent Wei ba650606aa _MGUSE_COMPOSITING -> _MGSCHEMA_COMPOSITING 2020-01-13 17:57:15 +08:00
Vincent Wei c2a44e869e check declaration of SHM_ANON; _MGUSE_COMPOSITING -> _MGSCHEMA_COMPOSITING; _MGUSE_SHAREDFB -> _MGSCHEMA_SHAREDFB 2020-01-13 17:56:47 +08:00
Vincent Wei f334a4c7ae cleanup 2020-01-13 11:46:43 +08:00
Vincent Wei 34650250f9 set a static buff to pixels for empty surface 2020-01-13 11:46:23 +08:00
Vincent Wei 5e4f1db566 fix bad calculation of file_size 2020-01-13 11:45:52 +08:00
Vincent Wei e8a3c24c9c add macro ROUND_TO_MULTIPLE 2020-01-13 11:45:27 +08:00
Vincent Wei 94272c3af2 check surface size in __mg_check_ecrgn, for empty surface, return NULL 2020-01-13 10:23:04 +08:00
Vincent Wei aea3ff9c4f optimize GetScreenRect and fix a bug to create wallpaper pattern surface for clients 2020-01-13 10:22:21 +08:00
Vincent Wei e98032331f initial screen resolution in shared resource segment 2020-01-13 10:21:23 +08:00
Vincent Wei 48c0e35cfa add screen resolution in shared resource segment 2020-01-13 10:20:54 +08:00
Vincent Wei 1f89b02489 Do mot check whether joined a layer for request REQID_GETWPSURFACE 2020-01-12 18:30:26 +08:00
Vincent Wei 690949eb94 more comments words for wallpaper_pattern_size key 2020-01-12 18:29:34 +08:00
Vincent Wei b29ed8ac94 enable fbcon for developer mode 2020-01-12 14:44:44 +08:00
Vincent Wei fde2299126 Call GetScreenRect for usage of &g_rcScr 2020-01-12 14:27:13 +08:00
Vincent Wei 9547020633 New API: GetScreenRect and define g_rcScr as a macro calling GetScreenRect 2020-01-12 14:26:51 +08:00
Vincent Wei 43c4570b87 tune and cleanup 2020-01-10 19:09:09 +08:00
Vincent Wei db92655ac5 comments for PNG cursor 2020-01-10 19:06:02 +08:00
Vincent Wei e9db07e428 description of HDC_SCREEN, HDC_SCREEN_SYS under compositing schema 2020-01-10 19:04:36 +08:00
Vincent Wei e75144e069 cleanup and eliminate compilation errors 2020-01-10 16:25:52 +08:00
Vincent Wei 6a48caa5b0 bmp_ComputePitch -> __mg_bmp_compute_pitch 2020-01-10 15:03:42 +08:00
Vincent Wei 7065b5b854 add __mg_bitmap_get_std_16c 2020-01-10 15:03:07 +08:00
Vincent Wei ef058ca5dd implement srvCreateCursor for compositing schema 2020-01-10 15:02:06 +08:00
Vincent Wei dac437026a tune code to use __mg_lookfor_unused_slot and __mg_slot_clear_use; make these functions inline 2020-01-10 11:48:02 +08:00
Vincent Wei 08dc23ec3e cleanup 2020-01-10 11:26:30 +08:00
Vincent Wei 2fd53b7dba implement kernel_ShowCursorForGDI for compositing schema 2020-01-10 11:22:26 +08:00
Vincent Wei 70ce5dbe74 do not call kernel_ReShowCursor for compositing schema 2020-01-10 11:22:03 +08:00
Vincent Wei b89f4e128a cleanup and remove implement sysres_load_system_cursor 2020-01-10 11:09:53 +08:00
Vincent Wei 23482fdd44 make sysres_load_system_cursor inline 2020-01-10 11:09:36 +08:00
Vincent Wei 9add6a46da enhance __mg_load_cursor_from_res to support PNG for compositing schema 2020-01-10 11:05:45 +08:00
Vincent Wei e329a5856b fix bug of wrong check cb_alloc_buff; get_extension -> __mg_get_extension 2020-01-10 11:04:56 +08:00
Vincent Wei b20883c832 use GAL_HWSURFACE to check haredware surface 2020-01-10 11:03:57 +08:00
Vincent Wei c29bb2611c cleanup and get_extension -> __mg_get_extension 2020-01-10 11:03:01 +08:00
Vincent Wei d0fb2a3b82 cleanup and implement __mg_extract_integers 2020-01-10 11:02:02 +08:00
Vincent Wei b5816ee4e2 remove duplicated GetSystemCursor and GetDefaultCursor 2020-01-10 11:00:54 +08:00
Vincent Wei 37f0369b95 cleanup and add declaration of __mg_load_cursor_from_res 2020-01-10 11:00:10 +08:00
Vincent Wei 47604e3736 cleanup and remove get_extension 2020-01-10 10:55:44 +08:00
Vincent Wei 57ff3c9267 add __mg_get_extension and __mg_extract_integers 2020-01-10 10:55:12 +08:00
Vincent Wei c2b0de97d2 handlers for requests REQID_LOADCURSOR_PNG and REQID_LOADCURSOR_PNG_MEM 2020-01-09 12:17:34 +08:00
Vincent Wei 902a7c56f5 implement LoadBitmapEx2 2020-01-09 12:16:46 +08:00
Vincent Wei a359534236 implement LoadCursorFromPNGFile and LoadCursorFromPNGMem 2020-01-09 12:16:14 +08:00
Vincent Wei a2c01ff087 cleanup 2020-01-09 12:15:07 +08:00
Vincent Wei 31f5633547 new macros for compositing schema: MAX_CURSORWIDTH and MAX_CURSORHEIGHT 2020-01-09 12:14:51 +08:00
Vincent Wei a346db1742 new client requests id: REQID_LOADCURSOR_PNG and REQID_LOADCURSOR_PNG_MEM 2020-01-09 12:14:03 +08:00
Vincent Wei 74f6510971 new API: LoadCursorFromPNGFile, LoadCursorFromPNGMem 2020-01-09 12:13:03 +08:00
Vincent Wei 582ed130a7 new API: LoadBitmapEx2 2020-01-09 12:12:18 +08:00
Vincent Wei dd21dbdde7 tune for cursor support for compositing schema 2020-01-08 19:28:38 +08:00
Vincent Wei d25d629292 cleanup 2020-01-08 17:24:01 +08:00
Vincent Wei dd69a7c764 declare GAL functions about cursor 2020-01-08 17:23:33 +08:00
Vincent Wei c501c8e588 Implement GAL_CreateCursorSurface, GAL_FreeCursorSurface, GAL_SetCursor, and GAL_MoveCursor 2020-01-08 17:21:52 +08:00
Vincent Wei 8bd3f22fd5 tune 2020-01-08 15:21:13 +08:00
Vincent Wei db08ab931e tune 2020-01-08 14:42:36 +08:00
Vincent Wei 0d3d456334 tune and cleanup 2020-01-08 12:24:54 +08:00
Vincent Wei 3c295190ac make sure that shared_header of a new surface is NULL 2020-01-08 12:24:34 +08:00
Vincent Wei 1c3e2bee7a implement GAL_CreateSharedRGBSurface, GAL_FreeSharedSurfaceData, GAL_AttachSharedRGBSurface, and GAL_DettachSharedRGBSurfaceData functions 2020-01-08 12:22:46 +08:00
Vincent Wei 4f49a2a559 implement __mg_create_anonymous_file 2020-01-08 12:21:57 +08:00
Vincent Wei 3f4001e395 make compositing schema disabled by default 2020-01-08 12:17:12 +08:00
Vincent Wei 2c9f7abb7c cleanup 2020-01-07 17:52:40 +08:00
Vincent Wei 650987c048 call terminate functions 2020-01-07 17:42:41 +08:00
Vincent Wei b06bf73980 cleanup 2020-01-07 17:26:28 +08:00
Vincent Wei b43b817c35 add a new field to indicate whether a video engine is ready for compositing schema 2020-01-07 17:26:07 +08:00
Vincent Wei 828b948e6f add an argument for GAL_GetVideo to indicate whether the video is ready for compositing schema 2020-01-07 17:25:28 +08:00
Vincent Wei 483d067b6e call mg_InitSemManger and mg_TerminateSemManager; cleanup 2020-01-07 17:23:26 +08:00
Vincent Wei 1a5ae775b9 add sem-manager.c 2020-01-07 17:22:32 +08:00
Vincent Wei 312dd032d1 _NR_SEM -> _NR_SYS_SEM 2020-01-07 17:22:14 +08:00
Vincent Wei c3d8e37d04 Declare struct _SharedSurfaceHeader 2020-01-07 17:21:45 +08:00
Vincent Wei 0b63e2c764 declare functions for semaphore manager 2020-01-07 17:20:54 +08:00
Vincent Wei 1c28701ebf add more constants for compositing schema 2020-01-07 17:20:22 +08:00
Vincent Wei d63f655df6 add section for compositing schema 2020-01-07 17:18:54 +08:00
Vincent Wei 2814697b1f add mg_InitSemManger, mg_TerminateSemManager, __mg_alloc_sem_for_compos, and __mg_free_sem_for_compos 2020-01-07 17:11:38 +08:00
Vincent Wei e4260b79eb Enhance mg_InitGAL to use GAL engine info from shared resource for MiniGUI-Processes 2020-01-07 09:35:51 +08:00
Vincent Wei 797b4aa83f tune for compilation errors 2020-01-06 18:37:43 +08:00
Vincent Wei 992397679a add engine information in the shared resource to avoid getting the info from bad runtime configure 2020-01-06 18:32:05 +08:00
Vincent Wei c8e35931cf pass a buffer to return the NEWGAL engine name: mg_InitGAL 2020-01-06 18:31:07 +08:00
Vincent Wei 29a51d2cf2 move some common constants to constants.h 2020-01-06 17:19:06 +08:00
Vincent Wei 447235b36a Remove unused local variable: newfd 2020-01-06 16:55:50 +08:00
Vincent Wei ca2e35df32 Use #ifdef _MGRM_PROCESSES instead of #ifndef _MGRM_THREADS 2020-01-06 16:55:32 +08:00
Vincent Wei fdb2ef360a cleanup: comment out unused fields in G_RES 2020-01-06 16:54:56 +08:00
Vincent Wei 6363f34c7f use_shm_open -> use_shmopen 2020-01-06 16:54:11 +08:00
Vincent Wei 24c786aa8a cleanup: change copyright year 2020-01-06 16:09:11 +08:00
Vincent Wei e9d0b3fab8 cleanup 2020-01-06 15:24:19 +08:00
Vincent Wei c088a580ca Implement ServerSendReplyEx, RegisterRequestHandlerV1, GetRequestHandlerV1, and GetRequestHandlerEx.
Use sock_recvmsg to handle request.
2020-01-06 15:03:57 +08:00
Vincent Wei f8af8b7295 Implement sock_sendmsg_t and sock_recvmsg_t. 2020-01-06 15:02:48 +08:00
Vincent Wei 103470b92d Remove global variable mgIsServer. 2020-01-06 15:02:01 +08:00
Vincent Wei 3926220212 Use a static global variable _is_server to implement IsServer. 2020-01-06 15:00:23 +08:00
Vincent Wei dc4c793b30 Declare new internal APIs: sock_sendmsg_t/sock_sendmsg, sock_recvmsg_t/sock_recvmsg. 2020-01-06 14:59:22 +08:00
Vincent Wei fadec4db94 Implement ClientRequestEx2;
Cleanup
2020-01-06 14:56:24 +08:00
Vincent Wei 2c2cb2c691 Introduce a new API IsServer and make mgIsServer to be a macro calling IsServer;
Introduce a new API ClientRequestEx2 and make ClientRequestEx to be a macro calling ClientRequestEx2;
Introduce a new API ServerSendReplyEx and make ServerSendReply to be a macro calling ServerSendReplyEx;
Introduce a new API RegisterRequestHandlerV1 to register an extended request handler;
Introduce a new API GetRequestHandlerV1 to get the exteneded request handler;
Introduce a new API GetRequestHandlerEx to get the request handler and the version of the handler;
Tune the prototypes of sock_write_t and sock_read_t to use size_t, ssize_t, and DWORD for count, return value, and timeout value repectively.
2020-01-06 14:50:00 +08:00
Vincent Wei 6aba2ed89b add -lrt to DEP_LIBS if use shm_open 2020-01-05 16:50:31 +08:00
Vincent Wei 6e744641d1 add --enable-shmopen option 2020-01-05 16:47:17 +08:00
Vincent Wei 5192a93a07 cleanup 2020-01-05 16:39:15 +08:00
Vincent Wei 4cdc911a0f more words for compositing schema 2020-01-05 14:44:37 +08:00
Vincent Wei c3b65b82bb tuning: add sharedfb_schema and MGUSE_SHAREDFB macro 2020-01-05 14:44:20 +08:00
Vincent Wei 0a955d6682 cleanup: remove redundant checking of _MGRM_STANDALONE 2020-01-05 14:43:14 +08:00
Vincent Wei 56c701e8d9 introduction words for compositing schema; change --enable-compositor to --enable-compositing 2020-01-03 18:15:42 +08:00
Vincent Wei 04b3713de9 BUGFIXING: bad initialization of a BITMAP structure (the saved bitmap under cursor); CLEANUP 2020-01-02 18:27:36 +08:00
Vincent Wei 74e60ed204 cleanup 2020-01-02 11:28:29 +08:00
Vincent Wei c107fcbc48 DRI -> DRM; new option: --enable-compositor 2020-01-02 10:43:39 +08:00
Vincent Wei dec68ac181 cleanup: remove _LITE_VERSION and _STAND_ALONE macros 2019-12-31 11:17:00 +08:00
1041 changed files with 502994 additions and 488077 deletions
+50793 -50793
View File
File diff suppressed because it is too large Load Diff
+196 -196
View File
@@ -1,89 +1,89 @@
/*
* Copyright (C) 2000-2007 Beijing Komoxo Inc.
* All rights reserved.
*/
#include "se_minigui.h"
/*
* Copyright (C) 2000-2007 Beijing Komoxo Inc.
* All rights reserved.
*/
#include "se_minigui.h"
#include "stdio.h"
#include "string.h"
#include "kmx_latin1_ttf.h"
#include "kmx_latin1_ttf.h"
#include "fzxh_gb2312_ttf.h"
#include "fzxh_gb18030_1_ttf_stub.h"
#include "fzxh_gb18030_2_ttf_stub.h"
#define ASSERT(a)
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
#define MAX_PATH 256
#define MAX_LOGICAL_FONT_SIZE 16 /* Physical font count per logical font */
#endif
#define MAX_LOGICAL_TABLE_SIZE 256
/* Script Easy font description data definition */
static void* font_table[] =
{
(void*) &kmx_latin1_ttf, 0,
(void*) &fzxh_gb2312_ttf, 0,
#define ASSERT(a)
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
#define MAX_PATH 256
#define MAX_LOGICAL_FONT_SIZE 16 /* Physical font count per logical font */
#endif
#define MAX_LOGICAL_TABLE_SIZE 256
/* Script Easy font description data definition */
static void* font_table[] =
{
(void*) &kmx_latin1_ttf, 0,
(void*) &fzxh_gb2312_ttf, 0,
(void*) &fzxh_gb18030_1_ttf, 0,
(void*) &fzxh_gb18030_2_ttf, 0,
0
};
#define FONT_TABLE_SIZE ((sizeof(font_table) / sizeof(void*) - 1) / 2)
static unsigned char logical_font_table_config[][MAX_LOGICAL_FONT_SIZE] =
{
{4, 0, 1, 2, 3}
};
#define LOGICAL_FONT_TABLE_SIZE (sizeof(logical_font_table_config) / (MAX_LOGICAL_FONT_SIZE * sizeof(unsigned char)))
#define DEFAULT_LOGICAL_FONT_INDEX 0
static unsigned char logical_font_table[MAX_LOGICAL_TABLE_SIZE];
0
};
#define FONT_TABLE_SIZE ((sizeof(font_table) / sizeof(void*) - 1) / 2)
static unsigned char logical_font_table_config[][MAX_LOGICAL_FONT_SIZE] =
{
{4, 0, 1, 2, 3}
};
#define LOGICAL_FONT_TABLE_SIZE (sizeof(logical_font_table_config) / (MAX_LOGICAL_FONT_SIZE * sizeof(unsigned char)))
#define DEFAULT_LOGICAL_FONT_INDEX 0
static unsigned char logical_font_table[MAX_LOGICAL_TABLE_SIZE];
static unsigned int logical_font_table_index_map[LOGICAL_FONT_TABLE_SIZE];
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const
struct {
const char *font_name;
int logical_font_index;
}
font_name_config[] =
{
{0, 0},
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const
struct {
const char *font_name;
int logical_font_index;
}
font_name_config[] =
{
{0, 0},
{0, 0},
{"fzxh_gb18030_1_ttf.le", 0},
{"fzxh_gb18030_2_ttf.le", 0},
};
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
{"fzxh_gb18030_2_ttf.le", 0},
};
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static const se_font_name_map font_name_map[] = {
/* iso8859-1 */
{"ttf-fzxh-rrncnn-0-0-iso8859-1", 0},
{"ttf-fzxh-rrncnn-0-0-iso8859-1", 0},
/* GB2312 */
{"ttf-fzxh-rrncnn-0-0-GB2312", 0},
/* utf-8 */
{"ttf-fzxh-rrncnn-0-0-utf-8", 0},
};
{"ttf-fzxh-rrncnn-0-0-utf-8", 0},
};
#define FONT_NAME_MAP_SIZE (sizeof(font_name_map) / sizeof(se_font_name_map))
const se_font_description se_font_desc = {
const se_font_description se_font_desc = {
FONT_TABLE_SIZE,
FONT_NAME_MAP_SIZE,
(const se_font_name_map*)font_name_map,
(const void **)font_table,
logical_font_table
FONT_NAME_MAP_SIZE,
(const se_font_name_map*)font_name_map,
(const void **)font_table,
logical_font_table
};
/* The following is the scripteasy mem pool definition */
#define SE_MEM_POOL_SIZE (64 * 1024)
#define SE_MEM_POOL_SIZE (64 * 1024)
#define SE_CACHE_MEM_POOL_SIZE (256 * 1024)
int se_minigui_mem_pool[SE_MEM_POOL_SIZE];
@@ -92,139 +92,139 @@ int se_minigui_cache_mem_pool[SE_CACHE_MEM_POOL_SIZE];
int se_minigui_cache_mem_pool_size = SE_CACHE_MEM_POOL_SIZE * sizeof(int);
/* The Following is for initializing font */
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const char * se_minigui_get_font_dir(void)
{
/* TO BE CUSTOMIZED */
static char font_dir[MAX_PATH + 1] = "/usr/minigui/se_new/minigui/src/fonts/";
return font_dir;
}
static FILE* se_minigui_open_font_file(const char *name)
{
static char path[MAX_PATH + 1];
const char *font_dir;
FILE *handle = 0;
font_dir = se_minigui_get_font_dir();
if(!font_dir)
{
return 0;
}
strcpy(path, font_dir);
strcat(path, name);
handle = fopen(path, "rb");
return handle;
}
unsigned int se_minigui_read_font(
void* name,
void* buffer,
unsigned int offset,
unsigned int size)
{
FILE* handle = (FILE*) name;
unsigned int read = 0;
int result = 0;
if(!handle)
return 0;
fseek(handle, offset, SEEK_SET);
printf("In se_minigui_read_font...\n");
return fread(buffer, 1, size, handle);
}
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static int append_logical_font(int pos, const unsigned char *logical_font)
{
memcpy (logical_font_table + pos, logical_font, logical_font[0] + 1);
return logical_font[0] + 1;
}
static void build_logical_font_table (void)
{
unsigned int i = 0;
int pos = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
pos += append_logical_font (pos, logical_font_table_config[logical_font_table_index_map[i]]);
}
logical_font_table[pos] = (unsigned char) 0;
}
static void init_logical_font_map(void)
{
unsigned int i = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
logical_font_table_index_map[i] = i;
}
}
void se_minigui_destroy_fonts(void)
{
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
int i = 0;
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_table[i * 2 + 1])
{
fclose((FILE*) font_table[i * 2 + 1]);
font_table[i * 2 + 1] = 0;
}
}
#endif
}
void se_minigui_init_fonts(void)
{
int i = 0;
int pos = 0;
ASSERT (DEFAULT_LOGICAL_FONT_INDEX >= 0 &&
DEFAULT_LOGICAL_FONT_INDEX < LOGICAL_FONT_TABLE_SIZE);
se_minigui_destroy_fonts();
init_logical_font_map();
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_name_config[i].font_name)
{
FILE* handle;
handle = se_minigui_open_font_file(font_name_config[i].font_name);
ASSERT (font_table[i * 2 + 1] == 0);
if (handle)
{
font_table[i * 2 + 1] = (void*)handle;
}
else
{
ASSERT (font_name_config[i].logical_font_index >= 0 &&
font_name_config[i].logical_font_index < LOGICAL_FONT_TABLE_SIZE);
ASSERT (logical_font_table_index_map[font_name_config[i].logical_font_index] == font_name_config[i].logical_font_index);
logical_font_table_index_map[font_name_config[i].logical_font_index] = DEFAULT_LOGICAL_FONT_INDEX;
}
}
}
#endif
build_logical_font_table();
}
/* The Following is for initializing font */
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
static const char * se_minigui_get_font_dir(void)
{
/* TO BE CUSTOMIZED */
static char font_dir[MAX_PATH + 1] = "/usr/minigui/se_new/minigui/src/fonts/";
return font_dir;
}
static FILE* se_minigui_open_font_file(const char *name)
{
static char path[MAX_PATH + 1];
const char *font_dir;
FILE *handle = 0;
font_dir = se_minigui_get_font_dir();
if(!font_dir)
{
return 0;
}
strcpy(path, font_dir);
strcat(path, name);
handle = fopen(path, "rb");
return handle;
}
unsigned int se_minigui_read_font(
void* name,
void* buffer,
unsigned int offset,
unsigned int size)
{
FILE* handle = (FILE*) name;
unsigned int read = 0;
int result = 0;
if(!handle)
return 0;
fseek(handle, offset, SEEK_SET);
printf("In se_minigui_read_font...\n");
return fread(buffer, 1, size, handle);
}
#endif /* #ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT */
static int append_logical_font(int pos, const unsigned char *logical_font)
{
memcpy (logical_font_table + pos, logical_font, logical_font[0] + 1);
return logical_font[0] + 1;
}
static void build_logical_font_table (void)
{
unsigned int i = 0;
int pos = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
pos += append_logical_font (pos, logical_font_table_config[logical_font_table_index_map[i]]);
}
logical_font_table[pos] = (unsigned char) 0;
}
static void init_logical_font_map(void)
{
unsigned int i = 0;
for (; i < LOGICAL_FONT_TABLE_SIZE; ++i)
{
logical_font_table_index_map[i] = i;
}
}
void se_minigui_destroy_fonts(void)
{
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
int i = 0;
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_table[i * 2 + 1])
{
fclose((FILE*) font_table[i * 2 + 1]);
font_table[i * 2 + 1] = 0;
}
}
#endif
}
void se_minigui_init_fonts(void)
{
int i = 0;
int pos = 0;
ASSERT (DEFAULT_LOGICAL_FONT_INDEX >= 0 &&
DEFAULT_LOGICAL_FONT_INDEX < LOGICAL_FONT_TABLE_SIZE);
se_minigui_destroy_fonts();
init_logical_font_map();
#ifdef SE_FONT_DYNAMIC_LOADING_SUPPORT
for(; i < FONT_TABLE_SIZE; ++i)
{
if(font_name_config[i].font_name)
{
FILE* handle;
handle = se_minigui_open_font_file(font_name_config[i].font_name);
ASSERT (font_table[i * 2 + 1] == 0);
if (handle)
{
font_table[i * 2 + 1] = (void*)handle;
}
else
{
ASSERT (font_name_config[i].logical_font_index >= 0 &&
font_name_config[i].logical_font_index < LOGICAL_FONT_TABLE_SIZE);
ASSERT (logical_font_table_index_map[font_name_config[i].logical_font_index] == font_name_config[i].logical_font_index);
logical_font_table_index_map[font_name_config[i].logical_font_index] = DEFAULT_LOGICAL_FONT_INDEX;
}
}
}
#endif
build_logical_font_table();
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+99451 -99451
View File
File diff suppressed because it is too large Load Diff
+99017 -99017
View File
File diff suppressed because it is too large Load Diff
+10509 -10509
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -1,4 +1,4 @@
/*
/*
** $Id: sample.c,v 1.38 2009-01-15 07:56:45 houhuihua Exp $
**
** sample.c: Sample program for komoxo scripteasy font.
@@ -35,7 +35,7 @@ static void make_welcome_text (void)
SetRect (&welcome_rc, 10, 20, g_rcScr.right - 10, g_rcScr.bottom / 1.5 - 10);
SetRect (&msg_rc, 10, welcome_rc.bottom + 10, g_rcScr.right - 10, g_rcScr.bottom - 20);
if (strcmp (sys_charset, FONT_CHARSET_GB2312_0) == 0
if (strcmp (sys_charset, FONT_CHARSET_GB2312_0) == 0
|| strcmp (sys_charset, FONT_CHARSET_GBK) == 0) {
format = "昨天,市工商局局长张志宽在市工商局工作会上透露,本市工商系统今年将推出一系列促进经济发展、保护消费者权益的监管措施。其中,将会把B2B交易平台中的网店、专业门户网站和综合门户网站中的经营主体纳入监控,重点监控网上传销、无照经营、售假和网上欺诈等4种行为。张志宽说,2008年网上违法情况主要表现在虚假宣传、网上欺诈、销售假冒产品等。针对这些违法行为,今年本市将把B2B交易平台上的网店、专业门户网站和综合门户网站中的经营主体信息,全部纳入监控。其中,网上传销、无照经营、销售假冒伪劣商品和网上欺诈等4种行为,将成为打击的重点,工商将研究推出新的监管手段。据了解,目前国务院已经将网上交易监管交由国家工重点打击无照经营商总局负责,工商总局正在研究监管意见。本市工商局将根据工商总局的监管意见,相应地完善监管制度。\
\nA proprietary protocol VOIP system built using Peer-to-peer (P2P) techniques.Free for non commercial use when using softphones (PC to PC).Offers toll access to PSTN via SkypeOut and SkypeIn.\nFrom the company that created KaZaA Licenses the Global IP Sound VoiceEngine suite of codecs and related software including their wideband codecs (double the width of regular pstn.) If you find yourself asking, 'why does Skype sound so good?', the answer is primarily this wideband ability.";
@@ -88,12 +88,12 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
break;
case MSG_TIMER:
sprintf (msg_text, "Timer expired, current tick count: %ul.",
sprintf (msg_text, "Timer expired, current tick count: %ul.",
GetTickCount ());
//InvalidateRect (hWnd, &msg_rc, TRUE);
InvalidateRect (hWnd, NULL, TRUE);
break;
case MSG_LBUTTONDOWN:
strcpy (msg_text, "The left button pressed.");
InvalidateRect (hWnd, &msg_rc, TRUE);
@@ -119,23 +119,23 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
PLOGFONT logfont;
PLOGFONT bklogfont;
#ifdef UTF_8
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"UTF-8",
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"UTF-8",
FONT_WEIGHT_BOOK,
FONT_SLANT_ROMAN,
0,
FONT_SLANT_ROMAN,
0,
0,
FONT_UNDERLINE_NONE,
FONT_STRUCKOUT_NONE,
16, 0);
#else
logfont = CreateLogFont("sef",
"fzxhgb_yh",
logfont = CreateLogFont("sef",
"fzxhgb_yh",
"GB2312",
FONT_WEIGHT_BOOK,
FONT_SLANT_ROMAN,
0,
FONT_SLANT_ROMAN,
0,
0,
FONT_UNDERLINE_NONE,
FONT_STRUCKOUT_NONE,
@@ -166,7 +166,7 @@ static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
last_key = wParam;
last_key_count = 1;
}
sprintf (msg_text, "The %d %skey pressed %d times",
sprintf (msg_text, "The %d %skey pressed %d times",
wParam, syskey, last_key_count);
InvalidateRect (hWnd, &msg_rc, TRUE);
return 0;
@@ -210,9 +210,9 @@ int MiniGUIMain (int argc, const char* argv[])
CreateInfo.iBkColor = COLOR_lightwhite;
CreateInfo.dwAddData = 0;
CreateInfo.hHosting = HWND_DESKTOP;
hMainWnd = CreateMainWindow (&CreateInfo);
if (hMainWnd == HWND_INVALID)
return -1;
+341 -341
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Processes)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.7
PROJECT_NUMBER = v5.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-4.0.7
OUTPUT_DIRECTORY = doc-api-ref-minigui-procs-5.0.0
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,6 +2102,8 @@ PREDEFINED = _MGRM_PROCESSES \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGSCHEMA_COMPOSITING \
_MGHAVE_VIRTUAL_WINDOW \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+3 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Standalone)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.7
PROJECT_NUMBER = v5.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-4.0.7
OUTPUT_DIRECTORY = doc-api-ref-minigui-sa-5.0.0
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,6 +2102,7 @@ PREDEFINED = _MGRM_STANDALONE \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGHAVE_VIRTUAL_WINDOW \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+3 -2
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = "MiniGUI API Reference (MiniGUI-Threads)"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v4.0.7
PROJECT_NUMBER = v5.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-4.0.7
OUTPUT_DIRECTORY = doc-api-ref-minigui-ths-5.0.0
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -2102,6 +2102,7 @@ PREDEFINED = _MGRM_THREADS \
_MGFONT_FT2 \
_MGFONT_UPF \
_MGFONT_BMPF \
_MGHAVE_VIRTUAL_WINDOW \
_MGGAL_DRM \
_MGGAL_COMMLCD \
_MGIAL_COMM
+2 -2
View File
@@ -1,6 +1,6 @@
MAJOR_VERSION = 4
MINOR_VERSION = 0
MICRO_VERSION = 4
MINOR_VERSION = 1
MICRO_VERSION = 0
EXTRAVERSION =
MINIGUI_RELEASE=$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)$(EXTRAVERSION)
+151 -20
View File
@@ -7,17 +7,22 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
- [INTRODUCTION](#introduction)
- [A BRIEF BUILDING INSTRUCTION](#a-brief-building-instruction)
* [Prerequisites](#prerequisites)
* [Building MiniGUI Core](#building-minigui-core)
* [Building the Comprehensive Demo](#building-the-comprehensive-demo)
* [Unit Tests](#unit-tests)
+ [Prerequisites](#prerequisites)
+ [Building MiniGUI Core](#building-minigui-core)
+ [Building whole MiniGUI](#building-whole-minigui)
+ [Unit Tests](#unit-tests)
- [NEW FEATURES IN VERSION 5.0.x](#new-features-in-version-50x)
+ [Compositing schema](#compositing-schema)
+ [New main window types](#new-main-window-types)
+ [Virtual window](#virtual-window)
+ [Other enhancements](#other-enhancements)
- [NEW FEATURES IN VERSION 4.0.x](#new-features-in-version-40x)
- [NEW FEATURES IN VERSION 3.2.x](#new-features-in-version-32x)
- [THE RUNTIME MODES OF MINIGUI](#the-runtime-modes-of-minigui)
- [HISTORY](#history)
- [AUTHORS AND COPYING](#authors-and-copying)
* [Not Free for Commercial Use](#not-free-for-commercial-use)
* [Special Statement](#special-statement)
+ [Special Statement](#special-statement)
+ [Not Free for Commercial Use](#not-free-for-commercial-use)
- [A LITTLE FAQ](#a-little-faq)
@@ -25,7 +30,7 @@ A mature and proven cross-platform GUI system for embedded and smart IoT devices
MiniGUI is a mature cross-platform windowing system and a GUI (Graphics
User Interface) support system for embedded systems and smart IoT devices.
This is the version 4.0.x of MiniGUI maintained by WEI Yongming.
This is the version 5.0.x of MiniGUI maintained by WEI Yongming.
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
use.
@@ -36,10 +41,10 @@ embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
traditional RTOSes, such as RT-Thread, FreeRTOS, RTEMS, VxWorks, ThreadX,
Nucleus, pSOS, uC/OS-II, and OSE.
This is the MiniGUI core source tree, which provides windowing
This is the source tree of MiniGUI Core, which provides windowing
and graphics interfaces as well as a lot of standard controls (toolkit).
Besides MiniGUI core, FMSoft also provides some 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
@@ -91,7 +96,7 @@ for examples:
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
which addresses the needs of map browse, query, analysis, etc
FMSoft had created the public repositories for MiniGUI core, MiniGUI
FMSoft had created the public repositories for MiniGUI Core, MiniGUI
components, and other open source apps on GitHub. You can visit them on:
<https://github.com/VincentWei>
@@ -122,7 +127,7 @@ on your Ubuntu Linux.
### Building MiniGUI Core
MiniGUI core uses GNU autoconf/automake scripts to configure and build the project.
MiniGUI Core uses GNU autoconf/automake scripts to configure and build the project.
Run
@@ -135,17 +140,21 @@ to configure, make, and install the headers and the libraries. If there is not
to generate the script.
MiniGUI core also provides some configuration options to customize the features.
MiniGUI Core also provides some configuration options to customize the features.
For more information, please run
$ ./configure --help
### Building the Comprehensive Demo
### Building whole MiniGUI
If you are anxious to see the comprehensive demo of MiniGUI core
If you are anxious to see the comprehensive demo of MiniGUI Core
and MiniGUI components, please fetch one of the following repositories
from GitHub and follow the instructions to build the samples and
the demonstration programs:
from GitHub and follow the instructions to build MiniGUI Core,
MiniGUI components, the samples, and the demonstration programs:
<https://github.com/VincentWei/build-minigui-5.0>
or
<https://github.com/VincentWei/build-minigui-4.0>
@@ -153,7 +162,6 @@ or
<https://github.com/VincentWei/build-minigui-3.2>
### Unit Tests
Since MiniGUI 4.0.0, we organize the unit test code of MiniGUI APIs in the
@@ -164,6 +172,125 @@ following repository:
If you are interested in hacking the MiniGUI code, please visit this repository.
## NEW FEATURES IN VERSION 5.0.x
In version 5.0.0, we introduced some new and exciting features, and refactored
a lot basic modules of MiniGUI Core.
### Compositing schema
In this version, we enhanced the MiniGUI-Processes runtime mode to support
the compositing schema. Under compositing schema, regardless a main window
is created by the server (`mginit`) or a client, it renders the content in
a separate rendering buffer, and the server composites the contents from
all visible main windows to the ultimate scan-out frame buffer according to
the z-order information.
On the contrary, the legacy schema of MiniGUI-Processes uses the same
frame buffer for all processes (and all main windows) in the system.
So the legacy schema is also called the shared frame buffer schema.
By enabling the compositing schema, MiniGUI now can provide a better
implementation for multi-process environment:
- Easy to implement advanced user interfaces with rounded corners,
alpha blending, blurring, and so on.
- Easy to implement animations for switching among main windows.
- Better security. One client created by different user cannot
read/write contents in/to another windows owned by other clients.
### New main window types
In this version, we also enhanced the window manager of MiniGUI Core
to support some special main window types.
Before 5.0.0, you can create a topmost main window with the style
`WS_EX_TOPMOST` in order to show the main window above all normal main windows,
and if you use MiniGUI-Processes runtime mode, the server (`mginit`) will
always create global main windows, which are shown on other main windows
created by clients.
Since 5.0.0, we introduce a concept of z-order levels for main windows.
There are eight levels in MiniGUI from top to bottom:
- The tooltip level (`WS_EX_WINTYPE_TOOLTIP`).
- The system/global level (`WS_EX_WINTYPE_GLOBAL`).
- The screen lock level (`WS_EX_WINTYPE_SCREENLOCK`).
- The docker level (`WS_EX_WINTYPE_DOCKER`).
- The higher level (`WS_EX_WINTYPE_HIGHER`).
- The normal level (`WS_EX_WINTYPE_NORMAL`).
- The launcher level (`WS_EX_WINTYPE_LAUNCHER`).
- The desktop or wallpaper.
This enhancement allows us to create a special app which acts as
screen lock, docker, or launcher.
### Virtual window
You know that we can post or send a message to other windows which
may run in another thread under MiniGUI-Threads. The MiniGUI
messaging functions such as `PostMessage()`, `SendMessage()`,
`SendNotifyMessage()`, and the window callback procedure
provide a flexible, efficient, safe, and flexible data transfer
and synchronization mechanism for your multithreaded applications.
For example, you can send or post a message to a window from a
general purpose thread which may download a file from a remote
server under MiniGUI-Threads.
But can we use the MiniGUI messaging mechanism under
MiniGUI-Processes and MiniGUI-Standalone runtime modes for
multithreading purpose? For example, we may download a file in a
general thread and inform a window when the file is ready.
Furthermore, if we want to use the MiniGUI messaging mechanism in
a general thread to handle messages from other threads, how to do this?
The virtual window provides a solution for the requirements above.
A virtual window is a special window object which does not have
a visible window area. But after you create a virtual window in
a different thread, you can use the MiniGUI messaging mechanism
to post or send messages between the current main window thread
and the new thread.
This enhancement provides a very useful facility to you in order to
develop a well-designed multithreaded application.
### Other enhancements
We also tune or enhance the following modules of MiniGUI Core:
- Enhanced timer support. MiniGUI now manages the timers per message thread.
Under MiniGUI-Threads runtime mode, you can set up 32 (64 on 64-bit
architecture) timers for each GUI threads. If you enabled virtual window,
you can also do this for each message thread.
- Support for listening a file descriptor as long as the underlying system
has the `select()` system call for all runtime modes. Now you can call
`RegisterListenFD()` to register a file descriptor to be listened, and
handle `MSG_FDEVENT` in your window callback procedure to read/write
from/to the file descriptor. Before this version, this feature only
available for MiniGUI-Processes runtime mode.
- Support for local data of windows. You can now set or retrieve a local data
which is bound with a string name for a window. This will give you an
easy-to-use interface to manage various data of a window.
- Support for hardware cursors under compositing schema. MiniGUI now can
utilize the hardware cursors if your graphics device support it.
You can also load a cursor from a PNG file.
- Support for loading icon from a bitmap file. You can now load an icon
from a bitmap file such as a PNG file.
- Unified the message hook functions for all runtime modes. MiniGUI now
provides the consistent message hook functions for all runtime modes.
- Use the update regions for cumulative updating the screen. This will
eliminate the flickers due to the frequently redrawing of controls.
Obviously, this version brings the largest improvement since MiniGUI 3.0.0.
We did our best to ensure backward compatibility of the existed APIs
so that the old applications can smoothly migrate to the new
version. However, there are still some slight changes you need to take care.
For more information, please refer to `RELEASE-NOTES.md` file:
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
## NEW FEATURES IN VERSION 4.0.x
In this version, we enhanced and tuned the APIs related to text rendering,
@@ -193,7 +320,7 @@ in order to support [HybridOS Foundation Class Library].
For more information, please refer to `RELEASE-NOTES.md` file:
<https://github.com/VincentWei/minigui/blob/master/RELEASE-NOTES.md>
<https://github.com/VincentWei/minigui/blob/tree/rel-4-0/RELEASE-NOTES.md>
Because of the changes of some APIs, we recommended strongly that you
use this version for new projects.
@@ -290,7 +417,10 @@ other main features.
In the development of version 4.0.x, we introduced the support for
complex writing systems (scripts), such as Arabic, Thai, and Indic.
A brief history description of the development progress lay below:
In the development of version 5.0.x, we introduced some new and
exciting features such as compositing schema and virtual window.
A brief history description of the development progress is listed as follow:
1. 1994 ~ 1996: MiniGUI DOS version.
1. Dec, 1998: Began to write.
@@ -353,6 +483,7 @@ A brief history description of the development progress lay below:
1. Feb., 2018: FMSoft released MiniGUI version 3.2.0.
1. Apr., 2019: FMSoft released MiniGUI version 3.2.2.
1. Jul., 2019: FMSoft released MiniGUI version 4.0.0.
1. Apr., 2020: FMSoft released MiniGUI version 5.0.0.
## AUTHORS AND COPYING
@@ -360,7 +491,7 @@ The original author of MiniGUI is WEI Yongming, and now MiniGUI is
maintained by FMSoft. For more information, please refer to
<http://www.fmsoft.cn>.
Copyright (C) 2002 ~ 2019, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 2002 ~ 2020, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998 ~ 2002, WEI Yongming
This program is free software: you can redistribute it and/or modify
+721 -653
View File
File diff suppressed because it is too large Load Diff
+12 -4
View File
@@ -1,8 +1,16 @@
Version 4.0.7 (2020/03/30)
Version 4.9.1 (2019/03/11)
This release needs the following packages:
This is the second preview version of MiniGUI 5.0.0, an unstable version.
Other packages for MiniGUI resource, tools, components, and samples:
- GVFB: `gvfb-1.2.4.tar.gz`
- The resource package: `minigui-res-4.0.0.tar.gz`
- The sample package: `mg-samples-4.0.1.tar.gz`
- The test cases package: `mg-tests-4.0.7.tar.gz`
- mGUtils component: `libmgutils-1.5.0.tar.gz`
- mGPlus component: `libmgplus-1.5.0.tar.gz`
- mGEff component: `libmgeff-1.5.0.tar.gz`
- mGNCS component: `libmgncs-1.5.0.tar.gz`
- mGNCS4Touch component: `libmgncs4touch-1.5.0.tar.gz`
- The test cases package: `mg-tests-5.0.0.tar.gz`
- The sample package: `mg-samples-5.0.0.tar.gz`
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+3 -3
View File
@@ -130,9 +130,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+1 -1
View File
@@ -366,7 +366,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
/* #undef _MGINCORERBF_GB16 */
+1 -1
View File
@@ -269,7 +269,7 @@
/*#define _MGHAVE_MOUSECALIBRATE 1*/
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
+1 -1
View File
@@ -377,7 +377,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
#define _MGINCORERBF_GB16 1
+1 -1
View File
@@ -377,7 +377,7 @@
/* #undef _MGINCOREFONT_VGAS */
/* Define if include in-core font: 12x12 RBF for GB2312 */
#define _MGINCORERBF_GB12 1
#define _MGINCORERBF_GB12 1
/* Define if include in-core font: 16x16 RBF for GB2312 */
#define _MGINCORERBF_GB16 1
+3 -3
View File
@@ -156,7 +156,7 @@
/* Define if include the automatic IAL engine */
//#define _MGIAL_AUTO 1
/* Define if include the COMM input engine */
#define _MGIAL_COMM 1
#define _MGIAL_COMM 1
/* Define if support BIG5 charset */
/* #undef _MGCHARSET_BIG5 */
@@ -259,11 +259,11 @@
/* Define if include full gif support */
#define _MGHAVE_MOUSECALIBRATE 1
#define _EXT_FULLGIF 1
#define _EXT_FULLGIF 1
#define _MGCTRL_GRIDVIEW 1
#define _MGCTRL_ICONVIEW 1
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
+4 -4
View File
@@ -156,7 +156,7 @@
/* Define if include the automatic IAL engine */
#define _MGIAL_AUTO 1
/* Define if include the COMM input engine */
#define _MGIAL_COMM 1
#define _MGIAL_COMM 1
/* Define if support BIG5 charset */
/* #undef _MGCHARSET_BIG5 */
@@ -259,11 +259,11 @@
/* Define if include full gif support */
#define _MGHAVE_MOUSECALIBRATE 1
#define _EXT_FULLGIF 1
#define _EXT_FULLGIF 1
#define _MGCTRL_GRIDVIEW 1
#define _MGCTRL_ICONVIEW 1
/* Define if include skin support */
#define _EXT_SKIN 1
#define _EXT_SKIN 1
/* Define if include 16BPP FB subdriver */
/* #undef _MGFONT_FBLIN16 */
@@ -573,7 +573,7 @@
/* #define _MGIAL_UCOSII 1 */
/* Define if support UNICODE */
#define _MGCHARSET_UNICODE 1
#define _MGCHARSET_UNICODE 1
/* Define if use own implementation of malloc functions */
/* #define _MGUSE_OWN_MALLOC 1 */
+5 -5
View File
@@ -91,12 +91,12 @@
/* Define to 1 if you have the `tmpfile' function. */
#define HAVE_TMPFILE 1
/*#define HAVE_MODE_T 1*/
/*#define HAVE_MODE_T 1*/
/* Define to 1 if you have the `mktime' function. */
#define HAVE_MKTIME 1
/* Define to 1 if you have the `time' function. */
#define HAVE_TIME 1
#define HAVE_TIME 1
/* Define to 1 if you have the `localtime' function. */
#define HAVE_LOCALTIME 1
@@ -140,9 +140,9 @@
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
+1 -1
View File
@@ -24,5 +24,5 @@
#pragma warning(disable:4101) /* unreferenced local variable */
#pragma warning(error:4150)
#pragma warning(disable:4244) /* No possible loss of data warnings */
#pragma warning(disable:4244) /* No possible loss of data warnings */
#pragma warning(disable:4305) /* No truncation from int to char warnings */
+9 -9
View File
@@ -1,15 +1,15 @@
#! /bin/bash
keyword_list="
license_create
license_destroy
screensaver_create
screensaver_destroy
splash_draw_framework
splash_progress
splash_delay
license_on_input
license_on_timeout
__mg_license_create
__mg_license_destroy
__mg_screensaver_create
__mg_screensaver_destroy
__mg_splash_draw_framework
__mg_splash_progress
__mg_splash_delay
__mg_license_on_input
__mg_license_on_timeout
license_get_processor_id
#\s*include.*license\/c_files.*
#\s*include.*license\.h
+176
View File
@@ -0,0 +1,176 @@
#!/bin/bash
tab2space() {
sed -i 's/\t/ /g' `find . -name '*.c'`
sed -i 's/\t/ /g' `find . -name '*.h'`
sed -i 's/\s\+$//g' `find . -name '*.c'`
sed -i 's/\s\+$//g' `find . -name '*.h'`
}
# tab2space
# templates
# sed -i 's/\<AAA\>/__AAA/g' `grep '\<AAA\>' -rl include/ src/`
# sed -i 's/\<AAA\>/__mgAAA/g' `grep '\<AAA\>' -rl include/ src/`
# sed -i 's/\<AAA\>/__gdiAAA/g' `grep '\<AAA\>' -rl include/ src/`
# sed -i 's/\<AAA\>/__mg_AAA/g' `grep '\<AAA\>' -rl include/ src/`
# sed -i 's/\<AAA\>/dbg_AAA/g' `grep '\<AAA\>' -rl include/ src/`
# sed -i 's/\<kernel_alloc_z_order_info\>/__kernel_alloc_z_order_info/g' `grep kernel_alloc_z_order_info -rl include/ src/`
# sed -i 's/\<kernel_free_z_order_info\>/__kernel_free_z_order_info/g' `grep kernel_free_z_order_info -rl include/ src/`
# sed -i 's/\<kernel_change_z_order_mask_rect\>/__kernel_change_z_order_mask_rect/g' `grep kernel_change_z_order_mask_rect -rl include/ src/`
# sed -i 's/\<kernel_get_window_region\>/__kernel_get_window_region/g' `grep kernel_get_window_region -rl include/ src/`
# sed -i 's/\<kernel_get_next_znode\>/__kernel_get_next_znode/g' `grep kernel_get_next_znode -rl include/ src/`
# sed -i 's/\<kernel_get_prev_znode\>/__kernel_get_prev_znode/g' `grep kernel_get_prev_znode -rl include/ src/`
# sed -i 's/\<gui_open_ime_window\>/__gui_open_ime_window/g' `grep gui_open_ime_window -rl include/ src/`
# sed -i 's/\<_begin_fill_bitmap\>/__mg_begin_fill_bitmap/g' `grep _begin_fill_bitmap -rl include/ src/`
# sed -i 's/\<_fill_bitmap_scanline\>/__mg_fill_bitmap_scanline/g' `grep _fill_bitmap_scanline -rl include/ src/`
# sed -i 's/\<_end_fill_bitmap\>/__mg_end_fill_bitmap/g' `grep _end_fill_bitmap -rl include/ src/`
# sed -i 's/\<DumpCtrlClassInfoTable\>/dbg_DumpCtrlClassInfoTable/g' `grep DumpCtrlClassInfoTable -rl include/ src/`
# sed -i 's/\<GetPixelUnderCursor\>/kernel_GetPixelUnderCursor/g' `grep GetPixelUnderCursor -rl include/ src/`
# sed -i 's/\<update_secondary_dc\>/__mg_update_secondary_dc/g' `grep update_secondary_dc -rl include/ src/`
# sed -i 's/\<initialize_scripteasy\>/font_InitializeScripteasy/g' `grep initialize_scripteasy -rl include/ src/`
# sed -i 's/\<uninitialize_scripteasy\>/font_UninitializeScripteasy/g' `grep uninitialize_scripteasy -rl include/ src/`
# sed -i 's/\<free_window_element_data\>/__mg_free_window_element_data/g' `grep free_window_element_data -rl include/ src/`
# sed -i 's/\<append_window_element_data\>/__mg_append_window_element_data/g' `grep append_window_element_data -rl include/ src/`
# sed -i 's/\<set_window_element_data\>/__mg_set_window_element_data/g' `grep set_window_element_data -rl include/ src/`
# sed -i 's/\<__compsor_check_znodes\>/__mg_composite_dirty_znodes/g' `grep __compsor_check_znodes -rl include/ src/`
# sed -i 's/\<mg_linux_tty_init\>/__mg_linux_tty_init/g' `grep mg_linux_tty_init -rl include/ src/`
# sed -i 's/\<mg_linux_tty_enable_vt_switch\>/__mg_linux_tty_enable_vt_switch/g' `grep mg_linux_tty_enable_vt_switch -rl include/ src/`
# sed -i 's/\<mg_linux_tty_disable_vt_switch\>/__mg_linux_tty_disable_vt_switch/g' `grep mg_linux_tty_disable_vt_switch -rl include/ src/`
# sed -i 's/\<mg_linux_tty_switch_vt\>/__mg_linux_tty_switch_vt/g' `grep mg_linux_tty_switch_vt -rl include/ src/`
# sed -i 's/\<mg_linux_tty_fini\>/__mg_linux_tty_fini/g' `grep mg_linux_tty_fini -rl include/ src/`
# sed -i 's/\<DumpMenu\>/dbg_DumpMenu/g' `grep DumpMenu -rl include/ src/`
# sed -i 's/\<sysres_init_inner_resource\>/__sysres_init_inner_resource/g' `grep sysres_init_inner_resource -rl include/ src/`
# sed -i 's/\<sysres_get_system_res_path\>/__sysres_get_system_res_path/g' `grep sysres_get_system_res_path -rl include/ src/`
# sed -i 's/\<_set_pixel_helper\>/_gdi_set_pixel_helper/g' `grep _set_pixel_helper -rl src/`
# sed -i 's/\<err_dump\>/__mg_err_dump/g' `grep err_dump -rl src/`
# sed -i 's/\<err_msg\>/__mg_err_msg/g' `grep err_msg -rl src/`
# sed -i 's/\<err_quit\>/__mg_err_quit/g' `grep err_quit -rl src/`
# sed -i 's/\<err_ret\>/__mg_err_ret/g' `grep err_ret -rl src/`
# sed -i 's/\<err_sys\>/__mg_err_sys/g' `grep err_sys -rl src/`
# sed -i 's/\<mg_dispatch_timer_message\>/__mg_dispatch_timer_message/g' `grep mg_dispatch_timer_message -rl src/`
# sed -i 's/\<mgDeleteObject\>/mg_DeleteObject/g' `grep mgDeleteObject -rl src/`
# sed -i 's/\<init_arabic_kbd_layout\>/__mg_init_arabic_kbd_layout/g' `grep init_arabic_kbd_layout -rl src/`
# sed -i 's/\<init_default_kbd_layout\>/__mg_init_default_kbd_layout/g' `grep init_default_kbd_layout -rl src/`
# sed -i 's/\<init_de_kbd_layout\>/__mg_init_de_kbd_layout/g' `grep init_de_kbd_layout -rl src/`
# sed -i 's/\<init_delatin1_kbd_layout\>/__mg_init_delatin1_kbd_layout/g' `grep init_delatin1_kbd_layout -rl src/`
# sed -i 's/\<init_escp850_kbd_layout\>/__mg_init_escp850_kbd_layout/g' `grep init_escp850_kbd_layout -rl src/`
# sed -i 's/\<init_es_kbd_layout\>/__mg_init_es_kbd_layout/g' `grep init_es_kbd_layout -rl src/`
# sed -i 's/\<init_fr_kbd_layout\>/__mg_init_fr_kbd_layout/g' `grep init_fr_kbd_layout -rl src/`
# sed -i 's/\<init_frpc_kbd_layout\>/__mg_init_frpc_kbd_layout/g' `grep init_frpc_kbd_layout -rl src/`
# sed -i 's/\<init_it_kbd_layout\>/__mg_init_it_kbd_layout/g' `grep init_it_kbd_layout -rl src/`
# sed -i 's/\<init_hebrew_kbd_layout\>/__mg_init_hebrew_kbd_layout/g' `grep init_hebrew_kbd_layout -rl src/`
# sed -i 's/\<InitAutoInput\>/ial_InitAutoInput/g' `grep InitAutoInput -rl src/`
# sed -i 's/\<InitDummyInput\>/ial_InitDummyInput/g' `grep InitDummyInput -rl src/`
# sed -i 's/\<InitLibInput\>/ial_InitLibInput/g' `grep InitLibInput -rl src/`
# sed -i 's/\<InitNetInput\>/ial_InitNetInput/g' `grep InitNetInput -rl src/`
# sed -i 's/\<InitPCXVFBInput\>/ial_InitPCXVFBInput/g' `grep InitPCXVFBInput -rl src/`
# sed -i 's/\<InitRandomInput\>/ial_InitRandomInput/g' `grep InitRandomInput -rl src/`
# sed -i 's/\<InitializeResManager\>/mg_InitResManager/g' `grep InitializeResManager -rl src/`
# sed -i 's/\<InitTextBitmapBuffer\>/gdi_InitTextBitmapBuffer/g' `grep InitTextBitmapBuffer -rl src/`
# sed -i 's/\<clipboard_op\>/__mg_clipboard_op/g' `grep clipboard_op -rl src/`
# sed -i 's/\<mg_miFreeArcCache\>/miFreeArcCache/g' `grep mg_miFreeArcCache -rl src/`
# sed -i 's/\<mgNewObject\>/mgNewObjectEx/g' `grep mgNewObject -rl src/`
# sed -i 's/\<mg_newObject\>/mgNewObject/g' `grep mg_newObject -rl src/`
# sed -i 's/\<mg_remove_timers_by_msg_queue\>/__mg_remove_timers_by_msg_queue/g' `grep mg_remove_timers_by_msg_queue -rl src/`
# sed -i 's/\<mg_DeleteObject\>/mgDeleteObject/g' `grep mg_DeleteObject -rl src/`
# sed -i 's/\<GetMsgQueueThisThread\>/getMsgQueueThisThread/g' `grep GetMsgQueueThisThread -rl src/`
# sed -i 's/\<pMessages\>/pMsgQueue/g' `grep pMessages -rl src/`
# sed -i 's/\<mg_InitMsgQueueThisThread\>/mg_AllocMsgQueueThisThread/g' `grep mg_InitMsgQueueThisThread -rl include/ src/`
# sed -i 's/\<mg_AllocMsgQueueThisThread\>/mg_AllocMsgQueueForThisThread/g' `grep mg_AllocMsgQueueThisThread -rl src/`
# sed -i 's/\<mg_FreeMsgQueueThisThread\>/mg_FreeMsgQueueForThisThread/g' `grep mg_FreeMsgQueueThisThread -rl src/`
# sed -i 's/\<GetMsgQueueThisThread\>/mg_GetMsgQueueForThisThread/g' `grep GetMsgQueueThisThread -rl src/`
# sed -i 's/\<kernel_GetMsgQueue\>/getMsgQueue/g' `grep kernel_GetMsgQueue -rl src/`
# sed -i 's/\<BE_THIS_THREAD\>/isWindowInThisThread/g' `grep BE_THIS_THREAD -rl src/`
# sed -i 's/\<SetMsgQueueTimerFlag\>/setMsgQueueTimerFlag/g' `grep SetMsgQueueTimerFlag -rl src/`
# sed -i 's/\<RemoveMsgQueueTimerFlag\>/removeMsgQueueTimerFlag/g' `grep RemoveMsgQueueTimerFlag -rl src/`
# sed -i 's/\<getMsgQueueByWindowInThisThread\>/getMsgQueueIfWindowInThisThread/g' `grep getMsgQueueByWindowInThisThread -rl include/ src/`
# sed -i 's/\<FirstTimerSlot\>/first_time_slot/g' `grep FirstTimerSlot -rl src/`
# sed -i 's/\<TimerMask\>/expired_timer_mask/g' `grep TimerMask -rl src/`
# sed -i 's/\<first_time_slot\>/first_timer_slot/g' `grep first_time_slot -rl src/`
# sed -i 's/\<__mg_dispatch_timer_message\>/__mg_check_expired_timers/g' `grep __mg_dispatch_timer_message -rl src/`
# sed -i 's/\<4\.2\.0\>/5.0.0/g' `grep '4\.2\.0' -rl include/ src/`
# sed -i 's/\<__mg_check_hook_func\>/____mg_check_hook_event/g' `grep __mg_check_hook_func -rl src/`
# sed -i 's/\<____mg_check_hook_event\>/__mg_check_hook_event/g' `grep ____mg_check_hook_event -rl src/`
# sed -i 's/\<__mg_capture_wnd\>/_captured_wnd/g' `grep __mg_capture_wnd -rl include/ src/`
# sed -i 's/\<_captured_wnd\>/__mg_captured_wnd/g' `grep _captured_wnd -rl include/ src/`
# sed -i 's/\<__mg_check_hook_event\>/__mg_check_hook_func/g' `grep __mg_check_hook_event -rl include/ src/`
# sed -i 's/\<DEF_NR_FIXEDZNODES\>/NR_FIXED_ZNODES/g' `grep DEF_NR_FIXEDZNODES -rl src/`
#sed -i 's/\<ZOF_TYPE_TOPMOST\>/__ZOF_TYPE_HIGHER/g' `grep ZOF_TYPE_TOPMOST -rl include/ src/`
# sed -i 's/\<__ZOF_TYPE_HIGHER\>/ZOF_TYPE_HIGHER/g' `grep __ZOF_TYPE_HIGHER -rl include/ src/`
# sed -i 's/\<SetDesktopTimerFlag\>/AlertDesktopTimerEvent/g' `grep SetDesktopTimerFlag -rl include/ src/`
# sed -i 's/\<__mg_update_timer_count\>/__mg_update_tick_count/g' `grep __mg_update_timer_count -rl include/ src/`
# sed -i 's/\<__mg_timer_counter\>/__mg_tick_counter/g' `grep __mg_timer_counter -rl include/ src/`
# sed -i 's/\<pAdd\>/pSyncMsg/g' `grep '\<pAdd\>' -rl include/ src/`
# sed -i 's/\<isWindowInThisThread\>/getMainWinIfWindowInThisThread/g' `grep '\<isWindowInThisThread\>' -rl include/ src/`
# sed -i 's/\<GetMainVirtWindowById\>/GetHostedById/g' `grep '\<GetMainVirtWindowById\>' -rl include/ src/`
# sed -i 's/\<__mg_os_start_time_ms\>/__mg_os_start_time/g' `grep '\<__mg_os_start_time_ms\>' -rl include/ src/`
# sed -i 's/\<Gets\>/Get/g' `grep '\<Gets\>' -rl include/ src/`
# sed -i 's/\<Sets\>/Set/g' `grep '\<Sets\>' -rl include/ src/`
# sed -i 's/\<Retrieves\>/Retrieve/g' `grep '\<Retrieves\>' -rl include/ src/`
# sed -i 's/\<Determines\>/Determine/g' `grep '\<Determines\>' -rl include/ src/`
# sed -i 's/\<Checks\>/Check/g' `grep '\<Checks\>' -rl include/ src/`
#sed -i 's/\<SetWindowExStyle\>/gui_SetWindowExStyle/g' `grep '\<SetWindowExStyle\>' -rl include/ src/`
#sed -i 's/\<AddNewControlClass\>/gui_AddNewControlClass/g' `grep '\<AddNewControlClass\>' -rl include/ src/`
#sed -i 's/\<SetCtrlClassAddData\>/gui_SetCtrlClassAddData/g' `grep '\<SetCtrlClassAddData\>' -rl include/ src/`
#sed -i 's/\<GetCtrlClassAddData\>/gui_GetCtrlClassAddData/g' `grep '\<GetCtrlClassAddData\>' -rl include/ src/`
# sed -i 's/\<get_valid_dc\>/get_effective_dc/g' `grep '\<get_valid_dc\>' -rl include/ src/`
# sed -i 's/\<release_valid_dc\>/release_effective_dc/g' `grep '\<release_valid_dc\>' -rl include/ src/`
# sed -i 's/\<gui_GetMainWindowPtrOfControl\>/checkAndGetMainWindowPtrOfControl/g' `grep '\<gui_GetMainWindowPtrOfControl\>' -rl include/ src/`
# sed -i 's/\<gui_CheckAndGetMainWindowPtr\>/checkAndGetMainWindowPtrOfMainWin/g' `grep '\<gui_CheckAndGetMainWindowPtr\>' -rl include/ src/`
# sed -i 's/\<GetSubDCInSecondaryDC\>/GetDCInSecondarySurface/g' `grep '\<GetSubDCInSecondaryDC\>' -rl include/ src/`
# sed -i 's/\<checkAndGetMainWindowPtrOfMainWin\>/checkAndGetMainWinIfMainWin/g' `grep '\<checkAndGetMainWindowPtrOfMainWin\>' -rl include/ src/`
# sed -i 's/\<checkAndGetMainWindowPtrOfControl\>/checkAndGetMainWinIfWindow/g' `grep '\<checkAndGetMainWindowPtrOfControl\>' -rl include/ src/`
sed -i 's/\<mg_GetMsgQueueForThisThread\>/getMsgQueueForThisThread/g' `grep '\<mg_GetMsgQueueForThisThread\>' -rl include/ src/`
exit 0
+89 -29
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(libminigui, 4.0.8)
AC_INIT(libminigui, 4.9.1)
AC_CONFIG_SRCDIR(src/main/main.c)
dnl Set various version strings - taken gratefully from the SDL sources
@@ -15,10 +15,10 @@ dnl Set various version strings - taken gratefully from the SDL sources
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
#
MINIGUI_MAJOR_VERSION=4
MINIGUI_MINOR_VERSION=0
MINIGUI_MICRO_VERSION=8
MINIGUI_INTERFACE_AGE=8
MINIGUI_BINARY_AGE=8
MINIGUI_MINOR_VERSION=9
MINIGUI_MICRO_VERSION=1
MINIGUI_INTERFACE_AGE=1
MINIGUI_BINARY_AGE=1
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
AC_SUBST(MINIGUI_MAJOR_VERSION)
@@ -62,7 +62,7 @@ dnl ========================================================================
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADERS(limits.h math.h locale.h unistd.h termio.h sys/types.h sys/time.h)
AC_CHECK_HEADERS(limits.h math.h locale.h unistd.h termio.h sys/types.h sys/time.h sys/select.h sys/memfd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -77,7 +77,7 @@ AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(time mktime localtime clock_gettime strdup strcasecmp strncasecmp strerror setlocale)
AC_CHECK_FUNCS(posix_memalign memalign valloc)
AC_CHECK_FUNCS(posix_memalign memalign valloc memfd_create poll select)
PKG_CHECK_MODULES(UDEV, [libudev >= 200], have_udev="yes", have_udev="no; need libudev 200+")
@@ -92,6 +92,10 @@ message_string="no"
osname="unspecified"
runtime_mode="procs"
compositing_schema="no"
virtual_window="no"
use_shmopen="no"
mgslice_use_fallback="no"
incore_res="no"
use_miniguientry="no"
@@ -102,9 +106,9 @@ build_clipboard="yes"
use_own_stdio="no"
use_own_malloc="no"
use_own_pthread="no"
build_adv2dapi="yes"
build_syncupdate="no"
build_updateregion="yes"
build_minimalgdi="no"
dnl Options for look and feel renderer
@@ -248,7 +252,7 @@ build_ctrl_monthcal="no"
build_ctrl_treeview="no"
build_ctrl_treeview_rdr="no"
build_ctrl_spinbox="yes"
build_ctrl_coolbar="no"
build_ctrl_coolbar="yes"
build_ctrl_listview="yes"
build_ctrl_iconview="no"
build_ctrl_gridview="no"
@@ -317,6 +321,10 @@ AC_ARG_ENABLE(incoreres,
[ --enable-incoreres use incore resource instead file IO to initialize MiniGUI <default=no>],
incore_res=$enableval)
AC_ARG_ENABLE(mgslicefallback,
[ --enable-mgslicefallback use fallback implementation for mg_slice_xxx <default=no>],
mgslice_use_fallback=$enableval)
AC_ARG_ENABLE(miniguientry,
[ --enable-miniguientry use minigui_entry function in MiniGUI <default=no>],
use_miniguientry=$enableval)
@@ -353,9 +361,9 @@ AC_ARG_ENABLE(adv2dapi,
[ --enable-adv2dapi include advanced 2D graphics APIs <default=yes>],
build_adv2dapi=$enableval)
AC_ARG_ENABLE(syncupdate,
[ --enable-syncupdate include implementation of SyncUpdateDC <default=yes>],
build_syncupdate=$enableval)
AC_ARG_ENABLE(updateregion,
[ --enable-updateregion Use update region for cumulative updating surfaces <default=yes>],
build_updateregion=$enableval)
AC_ARG_ENABLE(minimalgdi,
[ --enable-minimalgdi build a minimal GDI library only <default=no>],
@@ -494,7 +502,7 @@ AC_ARG_ENABLE(consolegpm,
build_console_gpm=$enableval)
AC_ARG_ENABLE(textmode,
[ --enable-textmode Linux system have console (text mode) on FrameBuffer <default=yes>],
[ --enable-textmode Linux system has console (text mode) on Frame Buffer <default=yes>],
build_text_mode=$enableval)
AC_ARG_ENABLE(rbfsupport,
@@ -829,6 +837,22 @@ AC_ARG_ENABLE(ctrlanimation,
[ --enable-ctrlanimation include ANIMATION control and GIF87a/GIF89a support <default=yes>],
build_ctrl_animation=$enableval)
if test "x$runtime_mode" == "xprocs"; then
AC_ARG_ENABLE(compositing,
[ --enable-compositing enable compositing schema (MiniGUI-Processes runmode only) <default=no>],
compositing_schema=$enableval)
AC_ARG_ENABLE(shmopen,
[ --enable-shmopen use shm_open <default=no>],
use_shmopen=$enableval)
fi
if test "x$runtime_mode" != "xths"; then
AC_ARG_ENABLE(virtualwindow,
[ --enable-virtualwindow enable virtual window for MiniGUI-Processes or MiniGUI-Standalone runmode <default=no>],
virtual_window=$enableval)
fi
dnl Set up the Null video driver.
CheckDummyVideo()
{
@@ -886,14 +910,14 @@ dnl Find the DRM includes
CheckDRM()
{
AC_ARG_ENABLE(videodrm,
[ --enable-videodrm include Linux DRI NEWGAL engine <default=yes>],
[ --enable-videodrm include Linux DRM NEWGAL engine <default=yes>],
enable_video_drm=$enableval)
if test "x$enable_video_drm" = "xyes"; then
PKG_CHECK_MODULES(DRM, [libdrm >= 2.4], video_drm="yes",
video_drm="no; Linux DRI NEWGAL engine requires libdrm 2.4+")
video_drm="no; Linux DRM NEWGAL engine requires libdrm 2.4+")
if test "x$video_drm" = "xyes"; then
AC_DEFINE(_MGGAL_DRM, 1,
[Define if include Linux DRI NEWGAL engine])
[Define if include Linux DRM NEWGAL engine])
VIDEO_SUBDIRS="$VIDEO_SUBDIRS drm"
VIDEO_DRIVERS="$VIDEO_DRIVERS drm/libvideo_drm.la"
DEP_LIBS="$DEP_LIBS -ldrm -ldl"
@@ -1699,14 +1723,11 @@ fi
CPPFLAGS="$CPPFLAGS -D__MINIGUI_LIB__"
surface_schema="shared frame buffer"
case "$runtime_mode" in
sa)
AC_DEFINE(_MGRM_STANDALONE, 1,
[Define if build MiniGUI-Standalone])
AC_DEFINE(_STAND_ALONE, 1,
[Define if build MiniGUI-Standalone (back-compatibility definition)])
AC_DEFINE(_LITE_VERSION, 1,
[Define if build MiniGUI-Standalone (back-compatibility definition)])
MINIGUI_RUNMODE="sa"
;;
ths)
@@ -1714,18 +1735,50 @@ case "$runtime_mode" in
[Define if build MiniGUI-Threads])
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
MINIGUI_RUNMODE="ths"
virtual_window="yes"
;;
*)
AC_DEFINE(_MGRM_PROCESSES, 1,
[Define if build MiniGUI-Processes])
AC_DEFINE(_LITE_VERSION, 1,
[Define if build MiniGUI-Processes (back-compatibility definition)])
MINIGUI_RUNMODE="procs"
if test "x$compositing_schema" = "xyes"; then
surface_schema="compositing"
fi
if test "x$use_shmopen" = "xyes"; then
AC_CHECK_LIB(rt, shm_open, [DEP_LIBS="$DEP_LIBS -lrt"],
[use_shmopen="no; shm_open function not found in rt library"])
fi
if test "x$use_shmopen" = "xyes"; then
AC_CHECK_DECLS(SHM_ANON, foo=bar,
[use_shmopen="no; SHM_ANON is not declared in <sys/mman.h>"],
[#include <sys/mman.h>])
fi
if test "x$use_shmopen" = "xyes"; then
AC_DEFINE(_MGUSE_SHMOPEN, 1, [Define if use shm_open])
fi
;;
esac
if test "x$surface_schema" = "xcompositing"; then
AC_DEFINE(_MGSCHEMA_COMPOSITING, 1,
[Define if use compositing schema for the current runmode])
else
AC_DEFINE(_MGSCHEMA_SHAREDFB, 1,
[Define if use legacy schema (shared frame buffer) for the current runmode])
fi
if test "x$virtual_window" = "xyes"; then
AC_DEFINE(_MGHAVE_VIRTUAL_WINDOW, 1, [Define if virtual window enabled])
fi
if test "x$mgslice_use_fallback" = "xyes"; then
AC_DEFINE(_MGSLICE_FALLBACK, 1, [Define if use the fallback implementation for mgslice_xxx])
fi
if test "x$incore_res" = "xno"; then
AC_DEFINE_UNQUOTED(ETCFILENAME, "${conf}", [MiniGUI configure file name])
AC_DEFINE_UNQUOTED(ETCFILENAME, "${conf}", [MiniGUI configure file name])
fi
AC_SUBST(MGLIB_SUFFIX)
@@ -1746,9 +1799,9 @@ if test "x$build_adv2dapi" = "xyes"; then
[Define if include advanced 2D graphics APIs])
fi
if test "x$build_syncupdate" = "xyes"; then
AC_DEFINE(_MGUSE_SYNC_UPDATE, 1,
[Define if include implementation of SyncUpdateDC])
if test "x$build_updateregion" = "xyes"; then
AC_DEFINE(_MGUSE_UPDATE_REGION, 1,
[Define if use update region for cumulative updating surfaces])
fi
if test "x$fixed_math" = "xyes"; then
@@ -1765,6 +1818,7 @@ if test "x$devel_mode" = "xyes"; then
build_auto_ial_engine="yes"
build_random_ial_engine="yes"
build_net_ial_engine="yes"
build_console_ial_engine="yes"
build_qpf_support="yes"
@@ -1810,6 +1864,7 @@ if test "x$devel_mode" = "xyes"; then
build_ctrl_iconview="yes"
build_ctrl_gridview="yes"
enable_video_fbcon="yes"
enable_video_shadow="yes"
enable_video_mlshadow="yes"
enable_video_custom="yes"
@@ -2088,7 +2143,7 @@ if test "x$build_ttf_support" = "xyes"; then
if test "x$build_complex_scripts" = "xyes"; then
dnl Check for HarfBuzz library
AC_CHECK_LIB(harfbuzz, hb_version,
DEP_LIBS="$DEP_LIBS -lharfbuzz -lfreetype",
DEP_LIBS="$DEP_LIBS -lharfbuzzex -lfreetype",
build_complex_scripts="no; support for complex scripts requires libharfbuzz")
else
DEP_LIBS="$DEP_LIBS -lfreetype",
@@ -2168,7 +2223,7 @@ if test "x$build_complex_scripts" = "xyes"; then
[ --with-hb-includes=DIR where the HarfBuzz includes are])
if test "x$with_hb_includes" = "x"; then
HB_INC_DIR="-I/usr/include/harfbuzz"
HB_INC_DIR="-I/usr/local/include/harfbuzz"
else
HB_INC_DIR="-I$with_hb_includes"
fi
@@ -2700,10 +2755,15 @@ AC_MSG_NOTICE([
## Global Features:
* Operating system: ${osname}
* Runtime mode: ${runtime_mode}
* Virtual Window: ${virtual_window}
* Surface schema: ${surface_schema}
* Use shm_open: ${use_shmopen}
* Incore resource: ${incore_res}
* Fallback mgslice: ${mgslice_use_fallback}
* Developer mode: ${devel_mode}
* Target name: ${with_targetname}
* Cursor: ${build_cursor_support}
* Update Region: ${build_updateregion}
## NEWGAL Engines:
* dummy: ${enable_video_dummy}
+28 -3
View File
@@ -1,6 +1,6 @@
# This configuration file is for MiniGUI V4.0.x or later
# This configuration file is for MiniGUI V4.2.x or later
#
# Copyright (C) 2002~2019 FMSoft
# Copyright (C) 2002~2020 FMSoft
# Copyright (C) 1998~2002 Wei Yongming.
#
# Web: http://www.minigui.com
@@ -36,6 +36,25 @@ mtype=IMPS2
# Linux IAL engine based on libinput
# ial_engine=libinut
#{{ifdef _MGSCHEMA_COMPOSITING
# Options for compositing schema
[compositing_schema]
# The size of wallpaper pattern surface (the fake screen for clients).
# Optional values: <w>x<h>, full, half, quarter, octant, and empty.
# Default value is empty.
wallpaper_pattern_size=full
# wallpaper_pattern_size=half
# wallpaper_pattern_size=quarter
# wallpaper_pattern_size=octant
# wallpaper_pattern_size=empty
# wallpaper_pattern_size=32x32
# The shared object name of the default compositor. If it is not defined
# or failed to load, MiniGUI will use the built-in fallback compositor.
# The equivalent environment variable: MG_DEF_COMPOSITOR_SO
# def_compositor_so=
#}}
#{{ifdef _MGGAL_DRM
[drm]
defaultmode=1024x768-32bpp
@@ -55,7 +74,7 @@ dpi=96
# The filename of the shared library for the external driver.
# The equivalent environment variable: MG_GAL_DRM_DRIVER
exdriver=libhidrmdrivers-0.2.so.0
exdriver=libhidrmdrivers.so.0
#}}
#{{ifdef _MGIAL_LIBINPUT
@@ -176,6 +195,12 @@ cursor20=h_select.cur
cursor21=ho_split.cur
cursor22=ve_split.cur
# Under compositing schema, you can specify a PNG file as the cursor.
# You should use a 'hotspotN' key to specify the hotspot coordinates
# of a PNG cursor. For example:
# cursor23=foo.png
# hotspot23=32,32
[resinfo]
respath=/usr/local/share/minigui/res/
+4 -4
View File
@@ -5,11 +5,11 @@
*/
case MSG_ACTIVEMENU:
if (wParam == 2) {
CheckMenuRadioItem ((HMENU)lParam,
IDM_40X15, IDM_CUSTOMIZE,
CheckMenuRadioItem ((HMENU)lParam,
IDM_40X15, IDM_CUSTOMIZE,
pConInfo->termType, MF_BYCOMMAND);
CheckMenuRadioItem ((HMENU)lParam,
IDM_DEFAULT, IDM_BIG5,
CheckMenuRadioItem ((HMENU)lParam,
IDM_DEFAULT, IDM_BIG5,
pConInfo->termCharset, MF_BYCOMMAND);
}
break;
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* This example trys to handle the event when the user presses
* This example trys to handle the event when the user presses
* left button and right button of the mouse at the same time.
*/
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+1 -1
View File
@@ -16,6 +16,6 @@ void DrawMyCircle (HDC hdc, int x, int y, int r, gal_pixel pixel)
old_bursh = SetBrushColor (hdc, pixle);
CircleGenerator ((void*)hdc, x, y, r, draw_circle_pixel);
SetBrushColor (hdc, old_brush);
}
+1 -1
View File
@@ -1,4 +1,4 @@
/*
/*
* This program tries to create a new layer named "vcongui" if
* there is no such layer. If there is already a layer named "vcongui",
* this program brings the layer to be the topmost one.
+6 -6
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontbig24;
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
16, 0);
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
12, 0);
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
24, 0);
+4 -4
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontttf;
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
16, 0);
logfontgb12 = CreateLogFontEx (NULL, "song", "GB2312",
logfontgb12 = CreateLogFontEx (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
12, 0);
logfontttf = CreateLogFontEx ("ttf", "Courier", "UTF-8",
logfontttf = CreateLogFontEx ("ttf", "Courier", "UTF-8",
FONT_WEIGHT_BLACK, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FS_OTHER_LCDPORTRAIT, FONT_DECORATE_NONE, FONT_RENDER_SUBPIXEL,
24, 0);
+24
View File
@@ -0,0 +1,24 @@
/*
* The following code creates a virtual window.
*/
static LRESULT
my_virt_wnd_proc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
switch (message) {
...
}
return DefaultVirtualWinProc (hwnd, message, wparam, lparam);
}
...
HWND new_wnd = CreateVirtualWindow (HWND_NULL, my_virt_wnd_proc,
"A Virtual Window", 0, 0);
if (new_wnd != HWND_INVALID) {
// failed to create the virtual window.
}
// go on...
...
+18 -18
View File
@@ -15,35 +15,35 @@ LRESULT ControlTestWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara
switch (message) {
case MSG_CREATE:
{
hStaticWnd1 = CreateWindow (CTRL_STATIC,
"This is a static control",
hStaticWnd1 = CreateWindow (CTRL_STATIC,
"This is a static control",
WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER,
IDC_STATIC1,
IDC_STATIC1,
10, 10, 180, 300, hWnd, 0);
hButton1 = CreateWindow (CTRL_BUTTON,
"Button1",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON1,
"Button1",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON1,
20, 20, 80, 20, hStaticWnd1, 0);
hButton2 = CreateWindow (CTRL_BUTTON,
"Button2",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON2,
"Button2",
WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE,
IDC_BUTTON2,
20, 50, 80, 20, hStaticWnd1, 0);
hEdit1 = CreateWindow (CTRL_EDIT,
"Edit Box 1",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT1,
"Edit Box 1",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT1,
20, 80, 100, 24, hStaticWnd1, 0);
hStaticWnd2 = CreateWindow (CTRL_STATIC,
"This is child static control",
hStaticWnd2 = CreateWindow (CTRL_STATIC,
"This is child static control",
WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER,
IDC_STATIC1,
IDC_STATIC1,
20, 110, 100, 50, hStaticWnd1, 0);
hEdit2 = CreateWindow (CTRL_EDIT,
"Edit Box 2",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT2,
"Edit Box 2",
WS_CHILD | WS_VISIBLE | WS_BORDER,
IDC_EDIT2,
0, 20, 100, 24, hStaticWnd2, 0);
break;
}
+14 -14
View File
@@ -2,19 +2,19 @@
* The following code destroies all resource used by the main window
* and then destroies the main window itself.
*/
case MSG_CLOSE:
/* Destroy the resource used by the main window. */
DestroyLogFont (logfont1);
DestroyLogFont (logfont2);
DestroyLogFont (logfont3);
/* Destroy the child windows. */
DestroyWindow(hWndButton);
DestroyWindow(hWndEdit);
case MSG_CLOSE:
/* Destroy the resource used by the main window. */
DestroyLogFont (logfont1);
DestroyLogFont (logfont2);
DestroyLogFont (logfont3);
/* Destroy the main window. */
DestroyMainWindow (hWnd);
/* Destroy the child windows. */
DestroyWindow(hWndButton);
DestroyWindow(hWndEdit);
/* Send a MSG_QUIT message to quit the message loop. */
PostQuitMessage(hWnd);
return 0;
/* Destroy the main window. */
DestroyMainWindow (hWnd);
/* Send a MSG_QUIT message to quit the message loop. */
PostQuitMessage(hWnd);
return 0;
+4 -4
View File
@@ -7,7 +7,7 @@ static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
switch (message) {
case MSG_INITDIALOG:
return 1;
case MSG_COMMAND:
switch (wParam) {
case IDOK:
@@ -16,16 +16,16 @@ static LRESULT InitDialogBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM
break;
}
break;
}
return DefaultDialogProc (hDlg, message, wParam, lParam);
}
static void InitDialogBox (HWND hWnd)
{
/* Assoiciate the dialog with the controls */
DlgInitProgress.controls = CtrlInitProgress;
/* Display the dialog box and wait */
DialogBoxIndirectParam (&DlgInitProgress, hWnd, InitDialogBoxProc, 0L);
}
+7 -7
View File
@@ -1,8 +1,8 @@
static DLGTEMPLATE DlgInitProgress =
{
WS_BORDER | WS_CAPTION,
WS_BORDER | WS_CAPTION,
WS_EX_NONE,
120, 150, 400, 130,
120, 150, 400, 130,
"VAM-CNC is initializing",
0, 0,
3, NULL,
@@ -10,12 +10,12 @@ static DLGTEMPLATE DlgInitProgress =
};
static CTRLDATA CtrlInitProgress [] =
{
{
{
"static",
WS_VISIBLE | SS_SIMPLE,
10, 10, 380, 16,
IDC_PROMPTINFO,
10, 10, 380, 16,
IDC_PROMPTINFO,
"Initialize...",
0
},
@@ -29,9 +29,9 @@ static CTRLDATA CtrlInitProgress [] =
},
{
"button",
WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON,
WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON,
170, 70, 60, 25,
IDOK,
IDOK,
"OK",
0
}
+3 -3
View File
@@ -1,4 +1,4 @@
/**
/**
* Selecting a logical font to the DC and output text in GB2312 charset
* by using DrawText.
*/
@@ -10,7 +10,7 @@ void OnModeDrawText (HDC hdc)
const char* szBuff2 = "This is a good day. \n"
"This text is drawn by calling DrawText.";
const char* szBuff3 = "Single line text, center.";
const char* szBuff4 =
const char* szBuff4 =
"This text is drawn by calling DrawText.";
rc1.left = 1; rc1.top = 1; rc1.right = 401; rc1.bottom = 101;
@@ -18,7 +18,7 @@ void OnModeDrawText (HDC hdc)
rc3.left = 0; rc3.top = 361; rc3.right = 401; rc3.bottom = 451;
rc4.left = 0; rc4.top = 461; rc4.right = 401; rc4.bottom = 551;
SetBkColor (hdc, COLOR_lightwhite);
SetBkColor (hdc, DWORD2Pixel (hdc, RGBA_lightwhite));
Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom);
Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom);
+3 -3
View File
@@ -40,11 +40,11 @@ static void InitCreateInfo (PMAINWINCREATE pCreateInfo)
pCreateInfo->hCursor = GetSystemCursor (0);
pCreateInfo->hIcon = 0;
pCreateInfo->MainWindowProc = HelloWinProc;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->lx = 0;
pCreateInfo->ty = 0;
pCreateInfo->rx = 320;
pCreateInfo->by = 240;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->iBkColor = PIXEL_lightwhite;
pCreateInfo->dwAddData = 0;
pCreateInfo->hHosting = HWND_DESKTOP;
}
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* This program parses the command line arguments.
* If the user specified a layer name by using "-layer <layer_name",
* If the user specified a layer name by using "-layer <layer_name",
* the program will try to join the layer, otherwise create a new layer.
*/
int MiniGUIMain (int args, const char* arg[])
+4 -4
View File
@@ -1,11 +1,11 @@
static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
struct _DepInfo *info;
switch(message) {
case MSG_INITDIALOG:
{
/*
/*
* Get the lParam passed to this dialog box, and assign it
* to the second private additional data assoiciated
* with the dialog box.
@@ -17,7 +17,7 @@ static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
case MSG_COMMAND:
{
/*
/*
* Get the parameter from the second private data assoiciated
* with the dialog box.
*/
@@ -34,6 +34,6 @@ static LRESULT DepInfoBoxProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
}
}
}
return DefaultDialogProc (hDlg, message, wParam, lParam);
}
+7 -7
View File
@@ -2,10 +2,10 @@
* The handler makes sure that the client area always
* is _WIDTH wide and _HEIGHT high.
*/
case MSG_SIZECHANGED:
{
RECT* rcClient = (RECT*)lParam;
rcClient->right = rcClient->left + _WIDTH;
rcClient->bottom = rcClient->top + _HEIGHT;
return 1;
}
case MSG_SIZECHANGED:
{
RECT* rcClient = (RECT*)lParam;
rcClient->right = rcClient->left + _WIDTH;
rcClient->bottom = rcClient->top + _HEIGHT;
return 1;
}
+10 -10
View File
@@ -2,14 +2,14 @@
* The handler set the actual size of the window always
* to be _WIDTH wide and _HEIGHT high.
*/
case MSG_SIZECHANGING:
{
const RECT* rcExpect = (const RECT*)wParam;
RECT* rcResult = (RECT*)lParam;
case MSG_SIZECHANGING:
{
const RECT* rcExpect = (const RECT*)wParam;
RECT* rcResult = (RECT*)lParam;
rcResult->left = rcExpect->left;
rcResult->top = rcExpect->top;
rcResult->right = rcExpect->left + _WIDTH;
rcResult->bottom = rcExpect->top + _HEIGHT;
return 0;
}
rcResult->left = rcExpect->left;
rcResult->top = rcExpect->top;
rcResult->right = rcExpect->left + _WIDTH;
rcResult->bottom = rcExpect->top + _HEIGHT;
return 0;
}
+8 -8
View File
@@ -3,14 +3,14 @@
*/
case MSG_PAINT:
{
HDC hdc = BeginPaint (hWnd);
HDC hdc = BeginPaint (hWnd);
for (j = 0; j < 10; j ++) {
if (RectVisible (hdc, rcs + j)) {
FillBox (hdc, rcs[j].left, rcs[j].top, rcs [j].right, rcs [j].bottom);
}
}
for (j = 0; j < 10; j ++) {
if (RectVisible (hdc, rcs + j)) {
FillBox (hdc, rcs[j].left, rcs[j].top, rcs [j].right, rcs [j].bottom);
}
}
EndPaint (hWnd, hdc);
return 0;
EndPaint (hWnd, hdc);
return 0;
}
+4 -4
View File
@@ -53,15 +53,15 @@ static void GDIDemo_Region (HWND hWnd, HDC hdc)
FillBox (hdc, 400, 0, 180, 200);
/*
* Empty two clipping region to free the clipping rectangles used
/*
* Empty two clipping region to free the clipping rectangles used
* by them.
*/
EmptyClipRgn (&my_cliprgn1);
EmptyClipRgn (&my_cliprgn2);
/*
* You should not forget to destroy the FreeClipRectList in your
/*
* You should not forget to destroy the FreeClipRectList in your
* applications.
* Here we do not destroy the heap because we will use it in next call.
*

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