LibreOffice Module vcl (master)  1
gtkinst.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
21 #define INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
22 
23 #include <sal/config.h>
24 
25 #include <stack>
26 
27 #include <unx/salinst.h>
28 #include <unx/gensys.h>
29 #include <headless/svpinst.hxx>
30 #include <com/sun/star/datatransfer/DataFlavor.hpp>
31 #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
32 #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
33 #include <com/sun/star/lang/XInitialization.hpp>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/awt/XWindow.hpp>
36 #include <cppuhelper/compbase.hxx>
37 #include <gtk/gtk.h>
38 
39 namespace vcl
40 {
41 namespace unx
42 {
43 class GtkPrintWrapper;
44 }
45 }
46 
47 vcl::Font pango_to_vcl(const PangoFontDescription* font, const css::lang::Locale& rLocale);
48 
49 class GenPspGraphics;
51 {
52  thread_local static std::stack<sal_uInt32> yieldCounts;
53 
54 public:
56  void ThreadsEnter();
57  void ThreadsLeave();
58 };
59 
60 class GtkSalFrame;
61 
63 {
64  std::vector<css::datatransfer::DataFlavor> aInfoToFlavor;
65  std::vector<GtkTargetEntry> FormatsToGtk(const css::uno::Sequence<css::datatransfer::DataFlavor> &rFormats);
66  void setSelectionData(const css::uno::Reference<css::datatransfer::XTransferable> &rTrans,
67  GtkSelectionData *selection_data, guint info);
68 private:
69  GtkTargetEntry makeGtkTargetEntry(const css::datatransfer::DataFlavor& rFlavor);
70 };
71 
72 class GtkTransferable : public cppu::WeakImplHelper<css::datatransfer::XTransferable>
73 {
74 protected:
75  std::map<OUString, GdkAtom> m_aMimeTypeToAtom;
76 
77  std::vector<css::datatransfer::DataFlavor> getTransferDataFlavorsAsVector(GdkAtom *targets, gint n_targets);
78 
79 public:
80  virtual css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor& rFlavor) override = 0;
81  virtual std::vector<css::datatransfer::DataFlavor> getTransferDataFlavorsAsVector() = 0;
82  virtual css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL getTransferDataFlavors() override;
83  virtual sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor& rFlavor) override;
84 };
85 
86 class GtkDnDTransferable;
87 
88 class GtkDropTarget : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDropTarget,
89  css::lang::XInitialization,
90  css::lang::XServiceInfo>
91 {
92  osl::Mutex m_aMutex;
94  GtkDnDTransferable* m_pFormatConversionRequest;
95  bool m_bActive;
96  bool m_bInDrag;
98  std::vector<css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>> m_aListeners;
99 public:
100  GtkDropTarget();
101  virtual ~GtkDropTarget() override;
102 
103  // XInitialization
104  virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArgs) override;
105  void deinitialize();
106 
107  // XDropTarget
108  virtual void SAL_CALL addDropTargetListener(const css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>&) override;
109  virtual void SAL_CALL removeDropTargetListener(const css::uno::Reference<css::datatransfer::dnd::XDropTargetListener>&) override;
110  virtual sal_Bool SAL_CALL isActive() override;
111  virtual void SAL_CALL setActive(sal_Bool active) override;
112  virtual sal_Int8 SAL_CALL getDefaultActions() override;
113  virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override;
114 
115  OUString SAL_CALL getImplementationName() override;
116 
117  sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
118 
119  css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
120 
121  void fire_dragEnter(const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee);
122  void fire_dragOver(const css::datatransfer::dnd::DropTargetDragEvent& dtde);
123  void fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde);
124  void fire_dragExit(const css::datatransfer::dnd::DropTargetEvent& dte);
125 
126  void SetFormatConversionRequest(GtkDnDTransferable *pRequest)
127  {
128  m_pFormatConversionRequest = pRequest;
129  }
130 
131  gboolean signalDragDrop(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time);
132  gboolean signalDragMotion(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, guint time);
133  void signalDragDropReceived(GtkWidget* pWidget, GdkDragContext* context, gint x, gint y, GtkSelectionData* data, guint ttype, guint time);
134  void signalDragLeave(GtkWidget* pWidget, GdkDragContext* context, guint time);
135 };
136 
137 class GtkDragSource : public cppu::WeakComponentImplHelper<css::datatransfer::dnd::XDragSource,
138  css::lang::XInitialization,
139  css::lang::XServiceInfo>
140 {
141  osl::Mutex m_aMutex;
143  css::uno::Reference<css::datatransfer::dnd::XDragSourceListener> m_xListener;
144  css::uno::Reference<css::datatransfer::XTransferable> m_xTrans;
146 public:
148  : WeakComponentImplHelper(m_aMutex)
149  , m_pFrame(nullptr)
150  {
151  }
152 
153  virtual ~GtkDragSource() override;
154 
155  // XDragSource
156  virtual sal_Bool SAL_CALL isDragImageSupported() override;
157  virtual sal_Int32 SAL_CALL getDefaultCursor(sal_Int8 dragAction) override;
158  virtual void SAL_CALL startDrag(
159  const css::datatransfer::dnd::DragGestureEvent& trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
160  const css::uno::Reference< css::datatransfer::XTransferable >& transferable,
161  const css::uno::Reference< css::datatransfer::dnd::XDragSourceListener >& listener) override;
162 
163  // XInitialization
164  virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any >& rArguments) override;
165  void deinitialize();
166 
167  OUString SAL_CALL getImplementationName() override;
168 
169  sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
170 
171  css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
172 
173  void dragFailed();
174  void dragDelete();
175  void dragEnd(GdkDragContext* context);
176  void dragDataGet(GtkSelectionData *data, guint info);
177 
178  // For LibreOffice internal D&D we provide the Transferable without Gtk
179  // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on this
181  css::uno::Reference<css::datatransfer::XTransferable> const & GetTransferrable() const { return m_xTrans; }
182 };
183 
184 class GtkSalTimer;
186 {
188 public:
189  GtkInstance( std::unique_ptr<SalYieldMutex> pMutex );
190  virtual ~GtkInstance() override;
191  void EnsureInit();
192  virtual void AfterAppInit() override;
193 
194  virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
195  virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
196  virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
197  virtual SalSystem* CreateSalSystem() override;
198  virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup) override;
199  virtual std::unique_ptr<SalPrinter> CreatePrinter( SalInfoPrinter* pInfoPrinter ) override;
200  virtual std::unique_ptr<SalMenu> CreateMenu( bool, Menu* ) override;
201  virtual std::unique_ptr<SalMenuItem> CreateMenuItem( const SalItemParams& ) override;
202  virtual SalTimer* CreateSalTimer() override;
203  virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
204  virtual std::unique_ptr<SalVirtualDevice>
206  long &nDX, long &nDY,
207  DeviceFormat eFormat,
208  const SystemGraphicsData* = nullptr ) override;
209  virtual std::shared_ptr<SalBitmap> CreateSalBitmap() override;
210 
211  virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
212  virtual bool AnyInput( VclInputFlags nType ) override;
213  // impossible to handle correctly, as "main thread" depends on the dispatch mutex
214  virtual bool IsMainThread() const override { return false; }
215 
216  virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
217 
218  virtual bool hasNativeFileSelection() const override { return true; }
219 
220  virtual css::uno::Reference< css::ui::dialogs::XFilePicker2 >
221  createFilePicker( const css::uno::Reference< css::uno::XComponentContext >& ) override;
222  virtual css::uno::Reference< css::ui::dialogs::XFolderPicker2 >
223  createFolderPicker( const css::uno::Reference< css::uno::XComponentContext >& ) override;
224 
225  virtual css::uno::Reference< css::uno::XInterface > CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments ) override;
226  virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() override;
227  virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() override;
228  virtual OpenGLContext* CreateOpenGLContext() override;
229  virtual weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile) override;
230  virtual weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage) override;
231  virtual weld::Window* GetFrameWeld(const css::uno::Reference<css::awt::XWindow>& rWindow) override;
232 
233  virtual const cairo_font_options_t* GetCairoFontOptions() override;
236 
237  void RemoveTimer ();
238 
239  std::shared_ptr<vcl::unx::GtkPrintWrapper> const & getPrintWrapper() const;
240 
241  void* CreateGStreamerSink(const SystemChildWindow*) override;
242 
243 private:
245  std::unordered_map< GdkAtom, css::uno::Reference<css::uno::XInterface> > m_aClipboards;
246  bool IsTimerExpired();
249 
250  mutable std::shared_ptr<vcl::unx::GtkPrintWrapper> m_xPrintWrapper;
251 };
252 
253 typedef cppu::WeakComponentImplHelper<css::awt::XWindow> SalGtkXWindow_Base;
254 
256 {
257 private:
258  osl::Mutex m_aHelperMtx;
260  GtkWidget* m_pWidget;
261 public:
262 
263  SalGtkXWindow(weld::Window* pWeldWidget, GtkWidget* pWidget)
264  : SalGtkXWindow_Base(m_aHelperMtx)
265  , m_pWeldWidget(pWeldWidget)
266  , m_pWidget(pWidget)
267  {
268  }
269 
270  void clear()
271  {
272  m_pWeldWidget = nullptr;
273  m_pWidget = nullptr;
274  }
275 
276  GtkWidget* getWidget() const
277  {
278  return m_pWidget;
279  }
280 
282  {
283  return m_pWeldWidget;
284  }
285 
286  // css::awt::XWindow
287  void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override
288  {
289  throw css::uno::RuntimeException("not implemented");
290  }
291 
292  css::awt::Rectangle SAL_CALL getPosSize() override
293  {
294  throw css::uno::RuntimeException("not implemented");
295  }
296 
297  void SAL_CALL setVisible(sal_Bool) override
298  {
299  throw css::uno::RuntimeException("not implemented");
300  }
301 
302  void SAL_CALL setEnable(sal_Bool) override
303  {
304  throw css::uno::RuntimeException("not implemented");
305  }
306 
307  void SAL_CALL setFocus() override
308  {
309  throw css::uno::RuntimeException("not implemented");
310  }
311 
312  void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener >& ) override
313  {
314  throw css::uno::RuntimeException("not implemented");
315  }
316  void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener >& ) override
317  {
318  throw css::uno::RuntimeException("not implemented");
319  }
320 
321  void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener >& ) override
322  {
323  throw css::uno::RuntimeException("not implemented");
324  }
325 
326  void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener >& ) override
327  {
328  throw css::uno::RuntimeException("not implemented");
329  }
330 
331  void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener >& ) override
332  {
333  throw css::uno::RuntimeException("not implemented");
334  }
335 
336  void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener >& ) override
337  {
338  throw css::uno::RuntimeException("not implemented");
339  }
340 
341  void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener >& ) override
342  {
343  throw css::uno::RuntimeException("not implemented");
344  }
345 
346  void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener >& ) override
347  {
348  throw css::uno::RuntimeException("not implemented");
349  }
350 
351  void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener >& ) override
352  {
353  throw css::uno::RuntimeException("not implemented");
354  }
355 
356  void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener >& ) override
357  {
358  throw css::uno::RuntimeException("not implemented");
359  }
360 
361  void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener >& ) override
362  {
363  throw css::uno::RuntimeException("not implemented");
364  }
365 
366  void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener >& ) override
367  {
368  throw css::uno::RuntimeException("not implemented");
369  }
370 };
371 
372 GdkPixbuf* load_icon_by_name(const OUString& rIconName);
373 
374 #endif // INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
375 
376 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SAL_CALL addPaintListener(const css::uno::Reference< css::awt::XPaintListener > &) override
Definition: gtkinst.hxx:361
virtual bool hasNativeFileSelection() const override
Definition: gtkinst.hxx:218
void SAL_CALL addFocusListener(const css::uno::Reference< css::awt::XFocusListener > &) override
Definition: gtkinst.hxx:321
virtual void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService) override
void SAL_CALL removeFocusListener(const css::uno::Reference< css::awt::XFocusListener > &) override
Definition: gtkinst.hxx:326
void dragEnd(GdkDragContext *context)
virtual std::unique_ptr< SalMenu > CreateMenu(bool, Menu *) override
virtual const cairo_font_options_t * GetCairoFontOptions() override
void ThreadsEnter()
std::shared_ptr< vcl::unx::GtkPrintWrapper > m_xPrintWrapper
Definition: gtkinst.hxx:250
VclButtonsType
Definition: vclenum.hxx:243
virtual std::unique_ptr< SalVirtualDevice > CreateVirtualDevice(SalGraphics *, long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *=nullptr) override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
cppu::WeakComponentImplHelper< css::awt::XWindow > SalGtkXWindow_Base
Definition: gtkinst.hxx:253
virtual css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor &rFlavor) override=0
weld::Window * getFrameWeld() const
Definition: gtkinst.hxx:281
signed char sal_Int8
virtual SalSystem * CreateSalSystem() override
virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override
GtkSalFrame * m_pFrame
Definition: gtkinst.hxx:142
void RemoveTimer()
void fire_dragOver(const css::datatransfer::dnd::DropTargetDragEvent &dtde)
gboolean signalDragMotion(GtkWidget *pWidget, GdkDragContext *context, gint x, gint y, guint time)
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual std::vector< css::datatransfer::DataFlavor > getTransferDataFlavorsAsVector()=0
void * CreateGStreamerSink(const SystemChildWindow *) override
virtual OpenGLContext * CreateOpenGLContext() override
virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override
void signalDragLeave(GtkWidget *pWidget, GdkDragContext *context, guint time)
virtual weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIRoot, const OUString &rUIFile) override
virtual SalTimer * CreateSalTimer() override
vcl::Font pango_to_vcl(const PangoFontDescription *font, const css::lang::Locale &rLocale)
const cairo_font_options_t * GetLastSeenCairoFontOptions() const
css::uno::Reference< css::datatransfer::XTransferable > m_xTrans
Definition: gtkinst.hxx:144
virtual sal_Int32 SAL_CALL getDefaultCursor(sal_Int8 dragAction) override
css::awt::Rectangle SAL_CALL getPosSize() override
Definition: gtkinst.hxx:292
void SAL_CALL addWindowListener(const css::uno::Reference< css::awt::XWindowListener > &) override
Definition: gtkinst.hxx:312
virtual ~GtkDropTarget() override
bool m_bActive
Definition: gtkinst.hxx:95
virtual void SAL_CALL addDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &) override
virtual css::uno::Reference< css::ui::dialogs::XFilePicker2 > createFilePicker(const css::uno::Reference< css::uno::XComponentContext > &) override
VclInputFlags
Definition: inputtypes.hxx:25
GtkSalFrame * m_pFrame
Definition: gtkinst.hxx:93
virtual ~GtkDragSource() override
sal_Int8 m_nDefaultActions
Definition: gtkinst.hxx:97
virtual css::uno::Reference< css::ui::dialogs::XFolderPicker2 > createFolderPicker(const css::uno::Reference< css::uno::XComponentContext > &) override
std::vector< css::datatransfer::DataFlavor > aInfoToFlavor
Definition: gtkinst.hxx:64
virtual SalFrame * CreateFrame(SalFrame *pParent, SalFrameStyleFlags nStyle) override
void SAL_CALL addMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &) override
Definition: gtkinst.hxx:351
GdkPixbuf * load_icon_by_name(const OUString &rIconName)
OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL isActive() override
void fire_dragExit(const css::datatransfer::dnd::DropTargetEvent &dte)
ttype
virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() override
VclMessageType
Definition: vclenum.hxx:253
cairo_font_options_t * m_pLastCairoFontOptions
Definition: gtkinst.hxx:248
virtual void AfterAppInit() override
void ThreadsLeave()
virtual std::unique_ptr< SalMenuItem > CreateMenuItem(const SalItemParams &) override
void SetFormatConversionRequest(GtkDnDTransferable *pRequest)
Definition: gtkinst.hxx:126
void SAL_CALL setFocus() override
Definition: gtkinst.hxx:307
void SAL_CALL removeMouseListener(const css::uno::Reference< css::awt::XMouseListener > &) override
Definition: gtkinst.hxx:346
osl::Mutex m_aMutex
Definition: gtkinst.hxx:92
void SAL_CALL addMouseListener(const css::uno::Reference< css::awt::XMouseListener > &) override
Definition: gtkinst.hxx:341
virtual void SAL_CALL setActive(sal_Bool active) override
osl::Mutex m_aHelperMtx
Definition: gtkinst.hxx:258
osl::Mutex m_aMutex
Definition: gtkinst.hxx:141
std::vector< GtkTargetEntry > FormatsToGtk(const css::uno::Sequence< css::datatransfer::DataFlavor > &rFormats)
void SAL_CALL removeKeyListener(const css::uno::Reference< css::awt::XKeyListener > &) override
Definition: gtkinst.hxx:336
SvpSalInstance Superclass_t
Definition: gtkinst.hxx:187
void SAL_CALL removeWindowListener(const css::uno::Reference< css::awt::XWindowListener > &) override
Definition: gtkinst.hxx:316
virtual std::shared_ptr< SalBitmap > CreateSalBitmap() override
GtkSalTimer * m_pTimer
Definition: gtkinst.hxx:244
virtual bool AnyInput(VclInputFlags nType) override
void deinitialize()
std::map< OUString, GdkAtom > m_aMimeTypeToAtom
Definition: gtkinst.hxx:75
void deinitialize()
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
void SAL_CALL removePaintListener(const css::uno::Reference< css::awt::XPaintListener > &) override
Definition: gtkinst.hxx:366
virtual bool IsMainThread() const override
Definition: gtkinst.hxx:214
unsigned char sal_Bool
bool m_bInDrag
Definition: gtkinst.hxx:96
virtual css::uno::Reference< css::uno::XInterface > CreateClipboard(const css::uno::Sequence< css::uno::Any > &i_rArguments) override
void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override
Definition: gtkinst.hxx:287
css::uno::Reference< css::datatransfer::XTransferable > const & GetTransferrable() const
Definition: gtkinst.hxx:181
virtual weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow) override
std::shared_ptr< vcl::unx::GtkPrintWrapper > const & getPrintWrapper() const
GtkWidget * getWidget() const
Definition: gtkinst.hxx:276
void fire_dragEnter(const css::datatransfer::dnd::DropTargetDragEnterEvent &dtdee)
std::vector< css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > > m_aListeners
Definition: gtkinst.hxx:98
static GtkDragSource * g_ActiveDragSource
Definition: gtkinst.hxx:180
DeviceFormat
Definition: salgtype.hxx:28
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:112
struct _cairo_font_options cairo_font_options_t
Definition: salinst.hxx:78
virtual void SAL_CALL removeDropTargetListener(const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > &) override
css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > m_xListener
Definition: gtkinst.hxx:143
Definition: menu.hxx:121
gboolean signalDragDrop(GtkWidget *pWidget, GdkDragContext *context, gint x, gint y, guint time)
void SAL_CALL setEnable(sal_Bool) override
Definition: gtkinst.hxx:302
void setSelectionData(const css::uno::Reference< css::datatransfer::XTransferable > &rTrans, GtkSelectionData *selection_data, guint info)
void dragDelete()
virtual ~GtkInstance() override
void clear()
Definition: gtkinst.hxx:270
virtual sal_Int8 SAL_CALL getDefaultActions() override
virtual SalObject * CreateObject(SalFrame *pParent, SystemWindowData *pWindowData, bool bShow) override
SalFrameStyleFlags
Definition: salframe.hxx:64
void dragDataGet(GtkSelectionData *data, guint info)
VclToGtkHelper m_aConversionHelper
Definition: gtkinst.hxx:145
virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() override
virtual SalFrame * CreateChildFrame(SystemParentData *pParent, SalFrameStyleFlags nStyle) override
SalGtkXWindow(weld::Window *pWeldWidget, GtkWidget *pWidget)
Definition: gtkinst.hxx:263
virtual std::unique_ptr< GenPspGraphics > CreatePrintGraphics() override
GtkDnDTransferable * m_pFormatConversionRequest
Definition: gtkinst.hxx:94
bool IsTimerExpired()
weld::Window * m_pWeldWidget
Definition: gtkinst.hxx:259
virtual sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor &rFlavor) override
virtual weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage) override
virtual SalInfoPrinter * CreateInfoPrinter(SalPrinterQueueInfo *pPrinterQueueInfo, ImplJobSetup *pJobSetup) override
OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL isDragImageSupported() override
virtual std::unique_ptr< SalPrinter > CreatePrinter(SalInfoPrinter *pInfoPrinter) override
bool bNeedsInit
Definition: gtkinst.hxx:247
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArgs) override
std::unordered_map< GdkAtom, css::uno::Reference< css::uno::XInterface > > m_aClipboards
Definition: gtkinst.hxx:245
virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override
Wait for the next event (if bWait) and dispatch it, includes posted events, and timers.
virtual void SAL_CALL startDrag(const css::datatransfer::dnd::DragGestureEvent &trigger, sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image, const css::uno::Reference< css::datatransfer::XTransferable > &transferable, const css::uno::Reference< css::datatransfer::dnd::XDragSourceListener > &listener) override
void signalDragDropReceived(GtkWidget *pWidget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint ttype, guint time)
GtkTargetEntry makeGtkTargetEntry(const css::datatransfer::DataFlavor &rFlavor)
void dragFailed()
void fire_drop(const css::datatransfer::dnd::DropTargetDropEvent &dtde)
void SAL_CALL addKeyListener(const css::uno::Reference< css::awt::XKeyListener > &) override
Definition: gtkinst.hxx:331
static thread_local std::stack< sal_uInt32 > yieldCounts
Definition: gtkinst.hxx:52
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
GtkWidget * m_pWidget
Definition: gtkinst.hxx:260
void ResetLastSeenCairoFontOptions(const cairo_font_options_t *pOptions)
void SAL_CALL removeMouseMotionListener(const css::uno::Reference< css::awt::XMouseMotionListener > &) override
Definition: gtkinst.hxx:356
void EnsureInit()
GtkInstance(std::unique_ptr< SalYieldMutex > pMutex)
void SAL_CALL setVisible(sal_Bool) override
Definition: gtkinst.hxx:297