openshot-audio  0.1.2
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
LinuxComponentPeer Class Reference
Inheritance diagram for LinuxComponentPeer:
ComponentPeer

Public Member Functions

 LinuxComponentPeer (Component &comp, const int windowStyleFlags, Window parentToAddTo)
 
 ~LinuxComponentPeer ()
 
void * getNativeHandle () const override
 
void setVisible (bool shouldBeVisible) override
 
void setTitle (const String &title) override
 
void setBounds (const Rectangle< int > &newBounds, bool isNowFullScreen) override
 
Rectangle< int > getBounds () const override
 
Point< float > localToGlobal (Point< float > relativePosition) override
 
Point< float > globalToLocal (Point< float > screenPosition) override
 
void setAlpha (float) override
 
StringArray getAvailableRenderingEngines () override
 
void setMinimised (bool shouldBeMinimised) override
 
bool isMinimised () const override
 
void setFullScreen (const bool shouldBeFullScreen) override
 
bool isFullScreen () const override
 
bool isChildWindowOf (Window possibleParent) const
 
bool isFrontWindow () const
 
bool contains (Point< int > localPos, bool trueIfInAChildWindow) const override
 
BorderSize< int > getFrameSize () const override
 
bool setAlwaysOnTop (bool) override
 
void toFront (bool makeActive) override
 
void toBehind (ComponentPeer *other) override
 
bool isFocused () const override
 
void grabFocus () override
 
void textInputRequired (Point< int >, TextInputTarget &) override
 
void repaint (const Rectangle< int > &area) override
 
void performAnyPendingRepaintsNow () override
 
void setIcon (const Image &newIcon) override
 
void deleteIconPixmaps ()
 
void handleWindowMessage (XEvent &event)
 
void handleKeyPressEvent (XKeyEvent &keyEvent)
 
void handleKeyReleaseEvent (const XKeyEvent &keyEvent)
 
template<typename EventType >
Point< float > getMousePos (const EventType &e) noexcept
 
void handleWheelEvent (const XButtonPressedEvent &buttonPressEvent, const float amount)
 
void handleButtonPressEvent (const XButtonPressedEvent &buttonPressEvent, int buttonModifierFlag)
 
void handleButtonPressEvent (const XButtonPressedEvent &buttonPressEvent)
 
void handleButtonReleaseEvent (const XButtonReleasedEvent &buttonRelEvent)
 
void handleMotionNotifyEvent (const XPointerMovedEvent &movedEvent)
 
void handleEnterNotifyEvent (const XEnterWindowEvent &enterEvent)
 
void handleLeaveNotifyEvent (const XLeaveWindowEvent &leaveEvent)
 
void handleFocusInEvent ()
 
void handleFocusOutEvent ()
 
void handleExposeEvent (XExposeEvent &exposeEvent)
 
void handleConfigureNotifyEvent (XConfigureEvent &confEvent)
 
void handleReparentNotifyEvent ()
 
void handleGravityNotify ()
 
void handleMappingNotify (XMappingEvent &mappingEvent)
 
void handleClientMessageEvent (XClientMessageEvent &clientMsg, XEvent &event)
 
bool externalDragTextInit (const String &text)
 
bool externalDragFileInit (const StringArray &files, bool)
 
void showMouseCursor (Cursor cursor) noexcept
 
double getCurrentScale () noexcept
 
void addOpenGLRepaintListener (Component *dummy)
 
void removeOpenGLRepaintListener (Component *dummy)
 
void repaintOpenGLContexts ()
 
- Public Member Functions inherited from ComponentPeer
 ComponentPeer (Component &component, int styleFlags)
 
virtual ~ComponentPeer ()
 
ComponentgetComponent () noexcept
 
int getStyleFlags () const noexcept
 
uint32 getUniqueID () const noexcept
 
virtual bool setDocumentEditedStatus (bool edited)
 
virtual void setRepresentedFile (const File &)
 
void updateBounds ()
 
Point< int > localToGlobal (Point< int > relativePosition)
 
Point< int > globalToLocal (Point< int > screenPosition)
 
virtual Rectangle< int > localToGlobal (const Rectangle< int > &relativePosition)
 
virtual Rectangle< int > globalToLocal (const Rectangle< int > &screenPosition)
 
Rectangle< int > getAreaCoveredBy (Component &subComponent) const
 
virtual bool isKioskMode () const
 
void setNonFullScreenBounds (const Rectangle< int > &newBounds) noexcept
 
const Rectangle< int > & getNonFullScreenBounds () const noexcept
 
void setConstrainer (ComponentBoundsConstrainer *newConstrainer) noexcept
 
ComponentBoundsConstrainergetConstrainer () const noexcept
 
void handleMovedOrResized ()
 
virtual void handleScreenSizeChange ()
 
void handlePaint (LowLevelGraphicsContext &contextToPaintTo)
 
void handleBroughtToFront ()
 
void handleFocusGain ()
 
void handleFocusLoss ()
 
ComponentgetLastFocusedSubcomponent () const noexcept
 
bool handleKeyPress (int keyCode, juce_wchar textCharacter)
 
bool handleKeyUpOrDown (bool isKeyDown)
 
void handleModifierKeysChange ()
 
virtual void dismissPendingTextInput ()
 
TextInputTargetfindCurrentTextInputTarget ()
 
void handleMouseEvent (int touchIndex, Point< float > positionWithinPeer, ModifierKeys newMods, int64 time)
 
void handleMouseWheel (int touchIndex, Point< float > positionWithinPeer, int64 time, const MouseWheelDetails &)
 
void handleMagnifyGesture (int touchIndex, Point< float > positionWithinPeer, int64 time, float scaleFactor)
 
void handleUserClosingWindow ()
 
bool handleDragMove (const DragInfo &)
 
bool handleDragExit (const DragInfo &)
 
bool handleDragDrop (const DragInfo &)
 
virtual int getCurrentRenderingEngine () const
 
virtual void setCurrentRenderingEngine (int index)
 

Static Public Member Functions

static void windowMessageReceive (XEvent &event)
 
static LinuxComponentPeergetPeerFor (Window windowHandle) noexcept
 
static bool isKeyReleasePartOfAutoRepeat (const XKeyEvent &keyReleaseEvent)
 
- Static Public Member Functions inherited from ComponentPeer
static int getNumPeers () noexcept
 
static ComponentPeergetPeer (int index) noexcept
 
static ComponentPeergetPeerFor (const Component *) noexcept
 
static bool isValidPeer (const ComponentPeer *peer) noexcept
 

Public Attributes

bool dontRepaint
 

Static Public Attributes

static ModifierKeys currentModifiers
 
static bool isActiveApplication = false
 

Friends

class LinuxRepaintManager
 

Additional Inherited Members

- Public Types inherited from ComponentPeer
enum  StyleFlags {
  windowAppearsOnTaskbar = (1 << 0), windowIsTemporary = (1 << 1), windowIgnoresMouseClicks = (1 << 2), windowHasTitleBar = (1 << 3),
  windowIsResizable = (1 << 4), windowHasMinimiseButton = (1 << 5), windowHasMaximiseButton = (1 << 6), windowHasCloseButton = (1 << 7),
  windowHasDropShadow = (1 << 8), windowRepaintedExplictly = (1 << 9), windowIgnoresKeyPresses = (1 << 10), windowIsSemiTransparent = (1 << 31)
}
 
- Protected Attributes inherited from ComponentPeer
Componentcomponent
 
const int styleFlags
 
Rectangle< int > lastNonFullscreenBounds
 
ComponentBoundsConstrainerconstrainer
 

Constructor & Destructor Documentation

◆ LinuxComponentPeer()

LinuxComponentPeer::LinuxComponentPeer ( Component comp,
const int  windowStyleFlags,
Window  parentToAddTo 
)
inline

◆ ~LinuxComponentPeer()

LinuxComponentPeer::~LinuxComponentPeer ( )
inline

Member Function Documentation

◆ addOpenGLRepaintListener()

void LinuxComponentPeer::addOpenGLRepaintListener ( Component dummy)
inline

◆ contains()

bool LinuxComponentPeer::contains ( Point< int >  localPos,
bool  trueIfInAChildWindow 
) const
inlineoverridevirtual

Checks if a point is in the window.

The position is relative to the top-left of this window, in unscaled peer coordinates. If trueIfInAChildWindow is false, then this returns false if the point is actually inside a child of this window.

Implements ComponentPeer.

◆ deleteIconPixmaps()

void LinuxComponentPeer::deleteIconPixmaps ( )
inline

◆ externalDragFileInit()

bool LinuxComponentPeer::externalDragFileInit ( const StringArray files,
bool   
)
inline

◆ externalDragTextInit()

bool LinuxComponentPeer::externalDragTextInit ( const String text)
inline

◆ getAvailableRenderingEngines()

StringArray LinuxComponentPeer::getAvailableRenderingEngines ( )
inlineoverridevirtual

Implements ComponentPeer.

◆ getBounds()

Rectangle<int> LinuxComponentPeer::getBounds ( ) const
inlineoverridevirtual

Returns the current position and size of the window.

If the native window is contained in another window, then the coordinates are relative to the parent window's origin, not the screen origin.

Implements ComponentPeer.

◆ getCurrentScale()

double LinuxComponentPeer::getCurrentScale ( )
inlinenoexcept

◆ getFrameSize()

BorderSize<int> LinuxComponentPeer::getFrameSize ( ) const
inlineoverridevirtual

Returns the size of the window frame that's around this window. Whether or not the window has a normal window frame depends on the flags that were set when the window was created by Component::addToDesktop()

Implements ComponentPeer.

◆ getMousePos()

template<typename EventType >
Point<float> LinuxComponentPeer::getMousePos ( const EventType &  e)
inlinenoexcept

◆ getNativeHandle()

void* LinuxComponentPeer::getNativeHandle ( ) const
inlineoverridevirtual

Returns the raw handle to whatever kind of window is being used.

On windows, this is probably a HWND, on the mac, it's likely to be a WindowRef, but remember there's no guarantees what you'll get back.

Implements ComponentPeer.

◆ getPeerFor()

static LinuxComponentPeer* LinuxComponentPeer::getPeerFor ( Window  windowHandle)
inlinestaticnoexcept

◆ globalToLocal()

Point<float> LinuxComponentPeer::globalToLocal ( Point< float >  screenPosition)
inlineoverridevirtual

Converts a screen coordinate to a position relative to the top-left of this component.

Implements ComponentPeer.

◆ grabFocus()

void LinuxComponentPeer::grabFocus ( )
inlineoverridevirtual

Tries to give the window keyboard focus.

Implements ComponentPeer.

◆ handleButtonPressEvent() [1/2]

void LinuxComponentPeer::handleButtonPressEvent ( const XButtonPressedEvent &  buttonPressEvent,
int  buttonModifierFlag 
)
inline

◆ handleButtonPressEvent() [2/2]

void LinuxComponentPeer::handleButtonPressEvent ( const XButtonPressedEvent &  buttonPressEvent)
inline

◆ handleButtonReleaseEvent()

void LinuxComponentPeer::handleButtonReleaseEvent ( const XButtonReleasedEvent &  buttonRelEvent)
inline

◆ handleClientMessageEvent()

void LinuxComponentPeer::handleClientMessageEvent ( XClientMessageEvent &  clientMsg,
XEvent &  event 
)
inline

◆ handleConfigureNotifyEvent()

void LinuxComponentPeer::handleConfigureNotifyEvent ( XConfigureEvent &  confEvent)
inline

◆ handleEnterNotifyEvent()

void LinuxComponentPeer::handleEnterNotifyEvent ( const XEnterWindowEvent &  enterEvent)
inline

◆ handleExposeEvent()

void LinuxComponentPeer::handleExposeEvent ( XExposeEvent &  exposeEvent)
inline

◆ handleFocusInEvent()

void LinuxComponentPeer::handleFocusInEvent ( )
inline

◆ handleFocusOutEvent()

void LinuxComponentPeer::handleFocusOutEvent ( )
inline

◆ handleGravityNotify()

void LinuxComponentPeer::handleGravityNotify ( )
inline

◆ handleKeyPressEvent()

void LinuxComponentPeer::handleKeyPressEvent ( XKeyEvent &  keyEvent)
inline

◆ handleKeyReleaseEvent()

void LinuxComponentPeer::handleKeyReleaseEvent ( const XKeyEvent &  keyEvent)
inline

◆ handleLeaveNotifyEvent()

void LinuxComponentPeer::handleLeaveNotifyEvent ( const XLeaveWindowEvent &  leaveEvent)
inline

◆ handleMappingNotify()

void LinuxComponentPeer::handleMappingNotify ( XMappingEvent &  mappingEvent)
inline

◆ handleMotionNotifyEvent()

void LinuxComponentPeer::handleMotionNotifyEvent ( const XPointerMovedEvent &  movedEvent)
inline

◆ handleReparentNotifyEvent()

void LinuxComponentPeer::handleReparentNotifyEvent ( )
inline

◆ handleWheelEvent()

void LinuxComponentPeer::handleWheelEvent ( const XButtonPressedEvent &  buttonPressEvent,
const float  amount 
)
inline

◆ handleWindowMessage()

void LinuxComponentPeer::handleWindowMessage ( XEvent &  event)
inline

◆ isChildWindowOf()

bool LinuxComponentPeer::isChildWindowOf ( Window  possibleParent) const
inline

◆ isFocused()

bool LinuxComponentPeer::isFocused ( ) const
inlineoverridevirtual

True if the window has the keyboard focus.

Implements ComponentPeer.

◆ isFrontWindow()

bool LinuxComponentPeer::isFrontWindow ( ) const
inline

◆ isFullScreen()

bool LinuxComponentPeer::isFullScreen ( ) const
inlineoverridevirtual

True if the window is currently full-screen.

Implements ComponentPeer.

◆ isKeyReleasePartOfAutoRepeat()

static bool LinuxComponentPeer::isKeyReleasePartOfAutoRepeat ( const XKeyEvent &  keyReleaseEvent)
inlinestatic

◆ isMinimised()

bool LinuxComponentPeer::isMinimised ( ) const
inlineoverridevirtual

True if the window is currently minimised.

Implements ComponentPeer.

◆ localToGlobal()

Point<float> LinuxComponentPeer::localToGlobal ( Point< float >  relativePosition)
inlineoverridevirtual

Converts a position relative to the top-left of this component to screen coordinates.

Implements ComponentPeer.

◆ performAnyPendingRepaintsNow()

void LinuxComponentPeer::performAnyPendingRepaintsNow ( )
inlineoverridevirtual

This can be called (from the message thread) to cause the immediate redrawing of any areas of this window that need repainting.

You shouldn't ever really need to use this, it's mainly for special purposes like supporting audio plugins where the host's event loop is out of our control.

Implements ComponentPeer.

◆ removeOpenGLRepaintListener()

void LinuxComponentPeer::removeOpenGLRepaintListener ( Component dummy)
inline

◆ repaint()

void LinuxComponentPeer::repaint ( const Rectangle< int > &  area)
inlineoverridevirtual

Invalidates a region of the window to be repainted asynchronously.

Implements ComponentPeer.

◆ repaintOpenGLContexts()

void LinuxComponentPeer::repaintOpenGLContexts ( )
inline

◆ setAlpha()

void LinuxComponentPeer::setAlpha ( float  newAlpha)
inlineoverridevirtual

Changes the window's transparency.

Implements ComponentPeer.

◆ setAlwaysOnTop()

bool LinuxComponentPeer::setAlwaysOnTop ( bool  alwaysOnTop)
inlineoverridevirtual

Sets this window to either be always-on-top or normal. Some kinds of window might not be able to do this, so should return false.

Implements ComponentPeer.

◆ setBounds()

void LinuxComponentPeer::setBounds ( const Rectangle< int > &  newBounds,
bool  isNowFullScreen 
)
inlineoverridevirtual

Moves and resizes the window.

If the native window is contained in another window, then the coordinates are relative to the parent window's origin, not the screen origin.

This should result in a callback to handleMovedOrResized().

Implements ComponentPeer.

◆ setFullScreen()

void LinuxComponentPeer::setFullScreen ( const bool  shouldBeFullScreen)
inlineoverridevirtual

Enable/disable fullscreen mode for the window.

Implements ComponentPeer.

◆ setIcon()

void LinuxComponentPeer::setIcon ( const Image newIcon)
inlineoverridevirtual

Attempts to change the icon associated with this window.

Implements ComponentPeer.

◆ setMinimised()

void LinuxComponentPeer::setMinimised ( bool  shouldBeMinimised)
inlineoverridevirtual

Minimises the window.

Implements ComponentPeer.

◆ setTitle()

void LinuxComponentPeer::setTitle ( const String title)
inlineoverridevirtual

Changes the title of the window.

Implements ComponentPeer.

◆ setVisible()

void LinuxComponentPeer::setVisible ( bool  shouldBeVisible)
inlineoverridevirtual

Shows or hides the window.

Implements ComponentPeer.

◆ showMouseCursor()

void LinuxComponentPeer::showMouseCursor ( Cursor  cursor)
inlinenoexcept

◆ textInputRequired()

void LinuxComponentPeer::textInputRequired ( Point< int >  position,
TextInputTarget  
)
inlineoverridevirtual

Tells the window that text input may be required at the given position. This may cause things like a virtual on-screen keyboard to appear, depending on the OS.

Implements ComponentPeer.

◆ toBehind()

void LinuxComponentPeer::toBehind ( ComponentPeer other)
inlineoverridevirtual

Moves the window to be just behind another one.

Implements ComponentPeer.

◆ toFront()

void LinuxComponentPeer::toFront ( bool  makeActive)
inlineoverridevirtual

Brings the window to the top, optionally also giving it focus.

Implements ComponentPeer.

◆ windowMessageReceive()

static void LinuxComponentPeer::windowMessageReceive ( XEvent &  event)
inlinestatic

Friends And Related Function Documentation

◆ LinuxRepaintManager

friend class LinuxRepaintManager
friend

Member Data Documentation

◆ currentModifiers

ModifierKeys LinuxComponentPeer::currentModifiers
static

◆ dontRepaint

bool LinuxComponentPeer::dontRepaint

◆ isActiveApplication

bool LinuxComponentPeer::isActiveApplication = false
static

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