From def73c1f918eb599cf4897a78d57d19d19ce5ca5 Mon Sep 17 00:00:00 2001 From: alexm Date: Sat, 12 Jul 2003 16:40:16 +0000 Subject: [PATCH] Add -_updateInputMethodState and -_updateInputMethodWithInsertionPoint: methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17205 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Headers/gnustep/gui/NSTextView.h | 32 +++++++++++++++++++++++++------- Source/NSTextView.m | 11 +++++++++++ 3 files changed, 42 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44d19e14a..3760f2907 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-12 18:20 Alexander Malmberg + + * Headers/gnustep/gui/NSTextView.h, Source/NSTextView.m: Add + -_updateInputMethodState and -_updateInputMethodWithInsertionPoint: + methods. Minor cleanups in comments. + 2003-07-12 Gregory John Casamento * Source/NSMatrix.m: -[NSMatrix keyCell] failed to check if the diff --git a/Headers/gnustep/gui/NSTextView.h b/Headers/gnustep/gui/NSTextView.h index 8ff0fffaa..6f2a9d595 100644 --- a/Headers/gnustep/gui/NSTextView.h +++ b/Headers/gnustep/gui/NSTextView.h @@ -71,8 +71,8 @@ therefore be stored in the NSLayoutManager to avoid problems. @interface NSTextView : NSText { - /** These attributes are shared by all text views attached to a layout - manager. Any changes must be replicated in all those text views. **/ + /* These attributes are shared by all text views attached to a layout + manager. Any changes must be replicated in all those text views. */ id _delegate; struct GSTextViewFlagsType { unsigned is_field_editor:1; @@ -90,7 +90,7 @@ therefore be stored in the NSLayoutManager to avoid problems. would be very awkward if they weren't. */ unsigned allows_undo:1; unsigned smart_insert_delete:1; - /** End of shared attributes. **/ + /* End of shared attributes. */ unsigned draws_background:1; @@ -209,9 +209,14 @@ therefore be stored in the NSLayoutManager to avoid problems. } -/* Returns the default typing attributes: black text, default paragraph -style, default user font and size. */ -+(NSDictionary *) defaultTypingAttributes; /* GNUstep extension */ +/** +Returns the default typing attributes: black text, default paragraph +style (as returned by [NSParagraphStyle defaultParagraphStyle]), and default +user font and size (as returned by [NSFont userFontOfSize: 0.0]). + +GNUstep extension. +*/ ++(NSDictionary *) defaultTypingAttributes; /**** Initializing ****/ @@ -227,7 +232,7 @@ should ensure that you only register once. */ /* This variant will create the text network (NSTextStorage, NSLayoutManager, and a NSTextContainer). The network will be owned by the NSTextView; releasing it will release all parts of the network. */ --(id) initWithFrame:(NSRect)frameRect; +-(id) initWithFrame: (NSRect)frameRect; /**** Text network management ****/ @@ -361,6 +366,19 @@ the text view is resizable. */ -(NSDictionary *) markedTextAttributes; +#ifdef GNUSTEP +/*** Private, internal methods for (currently only) XIM support ***/ + +/* +The implementations for these are empty in NSTextView. Backends can override +these in a category. +*/ + +-(void) _updateInputMethodState; +-(void) _updateInputMethodWithInsertionPoint: (NSPoint)insertionPoint; + +#endif + @end diff --git a/Source/NSTextView.m b/Source/NSTextView.m index 7a1ed9ac3..2fb294c3d 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -2243,6 +2243,17 @@ Scroll so that the beginning of the range is visible. } +/* Private, internal methods to help input method handling in some backends +(XIM, currently). Backends may override these in categories with the real +(backend-specific) handling. */ + +-(void) _updateInputMethodState +{ +} +-(void) _updateInputMethodWithInsertionPoint: (NSPoint)insertionPoint +{ +} + @end