tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BidiInfo.d.ts (1088B)


      1 // generated by diplomat-tool
      2 import type { BidiParagraph } from "./BidiParagraph"
      3 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      4 
      5 
      6 /**
      7 * An object containing bidi information for a given string, produced by `for_text()` on `Bidi`
      8 *
      9 * See the [Rust documentation for `BidiInfo`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html) for more information.
     10 */
     11 
     12 
     13 export class BidiInfo {
     14    get ffiValue(): pointer;
     15 
     16 
     17    /**
     18     * The number of paragraphs contained here
     19     */
     20    get paragraphCount(): number;
     21 
     22    /**
     23     * Get the nth paragraph, returning `None` if out of bounds
     24     */
     25    paragraphAt(n: number): BidiParagraph | null;
     26 
     27    /**
     28     * The number of bytes in this full text
     29     */
     30    get size(): number;
     31 
     32    /**
     33     * Get the BIDI level at a particular byte index in the full text.
     34     * This integer is conceptually a `unicode_bidi::Level`,
     35     * and can be further inspected using the static methods on Bidi.
     36     *
     37     * Returns 0 (equivalent to `Level::ltr()`) on error
     38     */
     39    levelAt(pos: number): number;
     40 }