import typing

import android.content
import android.graphics
import android.hardware
import android.view
import java
import java.lang
import org.osmdroid
import org.osmdroid.views
import org.osmdroid.views.overlay

class CompassOverlay(org.osmdroid.views.overlay.IOverlayMenuProvider, org.osmdroid.views.overlay.Overlay, IOrientationConsumer):
    MENU_COMPASS: typing.ClassVar[int] = ...
    mCompassFrameBitmap: android.graphics.Bitmap = ...
    mCompassFrameCenterX: float = ...
    mCompassFrameCenterY: float = ...
    mCompassRoseBitmap: android.graphics.Bitmap = ...
    mCompassRoseCenterX: float = ...
    mCompassRoseCenterY: float = ...
    mMapView: org.osmdroid.views.MapView = ...
    mOrientationProvider: IOrientationProvider = ...
    mPaint: android.graphics.Paint = ...
    @typing.overload
    def __init__(self, context: android.content.Context, mapView: org.osmdroid.views.MapView, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, orientationProvider: IOrientationProvider, mapView: org.osmdroid.views.MapView, /) -> None: ...
    @typing.overload
    def __init__(self, context: android.content.Context, orientationProvider: IOrientationProvider, mapView: org.osmdroid.views.MapView, pResourceProxy: org.osmdroid.ResourceProxy, /) -> None: ...
    def disableCompass(self) -> None: ...
    def draw(self, c: android.graphics.Canvas, mapView: org.osmdroid.views.MapView, shadow: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def drawCompass(self, canvas: android.graphics.Canvas, bearing: float | java.jfloat | java.lang.Float, screenRect: android.graphics.Rect, /) -> None: ...
    @typing.overload
    def enableCompass(self) -> bool: ...
    @typing.overload
    def enableCompass(self, orientationProvider: IOrientationProvider, /) -> bool: ...
    def getOrientation(self) -> float: ...
    def getOrientationProvider(self) -> IOrientationProvider: ...
    def isCompassEnabled(self) -> bool: ...
    def isOptionsMenuEnabled(self) -> bool: ...
    def onCreateOptionsMenu(self, pMenu: android.view.Menu, pMenuIdOffset: int | java.jint | java.lang.Integer, pMapView: org.osmdroid.views.MapView, /) -> bool: ...
    def onDetach(self, mapView: org.osmdroid.views.MapView, /) -> None: ...
    def onOptionsItemSelected(self, pItem: android.view.MenuItem, pMenuIdOffset: int | java.jint | java.lang.Integer, pMapView: org.osmdroid.views.MapView, /) -> bool: ...
    def onOrientationChanged(self, orientation: float | java.jfloat | java.lang.Float, source: IOrientationProvider, /) -> None: ...
    def onPrepareOptionsMenu(self, pMenu: android.view.Menu, pMenuIdOffset: int | java.jint | java.lang.Integer, pMapView: org.osmdroid.views.MapView, /) -> bool: ...
    def setCompassCenter(self, x: float | java.jfloat | java.lang.Float, y: float | java.jfloat | java.lang.Float, /) -> None: ...
    def setOptionsMenuEnabled(self, pOptionsMenuEnabled: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setOrientationProvider(self, orientationProvider: IOrientationProvider, /) -> None: ...

class IOrientationConsumer(java.lang.Object):
    def onOrientationChanged(self, arg1: float | java.jfloat | java.lang.Float, arg2: IOrientationProvider, /) -> None: ...

class IOrientationProvider(java.lang.Object):
    def getLastKnownOrientation(self) -> float: ...
    def startOrientationProvider(self, arg1: IOrientationConsumer, /) -> bool: ...
    def stopOrientationProvider(self) -> None: ...

class InternalCompassOrientationProvider(IOrientationProvider, android.hardware.SensorEventListener):
    def __init__(self, context: android.content.Context, /) -> None: ...
    def getLastKnownOrientation(self) -> float: ...
    def onAccuracyChanged(self, sensor: android.hardware.Sensor, accuracy: int | java.jint | java.lang.Integer, /) -> None: ...
    def onSensorChanged(self, event: android.hardware.SensorEvent, /) -> None: ...
    def startOrientationProvider(self, orientationConsumer: IOrientationConsumer, /) -> bool: ...
    def stopOrientationProvider(self) -> None: ...
