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>
66#if OSL_DEBUG_LEVEL > 0
70#include <com/sun/star/uno/Reference.h>
71#include <com/sun/star/awt/XToolkit.hpp>
75#include <osl/process.h>
159 return pSVData->
mpApp;
165 OUString aVar(
"LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED);
166 osl_setEnvironment(aVar.pData, aValue.pData);
181 SAL_WARN(
"vcl",
"Application is a base class and should be overridden.");
191 return pAppWin->
Close();
214 return static_cast<sal_uInt16
>(osl_getCommandArgCount());
220 osl_getCommandArg( nParam, &aParam.pData );
235 OUString aAppFileName;
236 OUString aExeFileName;
237 osl_getExecutableFile(&aExeFileName.pData);
240 osl::FileBase::getSystemPathFromFileURL(aExeFileName, aAppFileName);
254 Abort(
"Unknown Error");
264#if OSL_DEBUG_LEVEL > 0
265 bool dumpCore =
true;
267 bool dumpCore =
false;
269 for (sal_uInt16
i = 0;
i !=
n; ++
i) {
295 const std::vector<vcl::LOKPayloadItem>& )
const
297 SAL_WARN(
"vcl",
"Invoked not implemented method: Application::notifyWindow");
326 SAL_WARN(
"vcl.schedule",
"Can't omit DoExecute when running on system event loop!");
342 SAL_INFO(
"vcl.schedule",
"Enter ImplYield: " << (i_bWait ?
"wait" :
"no wait") <<
343 ": " << (i_bAllEvents ?
"all events" :
"one event"));
359 SAL_INFO(
"vcl.schedule",
"Leave ImplYield with return " << bProcessedEvent );
360 return bProcessedEvent;
368 SAL_WARN(
"vcl.schedule",
"Application::Reschedule(" << i_bAllEvents <<
")");
384 if (0 == ++nSanity % 1000)
386 SAL_WARN(
"vcl.schedule",
"ProcessEventsToIdle: " << nSanity);
389#if OSL_DEBUG_LEVEL > 0
396 for (
int nTaskPriority = 0; nTaskPriority <
PRIO_COUNT; ++nTaskPriority)
399 while (pSchedulerData)
402 if (pSchedulerData->
mpTask)
413 pSchedulerData = pSchedulerData->
mpNext;
433 SAL_WARN(
"vcl.schedule",
"Application::Yield()");
551 InitSettings(pSVData);
564 if (
bool(nChangeFlags) )
595 pClientWin = pTempWin;
602 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
617 (pVirDev->
GetDPIX() == nOldDPIX) &&
618 (pVirDev->
GetDPIY() == nOldDPIY) )
630 pVirDev = pVirDev->
mpNext;
643 InitSettings(pSVData);
680 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
720 rVec.erase( std::remove(rVec.begin(), rVec.end(), rKeyListener ), rVec.end() );
733 bool bProcessed =
false;
738 if( rLink.Call(
aEvent ) )
752 if( pWin && pKeyEvent )
754 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, *pKeyEvent ));
758 pPostEventData.get() );
762 pPostEventData->mnEventId = nEventId;
776 if (pWin && pGestureEvent)
778 Point aTransformedPosition(pGestureEvent->
mnX, pGestureEvent->
mnY);
784 sal_Int32(aTransformedPosition.
X()),
785 sal_Int32(aTransformedPosition.
Y()),
791 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData(nEvent, pWin, aGestureEvent));
795 pPostEventData.get());
799 pPostEventData->mnEventId = nEventId;
809 bool bSuccess =
false;
828 aMouseEvent.
mnX, aMouseEvent.
mnY,
837 aMouseEvent.
mnX, aMouseEvent.
mnY,
853 aMouseEvent.
mnX, aMouseEvent.
mnY,
867 SAL_WARN(
"vcl.layout",
"Application::HandleMouseEvent unknown event (" <<
static_cast<int>(nEvent) <<
")" );
880 if( pWin && pMouseEvent )
894 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, aTransformedEvent ));
898 pPostEventData.get() );
902 pPostEventData->mnEventId = nEventId;
915 const void* pEventData;
919 switch(
pData->mnEvent )
923 pEventData = &
pData->maMouseEvent;
928 pEventData = &
pData->maMouseEvent;
933 pEventData = &
pData->maMouseEvent;
938 pEventData = &
pData->maKeyEvent;
943 pEventData = &
pData->maKeyEvent;
948 pEventData = &
pData->maGestureEvent;
953 pEventData =
nullptr;
957 if(
pData->mpWin &&
pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
962 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
964 while( aIter != svdata->maAppData.maPostedEventList.end() )
966 if( nEventId == (*aIter).second->mnEventId )
968 delete (*aIter).second;
969 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
982 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
984 while( aIter != svdata->maAppData.maPostedEventList.end() )
986 if( pWin == (*aIter).first )
988 if( (*aIter).second->mnEventId )
991 delete (*aIter).second;
992 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
1000 bool bReferenceLink )
1003 if ( pDefWindow ==
nullptr )
1006 std::unique_ptr<ImplSVEvent> pSVEvent(
new ImplSVEvent);
1007 pSVEvent->mpData = pCaller;
1008 pSVEvent->maLink = rLink;
1009 pSVEvent->mpWindow =
nullptr;
1010 pSVEvent->mbCall =
true;
1017 auto pTmpEvent = pSVEvent.get();
1028 "Application::RemoveUserEvent(): Event is send to a window" );
1030 "Application::RemoveUserEvent(): Event is already removed" );
1034 nUserEvent->
mbCall =
false;
1046 if (pWindow !=
nullptr)
1069 return pWindow->
mpWindowImpl->mpFrameData->mpNextFrame;
1155 OUStringBuffer aDetails;
1157 const auto appendDetails = [&aDetails](std::u16string_view sep,
auto&& val) {
1158 if (!aDetails.isEmpty() && !sep.empty())
1159 aDetails.append(sep);
1160 aDetails.append(std::move(val));
1163 if (bSelection !=
hwUI) {
1164 appendDetails(
u"; ",
Localize(SV_APP_CPUTHREADS, bLocalize)
1165 + OUString::number(std::thread::hardware_concurrency()));
1169 appendDetails(
u"; ",
Localize(SV_APP_OSVERSION, bLocalize) + aVersion);
1172 if (bSelection !=
hwEnv) {
1173 appendDetails(
u"; ",
Localize(SV_APP_UIRENDER, bLocalize));
1174#if HAVE_FEATURE_SKIA
1177 switch(SkiaHelper::renderMethodToUse())
1179 case SkiaHelper::RenderVulkan:
1180 appendDetails(
u"",
Localize(SV_APP_SKIA_VULKAN, bLocalize));
1182 case SkiaHelper::RenderMetal:
1183 appendDetails(
u"",
Localize(SV_APP_SKIA_METAL, bLocalize));
1185 case SkiaHelper::RenderRaster:
1186 appendDetails(
u"",
Localize(SV_APP_SKIA_RASTER, bLocalize));
1192 appendDetails(
u"",
Localize(SV_APP_DEFAULT, bLocalize));
1194#if (defined LINUX || defined _WIN32 || defined MACOSX || defined __FreeBSD__ || defined EMSCRIPTEN)
1199 return aDetails.makeStringAndClear();
1259 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" failed");
1265 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" returned 0 height.");
1273 (i_rRect.
Top() + i_rRect.
Bottom())/ 2 );
1274 const tools::Long nDX = aRectCenter.X() - i_rPoint.
X();
1275 const tools::Long nDY = aRectCenter.Y() - i_rPoint.
Y();
1276 return nDX*nDX + nDY*nDY;
1283 unsigned int nBestMatchScreen = 0;
1284 unsigned long nOverlap = 0;
1285 for(
unsigned int i = 0;
i < nScreens;
i++ )
1289 if( aCurScreenRect.
Contains( i_rRect ) )
1293 if( ! aIntersection.
IsEmpty() )
1295 const unsigned long nCurOverlap( aIntersection.
GetWidth() * aIntersection.
GetHeight() );
1296 if( nCurOverlap > nOverlap )
1298 nOverlap = nCurOverlap;
1299 nBestMatchScreen =
i;
1304 return nBestMatchScreen;
1309 tools::Long nDist = std::numeric_limits<tools::Long>::max();
1310 for(
unsigned int i = 0;
i < nScreens;
i++ )
1313 const tools::Long nCurDist( calcDistSquare( aCenter, aCurScreenRect ) );
1314 if( nCurDist < nDist )
1316 nBestMatchScreen =
i;
1320 return nBestMatchScreen;
1385 OSL_FAIL(
"Window hierarchy corrupted!" );
1392 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1400 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1414 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1456 css::uno::Reference< css::awt::XToolkit > xT;
1463#ifdef DISABLE_DYNLOADING
1476 static bool bAlreadyTriedToCreate =
false;
1477 if ( !pSVData->
mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
1479#ifndef DISABLE_DYNLOADING
1481 aTkLib.loadRelative(&
thisModule, TK_DLL_NAME);
1485 if ( fnCreateWrapper )
1495 bAlreadyTriedToCreate =
true;
1535 if (eOldMode != eNewMode)
1573 const OUString& sMessage)
1579 SAL_WARN(
"vcl",
"ShowNativeMessageBox returned " << btn);
1587 static const OUString aNone(
"none");
1606 bool bRet = ImplInitAccessBridge();
1613 aMisc.SetEnableATToolSupport(
false );
1632Reference< ui::dialogs::XFilePicker2 >
1639Reference< ui::dialogs::XFolderPicker2 >
1658 LibreOfficeKitPollCallback pPollCallback,
1659 LibreOfficeKitWakeCallback pWakeCallback,
1711 rState.append(
"\nWindows:\t");
1720 rState.append(
"\n\tWindow: ");
1721 rState.append(
props.finishAndGetAsOString());
1733 if (nTarget >= 1000)
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.
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
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 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
Callbacks.
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
virtual int Main()
Pure virtual entrypoint to the application.
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 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.
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.
virtual void notifyInvalidation(tools::Rectangle const *) const override
Emits a LOK_CALLBACK_INVALIDATE_TILES.
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()
PanningOrientation meOrientation
GestureEventPanType meEventType
An idle is a timer to be scheduled immediately.
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
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() 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 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.
virtual OUString GetText() const override
const char * GetDebugName() const
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
void dumpState(rtl::OStringBuffer &rState)
#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 trimMemory(int nTarget)
void dumpState(rtl::OStringBuffer &rState)
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
std::vector< ImplPostEventPair > maPostedEventList
std::optional< OUString > mxAppFileName
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
void dumpState(rtl::OStringBuffer &rState)
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.
vcl::KeyCode const ReservedKeys[]
static bool ImplYield(bool i_bWait, bool i_bAllEvents)
IMPL_STATIC_LINK_NOARG(ImplSVAppData, ImplQuitMsg, void *, void)
SAL_DLLPUBLIC_EXPORT void unit_lok_process_events_to_idle()
used by unit tests that test only via the LOK API
UnoWrapperBase *(* FN_TkCreateUnoWrapper)()
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()
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