mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:51:55 +00:00
Correct coding/decoding after type changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36160 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
695b0ae8e8
commit
6880e50086
15 changed files with 266 additions and 209 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Headers/AppKit/NSGraphicsContext.h
|
||||||
|
* Headers/AppKit/NSWindow.h
|
||||||
|
* Source/NSActionCell.m
|
||||||
|
* Source/NSBrowser.m
|
||||||
|
* Source/NSCell.m
|
||||||
|
* Source/NSEvent.m
|
||||||
|
* Source/NSImageRep.m
|
||||||
|
* Source/NSMatrix.m
|
||||||
|
* Source/NSMenuItem.m
|
||||||
|
* Source/NSParagraphStyle.m
|
||||||
|
* Source/NSRulerMarker.m
|
||||||
|
* Source/NSRulerView.m
|
||||||
|
* Source/NSSegmentedCell.m
|
||||||
|
* Source/NSView.m
|
||||||
|
* Source/NSWindow.m:
|
||||||
|
Correct coding/decoding after type changes.
|
||||||
|
|
||||||
2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
|
2013-02-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSBezierPath.m: More keyed decoding.
|
* Source/NSBezierPath.m: More keyed decoding.
|
||||||
|
|
|
@ -53,13 +53,14 @@
|
||||||
/*
|
/*
|
||||||
* Backing Store Types
|
* Backing Store Types
|
||||||
*/
|
*/
|
||||||
typedef enum _NSBackingStoreType
|
enum _NSBackingStoreType
|
||||||
{
|
{
|
||||||
NSBackingStoreRetained,
|
NSBackingStoreRetained,
|
||||||
NSBackingStoreNonretained,
|
NSBackingStoreNonretained,
|
||||||
NSBackingStoreBuffered
|
NSBackingStoreBuffered
|
||||||
|
|
||||||
} NSBackingStoreType;
|
};
|
||||||
|
typedef NSUInteger NSBackingStoreType;
|
||||||
|
|
||||||
/** NSCompositingOperation defines how an image is drawn or composited onto another.
|
/** NSCompositingOperation defines how an image is drawn or composited onto another.
|
||||||
* <list>
|
* <list>
|
||||||
|
|
|
@ -104,21 +104,23 @@ enum {
|
||||||
NSMiniWindowMask = 128 /* GNUstep extension - miniwindows */
|
NSMiniWindowMask = 128 /* GNUstep extension - miniwindows */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum _NSSelectionDirection {
|
enum _NSSelectionDirection {
|
||||||
NSDirectSelection,
|
NSDirectSelection,
|
||||||
NSSelectingNext,
|
NSSelectingNext,
|
||||||
NSSelectingPrevious
|
NSSelectingPrevious
|
||||||
} NSSelectionDirection;
|
};
|
||||||
|
typedef NSUInteger NSSelectionDirection;
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
||||||
typedef enum _NSWindowButton
|
enum _NSWindowButton
|
||||||
{
|
{
|
||||||
NSWindowCloseButton = 0,
|
NSWindowCloseButton = 0,
|
||||||
NSWindowMiniaturizeButton,
|
NSWindowMiniaturizeButton,
|
||||||
NSWindowZoomButton,
|
NSWindowZoomButton,
|
||||||
NSWindowToolbarButton,
|
NSWindowToolbarButton,
|
||||||
NSWindowDocumentIconButton
|
NSWindowDocumentIconButton
|
||||||
} NSWindowButton;
|
};
|
||||||
|
typedef NSUInteger NSWindowButton;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
APPKIT_EXPORT NSSize NSIconSize;
|
APPKIT_EXPORT NSSize NSIconSize;
|
||||||
|
|
|
@ -366,7 +366,7 @@ static Class controlClass;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_tag];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
[aCoder encodeConditionalObject: _target];
|
[aCoder encodeConditionalObject: _target];
|
||||||
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_action];
|
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||||
// This is only encoded for backward compatibility and won't be decoded.
|
// This is only encoded for backward compatibility and won't be decoded.
|
||||||
|
@ -400,7 +400,7 @@ static Class controlClass;
|
||||||
{
|
{
|
||||||
id dummy;
|
id dummy;
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_tag];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
_target = [aDecoder decodeObject];
|
_target = [aDecoder decodeObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||||
// Don't decode _control_view, as this may no longer be valid.
|
// Don't decode _control_view, as this may no longer be valid.
|
||||||
|
|
|
@ -2630,7 +2630,7 @@ static NSTextFieldCell *titleCell;
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_allowsEmptySelection];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_allowsEmptySelection];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_allowsMultipleSelection];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_allowsMultipleSelection];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_maxVisibleColumns];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &_maxVisibleColumns];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_minColumnWidth];
|
[aCoder encodeValueOfObjCType: @encode(CGFloat) at: &_minColumnWidth];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_reusesColumns];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_reusesColumns];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_separatesColumns];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_separatesColumns];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_takesTitleFromPreviousColumn];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_takesTitleFromPreviousColumn];
|
||||||
|
@ -2784,7 +2784,7 @@ static NSTextFieldCell *titleCell;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsEmptySelection];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsEmptySelection];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsMultipleSelection];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_allowsMultipleSelection];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_maxVisibleColumns];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &_maxVisibleColumns];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_minColumnWidth];
|
[aDecoder decodeValueOfObjCType: @encode(CGFloat) at: &_minColumnWidth];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_reusesColumns];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_reusesColumns];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_separatesColumns];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_separatesColumns];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_takesTitleFromPreviousColumn];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_takesTitleFromPreviousColumn];
|
||||||
|
|
|
@ -2481,8 +2481,8 @@ static NSColor *dtxtCol;
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
||||||
tmp_int = _cell.mnemonic_location;
|
tmp_int = _cell.mnemonic_location;
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_mouse_down_flags];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_mouse_down_flags];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_action_mask];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_action_mask];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_formatter];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_formatter];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_menu];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_menu];
|
||||||
[aCoder encodeValueOfObjCType: @encode(id) at: &_represented_object];
|
[aCoder encodeValueOfObjCType: @encode(id) at: &_represented_object];
|
||||||
|
@ -2647,9 +2647,9 @@ static NSColor *dtxtCol;
|
||||||
_cell.state = tmp_int;
|
_cell.state = tmp_int;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &tmp_int];
|
||||||
_cell.mnemonic_location = tmp_int;
|
_cell.mnemonic_location = tmp_int;
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||||
at: &_mouse_down_flags];
|
at: &_mouse_down_flags];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &_action_mask];
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger) at: &_action_mask];
|
||||||
if (version < 3)
|
if (version < 3)
|
||||||
{
|
{
|
||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
|
|
|
@ -698,11 +698,17 @@ static const char *eventTypes[] = {
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &event_type];
|
if ([aCoder allowsKeyedCoding])
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[aCoder encodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
||||||
[aCoder encodePoint: location_point];
|
[aCoder encodePoint: location_point];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &modifier_flags];
|
||||||
[aCoder encodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
|
[aCoder encodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &window_num];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &window_num];
|
||||||
|
|
||||||
switch (event_type)
|
switch (event_type)
|
||||||
{
|
{
|
||||||
|
@ -754,6 +760,7 @@ static const char *eventTypes[] = {
|
||||||
// FIXME: Tablet events
|
// FIXME: Tablet events
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -779,13 +786,19 @@ static const char *eventTypes[] = {
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
|
if ([aDecoder allowsKeyedCoding])
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
int version = [aDecoder versionForClassName: @"NSEvent"];
|
int version = [aDecoder versionForClassName: @"NSEvent"];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &event_type];
|
[aDecoder decodeValueOfObjCType: @encode(NSEventType) at: &event_type];
|
||||||
location_point = [aDecoder decodePoint];
|
location_point = [aDecoder decodePoint];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &modifier_flags];
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger) at: &modifier_flags];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
|
[aDecoder decodeValueOfObjCType: @encode(NSTimeInterval) at: &event_time];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned) at: &window_num];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &window_num];
|
||||||
|
|
||||||
if (version == 1)
|
if (version == 1)
|
||||||
{
|
{
|
||||||
|
@ -877,6 +890,7 @@ static const char *eventTypes[] = {
|
||||||
// FIXME: Tablet events
|
// FIXME: Tablet events
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -871,24 +871,38 @@ Fallback for backends other than Cairo. */
|
||||||
// NSCoding protocol
|
// NSCoding protocol
|
||||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||||
{
|
{
|
||||||
|
if ([aCoder allowsKeyedCoding])
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
[aCoder encodeObject: _colorSpace];
|
[aCoder encodeObject: _colorSpace];
|
||||||
[aCoder encodeSize: _size];
|
[aCoder encodeSize: _size];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_hasAlpha];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_hasAlpha];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isOpaque];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isOpaque];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_bitsPerSample];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_bitsPerSample];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_pixelsWide];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_pixelsWide];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_pixelsHigh];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_pixelsHigh];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||||
{
|
{
|
||||||
|
if ([aDecoder allowsKeyedCoding])
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_colorSpace];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_colorSpace];
|
||||||
_size = [aDecoder decodeSize];
|
_size = [aDecoder decodeSize];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasAlpha];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_hasAlpha];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isOpaque];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isOpaque];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_bitsPerSample];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_bitsPerSample];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_pixelsWide];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_pixelsWide];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_pixelsHigh];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_pixelsHigh];
|
||||||
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -614,9 +614,9 @@ static Class imageClass;
|
||||||
{
|
{
|
||||||
[aCoder encodeObject: _title];
|
[aCoder encodeObject: _title];
|
||||||
[aCoder encodeObject: _keyEquivalent];
|
[aCoder encodeObject: _keyEquivalent];
|
||||||
[aCoder encodeValueOfObjCType: "I" at: &_keyEquivalentModifierMask];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_keyEquivalentModifierMask];
|
||||||
[aCoder encodeValueOfObjCType: "I" at: &_mnemonicLocation];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_mnemonicLocation];
|
||||||
[aCoder encodeValueOfObjCType: "i" at: &_state];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_state];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||||
[aCoder encodeObject: _image];
|
[aCoder encodeObject: _image];
|
||||||
[aCoder encodeObject: _onStateImage];
|
[aCoder encodeObject: _onStateImage];
|
||||||
|
@ -624,7 +624,7 @@ static Class imageClass;
|
||||||
[aCoder encodeObject: _mixedStateImage];
|
[aCoder encodeObject: _mixedStateImage];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_changesState];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_changesState];
|
||||||
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_action];
|
[aCoder encodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||||
[aCoder encodeValueOfObjCType: "i" at: &_tag];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
[aCoder encodeConditionalObject: _representedObject];
|
[aCoder encodeConditionalObject: _representedObject];
|
||||||
[aCoder encodeObject: _submenu];
|
[aCoder encodeObject: _submenu];
|
||||||
[aCoder encodeConditionalObject: _target];
|
[aCoder encodeConditionalObject: _target];
|
||||||
|
@ -729,13 +729,13 @@ static Class imageClass;
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_title];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_title];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_keyEquivalent];
|
||||||
[aDecoder decodeValueOfObjCType: "I" at: &_keyEquivalentModifierMask];
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger) at: &_keyEquivalentModifierMask];
|
||||||
if (version <= 3)
|
if (version <= 3)
|
||||||
{
|
{
|
||||||
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
_keyEquivalentModifierMask = _keyEquivalentModifierMask << 16;
|
||||||
}
|
}
|
||||||
[aDecoder decodeValueOfObjCType: "I" at: &_mnemonicLocation];
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger) at: &_mnemonicLocation];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &_state];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_state];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_image];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_image];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_onStateImage];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_onStateImage];
|
||||||
|
@ -747,7 +747,7 @@ static Class imageClass;
|
||||||
_target = [aDecoder decodeObject];
|
_target = [aDecoder decodeObject];
|
||||||
}
|
}
|
||||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||||
[aDecoder decodeValueOfObjCType: "i" at: &_tag];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_representedObject];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_representedObject];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_submenu];
|
[aDecoder decodeValueOfObjCType: @encode(id) at: &_submenu];
|
||||||
if (version >= 2)
|
if (version >= 2)
|
||||||
|
|
|
@ -470,8 +470,8 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
{
|
{
|
||||||
unsigned count;
|
unsigned count;
|
||||||
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(int) at: &_alignment];
|
[aCoder decodeValueOfObjCType: @encode(NSTextAlignment) at: &_alignment];
|
||||||
[aCoder decodeValueOfObjCType: @encode(int) at: &_lineBreakMode];
|
[aCoder decodeValueOfObjCType: @encode(NSLineBreakMode) at: &_lineBreakMode];
|
||||||
[aCoder decodeValueOfObjCType: @encode(float) at: &_firstLineHeadIndent];
|
[aCoder decodeValueOfObjCType: @encode(float) at: &_firstLineHeadIndent];
|
||||||
[aCoder decodeValueOfObjCType: @encode(float) at: &_headIndent];
|
[aCoder decodeValueOfObjCType: @encode(float) at: &_headIndent];
|
||||||
[aCoder decodeValueOfObjCType: @encode(float) at: &_lineSpacing];
|
[aCoder decodeValueOfObjCType: @encode(float) at: &_lineSpacing];
|
||||||
|
@ -494,7 +494,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
[aCoder decodeArrayOfObjCType: @encode(float)
|
[aCoder decodeArrayOfObjCType: @encode(float)
|
||||||
count: count
|
count: count
|
||||||
at: locations];
|
at: locations];
|
||||||
[aCoder decodeArrayOfObjCType: @encode(int)
|
[aCoder decodeArrayOfObjCType: @encode(NSTextTabType)
|
||||||
count: count
|
count: count
|
||||||
at: types];
|
at: types];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
|
@ -510,7 +510,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
|
|
||||||
if ([aCoder versionForClassName: @"NSParagraphStyle"] >= 2)
|
if ([aCoder versionForClassName: @"NSParagraphStyle"] >= 2)
|
||||||
{
|
{
|
||||||
[aCoder decodeValueOfObjCType: @encode(int) at: &_baseDirection];
|
[aCoder decodeValueOfObjCType: @encode(NSWritingDirection) at: &_baseDirection];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,8 +527,8 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
{
|
{
|
||||||
unsigned count;
|
unsigned count;
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_alignment];
|
[aCoder encodeValueOfObjCType: @encode(NSTextAlignment) at: &_alignment];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_lineBreakMode];
|
[aCoder encodeValueOfObjCType: @encode(NSLineBreakMode) at: &_lineBreakMode];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_firstLineHeadIndent];
|
[aCoder encodeValueOfObjCType: @encode(float) at: &_firstLineHeadIndent];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_headIndent];
|
[aCoder encodeValueOfObjCType: @encode(float) at: &_headIndent];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_lineSpacing];
|
[aCoder encodeValueOfObjCType: @encode(float) at: &_lineSpacing];
|
||||||
|
@ -558,12 +558,12 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
[aCoder encodeArrayOfObjCType: @encode(float)
|
[aCoder encodeArrayOfObjCType: @encode(float)
|
||||||
count: count
|
count: count
|
||||||
at: locations];
|
at: locations];
|
||||||
[aCoder encodeArrayOfObjCType: @encode(int)
|
[aCoder encodeArrayOfObjCType: @encode(NSTextTabType)
|
||||||
count: count
|
count: count
|
||||||
at: types];
|
at: types];
|
||||||
}
|
}
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_baseDirection];
|
[aCoder encodeValueOfObjCType: @encode(NSWritingDirection) at: &_baseDirection];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,7 +692,7 @@ static NSParagraphStyle *defaultStyle = nil;
|
||||||
_lineHeightMultiple = factor;
|
_lineHeightMultiple = factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setParagraphSpacingBefore: (float)spacing
|
- (void) setParagraphSpacingBefore: (CGFloat)spacing
|
||||||
{
|
{
|
||||||
_paragraphSpacingBefore = spacing;
|
_paragraphSpacingBefore = spacing;
|
||||||
}
|
}
|
||||||
|
|
|
@ -544,7 +544,7 @@
|
||||||
[aCoder encodeObject: _image];
|
[aCoder encodeObject: _image];
|
||||||
[aCoder encodeConditionalObject: _representedObject];
|
[aCoder encodeConditionalObject: _representedObject];
|
||||||
[aCoder encodePoint: _imageOrigin];
|
[aCoder encodePoint: _imageOrigin];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_location];
|
[aCoder encodeValueOfObjCType: @encode(CGFloat) at: &_location];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isMovable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isMovable];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isRemovable];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_isRemovable];
|
||||||
}
|
}
|
||||||
|
@ -555,7 +555,7 @@
|
||||||
_image = [aDecoder decodeObject];
|
_image = [aDecoder decodeObject];
|
||||||
_representedObject = [aDecoder decodeObject];
|
_representedObject = [aDecoder decodeObject];
|
||||||
_imageOrigin = [aDecoder decodePoint];
|
_imageOrigin = [aDecoder decodePoint];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_location];
|
[aDecoder decodeValueOfObjCType: @encode(CGFloat) at: &_location];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isMovable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isMovable];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isRemovable];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_isRemovable];
|
||||||
|
|
||||||
|
|
|
@ -861,14 +861,19 @@ static NSMutableDictionary *units = nil;
|
||||||
|
|
||||||
- (void) encodeWithCoder: (NSCoder *)encoder
|
- (void) encodeWithCoder: (NSCoder *)encoder
|
||||||
{
|
{
|
||||||
|
[super encodeWithCoder: encoder];
|
||||||
/* FIXME/TODO: not implemented */
|
/* FIXME/TODO: not implemented */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initWithCoder: (NSCoder *)decoder
|
- (id) initWithCoder: (NSCoder *)decoder
|
||||||
{
|
{
|
||||||
/* FIXME/TODO: not implemented */
|
self = [super initWithCoder: decoder];
|
||||||
|
if (self == nil)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
|
/* FIXME/TODO: not implemented */
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
|
|
|
@ -210,8 +210,8 @@
|
||||||
[aCoder encodeObject: _menu];
|
[aCoder encodeObject: _menu];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_selected];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_selected];
|
||||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_width];
|
[aCoder encodeValueOfObjCType: @encode(CGFloat) at: &_width];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_tag];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,8 +245,8 @@
|
||||||
ASSIGN(_menu, [aDecoder decodeObject]);
|
ASSIGN(_menu, [aDecoder decodeObject]);
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_enabled];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_selected];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_selected];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_width];
|
[aDecoder decodeValueOfObjCType: @encode(CGFloat) at: &_width];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_tag];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_tag];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -626,7 +626,7 @@
|
||||||
{
|
{
|
||||||
int style;
|
int style;
|
||||||
[aCoder encodeObject: _items];
|
[aCoder encodeObject: _items];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_selected_segment];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_selected_segment];
|
||||||
style = _segmentCellFlags._style;
|
style = _segmentCellFlags._style;
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &style];
|
[aCoder encodeValueOfObjCType: @encode(int) at: &style];
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@
|
||||||
|
|
||||||
_segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne;
|
_segmentCellFlags._tracking_mode = NSSegmentSwitchTrackingSelectOne;
|
||||||
ASSIGN(_items,[aDecoder decodeObject]);
|
ASSIGN(_items,[aDecoder decodeObject]);
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_selected_segment];
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger) at: &_selected_segment];
|
||||||
if (_selected_segment != -1)
|
if (_selected_segment != -1)
|
||||||
[self setSelectedSegment: _selected_segment];
|
[self setSelectedSegment: _selected_segment];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &style];
|
[aDecoder decodeValueOfObjCType: @encode(int) at: &style];
|
||||||
|
|
|
@ -4581,7 +4581,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
||||||
at: &_is_rotated_or_scaled_from_base];
|
at: &_is_rotated_or_scaled_from_base];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_post_frame_changes];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_post_frame_changes];
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoresizes_subviews];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoresizes_subviews];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_autoresizingMask];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_autoresizingMask];
|
||||||
[aCoder encodeConditionalObject: [self nextKeyView]];
|
[aCoder encodeConditionalObject: [self nextKeyView]];
|
||||||
[aCoder encodeConditionalObject: [self previousKeyView]];
|
[aCoder encodeConditionalObject: [self previousKeyView]];
|
||||||
[aCoder encodeObject: _sub_views];
|
[aCoder encodeObject: _sub_views];
|
||||||
|
@ -4729,7 +4729,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_post_frame_changes];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_post_frame_changes];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
||||||
at: &_autoresizes_subviews];
|
at: &_autoresizes_subviews];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||||
at: &_autoresizingMask];
|
at: &_autoresizingMask];
|
||||||
_coordinates_valid = NO;
|
_coordinates_valid = NO;
|
||||||
[self setNextKeyView: [aDecoder decodeObject]];
|
[self setNextKeyView: [aDecoder decodeObject]];
|
||||||
|
|
|
@ -5283,8 +5283,9 @@ current key view.<br />
|
||||||
[super encodeWithCoder: aCoder];
|
[super encodeWithCoder: aCoder];
|
||||||
|
|
||||||
[aCoder encodeRect: [[self contentView] frame]];
|
[aCoder encodeRect: [[self contentView] frame]];
|
||||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &_styleMask];
|
[aCoder encodeValueOfObjCType: @encode(NSUInteger) at: &_styleMask];
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_backingType];
|
// This used to be int, we need to stay compatible
|
||||||
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_backingType];
|
||||||
|
|
||||||
[aCoder encodePoint: NSMakePoint(NSMinX([self frame]), NSMaxY([self frame]))];
|
[aCoder encodePoint: NSMakePoint(NSMinX([self frame]), NSMaxY([self frame]))];
|
||||||
[aCoder encodeObject: _contentView];
|
[aCoder encodeObject: _contentView];
|
||||||
|
@ -5296,7 +5297,7 @@ current key view.<br />
|
||||||
[aCoder encodeSize: _minimumSize];
|
[aCoder encodeSize: _minimumSize];
|
||||||
[aCoder encodeSize: _maximumSize];
|
[aCoder encodeSize: _maximumSize];
|
||||||
|
|
||||||
[aCoder encodeValueOfObjCType: @encode(int) at: &_windowLevel];
|
[aCoder encodeValueOfObjCType: @encode(NSInteger) at: &_windowLevel];
|
||||||
|
|
||||||
flag = _f.menu_exclude;
|
flag = _f.menu_exclude;
|
||||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
|
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &flag];
|
||||||
|
@ -5345,13 +5346,14 @@ current key view.<br />
|
||||||
NSPoint p;
|
NSPoint p;
|
||||||
NSUInteger aStyle;
|
NSUInteger aStyle;
|
||||||
NSBackingStoreType aBacking;
|
NSBackingStoreType aBacking;
|
||||||
int anInt;
|
NSInteger level;
|
||||||
id obj;
|
id obj;
|
||||||
|
|
||||||
aRect = [aDecoder decodeRect];
|
aRect = [aDecoder decodeRect];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(unsigned)
|
[aDecoder decodeValueOfObjCType: @encode(NSUInteger)
|
||||||
at: &aStyle];
|
at: &aStyle];
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int)
|
// This used to be int, we need to stay compatible
|
||||||
|
[aDecoder decodeValueOfObjCType: @encode(NSInteger)
|
||||||
at: &aBacking];
|
at: &aBacking];
|
||||||
|
|
||||||
// call the designated initializer....
|
// call the designated initializer....
|
||||||
|
@ -5378,8 +5380,8 @@ current key view.<br />
|
||||||
[self setMaxSize: aSize];
|
[self setMaxSize: aSize];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(int)
|
[aDecoder decodeValueOfObjCType: @encode(int)
|
||||||
at: &anInt];
|
at: &level];
|
||||||
[self setLevel: anInt];
|
[self setLevel: level];
|
||||||
|
|
||||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &flag];
|
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &flag];
|
||||||
[self setExcludedFromWindowsMenu: flag];
|
[self setExcludedFromWindowsMenu: flag];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue