Compare commits

..
319 Commits
Author SHA1 Message Date
Vincent Wei 2b01f35cac rename: LayoutInfo -> Layout, TextRunsInfo -> TextRuns 2019-04-06 11:25:21 +08:00
Vincent Wei e0b6a64402 tune position for west gravity 2019-04-04 19:00:45 +08:00
Vincent Wei 084d7e58a2 tune indentation 2019-04-04 18:53:37 +08:00
Vincent Wei 88753a5fd0 cleanup 2019-04-04 17:02:06 +08:00
Vincent Wei b739daadba cleanup FreeType2 font engine, remove redundant code 2019-04-04 16:51:54 +08:00
Vincent Wei 5529ab1e10 use mg_slice for TEXTRUNS, TEXTLAYOUT, GlyphRun, TextRun, LayoutRun, and so on 2019-04-04 15:10:19 +08:00
Vincent Wei 032fdcc3bb mg_slice_free -> mg_slice_delete; mg_slice_free1 -> mg_slice_free 2019-04-04 14:46:05 +08:00
Vincent Wei 1cb9922dad Initialize mutex of mgslice 2019-04-04 12:27:05 +08:00
Vincent Wei 8ac0d539d0 implementation of mg_slice_xxx 2019-04-04 12:18:10 +08:00
Vincent Wei e3ae994212 debug: line->nr_runs should be re-caculate for ellipsized line 2019-04-04 08:39:09 +08:00
Vincent Wei b0145a15d2 CalcLayoutBoundingRect 2019-04-03 19:13:27 +08:00
Vincent Wei 9dab380f3e GetLayoutLineRect 2019-04-03 19:01:19 +08:00
Vincent Wei d1facd5468 No shaping arabic for vertical layout 2019-04-03 15:50:32 +08:00
Vincent Wei 5996ede23b cleanup 2019-04-03 15:26:50 +08:00
Vincent Wei 837cd49045 debug: uninitialized length 2019-04-03 15:16:07 +08:00
Vincent Wei dc4f54ffe4 debug: uninitialized length 2019-04-03 15:15:39 +08:00
Vincent Wei f611fe3859 normal, word break and alignment 2019-04-03 12:27:10 +08:00
Vincent Wei 4ff5097dfb check pointer for get_glyph_advance 2019-04-02 19:00:13 +08:00
Vincent Wei 49421e1f88 implementation of DrawLayoutLine 2019-04-02 18:46:34 +08:00
Vincent Wei 6e33602e7d debug for glyph orientation in vertical layout 2019-04-02 17:27:15 +08:00
Vincent Wei d13c31a08a add ta (text align) to RENDERDATA 2019-04-02 12:36:31 +08:00
Vincent Wei 704b6287ff debug for MIXED orientation 2019-04-02 10:12:31 +08:00
Vincent Wei 1df726dd10 tune gravity and orientation 2019-04-02 09:27:06 +08:00
Vincent Wei b2afe815b5 debug DrawShapedGlyph 2019-04-01 19:12:41 +08:00
Vincent Wei f648c1a8c7 tune api desc 2019-04-01 14:37:09 +08:00
Vincent Wei 4d2fe61e52 remove (x,y) from CB_GLYPH_LAID_OUT 2019-04-01 14:26:56 +08:00
Vincent Wei 9644964e9c tune api description 2019-03-31 15:31:49 +08:00
Vincent Wei 61b799af88 fix bug: not convert AChar to Glyph32 2019-03-29 20:18:26 +08:00
Vincent Wei 2f52006cde fix a bug: no MSG_IDLE when using dummy IAL engine 2019-03-29 19:22:31 +08:00
Vincent Wei cf063aad32 disable debug print 2019-03-29 18:31:23 +08:00
Vincent Wei 0855e8b972 add null fonts for korea and japanese charsets 2019-03-29 16:13:16 +08:00
Vincent Wei a501557532 Tune CB_GLYPH_LAID_OUT 2019-03-29 14:51:57 +08:00
Vincent Wei 820d6aeac4 fix a bug 2019-03-29 12:27:04 +08:00
Vincent Wei 215242e3e8 tune 2019-03-29 12:14:19 +08:00
Vincent Wei c79f09fe87 implementation of GetLayoutLineSize and CalcLayoutBoundingRect 2019-03-29 11:44:29 +08:00
Vincent Wei f68c26860a Implementation of CreateLogFontForMChar2UChar; FONT_MIN_SIZE -> 1 2019-03-29 10:40:35 +08:00
Vincent Wei 53f1a05526 Tune new APIs 2019-03-29 10:09:23 +08:00
Vincent Wei 6a5cfd1052 new APIs: SetFontNameInTextRuns, SetTextColorInTextRuns, SetBackgroundColorInTextRuns, and GetXXXX 2019-03-28 18:57:21 +08:00
Vincent Wei 1c79cf510f Tune the TextRunsInfo and LayoutInfo related APIs 2019-03-28 17:47:12 +08:00
Vincent Wei 86965a0e9c fixbug in layout-ellipsize.c 2019-03-28 11:40:58 +08:00
Vincent Wei 9cca87878c tune CB_GLYPH_LAID_OUT 2019-03-27 19:28:19 +08:00
Vincent Wei 2cffa1154c API description 2019-03-27 19:16:33 +08:00
Vincent Wei 9adea7df64 implementation of NULL font engine and incored NULL devfonts for every charset 2019-03-27 17:58:56 +08:00
Vincent Wei 8f70dfcf69 UStrTailorBreaks 2019-03-27 16:46:42 +08:00
Vincent Wei ccf1e6f7a5 cleanup 2019-03-27 15:52:43 +08:00
Vincent Wei 913ea4db23 CreateTextRunsInfo and CreateLayoutInfo passed test cases 2019-03-27 15:50:16 +08:00
Vincent Wei 55baa8c741 cleanup 2019-03-27 12:39:27 +08:00
Vincent Wei db63d8cad3 cleanup 2019-03-27 11:40:34 +08:00
Vincent Wei 338fb0276e use _DEBUG for real output of _DBG_PRINTF 2019-03-27 10:08:01 +08:00
Vincent Wei 8dd64e7f2d api description 2019-03-26 19:14:05 +08:00
Vincent Wei c1cbb8423e parameters of CB_GLYPH_LAID_OUT 2019-03-26 18:44:05 +08:00
Vincent Wei a95ee5b181 debug 2019-03-26 18:09:49 +08:00
Vincent Wei 9d9bf95c21 cleanup 2019-03-26 12:25:08 +08:00
Vincent Wei ed6ceaa49c fixbug of layout implementation 2019-03-26 12:22:26 +08:00
Vincent Wei f5e1144cbe debug LayoutInfo implementaion 2019-03-26 11:24:31 +08:00
Vincent Wei c890e4296a add list_concat, list_move, list_reverse 2019-03-26 11:24:06 +08:00
Vincent Wei d09313407e reorder glyph runs according to embedding levels 2019-03-25 15:31:03 +08:00
Vincent Wei 7dfe5954f5 go on 2019-03-25 12:15:23 +08:00
Vincent Wei 390c5de6ef go on 2019-03-24 19:14:46 +08:00
Vincent Wei 274fdaaa31 go on 2019-03-24 19:00:15 +08:00
Vincent Wei 04725fc892 cleanup 2019-03-24 15:46:40 +08:00
Vincent Wei 4da29f635d Use CamelCase for internal structures and types 2019-03-24 15:32:08 +08:00
Vincent Wei 3e5ff0af91 tune implementation 2019-03-24 12:35:31 +08:00
Vincent Wei 1820e74b77 empty implementation 2019-03-22 18:42:08 +08:00
Vincent Wei 2278c4975c new file for ellipsisi 2019-03-22 18:34:11 +08:00
Vincent Wei af8a04570d more code 2019-03-22 18:33:37 +08:00
Vincent Wei 452edfa831 more code for layout 2019-03-22 12:33:53 +08:00
Vincent Wei 4fba705082 cleanup 2019-03-22 10:53:50 +08:00
Vincent Wei a049e387e0 some code for layout 2019-03-22 09:40:05 +08:00
Vincent Wei c67a18536d some code for layout 2019-03-21 19:12:52 +08:00
Vincent Wei d9e09ac34f Intent to add new APIs: DrawShapedGlyph and DrawShapedGlyphLine 2019-03-21 15:28:30 +08:00
Vincent Wei 65972861a0 bugfixs 2019-03-21 15:03:04 +08:00
Vincent Wei 96b06544b3 Optimize FreeType2 engine for get_glyph_advance; add new devfont op: get_kerning 2019-03-21 11:01:37 +08:00
Vincent Wei 838530d6b1 add new internal header: glyph.h; _font_get_glyph_log_width 2019-03-21 09:46:20 +08:00
Vincent Wei c276122f60 Start to implement InitBasicShapingEngine 2019-03-20 18:53:06 +08:00
Vincent Wei 46a8b1768a cleanup 2019-03-20 17:08:43 +08:00
Vincent Wei d5b57e8200 cleanup and add _WRN_PRINTF for warning 2019-03-20 17:06:43 +08:00
Vincent Wei ee179e6995 API description related to LAYOUTINFO 2019-03-20 16:31:41 +08:00
Vincent Wei 3571d88f3d use LoadResource for LOGFONTs of text runs 2019-03-19 19:33:11 +08:00
Vincent Wei 8ba346eec5 use logfont name for CreateTextRunsInfo instead of logfont object 2019-03-19 18:43:04 +08:00
Vincent Wei e110cb61f4 fix bugs 2019-03-19 17:14:42 +08:00
Vincent Wei d29aa1d881 Tune name of structure and functions 2019-03-19 15:37:30 +08:00
Vincent Wei 6337f5d6fa cleanup 2019-03-19 11:49:34 +08:00
Vincent Wei 14bfe263a3 Use LanguageCode and ScriptType types for external APIs 2019-03-19 11:48:24 +08:00
Vincent Wei cbd54e0766 add new APIs: ScriptGetGlyphOrientation and ScriptGetWideGlyphOrientation 2019-03-19 10:45:26 +08:00
Vincent Wei ceaec7e3d3 new API: UBidiGetParagraphEmbeddingLevelsAlt, an optimized call 2019-03-18 19:07:53 +08:00
Vincent Wei aab8d6e2c6 Emoji, Script, and Width iterators for Unicode string 2019-03-18 17:32:27 +08:00
Vincent Wei 8a856e5b99 cleanup 2019-03-18 14:30:46 +08:00
Vincent Wei 46f48a0d6c UCharGetVerticalOrientation 2019-03-18 12:42:45 +08:00
Vincent Wei 40fc11f324 gen-vop-tab: tool to generate the vertical orientation property table 2019-03-18 12:32:47 +08:00
Vincent Wei d63fe9849b Tune GlyphRunInfo 2019-03-16 19:12:57 +08:00
Vincent Wei 349f310148 cleanup 2019-03-16 16:28:46 +08:00
Vincent Wei ac60980bc2 tune GlyphRunInfo APIs and cleanup 2019-03-16 16:21:49 +08:00
Vincent Wei e7002ad870 cleanup; new -> new_entry 2019-03-16 11:33:40 +08:00
Vincent Wei 6838a67e7d some minor changes 2019-03-15 18:24:37 +08:00
Vincent Wei 9a8d997f63 new files 2019-03-15 17:13:47 +08:00
Vincent Wei f8b0a89d90 add glyphruninfo.h 2019-03-15 14:47:41 +08:00
Vincent Wei 72f61f17be trim UCHAR prefix from UCharScriptType and UCHAR_SCRIPT_XXXX 2019-03-15 14:46:24 +08:00
Vincent Wei 676dd0e6da cleanup 2019-03-14 19:08:15 +08:00
Vincent Wei 02c7a6e07c add unicode funcs for HarzBuff 2019-03-14 18:36:21 +08:00
Vincent Wei 8f841a0bc0 split shaped-glyph.c into three files 2019-03-14 17:26:14 +08:00
Vincent Wei f218b7b892 add enable option for complex scripts and harzbuff; cleanup options for TTF support (onley FreeType2) 2019-03-14 17:17:09 +08:00
Vincent Wei 1e1dd76fb1 tune interfaces of GetShapedGlyphsXXX 2019-03-14 12:34:21 +08:00
Vincent Wei 4ba0bcd0fe cleanup 2019-03-13 19:05:15 +08:00
Vincent Wei cc9d9f6d42 basic implementation of GetLangScriptFromName and NormalizeScriptType 2019-03-13 18:57:39 +08:00
Vincent Wei 4c9e8138b1 table for lang name to scripts 2019-03-13 18:27:57 +08:00
Vincent Wei f79a1bd86a cleanup 2019-03-13 18:24:56 +08:00
Vincent Wei 211135fbc5 cleanup 2019-03-13 17:52:43 +08:00
Vincent Wei 537b659fc7 tune implementation of GetShapedGlyphsBasic 2019-03-13 17:25:48 +08:00
Vincent Wei 6b45b74e32 return length of break_oppos instead of the number of consumed uchars 2019-03-13 15:05:18 +08:00
Vincent Wei 0ceb5616bf fix memory usage bug of UStrGetBreaks; UStrGetBreaks does not return when it encounters a hard break 2019-03-13 14:33:48 +08:00
Vincent Wei 62f9cf9e48 tune API description 2019-03-13 12:29:01 +08:00
Vincent Wei 6842cd3933 Split GetUCharsAndBreaks into two APIs: GetUCharsUntilParagraphBoundary and UStrGetBreaks 2019-03-13 12:21:45 +08:00
Vincent Wei 2c5ddd93cb add internal api: _unicode_normalize_script 2019-03-12 19:00:30 +08:00
Vincent Wei 64ddca1e2f Add UCharIsArabicVowel 2019-03-12 18:34:47 +08:00
Vincent Wei 9dea317925 cleanup 2019-03-12 17:53:14 +08:00
Vincent Wei a4e8a42707 cleanup 2019-03-12 17:52:06 +08:00
Vincent Wei 005519e7cc Tuen API of GetShapedGlyphsBasic and GetShapedGlyphsComplex 2019-03-12 15:41:57 +08:00
Vincent Wei da7c2175dd cleanup 2019-03-12 12:29:13 +08:00
Vincent Wei c7e6a867f4 cleanup 2019-03-12 11:57:04 +08:00
Vincent Wei 30c6033e8c cleanup 2019-03-12 09:27:11 +08:00
Vincent Wei 5a5d5d3bbb Passed BidiCharacterTest 2019-03-12 09:03:32 +08:00
Vincent Wei bdd75353d2 cleanup 2019-03-11 19:14:35 +08:00
Vincent Wei ce7b9eccca debug 2019-03-11 18:45:46 +08:00
Vincent Wei c66f1a5fa3 cleanup 2019-03-11 16:08:52 +08:00
Vincent Wei ba240cd53b cleanup 2019-03-11 15:55:14 +08:00
Vincent Wei ca9d0200f3 Implementation of UBidiXXX functions 2019-03-11 15:47:48 +08:00
Vincent Wei 5dd2a21919 Description of Bidi APIs 2019-03-11 12:33:42 +08:00
Vincent Wei 11124ef8a0 rename internal apis and cleanup 2019-03-11 11:51:16 +08:00
Vincent Wei e8714be5ef rename macros 2019-03-11 11:33:02 +08:00
Vincent Wei 13341e864c rename files and internal apis 2019-03-11 09:36:36 +08:00
Vincent Wei e1a464b32f cleanup 2019-03-10 18:55:07 +08:00
Vincent Wei a7601d8cfe tune UCD url 2019-03-10 18:31:15 +08:00
Vincent Wei 98ae3a6b35 Restore BidiBracketType 2019-03-10 18:19:21 +08:00
Vincent Wei f82e15ed5e use iso8859-bidi-tables 2019-03-10 18:08:53 +08:00
Vincent Wei 690f5487ab BIDIType to BidiType 2019-03-10 17:31:36 +08:00
Vincent Wei 4e0a9a8d37 two implementations for biditype, bracket and mirror 2019-03-10 16:54:45 +08:00
Vincent Wei c6f1004ba6 cleanup 2019-03-10 14:47:02 +08:00
Vincent Wei a4e9f56c08 cleanup 2019-03-10 14:44:33 +08:00
Vincent Wei d84a7ffbbe Bidi tables 2019-03-10 14:42:36 +08:00
Vincent Wei 11865764da cleanup 2019-03-10 13:21:08 +08:00
Vincent Wei fdc449335d utilities for generating Bidi tables 2019-03-10 13:17:52 +08:00
Vincent Wei 27e508848d new implementation of UNICODE BIDIRECTIONAL ALGORITHM 2019-03-08 20:38:04 +08:00
Vincent Wei cc01ce0bbc new implementation of UNICODE BIDIRECTIONAL ALGORITHM 2019-03-08 20:37:44 +08:00
Vincent Wei 0093ac3edc New APIs: UCHAR2ACHAR, UChar2AChar, UChars2AChars 2019-03-08 14:39:48 +08:00
Vincent Wei 45db7410c0 Update Unicode tables to 12.0.0 2019-03-08 11:52:49 +08:00
Vincent Wei e6df345736 Update LB8a rule to conform Unicode 12.0.0 2019-03-08 11:52:36 +08:00
Vincent Wei e7b05090cd Rename MCHAR_TYPE_XXX to ACHAR_BASIC_XXX; Tune implementation of GetACharType and GetACharBIDIType 2019-03-08 10:17:18 +08:00
Vincent Wei b82128091e add const for keymap data 2019-03-07 19:09:34 +08:00
Vincent Wei adab30261c add const to incore-res data 2019-03-07 18:57:04 +08:00
Vincent Wei 7e0b378475 add const to _cos_tbl, _tag_tbl, and _acos_tbl; add prefix __mg to these global variables 2019-03-07 18:46:42 +08:00
Vincent Wei d1ef9e2598 rename _unicode_is_emoji_extended_pictographic to _unicode_is_extended_pictographic 2019-03-07 17:46:35 +08:00
Vincent Wei 5887668b17 add new API UCharGetBracketType 2019-03-07 17:42:47 +08:00
Vincent Wei e6cb8f272b update Unicode bidi tables 2019-03-07 17:31:15 +08:00
Vincent Wei 90e4ee91fe Tune BIDIType to Uint16 instead of unsigned int 2019-03-07 12:40:37 +08:00
Vincent Wei 83207ca329 Update Unicode data to 11.0.0 2019-03-07 11:46:17 +08:00
Vincent Wei dcd31bed7c Indic shaping table 2019-03-07 11:02:51 +08:00
Vincent Wei 76cf8a02af Arabic shaping tables 2019-03-07 10:20:41 +08:00
Vincent Wei 10d8b43c61 update emoji data tables 2019-03-07 09:55:23 +08:00
Vincent Wei 554b709890 Restore prototype of DrawGlyphStringEx and add DrawShapedGlyphString 2019-03-07 08:55:47 +08:00
Vincent Wei d877e86adc New API description for GetShapedGlyphsBasic, GetShapedGlyphsComplex, GetGlyphsExtentInfo, and GetGlyphsPositionInfo 2019-03-06 17:20:19 +08:00
Vincent Wei c5e5bd01e8 implement get_glyph_value for FreeType2 engine; the glyph value of this devfont is the glyph index of the default CMap 2019-03-06 16:03:00 +08:00
Vincent Wei e3760457c4 GetGlyphsExtentPointEx -> GetGlyphsExtentFromUChars 2019-03-06 14:42:16 +08:00
Vincent Wei c6ed1626f9 cleanup 2019-03-05 19:09:26 +08:00
Vincent Wei b4b18828b2 change GLYPHTYPE_ to CHARTYPE_ 2019-03-05 18:44:39 +08:00
Vincent Wei 36167be7e6 Tune APIs of Achar32 2019-03-05 18:18:54 +08:00
Vincent Wei 4b633c801d Introduce the Mchar32 type, and distinguish glyph and character 2019-03-05 12:27:35 +08:00
Vincent Wei 33fd8a8668 tune TTF cache arguments 2019-03-05 10:50:25 +08:00
Vincent Wei 94f44890a5 tune code to handle auto-italic correctly 2019-03-05 10:42:16 +08:00
Vincent Wei cc7441c4dd add df_slot to get_font_size of DEVFONT operators in order to set scale correctly 2019-03-05 09:16:36 +08:00
Vincent Wei 6fdc0281ba handle whitespace gracefully 2019-03-04 18:08:36 +08:00
Vincent Wei 136a51d9b8 cleanup 2019-03-04 16:47:19 +08:00
Vincent Wei 5e871c486b Tune FS_SLANT_XXX and tune auto bold implementation 2019-03-04 16:30:25 +08:00
Vincent Wei fdd69bf470 fix bug: do not override bitmap size for grey and subpixel glyph 2019-03-04 16:30:17 +08:00
Vincent Wei 10e55b0d4f restore style for TTF cache 2019-03-04 14:37:59 +08:00
Vincent Wei 682c81d636 tune 2019-03-04 11:52:47 +08:00
Vincent Wei 9eb4e54b75 cleanup 2019-03-04 11:39:32 +08:00
Vincent Wei e43bc07a63 tune fontcache functions: use devfont name instead of family and style 2019-03-04 11:37:50 +08:00
Vincent Wei 508130afdc tune 2019-03-03 20:06:07 +08:00
Vincent Wei d60c057dc4 tune load_flags 2019-03-03 20:00:54 +08:00
Vincent Wei 8f5a741af6 tune load_flags 2019-03-03 19:58:29 +08:00
Vincent Wei bee1bc87c4 tune code for size_request of LOGFONT 2019-03-03 19:14:18 +08:00
Vincent Wei 3a9274e9a0 add SIZE* sz for get_glyph_monobmp and get_glyph_graybmp 2019-03-03 18:54:39 +08:00
Vincent Wei 44ee735cd6 fix a bug of is_glyph_exsited (always returns FALSE) 2019-03-03 18:54:14 +08:00
Vincent Wei 2c010cdbeb fix a bug of fontDoesMatchFamily 2019-03-03 16:51:49 +08:00
Vincent Wei a04ae43bdb fix bug of gdiCreateLogFont 2019-03-03 16:43:40 +08:00
Vincent Wei 5c333445c5 tune font styles 2019-03-01 20:01:30 +08:00
Vincent Wei dd93e67a3d tune document 2019-03-01 14:38:48 +08:00
Vincent Wei d886268eee cleanup and check the duplicated fontname of a new devfont 2019-03-01 14:20:46 +08:00
Vincent Wei 090824cb91 bugfix 2019-02-28 19:08:05 +08:00
Vincent Wei 00eb4e363f Enhance LOGFONT to support multiple MBC devfonts (up to 7) 2019-02-28 18:47:44 +08:00
Vincent Wei f73f0786ee remove break_classes argument and add uchars argument for GetGlyphsAndBreaks 2019-02-28 11:50:00 +08:00
Vincent Wei dacc81cf2a Rename UCharGetBreak to UCharGetBreakType; Cleanup and optimization 2019-02-28 09:47:25 +08:00
Vincent Wei 97c6249af5 cleanup: remove definition of DEBUG 2019-02-27 18:47:25 +08:00
Vincent Wei 7ce1fe47ff implementation of character transformation of GetGlyphsAndBreaks; fix a bug of UCharToFullSizeKana 2019-02-27 18:33:32 +08:00
Vincent Wei 8e66bb366e tune word breaks and sentence breaks 2019-02-27 17:56:41 +08:00
Vincent Wei ce7fd6e776 passed all test cases for UAX#14 and UAX#29 2019-02-27 11:37:17 +08:00
Vincent Wei 957f9cbb47 remove break_classes argument from GetGlyphsExtentPointEx 2019-02-26 19:07:37 +08:00
Vincent Wei 2a7e3003bd Rename GetGlyphsByRules to GetGlyphsAndBreaks 2019-02-26 18:47:33 +08:00
Vincent Wei 19cd208a6e support for GB, WB, SB in break_oppos; add emoji tables 2019-02-26 17:59:50 +08:00
Vincent Wei 6a44111a35 cleanup 2019-02-25 17:09:37 +08:00
Vincent Wei fd5d55942b use Uint16 type for break_oppo instead of Uint8 type in order to contain GB, WB, SB flags 2019-02-25 16:42:49 +08:00
Vincent Wei d4e7f048f0 fixbug 2019-02-25 09:12:51 +08:00
Vincent Wei d90c4d5842 cleanup 2019-02-24 18:31:38 +08:00
Vincent Wei 0f562cd39f cleanup 2019-02-24 15:02:16 +08:00
Vincent Wei fb01003c45 use LEN_VBF_NAME instead of LEN_DEVFONT_NAME 2019-02-24 14:56:43 +08:00
Vincent Wei 9bcea02975 cleanup 2019-02-24 13:35:43 +08:00
Vincent Wei c51ae8d1c1 cleanup 2019-02-22 19:11:37 +08:00
Vincent Wei b8a5ad2d73 return NULL when not matched devfont 2019-02-22 19:11:26 +08:00
Vincent Wei 39b8c88d1b new DC attribute: DC_ATTR_WORD_EXTRA 2019-02-22 18:46:23 +08:00
Vincent Wei 1e73f6713a enable cache of freetype2 engine for rotated glyphs 2019-02-22 17:51:41 +08:00
Vincent Wei 97babaa4e2 add size_request in LOGFONT for original requested size 2019-02-22 17:46:13 +08:00
Vincent Wei c6c486f306 almost there 2019-02-22 15:47:20 +08:00
Vincent Wei 338f10b896 debug 2019-02-22 12:39:07 +08:00
Vincent Wei 2353a873a8 debug GetGlyphsExtentPointEx 2019-02-22 10:49:02 +08:00
Vincent Wei 52c539e870 debug 2019-02-21 20:21:02 +08:00
Vincent Wei 64d63a84c5 cleanup and bugfixs 2019-02-21 18:43:14 +08:00
Vincent Wei 3d80d73450 cleanup and bugfixs 2019-02-21 18:38:49 +08:00
Vincent Wei 2e04898fbe fix bugs 2019-02-21 15:56:51 +08:00
Vincent Wei f390e1a091 fix bugs 2019-02-21 15:51:11 +08:00
Vincent Wei 848c1d7ce1 tune 2019-02-21 12:07:02 +08:00
Vincent Wei 0c0becc780 tune 2019-02-21 10:32:16 +08:00
Vincent Wei 0e918da2a4 bugfix: get_ch_width does not check glyph value 2019-02-21 10:32:01 +08:00
Vincent Wei 7f36c339b7 tune 2019-02-20 18:21:17 +08:00
Vincent Wei 871486daab cleanup 2019-02-20 16:41:21 +08:00
Vincent Wei 0cffc8798f Suppress and/or hang spaces and punctations for GetGlyphsExtentPointEx 2019-02-20 16:00:16 +08:00
Vincent Wei 4d4a3901eb TODOs 2019-02-19 18:53:20 +08:00
Vincent Wei 50e95cb461 Initial implementation of GetGlyphsExtentPointEx and DrawGlyphStringEx 2019-02-19 18:38:57 +08:00
Vincent Wei d223edf0ba partial implementation of GetGlyphsExtentPointEx 2019-02-19 17:48:39 +08:00
Vincent Wei 8e88082f07 UCharGetType -> UCharGetCategory 2019-02-19 10:45:49 +08:00
Vincent Wei 5b1762b637 Enhance GetGlyphsByRules to return breaking classes 2019-02-19 09:41:22 +08:00
Vincent Wei 6c83ea4ceb implementation for LBP_NORMAL and LBP_STRICT; both passed all test cases 2019-02-18 18:24:59 +08:00
Vincent Wei 5aa5e75813 UCharBasicType -> UCharGeneralCategory 2019-02-18 12:16:49 +08:00
Vincent Wei 1ba35dcbf6 implementation of WBR_BREAK_ALL and WBR_KEEP_ALL 2019-02-18 11:44:54 +08:00
Vincent Wei 8828824b23 Add BOV_NOTALLOWED_DEFINITELY and BOV_NOTALLOWED_UNCERTAINLY 2019-02-18 09:25:18 +08:00
Vincent Wei e3f2cc22ec tune BIDILogGlyphs2VisGlyphsEx and BIDILogGlyphs2VisGlyphs 2019-02-17 12:56:35 +08:00
Vincent Wei 93aae6782e Tune GetGlyphsByRules and GetGlyphsExtentPointEx 2019-02-17 11:53:35 +08:00
Vincent Wei b746d2927e Partial implementation of GetGlyphsExtentPointEx 2019-02-15 18:07:03 +08:00
Vincent Wei 79e3be705c simplify the interfaces of GetGlyphsExtentPointEx and DrawGlyphStringEx 2019-02-15 11:07:54 +08:00
Vincent Wei a052b7bf55 cleanup BIDI APIs 2019-02-14 19:45:50 +08:00
Vincent Wei 74a84362ca correct some bad names of BIDI-related APIs 2019-02-14 17:27:11 +08:00
Vincent Wei d673008f5a tune API description 2019-02-14 11:52:59 +08:00
Vincent Wei 09c9438de8 tune api description 2019-01-29 17:02:48 +08:00
Vincent Wei 0734180d70 set user_comp_ctxt to be pixel format for default composition operators 2019-01-29 15:43:23 +08:00
Vincent Wei 8ca8deb02d list developers 2019-01-29 10:51:15 +08:00
Vincent Wei 9aa719aeb3 list developers 2019-01-29 10:42:43 +08:00
Vincent Wei 447eebbafc all UNICODE LINE BREAKING ALGORITHM test cases for GetGlyphsByRules passed 2019-01-27 12:45:20 +08:00
Vincent Wei 19f8689a20 almost passed the test cases for GetGlyphsByRules 2019-01-25 21:34:34 +08:00
Vincent Wei 60902f83d5 debug GetGlyphsByRules 2019-01-25 20:42:32 +08:00
Vincent Wei a725acfd5e debug GetGlyphsByRules 2019-01-25 16:14:42 +08:00
Vincent Wei 0191772111 Tune the implementation of UNICODE LINE BREAKING ALGORITHM 2019-01-24 20:17:27 +08:00
Vincent Wei a11cef5f2e push 2019-01-24 18:43:30 +08:00
Vincent Wei cf4c75bcbc almost finished GetGlyphsByRules 2019-01-24 11:31:54 +08:00
Vincent Wei f85801dcbe part implementation of GetGlyphsByRules 2019-01-23 17:08:03 +08:00
Vincent Wei 4e67f8c56b part implementation of GetGlyphsByRules 2019-01-23 14:36:56 +08:00
Vincent Wei 1cfd2fe324 part implementation of GetGlyphsByRules 2019-01-22 10:50:15 +08:00
Vincent Wei 5ef2e0fa42 temp 2019-01-21 17:14:59 +08:00
Vincent Wei 57b71e985c Add UCharGetType, UCharGetBreak, UCharGetBIDIType, and UCharGetMirror for completeness 2019-01-21 16:19:20 +08:00
Vincent Wei d9d76ec59b DrawGlyphStringEx returns BOOL 2019-01-19 18:29:09 +08:00
Vincent Wei 7935883267 GetGlyphsByRules returns line break opportunities 2019-01-19 18:20:55 +08:00
Vincent Wei 0385def7b2 tune 2019-01-19 15:05:53 +08:00
Vincent Wei 565f4b34e5 cleanup 2019-01-19 15:02:55 +08:00
Vincent Wei 70ba8a0420 cleanup 2019-01-19 14:59:12 +08:00
Vincent Wei 4bdbe4a002 tune 2019-01-19 14:53:35 +08:00
Vincent Wei 2c98ef96da tune release notes 2019-01-19 14:24:26 +08:00
Vincent Wei 6663c98787 add CreateLogFontIndirectEx function 2019-01-19 14:21:46 +08:00
Vincent Wei bbf2376f7a fix a potential bug: reserve key when creating logfont by calling CreateLogFontIndirect 2019-01-19 14:04:11 +08:00
Vincent Wei 21ac9f2def add content language and writing system parameters for rendering glyphs for CSS 2019-01-19 13:27:01 +08:00
Vincent Wei a10d28dd11 unicode script and language code 2019-01-19 12:57:34 +08:00
Vincent Wei 856126c72e make GRF_HANGING_PUNC_FIRST and GRF_HANGING_PUNC_LAST as flag bits 2019-01-18 18:07:44 +08:00
Vincent Wei 547fc0059c tune readme 2019-01-18 16:45:23 +08:00
Vincent Wei 195363dc82 use the same table for UCharToFullSizeKana and UCharToSmallKana 2019-01-18 16:24:56 +08:00
Vincent Wei 54288e5687 more API description 2019-01-18 16:15:14 +08:00
Vincent Wei 9d46406a95 some API description 2019-01-18 15:49:10 +08:00
Vincent Wei d365feca5d tune 2019-01-18 14:05:19 +08:00
Vincent Wei f34ac9d0fe UChar32 -> Uchar32; UChar16 -> Uchar16 2019-01-18 13:56:18 +08:00
Vincent Wei 3a02b056ca Tune format 2019-01-18 12:39:23 +08:00
Vincent Wei 1a1e8cf652 Add UCharToFullWidth and UCharToFullSizeKana 2019-01-18 12:37:53 +08:00
Vincent Wei 94feb0ae44 Tune Glyph32 and UChar32 to be unsigned 2019-01-18 11:43:42 +08:00
Vincent Wei 1e1a5edd13 tune 2019-01-18 11:29:35 +08:00
Vincent Wei ae9b14201b make sure the strings are null-terminated (fontDoesMatchFamily) 2019-01-18 09:29:39 +08:00
Vincent Wei 742150d4f1 restore LEN_FONT_NAME 2019-01-17 19:29:14 +08:00
Vincent Wei 03eac03c8c add UCharCanonicalOrdering and others for composition and decomposition 2019-01-17 18:45:22 +08:00
Vincent Wei 8cd6b037ec tuen release notes 2019-01-17 14:59:40 +08:00
Vincent Wei b35e38bdff tune length of devfont name fields; devfont now supports family aliases 2019-01-17 14:55:06 +08:00
Vincent Wei 58275c88e9 call REAL_GLYPH for devfont operators 2019-01-17 12:40:25 +08:00
Vincent Wei 31b43521d0 call REAL_GLYPH for charset operators 2019-01-17 12:14:02 +08:00
Vincent Wei e68ee00b85 rename glyph type macros and glyph type now includes MCHAR_TYPE_XXX for ASCII characters 2019-01-17 11:59:29 +08:00
Vincent Wei 6e54d4a7d7 add macro GLYPH2UCHAR 2019-01-16 20:43:01 +08:00
Vincent Wei 69b1d63569 Rename IsGlyphAlnum, GlyphToUpper to IsUCharAlnum, UCharToTitle and so on 2019-01-16 20:37:56 +08:00
Vincent Wei 817f4063a1 Add UNICODE utilities: IsGlyphAlnum, GlyphToUpper, ... 2019-01-16 20:34:51 +08:00
Vincent Wei c9ec23dc70 empty implementation of glyphs APIs for CSS 2019-01-16 19:27:41 +08:00
Vincent Wei 972085fa56 cleanup 2019-01-16 17:50:21 +08:00
Vincent Wei c2e24b61e3 cleanup 2019-01-16 17:44:48 +08:00
Vincent Wei bd1fb67930 retrive the break type of UNICODE char; upgrade UNICODE tables to 10.0.0 2019-01-16 17:10:50 +08:00
Vincent Wei 0fcedfca08 cleanup 2019-01-16 14:52:12 +08:00
Vincent Wei c39ce7c0b8 cleanup 2019-01-16 12:04:43 +08:00
Vincent Wei 97014ccdc8 cleanup 2019-01-16 12:02:58 +08:00
Vincent Wei 48e7f6e928 cleanup 2019-01-16 11:53:46 +08:00
Vincent Wei 473f9f98ff cleanup 2019-01-16 11:52:56 +08:00
Vincent Wei 95d09a7673 tune and cleanup 2019-01-16 11:43:27 +08:00
Vincent Wei 53253ed101 optimize the font matching algorithm 2019-01-16 10:18:26 +08:00
Vincent Wei 4bd7c0eef4 add mutex for freetype2 font engine (MGRM_THREADS) and remove lock/unlock of __mg_gdi_lock in _font_get_glyph_advance 2019-01-16 10:06:46 +08:00
Vincent Wei 9af71438dd cleanup 2019-01-15 17:02:11 +08:00
Vincent Wei 82033a44dd cleanup and fix the bug of wrong bboxing handling for SUBPIXEL rendering of glyph 2019-01-15 14:50:46 +08:00
Vincent Wei 1c9537fc63 BMP_TYPE_REPLACEKEY for BITMAP; Declaration of GetGlyphsExtentPointEx and DrawGlyphStringEx; cleanup of GLYPHINFO and GLYPHBITMAP 2019-01-15 10:17:25 +08:00
Vincent Wei 612c395c06 Backward compatiblity of CreateLogFont 2019-01-14 10:23:37 +08:00
Vincent Wei 8dc0ee2ade cleanup 2019-01-13 18:56:41 +08:00
Vincent Wei caefd7355a cleanup 2019-01-13 18:36:03 +08:00
Vincent Wei 9ea0e15dba try to match devfont without style 2019-01-13 17:42:27 +08:00
Vincent Wei 83c8984c74 support flipping glyph for subpixel rendering 2019-01-13 16:59:36 +08:00
Vincent Wei 4761333a1a skip null pixels for subpixel 2019-01-13 16:20:08 +08:00
Vincent Wei 8538f29f70 fixbug: No need to make the pitch of FT2 monobitmap is single-byte aligned 2019-01-13 14:21:18 +08:00
Vincent Wei b658413961 cleanup 2019-01-13 13:17:23 +08:00
Vincent Wei bb187f1ee3 cleanup font name and glyph renderer 2019-01-13 13:10:13 +08:00
Vincent Wei ea8ab93bad cleanup 2019-01-12 15:02:56 +08:00
Vincent Wei 9226fcff26 add examples/createlogfontex.c and cleanup examples/createlogfont.c 2019-01-12 14:03:52 +08:00
Vincent Wei 05cf370155 Cleanup LOGFONT styles 2019-01-12 13:55:51 +08:00
Vincent Wei 0d2352884a tune style for LOGFONT 2019-01-11 10:55:55 +08:00
326 changed files with 136476 additions and 30480 deletions
-1
View File
@@ -22,5 +22,4 @@ Makefile.in
/*.pc
/*config.h
/*config.h.in
/*config.h.in~
-2
View File
@@ -1,2 +0,0 @@
Beijing FMSoft Technologies Co., Ltd.. (http://www.fmsoft.cn)
+16
View File
@@ -0,0 +1,16 @@
The current main maintainers and/or developers:
* WEI Yongming
As employed engineers of [Beijing FMSoft Technologies Co., Ltd.],
the following people have participated in the development of MiniGUI Core:
* HOU Huihua
* WAN Zheng
* DONG Kai
* DONG Junjie
* YAN Xiaowei
For community contributors, please see RELASENOTES.md documentation.
[Beijing FMSoft Technologies Co., Ltd.]: http://www.fmsoft.cn
+2 -2
View File
@@ -3216,7 +3216,7 @@ alExtra.(xwyan)
* src/gui/lf_flat.c
* src/gui/lf_skin.c
08/24: ENHANCEMENT #1: Add a new method for FONTOPS: get_glyph_type to return
08/24: ENHANCEMENT #1: Add a new method for FONTOPS: get_char_type to return
the glyph type the devfont can give us.
* src/include/devfont.h
* src/font/*.c
@@ -4761,7 +4761,7 @@ create_skin_main_window_ex:
* ext/skin/skin.c
05/16. ENHANCEMENT #8: Support for UTF-16LE and UTF-16BE charsets/encodings.
* Change the definition of UChar32 to 'int'.
* Change the definition of Uchar32 to 'int'.
* include/gdi.h
05/16. ENHANCEMENT #11: Support for FreeType2.
+1 -1
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 = v3.2.0
PROJECT_NUMBER = v3.4.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
+82 -81
View File
@@ -2,10 +2,12 @@
A mature and proven cross-platform GUI system for embedded and smart IoT devices.
## TABLE OF CONTENTS
1. Introduction
1. A brief building instruction
1. New features in version 3.4.x
1. New features in version 3.2.x
1. The runtime modes of MiniGUI
1. History
@@ -21,7 +23,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 3.2.x of MiniGUI maintained by WEI Yongming
(Vincent Wei, <https://github.com/VincentWei>).
(Vincent Wei, https://github.com/VincentWei).
MiniGUI is released under GPLv3 and the dual-licensing applies to commercial
use.
@@ -29,39 +31,45 @@ use.
MiniGUI aims to provide a fast, stable, full-featured, and cross-platform
windowing and GUI support system, which is especially fit for
embedded systems or smart IoT devices based-on Linux/uClinux, eCos, and other
traditional RTOSes, such as RTEMS, VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
traditional RTOSes, such as VxWorks, ThreadX, Nucleus, pSOS, uC/OS-II,
and OSE.
This is the MiniGUI core source tree, which provides windowing
and graphics interfaces as well as a lot of standard controls (toolkit).
and graphics interfaces as well as a lot of standard controls (tookit).
Besides MiniGUI core, FMSoft also provides some components
for the developers to develop app much easier:
* mGUtils: A MiniGUI component which contains miscellaneous utilities
like `ColorSelectionDialogBox`, `FileOpenDialogBox`, and so on.
* mGPlus: A MiniGUI component which provides support for advanced graphics
functions like path, gradient, anti-aliased stretch, and color combination.
* mGEff: mGEff provides an animation framework for MiniGUI app.
It also provides some popular UI/UE special effects.
* mGNCS: This component provides a new control set for MiniGUI app.
By using mGNCS, you can use miniStudio to develop MiniGUI app in
WYSIWYG way.
* mGNCS4Touch: This component provides some new controls, which are
compliant to the new control API spec of mGNCS, for devices with
a touch screen.
* mGUtils: A MiniGUI component which contains miscellaneous utilities
like ColorSelectionDialogBox, FileOpenDialogBox, and so on.
* mGPlus: A MiniGUI component which provides support for advanced graphics
functions like path, gradient, anti-aliase stretch, and color combination.
* mGEff: mGEff provides an animation framework for MiniGUI app.
It also provides some popular UI/UE special effects.
* mGNCS: This component provides a new control set for MiniGUI app.
By using mGNCS, you can use miniStudio to develop MiniGUI app in
WYSIWYG way.
* mGNCS4Touch: This component provides some new controls, which are
compliant to the new control API spec of mGNCS, for devices with
a touch screen.
There are also some legacy MiniGUI components. We will not maintain these
components for MiniGUI 3.2.x:
components for MiniGUI core v3.2:
* mGi: An input method component for MiniGUI. This component provides
some typical input methods (such as soft keyboard, hand-writing, and predict
text input for mobile phone) for MiniGUI apps.
* mGp: A printing component for MiniGUI. By using mGp, you can print
out the graphics created by MiniGUI app to general-purpose printers.
* mG3d: A simple three-dimension component for MiniGUI. This component
provides a simple 3D API for app. You can use mG3d to create simple
3D UI.
* mGi: An input method component for MiniGUI. This component provides
some typical input methods (such as softkey, hand-writing, and predict
text input for mobile phone) for MiniGUI apps.
* mGp: A printing component for MiniGUI. By using mGp, you can print
out the graphics created by MiniGUI app to general-purpose printers.
* mG3d: A simple three-dimension component for MiniGUI. This component
provides a simple 3D API for app. You can use mG3d to create simple
3D UI.
MiniGUI is a free software project. In December 1998, the initiator of
FMSoft, Wei Yongming, began to develop MiniGUI under the GNU General Public
@@ -73,34 +81,34 @@ as a free software project.
You can download the source code tarball of MiniGUI and the dependent libraries
from the download zone of the site:
<http://www.minigui.com>
http://www.minigui.com
FMSoft also releases some open source apps for MiniGUI on the site above,
for examples:
* mDolphin, licensed under Apache 2.0, is a full-featured
WEB/WAP browser, which is developed based on the open source browser
core WebKit and uses MiniGUI as its underlying graphics support system.
* mGallery, licensed under Apache 2.0, intends to
provide a total solution for PMP (Portable Multimedia Player),
which uses MiniGUI as the graphics platform.
* mSpider, licensed under GPL 3.0, intends to provide a
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
which addresses the needs of map browse, query, analysis, etc
* mDolphin, licensed under Apache 2.0, is a full-featured
WEB/WAP browser, which is developed based on the open source browser
core WebKit and uses MiniGUI as its underlying graphics support system.
* mGallery, licensed under Apache 2.0, intends to
provide a total solution for PMP (Portable Multimedia Player),
which uses MiniGUI as the graphics platform.
* mSpider, licensed under GPL 3.0, intends to provide a
light-weight MiniGUI-based web browser (HTML 3.2 and part JavaScript)
* mEagle, licensed under GPL 3.0, is an embedded GIS development platform
which addresses the needs of map browse, query, analysis, etc
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>
https://github.com/VincentWei
and
FMSoft also releases miniStudio, which is a WYSIWYG IDE for MiniGUI, as a shareware.
You can also download it from the official site of MiniGUI.
<https://github.com/FMSoftCN>
We now maintain all documents about MiniGUI on the following public repo:
<https://github.com/VincentWei/minigui-docs>
http://www.minigui.com/en/download
## A BRIEF BUILDING INSTRUCTION
@@ -139,6 +147,15 @@ For more information, please run
$ ./configure --help
## NEW FEATURES IN VERSION 3.4.x
We introduce some new features in MiniGUI Version 3.4.x:
* The font and UNICODE related APIs are tuned or enhanced,
in order to support HybridOS Foundation C++ Library.
For more information, please refer to RELEASENOTES.md file.
## NEW FEATURES IN VERSION 3.2.x
We introduce some new features in MiniGUI Version 3.2.x:
@@ -195,7 +212,7 @@ clients and the server.
## HISTORY
About ten years have pasted since MiniGUI was initially created at
21 years have pasted since MiniGUI was initially created at
the end of 1998, and now it becomes much reliable and stable.
During the past years, many remarkable changes have taken place in
the MiniGUI project.
@@ -288,6 +305,7 @@ A brief history description of the development progress lay below:
45) Aug., 2017: FMSoft released the latest source code of mDolphin under Apache 2.0.
46) Dec., 2017: FMSoft updated MiniGUI and miniStudio for latest Linux distributions.
47) Feb., 2018: FMSoft released MiniGUI version 3.2.
47) Jun., 2019: FMSoft released MiniGUI version 3.4.
## ABOUT THE AUTHORS
@@ -337,53 +355,36 @@ the commercial license of MiniGUI, please refer to the LICENSE-POLICY file.
We provide you the commercial license of MiniGUI according to the number
of the run-time binary copies of MiniGUI. If you are interested in
the commercial license of MiniGUI, please write to <sales@minigui.com>
the commercial license of MiniGUI, please write to sales@minigui.com.
## COPYING
Copyright (C) 2002 ~ 2019, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998 ~ 2002, WEI Yongming
Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
Copyright (C) 1998~2002, WEI Yongming
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Or,
Or,
As this program is a library, any link to this program must follow
GNU General Public License version 3 (GPLv3). If you cannot accept
GPLv3, you need to be licensed from FMSoft.
As this program is a library, any link to this program must follow
GNU General Public License version 3 (GPLv3). If you cannot accept
GPLv3, you need to be licensed from FMSoft.
If you have got a commercial license of this program, please use it
under the terms and conditions of the commercial license.
If you have got a commercial license of this program, please use it
under the terms and conditions of the commercial license.
For more information about the commercial license, please refer to
<http://www.minigui.com/en/about/licensing-policy/>.
### Special Statement
The above open source or free software license does
not apply to any entity in the Exception List published by
Beijing FMSoft Technologies Co., Ltd.
If you are or the entity you represent is listed in the Exception List,
the above open source or free software license does not apply to you
or the entity you represent. Regardless of the purpose, you should not
use the software in any way whatsoever, including but not limited to
downloading, viewing, copying, distributing, compiling, and running.
If you have already downloaded it, you MUST destroy all of its copies.
The Exception List is published by FMSoft and may be updated
from time to time. For more information, please see
<https://www.fmsoft.cn/exception-list>.
For more information about the commercial license, please refer to
<http://www.minigui.com/en/about/licensing-policy/>.
+146 -32
View File
@@ -1,25 +1,142 @@
# Release Notes
## Version 3.2.3
## Version 3.4.0
The MiniGUI development team announces the availability of MiniGUI 3.2.3.
The MiniGUI development team announces the availability of MiniGUI 3.4.0.
All users of MiniGUI are recommended strongly to use this version.
Please report any bugs and incompatibilities in
<https://github.com/VincentWei/minigui>
* ENHANCEMENTS:
- Support for RTEMS operating system.
* BUGFIXES:
- Fixed errors in makefile.ng files.
* CLEANUP:
- `README.md` for correct markdown tags.
https://github.com/VincentWei/minigui
### What's new in this version
## Version 3.2.2
In this version, we mainly enhanced and tuned the APIs of font rendering.
The MiniGUI development team announces the availability of MiniGUI 3.2.2.
#### Tunning the logical font APIs
The styles of LOGFONT changed.
* Add new rendering style:
1. `FS_RENDER_ANY`: Not specified
1. `FS_RENDER_MONO`:
1. `FS_RENDER_GREY`:
1. `FS_RENDER_SUBPIXEL`:
* Some old styles are deprecated:
1. `FS_WEIGHT_BOOK`; use `FS_RENDER_GREY` instead.
1. `FS_WEIGHT_SUBPIXEL`; use `FS_RENDER_SUBPIXEL` instead.
* Introduced or redefined the weight styles to follow OpenType specification:
1. `FONT_WEIGHT_ANY`: Not specified
1. `FONT_WEIGHT_THIN`: Thin.
1. `FONT_WEIGHT_EXTRA_LIGHT`: Extra light (Ultra Light).
1. `FONT_WEIGHT_LIGHT`: Light.
1. `FONT_WEIGHT_REGULAR`: Regular (Normal).
1. `FONT_WEIGHT_MEDIUM`: Medium.
1. `FONT_WEIGHT_DEMIBOLD`: Demi Bold (Semi Bold)
1. `FONT_WEIGHT_BOLD`: Bold.
1. `FONT_WEIGHT_EXTRA_BOLD`: Extra Bold (Ultra Bold).
1. `FONT_WEIGHT_BLACK`: Black (Heavy).
* Introduce the new decoration styles and replace
`FONT_UNDERLINE_LINE` and `FONT_STRUCKOUT_LINE` with them:
1. `FONT_DECORATE_ANY`: Not specified.
1. `FONT_DECORATE_NONE`: None.
1. `FONT_DECORATE_UNDERLINE`: glyphs are underscored.
1. `FONT_DECORATE_STRUCKOUT`: glyphs are overstruck.
1. `FONT_DECORATE_US`: Both `FONT_DECORATE_UNDERLINE` and `FONT_DECORATE_STRUCKOUT`.
1. `FONT_DECORATE_OUTLINE`: Outline (hollow) glyphs.
1. `FONT_DECORATE_REVERSE`: Reverved for future. Glyphs have their foreground and background reversed.
* The following style are deprecated:
1. `FONT_OTHER_LCDPORTRAIT`
1. `FONT_OTHER_LCDPORTRAITKERN`
For a new app, you should use the new function `CreateLogFontEx` to
create a LOGFONT, and specify the weight and rendering method of the glyph.
For the back-compatibility, you can still use `CreateLogFont` to create a new
LOGFONT. However, `FS_WEIGHT_BOOK` will be treated `FS_WEIGHT_REGULAR` and
`FS_RENDER_GREY`, while `FS_WEIGHT_SUBPIXEL` will be treated
`FS_WEIGHT_REGULAR` and `FS_RENDER_SUBPIXEL`.
You can still use `CreateLogFontByName` to create a new LOGFONT.
But the style string in the font name changed from
<weight><slant><flipping><other><underline><struckout>
to
<weight><slant><flipping><other><decoration><rendering>
Note that `<underline>` and `<struckout>` are merged to `<decoration>`
in order to keep the style string is still 6-character long.
Consequently, if you want to use the rendering method SUPIXEL for a TTF font,
please define the logical font name in the following way:
ttf-Courier-rrncns-*-16-UTF-8
Moreover, the family name of a DEVFONT supports aliases since 3.4.0:
<fonttype>-<family[,aliase]*>-<styles>-<width>-<height>-<charset[,charset]*>
for example:
ttf-Arial,Sans Serif-rrncnn-8-16-ISO8859-1,UTF-8
ttf-courier,monospace,serif-rrncnn-8-16-ISO8859-1,UTF-8
Note that the length of one DEVFONT name can not exceed 255 bytes.
#### Changed APIs
* The fields `height` and `descent` have been removed from GLYPHINFO struct.
One should get the font metrics information by calling `GetFontMetrics` function
if you want to get the height and descent data of one font.
* More fields added for GLYPHBITMAP struct in order to return the completed
rasterized glyph bitmap information.
* `GetGlyphInfo` now can return the basic glyph type and break type of a
UNICODE character. If the glyph is an ASCII character, the old `MCHAR_TYPE`
can also be returned.
* Rename `mg_FT_LcdFilter` to `FT2LCDFilter` in order to follow MiniGUI naming
rules.
* Rename `UChar32` to `Uchar32` and `UChar16` to `Uchar16` in order to
avoid the conflict with typedef of UChar32 in 'unicode/umachine.h'.
* Redefine `Uchar32` and `Glyph32` as `Uint32` instead of `int`.
#### New APIs
* `GetGlyphsByRules` function calculates and allocates the glyph string from
a multi-byte string under the specified white space rule and transformation
rule.
* `GetGlyphsExtentPointEx` function gets the visual extent information
of a glyph string which can fit in a line with the specified maximal extent.
* `DrawGlyphStringEx` function draws a glyph string to the specific
positions of a DC.
* `CreateLogFontIndirectEx` creates a new LOGFONT by using the value of
an existed LOGFONT but with a new rotation value.
#### Others
* Support for FreeType1 removed.
You should always use FreeType2 to support vector fonts, such as TrueType
fonts (TTF), TrueType collections (TTC), OpenType fonts (OTF, both TrueType
and CFF variants), OpenType collections (OTC), and Type 1 fonts (PFA and PFB).
### Other Changes
* A new BITMAP type: `BMP_TYPE_REPLACEKEY`. When `bmType` of a BITMAP object
has this bit set, any pixel which is equal to `bmColorKey` will be replaced by
`bmColorRep`.
## Version 3.2.1
The MiniGUI development team announces the availability of MiniGUI 3.2.1.
All users of MiniGUI are recommended strongly to use this version.
Please report any bugs and incompatibilities in
@@ -28,38 +145,34 @@ Please report any bugs and incompatibilities in
### What's new in this version
* ENHANCEMENTS:
1. New API: `SyncUpdateDC`. You can use this function to synchronize
the update rectangles of a surface to screen, if the surface
represents the shadow frame buffer of the screen.
* configure option: `--enable-syncupdate`
* macro: `_MGUSE_SYNC_UPDATE`
1. New API `UpdateInvalidClient`. You can use this function to update
the invalid client region of a window instantly.
1. New API `LoadDevFontFromIncoreData`. You can use this function to load
a device font from incore data.
1. Use different colors for the output of `_DBG_PRINTF` and `_ERR_PRINTF`.
1. Add `__mg_save_jpg` function for storing MYBITMAP as JPEG file (10km).
1. Modified logic for checking JPEG format (10km).
1. Support BIDI for UNICODE charsets and cleanup the implementation.
* New API: `GetGlyphBIDIType` to get the glyph type in BIDI.
* New DC attribute: BIDI flag.
1. Add a new key `dpi` for NEWGAL engine to define the DPI of the screen.
If it is absent, use 96 as the default DPI.
1. Add an item for `GetGDCapability` to return DPI of the DC.
1. New API `InitSlaveScreenEx` to specify the DPI of slave screen.
Define `InitSlaveScreen` as an inline function calling `InitSlaveScreenEx`.
1. New API: `SyncUpdateDC`. You can use this function to synchronize
the update rectangles of a surface to screen, if the surface
represents the shadow frame buffer of the screen.
* configure option: `--enable-syncupdate`
* macro: `_MGUSE_SYNC_UPDATE`
1. New API: `UpdateInvalidClient`. You can use this function to update
the invalid client region of a window instantly.
1. Use different colors for the output of `_DBG_PRINTF` and `_ERR_PRINTF`.
1. Add `__mg_save_jpg` function for storing MYBITMAP as JPEG file (@10km).
1. Modified logic for checking JPEG format (@10km).
1. Support BIDI for UNICODE charsets and cleanup the implementation.
* New API: `GetGlyphBidiType` to get the glyph type in BIDI.
* New DC attribute: BIDI flag.
1. Enhance commlcd engint to support more pixel type and synchronously update.
1. New USVFB IAL engine and NEWGAL engine for web display server.
1. New type: `QDWORD` for a quauter of DWORD. This type is 16-bit long on
64-bit architecture, and 8-bit long on 32-bit.
64-bit architecture, and 8-bit long on 32-bit.
1. New macros for QDWORD:
* `MAKEDWORD`: Make a DWROD from four QDWORDs.
* `FIRST_QDWORD`: get the first (LSB) QDWORD from a DWORD.
* `SECOND_QDWORD`: get the second (LSB) QDWORD from a DWORD.
* `THIRD_QDWORD`: get the third (LSB) QDWORD from a DWORD.
* `FOURTH_QDWORD`: get the fourth (LSB) QDWORD from a DWORD.
1. New header for CommLCD NEWGAL engine and COMM IAL engine:
`<minigui/exstubs.h>`.
* BUGFIXING:
1. handle `PNG_COLOR_TYPE_GRAY_ALPHA` color type of PNG files.
@@ -69,8 +182,9 @@ Please report any bugs and incompatibilities in
1. Skip null pixels for SUBPIXEL glyphs. This bug will always show background
pixels of one SUBPIXEL glyph.
1. Fix the bug of wrong bounding box handling for SUBPIXEL rendering of glyph.
1. Tune cache implementation of FreeType2 font engine.
* Enable cache for rotated LOGFONT.
* TUNNING:
1. Tune GLYPHINFO structure and GetGlyphInfo to return BIDI glyph type.
## Version 3.2.0
+3 -3
View File
@@ -1,9 +1,9 @@
Version 3.2.3 (2019/10/31)
Version 3.4.0 (2019/06/30)
This release needs the following resource packages:
* minigui-res-3.0.13.tar.gz
* minigui-res-3.4.0.tar.gz
The latest samples package is:
* mg-samples-3.2.2.tar.gz
* mg-samples-3.4.0.tar.gz
-1
View File
@@ -1,7 +1,6 @@
#!/bin/sh
./configure \
--with-runmode=ths \
--disable-dblclk \
--disable-cursor \
--disable-mousecalibrate \
-44
View File
@@ -1,44 +0,0 @@
#!/bin/sh
RTEMS_DIR=/home/projects/movidius/m8_gui/tools/18.11.4/linux64/sparc-myriad-rtems-6.3.0
#RTEMS_GLOBAL_CFLAGS="-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -finit-priority"
rm -f config.cache config.status
CC=${RTEMS_DIR}/bin/sparc-myriad-rtems-gcc \
CFLAGS="-I${RTEMS_DIR}/sparc-myriad-rtems/include -I${RTEMS_DIR}/pnglib/include -I${RTEMS_DIR}/zlib/include" \
LDFLAGS="-L${RTEMS_DIR}/lib/gcc/sparc-myriad-rtems/6.3.0 -L${RTEMS_DIR}/pnglib/lib -L${RTEMS_DIR}/zlib/lib" \
./configure --prefix=/home/projects/movidius/m8_gui/tools/18.11.4/linux64/sparc-myriad-rtems-6.3.0/minigui \
--build=i686-linux \
--host=sparc-myriad-rtems \
--target=sparc-myriad-rtems \
--with-osname=rtems \
--with-runmode=ths \
--enable-miniguientry \
--enable-incoreres \
--disable-cursor \
--disable-videofbcon \
--disable-qvfbial \
--disable-vbfsupport \
--disable-qpfsupport \
--disable-latin9support \
--enable-gbksupport \
--disable-big5support \
--enable-unicodesupport \
--disable-savebitmap \
--disable-jpgsupport \
--disable-pngsupport \
--disable-aboutdlg \
--enable-adv2dapi \
--enable-videodummy \
--disable-consoleial \
--disable-videopcxvfb \
--with-targetname=external \
--enable-pngsupport \
--disable-develmode \
--disable-detaildebug \
--disable-tracemsg \
--enable-videocommlcd \
--enable-commial \
--disable-splash
-36
View File
@@ -1,36 +0,0 @@
# rules for pc-linux
# set your own targaet_os
TARGET_OS=linux
##################################################
# set your compile tool #
CC=gcc
CXX=g++
CPP=g++
AR=ar
AS=as
RANLIB=ranlib
MAKE=/usr/bin/make
##################################################
ARFLAGS=-rc
COFLAG=-c
OBJ=o
LIBA=a
##################################################
# if you don't want to create dynamic, delete it #
LIBSO=so
SOFLAGS=-fPIC -shared -o
##################################################
##################################################
# set your compile flags and install prefix path #
PREFIX=/usr/local
CFLAGS+=-g -Wall -fPIC `pkg-config --cflags freetype2`
LDFLAGS+=
##################################################
+116 -95
View File
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(libminigui, 3.2.3)
AC_INIT(libminigui, 3.4.0)
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=3
MINIGUI_MINOR_VERSION=2
MINIGUI_MICRO_VERSION=3
MINIGUI_MINOR_VERSION=4
MINIGUI_MICRO_VERSION=0
MINIGUI_INTERFACE_AGE=0
MINIGUI_BINARY_AGE=3
MINIGUI_BINARY_AGE=0
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(sys/types.h sys/time.h termio.h unistd.h math.h locale.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -77,6 +77,7 @@ AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(time mktime localtime strdup strcasecmp strncasecmp strerror setlocale)
AC_CHECK_FUNCS(posix_memalign memalign valloc)
dnl ========================================================================
dnl User selectable options
@@ -89,6 +90,8 @@ message_string="no"
runtime_mode="procs"
stand_alone="no"
incore_res="no"
use_miniguientry="no"
fixed_math="yes"
@@ -162,7 +165,8 @@ build_incorefont_times="yes"
build_sef_support="no"
build_qpf_support="no"
use_ttf_lib="ft2"
build_ttf_support="yes"
build_complex_scripts="yes"
build_ttfcache_support="yes"
build_bmpf_support="yes"
@@ -191,6 +195,7 @@ build_eucjp_support="no"
build_shiftjis_support="no"
build_unicode_support="yes"
build_full_unicode="yes"
dnl Keyboard layout specific options
use_kbd_hebrewpc="no"
@@ -302,6 +307,10 @@ AC_ARG_WITH(runmode,
[ --with-runmode=procs/ths/sa the MiniGUI runtime mode <default=procs>],
runtime_mode=$withval)
AC_ARG_ENABLE(standalone,
[ --enable-standalone build MiniGUI-Standalone version <default=no>],
stand_alone=$enableval)
AC_ARG_ENABLE(incoreres,
[ --enable-incoreres use incore resource instead file IO to initialize MiniGUI <default=no>],
incore_res=$enableval)
@@ -530,14 +539,18 @@ AC_ARG_ENABLE(sefsupport,
[ --enable-sefsupport build support for koxomo scripteasy (SEF) <default=no>],
build_sef_support=$enableval)
AC_ARG_WITH(ttfsupport,
[ --with-ttfsupport=ft1/ft2/none How to support TrueType font (FreeType 1/FreeType 2/None) <default=none>],
use_ttf_lib=$withval)
AC_ARG_ENABLE(ttfsupport,
[ --enable-ttfsupport build support for TrueType/OpenType (needs FreeType2 library) <default=yes>],
build_ttf_support=$enableval)
AC_ARG_ENABLE(ttfcache,
[ --enable-ttfcache include ttf cache support <default=no>],
[ --enable-ttfcache build ttf cache support <default=no>],
build_ttfcache_support=$enableval)
AC_ARG_ENABLE(complexscripts,
[ --enable-complexscripts build support for complex scripts (needs HarzBuff library) <default=yes>],
build_complex_scripts=$enableval)
AC_ARG_ENABLE(bmpfsupport,
[ --enable-bmpfsupport build support for Bitmap Font (bmpf) <default=yes>],
build_bmpf_support=$enableval)
@@ -630,6 +643,10 @@ AC_ARG_ENABLE(unicodesupport,
[ --enable-unicodesupport include UNICODE (ISO-10646-1 and UTF-8 encoding) support <default=yes>],
build_unicode_support=$enableval)
AC_ARG_ENABLE(fullunicode,
[ --enable-fullunicode include support for full UNICODE code points <default=yes>],
build_full_unicode=$enableval)
AC_ARG_ENABLE(kbdhebrewpc,
[ --enable-kbdhebrewpc include keyboard layout for Hebrew PC keyboard <default=no>],
use_kbd_hebrewpc=$enableval)
@@ -726,8 +743,9 @@ AC_ARG_ENABLE(ctrlbidisledit,
[ --enable-ctrlbidisledit include Single-Line BIDI EDIT control <default=no>],
build_ctrl_bidisledit=$enableval)
AC_ARG_ENABLE(ctrlnewtextedit,
[ --disable-ctrlnewtextedit include the new implementation of TEXTEDIT control <default=yes>],
dnl enable new textedit
AC_ARG_ENABLE(newtextedit,
[ --enable-ctrlnewtextedit include the new implementation of TEXTEDIT control <default=yes>],
build_ctrl_textedit_new=$enableval)
AC_ARG_ENABLE(ctrllistbox,
@@ -827,7 +845,7 @@ CheckFBCON()
AC_ARG_ENABLE(videofbcon,
[ --enable-videofbcon include FrameBuffer console NEWGAL engine <default=yes>],
enable_video_fbcon=$enableval)
if test x$enable_video_fbcon = xyes; then
if test "x$enable_video_fbcon" = "xyes"; then
AC_MSG_CHECKING(for FrameBuffer console support)
video_fbcon=no
AC_TRY_COMPILE([
@@ -839,7 +857,7 @@ CheckFBCON()
video_fbcon=yes
])
AC_MSG_RESULT($video_fbcon)
if test x$video_fbcon = xyes; then
if test "x$video_fbcon" = "xyes"; then
AC_DEFINE(_MGGAL_FBCON, 1,
[Define if include FrameBuffer console NEWGAL engine])
VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
@@ -849,7 +867,7 @@ CheckFBCON()
AC_CHECK_LIB(pciaccess, pci_system_init,
DEP_LIBS="$DEP_LIBS -lpciaccess", have_pciaccess="no")
if test x$have_pciaccess = xyes; then
if test "x$have_pciaccess" = "xyes"; then
AC_DEFINE(_MGHAVE_PCIACCESS, 1,
[Define if PCIAccess lib is available])
LDFLAGS="$LDFLAGS -lpciaccess"
@@ -891,7 +909,7 @@ dnl CheckPCXVFB
[Define if include PC Virtual FrameBuffer NEWGAL engine])
VIDEO_SUBDIRS="$VIDEO_SUBDIRS pcxvfb"
VIDEO_DRIVERS="$VIDEO_DRIVERS pcxvfb/libvideo_pcxvfb.la"
else
else
if test "x$enable_video_rtos_xvfb" = "xyes"; then
dnl CheckRTOSXVFB
AC_DEFINE(_MGGAL_RTOSXVFB, 1,
@@ -1092,7 +1110,7 @@ CheckDirectFBVideo()
[ --enable-videodfb include NEWGAL engine for DirectFB <default=no>],
enable_video_dfb=$enableval)
if test x$enable_video_dfb = xyes; then
if test "x$enable_video_dfb" = "xyes"; then
AC_MSG_CHECKING(for DirectFB support)
video_dfb=no
AC_TRY_COMPILE([
@@ -1102,7 +1120,7 @@ CheckDirectFBVideo()
video_dfb=yes
])
AC_MSG_RESULT($video_dfb)
if test x$video_dfb = xyes; then
if test "x$video_dfb" = "xyes"; then
AC_DEFINE(_MGGAL_DFB, 1,
[Define if include NEWGAL engine for DirectFB])
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dfb"
@@ -1114,7 +1132,7 @@ CheckDirectFBVideo()
[ --enable-videost7167 include NEWGAL engine for ST7167 on DirectFB <default=no>],
enable_video_dfb_st7167=$enableval)
if test x$enable_video_dfb_st7167 = xyes; then
if test "x$enable_video_dfb_st7167" = "xyes"; then
AC_DEFINE(_MGGAL_DFB_ST7167, 1,
[Define if include ST7167 subdriver for NEWGAL engine of DirectFB])
fi
@@ -1397,18 +1415,12 @@ case "$with_libsuffix" in
esac
AC_ARG_WITH(osname,
[ --with-osname=linux/uclinux/ecos/ucos2/swlinux/vxworks/win32/darwin/threadx/cygwin/nucleus/ose/psos/rtems])
[ --with-osname=linux/uclinux/ecos/ucos2/swlinux/vxworks/win32/darwin/threadx/cygwin/nucleus/ose/psos])
dnl configure.in file is used only for the following OSes: linux/uclinux/swlinux/ecos/darwin/cygwin
dnl for other OSes, you should use makefile.ng or else.
case "$with_osname" in
rtems)
AC_DEFINE(__RTEMS__, 1,
[Define if compile for rtems])
AC_DEFINE(__NOUNIX__, 1,
[Define if compile for non-UNIX like OS])
;;
uclinux)
AC_DEFINE(__uClinux__, 1,
[Define if compile for uClinux])
@@ -1512,10 +1524,6 @@ AC_ARG_WITH(targetname,
S3C6410/S3C2440/S3C2410/hi3560a Define the target board name])
case "$with_targetname" in
external)
AC_DEFINE(__TARGET_EXTERNAL__, 1,
[Define for targets which use GAL and/or IAL engines and define the interfaces externally])
;;
fmsoft)
AC_DEFINE(__TARGET_FMSOFT__, 1,
[Define for FMSoft internal use])
@@ -1980,30 +1988,29 @@ if test "x$build_upf_support" = "xyes"; then
fi
dnl Check FreeType lib
case "$use_ttf_lib" in
ft1)
dnl Check for FreeType1 library
AC_CHECK_LIB(ttf, TT_FreeType_Version,
DEP_LIBS="$DEP_LIBS -lttf",
use_ttf_lib="none")
;;
ft2)
dnl Check for FreeType2 library
if test "x$build_ttf_support" = "xyes"; then
dnl Check for FreeType2 library
AC_CHECK_LIB(freetype, FT_Library_Version,
DEP_LIBS="$DEP_LIBS -lfreetype",
use_ttf_lib="none")
;;
esac
build_ttf_support="no")
fi
dnl Dealing with TTF cache size
if test "x$build_ttf_support" = "xyes"; then
if test "x$build_complex_scripts" = "xyes"; then
dnl Check for HarfBuzz library
AC_CHECK_LIB(harfbuzz, hb_version,
DEP_LIBS="$DEP_LIBS -lharfbuzzex",
build_complex_scripts="no")
fi
dnl Dealing with TTF cache size
case "$use_ttf_lib" in
ft1|ft2)
if test "x$build_ttfcache_support" = "xyes"; then
AC_DEFINE(_MGFONT_TTF_CACHE, 1,
[Define if include ttf cache])
AC_ARG_WITH(ttfcachesize,
[ --with-ttfcachesize=[64/128/256/512/1024]])
[ --with-ttfcachesize=[64/128/256/512/1024/2048]])
case "$with_ttfcachesize" in
64)
@@ -2026,79 +2033,85 @@ case "$use_ttf_lib" in
AC_DEFINE(_MGTTF_CACHE_SIZE, 1024,
[Define if compile max ttf cahce size for 1024k])
;;
2048)
AC_DEFINE(_MGTTF_CACHE_SIZE, 2048,
[Define if compile max ttf cahce size for 2048k])
;;
*)
AC_DEFINE(_MGTTF_CACHE_SIZE, 256,
[Define if compile max ttf cahce size for 256k])
AC_DEFINE(_MGTTF_CACHE_SIZE, 1024,
[Define if compile max ttf cahce size for 1024k (default value)])
;;
esac
AC_ARG_WITH(ttfcachenum,
[ --with-mttfcachenum=[10/20/40]])
case "$with_mttfcachenum" in
10)
AC_DEFINE(_MGMAX_TTF_CACHE, 10,
[Define if compile max ttf cahce number for 10])
[ --with-ttfcachenum=[16/32/64/128]])
case "$with_ttfcachenum" in
16)
AC_DEFINE(_MGMAX_TTF_CACHE, 16,
[Define if compile max ttf cahce number for 16])
;;
20)
AC_DEFINE(_MGMAX_TTF_CACHE, 20,
[Define if compile max ttf cahce number for 20])
32)
AC_DEFINE(_MGMAX_TTF_CACHE, 32,
[Define if compile max ttf cahce number for 32])
;;
40)
AC_DEFINE(_MGMAX_TTF_CACHE, 40,
[Define if compile max ttf cahce number for 40])
64)
AC_DEFINE(_MGMAX_TTF_CACHE, 64,
[Define if compile max ttf cahce number for 64])
;;
128)
AC_DEFINE(_MGMAX_TTF_CACHE, 128,
[Define if compile max ttf cahce number for 128])
;;
*)
AC_DEFINE(_MGMAX_TTF_CACHE, 10,
[Define if compile max ttf cahce number for 10 (default value)])
AC_DEFINE(_MGMAX_TTF_CACHE, 32,
[Define if compile max ttf cahce number for 32 (default value)])
;;
esac
fi
;;
esac
fi
dnl Dealing with CFLAGS and LDFLAGS
case "$use_ttf_lib" in
ft1)
build_unicode_support="yes"
if test "x$build_complex_scripts" = "xyes"; then
build_ttf_support="yes"
AC_DEFINE(_MGCOMPLEX_SCRIPTS, 1,
[Define if support complex scripts based on HarfBuzz])
AC_DEFINE(_MGFONT_TTF, 1,
[Define if support TrueType font])
AC_ARG_WITH(hb_includes,
[ --with-hb-includes=DIR where the HarfBuzz includes are])
AC_ARG_WITH(ft1_includes,
[ --with-ft1-includes=DIR where the FreeType1 includes are])
if test "x$with_hb_includes" = "x"; then
HB_INC_DIR="-I/usr/local/include/harfbuzz"
else
HB_INC_DIR="-I$with_hb_includes"
fi
if test "x$with_ft1_includes" = "x"; then
FT1_INC_DIR="-I/usr/include/freetype1"
else
FT1_INC_DIR="-I$with_ft1_includes"
fi
AC_SUBST(HB_INC_DIR)
fi
AC_SUBST(FT1_INC_DIR)
;;
ft2)
build_unicode_support="yes"
AC_DEFINE(_MGFONT_FT2, 1,
[Define if support TrueType font based on FreeType2])
if test "x$build_ttf_support" = "xyes"; then
build_unicode_support="yes"
AC_DEFINE(_MGFONT_FT2, 1,
[Define if support TrueType/OpenType fonts based on FreeType2])
AC_ARG_WITH(ft2_includes,
[ --with-ft2-includes=DIR where the FreeType2 includes are])
with_ft2_includes=""
AC_ARG_WITH(ft2_includes,
[ --with-ft2-includes=DIR where the FreeType2 includes are],
with_ft2_includes=$withval)
if test "x$with_ft2_includes" = "x"; then
FT2_INC_DIR="-I/usr/include/freetype2"
else
FT2_INC_DIR="-I$with_ft2_includes"
fi
if test "x$with_ft2_includes" = "x"; then
FT2_INC_DIR="-I/usr/include/freetype2"
else
FT2_INC_DIR="-I$with_ft2_includes"
fi
AC_SUBST(FT2_INC_DIR)
;;
esac
AC_SUBST(FT2_INC_DIR)
fi
if test "x$build_bmpf_support" = "xyes"; then
AC_DEFINE(_MGFONT_BMPF, 1,
[Define if support Bitmap fonts])
fi
if test "x$build_latin2_support" = "xyes"; then
AC_DEFINE(_MGCHARSET_LATIN2, 1,
[Define if support Latin 2 charset])
@@ -2209,6 +2222,11 @@ if test "x$build_unicode_support" = "xyes"; then
[Define if support UNICODE])
fi
if test "x$build_full_unicode" = "xyes"; then
AC_DEFINE(_MGCHARSET_UNICODE_FULL, 1,
[Define if support full UNICODE code points])
fi
if test "x$use_kbd_hebrewpc" = "xyes"; then
AC_DEFINE(_MGKBDLAYOUT_HEBREWPC, 1,
[Define if use the Hebrew PC keyboard layout])
@@ -2462,20 +2480,23 @@ dnl define _GNU_SOURCE for pthread_rwlock_t
CFLAGS="$CFLAGS -D_GNU_SOURCE"
if test "x$devel_mode" = "xyes"; then
CPPFLAGS="$CPPFLAGS -D_DEBUG"
CPPFLAGS="$CPPFLAGS -DDEBUG"
if test "x$detail_debug" = "xyes"; then
CPPFLAGS="$CPPFLAGS -DDEBUG"
CPPFLAGS="$CPPFLAGS -D_DEBUG"
fi
if test "$ac_cv_prog_gcc" = "yes"; then
CPPFLAGS="$CPPFLAGS -Wall -Werror"
fi
AC_DEFINE(_MGDEVEL_MODE, 1,
[Define if developer mode enabled])
else
CPPFLAGS="$CPPFLAGS -DNDEBUG"
fi
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -O2 -Wstrict-prototypes -pipe"
CFLAGS="$CFLAGS -O2 -fmax-errors=10 -Wstrict-prototypes -pipe"
fi
if test "x$runtime_mode" = "xths"; then
+5 -5
View File
@@ -239,9 +239,9 @@ int GUIAPI GetFirstWord (PLOGFONT log_font, const char* mstr, int len,
496 static int euckr_is_this_charset (const unsigned char* charset)
497 {
498 int i;
499 char name [LEN_FONT_NAME + 1];
499 char name [LEN_LOGFONT_NAME_FIELD + 1];
500
501 for (i = 0; i &lt; LEN_FONT_NAME + 1; i++) {
501 for (i = 0; i &lt; LEN_LOGFONT_NAME_FIELD + 1; i++) {
502 if (charset [i] == '\0')
503 break;
504 name [i] = toupper (charset [i]);
@@ -388,9 +388,9 @@ int GUIAPI GetFirstWord (PLOGFONT log_font, const char* mstr, int len,
<table border="0" cellpadding="0" class="code-sample" width="100%"><tr><td> <pre>
228 typedef struct _LOGFONT {
229 char type [LEN_FONT_NAME + 1];
230 char family [LEN_FONT_NAME + 1];
231 char charset [LEN_FONT_NAME + 1];
229 char type [LEN_LOGFONT_NAME_FIELD + 1];
230 char family [LEN_LOGFONT_NAME_FIELD + 1];
231 char charset [LEN_LOGFONT_NAME_FIELD + 1];
232 DWORD style;
233 int size;
234 int rotation;
+12 -12
View File
@@ -1,14 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontbig24;
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_SETWIDTH_NORMAL,
FONT_SPACING_CHARCELL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
16, 0);
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_SETWIDTH_NORMAL,
FONT_SPACING_CHARCELL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
12, 0);
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_SETWIDTH_NORMAL,
FONT_SPACING_CHARCELL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
24, 0);
logfont = CreateLogFont (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_NONE, FONT_STRUCKOUT_LINE,
16, 0);
logfontgb12 = CreateLogFont (NULL, "song", "GB2312",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_LINE,
12, 0);
logfontbig24 = CreateLogFont (NULL, "ming", "BIG5",
FONT_WEIGHT_REGULAR, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_UNDERLINE_LINE, FONT_STRUCKOUT_NONE,
24, 0);
+14
View File
@@ -0,0 +1,14 @@
static LOGFONT *logfont, *logfontgb12, *logfontttf;
logfont = CreateLogFontEx (NULL, "SansSerif", "ISO8859-1",
FONT_WEIGHT_REGULAR, FONT_SLANT_ITALIC, FONT_FLIP_NONE,
FONT_OTHER_NIL, FONT_DECORATE_NONE, FONT_RENDER_MONO,
16, 0);
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",
FONT_WEIGHT_BLACK, FONT_SLANT_ROMAN, FONT_FLIP_NONE,
FS_OTHER_LCDPORTRAIT, FONT_DECORATE_NONE, FONT_RENDER_SUBPIXEL,
24, 0);
+2 -2
View File
@@ -11,8 +11,8 @@ COMM_HDRS = \
common.h endianrw.h fixedmath.h \
minigui.h gdi.h window.h control.h \
own_malloc.h own_stdio.h \
xvfb.h customial.h exstubs.h \
dti.c
xvfb.h customial.h \
dti.c
UCOSII_HDRS=ucos2_pthread.h ucos2_semaphore.h
THREADX_HDRS=threadx_pthread.h threadx_semaphore.h
+157 -104
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -2,12 +2,12 @@
* \file control.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2001/12/29
*
*
* \brief This file includes interfaces of standard controls of MiniGUI.
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -45,7 +45,7 @@
/*
* $Id: control.h 11349 2009-03-02 05:00:43Z weiym $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*
*/
+1 -1
View File
@@ -871,7 +871,7 @@ typedef LVNM_ITEMRUP *PLVNM_ITEMRUP;
*/
#define LVM_GETITEMSTATE 0xF128
/*
/**
* \def LVM_GETSELECTEDCOLUMN
* \brief Retrieves the index of the currently selected column of a listview.
*
+14 -14
View File
@@ -51,6 +51,11 @@
#ifndef GUI_IAL_CUSTOM_H
#define GUI_IAL_CUSTOM_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define IAL_MOUSE_LEFTBUTTON 1
#define IAL_MOUSE_RIGHTBUTTON 2
#define IAL_MOUSE_MIDDLEBUTTON 4
@@ -62,12 +67,12 @@
#define IAL_MOUSEEVENT 1
#define IAL_KEYEVENT 2
typedef struct tagINPUT {
typedef struct tagINPUT
{
char* id;
// Initialization and termination
BOOL (*init_input) (struct tagINPUT *input, const char* mdev,
const char* mtype);
BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype);
void (*term_input) (void);
// Mouse operations
@@ -87,26 +92,21 @@ typedef struct tagINPUT {
void (*set_leds) (unsigned int leds);
// Event
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
fd_set *except, struct timeval *timeout);
char mdev [MAX_PATH + 1];
} INPUT;
}INPUT;
#ifdef _MGIAL_CUSTOM
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
void TermCustomInput (void);
extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
extern void TermCustomInput (void);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _MGIAL_CUSTOM */
#endif /* GUI_IAL_CUSTOM_H */
-114
View File
@@ -1,114 +0,0 @@
/**
* \file exstubs.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2019/04/07
*
* \brief This file is the header for NEWGAL/IAL engines which should be
* implemented by an external module.
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
Copyright (C) 2007~2018, Beijing FMSoft Technologies Co., Ltd.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Or,
As this program is a library, any link to this program must follow
GNU General Public License version 3 (GPLv3). If you cannot accept
GPLv3, you need to be licensed from FMSoft.
If you have got a commercial license of this program, please use it
under the terms and conditions of the commercial license.
For more information about the commercial license, please refer to
<http://www.minigui.com/en/about/licensing-policy/>.
\endverbatim
*/
/*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*/
#ifndef GUI_EXSTUBS_H
#define GUI_EXSTUBS_H
/* The pixel format defined by depth */
#define COMMLCD_PSEUDO_RGB332 1
#define COMMLCD_TRUE_RGB555 2
#define COMMLCD_TRUE_RGB565 3
#define COMMLCD_TRUE_RGB888 4
#define COMMLCD_TRUE_RGB0888 5
#define COMMLCD_TRUE_ARGB1555 6
#define COMMLCD_TRUE_ARGB8888 7
#define COMMLCD_TRUE_ABRG8888 8
#define COMMLCD_UPDATE_NONE 0
#define COMMLCD_UPDATE_SYNC 1
#define COMMLCD_UPDATE_ASYNC 2
struct commlcd_info {
int height; // vertical resolution of the screen
int width; // horinzontal resolution of the screen
int pitch; // Length of one scan line in bytes
int bpp; // Depth (bits-per-pixel)
int type; // Pixel type
int update_method; // Update method: none, asynchronously, or synchronously.
Uint8* fb; // Frame buffer
};
#define COMM_MOUSEINPUT 0x01
#define COMM_KBINPUT 0x02
#define COMM_MOUSELBUTTON 0x01
#define COMM_MOUSERBUTTON 0x04
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* external stubs for COMMLCD NEWGAL engine */
#ifdef _MGGAL_COMMLCD
int __commlcd_drv_init (void);
int __commlcd_drv_getinfo (struct commlcd_info *li,
int width, int height, int depth);
int __commlcd_drv_release (void);
int __commlcd_drv_setclut (int firstcolor, int ncolors, GAL_Color *colors);
int __commlcd_drv_update (const RECT* rc_dirty);
#endif /* _MGGAL_COMMLCD */
#ifdef _MGIAL_COMM
int __comminput_init (void);
int __comminput_ts_getdata (short *x, short *y, short *button);
int __comminput_kb_getdata (short *key, short *status);
int __comminput_wait_for_input (struct timeval *timeout);
void __comminput_deinit (void);
#endif /* _MGIAL_COMM */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GUI_EXSTUBS_H */
+66 -66
View File
@@ -2,12 +2,12 @@
* \file fixedmath.h
* \author Wei Yongming <vincent@minigui.org>
* \date 2002/01/12
*
*
* \brief This file includes fixed point and three-dimension math routines.
*
\verbatim
This file is part of MiniGUI, a mature cross-platform windowing
This file is part of MiniGUI, a mature cross-platform windowing
and Graphics User Interface (GUI) support system for embedded systems
and smart IoT devices.
@@ -45,7 +45,7 @@
/*
* $Id: fixedmath.h 12154 2009-10-15 07:21:34Z weiym $
*
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
* pSOS, ThreadX, NuCleus, OSE, and Win32.
*
* Fixed-point math routins come from Allegro (a gift software)
@@ -79,21 +79,21 @@ extern "C" {
/**
* \defgroup fixed_math_fns Fixed point math functions
*
*
* You know that the float point mathematics routines are very
* expensive. If you do not want precision mathematics result,
* expensive. If you do not want precision mathematics result,
* you can use fixed point. MiniGUI uses a double word (32-bit)
* integer to represent a fixed point ranged from -32767.0 to
* 32767.0, and defines some fixed point mathematics routines for
* your application. Some GDI functions need fixed point
* integer to represent a fixed point ranged from -32767.0 to
* 32767.0, and defines some fixed point mathematics routines for
* your application. Some GDI functions need fixed point
* math routines, like \a Arc.
*
* Example 1:
*
*
* \include fixed_point.c
*
* Example 2:
*
*
* \include fixedpoint.c
* @{
*/
@@ -112,9 +112,9 @@ MG_EXPORT fixed fixsqrt (fixed x);
/**
* \fn fixed fixhypot (fixed x, fixed y)
* \brief Returns the Euclidean distance from the origin.
*
* The function returns the \a sqrt(x*x+y*y). This is the length of
* the hypotenuse of a right-angle triangle with sides of length \a x and \a y,
*
* The function returns the \a sqrt(x*x+y*y). This is the length of
* the hypotenuse of a right-angle triangle with sides of length \a x and \a y,
* or the distance of the point \a (x,y) from the origin.
*
* \sa fixsqrt
@@ -125,10 +125,10 @@ MG_EXPORT fixed fixhypot (fixed x, fixed y);
* \fn fixed fixatan (fixed x)
* \brief Calculates the arc tangent of a fixed point value.
*
* This function calculates the arc tangent of \a x; that is the value
* This function calculates the arc tangent of \a x; that is the value
* whose tangent is \a x.
*
* \return Returns the arc tangent in radians and the value is
* \return Returns the arc tangent in radians and the value is
* mathematically defined to be between -PI/2 and PI/2 (inclusive).
*
* \sa fixatan2
@@ -140,20 +140,20 @@ MG_EXPORT fixed fixatan (fixed x);
* \brief Calculates the arc tangent of two fixed point variables.
*
* This function calculates the arc tangent of the two variables \a x and \a y.
* It is similar to calculating the arc tangent of \a y / \a x, except that
* the signs of both arguments are used to determine the quadrant of the
* It is similar to calculating the arc tangent of \a y / \a x, except that
* the signs of both arguments are used to determine the quadrant of the
* result.
*
* \return Returns the result in radians, which is between -PI and PI
* \return Returns the result in radians, which is between -PI and PI
* (inclusive).
*
* \sa fixatan
*/
MG_EXPORT fixed fixatan2 (fixed y, fixed x);
extern MG_EXPORT fixed _cos_tbl[];
extern MG_EXPORT fixed _tan_tbl[];
extern MG_EXPORT fixed _acos_tbl[];
extern MG_EXPORT const fixed __mg_cos_tbl[];
extern MG_EXPORT const fixed __mg_tan_tbl[];
extern MG_EXPORT const fixed __mg_acos_tbl[];
/************************** inline fixed point math functions *****************/
/* ftofix and fixtof are used in generic C versions of fixmul and fixdiv */
@@ -162,7 +162,7 @@ extern MG_EXPORT fixed _acos_tbl[];
* \fn fixed ftofix (double x)
* \brief Converts a float point value to a fixed point value.
*
* This function converts the specified float point value \a x to
* This function converts the specified float point value \a x to
* a fixed point value.
*
* \note The float point should be ranged from -32767.0 to 32767.0.
@@ -171,7 +171,7 @@ extern MG_EXPORT fixed _acos_tbl[];
* \sa fixtof
*/
static inline fixed ftofix (double x)
{
{
if (x > 32767.0) {
errno = ERANGE;
return 0x7FFFFFFF;
@@ -182,21 +182,21 @@ static inline fixed ftofix (double x)
return -0x7FFFFFFF;
}
return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5));
return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5));
}
/**
* \fn double fixtof (fixed x)
* \brief Converts a fixed point value to a float point value.
*
* This function converts the specified fixed point value \a x to
* This function converts the specified fixed point value \a x to
* a float point value.
*
* \sa ftofix
*/
static inline double fixtof (fixed x)
{
return (double)x / 65536.0;
{
return (double)x / 65536.0;
}
@@ -209,7 +209,7 @@ static inline double fixtof (fixed x)
*
* \param x x,y: Two addends.
* \param y x,y: Two addends.
* \return The sum. If the result runs out of range of fixed point,
* \return The sum. If the result runs out of range of fixed point,
* this function sets \a errno to \a ERANGE.
*
* \sa fixsub
@@ -220,19 +220,19 @@ static inline fixed fixadd (fixed x, fixed y)
if (result >= 0) {
if ((x < 0) && (y < 0)) {
errno = ERANGE;
return -0x7FFFFFFF;
errno = ERANGE;
return -0x7FFFFFFF;
}
else
return result;
return result;
}
else {
if ((x > 0) && (y > 0)) {
errno = ERANGE;
return 0x7FFFFFFF;
errno = ERANGE;
return 0x7FFFFFFF;
}
else
return result;
return result;
}
}
@@ -240,13 +240,13 @@ static inline fixed fixadd (fixed x, fixed y)
* \fn fixed fixsub (fixed x, fixed y)
* \brief Subtract a fixed point value from another.
*
* This function subtracts the fixed point values \a y from the fixed
* This function subtracts the fixed point values \a y from the fixed
* point value \a x, and returns the difference.
*
* \param x The minuend.
* \param y The subtrahend.
*
* \return The difference. If the result runs out of range of fixed point,
* \return The difference. If the result runs out of range of fixed point,
* this function sets \a errno to \a ERANGE.
*
* \sa fixadd
@@ -257,33 +257,33 @@ static inline fixed fixsub (fixed x, fixed y)
if (result >= 0) {
if ((x < 0) && (y > 0)) {
errno = ERANGE;
return -0x7FFFFFFF;
errno = ERANGE;
return -0x7FFFFFFF;
}
else
return result;
return result;
}
else {
if ((x > 0) && (y < 0)) {
errno = ERANGE;
return 0x7FFFFFFF;
errno = ERANGE;
return 0x7FFFFFFF;
}
else
return result;
return result;
}
}
/**
* \fn fixed fixmul (fixed x, fixed y)
* \brief Returns the product of two fixed point values.
*
*
* This function returns the product of two fixed point values \a x and \a y.
*
* \param x The faciend.
* \param y The multiplicato.
* \return The prodcut. If the result runs out of range of fixed point,
* \return The prodcut. If the result runs out of range of fixed point,
* this function sets \a errno to \a ERANGE.
*
*
* \sa fixdiv
*/
MG_EXPORT fixed fixmul (fixed x, fixed y);
@@ -291,14 +291,14 @@ MG_EXPORT fixed fixmul (fixed x, fixed y);
/**
* \fn fixed fixdiv (fixed x, fixed y)
* \brief Returns the quotient of two fixed point values.
*
*
* This function returns the quotient of two fixed point values \a x and \a y.
*
* \param x The dividend.
* \param y The divisor.
* \return The quotient. If the result runs out of range of fixed point,
* \return The quotient. If the result runs out of range of fixed point,
* this function sets \a errno to \a ERANGE.
*
*
* \sa fixmul
*/
MG_EXPORT fixed fixdiv (fixed x, fixed y);
@@ -336,7 +336,7 @@ static inline int fixceil (fixed x)
* \sa fixtoi
*/
static inline fixed itofix (int x)
{
{
return x << 16;
}
@@ -349,61 +349,61 @@ static inline fixed itofix (int x)
* \sa itofix
*/
static inline int fixtoi (fixed x)
{
return (x >> 16) + ((x & 0x8000) >> 15);
{
return (x >> 16) + ((x & 0x8000) >> 15);
}
/**
* \fn fixed fixcos (fixed x)
* \brief Returns the cosine of a fixed point.
*
* This function returns the cosine of the fixed point \a x,
* This function returns the cosine of the fixed point \a x,
* where \a x is given in radians.
*
* \sa fixacos
*/
static inline fixed fixcos (fixed x)
{
return _cos_tbl[((x + 0x4000) >> 15) & 0x1FF];
return __mg_cos_tbl[((x + 0x4000) >> 15) & 0x1FF];
}
/**
* \fn fixed fixsin (fixed x)
* \brief Returns the sine of a fixed point.
*
* This function returns the sine of the fixed point \a x,
* This function returns the sine of the fixed point \a x,
* where \a x is given in radians.
*
* \sa fixasin
*/
static inline fixed fixsin (fixed x)
{
return _cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF];
{
return __mg_cos_tbl[((x - 0x400000 + 0x4000) >> 15) & 0x1FF];
}
/**
* \fn fixed fixtan (fixed x)
* \brief Returns the tangent of a fixed point.
*
* This function returns the tangent of the fixed point \a x,
* This function returns the tangent of the fixed point \a x,
* where \a x is given in radians.
*
* \sa fixcos, fixsin
*/
static inline fixed fixtan (fixed x)
{
return _tan_tbl[((x + 0x4000) >> 15) & 0xFF];
{
return __mg_tan_tbl[((x + 0x4000) >> 15) & 0xFF];
}
/**
* \fn fixed fixacos (fixed x)
* \brief Calculates and returns the arc cosine of a fixed point.
*
* This function calculates the arc cosine of the fixed point \a x;
* This function calculates the arc cosine of the fixed point \a x;
* that is the value whose cosine is \a x. If \a x falls outside
* the range -1 to 1, this function fails and \a errno is set to EDOM.
*
* \return Returns the arc cosine in radians and the value is mathematically
* \return Returns the arc cosine in radians and the value is mathematically
* defined to be between 0 and PI (inclusive).
*
* \sa fixcos
@@ -415,30 +415,30 @@ static inline fixed fixacos (fixed x)
return 0;
}
return _acos_tbl[(x+65536+127)>>8];
return __mg_acos_tbl[(x+65536+127)>>8];
}
/**
* \fn fixed fixasin (fixed x)
* \brief Calculates and returns the arc sine of a fixed point.
*
* This function calculates the arc sine of the fixed point \a x;
* This function calculates the arc sine of the fixed point \a x;
* that is the value whose sine is \a x. If \a x falls outside
* the range -1 to 1, this function fails and \a errno is set to EDOM.
*
* \return Returns the arc sine in radians and the value is mathematically
* \return Returns the arc sine in radians and the value is mathematically
* defined to be between -PI/2 and PI/2 (inclusive).
*
* \sa fixsin
*/
static inline fixed fixasin (fixed x)
{
{
if ((x < -65536) || (x > 65536)) {
errno = EDOM;
return 0;
}
return 0x00400000 - _acos_tbl[(x+65536+127)>>8];
return 0x00400000 - __mg_acos_tbl[(x+65536+127)>>8];
}
/** @} end of fixed_math_fns */
+5856 -1889
View File
File diff suppressed because it is too large Load Diff
+713 -415
View File
File diff suppressed because it is too large Load Diff
+1015 -1014
View File
File diff suppressed because it is too large Load Diff
+13 -2
View File
@@ -14,6 +14,7 @@ include $(abs_top_srcdir)/$(TARGET_RULES)
# Flags that can be set on the nmake command line:
# DEBUG=1 for compiling a debugging version
# PREFIX=Some/Directory Base directory for installation
# CONFIGH=YourConfigHeader for defining the mgconfig.h file to use
ifndef DEBUG
DEBUG=0
@@ -36,6 +37,8 @@ docdir = $(datadir)/doc/minigui
# The directory where the include files will be installed
libminiguiincludedir = $(includedir)/minigui
libmgextincludedir = $(includedir)/minigui
# Programs used by "make":
CP = cp
@@ -90,6 +93,14 @@ TIFF_LIBS = $(TIFF_NOLZW_LIBS)
ZLIB_CFLAGS = -I $(ZLIB)
ZLIB_LIBS = $(ZLIB)/zlib.lib
ifdef COMPILE_MGEXTLIB
MGEXT_CFLAGS = -D__MGEXT_LIB__
else
MGEXT_CFLAGS =
endif
MG_PRE_DEFINES = -D__MINIGUI_LIB__ $(MGEXT_CFLAGS)
#################################################################################
ifdef LOCAL_INC
@@ -108,10 +119,10 @@ endif
DEPLIBINC = -I$(DEPLIBDIR)/include
CFLAGS += $(OPTIMIZE) $(DEBUGINFO) $(DEPLIBINC) $(DEFINES) $(DEPCFLAGS) -c
CFLAGS += $(OPTIMIZE) $(DEBUGINFO) $(DEPLIBINC) $(INCLUDES) $(DEFINES) $(DEPCFLAGS) $(MG_PRE_DEFINES) -c
DEFS += -D__MINIGUI_LIB__ -D_REENTRANT
CFLAGS += -I$(abs_top_srcdir) -I$(abs_top_srcdir)/include -I$(abs_top_srcdir)/src/include $(INCLUDES) $(DEFS) $(INCS)
CFLAGS += -I$(abs_top_srcdir) $(INCLUDES) $(DEFS) $(INCS)
%.$(OBJ): %.c
$(CC) $(CFLAGS) $(COFLAG) $<
+444 -446
View File
File diff suppressed because it is too large Load Diff
+37 -38
View File
@@ -44,21 +44,20 @@
extern "C" {
#endif
typedef struct _GLYPHBUF
{
GLYPHMAPINFO* glyph_map; /* glyph info array */
int* glyphs; /* glyph array */
int glyphs_len; /* glyph array len or buffer used size */
typedef struct _ACHARBUF
{
ACHARMAPINFO* achar_map; /* achar info array */
Achar32* achars; /* achar array */
int achars_len; /* achar array len or buffer used size */
int blocksize; /* block size, a block is an allocate unit */
int glyphs_buffsize; /* glyph string buffer size */
int glyphmap_buffsize; /* glyph map buffer size */
} GLYPHBUF;
int achars_buffsize; /* achar string buffer size */
int acharmap_buffsize; /* achar map buffer size */
} ACHARBUF;
typedef struct tagBIDISLEDITDATA
{
StrBuffer str_content; // string text buffer
GLYPHBUF glyph_content; // glyph string buffer
ACHARBUF achar_content; // achar string buffer
int editPos; // current edit position
int selStart; // selection start position
@@ -92,48 +91,48 @@ typedef struct tagBIDISLEDITDATA
typedef BIDISLEDITDATA* PBIDISLEDITDATA;
static inline void*
glyphbuf_alloc (GLYPHBUF* glyph_buff, int len, int block_size)
acharbuf_alloc (ACHARBUF* achar_buff, int len, int block_size)
{
glyph_buff->glyphs_buffsize = (len + (block_size - len % block_size))
* sizeof (int);
glyph_buff->glyphs = malloc (glyph_buff->glyphs_buffsize);
achar_buff->achars_buffsize = (len + (block_size - len % block_size))
* sizeof (Achar32);
achar_buff->achars = malloc (achar_buff->achars_buffsize);
glyph_buff->glyphmap_buffsize = (len + (block_size - len % block_size))
* sizeof (GLYPHMAPINFO);
glyph_buff->glyph_map = malloc (glyph_buff->glyphmap_buffsize);
achar_buff->acharmap_buffsize = (len + (block_size - len % block_size))
* sizeof (ACHARMAPINFO);
achar_buff->achar_map = malloc (achar_buff->acharmap_buffsize);
glyph_buff->glyphs_len = len;
glyph_buff->blocksize = block_size;
achar_buff->achars_len = len;
achar_buff->blocksize = block_size;
return glyph_buff->glyphs;
return achar_buff->achars;
}
static inline void glyphbuf_free (GLYPHBUF *glyph_buff)
static inline void acharbuf_free (ACHARBUF *achar_buff)
{
if (glyph_buff) {
free (glyph_buff->glyphs);
free (glyph_buff->glyph_map);
if (achar_buff) {
free (achar_buff->achars);
free (achar_buff->achar_map);
}
}
static inline void* glyphbuf_realloc (GLYPHBUF *glyph_buff, int len)
static inline void* acharbuf_realloc (ACHARBUF *achar_buff, int len)
{
if (len * sizeof(int) > glyph_buff->glyphs_buffsize ||
len * sizeof(int) < glyph_buff->glyphs_buffsize - glyph_buff->blocksize) {
/* realloc glyph string mem */
glyph_buff->glyphs_buffsize = (len + (glyph_buff->blocksize -
len % glyph_buff->blocksize))* sizeof(int);
glyph_buff->glyphs = realloc (glyph_buff->glyphs,
glyph_buff->glyphs_buffsize);
if (len * sizeof(int) > achar_buff->achars_buffsize ||
len * sizeof(int) < achar_buff->achars_buffsize - achar_buff->blocksize) {
/* realloc achar string mem */
achar_buff->achars_buffsize = (len + (achar_buff->blocksize -
len % achar_buff->blocksize))* sizeof(Achar32);
achar_buff->achars = realloc (achar_buff->achars,
achar_buff->achars_buffsize);
/* realloc glyph map mem */
glyph_buff->glyphmap_buffsize = (len + (glyph_buff->blocksize -
len % glyph_buff->blocksize))* sizeof(GLYPHMAPINFO);
glyph_buff->glyph_map = realloc (glyph_buff->glyph_map,
glyph_buff->glyphmap_buffsize);
/* realloc achar map mem */
achar_buff->acharmap_buffsize = (len + (achar_buff->blocksize -
len % achar_buff->blocksize))* sizeof(ACHARMAPINFO);
achar_buff->achar_map = realloc (achar_buff->achar_map,
achar_buff->acharmap_buffsize);
}
return glyph_buff->glyphs;
return achar_buff->achars;
}
BOOL RegisterBIDISLEditControl (void);
+141 -141
View File
File diff suppressed because it is too large Load Diff
+168 -168
View File
File diff suppressed because it is too large Load Diff
+189 -189
View File
File diff suppressed because it is too large Load Diff
+217 -217
View File
File diff suppressed because it is too large Load Diff
+32 -32
View File
@@ -1,33 +1,33 @@
/*
* This file is part of MiniGUI, a mature cross-platform windowing
* This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Or,
*
*
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
*
*
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
*
*
* For more information about the commercial license, please refer to
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
@@ -56,7 +56,7 @@
#include "ctrlmisc.h"
#include "progressbar_impl.h"
static void pbarNormalizeParams (const CONTROL* pCtrl,
static void pbarNormalizeParams (const CONTROL* pCtrl,
PROGRESSDATA* pData, BOOL fNotify)
{
if (pData->nPos >= pData->nMax) {
@@ -72,8 +72,8 @@ static void pbarNormalizeParams (const CONTROL* pCtrl,
}
}
static void
pbarOnNewPos (const CONTROL* pCtrl,
static void
pbarOnNewPos (const CONTROL* pCtrl,
PROGRESSDATA* pData, unsigned int new_pos)
{
unsigned int old_pos;
@@ -97,32 +97,32 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
HDC hdc;
PCONTROL pCtrl;
PROGRESSDATA* pData;
pCtrl = gui_Control (hwnd);
pCtrl = gui_Control (hwnd);
switch (message)
{
case MSG_CREATE:
if (!(pData = malloc (sizeof (PROGRESSDATA)))) {
_MG_PRINTF ("CONTROL>ProgressBar: Create control failure!\n");
_WRN_PRINTF ("Create control failure!");
return -1;
}
pData->nMax = 100;
pData->nMin = 0;
pData->nPos = 0;
pData->nStepInc = 10;
pCtrl->dwAddData2 = (DWORD)pData;
break;
case MSG_DESTROY:
free ((void *)(pCtrl->dwAddData2));
break;
case MSG_NCPAINT:
return 0;
case MSG_GETDLGCODE:
return DLGC_STATIC;
@@ -135,8 +135,8 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PROGRESSDATA *data = (PROGRESSDATA *)pCtrl->dwAddData2;
hdc = BeginPaint (hwnd);
GetWindowInfo (hwnd)->we_rdr->draw_progress (hwnd,
hdc, data->nMax, data->nMin,
GetWindowInfo (hwnd)->we_rdr->draw_progress (hwnd,
hdc, data->nMax, data->nMin,
data->nPos, pCtrl->dwStyle & PBS_VERTICAL);
EndPaint (hwnd, hdc);
@@ -160,7 +160,7 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
InvalidateRect (hwnd, NULL, TRUE);
return PB_OKAY;
case PBM_SETSTEP:
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
if ((int)wParam > (int)(pData->nMax - pData->nMin))
@@ -168,39 +168,39 @@ ProgressBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
pData->nStepInc = wParam;
return PB_OKAY;
case PBM_SETPOS:
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
if (pData->nPos == wParam)
return PB_OKAY;
pbarOnNewPos (pCtrl, pData, wParam);
return PB_OKAY;
case PBM_DELTAPOS:
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
if (wParam == 0)
return PB_OKAY;
pbarOnNewPos (pCtrl, pData, pData->nPos + wParam);
return PB_OKAY;
case PBM_STEPIT:
pData = (PROGRESSDATA *)pCtrl->dwAddData2;
if (pData->nStepInc == 0)
return PB_OKAY;
pbarOnNewPos (pCtrl, pData, pData->nPos + pData->nStepInc);
return PB_OKAY;
case MSG_FONTCHANGED:
InvalidateRect (hwnd, NULL, TRUE);
break;
}
return DefaultControlProc (hwnd, message, wParam, lParam);
}
@@ -212,7 +212,7 @@ BOOL RegisterProgressBarControl (void)
WndClass.dwStyle = WS_NONE;
WndClass.dwExStyle = WS_EX_NONE;
WndClass.hCursor = GetSystemCursor (0);
WndClass.iBkColor =
WndClass.iBkColor =
GetWindowElementPixel (HWND_NULL, WE_MAINC_THREED_BODY);
WndClass.WinProc = ProgressBarCtrlProc;
+143 -144
View File
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -271,30 +271,30 @@ static void set_keyboard_layout(HWND hDlg)
}
#if 0
if (cur_type == GLYPH_TYPE_RTL) {
if (l_glyph_type == GLYPH_TYPE_RTL)
if (cur_type == CHAR_TYPE_RTL) {
if (l_char_type == CHAR_TYPE_RTL)
return INSERTPOS_BEFORE (sled, l_glyph_index);
else if (r_glyph_type == GLYPH_TYPE_RTL)
else if (r_char_type == CHAR_TYPE_RTL)
return INSERTPOS_AFTER (sled, r_glyph_index);
else
{
if (l_glyph_type == GLYPH_TYPE_LTR)
if (l_char_type == CHAR_TYPE_LTR)
return INSERTPOS_AFTER (sled, l_glyph_index);
else if (l_glyph_type == GLYPH_TYPE_LTR)
else if (l_char_type == CHAR_TYPE_LTR)
return INSERTPOS_BEFORE (sled, r_glyph_index);
else
return 0;
}
}
else {
if (l_glyph_type == GLYPH_TYPE_LTR)
if (l_char_type == CHAR_TYPE_LTR)
return INSERTPOS_AFTER (sled, l_glyph_index);
else if (r_glyph_type == GLYPH_TYPE_LTR)
else if (r_char_type == CHAR_TYPE_LTR)
return INSERTPOS_BEFORE (sled, r_glyph_index);
else {
if (l_glyph_type == GLYPH_TYPE_RTL)
if (l_char_type == CHAR_TYPE_RTL)
return INSERTPOS_BEFORE (sled, l_glyph_index);
else if (l_glyph_type == GLYPH_TYPE_RTL)
else if (l_char_type == CHAR_TYPE_RTL)
return INSERTPOS_AFTER (sled, r_glyph_index);
else
return 0;
+3 -3
View File
@@ -916,7 +916,7 @@ textdoc_insert_text (TextDoc *txtdoc, const char* newtext, int len)
/* insert last strings */
/* FIXME */
if (!nextnode) {
_MG_PRINTF ("CONTROL>TextEdit: (Warning) nextnode is NULL!\n");
_WRN_PRINTF ("nextnode is NULL!");
/* set_current_node (txtdoc, LASTNODE(txtdoc), FALSE, TRUE); */
}
else {
@@ -1446,7 +1446,7 @@ static int get_line_nr (HWND hWnd, PTEDATA ptedata, TextNode *node, int indent)
HDC hdc;
if (!node) {
_MG_PRINTF ("CONTROL>TextEdit: (Warning) pass NULL text node to get_line_nr\n");
_WRN_PRINTF ("pass NULL text node to get_line_nr");
return 0;
}
@@ -1571,7 +1571,7 @@ set_line_width (HWND hWnd, PTEDATA ptedata, TextNode *node, int indent)
HDC hdc;
if (!node) {
_MG_PRINTF ("CONTROL>TextEdit: (Warning) pass NULL text node to set_line_width\n");
_WRN_PRINTF ("pass NULL text node to set_line_width");
return -1;
}
+64 -64
View File
@@ -1,33 +1,33 @@
/*
* This file is part of MiniGUI, a mature cross-platform windowing
* This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Or,
*
*
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
*
*
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
*
*
* For more information about the commercial license, please refer to
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
@@ -64,13 +64,13 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
win_rdr = GetWindowInfo(hwnd)->we_rdr;
if (!win_rdr) {
_MG_PRINTF ("CONTROL>TrackBar: window renderer is NULL.\n");
_WRN_PRINTF ("window renderer is NULL");
return;
}
GetClientRect (hwnd, &rc_client);
win_rdr->draw_trackbar (hwnd, hdc, (LFRDR_TRACKBARINFO *)pData);
win_rdr->draw_trackbar (hwnd, hdc, (LFRDR_TRACKBARINFO *)pData);
/* draw the tip of trackbar. */
if ((dwStyle & TBS_TIP) && !(dwStyle & TBS_VERTICAL)) {
@@ -79,7 +79,7 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
RECT rc_bar, rc_border;
int sliderh, EndTipLen, x, y, w, h;
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
dwStyle, &rc_client, NULL, &rc_bar, &rc_border);
sliderh = RECTH (rc_bar);
@@ -88,23 +88,23 @@ static void TrackBarOnDraw (HWND hwnd, HDC hdc, TRACKBARDATA* pData, DWORD dwSty
w = RECTW (rc_border);
h = RECTH (rc_border);
SelectFont (hdc, (PLOGFONT)GetWindowElementAttr
SelectFont (hdc, (PLOGFONT)GetWindowElementAttr
(hwnd, WE_FONT_TOOLTIP));
SetBkMode (hdc, BM_TRANSPARENT);
SetBkColor (hdc, GetWindowBkColor (hwnd));
SetTextColor (hdc, GetWindowElementPixel (hwnd, WE_FGC_THREED_BODY));
TextOut (hdc, x + 1, y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER,
TextOut (hdc, x + 1, y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER,
pData->sStartTip);
GetTextExtent (hdc, pData->sEndTip, -1, &text_ext);
EndTipLen = text_ext.cx + 4;
TextOut (hdc, (EndTipLen > (w>>1) - 20 ? x + (w>>1) + 20 : x + w -EndTipLen),
y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER, pData->sEndTip);
TextOut (hdc, (EndTipLen > (w>>1) - 20 ? x + (w>>1) + 20 : x + w -EndTipLen),
y + (h>>1) - (sliderh>>1) - GAP_TIP_SLIDER, pData->sEndTip);
sprintf (sPos, "%d", pData->nPos);
GetTextExtent (hdc, sPos, -1, &text_ext);
TextOut (hdc, x + ((w - text_ext.cx) >> 1),
TextOut (hdc, x + ((w - text_ext.cx) >> 1),
y + (h>>1) -(sliderh>>1) - GAP_TIP_SLIDER, sPos);
}
}
@@ -137,23 +137,23 @@ static void SetSliderPos (const CONTROL* pCtrl, int new_pos)
RECT rc_client, old_slider, new_slider;
if (new_pos > pData->nMax)
new_pos = pData->nMax;
new_pos = pData->nMax;
if (new_pos < pData->nMin)
new_pos = pData->nMin;
new_pos = pData->nMin;
if (pData->nPos == new_pos)
if (pData->nPos == new_pos)
return;
GetClientRect ((HWND)pCtrl, &rc_client);
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
pCtrl->dwStyle, &rc_client, NULL, &old_slider, NULL);
pData->nPos = new_pos;
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
pCtrl->we_rdr->calc_trackbar_rect ((HWND)pCtrl, (LFRDR_TRACKBARINFO *)pData,
pCtrl->dwStyle, &rc_client, NULL, &new_slider, NULL);
if (pCtrl->dwStyle & TBS_TIP) {
@@ -180,7 +180,7 @@ static int NormalizeMousePos (HWND hwnd, TRACKBARDATA* pData, int mousepos)
dwStyle = GetWindowStyle (hwnd);
win_rdr = GetWindowInfo(hwnd)->we_rdr;
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
win_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
dwStyle, &rcClient, NULL, &rcBar, NULL);
if (dwStyle & TBS_VERTICAL) {
@@ -212,12 +212,12 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
PCONTROL pCtrl;
TRACKBARDATA* pData;
pCtrl = gui_Control (hwnd);
switch (message)
{
case MSG_CREATE:
if (!(pData = malloc (sizeof (TRACKBARDATA)))) {
_MG_PRINTF ("CONTROL>TrackBar: Create control failure!\n");
_WRN_PRINTF ("Create control failure!");
return -1;
}
pData->nMax = 10;
@@ -230,14 +230,14 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
pData->nTickFreq = 1;
pCtrl->dwAddData2 = (DWORD)pData;
break;
case MSG_DESTROY:
free((void *)(pCtrl->dwAddData2));
break;
case MSG_NCPAINT:
return 0;
case MSG_GETTEXTLENGTH:
case MSG_GETTEXT:
case MSG_SETTEXT:
@@ -272,15 +272,15 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
return 0;
}
case TBM_GETMIN:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nMin;
case TBM_GETMAX:
case TBM_GETMAX:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nMax;
case TBM_SETMIN:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
@@ -292,7 +292,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
pData->nPos = pData->nMin;
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
return 0;
case TBM_SETMAX:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
@@ -304,7 +304,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
pData->nPos = pData->nMax;
SendMessage (hwnd, TBM_SETPOS, pData->nPos, 0);
return 0;
case TBM_SETLINESIZE:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
if (wParam > (pData->nMax - pData->nMin))
@@ -315,26 +315,26 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
case TBM_GETLINESIZE:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nLineSize;
case TBM_SETPAGESIZE:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
if (wParam > (pData->nMax - pData->nMin))
return -1;
pData->nPageSize = wParam;
return 0;
case TBM_GETPAGESIZE:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nPageSize;
case TBM_SETPOS:
SetSliderPos (pCtrl, wParam);
return 0;
case TBM_GETPOS:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nPos;
case TBM_SETTICKFREQ:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
if (wParam > (pData->nMax - pData->nMin))
@@ -346,10 +346,10 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
case TBM_GETTICKFREQ:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
return pData->nTickFreq;
case TBM_SETTIP:
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
if (wParam)
if (wParam)
strncpy(pData->sStartTip, (char *) wParam, TBLEN_TIP);
if (lParam)
strncpy (pData->sEndTip, (char *) lParam, TBLEN_TIP);
@@ -363,19 +363,19 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
if (lParam)
strcpy ((char *) lParam, pData->sEndTip);
return 0;
case MSG_SETFOCUS:
if (pCtrl->dwStyle & TBS_FOCUS)
break;
pCtrl->dwStyle |= TBS_FOCUS;
InvalidateRect (hwnd, NULL, TRUE);
break;
case MSG_KILLFOCUS:
pCtrl->dwStyle &= ~TBS_FOCUS;
InvalidateRect (hwnd, NULL, TRUE);
break;
case MSG_GETDLGCODE:
return DLGC_WANTARROWS;
@@ -406,21 +406,21 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
case SCANCODE_CURSORBLOCKLEFT:
SetSliderPos (pCtrl, pData->nPos - pData->nLineSize);
break;
case SCANCODE_PAGEDOWN:
SetSliderPos (pCtrl, pData->nPos - pData->nPageSize);
break;
case SCANCODE_PAGEUP:
SetSliderPos (pCtrl, pData->nPos + pData->nPageSize);
break;
case SCANCODE_HOME:
pData->nPos = pData->nMin;
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
InvalidateRect (hwnd, NULL, TRUE);
break;
case SCANCODE_END:
pData->nPos = pData->nMax;
TrackBarNormalizeParams (pCtrl, pData, pCtrl->dwStyle & TBS_NOTIFY);
@@ -433,9 +433,9 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
if (GetCapture() != hwnd) {
int mouseX = LOSWORD(lParam);
int mouseY = HISWORD(lParam);
/** set state to press slider */
pCtrl->dwStyle |= LFRDR_TBS_PRESSED;
/** set state to press slider */
pCtrl->dwStyle |= LFRDR_TBS_PRESSED;
SetCapture (hwnd);
@@ -448,7 +448,7 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
(pCtrl->dwStyle & TBS_VERTICAL)?mouseY:mouseX));
}
break;
case MSG_MOUSEMOVE:
{
/** hilite slider */
@@ -461,16 +461,16 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
pData = (TRACKBARDATA *)pCtrl->dwAddData2;
GetClientRect (hwnd, &rc_client);
pCtrl->we_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
pCtrl->we_rdr->calc_trackbar_rect (hwnd, (LFRDR_TRACKBARINFO *)pData,
pCtrl->dwStyle, &rc_client, NULL, &rc_slider, NULL);
if (GetCapture() == hwnd)
{
ScreenToClient (hwnd, &mouseX, &mouseY);
if (PtInRect (&rc_slider, mouseX, mouseY))
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
else
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
else
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
}
else
{
@@ -479,16 +479,16 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
/** avoid twinkle by valid redraw */
if (!(pCtrl->dwStyle & LFRDR_TBS_HILITE))
{
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
pCtrl->dwStyle |= LFRDR_TBS_HILITE;
InvalidateRect (hwnd, NULL, TRUE);
}
}
else
else
{
/** avoid twinkle by valid redraw */
if (pCtrl->dwStyle & LFRDR_TBS_HILITE)
{
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
pCtrl->dwStyle &= ~LFRDR_TBS_HILITE;
InvalidateRect (hwnd, NULL, TRUE);
}
}
@@ -503,8 +503,8 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
case MSG_LBUTTONUP:
if (GetCapture() == hwnd) {
/** set state to press slider */
pCtrl->dwStyle &= ~LFRDR_TBS_PRESSED;
/** set state to press slider */
pCtrl->dwStyle &= ~LFRDR_TBS_PRESSED;
ReleaseCapture ();
NotifyParent ((HWND)pCtrl, pCtrl->id, TBN_STOPDRAG);
@@ -512,15 +512,15 @@ static LRESULT TrackBarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
InvalidateRect (hwnd, NULL, TRUE);
}
break;
case MSG_FONTCHANGED:
InvalidateRect (hwnd, NULL, TRUE);
return 0;
default:
break;
break;
}
return DefaultControlProc (hwnd, message, wParam, lParam);
}
+18 -18
View File
@@ -216,7 +216,7 @@ static int LWZReadByte (MG_RWops *area, int flag, int input_code_size)
while (code >= clear_code) {
*sp++ = table[1][code];
if (code == table[0][code]) {
_MG_PRINTF ("EX_CTRL>GIF89a: circular table entry\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: circular table entry\n");
return -1;
}
code = table[0][code];
@@ -259,7 +259,7 @@ static int GetCode(MG_RWops *area, int code_size, int flag)
if ((curbit + code_size) >= lastbit) {
if (done) {
if (curbit >= lastbit)
_MG_PRINTF ("EX_CTRL>GIF89a: bad decode\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: bad decode\n");
return -1;
}
buf[0] = buf[last_byte - 2];
@@ -362,7 +362,7 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
version [3] = '\0';
if (strcmp ((const char*)version, "87a") != 0 && strcmp ((const char*)version, "89a") != 0) {
_MG_PRINTF ("EX_CTRL>GIF89a: GIF version number not 87a or 89a.\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: GIF version number not 87a or 89a.\n");
return -1; /* image loading error*/
}
@@ -373,7 +373,7 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
GifScreen->disposal = 0;
if (!ReadOK (area, buf, 7)) {
_MG_PRINTF ("EX_CTRL>GIF89a: bad screen descriptor\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: bad screen descriptor\n");
return -1; /* image loading error*/
}
GifScreen->Width = LM_to_uint (buf[0], buf[1]);
@@ -384,10 +384,10 @@ static int ReadGIFGlobal (MG_RWops *area, GIFSCREEN* GifScreen)
GifScreen->AspectRatio = buf[6];
if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */
_MG_PRINTF ("EX_CTRL>GIF89a: have global colormap: %d\n",
_WRN_PRINTF ("EX_CTRL>GIF89a: have global colormap: %d\n",
GifScreen->Background);
if (ReadColorMap (area, GifScreen->BitPixel, GifScreen->ColorMap)) {
_MG_PRINTF ("EX_CTRL>GIF89a: bad global colormap\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: bad global colormap\n");
return -1; /* image loading error*/
}
}
@@ -399,7 +399,7 @@ static int ReadImageDesc (MG_RWops *area, IMAGEDESC* ImageDesc, GIFSCREEN* GifSc
{
unsigned char buf[16];
if (!ReadOK (area, buf, 9)) {
_MG_PRINTF ("EX_CTRL>GIF89a: bad image size\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: bad image size\n");
return -1;
}
@@ -414,9 +414,9 @@ static int ReadImageDesc (MG_RWops *area, IMAGEDESC* ImageDesc, GIFSCREEN* GifSc
ImageDesc->interlace = BitSet(buf[8], INTERLACE);
if (ImageDesc->haveColorMap) {
_MG_PRINTF ("EX_CTRL>GIF89a: have local colormap\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: have local colormap\n");
if (ReadColorMap (area, ImageDesc->bitPixel, ImageDesc->ColorMap) < 0) {
_MG_PRINTF ("EX_CTRL>GIF89a: bad local colormap\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: bad local colormap\n");
return -1;
}
} else {
@@ -437,12 +437,12 @@ static int ReadImage (MG_RWops* area, MYBITMAP* bmp, IMAGEDESC* ImageDesc, GIFSC
* initialize the compression routines
*/
if (!ReadOK (area, &c, 1)) {
_MG_PRINTF ("EX_CTRL>GIF89a: eof on image data\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: eof on image data\n");
return -1;
}
if (LWZReadByte (area, TRUE, c) < 0) {
_MG_PRINTF ("EX_CTRL>GIF89a: error reading image\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: error reading image\n");
return -1;
}
@@ -549,11 +549,11 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
anim->bk.a = 0;
}
_MG_PRINTF ("EX_CTRL>GIF89a: Background: %d, %d, %d.\n",
_WRN_PRINTF ("EX_CTRL>GIF89a: Background: %d, %d, %d.\n",
anim->bk.r, anim->bk.g, anim->bk.b);
if ((ok = ReadOK (area, &c, 1)) == 0) {
_MG_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
goto error;
}
@@ -561,11 +561,11 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
switch (c) {
case '!':
if ( (ok = ReadOK (area, &c, 1)) == 0) {
_MG_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: EOF on image data\n");
goto error;
}
DoExtension (area, c, &GifScreen);
_MG_PRINTF ("EX_CTRL>GIF89a: Extension info: %d, %d, %d, %d, %d, %d\n",
_WRN_PRINTF ("EX_CTRL>GIF89a: Extension info: %d, %d, %d, %d, %d, %d\n",
GifScreen.Width, GifScreen.Height,
GifScreen.AspectRatio, GifScreen.delayTime,
GifScreen.disposal, GifScreen.transparent);
@@ -579,7 +579,7 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
if (ReadImage (area, &mybmp, &ImageDesc, &GifScreen, 0) < 0)
goto error;
}
_MG_PRINTF ("EX_CTRL>GIF89a: Image Descriptor: %d, %d, %d, %d, %d\n",
_WRN_PRINTF ("EX_CTRL>GIF89a: Image Descriptor: %d, %d, %d, %d, %d\n",
ImageDesc.Top, ImageDesc.Left,
ImageDesc.Width, ImageDesc.Height,
ImageDesc.haveColorMap);
@@ -595,14 +595,14 @@ ANIMATION* CreateAnimationFromGIF89a (HDC hdc, MG_RWops* area)
frame->width = mybmp.w;
frame->height = mybmp.h;
frame->delay_time = (GifScreen.delayTime>10)?GifScreen.delayTime:10;
_MG_PRINTF ("EX_CTRL>GIF89a: frame info: %d, %d, %d, %d\n",
_WRN_PRINTF ("EX_CTRL>GIF89a: frame info: %d, %d, %d, %d\n",
frame->off_x, frame->off_y, frame->delay_time,
GifScreen.transparent);
if ((frame->mem_dc = CreateMemDCFromMyBitmap (&mybmp, ImageDesc.ColorMap)) == 0) {
free (mybmp.bits);
free (frame);
_MG_PRINTF ("EX_CTRL>GIF89a: Error when expand frame bitmap.\n");
_WRN_PRINTF ("EX_CTRL>GIF89a: Error when expand frame bitmap.\n");
goto error;
}
frame->bits = mybmp.bits;
+1 -1
View File
@@ -1108,7 +1108,7 @@ void GridCellTypeNumber_set_text_value(gvGridCellData* cell, int row, int col, c
if (INF[0] != 'I' && INF[0] != 'i')
cell->data.number.num = number;
else
_MG_PRINTF ("EX_CTRL>Grid: The inputed number is too big!\n");
_WRN_PRINTF ("EX_CTRL>Grid: The inputed number is too big!\n");
}
double GridCellTypeNumber_get_double_value(gvGridCellData* cell, int row, int col)
-1
View File
@@ -1,5 +1,4 @@
abs_top_srcdir=../..
LOCAL_INC=-I$(abs_top_srcdir)/src/control/
include Makefile.am
include ../../rules.make
+13 -7
View File
@@ -1458,7 +1458,6 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
rctop = rc.top;
if (mouseX <= right && mouseX >= left && (p != pData->pItemSelected) ) {
PLOGFONT logfont;
c = getCountFromItem (pData, pData->pItemSelected);
c = c - pData->nItemTop - 1;
if (c < 0)
@@ -1471,12 +1470,15 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
rc.top += TV_BORDER;
rc.bottom = rc.top + pData->nItemHeight;
/*bugfix: 4864, zhaochengzhang*/
/* VincentWei: do not depend on logfont style
PLOGFONT logfont;
//bugfix: 4864, zhaochengzhang
logfont = GetWindowFont(hwnd);
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
rc.left--; rc.top--;
rc.right++; rc.bottom++;
}
*/
InvalidateRect (hwnd, &rc, TRUE);
rc.top = rctop + (count - pData->nItemTop - 1) * pData->nItemHeight;
@@ -1484,17 +1486,18 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
rc.top += TV_BORDER;
rc.bottom = rc.top + pData->nItemHeight;
/*bugfix: 4864 zhaochengzhang*/
/* VincentWei: do not depend on logfont style
//bugfix: 4864 zhaochengzhang
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
rc.left--; rc.top--;
rc.right++; rc.bottom++;
}
}
*/
InvalidateRect (hwnd, &rc, TRUE);
NotifyParent (hwnd, pData->id, TVN_CLICKED);
}
if (mouseX <= left + h && mouseX >= left) {
PLOGFONT logfont;
if (p->child == NULL)
break;
@@ -1518,13 +1521,16 @@ static LRESULT TreeViewCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM
tvSetVScrollInfo (hwnd, pData, TRUE);
tvSetHScrollInfo (hwnd, pData, TRUE);
rc.bottom = rcClient.bottom;
/*bugfix: 4864 zhaochengzhang*/
/* VincentWei: do not depend on the logfont style
PLOGFONT logfont;
//bugfix: 4864 zhaochengzhang
logfont = GetWindowFont(hwnd);
if (logfont->style & (FS_WEIGHT_BOOK | FS_WEIGHT_LIGHT)) {
rc.left--; rc.top--;
rc.right++; rc.bottom++;
}
*/
InvalidateRect (hwnd, &rc, TRUE);
NotifyParent (hwnd, pData->id, TVN_CLICKED);
}
+32 -8
View File
@@ -2,22 +2,46 @@ SUBDIRS = in-core
noinst_LTLIBRARIES = libfont.la
SRC_FILES = charset.c charset-arabic.c charset-bidi.c \
SRC_FILES = charset.c charset-arabic.c legacy-bidi.c charset-unicode.c \
unicode-comp.c unicode-script.c language-code.c \
sysfont.c logfont.c devfont.c fontname.c \
rawbitmap.c varbitmap.c qpf.c upf.c \
fontcache.c freetype1.c freetype2.c font-engines.c\
nullfont.c rawbitmap.c varbitmap.c qpf.c upf.c \
fontcache.c freetype2.c font-engines.c\
gbunimap.c gbkunimap.c gb18030unimap.c big5unimap.c \
ujisunimap.c sjisunimap.c euckrunimap.c \
textops.c mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
bitmapfont.c scripteasy.c
textops.c \
mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
bitmapfont.c scripteasy.c \
unicode-emoji.c unicode-vop.c \
unicode-bidi.c \
unicode-break.c unicode-break-arabic.c unicode-break-indic.c unicode-break-thai.c \
unicode-joining-types.c unicode-joining.c unicode-shape.c \
unicode-shape-arabic.c harzbuff-minigui-funcs.c \
unicode-iterators.c
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype1.h freetype2.h qpf.h \
upf.h bitmapfont.h gunichartables.h se_minigui.h unicode-bidi-tables.h
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype2.h qpf.h se_minigui.h \
upf.h bitmapfont.h unicode-bidi-tables.h \
unicode-tables.h unicode-break-tables.h unicode-script-table.h \
unicode-decomp.h unicode-comp.h \
unicode-emoji-tables.h \
legacy-bidi-tables.inc \
unicode-bidi.h unicode-vop-table.inc \
unicode-joining-types-list.inc \
unicode-joining-type-table.inc \
unicode-arabic-shaping-table.inc \
unicode-arabic-misc-table.inc \
unicode-bidi-bidi-types-list.inc \
unicode-bidi-bidi-type-table.inc \
unicode-bidi-brackets-table.inc \
unicode-bidi-brackets-type-table.inc \
unicode-bidi-mirroring-table.inc \
script-language-table.inc \
emoji_presentation_scanner.inc
EXTRA_DIST = convgbmap.c jisunimap.c $(SRC_FILES) $(HDR_FILES) \
makefile.ng makefile.msvc
AM_CPPFLAGS = $(FT1_INC_DIR) $(FT2_INC_DIR)
AM_CPPFLAGS = $(FT2_INC_DIR) $(HB_INC_DIR)
AM_CPPFLAGS += -I$(abs_top_srcdir)/src/include -I$(abs_top_srcdir)/include
libfont_la_SOURCES = $(SRC_FILES) $(HDR_FILES)
+96 -91
View File
File diff suppressed because it is too large Load Diff
+207 -194
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+391 -1156
View File
File diff suppressed because it is too large Load Diff
+291 -92
View File
File diff suppressed because it is too large Load Diff
+284
View File
@@ -0,0 +1,284 @@
#line 1 "emoji_presentation_scanner.rl"
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#line 9 "emoji_presentation_scanner.c"
static const char _emoji_presentation_actions[] = {
0, 1, 0, 1, 1, 1, 5, 1,
6, 1, 7, 1, 8, 1, 9, 1,
10, 1, 11, 2, 2, 3, 2, 2,
4
};
static const char _emoji_presentation_key_offsets[] = {
0, 5, 7, 14, 18, 20, 21, 24,
29, 30, 34, 36
};
static const unsigned char _emoji_presentation_trans_keys[] = {
3u, 7u, 13u, 0u, 2u, 14u, 15u, 2u,
3u, 6u, 7u, 13u, 0u, 1u, 9u, 10u,
11u, 12u, 10u, 12u, 10u, 4u, 10u, 12u,
4u, 9u, 10u, 11u, 12u, 6u, 9u, 10u,
11u, 12u, 8u, 10u, 9u, 10u, 11u, 12u,
14u, 0
};
static const char _emoji_presentation_single_lengths[] = {
3, 2, 5, 4, 2, 1, 3, 5,
1, 4, 2, 5
};
static const char _emoji_presentation_range_lengths[] = {
1, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
static const char _emoji_presentation_index_offsets[] = {
0, 5, 8, 15, 20, 23, 25, 29,
35, 37, 42, 45
};
static const char _emoji_presentation_indicies[] = {
2, 1, 1, 1, 0, 4, 5, 3,
7, 8, 10, 11, 12, 6, 9, 5,
13, 14, 15, 0, 13, 15, 16, 13,
16, 15, 13, 15, 16, 15, 5, 13,
14, 15, 16, 5, 17, 5, 13, 14,
18, 17, 5, 13, 16, 5, 13, 14,
15, 4, 16, 0
};
static const char _emoji_presentation_trans_targs[] = {
2, 4, 6, 2, 1, 2, 3, 3,
7, 2, 8, 9, 11, 0, 2, 5,
2, 2, 10
};
static const char _emoji_presentation_trans_actions[] = {
17, 19, 19, 15, 0, 7, 22, 19,
19, 9, 0, 22, 19, 0, 5, 19,
11, 13, 19
};
static const char _emoji_presentation_to_state_actions[] = {
0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
static const char _emoji_presentation_from_state_actions[] = {
0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 0, 0
};
static const char _emoji_presentation_eof_trans[] = {
1, 4, 0, 1, 17, 17, 17, 17,
18, 18, 17, 17
};
static const int emoji_presentation_start = 2;
static const int emoji_presentation_en_text_and_emoji_run = 2;
#line 9 "emoji_presentation_scanner.rl"
#line 78 "emoji_presentation_scanner.rl"
static emoji_text_iter_t
scan_emoji_presentation (emoji_text_iter_t p,
const emoji_text_iter_t pe,
bool* is_emoji)
{
emoji_text_iter_t ts, te;
const emoji_text_iter_t eof = pe;
unsigned act;
int cs;
#line 107 "emoji_presentation_scanner.c"
{
cs = emoji_presentation_start;
ts = 0;
te = 0;
act = 0;
}
#line 115 "emoji_presentation_scanner.c"
{
int _klen;
unsigned int _trans;
const char *_acts;
unsigned int _nacts;
const unsigned char *_keys;
if ( p == pe )
goto _test_eof;
_resume:
_acts = _emoji_presentation_actions + _emoji_presentation_from_state_actions[cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 1:
#line 1 "NONE"
{ts = p;}
break;
#line 134 "emoji_presentation_scanner.c"
}
}
_keys = _emoji_presentation_trans_keys + _emoji_presentation_key_offsets[cs];
_trans = _emoji_presentation_index_offsets[cs];
_klen = _emoji_presentation_single_lengths[cs];
if ( _klen > 0 ) {
const unsigned char *_lower = _keys;
const unsigned char *_mid;
const unsigned char *_upper = _keys + _klen - 1;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + ((_upper-_lower) >> 1);
if ( (*p) < *_mid )
_upper = _mid - 1;
else if ( (*p) > *_mid )
_lower = _mid + 1;
else {
_trans += (unsigned int)(_mid - _keys);
goto _match;
}
}
_keys += _klen;
_trans += _klen;
}
_klen = _emoji_presentation_range_lengths[cs];
if ( _klen > 0 ) {
const unsigned char *_lower = _keys;
const unsigned char *_mid;
const unsigned char *_upper = _keys + (_klen<<1) - 2;
while (1) {
if ( _upper < _lower )
break;
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
if ( (*p) < _mid[0] )
_upper = _mid - 2;
else if ( (*p) > _mid[1] )
_lower = _mid + 2;
else {
_trans += (unsigned int)((_mid - _keys)>>1);
goto _match;
}
}
_trans += _klen;
}
_match:
_trans = _emoji_presentation_indicies[_trans];
_eof_trans:
cs = _emoji_presentation_trans_targs[_trans];
if ( _emoji_presentation_trans_actions[_trans] == 0 )
goto _again;
_acts = _emoji_presentation_actions + _emoji_presentation_trans_actions[_trans];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 )
{
switch ( *_acts++ )
{
case 2:
#line 1 "NONE"
{te = p+1;}
break;
case 3:
#line 74 "emoji_presentation_scanner.rl"
{act = 2;}
break;
case 4:
#line 75 "emoji_presentation_scanner.rl"
{act = 3;}
break;
case 5:
#line 73 "emoji_presentation_scanner.rl"
{te = p+1;{ *is_emoji = false; return te; }}
break;
case 6:
#line 74 "emoji_presentation_scanner.rl"
{te = p+1;{ *is_emoji = true; return te; }}
break;
case 7:
#line 75 "emoji_presentation_scanner.rl"
{te = p+1;{ *is_emoji = false; return te; }}
break;
case 8:
#line 74 "emoji_presentation_scanner.rl"
{te = p;p--;{ *is_emoji = true; return te; }}
break;
case 9:
#line 75 "emoji_presentation_scanner.rl"
{te = p;p--;{ *is_emoji = false; return te; }}
break;
case 10:
#line 74 "emoji_presentation_scanner.rl"
{{p = ((te))-1;}{ *is_emoji = true; return te; }}
break;
case 11:
#line 1 "NONE"
{ switch( act ) {
case 2:
{{p = ((te))-1;} *is_emoji = true; return te; }
break;
case 3:
{{p = ((te))-1;} *is_emoji = false; return te; }
break;
}
}
break;
#line 248 "emoji_presentation_scanner.c"
}
}
_again:
_acts = _emoji_presentation_actions + _emoji_presentation_to_state_actions[cs];
_nacts = (unsigned int) *_acts++;
while ( _nacts-- > 0 ) {
switch ( *_acts++ ) {
case 0:
#line 1 "NONE"
{ts = 0;}
break;
#line 261 "emoji_presentation_scanner.c"
}
}
if ( ++p != pe )
goto _resume;
_test_eof: {}
if ( p == eof )
{
if ( _emoji_presentation_eof_trans[cs] > 0 ) {
_trans = _emoji_presentation_eof_trans[cs] - 1;
goto _eof_trans;
}
}
}
#line 94 "emoji_presentation_scanner.rl"
/* Should not be reached. */
ts = ts + 0; // suppress compilation warning.
*is_emoji = false;
return pe;
}
+15 -11
View File
@@ -1,45 +1,48 @@
/*
* This file is part of MiniGUI, a mature cross-platform windowing
* This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
*
*
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Or,
*
*
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
*
*
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
*
*
* For more information about the commercial license, please refer to
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
#include "common.h"
#include "minigui.h"
#include "gdi.h"
typedef struct {
char* type;
FONTOPS* ops;
char* type;
FONTOPS* ops;
}FONTOPS_INFO;
extern FONTOPS __mg_null_font_ops;
#ifdef _MGFONT_RBF
extern FONTOPS __mg_rbf_ops;
#endif
@@ -61,6 +64,7 @@ extern FONTOPS __mg_ttf_ops;
#endif
FONTOPS_INFO __mg_fontops_infos[] = {
{FONT_TYPE_NAME_BITMAP_NUF, &__mg_null_font_ops},
#ifdef _MGFONT_RBF
{FONT_TYPE_NAME_BITMAP_RAW, &__mg_rbf_ops},
#endif
+36 -56
View File
@@ -43,40 +43,28 @@
#include "common.h"
#ifdef _MGFONT_TTF_CACHE
#if defined(_MGFONT_FT2) && defined(_MGFONT_TTF_CACHE)
#include "minigui.h"
#include "gdi.h"
#ifdef _MGFONT_TTF
#include <freetype/freetype.h>
#include <freetype/ftxkern.h>
#include <freetype/ftnameid.h>
#include <freetype/ftxcmap.h>
#include <freetype/ftxwidth.h>
#include "freetype.h"
#else
#include "freetype2.h"
#endif
typedef struct _MemBlk
{
typedef struct _MemBlk {
void *data;
int len;
struct _MemBlk *hashPrev;
struct _MemBlk *hashNext;
struct _MemBlk *lruPrev;
struct _MemBlk *lruNext;
}MemBlk;
} MemBlk;
typedef MemBlk LruQueueDummyHead;
typedef MemBlk HashQueueDummyHead;
/* hash directory array in every cache */
typedef struct _HashDirectory
{
typedef struct _HashDirectory {
HashQueueDummyHead hashHead;
}HashDirectory;
} HashDirectory;
/* The structure is description of Cache
blkSize : the size of each block in cache(in byte)
@@ -88,14 +76,12 @@ typedef struct _HashDirectory
*hashDir : the hash directory pointer
lruQueueDummyHead : head node of lru queue
makeHashKeyFunc : the function which make hash key */
typedef struct cache
{
typedef struct _FontCache {
/* Information about font */
char df_name[LEN_UNIDEVFONT_NAME + 1];
int style;
int fontsize;
int rotation;
int refers;
int blkSize;
int nBlk;
@@ -105,7 +91,7 @@ typedef struct cache
HashDirectory *hashDir;
LruQueueDummyHead lruQueueDummyHead;
MakeHashKeyFunc makeHashKeyFunc;
}cache_t;
} FontCache;
/* Least-Recently-Used-Order
global cache LRU queue */
@@ -113,7 +99,7 @@ typedef struct _CacheQueueNode
{
/* hold global cache queue
max cache node maybe 10 */
cache_t cache;
FontCache cache;
struct _CacheQueueNode *prevCache;
struct _CacheQueueNode *nextCache;
}CacheQueueNode;
@@ -126,8 +112,7 @@ typedef struct _CacheQueueNode
cacheSize : each cache's size(in BYTE and
everyone has the same size!)
nCache : how many cache Now!! */
struct _CacheSystem
{
struct _CacheSystem {
CacheQueueNode queueDummyHead;
int maxCache;
@@ -152,7 +137,7 @@ AppendCache(CacheQueueNode *new)
/* create a new LRU-Queue. */
static int
CreateCacheLruQueue(cache_t *cache, int nblk)
CreateCacheLruQueue(FontCache *cache, int nblk)
{
int i;
MemBlk *blk;
@@ -224,7 +209,7 @@ InitCache(CacheQueueNode *new, int ndir, int nblock)
static void
LruQueueBufferSplit(cache_t *cache, int bufsize)
LruQueueBufferSplit(FontCache *cache, int bufsize)
{
MemBlk *blk;
unsigned char *buff;
@@ -239,7 +224,7 @@ LruQueueBufferSplit(cache_t *cache, int bufsize)
}
static void
DestroyCache(cache_t *cache)
DestroyCache(FontCache *cache)
{
if (cache->hashDir != NULL) {
free(cache->hashDir);
@@ -328,7 +313,7 @@ GetCache(int nblock, int ndir)
lru-queue and also Hash queue(anywhere in hash q).
Relink the lru queue and hash queue */
static MemBlk *
PickOffBlk(cache_t *cache)
PickOffBlk(FontCache *cache)
{
MemBlk *blk;
@@ -355,7 +340,7 @@ PickOffBlk(cache_t *cache)
}
static void
AppendBlk(cache_t *cache, MemBlk *blk, int key)
AppendBlk(FontCache *cache, MemBlk *blk, int key)
{
/* first, append the blcok at the end of the
lru-queue. */
@@ -384,7 +369,7 @@ AppendBlk(cache_t *cache, MemBlk *blk, int key)
*size : if found the data, how long is the data(return val)
reutrn = pointer to the data */
TTFCACHEINFO *
__mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
__mg_ttc_search(HCACHE hCache, Glyph32 gv, int *size)
{
int key;
CacheQueueNode *ca;
@@ -394,7 +379,7 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
return NULL;
}
ca = (CacheQueueNode *)(hCache);
key = ca->cache.makeHashKeyFunc(unicode);
key = ca->cache.makeHashKeyFunc(gv);
if (key > (ca->cache.nDir - 1)) {
return NULL;
}
@@ -402,8 +387,8 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
for ( ; blk != &(ca->cache.hashDir[key].hashHead);
blk = blk->hashNext) {
TTFCACHEINFO * tci = (TTFCACHEINFO *)blk->data;
if (tci->unicode == unicode) {
TTFCACHEINFO* tci = (TTFCACHEINFO*)blk->data;
if (tci->glyph_code == gv) {
/* If found the blk, we should pick off it
and link it at the end of LRU-q */
*size = blk->len;
@@ -416,15 +401,15 @@ __mg_ttc_search(HCACHE hCache, UChar32 unicode, int *size)
return tci;
}
}
return NULL;
}
/* add data into a speicial cache
/* add data into the specific cache
hCache : which cache ,
*data : your data pointer
size : your data's bytes
key : hash key of your data */
key : hash key of your data
*/
int
__mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
{
@@ -439,7 +424,7 @@ __mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
if (ca->cache.blkSize < size) {
return -1;
}
key = ca->cache.makeHashKeyFunc(data->unicode);
key = ca->cache.makeHashKeyFunc(data->glyph_code);
/* pick off a block from lru queue */
if ((blk = PickOffBlk(&ca->cache)) == NULL) {
@@ -462,12 +447,12 @@ __mg_ttc_write(HCACHE hCache, TTFCACHEINFO *data, int size)
/* create a cache for a font instance.
nblk : how many block in the cache.
blks ize : each block's size
blksize : each block's size
ndir : how many hash entries in the cache
makeHashKey : the function which make the hash key */
HCACHE
__mg_ttc_create(const char *df_name, int style, int size, int rotation,
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey)
int nblk, int blksize, int ndir, MakeHashKeyFunc makeHashKey)
{
CacheQueueNode *temp;
if (df_name == NULL || makeHashKey == NULL) {
@@ -486,7 +471,7 @@ __mg_ttc_create(const char *df_name, int style, int size, int rotation,
memset(temp->cache.df_name, 0, LEN_UNIDEVFONT_NAME + 1);
strncpy(temp->cache.df_name, df_name, LEN_UNIDEVFONT_NAME);
temp->cache.style = style;
temp->cache.style = style & FS_RENDER_MASK;
temp->cache.fontsize = size;
temp->cache.rotation = rotation;
temp->cache.blkSize = blksize;
@@ -576,8 +561,6 @@ __mg_ttc_sys_deinit(void)
}
}
HCACHE
__mg_ttc_is_exist(const char *df_name, int style, int size, int rotation)
{
@@ -587,17 +570,18 @@ __mg_ttc_is_exist(const char *df_name, int style, int size, int rotation)
return (HCACHE)0;
}
/* If can not match font name*/
p = __mg_globalCache.queueDummyHead.nextCache;
while (p != &__mg_globalCache.queueDummyHead) {
if (strncmp(p->cache.df_name, df_name, LEN_UNIDEVFONT_NAME) == 0 &&
p->cache.style == style &&
p->cache.fontsize == size &&
p->cache.rotation == rotation) {
if (strncmp(p->cache.df_name, df_name, LEN_UNIDEVFONT_NAME) == 0
&& p->cache.style == (style & FS_RENDER_MASK)
&& p->cache.fontsize == size
&& p->cache.rotation == rotation) {
return (HCACHE) p;
}
p = p->nextCache;
}
return (HCACHE)0;
}
@@ -650,16 +634,14 @@ void __mg_ttc_dump_all(void)
}
}
void __mg_ttc_dump(cache_t *cache)
void __mg_ttc_dump(FontCache *cache)
{
int i, j, k;
MemBlk *ptr;
#if 0
DP(("&cache = %p\n", cache));
DP(("cache.df_name = %s\n", cache->df_name));
DP(("cache.style = %d\n", cache->style));
DP(("cache.fontsize = %d\n", cache->fontsize));
DP(("cache.rotation = %d\n", cache->rotation));
DP(("cache.blkSize = %d\n", cache->blkSize));
DP(("cache.refers = %d\n", cache->refers));
DP(("cache.nBlk = %d\n", cache->nBlk));
@@ -684,7 +666,7 @@ void __mg_ttc_dump(cache_t *cache)
printf("hash[%d]:", i);
p = (cache->hashDir)[i].hashHead.hashNext;
while(p != &(cache->hashDir[i].hashHead)) {
printf("-->%d(%d)", *(UChar32 *)(p->data), p->len);
printf("-->%d(%d)", *(unsigned short *)(p->data), p->len);
p = p->hashNext;
}
printf("\n");
@@ -695,7 +677,7 @@ void __mg_ttc_dump(cache_t *cache)
ptr = cache->lruQueueDummyHead.lruNext;
for ( ; ptr != &cache->lruQueueDummyHead; ptr = ptr->lruNext) {
DP(("-->%p(len:%d, data:%d)",
ptr, ptr->len, *(UCha32 *)(ptr->data)));
ptr, ptr->len, *(unsigned short *)(ptr->data)));
}
//printf("\n");
}
@@ -704,7 +686,6 @@ void
__mg_ttc_dump_cacheinfo(TTFCACHEINFO *ca)
{
DP(("Dump TTFCACHEINFO %p...\n", ca));
DP(("cacheInfo->unicode = %d\n", ca->unicode));
DP(("cacheInfo->glyph_code = %d\n", ca->glyph_code));
DP(("cacheInfo->cur_xmin = %d, cacheInfo->cur_ymin = %d\n",
@@ -723,7 +704,6 @@ void
__mg_ttc_dump_instance(TTFINSTANCEINFO *in)
{
DP(("Dump TTFINSTANCEINFO %p...\n", in));
DP(("Instance->cur_unicode = %d\n", in->cur_unicode));
DP(("Instance->cur_glyph_code = %d\n", in->cur_glyph_code));
DP(("Instance->outline(addr) = %p\n", &in->cur_outline));
DP(("Instance->cur_xmin = %d, Instance->cur_ymin = %d\n",
@@ -740,5 +720,5 @@ __mg_ttc_dump_instance(TTFINSTANCEINFO *in)
#endif /* 0 */
#endif /* _MGFONT_TTF_CACHE */
#endif /* defined(_MGFONT_FT2) && defined(_MGFONT_TTF_CACHE) */

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