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) {
312 const std::vector<vcl::LOKPayloadItem>& )
const
314 SAL_WARN(
"vcl",
"Invoked not implemented method: Application::notifyWindow");
343 SAL_WARN(
"vcl.schedule",
"Can't omit DoExecute when running on system event loop!");
359 SAL_INFO(
"vcl.schedule",
"Enter ImplYield: " << (i_bWait ?
"wait" :
"no wait") <<
360 ": " << (i_bAllEvents ?
"all events" :
"one event"));
376 SAL_INFO(
"vcl.schedule",
"Leave ImplYield with return " << bProcessedEvent );
377 return bProcessedEvent;
385 SAL_WARN(
"vcl.schedule",
"Application::Reschedule(" << i_bAllEvents <<
")");
401 if (0 == ++nSanity % 1000)
403 SAL_WARN(
"vcl.schedule",
"ProcessEventsToIdle: " << nSanity);
406#if OSL_DEBUG_LEVEL > 0
413 for (
int nTaskPriority = 0; nTaskPriority <
PRIO_COUNT; ++nTaskPriority)
416 while (pSchedulerData)
419 if (pSchedulerData->
mpTask)
430 pSchedulerData = pSchedulerData->
mpNext;
450 SAL_WARN(
"vcl.schedule",
"Application::Yield()");
568 InitSettings(pSVData);
581 if (
bool(nChangeFlags) )
612 pClientWin = pTempWin;
619 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
634 (pVirDev->
GetDPIX() == nOldDPIX) &&
635 (pVirDev->
GetDPIY() == nOldDPIY) )
647 pVirDev = pVirDev->
mpNext;
660 InitSettings(pSVData);
697 pFrame = pFrame->
mpWindowImpl->mpFrameData->mpNextFrame;
737 rVec.erase( std::remove(rVec.begin(), rVec.end(), rKeyListener ), rVec.end() );
750 bool bProcessed =
false;
755 if( rLink.Call(
aEvent ) )
769 if( pWin && pKeyEvent )
771 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, *pKeyEvent ));
775 pPostEventData.get() );
779 pPostEventData->mnEventId = nEventId;
793 if (pWin && pGestureEvent)
795 Point aTransformedPosition(pGestureEvent->
mnX, pGestureEvent->
mnY);
801 sal_Int32(aTransformedPosition.X()),
802 sal_Int32(aTransformedPosition.Y()),
808 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData(nEvent, pWin, aGestureEvent));
812 pPostEventData.get());
816 pPostEventData->mnEventId = nEventId;
826 bool bSuccess =
false;
845 aMouseEvent.
mnX, aMouseEvent.
mnY,
854 aMouseEvent.
mnX, aMouseEvent.
mnY,
870 aMouseEvent.
mnX, aMouseEvent.
mnY,
884 SAL_WARN(
"vcl.layout",
"Application::HandleMouseEvent unknown event (" <<
static_cast<int>(nEvent) <<
")" );
897 if( pWin && pMouseEvent )
911 std::unique_ptr<ImplPostEventData> pPostEventData(
new ImplPostEventData( nEvent, pWin, aTransformedEvent ));
915 pPostEventData.get() );
919 pPostEventData->mnEventId = nEventId;
932 const void* pEventData;
936 switch(
pData->mnEvent )
940 pEventData = &
pData->maMouseEvent;
945 pEventData = &
pData->maMouseEvent;
950 pEventData = &
pData->maMouseEvent;
955 pEventData = &
pData->maKeyEvent;
960 pEventData = &
pData->maKeyEvent;
965 pEventData = &
pData->maGestureEvent;
970 pEventData =
nullptr;
974 if(
pData->mpWin &&
pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
979 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
981 while( aIter != svdata->maAppData.maPostedEventList.end() )
983 if( nEventId == (*aIter).second->mnEventId )
985 delete (*aIter).second;
986 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
999 ::std::vector< ImplPostEventPair >::iterator aIter( svdata->maAppData.maPostedEventList.begin() );
1001 while( aIter != svdata->maAppData.maPostedEventList.end() )
1003 if( pWin == (*aIter).first )
1005 if( (*aIter).second->mnEventId )
1008 delete (*aIter).second;
1009 aIter = svdata->maAppData.maPostedEventList.erase( aIter );
1017 bool bReferenceLink )
1020 if ( pDefWindow ==
nullptr )
1023 std::unique_ptr<ImplSVEvent> pSVEvent(
new ImplSVEvent);
1024 pSVEvent->mpData = pCaller;
1025 pSVEvent->maLink = rLink;
1026 pSVEvent->mpWindow =
nullptr;
1027 pSVEvent->mbCall =
true;
1034 auto pTmpEvent = pSVEvent.get();
1045 "Application::RemoveUserEvent(): Event is send to a window" );
1047 "Application::RemoveUserEvent(): Event is already removed" );
1051 nUserEvent->
mbCall =
false;
1063 if (pWindow !=
nullptr)
1086 return pWindow->
mpWindowImpl->mpFrameData->mpNextFrame;
1172 OUStringBuffer aDetails;
1174 const auto appendDetails = [&aDetails](std::u16string_view sep,
auto&& val) {
1175 if (!aDetails.isEmpty() && !sep.empty())
1176 aDetails.append(sep);
1177 aDetails.append(std::move(val));
1180 if (bSelection !=
hwUI) {
1181 appendDetails(
u"; ",
Localize(SV_APP_CPUTHREADS, bLocalize)
1182 + OUString::number(std::thread::hardware_concurrency()));
1186 appendDetails(
u"; ",
Localize(SV_APP_OSVERSION, bLocalize) + aVersion);
1189 if (bSelection !=
hwEnv) {
1190 appendDetails(
u"; ",
Localize(SV_APP_UIRENDER, bLocalize));
1191#if HAVE_FEATURE_SKIA
1194 switch(SkiaHelper::renderMethodToUse())
1196 case SkiaHelper::RenderVulkan:
1197 appendDetails(
u"",
Localize(SV_APP_SKIA_VULKAN, bLocalize));
1199 case SkiaHelper::RenderMetal:
1200 appendDetails(
u"",
Localize(SV_APP_SKIA_METAL, bLocalize));
1202 case SkiaHelper::RenderRaster:
1203 appendDetails(
u"",
Localize(SV_APP_SKIA_RASTER, bLocalize));
1209 appendDetails(
u"",
Localize(SV_APP_DEFAULT, bLocalize));
1211#if (defined LINUX || defined _WIN32 || defined MACOSX || defined __FreeBSD__ || defined EMSCRIPTEN)
1216 return aDetails.makeStringAndClear();
1282 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" failed");
1288 SAL_WARN(
"vcl",
"Requesting screen size/pos for screen #" << nScreen <<
" returned 0 height.");
1296 (i_rRect.
Top() + i_rRect.
Bottom())/ 2 );
1297 const tools::Long nDX = aRectCenter.X() - i_rPoint.X();
1298 const tools::Long nDY = aRectCenter.Y() - i_rPoint.Y();
1299 return nDX*nDX + nDY*nDY;
1309 unsigned int nBestMatchScreen = 0;
1310 unsigned long nOverlap = 0;
1311 for(
unsigned int i = 0;
i < nScreens;
i++ )
1315 if( aCurScreenRect.
Contains( i_rRect ) )
1319 if( ! aIntersection.
IsEmpty() )
1321 const unsigned long nCurOverlap( aIntersection.
GetWidth() * aIntersection.
GetHeight() );
1322 if( nCurOverlap > nOverlap )
1324 nOverlap = nCurOverlap;
1325 nBestMatchScreen =
i;
1330 return nBestMatchScreen;
1335 tools::Long nDist = std::numeric_limits<tools::Long>::max();
1336 for(
unsigned int i = 0;
i < nScreens;
i++ )
1339 const tools::Long nCurDist( calcDistSquare( aCenter, aCurScreenRect ) );
1340 if( nCurDist < nDist )
1342 nBestMatchScreen =
i;
1346 return nBestMatchScreen;
1411 OSL_FAIL(
"Window hierarchy corrupted!" );
1418 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1426 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1440 return pWin->
mpWindowImpl->mpFrameWindow->ImplGetWindow();
1482 css::uno::Reference< css::awt::XToolkit > xT;
1489#ifdef DISABLE_DYNLOADING
1502 static bool bAlreadyTriedToCreate =
false;
1503 if ( !pSVData->
mpUnoWrapper && bCreateIfNotExist && !bAlreadyTriedToCreate )
1505#ifndef DISABLE_DYNLOADING
1507 aTkLib.loadRelative(&
thisModule, TK_DLL_NAME);
1511 if ( fnCreateWrapper )
1521 bAlreadyTriedToCreate =
true;
1561 if (eOldMode != eNewMode)
1599 const OUString& sMessage)
1605 SAL_WARN(
"vcl",
"ShowNativeMessageBox returned " << btn);
1613 static const OUString aNone(
"none");
1632 bool bRet = ImplInitAccessBridge();
1639 aMisc.SetEnableATToolSupport(
false );
1658Reference< ui::dialogs::XFilePicker2 >
1665Reference< ui::dialogs::XFolderPicker2 >
1684 LibreOfficeKitPollCallback pPollCallback,
1685 LibreOfficeKitWakeCallback pWakeCallback,
1737 rState.append(
"\nWindows:\t");
1746 rState.append(
"\n\tWindow: ");
1747 rState.append(
props.finishAndGetAsOString());
1759 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 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
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()
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
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
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.
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 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
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)
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()
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