42#define LIF_FLAGSMASK (LIF_STATE | LIF_ITEMID | LIF_URL)
43#define LIS_MASK (LIS_FOCUSED | LIS_ENABLED | LIS_VISITED)
92#define SL_LEFTMARGIN (0)
93#define SL_TOPMARGIN (0)
94#define SL_RIGHTMARGIN (0)
95#define SL_BOTTOMMARGIN (0)
130 ERR(
"Failed to alloc DOC_ITEM structure!\n");
134 Item->nText = textlen;
168 static const WCHAR SL_LINKOPEN[] = {
'<',
'a' };
169 static const WCHAR SL_HREF[] = {
'h',
'r',
'e',
'f',
'=',
'\"' };
170 static const WCHAR SL_ID[] = {
'i',
'd',
'=',
'\"' };
171 static const WCHAR SL_LINKCLOSE[] = {
'<',
'/',
'a',
'>' };
173 int taglen = 0, textlen = 0, linklen = 0, docitems = 0;
217 CurrentParameter = &lpUrl;
218 CurrentParameterLen = &lenUrl;
224 CurrentParameter = &lpID;
225 CurrentParameterLen = &lenId;
237 *CurrentParameter =
current + taglen;
238 *CurrentParameterLen = 0;
240 for(tmp = *CurrentParameter; *tmp != 0; tmp++)
249 (*CurrentParameterLen)++;
274 if(ValidLink && ValidParam)
288 if(textstart ==
NULL)
297 if(textstart !=
NULL && textlen > 0 && firsttag > textstart)
302 ERR(
"Unable to create new document item!\n");
312 if(linktext !=
NULL && linklen > 0)
317 ERR(
"Unable to create new document item!\n");
367 if(CurrentType ==
slText && textstart ==
NULL)
382 if(textstart ==
NULL && CurrentType ==
slText)
391 if(textstart !=
NULL && textlen > 0)
396 ERR(
"Unable to create new document item!\n");
436 if(linktext !=
NULL && linklen > 0)
442 ERR(
"Unable to create new document item!\n");
462 ERR(
"DocItem not a link!\n");
490 if ((Current->
Type ==
slLink) && (iLink-- <= 0))
568 for (
i = 0;
i < nFit;
i++)
if (
Text[
i] ==
'\r' ||
Text[
i] ==
'\n')
break;
570 if (
i == *LineLen)
return FALSE;
576 while (
i &&
Text[
i - 1] != BreakChar)
i--;
598 int x,
y, LineHeight;
602 szDoc.
cx = szDoc.
cy = 0;
618 LineHeight =
tm.tmHeight +
tm.tmExternalLeading;
629 if(Current->
nText == 0)
656 if (
n && *tx ==
'\r')
662 if (
n && *tx ==
'\n')
676 if((
n == 0 && SkipChars != 0) ||
716 cbl = bl + nBlocks - 1;
719 cbl->
nSkip = SkipChars;
743 ERR(
"Failed to alloc DOC_TEXTBLOCK structure!\n");
908 ERR(
"Failed to create link font!\n");
979 if(Current == DocItem)
985 Current->
u.
Link.state &= ~LIS_FOCUSED;
1007 ERR(
"Invalid Flags!\n");
1014 ERR(
"Link %d couldn't be found\n",
Item->iLink);
1028 ERR(
"Unable to allocate memory for link id\n");
1045 ERR(
"Unable to allocate memory for link url\n");
1053 di->
u.
Link.szID = szId;
1059 di->
u.
Link.szUrl = szUrl;
1069 Repaint = (oldstate != di->
u.
Link.state);
1093 ERR(
"Invalid Flags!\n");
1100 ERR(
"Link %d couldn't be found\n",
Item->iLink);
1110 Item->state &= ~LIS_FOCUSED;
1128 if(di->
u.
Link.szUrl)
1188 if(Current->
u.
Link.szID)
1196 if(Current->
u.
Link.szUrl)
1258 if(
Link->u.Link.szID)
1266 if(
Link->u.Link.szUrl)
1359 if(Old !=
NULL && Old != Current)
1435 if(NewFocus !=
NULL)
1439 if(OldFocus && OldFocus != NewFocus)
1466 return NewFocus ==
NULL;
1479 rc.
right = cxMaxWidth;
1678 infoPtr->
Style &= ~WS_DISABLED;
1683 case WM_STYLECHANGED:
1698 if (!infoPtr)
return -1;
1702 infoPtr->Self =
hwnd;
1703 infoPtr->Notify =
cs->hwndParent;
1704 infoPtr->Style =
cs->style;
1706 infoPtr->LinkFont = 0;
1708 infoPtr->HasFocus =
FALSE;
1709 infoPtr->MouseDownID = -1;
1713 infoPtr->BreakChar =
' ';
1715 TRACE(
"SysLink Ctrl creation, hwnd=%p\n",
hwnd);
1720 TRACE(
"SysLink Ctrl destruction, hwnd=%p\n",
hwnd);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
PVOID ReAlloc(IN DWORD dwFlags, IN PVOID lpMem, IN SIZE_T dwBytes)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
COMCTL32_SysColor comctl32_color
static LRESULT SYSLINK_Draw(const SYSLINK_INFO *infoPtr, HDC hdc)
static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
static VOID SYSLINK_Render(const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect)
static BOOL SYSLINK_PtInDocItem(const DOC_ITEM *DocItem, POINT pt)
struct _DOC_ITEM DOC_ITEM
static PDOC_ITEM SYSLINK_GetNextLink(const SYSLINK_INFO *infoPtr, PDOC_ITEM Current)
VOID SYSLINK_Unregister(void)
static LRESULT SYSLINK_LButtonDown(SYSLINK_INFO *infoPtr, const POINT *pt)
static BOOL SYSLINK_WrapLine(LPWSTR Text, WCHAR BreakChar, int x, int *LineLen, int nFit, LPSIZE Extent)
static PDOC_ITEM SYSLINK_AppendDocItem(SYSLINK_INFO *infoPtr, LPCWSTR Text, UINT textlen, SL_ITEM_TYPE type, PDOC_ITEM LastItem)
static LONG SYSLINK_GetIdealSize(const SYSLINK_INFO *infoPtr, int cxMaxWidth, SIZE *lpSize)
VOID SYSLINK_Register(void)
static LRESULT SYSLINK_SetFocus(SYSLINK_INFO *infoPtr)
static PDOC_ITEM SYSLINK_LinkAtPt(const SYSLINK_INFO *infoPtr, const POINT *pt, int *LinkId, BOOL MustBeEnabled)
static LRESULT SYSLINK_Paint(const SYSLINK_INFO *infoPtr, HDC hdcParam)
static PDOC_ITEM SYSLINK_GetLinkItemByIndex(const SYSLINK_INFO *infoPtr, int iLink)
static LRESULT SYSLINK_KillFocus(SYSLINK_INFO *infoPtr)
static UINT SYSLINK_ParseText(SYSLINK_INFO *infoPtr, LPCWSTR Text)
static LRESULT SYSLINK_SetText(SYSLINK_INFO *infoPtr, LPCWSTR Text)
static VOID SYSLINK_RepaintLink(const SYSLINK_INFO *infoPtr, const DOC_ITEM *DocItem)
static HFONT SYSLINK_SetFont(SYSLINK_INFO *infoPtr, HFONT hFont, BOOL bRedraw)
static LRESULT SYSLINK_GetItem(const SYSLINK_INFO *infoPtr, PLITEM Item)
static PDOC_ITEM SYSLINK_GetPrevLink(const SYSLINK_INFO *infoPtr, PDOC_ITEM Current)
static LRESULT SYSLINK_SetItem(const SYSLINK_INFO *infoPtr, const LITEM *Item)
static PDOC_ITEM SYSLINK_GetFocusLink(const SYSLINK_INFO *infoPtr, int *LinkId)
static LRESULT SYSLINK_LButtonUp(SYSLINK_INFO *infoPtr, const POINT *pt)
static PDOC_ITEM SYSLINK_SetFocusLink(const SYSLINK_INFO *infoPtr, const DOC_ITEM *DocItem)
static BOOL SYSLINK_OnEnter(const SYSLINK_INFO *infoPtr)
static BOOL SYSLINK_NoNextLink(const SYSLINK_INFO *infoPtr, BOOL Prev)
struct DOC_TEXTBLOCK * PDOC_TEXTBLOCK
static VOID SYSLINK_FreeDocItem(PDOC_ITEM DocItem)
static BOOL SYSKEY_SelectNextPrevLink(const SYSLINK_INFO *infoPtr, BOOL Prev)
static VOID SYSLINK_ClearDoc(SYSLINK_INFO *infoPtr)
static LRESULT SYSLINK_SendParentNotify(const SYSLINK_INFO *infoPtr, UINT code, const DOC_ITEM *Link, int iLink)
struct _DOC_ITEM * PDOC_ITEM
static LRESULT SYSLINK_GetIdealHeight(const SYSLINK_INFO *infoPtr)
static LRESULT SYSLINK_HitTest(const SYSLINK_INFO *infoPtr, PLHITTESTINFO HitTest)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
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
static const struct newhuff ht[]
struct task_struct * current
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define LM_GETIDEALHEIGHT
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field)
__WINE_SERVER_LIST_INLINE void list_add_after(struct list *elem, struct list *to_add)
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
struct _DOC_ITEM::@337::@338 Link
struct _DOC_ITEM::@337::@339 Text
WCHAR szUrl[L_MAX_URL_LENGTH]
WCHAR szID[MAX_LINKID_TEXT]
#define FIELD_OFFSET(t, f)
static int Link(const char **args)
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
int WINAPI GetBkMode(_In_ HDC)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI GetTextExtentExPointW(_In_ HDC hdc, _In_reads_(cchString) LPCWSTR lpszString, _In_ int cchString, _In_ int nMaxExtent, _Out_opt_ LPINT lpnFit, _Out_writes_to_opt_(cchString, *lpnFit) LPINT lpnDx, _Out_ LPSIZE lpSize)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define WM_CTLCOLORSTATIC
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define GetWindowLongPtrW
DWORD WINAPI GetMessagePos(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_SYSCOLORCHANGE
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
struct tagSTYLESTRUCT * LPSTYLESTRUCT
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI DrawFocusRect(_In_ HDC, _In_ LPCRECT)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free