Commit Graph

745 Commits

Author SHA1 Message Date
cody271 fa7466e7b4 uiTimer() Qualify Objective-C instance variables with 'self' 2018-04-16 17:45:30 -07:00
cody271 68e1223e4d Fix TimerDelegate memory leak 2018-04-16 17:28:13 -07:00
cody271 5dbe20593d Implement uiTimer() for GTK+ and OS X 2018-04-16 17:28:12 -07:00
cody271 27b8ce1db3 Add uiTimer() API and example 2018-04-16 17:28:12 -07:00
Pietro Gagliardi 8e2004cf67 struct graphemes -> uiprivGraphemes. Also deleted OLD_uipriv.h now that that one is settled. 2018-04-15 22:43:14 -04:00
Pietro Gagliardi 01d6422664 Added uipriv prefixes to the matrix functions. 2018-04-15 22:39:34 -04:00
Pietro Gagliardi f5be05f143 shouldQuit() -> uiprivShouldQuit(). 2018-04-15 21:54:46 -04:00
Pietro Gagliardi f93973d3cb Migrated implbug() and userbug() to uipriv forms. 2018-04-15 21:46:08 -04:00
Pietro Gagliardi 8ca32f098f uiAlloc() et al -> uiprivAlloc() et al, OS X code. 2018-04-15 16:05:24 -04:00
Pietro Gagliardi 4a57b15d09 Renamed the common options variable to uiprivOptions. 2018-04-15 15:49:45 -04:00
Pietro Gagliardi df03c09a9c More TODOs. 2018-03-18 15:40:45 -04:00
Pietro Gagliardi 9aea7fa62e Polished up the drawtext demo a bit (such as finally fixing that titlebar). Also more crash-related TODOs. 2018-03-18 11:24:09 -04:00
Pietro Gagliardi bc895d6707 And added the necessary functions on OS X. Now to do some final cleanup before merging back in (at long last). 2018-03-17 23:55:33 -04:00
Pietro Gagliardi fa293717af Removed the NumLines and LineByteRange functions for now; I'll count them under extents. 2018-03-17 21:05:05 -04:00
Pietro Gagliardi d358e87583 Moved the old metrics attrstr code out of the way. 2018-03-17 21:00:11 -04:00
Pietro Gagliardi f25b8dce37 Finished migrating attrstr.cpp. 2018-03-13 22:01:15 -04:00
Pietro Gagliardi 12e97a1b29 Started migrating attrstr.cpp, using the same techniques as attrstr.m. 2018-03-13 18:43:32 -04:00
Pietro Gagliardi bffe311afe Switched to using Pango background color attributes. Unix code done for now. 2018-03-11 20:23:18 -04:00
Pietro Gagliardi 7dc5c6d940 Migrated attrstr.c back. 2018-03-11 17:36:22 -04:00
Pietro Gagliardi acbe7c3149 Implemented uiAttributeTypeBackground for OS X 10.12 and newer using the attribute included with Core Text. Also laid out a non-block-based API for drawing backgrounds on older versions of OS X (not implemented here yet, however; that will require bringing back the old metrics code). 2018-03-11 03:30:02 -04:00
Pietro Gagliardi 6643a148e0 More TODOs. 2018-03-10 22:18:48 -05:00
Pietro Gagliardi b15f88412b Fixed the infinite loop: end is exclusive, and my code was correct in handling that, so <= (which i though was needed there because I thought the code wouldn't handle it) is wrong. Now for a segfault. 2018-03-10 22:04:07 -05:00
Pietro Gagliardi 4bb6a56c99 More warning fixes. Made private uiAttributeString functions const-correct to expose more potential issues later. Const-correctness and uiAttributeRetain() are going to be an issue... 2018-03-10 19:21:39 -05:00
Pietro Gagliardi 9194ba29fe And fixed build errors. Now I'm sure there are warnings that are real bugs, so let's handle those next. 2018-03-10 19:02:10 -05:00
Pietro Gagliardi c82197f408 And fixed other compile errors. Of course I forgot to add uiFontButton back in (I wanted to properly comment that first :/ ). Now for linker errors, which may result in some warning fixes along the way. 2018-03-09 18:01:23 -05:00
Pietro Gagliardi 82d3de7c31 More compiler error fixes. Oops, I forgot to finish attrstr.m! 2018-03-08 23:27:04 -05:00
Pietro Gagliardi e9a62461c2 Started fixing compile errors. I forgot I renamed uiDrawFontDescriptor to uiFontDescriptor! 2018-03-08 23:04:45 -05:00
Pietro Gagliardi 5535c43bd8 And finished up drawtext.m for now. 2018-03-08 22:38:53 -05:00
Pietro Gagliardi 7451d455e5 Started a new drawtext.m with a different way to handle the empty-string crash problem. 2018-03-07 23:53:36 -05:00
Pietro Gagliardi bf58601ff8 More TODOs. 2018-03-05 23:16:43 -05:00
Pietro Gagliardi 00749b07ac And cleaned up all the font handling stuff in attrstr.m. A lot cleaner now! Not fully clean, but clean*er*, and probably more efficient, too... 2018-03-05 23:15:31 -05:00
Pietro Gagliardi 93c375fd94 Implemented -[uiprivCombinedFontAttr hash]. 2018-03-05 08:59:45 -05:00
Pietro Gagliardi 9e57c78fb3 Started really refactoring attrstr.m by turning uiprivCombinedFontAttr into an actual attribute that CFAttributedString will manage itself; it will store uiAttributes (so we can use uiprivAttributeEqual() instead of duplicating its logic). Later, we will make it convert to CTFontRefs in place. 2018-03-04 23:57:18 -05:00
Pietro Gagliardi 49c3f77d46 Started cleaning up attrstr.m. This is gonna be fun... 2018-03-04 20:45:05 -05:00
Pietro Gagliardi 232b14ccde Migrated attrstr.m. This file needs to be cleaned up... 2018-03-04 20:01:52 -05:00
Pietro Gagliardi 1fc9f137bc Migrated fontbutton.m back. 2018-03-04 19:51:45 -05:00
Pietro Gagliardi 0b3176cead Migrated the font matchng stuff on OS X. 2018-03-04 18:01:08 -05:00
Pietro Gagliardi d8ad3300c9 Migrated aat.m back. 2018-03-04 15:53:46 -05:00
Pietro Gagliardi 36567cc522 Migrated OS X graphemes.m. 2018-03-04 15:48:45 -05:00
Pietro Gagliardi 7fd012418d Migrated (and cleaned up) OS X opentype.m. 2018-03-04 15:09:27 -05:00
Pietro Gagliardi 036c7c12e6 Updated CONTRIBUTING.md and moved the old OS X draw text stuff out of the way. 2018-03-04 13:52:33 -05:00
Pietro Gagliardi 243e210cbc Resolved some darwin/drawtext.m TODOs. 2017-11-04 11:52:33 -04:00
Pietro Gagliardi 67a7b64f56 More TODOs. 2017-11-04 02:52:12 -04:00
Pietro Gagliardi 6869f28718 Fixed fixed-point math issues. fvar tables now work fine, which means Skia finally works! 2017-11-04 02:44:38 -04:00
Pietro Gagliardi ad34745327 Fixed loading of undocumented symbols. Now we're making progress! And what's more, fvar support is working! But not perfectly — everything seems to be hitting extremes... 2017-11-03 21:55:43 -04:00
Pietro Gagliardi e0b584082d Reintegrated everything and fixed more compiler errors. Now we have to deal with linker errors, and then with testing to see if everything worked... 2017-11-03 20:59:27 -04:00
Pietro Gagliardi 57a6ea0a77 Moved fontmatch.m alongside the other font files as we prepare to combine everything. 2017-11-02 21:10:38 -04:00
Pietro Gagliardi 55a97093f5 Removed a stale TODO. 2017-09-29 09:58:43 -04:00
Pietro Gagliardi e597d8ce3b More TODOs. 2017-09-27 14:24:07 -04:00
Pietro Gagliardi 5d7128781b And const-corrected uiAttributedStringForEachAttribute(). 2017-06-19 21:45:18 -04:00
Pietro Gagliardi 3e20e4670c Made a decision on const correctness in uiOpenTypeFeatures. 2017-06-19 14:50:03 -04:00
Pietro Gagliardi e6ee2b0dbd Some TODO elminiation (for once). One TODO got reshuffled. 2017-06-18 20:10:42 -04:00
Pietro Gagliardi f0813ac6e4 More stuff. I should probably write that OpenType features test now. 2017-06-10 03:37:17 -04:00
Pietro Gagliardi d63a5b23b1 Handled uiOpenTypeFeatures NULL equality. This only added more TODOs elsewhere :| 2017-06-09 19:59:48 -04:00
Pietro Gagliardi ddf91df764 More cmake TODOs. 2017-06-06 15:32:51 -04:00
Pietro Gagliardi b3e3b27f71 Some more TODO cleanup and name adjustment. 2017-06-06 14:14:33 -04:00
Pietro Gagliardi 8e8cc12105 Added uiForEach for canonicalizing foreach function returns and used it everywhere. 2017-06-06 12:47:07 -04:00
Pietro Gagliardi ba2e9154f7 Some notes and failed bugfixes on NSProgressIndicators in tables. 2017-06-03 17:59:50 -04:00
Pietro Gagliardi aa455be1ae Sigh, cmake... 2017-06-03 00:33:40 -04:00
Pietro Gagliardi 18d67a016c Started work on OS X 10.12 API stupids. 2017-06-02 23:57:40 -04:00
Pietro Gagliardi 96d06121c8 And finally used OpenType features directly on supported OS X versions. 2017-06-01 10:57:34 -04:00
Pietro Gagliardi 01df4631f6 And finished integrating the new attributed string stuff on OS X. 2017-05-30 15:24:31 -04:00
Pietro Gagliardi 06becce34c And finished the font attribute rewrite on OS X. Now to test. 2017-05-30 14:38:25 -04:00
Pietro Gagliardi 91bfceaf71 And FINALLY cleaned up all the AAT nonsense. Much saner now. 2017-05-30 14:00:58 -04:00
Pietro Gagliardi c4dd85bece More reworking the OS X attributed string code. Now we need to rework the AAT code somewhat too. 2017-05-30 13:18:13 -04:00
Pietro Gagliardi e356f1c48a Started reworking darwin/attrstr.m to be a lot more sane. 2017-05-30 13:06:58 -04:00
Pietro Gagliardi 1733c28b52 Added consts to the OpenType implementations. 2017-05-30 09:52:38 -04:00
Pietro Gagliardi 57873bae72 Stuff. 2017-05-27 18:19:08 -04:00
Pietro Gagliardi fb884abc41 Fixed memory issues with future.m. 2017-05-19 16:58:15 -04:00
Pietro Gagliardi dd54469677 Set up a future system for OS X like we have on GTK+ and moved everything we already have to it. You'll notice we also set up a loader for what we're going to use this for: using OpenType attributes directly on OS X. 2017-05-19 16:40:52 -04:00
Pietro Gagliardi bd39189a0e Fixed the build and an unspotted error in the drawtext example. 2017-05-19 16:10:54 -04:00
Pietro Gagliardi b7d34bf4f5 And tied everyhting together, sort of. 2017-05-19 15:48:15 -04:00
Pietro Gagliardi 1a2dd1f16b Converted darwin/aat.m to the new OpenType system. We can't use the code as-is just yet, though. 2017-05-19 15:14:41 -04:00
Pietro Gagliardi 72f5b680f2 Filled in darwin/opentype.m. 2017-05-19 14:12:04 -04:00
Pietro Gagliardi 676dfb87f2 Started the uiOpenTypeFeatures implementationss, filling in holes in the API. 2017-05-11 10:27:34 -04:00
Pietro Gagliardi 70940e5c06 More TODOs. 2017-02-24 21:43:37 -05:00
Pietro Gagliardi 3d5fbc0880 Checked empty strings on Pango. 2017-02-24 21:42:40 -05:00
Pietro Gagliardi c4400b83f3 Okay, notes on linelessness on OS X. 2017-02-24 21:24:52 -05:00
Pietro Gagliardi 5fe4e27c5d TODO cleanup and stale TODO removal. That nLines == 0 TODO needs more testing... 2017-02-24 18:46:53 -05:00
Pietro Gagliardi 28b30367e2 Still more TODO resolution. 2017-02-24 18:19:34 -05:00
Pietro Gagliardi cca4db5ce9 More TODO resolution and pointless TODO elimination. 2017-02-24 18:15:20 -05:00
Pietro Gagliardi 0df8346bff Also removed uiAttributeLangauge for compatibility reasons too. Let's settle all the TODOs now. 2017-02-24 12:12:03 -05:00
Pietro Gagliardi f65fc1f25e Fixed text hit-testing on OS X. 2017-02-24 10:29:08 -05:00
Pietro Gagliardi be56ec3626 Removed the vertical forms attribute. This is a compatiblity nightmare. 2017-02-24 01:23:47 -05:00
Pietro Gagliardi e5f3646fcf Attempts to align the vertical glyphs with the orizontal baseline on OS X with Core Text. This is gonna be harder... 2017-02-23 21:37:41 -05:00
Pietro Gagliardi 4a1642cea2 Fixed improper breaks in Unix attribute handling. 2017-02-20 19:51:00 -05:00
Pietro Gagliardi ea473a3411 Ugh of course I screwed up the malloc() test. Fixed a crash on GTK+ since I guess OS X malloc() autofills to 0? 2017-02-20 15:14:53 -05:00
Pietro Gagliardi 025dd16d76 More examples and crash fixes. 2017-02-16 15:02:19 -05:00
Pietro Gagliardi 3e941d008e Integrated aat.m into the build. 2017-02-15 23:10:23 -05:00
Pietro Gagliardi 4f5328ae65 And added the typographical features for AAT. 2017-02-15 21:11:44 -05:00
Pietro Gagliardi ddffce6d44 More work. This is annoying, stupid 10.9. 2017-02-15 19:42:57 -05:00
Pietro Gagliardi 669538e9ce Implemented uiAttributeLanguage on OS X. Untested. 2017-02-15 16:22:42 -05:00
Pietro Gagliardi 4195bc3b4b Finalized and implemented underlines on OS X. 2017-02-14 14:57:56 -05:00
Pietro Gagliardi 35a06e8540 Changed uiAttributeVerticalForms into a boolean. This is how the other features might need to be implemented :/ 2017-02-13 22:42:18 -05:00
Pietro Gagliardi 9a19c65323 Prepared the OS X backend for adding feature attributes. Each feature will be a separate attribute for better composability. 2017-02-13 10:34:25 -05:00
Pietro Gagliardi ff986858f1 Added vertical glyph forms. Next up is the rest of the various font features. 2017-02-13 10:24:12 -05:00
Pietro Gagliardi 1c238bf85b And implemented uiAttributeBackground on OS X. Not sure what else to add besides the feature variants... 2017-02-13 02:10:39 -05:00
Pietro Gagliardi 44f24fc900 Added the foreground color attribute. Considering making the background color a background BRUSH attribute instead... 2017-02-12 20:27:47 -05:00
Pietro Gagliardi 261dd4851a Changed the representation of an attribute type/value pair to allow more type safety and expressability. 2017-02-12 14:11:25 -05:00
Pietro Gagliardi 1c1b16a206 More attributes. Beyond this point I'd need to either redefine the way attributes are specified or make more header macros. 2017-02-12 13:41:52 -05:00
Pietro Gagliardi 5aaac84d55 Implemented uiAttributeFamily on OS X. ATTRIBUTES WORK!!! 2017-02-12 01:05:27 -05:00
Pietro Gagliardi 44f8409b8c And implemented the alignment stuff on OS X. 2017-02-11 21:10:16 -05:00
Pietro Gagliardi 8a64a1dfb0 Made the OS X code and the example program use the new layout stuff. 2017-02-11 19:47:20 -05:00
Pietro Gagliardi 67949d79aa And re-added the uiFontButton on OS X and added one to the hit-test example. 2017-02-11 01:13:07 -05:00
Pietro Gagliardi bebaf72de3 Started putting uiFontButton back in on OS X. Just a bunch of boilerplate for now, namely the function to take a CTFontDesciptorRef and convert it into a uiDrawFontDescriptor. 2017-02-11 00:53:52 -05:00
Pietro Gagliardi 5d18d477e3 Implemented uiDrawCaret() on OS X. 2017-02-10 18:19:32 -05:00
Pietro Gagliardi bb50440e55 Started cleaning up the old API. 2017-02-10 11:14:24 -05:00
Pietro Gagliardi 6fa009a7dd Fixed uiAttributedString not putting the right position for the last character. Simple case of using the wrong variables. 2017-02-10 11:06:37 -05:00
Pietro Gagliardi 49d36b340c Started adjusting all the implementations to the new API's formal definition. There's bugs in uiAttributedString... 2017-02-10 10:54:37 -05:00
Pietro Gagliardi 749a0cddaf Wrote the new hit-testing API on OS X, the easiest target. Also updated the example. Had to slightly modify one function for this all to work. 2017-02-08 19:00:45 -05:00
Pietro Gagliardi bbc03a489e Implemented the system on the hit-test example and on OS X. 2017-02-07 16:43:49 -05:00
Pietro Gagliardi a1bebc82d8 And implemented caret motions in the hit test examples. 2017-02-06 00:26:22 -05:00
Pietro Gagliardi 64a1167e5f Added the blue caret to the drawtext example. Phew! 2017-02-05 21:44:48 -05:00
Pietro Gagliardi 0ae25c62ed Implemented the range-to-rect function on OS X. 2017-02-05 21:17:48 -05:00
Pietro Gagliardi b18cc88dce Boilerplate needed for implementing range-to-rect. 2017-02-05 20:42:52 -05:00
Pietro Gagliardi c336063b65 Decided what I need to do. 2017-02-05 20:26:59 -05:00
Pietro Gagliardi c9e7ee3a92 Reactivated the Core Text backend. 2017-01-24 23:13:44 -05:00
Pietro Gagliardi 8ff01c5034 Ugh 2017-01-24 17:15:57 -05:00
Pietro Gagliardi 8d3c68d7f0 Moved the AppKit text drawer out of the way for now. One last experiment first; didn't seem to matter :S 2017-01-24 17:12:44 -05:00
Pietro Gagliardi 877ffa5f89 More attempts. Ugggggh. 2017-01-24 10:36:13 -05:00
Pietro Gagliardi d1e2b17f6e Attempted to the layout er I mean attempted to define the ascent, desceitn, er descent, and leading for the NSLayoutManager based code AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA. 2017-01-24 01:04:08 -05:00
Pietro Gagliardi 1ca9a28f2d More work. 2017-01-23 15:07:28 -05:00
Pietro Gagliardi 08f2085f41 Quick fix. 2017-01-23 14:31:39 -05:00
Pietro Gagliardi b19f4cf251 Finished writing a NSLayoutManager-based text system. Not quite perfect yet, but we're getting somewhere! 2017-01-23 11:43:03 -05:00
Pietro Gagliardi 4e2dc90f4f Started an experimental port from Core Text to Cocoa's typesetting system, since that seems to produce more sensible results (and is somewhat easier to use...). We lose per-line spacing though :/ 2017-01-23 01:28:53 -05:00
Pietro Gagliardi d8316790a0 More notes. 2017-01-21 10:21:39 -05:00
Pietro Gagliardi 4de8d4402f More TODOs. 2017-01-20 23:15:10 -05:00
Pietro Gagliardi 87b7d5b4b7 Decided to remove uiDrawTextLayoutByteIndexToGraphemeRect(); the Range one later on handles it. Now we can do the hit testing functions! 2017-01-20 19:34:16 -05:00
Pietro Gagliardi 6ccf436206 Implemented Pango text metrics and expanded the drawtext basic page to draw metrics. Works on both Pango and OS X; DirectWrite comes next. 2017-01-20 16:36:44 -05:00
Pietro Gagliardi 7f270942a7 And fixed errors. Woo, it works!!!!! 2017-01-17 13:54:23 -05:00
Pietro Gagliardi 7bda3baee3 Fixed build errors. DOES IT WORK?!?!?!?!?!?!?!?! 2017-01-17 13:05:40 -05:00
Pietro Gagliardi 794d30154c And rewrote drawtext.m based around the new Core Text research. 2017-01-17 12:02:42 -05:00
Pietro Gagliardi e32341b24b More work. 2017-01-07 20:09:44 -05:00
Pietro Gagliardi 1bd2ca22c2 Some more work on the new Cocoa text drawing code. 2017-01-06 23:53:23 -05:00
Pietro Gagliardi 6212ac7238 And integrated the rest of our important tests in. 2017-01-05 21:36:07 -05:00
Pietro Gagliardi 747a0bbfad More TODOs. 2017-01-05 17:56:47 -05:00
Pietro Gagliardi 3910ff1a13 Resolved Core Text pain by not even thinking about lines in terms of boxes. 2017-01-05 17:55:05 -05:00
Pietro Gagliardi dfaf640101 More work. Core Text chaos has resurged... 2017-01-04 23:50:08 -05:00
Pietro Gagliardi f147edf949 More work. 2017-01-03 23:59:23 -05:00
Pietro Gagliardi bab798543f Wrote the new font matching code. This is taken from the old code, but cleaned up considerably and updated with new knowledge. 2017-01-03 13:42:12 -05:00
Pietro Gagliardi 4318785eb2 More drawtext.m work. I was wrong; I'll need to do the trait matching anyway. Ugh. 2017-01-03 12:18:17 -05:00
Pietro Gagliardi 31274bcbd2 Started implementing the new attributed string system on OS X. 2017-01-02 23:53:31 -05:00
Pietro Gagliardi 4f8f94b85a Updated the CMakeLists.txt for OS X. 2016-12-03 20:02:39 -05:00
Pietro Gagliardi da8b8de371 Wrote the new attributed string system's grapheme code for OS X. 2016-12-03 20:01:45 -05:00
Lailton Fernando Mariano 39d1c0565e Update uipriv_darwin.h 2016-12-01 16:26:59 -02:00
Lailton Fernando Mariano cb927659fa Update uipriv_darwin.h 2016-12-01 14:32:14 -02:00
Pietro Gagliardi 18b103c988 Fully reintegrated the table code. 2016-11-27 17:44:52 -05:00
Pietro Gagliardi 52d88d3f36 Re-added the table code. Need to patch together everything else, but. 2016-11-27 17:36:11 -05:00
Pietro Gagliardi e3dec183aa Started the process of splitting the table code into a separate branch. 2016-11-27 17:34:40 -05:00
Pietro Gagliardi 287d59b5c5 More TODOs. 2016-11-11 01:21:28 -05:00