Ryujinx-GtkSharp/Source/Libs/PangoSharp/LogAttr.cs
dmg 4c80c5fc42 Added/fixed some Pango APIs
* Added pango_layout_get_direction
* Added pango_layout_get_line_spacing / pango_layout_set_line_spacing
* Added pango_layout_line_get_height
* Added return type to pango_itemize_with_base_dir
* Fixed pango_layout_line_get_x_ranges
* Fixed pango_layout_get_log_attrs / pango_layout_get_log_attrs_readonly (using only readonly version because we make copy anyway, added LogAttr bitfield reading properties)
2021-06-02 22:33:03 +03:00

26 lines
1.1 KiB
C#

namespace Pango {
using System;
public partial struct LogAttr {
public LogAttr(uint bitfield) => _bitfield0 = bitfield;
public override string ToString() => Convert.ToString(_bitfield0 & 0x1FFF, 2).PadLeft(13, '0');
public uint Bitfield => _bitfield0;
public bool IsLineBreak => (_bitfield0 & (1 << 0)) != 0;
public bool IsMandatoryBreak => (_bitfield0 & (1 << 1)) != 0;
public bool IsCharBreak => (_bitfield0 & (1 << 2)) != 0;
public bool IsWhite => (_bitfield0 & (1 << 3)) != 0;
public bool IsCursorPosition => (_bitfield0 & (1 << 4)) != 0;
public bool IsWordStart => (_bitfield0 & (1 << 5)) != 0;
public bool IsWordEnd => (_bitfield0 & (1 << 6)) != 0;
public bool IsSentenceBoundary => (_bitfield0 & (1 << 7)) != 0;
public bool IsSentenceStart => (_bitfield0 & (1 << 8)) != 0;
public bool IsSentenceEnd => (_bitfield0 & (1 << 9)) != 0;
public bool BackspaceDeletesCharacter => (_bitfield0 & (1 << 10)) != 0;
public bool IsExpandableSpace => (_bitfield0 & (1 << 11)) != 0;
public bool IsWordBoundary => (_bitfield0 & (1 << 12)) != 0;
}
}