mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Encoding
This commit is contained in:
parent
0a402df303
commit
e17c1287b3
1 changed files with 17 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#import <AppKit/NSAppearance.h>
|
||||
#import <Foundation/NSArchiver.h>
|
||||
|
||||
NSAppearance *__currentAppearance = nil;
|
||||
|
||||
|
@ -47,11 +48,27 @@ NSAppearance *__currentAppearance = nil;
|
|||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = [coder decodeObject];
|
||||
[coder decodeValueOfObjCType: @encode(BOOL) at: &_allowsVibrancy];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
[coder encodeObject: _name];
|
||||
[coder encodeValueOfObjCType: @encode(BOOL) at: &_allowsVibrancy];
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype) copyWithZone: (NSZone *)zone
|
||||
|
|
Loading…
Reference in a new issue