20#include <config_features.h>
22#include <osl/file.hxx>
23#include <osl/thread.hxx>
24#include <osl/module.hxx>
25#include <rtl/ustrbuf.hxx>
65#if OSL_DEBUG_LEVEL > 0
69#include <com/sun/star/uno/Reference.h>
70#include <com/sun/star/awt/XToolkit.hpp>
73#include <osl/process.h>
157 return pSVData->
mpApp;
163 OUString aVar(
"LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED);
164 osl_setEnvironment(aVar.pData, aValue.pData);
179 SAL_WARN(
"vcl",
"Application is a base class and should be overridden.");
189 return pAppWin->
Close();
212 return static_cast<sal_uInt16
>(osl_getCommandArgCount());
218 osl_getCommandArg( nParam, &aParam.pData );
233 OUString aAppFileName;
234 OUString aExeFileName;
235 osl_getExecutableFile(&aExeFileName.pData);
238 osl::FileBase::getSystemPathFromFileURL(aExeFileName, aAppFileName);
252 Abort(
"Unknown Error");
262#if OSL_DEBUG_LEVEL > 0
263 bool dumpCore =
true;
265 bool dumpCore =
false;
267 for (sal_uInt16
i = 0;
i !=
n; ++
i) {
320 const std::vector<vcl::LOKPayloadItem>& )
const
343 if (xWin->IsVisible())
350 bool InjectKeyEvent(
SvStream& rStream)
367 sal_uInt16
nCode, nCharCode;
373 KeyEvent aVCLKeyEvt(nCharCode, nCode);
379 void CloseDialogsAndQuit()
391 mpEventTestingIdle->Start();
407 CloseDialogsAndQuit();
415 SAL_INFO(
"vcl.eventtesting",
"Event Input exhausted, exit next cycle");
449 SAL_WARN(
"vcl.schedule",
"Can't omit DoExecute when running on system event loop!");
465 SAL_INFO(
"vcl.schedule",
"Enter ImplYield: " << (i_bWait ?
"wait" :
"no wait") <<
466 ": " << (i_bAllEvents ?
"all events" :
"one event"));
482 SAL_INFO(
"vcl.schedule",
"Leave ImplYield with return " << bProcessedEvent );
483 return bProcessedEvent;
491 SAL_WARN(
"vcl.schedule",
"Application::Reschedule(" << i_bAllEvents <<
")");
507 if (0 == ++nSanity % 1000)
509 SAL_WARN(
"vcl.schedule",
"ProcessEventsToIdle: " << nSanity);
512#if OSL_DEBUG_LEVEL > 0
519 for (
int nTaskPriority = 0; nTaskPriority <
PRIO_COUNT; ++nTaskPriority)
522 while (pSchedulerData)
525 if (pSchedulerData->
mpTask)
536 pSchedulerData = pSchedulerData->
mpNext;
556 SAL_WARN(
"vcl.schedule",
"Application::Yield()");
674 InitSettings(pSVData);
687 if (
bool(nChangeFlags) )
718 pClientWin = pTempWin;
725 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
740 (pVirDev->
GetDPIX() == nOldDPIX) &&
741 (pVirDev->
GetDPIY() == nOldDPIY) )
753 pVirDev = pVirDev->
mpNext;
766 InitSettings(pSVData);
803 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
843 rVec.erase( std::remove(rVec.begin(), rVec.end(), rKeyListener ), rVec.end() );
856 bool bProcessed =
false;
861 if( rLink.Call(
aEvent ) )
875 if( pWin && pKeyEvent )
877 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, *pKeyEvent ));
881 pPostEventData.get() );
885 pPostEventData->mnEventId = nEventId;
899 if (pWin && pGestureEvent)
901 Point aTransformedPosition(pGestureEvent->
mnX, pGestureEvent->
mnY);
907 sal_Int32(aTransformedPosition.X()),
908 sal_Int32(aTransformedPosition.Y()),
914 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData(nEvent, pWin, aGestureEvent));
918 pPostEventData.get());
922 pPostEventData->mnEventId = nEventId;
932 bool bSuccess =
false;
951 aMouseEvent.
mnX, aMouseEvent.
mnY,
960 aMouseEvent.
mnX, aMouseEvent.
mnY,
976 aMouseEvent.
mnX, aMouseEvent.
mnY,
990 SAL_WARN(
"vcl.layout",
"Application::HandleMouseEvent unknown event (" <<
static_cast<int>(nEvent) <<
")" );
1003 if( pWin && pMouseEvent )
1017 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, aTransformedEvent ));
1021 pPostEventData.get() );
1025 pPostEventData->mnEventId = nEventId;
1038 const void* pEventData;
1042 switch(
pData->mnEvent )
1046 pEventData = &
pData->maMouseEvent;
1051 pEventData = &
pData->maMouseEvent;
1056 pEventData = &
pData->maMouseEvent;
1061 pEventData = &
pData->maKeyEvent;
1066 pEventData = &
pData->maKeyEvent;
1071 pEventData = &
pData->maGestureEvent;
1076 pEventData =
nullptr;
1080 if(
pData->mpWin &&
pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
1085 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
1087 while( aIter != svdata->maAppData.maPostedEventList.end() )
1089 if( nEventId == (*aIter).second->mnEventId )
1091 delete (*aIter).second;
1092 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
1105 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
1107 while( aIter != svdata->maAppData.maPostedEventList.end() )
1109 if( pWin == (*aIter).first )
1111 if( (*aIter).second->mnEventId )
1114 delete (*aIter).second;
1115 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
1123 bool bReferenceLink )
1126 if ( pDefWindow ==
nullptr )
1129 std::unique_ptr<ImplSVEvent> pSVEvent(
new ImplSVEvent);
1130 pSVEvent->mpData = pCaller;
1131 pSVEvent->maLink = rLink;
1132 pSVEvent->mpWindow =
nullptr;
1133 pSVEvent->mbCall =
true;
1140 auto pTmpEvent = pSVEvent.get();
1151 "Application::RemoveUserEvent(): Event is send to a window" );
1153 "Application::RemoveUserEvent(): Event is already removed" );
1157 nUserEvent->
mbCall =
false;
1169 if (pWindow !=
nullptr)
1192 return pWindow->
mpWindowImpl->mpFrameData->mpNextFrame;
1278 OUStringBuffer aDetails;
1280 const auto appendDetails = [&aDetails](std::u16string_view sep,
auto&& val) {
1281 if (!aDetails.isEmpty() && !sep.empty())
1282 aDetails.append(sep);
1283 aDetails.append(std::move(val));
1286 if (bSelection !=
hwUI) {
1287 appendDetails(
u"; ",
Localize(SV_APP_CPUTHREADS, bLocalize)
1288 + OUString::number(std::thread::hardware_concurrency()));
1292 appendDetails(
u"; ",
Localize(SV_APP_OSVERSION, bLocalize) + aVersion);
1295 if (bSelection !=
hwEnv) {
1296 appendDetails(
u"; ",
Localize(SV_APP_UIRENDER, bLocalize));
1297#if HAVE_FEATURE_SKIA
1300 switch(SkiaHelper::renderMethodToUse())
1302 case SkiaHelper::RenderVulkan:
1303 appendDetails(
u"",
Localize(SV_APP_SKIA_VULKAN, bLocalize));
1305 case SkiaHelper::RenderMetal:
1306 appendDetails(
u"",
Localize(SV_APP_SKIA_METAL, bLocalize));
1308 case SkiaHelper::RenderRaster:
1309 appendDetails(
u"",
Localize(SV_APP_SKIA_RASTER, bLocalize));
1315 appendDetails(
u"",
Localize(SV_APP_DEFAULT, bLocalize));
1317#if (defined LINUX || defined _WIN32 || defined MACOSX || defined __FreeBSD__ || defined EMSCRIPTEN)
1322 return aDetails.makeStringAndClear();
1388 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" failed");
1394 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" returned 0 height.");
1402 (i_rRect.
Top() + i_rRect.
Bottom())/ 2 );
1403 const tools::Long nDX = aRectCenter.X() - i_rPoint.X();
1404 const tools::Long nDY = aRectCenter.Y() - i_rPoint.Y();
1405 return nDX*nDX + nDY*nDY;
1415 unsigned int nBestMatchScreen = 0;
1416 unsigned long nOverlap = 0;
1417 for(
unsigned int i = 0;
i < nScreens;
i++ )
1421 if( aCurScreenRect.
Contains( i_rRect ) )
1425 if( ! aIntersection.
IsEmpty() )
1427 const unsigned long nCurOverlap( aIntersection.
GetWidth() * aIntersection.
GetHeight() );
1428 if( nCurOverlap > nOverlap )
1430 nOverlap = nCurOverlap;
1431 nBestMatchScreen =
i;
1436 return nBestMatchScreen;
1441 tools::Long nDist = std::numeric_limits<tools::Long>::max();
1442 for(
unsigned int i = 0;
i < nScreens;
i++ )
1445 const tools::Long nCurDist( calcDistSquare( aCenter, aCurScreenRect ) );
1446 if( nCurDist < nDist )
1448 nBestMatchScreen =
i;
1452 return nBestMatchScreen;
1517 OSL_FAIL(
"Window hierarchy corrupted!" );
1524 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1532 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1546 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1588 css::uno::Reference< css::awt::XToolkit > xT;
1595#ifdef DISABLE_DYNLOADING
1608 static bool bAlreadyTriedToCreate =
false;
1609 if ( !pSVData->
mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
1611#ifndef DISABLE_DYNLOADING
1613 aTkLib.loadRelative(&
thisModule, TK_DLL_NAME);
1617 if ( fnCreateWrapper )
1627 bAlreadyTriedToCreate =
true;
1667 if (eOldMode != eNewMode)
1717 const OUString& sMessage)
1723 SAL_WARN(
"vcl",
"ShowNativeMessageBox returned " << btn);
1731 static const OUString aNone(
"none");
1750 bool bRet = ImplInitAccessBridge();
1757 aMisc.SetEnableATToolSupport(
false );
1776Reference< ui::dialogs::XFilePicker2 >
1783Reference< ui::dialogs::XFolderPicker2 >
1802 LibreOfficeKitPollCallback pPollCallback,
1803 LibreOfficeKitWakeCallback pWakeCallback,
1855 rState.append(
"\nWindows:\t");
1864 rState.append(
"\n\tWindow: ");
1865 rState.append(
props.extractAsOString());
void SetMiscSettings(const MiscSettings &rSet)
SAL_DLLPRIVATE AllSettingsFlags GetChangeFlags(const AllSettings &rSettings) const
const MiscSettings & GetMiscSettings() const
const LanguageTag & GetUILanguageTag() const
const LocaleDataWrapper & GetLocaleDataWrapper() const
An application can be notified of a number of different events:
Base class used mainly for the LibreOffice Desktop class.
static void AddEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
Add a VCL event listener to the application.
static bool IsDialogCancelEnabled()
Determines if dialog cancel mode is enabled.
static void ImplCallEventListeners(VclSimpleEvent &rEvent)
Send event to all VCL application event listeners.
static void EndAllDialogs()
Cancel all open dialogs.
static sal_uInt16 GetCommandLineParamCount()
Gets the number of command line parameters passed to the application.
static SAL_DLLPRIVATE unsigned int GetBestScreen(const tools::Rectangle &)
Get the "best" screen.
static void Execute()
Run the main event processing loop until it is quit by Quit().
static void SetDialogCancelMode(DialogCancelMode mode)
Sets the dialog cancel mode for headless environments.
static bool IsBitmapRendering()
Determines if bitmap rendering is enabled.
static tools::Long GetTopWindowCount()
Return the number of top-level windows being used by the application.
virtual void OverrideSystemSettings(AllSettings &rSettings)
Sets user settings in settings object to override system settings.
static unsigned int GetDisplayBuiltInScreen()
Get the built-in screen.
static OUString GetAppFileName()
Get the name of the file used to start the application.
LibreOfficeKitCallback m_pCallback
static bool LOKHandleMouseEvent(VclEventId nEvent, vcl::Window *pWin, const MouseEvent *pEvent)
virtual void Init()
Initialize the application itself.
static bool HandleKey(VclEventId nEvent, vcl::Window *pWin, KeyEvent *pKeyEvent)
Handle keypress event.
static css::uno::Reference< css::awt::XDisplayConnection > GetDisplayConnection()
static vcl::Window * GetTopWindow(tools::Long nIndex)
Get the nth top window.
static bool IsMainThread()
Queries whether we are in main thread.
static void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService)
Add a file to the system shells recent document list if there is any.
static bool IsInModalMode()
Queries whether application has a modal dialog active.
static bool IsOnSystemEventLoop()
Returns true, if the VCL plugin runs on the system event loop.
static void Yield()
Process the next event.
static void SetAppName(const OUString &rUniqueName)
Set the application's name.
static void MergeSystemSettings(AllSettings &rSettings)
Set the settings object to the platform/desktop environment system settings.
static ImplSVEvent * PostKeyEvent(VclEventId nEvent, vcl::Window *pWin, KeyEvent const *pKeyEvent)
Send keypress event.
static void setDeInitHook(Link< LinkParamNone *, void > const &hook)
static css::uno::Reference< css::ui::dialogs::XFilePicker2 > createFilePicker(const css::uno::Reference< css::uno::XComponentContext > &rServiceManager)
Create a platform specific file picker, if one is available, otherwise return an empty reference.
static size_t GetReservedKeyCodeCount()
Get the number of reserved key codes used by the application.
static void ImplCallEventListenersApplicationDataChanged(void *pData)
Send event to all VCL application event listeners.
static unsigned int GetScreenCount()
Get the number of screens available for the display.
static const vcl::KeyCode * GetReservedKeyCode(size_t i)
Get the reserved key code.
static void SetDisplayName(const OUString &rDisplayName)
Set the default name of the application for message dialogs and printing.
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
static css::uno::Reference< css::ui::dialogs::XFolderPicker2 > createFolderPicker(const css::uno::Reference< css::uno::XComponentContext > &rServiceManager)
Create a platform specific folder picker, if one is available, otherwise return an empty reference.
static css::uno::Reference< css::awt::XToolkit > GetVCLToolkit()
Gets the VCL toolkit.
static ImplSVEvent * PostGestureEvent(VclEventId nEvent, vcl::Window *pWin, GestureEventPan const *pGestureEvent)
static SystemWindowFlags GetSystemWindowMode()
Get the system window mode of dialogs.
static void UpdateMainThread()
Update main thread identifier.
static OUString GetToolkitName()
Get the toolkit's name.
virtual void Exception(ExceptionCategory nCategory)
Handles an error.
static OUString GetHWOSConfInfo(const int bSelection=0, bool bLocalize=true)
Get useful OS, Hardware and configuration information, cf.
virtual bool QueryExit()
Exit from the application.
static DialogCancelMode GetDialogCancelMode()
Gets the dialog cancel mode for headless environments.
static void Abort(const OUString &rErrorText)
Ends the program prematurely with an error message.
static OUString GetOSVersion()
Get the OS version based on the OS specific implementation.
virtual ~Application()
Virtual destructor for Application class.
static bool hasNativeFileSelection()
Do we have a native / system file selector available?
static void SetSystemWindowMode(SystemWindowFlags nMode)
Make a dialog box a system window or not.
static OUString GetDisplayName()
Get the default name of the application for message dialogs and printing.
static basegfx::SystemDependentDataManager & GetSystemDependentDataManager()
access the DataManager for buffering system-dependent data
static vcl::Window * GetNextTopLevelWindow(vcl::Window const *pWindow)
Get the next top level window.
static void ShowNativeErrorBox(const OUString &sTitle, const OUString &sMessage)
static bool InsertAccel(Accelerator *pAccel)
Insert accelerator.
static const AllSettings & GetSettings()
Gets the application's settings.
static void EnableHeadlessMode(bool dialogsAreFatal)
Enables headless mode.
static void RemoveAccel(Accelerator const *pAccel)
Remove accelerator.
static bool IsUnifiedDisplay()
Determines if the screens that make up a display are separate or form one large display area.
static comphelper::SolarMutex & GetSolarMutex()
Get the Solar Mutex for this thread.
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId, const OUString &rAction, const std::vector< vcl::LOKPayloadItem > &rPayload=std::vector< vcl::LOKPayloadItem >()) const override
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
virtual int Main()
Pure virtual entrypoint to the application.
static void EndAllPopups()
Cancel all open popups.
static bool IsUICaptured()
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
static sal_uInt32 ReleaseSolarMutex()
Release Solar Mutex(es) for this thread.
virtual void DeInit()
Deinitialized the application itself.
static void SetFilterHdl(const Link< ConvertData &, bool > &rLink)
Setup a new graphics filter.
static bool IsInExecute()
Queries whether the application is in the event loop.
static void Quit()
Quit the program.
static ImplSVEvent * PostMouseEvent(VclEventId nEvent, vcl::Window *pWin, MouseEvent const *pMouseEvent)
Send mouse event.
static bool IsEventTestingModeEnabled()
Determines if event testing mode is enabled.
static void EnableEventTestingMode()
Enables event testing mode.
static bool IsSafeModeEnabled()
Determines if safe mode is enabled.
static void EnableConsoleOnly()
Enable Console Only mode.
static unsigned int GetDisplayExternalScreen()
Get the display's external screen.
static void RemoveKeyListener(const Link< VclWindowEvent &, bool > &rKeyListener)
Remove a keypress listener from the application.
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
static void SetSettings(const AllSettings &rSettings)
Sets the application's settings and notifies all windows of the change.
static void SetHelp(Help *pHelp=nullptr)
Sets up help.
static void RemoveMouseAndKeyEvents(vcl::Window *pWin)
Remove mouse and keypress events from a window... any also zoom and scroll events if the platform sup...
static bool IsInMain()
Queries whether the application is in "main", i.e.
static bool Reschedule(bool bHandleAllCurrentEvents=false)
Attempt to process current pending event(s)
static bool AnyInput(VclInputFlags nType=VCL_INPUT_ANY)
Determine if there are any pending input events.
static Help * GetHelp()
Gets the application's help.
static void EnableBitmapRendering()
Enable software-only bitmap rendering.
static sal_uInt16 GetDispatchLevel()
Return how many events are being dispatched.
virtual void AppEvent(const ApplicationEvent &rAppEvent)
static vcl::Window * GetFocusWindow()
Get the currently focused window.
static weld::Window * GetDefDialogParent()
Get the default parent window for dialog boxes.
virtual void InitFinished()
Finish initialization of the application.
static tools::Rectangle GetScreenPosSizePixel(unsigned int nScreen)
Get a screen's rectangular area.
static void EnableSafeMode()
Set safe mode to enabled.
static OUString GetCommandLineParam(sal_uInt16 nParam)
Gets a particular command line parameter.
static void RemoveEventListener(const Link< VclSimpleEvent &, void > &rEventListener)
Remove a VCL event listener from the application.
static vcl::Window * GetActiveTopWindow()
Get the "active" top window.
static bool IsHeadlessModeEnabled()
Determines if headless mode is enabled.
static void AcquireSolarMutex(sal_uInt32 nCount)
Acquire Solar Mutex(es) for this thread.
static bool IsQuit()
Has Quit() been called?
static const LocaleDataWrapper & GetAppLocaleDataWrapper()
Get the application's locale data wrapper.
static OUString GetAppName()
Get the application's name.
static sal_uInt64 GetLastInputInterval()
The interval from the last time that input was received.
static void NotifyAllWindows(DataChangedEvent &rDCEvt)
Notify all windows that the application has changed data.
Application()
Default constructor for Application class.
static void AddKeyListener(const Link< VclWindowEvent &, bool > &rKeyListener)
Add a keypress listener to the application.
static vcl::Window * GetFirstTopLevelWindow()
Get the first top-level window of the application.
static SAL_DLLPRIVATE vcl::Window * GetDefDialogParent()
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
PanningOrientation meOrientation
GestureEventPanType meEventType
An idle is a timer to be scheduled immediately.
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
bool InsertAccel(Accelerator *pAccel)
void RemoveAccel(Accelerator const *pAccel)
LanguageType getLanguageType(bool bResolveSystem=true) const
void * GetInstance() const
MouseEventModifiers GetMode() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
SAL_DLLPRIVATE void SetDPIY(sal_Int32 nDPIY)
const MapMode & GetMapMode() const
SAL_DLLPRIVATE void SetDPIX(sal_Int32 nDPIX)
bool IsMapModeEnabled() const
virtual bool PostEvent(std::unique_ptr< ImplSVEvent > pData)=0
virtual bool AnyInput(VclInputFlags nType)=0
virtual void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService)=0
virtual bool IsMainThread() const =0
virtual OUString getOSVersion()
get information about underlying versions
void AcquireYieldMutex(sal_uInt32 nCount=1)
virtual void updateMainThread()
Set the app's (somewhat) magic/main-thread to this one.
sal_uInt32 ReleaseYieldMutexAll()
virtual bool hasNativeFileSelection() const
virtual bool DoExecute(int &nExitCode)
virtual css::uno::Reference< css::ui::dialogs::XFolderPicker2 > createFolderPicker(const css::uno::Reference< css::uno::XComponentContext > &)
virtual css::uno::Reference< css::ui::dialogs::XFilePicker2 > createFilePicker(const css::uno::Reference< css::uno::XComponentContext > &)
virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents)=0
Wait for the next event (if bWait) and dispatch it, includes posted events, and timers.
comphelper::SolarMutex * GetYieldMutex()
virtual void releaseMainThread()
Disconnect that - good for detaching from the JavaVM on Android.
virtual unsigned int GetDisplayScreenCount()=0
virtual bool IsUnifiedDisplay()
virtual tools::Rectangle GetDisplayScreenPosSizePixel(unsigned int nScreen)=0
virtual int ShowNativeMessageBox(const OUString &rTitle, const OUString &rMessage)=0
virtual unsigned int GetDisplayBuiltInScreen()
static void ProcessEventsToIdle()
Process all events until none is pending.
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
virtual OUString GetText() const override
void SetPriority(TaskPriority ePriority)
const char * GetDebugName() const
void SetInvokeHandler(const Link< Timer *, void > &rLink)
static void SetUnoWrapper(UnoWrapperBase *pWrapper)
Sets the application's UNO Wrapper object.
static UnoWrapperBase * GetUnoWrapper(bool bCreateIfNotExists=true)
Get the application's UNO wrapper object.
virtual css::uno::Reference< css::awt::XToolkit > GetVCLToolkit()=0
void removeListener(const Link< VclSimpleEvent &, void > &rListener)
void Call(VclSimpleEvent &rEvent) const
void addListener(const Link< VclSimpleEvent &, void > &rListener)
reference_type * get() const
Get the body.
VclPtr< VirtualDevice > mpNext
virtual bool Close() override
void setMaxSize(size_t nMaxSize)
static SAL_DLLPRIVATE void ImplInitAppFontData(vcl::Window const *pWindow)
tools::Long GetOutOffXPixel() const
tools::Long GetOutOffYPixel() const
void UpdateSettings(const AllSettings &rSettings, bool bChild=false)
::OutputDevice const * GetOutDev() const
std::unique_ptr< WindowImpl > mpWindowImpl
SalFrame * ImplGetFrame() const
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON.
weld::Window * GetFrameWeld() const
SAL_DLLPRIVATE void ImplUpdateGlobalSettings(AllSettings &rSettings, bool bCallHdl=true) const
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
void NotifyAllChildren(DataChangedEvent &rDCEvt)
bool IsMenuFloatingWindow() const
SAL_DLLPRIVATE vcl::Window * ImplGetClientWindow() const
#define DBG_TESTSOLARMUTEX()
constexpr sal_uInt16 KEY_0
constexpr sal_uInt16 KEY_F2
constexpr sal_uInt16 KEY_6
constexpr sal_uInt16 KEY_8
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_7
constexpr sal_uInt16 KEY_1
constexpr sal_uInt16 KEY_ADD
constexpr sal_uInt16 KEY_F4
constexpr sal_uInt16 KEY_4
constexpr sal_uInt16 KEY_F6
constexpr sal_uInt16 KEY_F10
constexpr sal_uInt16 KEY_5
constexpr sal_uInt16 KEY_F1
constexpr sal_uInt16 KEY_9
constexpr sal_uInt16 KEY_3
constexpr sal_uInt16 KEY_MOD3
constexpr sal_uInt16 KEY_2
constexpr sal_uInt16 KEY_SHIFT
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
std::unique_ptr< sal_Int32[]> pData
VCL_DLLPUBLIC bool isVCLSkiaEnabled()
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
OUString get(TranslateId sContextAndId, const std::locale &loc)
void registerPollCallbacks(LibreOfficeKitPollCallback pPollCallback, LibreOfficeKitWakeCallback pWakeCallback, void *pData)
void numberOfViewsChanged(int count)
void unregisterPollCallbacks()
void dumpState(rtl::OStringBuffer &rState)
void EndAllDialogs(vcl::Window const *pParent)
void SalAbort(const OUString &rErrorText, bool bDumpCore)
const OUString & SalGetDesktopEnvironment()
const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK
@ ExternalMouseButtonDown
#define SV_APP_VCLBACKEND
ImplPostEventData(VclEventId nEvent, vcl::Window *pWin, const GestureEventPan &rGestureEvent)
ImplPostEventData(VclEventId nEvent, vcl::Window *pWin, const KeyEvent &rKeyEvent)
ImplPostEventData(VclEventId nEvent, vcl::Window *pWin, const MouseEvent &rMouseEvent)
GestureEventPan maGestureEvent
VclPtr< vcl::Window > mpWin
SystemWindowFlags mnSysWinMode
std::optional< OUString > mxDisplayName
std::vector< Link< VclWindowEvent &, bool > > maKeyListeners
sal_uInt16 mnDispatchLevel
SvFileStream * mpEventTestInput
std::vector< ImplPostEventPair > maPostedEventList
std::optional< OUString > mxAppFileName
Idle * mpEventTestingIdle
std::optional< AllSettings > mxSettings
std::optional< OUString > mxToolkitName
DialogCancelMode meDialogCancel
VclEventListeners maEventListeners
LocaleConfigurationListener * mpCfgListener
std::optional< OUString > mxAppName
ImplAccelManager * mpAccelMgr
ImplSchedulerContext maSchedCtx
ImplSVFrameData maFrameData
oslThreadIdentifier mnMainThreadId
UnoWrapperBase * mpUnoWrapper
LibreOfficeKitPollCallback mpPollCallback
rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection
Link< LinkParamNone *, void > maDeInitHook
ImplSVWinData * mpWinData
LibreOfficeKitWakeCallback mpWakeCallback
VclPtr< vcl::Window > mpWindow
VclPtr< vcl::Window > mpInstanceRef
VclPtr< WorkWindow > mpAppWin
VclPtr< vcl::Window > mpFirstFrame
VclPtr< vcl::Window > mpActiveApplicationFrame
lru_scale_cache maScaleCache
std::unique_ptr< GraphicConverter > mxGrfConverter
VclPtr< VirtualDevice > mpFirstVirDev
VclPtr< FloatingWindow > mpFirstFloat
VclPtr< vcl::Window > mpFocusWin
VclPtr< vcl::Window > mpCaptureWin
VclPtr< vcl::Window > mpTrackWin
ImplSchedulerData * mpFirstSchedulerData[PRIO_COUNT]
list of all active tasks per priority
ImplSchedulerData * mpNext
Pointer to the next element in list.
bool mbInScheduler
Is the Task currently processed / on the stack?
Task * mpTask
Pointer to VCL Task instance.
IMPL_LINK_NOARG(ImplSVAppData, VclEventTestingHdl, Timer *, void)
static bool bEventTestingMode
vcl::KeyCode const ReservedKeys[]
static bool ImplYield(bool i_bWait, bool i_bAllEvents)
SAL_DLLPUBLIC_EXPORT void unit_lok_process_events_to_idle()
used by unit tests that test only via the LOK API
UnoWrapperBase *(* FN_TkCreateUnoWrapper)()
IMPL_STATIC_LINK_NOARG(ImplSVAppData, ImplEndAllPopupsMsg, void *, void)
static OUString Localize(TranslateId aId, const bool bLocalize)
IMPL_STATIC_LINK(Application, PostEventHandler, void *, pCallData, void)
@ Silent
silently cancel any dialogs
@ Fatal
cancel any dialogs by std::abort
@ Off
do not automatically cancel dialogs
SalSystem * ImplGetSalSystem()
ImplSVData * ImplGetSVData()
vcl::Window * ImplGetDefaultWindow()
Returns either the application window, or the default GL context window.
OUString VclResId(TranslateId aId)
basegfx::SystemDependentDataManager & ImplGetSystemDependentDataManager()
@ HIGH_IDLE
Important idle events to be run before processing drawing events.
TOOLKIT_DLLPUBLIC UnoWrapperBase * CreateUnoWrapper()
MouseEventModifiers ImplGetMouseButtonMode(SalMouseEvent const *pEvent)
MouseEventModifiers ImplGetMouseMoveMode(SalMouseEvent const *pEvent)
bool ImplLOKHandleMouseEvent(const VclPtr< vcl::Window > &xWindow, NotifyEventType nEvent, bool, tools::Long nX, tools::Long nY, sal_uInt64, sal_uInt16 nCode, MouseEventModifiers nMode, sal_uInt16 nClicks)
bool ImplWindowFrameProc(vcl::Window *_pWindow, SalEvent nEvent, const void *pEvent)
WinBits const WB_INTROWIN