from __future__ import annotations
from typing import Any, Protocol, runtime_checkable
from com.sun.star.uno import XInterface

@runtime_checkable
class XTextSearch(XInterface, Protocol):
    def setOptions(self, options: SearchOptions) -> None: ...
    def searchForward(self, searchStr: str, startPos: int, endPos: int) -> SearchResult: ...
    def searchBackward(self, searchStr: str, startPos: int, endPos: int) -> SearchResult: ...
