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

@runtime_checkable
class XDevice(XInterface, Protocol):
    def createGraphics(self) -> XGraphics: ...
    def createDevice(self, nWidth: int, nHeight: int) -> XDevice: ...
    def getInfo(self) -> DeviceInfo: ...
    def getFontDescriptors(self) -> list[FontDescriptor]: ...
    def getFont(self, aDescriptor: FontDescriptor) -> XFont: ...
    def createBitmap(self, nX: int, nY: int, nWidth: int, nHeight: int) -> XBitmap: ...
    def createDisplayBitmap(self, Bitmap: XBitmap) -> XDisplayBitmap: ...
