99 #include "wine/unicode.h" 103 #include "commctrl.h" 153 #define ID_TIMERSHOW 1 154 #define ID_TIMERPOP 2 155 #define ID_TIMERLEAVE 3 158 #define TOOLTIPS_GetInfoPtr(hWindow) ((TOOLTIPS_INFO *)GetWindowLongPtrW (hWindow, 0)) 161 #define NORMAL_TEXT_MARGIN 2 162 #define BALLOON_TEXT_MARGIN (NORMAL_TEXT_MARGIN+8) 165 #define BALLOON_ROUNDEDNESS 20 166 #define BALLOON_STEMHEIGHT 13 167 #define BALLOON_STEMWIDTH 10 168 #define BALLOON_STEMINDENT 20 170 #define BALLOON_ICON_TITLE_SPACING 8 171 #define BALLOON_TITLE_TEXT_SPACING 8 172 #define ICON_HEIGHT 16 173 #define ICON_WIDTH 16 175 #define MAX_TEXT_SIZE_A 80 202 NONCLIENTMETRICSW nclm;
208 nclm.cbSize =
sizeof(nclm);
213 nclm.lfStatusFont.lfWeight =
FW_BOLD;
231 lpnmttcd->
nmcd.
rc = *rcBounds;
390 toolPtr->
hinst = ttnmdi.hinst;
394 else if (ttnmdi.lpszText == 0) {
406 ERR(
"recursive text callback\n");
419 }
else if (ttnmdi.lpszText &&
446 toolPtr->
hinst = ttnmdi.hinst;
447 toolPtr->
lpszText = ttnmdi.lpszText;
450 else if (ttnmdi.lpszText == 0) {
462 ERR(
"recursive text callback\n");
475 }
else if (ttnmdi.lpszText &&
490 TRACE(
"load res string %p %x\n",
529 RECT rc = {0, 0, 0, 0};
543 RECT rcTitle = {0, 0, 0, 0};
604 if (infoPtr->
nTool == -1)
609 nTool = infoPtr->
nTool;
612 TRACE(
"Show tooltip pre %d, %p\n", nTool, infoPtr->
hwndSelf);
626 toolPtr = &infoPtr->
tools[nTool];
659 rcTool = toolPtr->
rect;
741 mon_info.
cbSize =
sizeof(mon_info);
823 hdr.idFrom = toolPtr->
uId;
837 TRACE(
"timer 2 started\n");
839 TRACE(
"timer 3 started\n");
859 hdr.idFrom = toolPtr->
uId;
891 hdr.idFrom = toolPtr->
uId;
907 for (nTool = 0; nTool < infoPtr->
uNumTools; nTool++) {
908 toolPtr = &infoPtr->
tools[nTool];
911 (lpToolInfo->
hwnd == toolPtr->
hwnd) &&
912 (lpToolInfo->
uId == toolPtr->
uId))
916 for (nTool = 0; nTool < infoPtr->
uNumTools; nTool++) {
917 toolPtr = &infoPtr->
tools[nTool];
920 (lpToolInfo->
uId == toolPtr->
uId))
934 for (nTool = 0; nTool < infoPtr->
uNumTools; nTool++) {
935 toolPtr = &infoPtr->
tools[nTool];
946 for (nTool = 0; nTool < infoPtr->
uNumTools; nTool++) {
947 toolPtr = &infoPtr->
tools[nTool];
994 if (hwndActive ==
hwnd)
1024 TRACE(
"not active: hwnd %p, parent %p, active %p\n",
1030 TRACE(
"tool %d\n", nTool);
1041 TRACE(
"activate %d\n", activate);
1056 if (!ti)
return FALSE;
1066 toolPtr = infoPtr->
tools;
1095 TRACE(
"add CALLBACK\n");
1126 TRACE(
"subclassing installed\n");
1133 TRACE(
" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
1136 TRACE(
" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
1138 TRACE (
" -- WM_NOTIFYFORMAT returns: %d\n", nResult);
1167 TRACE(
"tool %d\n", nTool);
1176 toolPtr = &infoPtr->
tools[nTool];
1199 if (nTool < infoPtr->uNumTools - 1)
1200 memcpy (&infoPtr->
tools[nTool], &oldTools[nTool + 1],
1209 if (infoPtr->
nTool == nTool)
1211 infoPtr->
nTool = -1;
1212 else if (infoPtr->
nTool > nTool)
1241 TRACE(
"index=%u\n", uIndex);
1254 if (lpToolInfo ==
NULL)
1260 if (nTool == -1)
return 0;
1262 TRACE(
"tool %d\n", nTool);
1300 WARN(
"Invalid duration flag %x\n", duration);
1335 if (nTool == -1)
return 0;
1365 return infoPtr->
clrBk;
1389 if (!ti)
return FALSE;
1399 TRACE(
"tool %d\n", nTool);
1422 TRACE(
"tool %d\n", nTool);
1445 if (nTool == -1)
return 0;
1469 ERR(
"lpMsg == NULL\n");
1486 nOldTool = infoPtr->
nTool;
1493 if (infoPtr->
nTool != nOldTool) {
1494 if(infoPtr->
nTool == -1) {
1497 }
else if (nOldTool == -1) {
1500 TRACE(
"timer 1 started\n");
1507 TRACE(
"timer 1 started\n");
1513 TRACE(
"timer 2 restarted\n");
1517 TRACE(
"timer 1 started\n");
1557 WARN(
"Invalid duration flag %x\n", duration);
1589 infoPtr->
clrBk = clrBk;
1659 if (nTool == -1)
return 0;
1661 TRACE(
"tool %d\n", nTool);
1663 toolPtr = &infoPtr->
tools[nTool];
1723 if (track_activate) {
1732 TRACE(
"activated\n");
1744 TRACE(
"deactivated\n");
1792 TRACE(
"tool %d\n", nTool);
1794 toolPtr = &infoPtr->
tools[nTool];
1850 infoPtr->bActive =
TRUE;
1851 infoPtr->bTrackActive =
FALSE;
1853 infoPtr->nMaxTipWidth = -1;
1854 infoPtr->nTool = -1;
1855 infoPtr->nCurrentTool = -1;
1856 infoPtr->nTrackTool = -1;
1857 infoPtr->hwndSelf =
hwnd;
1877 if (infoPtr->
tools) {
1879 toolPtr = &infoPtr->
tools[
i];
1956 TRACE(
" nTool=%d\n", nTool);
1958 if ((nTool > -1) && (nTool < infoPtr->
uNumTools)) {
1960 TRACE(
"-- in transparent mode\n");
1990 TRACE(
" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
1993 TRACE(
" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
1995 TRACE (
" -- WM_NOTIFYFORMAT returns: error!\n");
2037 FIXME(
"full redraw needed\n");
2077 pszText[
res-1] =
'\0';
2086 TRACE(
"timer %d (%p) expired\n", iTimer, infoPtr->
hwndSelf);
2091 nOldTool = infoPtr->
nTool;
2101 nOldTool = infoPtr->
nTool;
2105 if (infoPtr->
nTool != nOldTool) {
2106 if(infoPtr->
nTool == -1) {
2109 }
else if (nOldTool == -1) {
2110 ERR(
"How did this happen?\n");
2116 TRACE(
"timer 1 started!\n");
2123 ERR(
"Unknown timer id %d\n", iTimer);
2325 case WM_NOTIFYFORMAT:
2347 ERR(
"unknown msg %04x wp=%08lx lp=%08lx\n",
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
INT Str_GetPtrAtoW(LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN
GLint GLint GLsizei width
#define WM_SYSCOLORCHANGE
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
#define COLOR_WINDOWFRAME
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WideCharToMultiByte
#define TTM_UPDATETIPTEXTA
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define TTM_GETCURRENTTOOLW
#define CDRF_NOTIFYPOSTPAINT
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)
#define MAKELRESULT(l, h)
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define TTM_TRACKPOSITION
GLenum GLuint GLenum GLsizei const GLchar * message
BOOL WINAPI UpdateWindow(_In_ HWND)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
GLint GLint GLint GLint GLint x
#define TTM_GETMAXTIPWIDTH
BOOL WINAPI Str_SetPtrW(LPWSTR *lppDest, LPCWSTR lpSrc)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
#define TTM_GETTIPTEXTCOLOR
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
#define TTTOOLINFOW_V1_SIZE
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
#define TTM_WINDOWFROMPOINT
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HRGN WINAPI CreateRoundRectRgn(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
#define TTM_GETTIPBKCOLOR
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HRGN WINAPI CreatePolygonRgn(_In_reads_(cPoint) const POINT *pptl, _In_ int cPoint, _In_ int iMode)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
const char * wine_dbgstr_point(const POINT *guid)
#define IS_INTRESOURCE(i)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
#define TTM_UPDATETIPTEXTW
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define LPSTR_TEXTCALLBACKW
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
int WINAPI GetSystemMetrics(_In_ int)
#define TTM_SETMAXTIPWIDTH
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
unsigned __int3264 UINT_PTR
struct task_struct * current
COMCTL32_SysColor comctl32_color
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define TTM_GETBUBBLESIZE
#define TTM_SETTIPTEXTCOLOR
#define memcpy(s1, s2, n)
GLint GLint GLsizei GLsizei height
#define TTTOOLINFOA_V1_SIZE
INT WINAPI Str_GetPtrW(LPCWSTR, LPWSTR, INT)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
void redraw(int x, int y, int cx, int cy)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetParent(_In_ HWND)
HICON WINAPI CopyIcon(_In_ HICON)
#define TTM_TRACKACTIVATE
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
#define TTM_GETCURRENTTOOLA
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define DT_EXTERNALLEADING
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
HWND WINAPI WindowFromPoint(_In_ POINT)
#define MultiByteToWideChar
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
UINT WINAPI GetDoubleClickTime(void)
#define TTM_SETTIPBKCOLOR
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
int WINAPI GetWindowRgn(_In_ HWND, _In_ HRGN)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define TTTOOLINFOW_V3_SIZE
BOOL WINAPI FrameRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH, _In_ int, _In_ int)
HWND WINAPI GetActiveWindow(void)
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
#define TTTOOLINFOW_V2_SIZE
#define LPSTR_TEXTCALLBACKA
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)