iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
IGraphicsLinux Class Referencefinal

IGraphics platform class for Linux. More...

#include <IGraphicsLinux.h>

Inheritance diagram for IGraphicsLinux:
[legend]

Public Member Functions

 IGraphicsLinux (IGEditorDelegate &dlg, int w, int h, int fps, float scale)
 
void ForceEndUserEdit () override
 
float GetPlatformWindowScale () const override
 Returns the screen scale factor so that requestResize() and OnParentWindowResize() pass physical pixels, matching what the X11 server reports via ConfigureNotify (ce.width / GetScreenScale()). More...
 
int GetX11Fd () const
 Returns the X11 display file descriptor, or -1 if not open. More...
 
void SetHostDriven (bool hostDriven)
 When host-driven = true the internal timer is suppressed. More...
 
void OnDisplayTimer ()
 Called by CLAP host timer callback to advance one display frame. More...
 
void ProcessX11Events ()
 Called by CLAP host posix-fd callback to drain pending X11 events. More...
 
bool WindowCloseRequested () const
 A native close is completed by the owner after X11 dispatch returns. More...
 
void RequestWindowClose ()
 
bool IsInPlatformCallback () const
 
void PlatformResize (bool parentHasResized) override
 
void SetScreenScaleFromHost (float scale)
 Apply a new host scale without interpreting older native sizes at the new scale. More...
 
void ResizeFromHost (int width, int height)
 Apply a host/X11 size in physical pixels, preserving the configured resize mode. More...
 
void ConstrainHostResize (int &width, int &height)
 Constrain a proposed host size in physical pixels without resizing the editor. More...
 
void HideMouseCursor (bool hide, bool lock) override
 
void MoveMouseCursor (float x, float y) override
 
ECursor SetMouseCursor (ECursor cursorType) override
 
void GetMouseLocation (float &x, float &y) const override
 
EMsgBoxResult ShowMessageBox (const char *str, const char *title, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler) override
 
void * OpenWindow (void *pParent) override
 
void CloseWindow () override
 
bool WindowIsOpen () override
 
void UpdateTooltips () override
 
bool RevealPathInExplorerOrFinder (WDL_String &path, bool select) override
 
void PromptForFile (WDL_String &fileName, WDL_String &path, EFileAction action, const char *ext, IFileDialogCompletionHandlerFunc completionHandler) override
 
void PromptForDirectory (WDL_String &dir, IFileDialogCompletionHandlerFunc completionHandler) override
 
bool PromptForColor (IColor &color, const char *str, IColorPickerHandlerFunc func) override
 
bool OpenURL (const char *url, const char *msgWindowTitle, const char *confirmMsg, const char *errMsgOnFailure) override
 
void * GetWindow () override
 
const char * GetPlatformAPIStr () override
 
bool GetTextFromClipboard (WDL_String &str) override
 
bool SetTextInClipboard (const char *str) override
 

Protected Member Functions

IPopupMenu * CreatePlatformPopupMenu (IPopupMenu &menu, const IRECT bounds, bool &isAsync) override
 
void CreatePlatformTextEntry (int paramIdx, const IText &text, const IRECT &bounds, int length, const char *str) override
 

Detailed Description

IGraphics platform class for Linux.

Definition at line 72 of file IGraphicsLinux.h.

Constructor & Destructor Documentation

◆ IGraphicsLinux()

IGraphicsLinux::IGraphicsLinux ( IGEditorDelegate &  dlg,
int  w,
int  h,
int  fps,
float  scale 
)

Definition at line 1044 of file IGraphicsLinux.cpp.

◆ ~IGraphicsLinux()

IGraphicsLinux::~IGraphicsLinux ( )

Definition at line 1054 of file IGraphicsLinux.cpp.

Member Function Documentation

◆ CloseWindow()

void IGraphicsLinux::CloseWindow ( )
override

Definition at line 1281 of file IGraphicsLinux.cpp.

◆ ConstrainHostResize()

void IGraphicsLinux::ConstrainHostResize ( int &  width,
int &  height 
)

Constrain a proposed host size in physical pixels without resizing the editor.

Definition at line 1636 of file IGraphicsLinux.cpp.

◆ CreatePlatformPopupMenu()

IPopupMenu * IGraphicsLinux::CreatePlatformPopupMenu ( IPopupMenu &  menu,
const IRECT  bounds,
bool &  isAsync 
)
overrideprotected

Definition at line 2238 of file IGraphicsLinux.cpp.

◆ CreatePlatformTextEntry()

void IGraphicsLinux::CreatePlatformTextEntry ( int  paramIdx,
const IText &  text,
const IRECT &  bounds,
int  length,
const char *  str 
)
overrideprotected

Definition at line 2342 of file IGraphicsLinux.cpp.

◆ ForceEndUserEdit()

void IGraphicsLinux::ForceEndUserEdit ( )
override

Definition at line 1645 of file IGraphicsLinux.cpp.

◆ GetMouseLocation()

void IGraphicsLinux::GetMouseLocation ( float &  x,
float &  y 
) const
override

Definition at line 1751 of file IGraphicsLinux.cpp.

◆ GetPlatformAPIStr()

const char * IGraphicsLinux::GetPlatformAPIStr ( )
inlineoverride

Definition at line 138 of file IGraphicsLinux.h.

◆ GetPlatformWindowScale()

float IGraphicsLinux::GetPlatformWindowScale ( ) const
inlineoverride

Returns the screen scale factor so that requestResize() and OnParentWindowResize() pass physical pixels, matching what the X11 server reports via ConfigureNotify (ce.width / GetScreenScale()).

Definition at line 82 of file IGraphicsLinux.h.

Referenced by IGEditorDelegate::OnParentWindowResize().

◆ GetTextFromClipboard()

bool IGraphicsLinux::GetTextFromClipboard ( WDL_String &  str)
override

Definition at line 2029 of file IGraphicsLinux.cpp.

◆ GetWindow()

void * IGraphicsLinux::GetWindow ( )
inlineoverride

Definition at line 136 of file IGraphicsLinux.h.

◆ GetX11Fd()

int IGraphicsLinux::GetX11Fd ( ) const
inline

Returns the X11 display file descriptor, or -1 if not open.

Used by CLAP posix-fd support to register with the host's event loop.

Definition at line 86 of file IGraphicsLinux.h.

◆ HideMouseCursor()

void IGraphicsLinux::HideMouseCursor ( bool  hide,
bool  lock 
)
override

Definition at line 1647 of file IGraphicsLinux.cpp.

◆ IsInPlatformCallback()

bool IGraphicsLinux::IsInPlatformCallback ( ) const
inline

Definition at line 105 of file IGraphicsLinux.h.

◆ MoveMouseCursor()

void IGraphicsLinux::MoveMouseCursor ( float  x,
float  y 
)
override

Definition at line 1681 of file IGraphicsLinux.cpp.

◆ OnDisplayTimer()

void IGraphicsLinux::OnDisplayTimer ( )

Called by CLAP host timer callback to advance one display frame.

Definition at line 3175 of file IGraphicsLinux.cpp.

References IRECTList::Add(), and IRECTList::Clear().

◆ OpenURL()

bool IGraphicsLinux::OpenURL ( const char *  url,
const char *  msgWindowTitle,
const char *  confirmMsg,
const char *  errMsgOnFailure 
)
override

Definition at line 2027 of file IGraphicsLinux.cpp.

◆ OpenWindow()

void * IGraphicsLinux::OpenWindow ( void *  pParent)
override

Definition at line 1056 of file IGraphicsLinux.cpp.

◆ PlatformResize()

void IGraphicsLinux::PlatformResize ( bool  parentHasResized)
override

Definition at line 1436 of file IGraphicsLinux.cpp.

◆ ProcessX11Events()

void IGraphicsLinux::ProcessX11Events ( )

Called by CLAP host posix-fd callback to drain pending X11 events.

Definition at line 2759 of file IGraphicsLinux.cpp.

◆ PromptForColor()

bool IGraphicsLinux::PromptForColor ( IColor &  color,
const char *  str,
IColorPickerHandlerFunc  func 
)
override

Definition at line 1993 of file IGraphicsLinux.cpp.

◆ PromptForDirectory()

void IGraphicsLinux::PromptForDirectory ( WDL_String &  dir,
IFileDialogCompletionHandlerFunc  completionHandler 
)
override

Definition at line 1944 of file IGraphicsLinux.cpp.

◆ PromptForFile()

void IGraphicsLinux::PromptForFile ( WDL_String &  fileName,
WDL_String &  path,
EFileAction  action,
const char *  ext,
IFileDialogCompletionHandlerFunc  completionHandler 
)
override

Definition at line 1877 of file IGraphicsLinux.cpp.

◆ RequestWindowClose()

void IGraphicsLinux::RequestWindowClose ( )
inline

Definition at line 104 of file IGraphicsLinux.h.

◆ ResizeFromHost()

void IGraphicsLinux::ResizeFromHost ( int  width,
int  height 
)

Apply a host/X11 size in physical pixels, preserving the configured resize mode.

Definition at line 1564 of file IGraphicsLinux.cpp.

◆ RevealPathInExplorerOrFinder()

bool IGraphicsLinux::RevealPathInExplorerOrFinder ( WDL_String &  path,
bool  select 
)
override

Definition at line 1862 of file IGraphicsLinux.cpp.

◆ SetHostDriven()

void IGraphicsLinux::SetHostDriven ( bool  hostDriven)
inline

When host-driven = true the internal timer is suppressed.

The host drives rendering via onTimer / onPosixFd callbacks instead. Safe to call after OpenWindow — stops the internal timer if running.

Definition at line 91 of file IGraphicsLinux.h.

◆ SetMouseCursor()

ECursor IGraphicsLinux::SetMouseCursor ( ECursor  cursorType)
override

Definition at line 1690 of file IGraphicsLinux.cpp.

◆ SetScreenScaleFromHost()

void IGraphicsLinux::SetScreenScaleFromHost ( float  scale)

Apply a new host scale without interpreting older native sizes at the new scale.

Definition at line 1452 of file IGraphicsLinux.cpp.

◆ SetTextInClipboard()

bool IGraphicsLinux::SetTextInClipboard ( const char *  str)
override

Definition at line 2091 of file IGraphicsLinux.cpp.

◆ ShowMessageBox()

EMsgBoxResult IGraphicsLinux::ShowMessageBox ( const char *  str,
const char *  title,
EMsgBoxType  type,
IMsgBoxCompletionHandlerFunc  completionHandler 
)
override

Definition at line 1772 of file IGraphicsLinux.cpp.

◆ UpdateTooltips()

void IGraphicsLinux::UpdateTooltips ( )
override

Definition at line 1360 of file IGraphicsLinux.cpp.

◆ WindowCloseRequested()

bool IGraphicsLinux::WindowCloseRequested ( ) const
inline

A native close is completed by the owner after X11 dispatch returns.

Definition at line 103 of file IGraphicsLinux.h.

◆ WindowIsOpen()

bool IGraphicsLinux::WindowIsOpen ( )
inlineoverride

Definition at line 125 of file IGraphicsLinux.h.


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