Commit Graph

65 Commits

Author SHA1 Message Date
Pietro Gagliardi 76fabb37cf Renamed common/init.c to common/main.c. 2019-06-01 11:24:34 -04:00
Pietro Gagliardi 9daef443b2 Moved uiQueueMain() to common/init.c to avoid having multiple initialized variables; the per-OS versions are now uiprivSysQueueMain(). Also more TODOs. 2019-05-30 01:39:43 -04:00
Pietro Gagliardi ab5b3076ed Removed uiInitError length checking and just truncated too-long messages with an ellipsis. Also removed the non-printf version of uiprivReportInitError. 2019-05-30 01:16:33 -04:00
Pietro Gagliardi 19ad0d33a3 Changed uiInit() to return bool instead of int, now that we've settled on using bool. 2019-05-29 21:10:44 -04:00
Pietro Gagliardi cceae4845e Fixed build issues and added more cases to allcalls.h. I'm going to fix the lack of idnent on the diff()s before continuing. 2019-05-28 22:53:40 -04:00
Pietro Gagliardi b5927353e0 Started work to test that functions dislike being called before uiInit() or on a different thread; better to do it now than later. 2019-05-28 21:54:13 -04:00
Pietro Gagliardi 7c128e7bcd Added internal errors and refined the error handling somewhat. 2019-05-13 21:30:18 -04:00
Pietro Gagliardi 0d21bf8846 Added Debugger() to the programmer error handler on macOS. This will also be used when I add a bug-in-libui function. 2019-05-13 01:00:19 -04:00
Pietro Gagliardi b3049b0a1e Started reintegrating what used to be called user bugs; they're now called programmer errors. We'll create a much more systematic approach to them. Implemented on macOS. 2019-05-12 22:17:24 -04:00
Pietro Gagliardi f97383f66c Rearranged things so that uiInit() itself is in common/init.c and the OS-specific initialization code is its own standalone internal function. This'll make testing a bit easier, especially after the next few commits, and will allow me to test pre-initialization and cross-thread stuff a bit more easily. 2019-05-09 12:07:28 -04:00
Pietro Gagliardi b8a7b57835 And finally fixed uiQuit() on macOS. 2019-04-28 13:43:55 -04:00
Pietro Gagliardi 9c70782a0f Added uiMain() and friends on macOS and refined the tests. So now we'll need to add a timeout mechanism because that sendEvent: stuff really is still neeeded and I'd like to prevent shenanigans later. 2019-04-28 11:48:21 -04:00
Pietro Gagliardi 23591eeefa Executive decision: drop uiUnint(). This was really more for double-checking *my* work, mostly with regards to memory management, and we could probably do that in the test suite instead, or even with AddressSanitizer. 2019-04-21 20:59:36 -04:00
Pietro Gagliardi 484989e925 Implemented uiInit() on macOS. The tests work so far! 2019-04-20 21:38:26 -04:00
Pietro Gagliardi 992d8694a9 Let's start the remodel. Move almost everything out of the way. 2019-04-08 20:36:21 -04:00
Pietro Gagliardi 52bd45bb09 More TODOs. Update #395 2018-08-09 04:54:49 -04:00
Pietro Gagliardi fdff9b2dbb Renamed future and undocumented names. Now for draw.h (and whatever other headers are left behind), and then we figure out what to do about other names (including specifically pinning a naming convention). 2018-05-05 22:02:25 -04:00
Pietro Gagliardi cc271ccc37 Migrated newContext(), freeContext(), and colorButtonInhibitSendAction(). 2018-05-05 20:28:00 -04:00
Pietro Gagliardi 323a8945eb Migrated sendAreaEvents() and the areaevents.m keycode functions. 2018-05-05 20:20:57 -04:00
Pietro Gagliardi eb28beff1b Migrated alloc.m functions. 2018-05-05 19:46:57 -04:00
Pietro Gagliardi 1381edfa6e Migrated main.m functions. Before we merge this back in I absoltuely must do something about main.m and menu.m, even if ethereal. 2018-05-04 19:50:02 -04:00
Pietro Gagliardi 60e71c7174 Migrated menu.m for now. Need to figure out what to do about ivars and methods and properties. Also still not happy with the property and autoreleasepool mess of main.m... 2018-05-03 23:20:12 -04:00
Pietro Gagliardi cac4cd9e81 Cleaned up stylistic nits and common branch naming issues on the new uiTimer() code. Also switched the Windows code to use a simple struct instead of the class (and with a uipriv name). 2018-04-18 21:04:12 -04:00
Pietro Gagliardi 85a4c6d35d
Merge pull request #277 from cody271/timer
Adds a function uiTimer() that runs code on the main loop at certain intervals.

Original comment: Add Timer API
2018-04-18 20:52:59 -04:00
cody271 f921dde9f6 uiTimer() Use 'uipriv' prefix convention 2018-04-16 17:48:33 -07:00
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 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 4a57b15d09 Renamed the common options variable to uiprivOptions. 2018-04-15 15:49:45 -04: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 1fc9f137bc Migrated fontbutton.m back. 2018-03-04 19:51:45 -05: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 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 4195bc3b4b Finalized and implemented underlines on OS X. 2017-02-14 14:57:56 -05:00
Pietro Gagliardi d3b33e39ce Further enhancements to custom run loops on OS X for custom resize loops. 2016-10-31 14:33:11 -04:00
Pietro Gagliardi 39fdf7457b More preparation for the OS X window move/resize code: uiMainStep() is split into an internal function that takes a pre-sendEvent: interception specifically intended for internal loops. 2016-10-27 23:32:33 -04:00
Pietro Gagliardi 5de62d073f Cal [NSApp finishLaunching]. Fixes #182. 2016-10-26 09:39:43 -04:00
Pietro Gagliardi ae14542c9a Improved uiMainSteps(). 2016-06-17 09:22:31 -04:00
Pietro Gagliardi d4492c06a9 Changed the uiMainSteps() API as the GTK+ port will need it to be done this way... 2016-06-16 13:49:50 -04:00
Pietro Gagliardi da4b396aaf Added uiMainSteps(), which sets things up to use uiMainStep() for the main loop. Implemented on OS X. 2016-06-16 13:45:24 -04:00
Pietro Gagliardi eb11452dd3 More TODO resolution. Some TODOs were moved to the issue tracker. 2016-05-28 18:01:25 -04:00
Kevin Wojniak bef8c4663f Fix additional OS X memory management issues
Some of these were found via clang's analyzer
2016-05-24 20:17:08 -07:00
Pietro Gagliardi 558e56c124 Implemented uiMainStep() on OS X. 2016-05-24 22:44:40 -04:00
Kevin Wojniak 49e17cbfd7 Fix "attempt to destroy map with items inside" when menuManager is deallocated
Fixes #58. The map needs to have its contents properly freed which requires releasing the properly retaining the NSMenuItem object.
2016-05-23 21:41:52 -07:00
Kevin Wojniak abb3c39c78 Spaces to tabs 2016-05-23 21:11:12 -07:00
Kevin Wojniak 2ebb9052cc Fix crash when closing program on OS X
This fixes #14. Autorelease pools need to be used to make sure objects get properly released. Unfortunately this produces a new error when menuManager gets deallocated, which I am looking at fixing:

map.m:25:mapDestroy() POSSIBLE IMPLEMENTATION BUG; CONTACT ANDLABS:
attempt to destroy map with items inside
2016-05-23 21:09:46 -07:00
Pietro Gagliardi bf411e787e Implemented uiColorButton on OS X. 2016-05-15 20:51:33 -04:00