diff -r 64ded9f6a6c6 -r 6606616eca9f ui/cocoa/text.h --- a/ui/cocoa/text.h Tue Feb 25 21:11:00 2025 +0100 +++ b/ui/cocoa/text.h Sat Apr 05 16:46:11 2025 +0200 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2014 Olaf Wintermann. All rights reserved. + * Copyright 2025 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -26,38 +26,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#import "../ui/text.h" #import "toolkit.h" -#import - -@interface TextChangeMgr : NSObject { - UiContext *context; - UiText *value; - int last_length; -} - -- (TextChangeMgr*)initWithValue:(UiText*)text context:(UiContext*)ctx; - -- (NSUndoManager*)undoManagerForTextView:(NSTextView*)textview; - -@end -#define UI_TEXTBUF_INSERT 0 -#define UI_TEXTBUF_DELETE 1 -typedef struct UiTextBufOp { - int type; // UI_TEXTBUF_INSERT, UI_TEXTBUF_DELETE - int start; - int end; - int len; - char *text; -} UiTextBufOp; +#import "../ui/text.h" - - -char* ui_textarea_get(UiText *text); -void ui_textarea_set(UiText *text, char *str); -char* ui_textarea_getsubstr(UiText *text, int begin, int end); -void ui_textarea_insert(UiText *text, int pos, char *str); -int ui_textarea_position(UiText *text); -void ui_textarea_selection(UiText *text, int *begin, int *end); -int ui_textarea_length(UiText *text);