Merge pull request 'Add implementation for WrapMode initializer.' (#71) from mlm/adwaita-swift:AddInitializerImplementation into main
Reviewed-on: #71 Reviewed-by: david-swift <david-swift@noreply.aproksha.uber.space>
This commit is contained in:
commit
fea203fabd
@ -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