JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
CameraDevice::Pimpl::DeviceOrientationChangeListener Class Reference
Inheritance diagram for CameraDevice::Pimpl::DeviceOrientationChangeListener:
Collaboration diagram for CameraDevice::Pimpl::DeviceOrientationChangeListener:

Public Member Functions

 DeviceOrientationChangeListener (PreviewDisplay &pd)
 
 ~DeviceOrientationChangeListener () override
 
Desktop::DisplayOrientation getDeviceOrientation () const noexcept
 
bool isSupported () const noexcept
 
void setEnabled (bool shouldBeEnabled)
 

Private Member Functions

LocalRef< jobjectcreateOrientationEventListener ()
 
void timerCallback () override
 

Static Private Member Functions

static void orientationChanged (JNIEnv *, DeviceOrientationChangeListener &t, jint orientation)
 

Private Attributes

bool canDetectChange
 
Desktop::DisplayOrientation deviceOrientation
 
Desktop::DisplayOrientation lastKnownScreenOrientation
 
int numChecksForOrientationChange = 10
 
GlobalRef orientationEventListener
 
PreviewDisplaypreviewDisplay
 

Static Private Attributes

static constexpr jint sensorDelayUI = 2
 

Constructor & Destructor Documentation

◆ DeviceOrientationChangeListener()

CameraDevice::Pimpl::DeviceOrientationChangeListener::DeviceOrientationChangeListener ( PreviewDisplay pd)
inline

References setEnabled().

◆ ~DeviceOrientationChangeListener()

CameraDevice::Pimpl::DeviceOrientationChangeListener::~DeviceOrientationChangeListener ( )
inlineoverride

References setEnabled().

Member Function Documentation

◆ createOrientationEventListener()

LocalRef< jobject > CameraDevice::Pimpl::DeviceOrientationChangeListener::createOrientationEventListener ( )
inlineprivate

References sensorDelayUI.

◆ getDeviceOrientation()

Desktop::DisplayOrientation CameraDevice::Pimpl::DeviceOrientationChangeListener::getDeviceOrientation ( ) const
inlinenoexcept

◆ isSupported()

bool CameraDevice::Pimpl::DeviceOrientationChangeListener::isSupported ( ) const
inlinenoexcept

References canDetectChange.

◆ orientationChanged()

static void CameraDevice::Pimpl::DeviceOrientationChangeListener::orientationChanged ( JNIEnv *  ,
DeviceOrientationChangeListener t,
jint  orientation 
)
inlinestaticprivate

References jassert.

◆ setEnabled()

void CameraDevice::Pimpl::DeviceOrientationChangeListener::setEnabled ( bool  shouldBeEnabled)
inline

◆ timerCallback()

void CameraDevice::Pimpl::DeviceOrientationChangeListener::timerCallback ( )
inlineoverrideprivate

Member Data Documentation

◆ canDetectChange

bool CameraDevice::Pimpl::DeviceOrientationChangeListener::canDetectChange
private

Referenced by isSupported(), and setEnabled().

◆ deviceOrientation

Desktop::DisplayOrientation CameraDevice::Pimpl::DeviceOrientationChangeListener::deviceOrientation
private

Referenced by getDeviceOrientation().

◆ lastKnownScreenOrientation

Desktop::DisplayOrientation CameraDevice::Pimpl::DeviceOrientationChangeListener::lastKnownScreenOrientation
private

Referenced by timerCallback().

◆ numChecksForOrientationChange

int CameraDevice::Pimpl::DeviceOrientationChangeListener::numChecksForOrientationChange = 10
private

Referenced by timerCallback().

◆ orientationEventListener

GlobalRef CameraDevice::Pimpl::DeviceOrientationChangeListener::orientationEventListener
private

Referenced by setEnabled().

◆ previewDisplay

PreviewDisplay& CameraDevice::Pimpl::DeviceOrientationChangeListener::previewDisplay
private

Referenced by timerCallback().

◆ sensorDelayUI

constexpr jint CameraDevice::Pimpl::DeviceOrientationChangeListener::sensorDelayUI = 2
staticconstexprprivate

The documentation for this class was generated from the following file: