20 #ifndef INCLUDED_VCL_INC_UNX_SALDISP_HXX
21 #define INCLUDED_VCL_INC_UNX_SALDISP_HXX
29 #include <X11/Xutil.h>
30 #include <X11/extensions/render.h>
31 #include <epoxy/glx.h>
33 #include <rtl/string.hxx>
40 #include <unordered_map>
51 typedef unsigned long Pixel;
184 virtual bool Yield(
bool bWait,
bool bHandleAllCurrentEvents );
188 virtual void Insert(
int fd,
void* data,
192 virtual void Remove(
int fd );
197 virtual bool CheckTimeout(
bool bExecuteTimers =
true );
204 class AttributeProvider;
223 virtual bool Synchronize(
bool bOnoff)
const override;
261 m_aRefWindow(
None ),
264 m_aAndInvertedGC(
None ),
267 m_aStippleGC(
None ),
307 virtual bool Dispatch( XEvent *pEvent ) = 0;
309 void InitRandR( ::Window aRoot )
const;
310 static void DeInitRandR();
311 void processRandREvent( XEvent* );
315 Time GetEventTimeImpl(
bool bAlwaysReget =
false )
const;
317 static bool BestVisual(
Display *pDisp,
int nScreen, XVisualInfo &rVI);
326 void PrintInfo()
const;
327 void DbgPrintDisplayEvent(
const char *pComment,
const XEvent *pEvent)
const;
332 void ModifierMapping();
333 void SimulateKeyPress( sal_uInt16 nKeyCode );
335 OUString GetKeyNameFromKeySym( KeySym keysym )
const;
336 OUString GetKeyName( sal_uInt16 nKeyCode )
const;
337 sal_uInt16 GetKeyCode( KeySym keysym,
char*pcPrintable )
const;
338 KeySym GetKeySym( XKeyEvent *pEvent,
341 KeySym *pUnmodifiedKeySym,
343 XIC =
nullptr )
const;
346 int CaptureMouse(
SalFrame *pCapture );
351 if( nXScreen.
getXScreen() >= m_aScreens.size() )
352 return m_aInvalidScreenData;
353 if( ! m_aScreens[nXScreen.
getXScreen()].m_bInit )
354 initScreen( nXScreen );
375 bool XIfEventWithTimeout( XEvent*, XPointer,
X_if_predicate )
const;
381 { mpKbdExtension = pKbdExtension; }
386 {
return getDataForScreen( nXScreen ).m_aRoot; }
403 virtual bool Dispatch( XEvent *pEvent )
override;
404 virtual void Yield();
414 const OUString& pLang,
425 #endif // INCLUDED_VCL_INC_UNX_SALDISP_HXX
Bool(* X_if_predicate)(Display *, XEvent *, XPointer)
GenericUnixSalDataType GetType() const
std::list< SalObject * > m_aSalObjects
virtual bool Dispatch(XEvent *pEvent) override
SalX11Screen m_nXDefaultScreen
std::unique_ptr< SalI18N_InputMethod > m_pInputMethod
Time GetLastUserEventTime() const
unsigned int GetXScreenCount() const
::vcl_sal::WMAdaptor * getWMAdaptor() const
virtual ~GLX11Window() override
o3tl::enumarray< PointerStyle, Cursor > aPointerCache_
SalXLib * GetXLib() const
Time m_nLastUserEventTime
virtual void Remove(int fd)
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
std::vector< int > m_aXineramaScreenIndexMap
const ScreenData & getDataForScreen(SalX11Screen nXScreen) const
const SalDisplay * m_pDisplay
SalGenericDisplay * GetDisplay() const
Color GetTCColor(Pixel nPixel) const
GC GetCopyGC(SalX11Screen nXScreen) const
RenderEntryMap m_aRenderData
bool HasGLXExtension(const char *name) const
SalColormap & operator=(SalColormap &&)=default
virtual void TriggerUserEventProcessing() override
Display * GetDisplay() const
srv_vendor_t meServerVendor
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
SalI18N_InputMethod * GetInputMethod() const
virtual bool CheckTimeout(bool bExecuteTimers=true)
const Size & GetScreenSize(SalX11Screen nXScreen) const
VisualID GetVisualId() const
Pixel GetWhitePixel() const
void TriggerUserEventProcessing()
::Window GetDrawable(SalX11Screen nXScreen) const
::Window GetRootWindow(SalX11Screen nXScreen) const
SalI18N_KeyboardExtension * GetKbdExtension() const
virtual bool Synchronize(bool bOnoff) const override
#define VCLPLUG_GEN_PUBLIC
Display * GetDisplay() const
std::list< SalObject * > & getSalObjects()
Holds the information of our new child window.
unsigned int getXScreen() const
const SalVisual & GetVisual(SalX11Screen nXScreen) const
Display * GetXDisplay() const
RenderEntryMap & GetRenderEntries(SalX11Screen nXScreen) const
std::vector< sal_uInt16 > m_aLookupTable
Time GetX11ServerTime() const
bool GetXPixels(XColor &rColor, int r, int g, int b) const
ScreenData m_aInvalidScreenData
SalI18N_InputMethod * GetInputMethod() const
SalI18N_KeyboardExtension * mpKbdExtension
Pixmap GetInvert50(SalX11Screen nXScreen) const
virtual bool Yield(bool bWait, bool bHandleAllCurrentEvents)
exports com.sun.star.chart2. data
std::unordered_map< int, RenderEntry > RenderEntryMap
sal_uLong GetMaxRequestSize() const
OwnershipFlag(OwnershipFlag &&other) noexcept
int(* YieldFunc)(int fd, void *data)
std::vector< tools::Rectangle > m_aXineramaScreens
A SalFrame is a system window (e.g. an X11 window).
SalX11Display(Display *pDisp)
const SalDisplay * GetDisplay() const
Colormap GetXColormap() const
const std::vector< tools::Rectangle > & GetXineramaScreens() const
std::vector< ScreenData > m_aScreens
OwnershipFlag m_aVisualOwnership
srv_vendor_t sal_GetServerVendor(Display *p_display)
const SalColormap & GetColormap(SalX11Screen nXScreen) const
OwnershipFlag & operator=(OwnershipFlag &&other) noexcept
Pixel GetBlackPixel() const
Visual * GetVisual() const
Pixel GetPixel(Color nColor) const
std::vector< Color > m_aPalette
virtual void Insert(int fd, void *data, YieldFunc pending, YieldFunc queued, YieldFunc handle)
Visual * GetXVisual() const
SalDisplay * getSalDisplay(GenericUnixSalData const *data)
std::unique_ptr< vcl_sal::WMAdaptor > m_pWMAdaptor
Color GetColor(Pixel nPixel) const
srv_vendor_t GetServerVendor() const
Pixel GetTCPixel(Color nColor) const
bool GetXPixel(XColor &rColor, int r, int g, int b) const
const SalVisual & GetVisual() const
sal_uLong nMaxRequestSize_
const SalFrameSet & getFrames() const
void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension)
const Pair & GetResolution() const
virtual void StartTimer(sal_uInt64 nMS)
OUString getKeysymReplacementName(const OUString &pLang, KeySym nSymbol)
virtual ~SalX11Display() override
const SalX11Screen & GetDefaultXScreen() const