/// <summary> /// Obtains the range selected by caret in the composition text. /// </summary> /// <param name="start">An integer indicating a start offset of selection range.</param> /// <param name="end">An integer indicating an end offset of selection range.</param> public void GetSelection(out uint start, out uint end) { PPBIMEInputEvent.GetSelection(this, out start, out end); }
/// <summary> /// Returns the position of the index-th segmentation point in the composition /// text. The position is given by a byte-offset (not a character-offset) of /// the string returned by GetText(). It always satisfies /// 0=GetSegmentOffset(0) < ... < GetSegmentOffset(i) < GetSegmentOffset(i+1) /// < ... < GetSegmentOffset(GetSegmentNumber())=(byte-length of GetText()). /// Note that [GetSegmentOffset(i), GetSegmentOffset(i+1)) represents the /// range of the i-th segment, and hence GetSegmentNumber() can be a valid /// argument to this function instead of an off-by-1 error. /// </summary> /// <param name="index">An integer indicating a segment.</param> /// <returns> /// The byte-offset of the segmentation point.If the event is not /// COMPOSITION_UPDATE or index is out of range, returns 0. /// </returns> public uint GetSegmentOffset(uint index) { return(PPBIMEInputEvent.GetSegmentOffset(this, index)); }