diff options
author | mixedpuppy <devnull@localhost> | 2007-12-05 23:06:58 +0000 |
---|---|---|
committer | mixedpuppy <devnull@localhost> | 2007-12-05 23:06:58 +0000 |
commit | ffa2c5b99b0eb534498a550d11ac5debc1204c32 (patch) | |
tree | 7a56a2c74170e09c85b98ecdeebce310d001ad7d /macosx/QuartzTextStyle.h | |
parent | a9e5e58a8d7875426b4d6d009254fc6ec191cbba (diff) | |
download | scintilla-mirror-ffa2c5b99b0eb534498a550d11ac5debc1204c32.tar.gz |
modified version of adobe OSX patches. Most of these patches are provided by Adobe, though I've
reorganized a lot of them
- improved drag/drop
- make copy/paste use modern pasteboard api's
- optimized textlayout usage
- reduce assertions for debug builds
- implement IME support
- other minor things
patches are available in openkomodo, which is a good test ground for scintilla osx (until someone
ports SCiTE).
Diffstat (limited to 'macosx/QuartzTextStyle.h')
-rw-r--r-- | macosx/QuartzTextStyle.h | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/macosx/QuartzTextStyle.h b/macosx/QuartzTextStyle.h index d3a5db5dc..80c06b76e 100644 --- a/macosx/QuartzTextStyle.h +++ b/macosx/QuartzTextStyle.h @@ -19,23 +19,19 @@ class QuartzTextStyle public: QuartzTextStyle() { - OSStatus err; - err = ATSUCreateStyle( &style ); - assert( err == noErr ); + ATSUCreateStyle( &style ); } ~QuartzTextStyle() { - assert( style != NULL ); - ATSUDisposeStyle( style ); + if ( style != NULL ) + ATSUDisposeStyle( style ); style = NULL; } void setAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value ) { - OSStatus err; - err = ATSUSetAttributes( style, 1, &tag, &size, &value ); - assert( err == noErr ); + ATSUSetAttributes( style, 1, &tag, &size, &value ); } void setAttribute( QuartzTextStyleAttribute& attribute ) @@ -45,8 +41,7 @@ public: void getAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value, ByteCount* actualSize ) { - OSStatus err; err = ATSUGetAttribute( style, tag, size, value, actualSize ); - assert( err == noErr ); + ATSUGetAttribute( style, tag, size, value, actualSize ); } template <class T> @@ -54,9 +49,7 @@ public: { T value; ByteCount actualSize; - OSStatus err; - err = ATSUGetAttribute( style, tag, sizeof( T ), &value, &actualSize ); - assert( (err == noErr || err == kATSUNotSetErr) && actualSize == sizeof( T ) ); + ATSUGetAttribute( style, tag, sizeof( T ), &value, &actualSize ); return value; } @@ -75,9 +68,7 @@ public: values[i] = attributes[i]->getValuePtr(); } - OSStatus err; - err = ATSUSetAttributes( style, number, tags, sizes, values ); - //assert( err == noErr ); + ATSUSetAttributes( style, number, tags, sizes, values ); // Free the arrays that were allocated delete[] tags; @@ -87,9 +78,7 @@ public: void setFontFeature( ATSUFontFeatureType featureType, ATSUFontFeatureSelector selector ) { - OSStatus err; - err = ATSUSetFontFeatures( style, 1, &featureType, &selector ); - assert( err == noErr ); + ATSUSetFontFeatures( style, 1, &featureType, &selector ); } const ATSUStyle& getATSUStyle() const |