Add implementation for WrapMode initializer.
Some checks failed
SwiftLint / SwiftLint (pull_request) Has been cancelled
Some checks failed
SwiftLint / SwiftLint (pull_request) Has been cancelled
This commit is contained in:
parent
0d4db96f60
commit
6e6265aa76
@ -36,8 +36,19 @@ public enum WrapMode: GtkWrapMode, RawRepresentable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize from the GtkWrapMode.
|
/// Initialize from the GtkWrapMode.
|
||||||
/// - Parameter rawValue: The GtkWrapMode.
|
/// - Parameter rawValue: The GtkWrapMode.
|
||||||
public init?(rawValue: GtkWrapMode) {
|
public init?(rawValue: GtkWrapMode) {
|
||||||
nil
|
switch rawValue {
|
||||||
|
case GTK_WRAP_NONE:
|
||||||
|
self = .none
|
||||||
|
case GTK_WRAP_CHAR:
|
||||||
|
self = .char
|
||||||
|
case GTK_WRAP_WORD:
|
||||||
|
self = .word
|
||||||
|
case GTK_WRAP_WORD_CHAR:
|
||||||
|
self = .wordChar
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user