2015-08-16 21:30:44 -05:00
|
|
|
// 7 april 2015
|
|
|
|
#import "uipriv_darwin.h"
|
|
|
|
|
2015-12-08 20:09:23 -06:00
|
|
|
// TODO do we really want to do this? make it an option?
|
2015-08-16 21:30:44 -05:00
|
|
|
void disableAutocorrect(NSTextView *tv)
|
|
|
|
{
|
|
|
|
[tv setEnabledTextCheckingTypes:0];
|
|
|
|
[tv setAutomaticDashSubstitutionEnabled:NO];
|
|
|
|
// don't worry about automatic data detection; it won't change stringValue (thanks pretty_function in irc.freenode.net/#macdev)
|
|
|
|
[tv setAutomaticSpellingCorrectionEnabled:NO];
|
|
|
|
[tv setAutomaticTextReplacementEnabled:NO];
|
|
|
|
[tv setAutomaticQuoteSubstitutionEnabled:NO];
|
|
|
|
[tv setAutomaticLinkDetectionEnabled:NO];
|
|
|
|
[tv setSmartInsertDeleteEnabled:NO];
|
|
|
|
}
|
|
|
|
|
|
|
|
void complain(const char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
fprintf(stderr, "[libui] ");
|
|
|
|
vfprintf(stderr, fmt, ap);
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
va_end(ap);
|
|
|
|
abort();
|
|
|
|
}
|