JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
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< jobject > createOrientationEventListener ()
 
void orientationChanged (int orientation)
 
void timerCallback () override
 

Static Private Member Functions

static void deviceOrientationChanged (JNIEnv *, jobject, jlong host, 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

◆ deviceOrientationChanged()

static void CameraDevice::Pimpl::DeviceOrientationChangeListener::deviceOrientationChanged ( JNIEnv *  ,
jobject  ,
jlong  host,
jint  orientation 
)
inlinestaticprivate

◆ getDeviceOrientation()

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

◆ isSupported()

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

References canDetectChange.

◆ orientationChanged()

void CameraDevice::Pimpl::DeviceOrientationChangeListener::orientationChanged ( int  orientation)
inlineprivate

◆ 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

◆ lastKnownScreenOrientation

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

◆ 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: