LibreOffice Module sfx2 (master) 1
|
#include <sal/macros.h>
#include <sal/log.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/dynamicmenuoptions.hxx>
#include "shutdownicon.hxx"
#include <sfx2/sfxresid.hxx>
#include <sfx2/strings.hrc>
#include <shlobj.h>
#include <objidl.h>
#include <osl/diagnose.h>
#include <osl/thread.h>
#include <systools/win32/qswin32.h>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/windowserrorstring.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
#include <set>
Go to the source code of this file.
Macros | |
#define | EXECUTER_WINDOWCLASS L"SO Executer Class" |
#define | EXECUTER_WINDOWNAME L"SO Executer Window" |
#define | ID_QUICKSTART 1 |
#define | IDM_EXIT 2 |
#define | IDM_OPEN 3 |
#define | IDM_WRITER 4 |
#define | IDM_CALC 5 |
#define | IDM_IMPRESS 6 |
#define | IDM_DRAW 7 |
#define | IDM_BASE 8 |
#define | IDM_TEMPLATE 9 |
#define | IDM_MATH 12 |
#define | IDM_INSTALL 10 |
#define | IDM_STARTCENTER 14 |
#define | ICON_LO_DEFAULT 1 |
#define | ICON_TEXT_DOCUMENT 2 |
#define | ICON_SPREADSHEET_DOCUMENT 4 |
#define | ICON_DRAWING_DOCUMENT 6 |
#define | ICON_PRESENTATION_DOCUMENT 8 |
#define | ICON_TEMPLATE 11 |
#define | ICON_DATABASE_DOCUMENT 12 |
#define | ICON_MATH_DOCUMENT 13 |
#define | ICON_OPEN 5 |
#define | SFX_TASKBAR_NOTIFICATION WM_USER+1 |
#define | ALLOC(type, n) static_cast<type *>(HeapAlloc(GetProcessHeap(), 0, sizeof(type) * n )) |
#define | FREE(p) HeapFree(GetProcessHeap(), 0, p) |
Functions | |
static void | OnMeasureItem (HWND hwnd, LPMEASUREITEMSTRUCT lpmis) |
static void | OnDrawItem (HWND hwnd, LPDRAWITEMSTRUCT lpdis) |
static void | addMenuItem (HMENU hMenu, UINT id, UINT iconId, const OUString &text, int &pos, bool bOwnerdraw, const OUString &module) |
static HMENU | createSystrayMenu () |
static void | deleteSystrayMenu (HMENU hMenu) |
static void | addTaskbarIcon (HWND hWnd) |
static LRESULT CALLBACK | listenerWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
static LRESULT CALLBACK | executerWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
static DWORD WINAPI | SystrayThread (LPVOID) |
void | win32_init_sys_tray () |
void | win32_shutdown_sys_tray () |
static void | SHFree_ (void *pv) |
static OUString | SHGetSpecialFolder (int nFolderID) |
static HRESULT WINAPI | SHCoCreateInstance (LPVOID lpszReserved, REFCLSID clsid, LPUNKNOWN pUnkUnknown, REFIID iid, LPVOID *ppv) |
static bool | CreateShortcut (const OUString &rAbsObject, const OUString &rAbsObjectPath, const OUString &rAbsShortcut, const OUString &rDescription, const OUString &rParameter) |
static bool | FileExistsW (LPCWSTR lpPath) |
Variables | |
static HWND | aListenerWindow = nullptr |
static HWND | aExecuterWindow = nullptr |
static HMENU | popupMenu = nullptr |
Definition at line 672 of file shutdowniconw32.cxx.
#define EXECUTER_WINDOWCLASS L"SO Executer Class" |
Definition at line 43 of file shutdowniconw32.cxx.
#define EXECUTER_WINDOWNAME L"SO Executer Window" |
Definition at line 44 of file shutdowniconw32.cxx.
Definition at line 673 of file shutdowniconw32.cxx.
#define ICON_DATABASE_DOCUMENT 12 |
Definition at line 67 of file shutdowniconw32.cxx.
#define ICON_DRAWING_DOCUMENT 6 |
Definition at line 64 of file shutdowniconw32.cxx.
#define ICON_LO_DEFAULT 1 |
Definition at line 61 of file shutdowniconw32.cxx.
#define ICON_MATH_DOCUMENT 13 |
Definition at line 68 of file shutdowniconw32.cxx.
#define ICON_OPEN 5 |
Definition at line 69 of file shutdowniconw32.cxx.
#define ICON_PRESENTATION_DOCUMENT 8 |
Definition at line 65 of file shutdowniconw32.cxx.
#define ICON_SPREADSHEET_DOCUMENT 4 |
Definition at line 63 of file shutdowniconw32.cxx.
#define ICON_TEMPLATE 11 |
Definition at line 66 of file shutdowniconw32.cxx.
#define ICON_TEXT_DOCUMENT 2 |
Definition at line 62 of file shutdowniconw32.cxx.
#define ID_QUICKSTART 1 |
Definition at line 47 of file shutdowniconw32.cxx.
#define IDM_BASE 8 |
Definition at line 54 of file shutdowniconw32.cxx.
#define IDM_CALC 5 |
Definition at line 51 of file shutdowniconw32.cxx.
#define IDM_DRAW 7 |
Definition at line 53 of file shutdowniconw32.cxx.
#define IDM_EXIT 2 |
Definition at line 48 of file shutdowniconw32.cxx.
#define IDM_IMPRESS 6 |
Definition at line 52 of file shutdowniconw32.cxx.
#define IDM_INSTALL 10 |
Definition at line 57 of file shutdowniconw32.cxx.
#define IDM_MATH 12 |
Definition at line 56 of file shutdowniconw32.cxx.
#define IDM_OPEN 3 |
Definition at line 49 of file shutdowniconw32.cxx.
#define IDM_STARTCENTER 14 |
Definition at line 58 of file shutdowniconw32.cxx.
#define IDM_TEMPLATE 9 |
Definition at line 55 of file shutdowniconw32.cxx.
#define IDM_WRITER 4 |
Definition at line 50 of file shutdowniconw32.cxx.
#define SFX_TASKBAR_NOTIFICATION WM_USER+1 |
Definition at line 71 of file shutdowniconw32.cxx.
|
static |
Definition at line 91 of file shutdowniconw32.cxx.
References IDM_TEMPLATE, mi, module, pos, text(), and TRUE.
Referenced by createSystrayMenu().
|
static |
Definition at line 223 of file shutdowniconw32.cxx.
References ICON_LO_DEFAULT, ID_QUICKSTART, SFX_TASKBAR_NOTIFICATION, and SfxResId().
Referenced by listenerWndProc().
|
static |
Definition at line 718 of file shutdowniconw32.cxx.
References SHCoCreateInstance(), and TRUE.
|
static |
Definition at line 132 of file shutdowniconw32.cxx.
References addMenuItem(), BASE_URL, SvtModuleOptions::CALC, CALC_URL, CheckMenuItem, SvtModuleOptions::DATABASE, SvtModuleOptions::DRAW, DRAW_URL, ShutdownIcon::GetAutostart(), ShutdownIcon::getInstance(), SvtDynamicMenuOptions::GetMenu(), ShutdownIcon::GetUrlDescription(), ICON_DATABASE_DOCUMENT, ICON_DRAWING_DOCUMENT, ICON_MATH_DOCUMENT, ICON_OPEN, ICON_PRESENTATION_DOCUMENT, ICON_SPREADSHEET_DOCUMENT, ICON_TEMPLATE, ICON_TEXT_DOCUMENT, IDM_BASE, IDM_CALC, IDM_DRAW, IDM_EXIT, IDM_IMPRESS, IDM_INSTALL, IDM_MATH, IDM_OPEN, IDM_TEMPLATE, IDM_WRITER, SvtModuleOptions::IMPRESS, IMPRESS_WIZARD_URL, SvtModuleOptions::IsModuleInstalled(), SvtModuleOptions::MATH, MATH_URL, pos, SfxResId(), SvtModuleOptions::WRITER, and WRITER_URL.
Referenced by listenerWndProc().
|
static |
Definition at line 205 of file shutdowniconw32.cxx.
Referenced by listenerWndProc().
|
static |
Definition at line 369 of file shutdowniconw32.cxx.
References BASE_URL, ShutdownIcon::bModalMode, CALC_URL, CALLBACK, DRAW_URL, ShutdownIcon::FileOpen(), ShutdownIcon::FromTemplate(), ShutdownIcon::GetAutostart(), IDM_BASE, IDM_CALC, IDM_DRAW, IDM_EXIT, IDM_IMPRESS, IDM_INSTALL, IDM_MATH, IDM_OPEN, IDM_STARTCENTER, IDM_TEMPLATE, IDM_WRITER, IMPRESS_WIZARD_URL, MATH_URL, ShutdownIcon::OpenURL(), ShutdownIcon::SetAutostart(), STARTMODULE_URL, ShutdownIcon::terminateDesktop(), TRUE, and WRITER_URL.
Referenced by win32_init_sys_tray().
|
static |
Definition at line 756 of file shutdowniconw32.cxx.
|
static |
Definition at line 245 of file shutdowniconw32.cxx.
References addTaskbarIcon(), ShutdownIcon::addTerminateListener(), aExecuterWindow, ShutdownIcon::bModalMode, CALLBACK, CheckMenuItem, createSystrayMenu(), deleteSystrayMenu(), ShutdownIcon::GetAutostart(), ShutdownIcon::getInstance(), ID_QUICKSTART, IDM_BASE, IDM_CALC, IDM_DRAW, IDM_EXIT, IDM_IMPRESS, IDM_INSTALL, IDM_MATH, IDM_OPEN, IDM_STARTCENTER, IDM_TEMPLATE, IDM_WRITER, m, OnDrawItem(), OnMeasureItem(), POINT, popupMenu, pt, SAL_WARN_IF, ShutdownIcon::SetVeto(), SFX_TASKBAR_NOTIFICATION, and TRUE.
Referenced by win32_init_sys_tray().
|
static |
Definition at line 569 of file shutdowniconw32.cxx.
References FW_BOLD, PATCOPY, RECT, size, SIZE, x, and y.
Referenced by listenerWndProc().
|
static |
Definition at line 542 of file shutdowniconw32.cxx.
References FW_BOLD, GetDC, size, and SIZE.
Referenced by listenerWndProc().
|
static |
Definition at line 701 of file shutdowniconw32.cxx.
Referenced by CreateShortcut().
|
static |
Definition at line 662 of file shutdowniconw32.cxx.
Referenced by SHGetSpecialFolder().
|
static |
Definition at line 675 of file shutdowniconw32.cxx.
|
static |
Definition at line 429 of file shutdowniconw32.cxx.
References aListenerWindow, and SAL_WARN.
Referenced by win32_init_sys_tray().
void win32_init_sys_tray | ( | ) |
Definition at line 469 of file shutdowniconw32.cxx.
References aExecuterWindow, EXECUTER_WINDOWCLASS, EXECUTER_WINDOWNAME, executerWndProc(), ShutdownIcon::IsQuickstarterInstalled(), listenerWndProc(), and SystrayThread().
Referenced by ShutdownIcon::initSystray().
void win32_shutdown_sys_tray | ( | ) |
Definition at line 525 of file shutdowniconw32.cxx.
References aExecuterWindow, aListenerWindow, EXECUTER_WINDOWCLASS, and ShutdownIcon::IsQuickstarterInstalled().
Referenced by ShutdownIcon::deInitSystray().
|
static |
Definition at line 74 of file shutdowniconw32.cxx.
Referenced by listenerWndProc(), win32_init_sys_tray(), and win32_shutdown_sys_tray().
|
static |
Definition at line 73 of file shutdowniconw32.cxx.
Referenced by SystrayThread(), and win32_shutdown_sys_tray().
|
static |
Definition at line 75 of file shutdowniconw32.cxx.
Referenced by listenerWndProc().