Commit ddaacaa0 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

- links can now spread across several elements

- link information is now shared between file & presentation - first try at handling metafiles
parent d1ae0017
...@@ -257,7 +257,8 @@ int main(int argc, char **argv) ...@@ -257,7 +257,8 @@ int main(int argc, char **argv)
if (paragraph->u.text.wFont) if (paragraph->u.text.wFont)
printf(format.end_boldface); printf(format.end_boldface);
break; break;
case para_image: case para_bitmap:
case para_metafile:
break; break;
} }
} }
...@@ -332,11 +333,26 @@ HBITMAP WINAPI CreateDIBitmap(HDC hdc, CONST BITMAPINFOHEADER* bih, DWORD a, CON ...@@ -332,11 +333,26 @@ HBITMAP WINAPI CreateDIBitmap(HDC hdc, CONST BITMAPINFOHEADER* bih, DWORD a, CON
return 0; return 0;
} }
HMETAFILE WINAPI SetMetaFileBitsEx(UINT cbBuffer, CONST BYTE *lpbBuffer)
{
return 0;
}
BOOL WINAPI DeleteMetaFile(HMETAFILE h)
{
return 0;
}
HDC WINAPI GetDC(HWND h) HDC WINAPI GetDC(HWND h)
{ {
return 0; return 0;
} }
int WINAPI ReleaseDC(HWND h, HDC hdc)
{
return 0;
}
BOOL WINAPI DeleteObject(HGDIOBJ h) BOOL WINAPI DeleteObject(HGDIOBJ h)
{ {
return TRUE; return TRUE;
......
...@@ -30,20 +30,21 @@ typedef struct ...@@ -30,20 +30,21 @@ typedef struct
SIZE size; SIZE size;
int style; int style;
DWORD win_style; DWORD win_style;
COLORREF sr_color; /* color for scrollable region */ COLORREF sr_color; /* color for scrollable region */
COLORREF nsr_color; /* color for non scrollable region */ COLORREF nsr_color; /* color for non scrollable region */
} HLPFILE_WINDOWINFO; } HLPFILE_WINDOWINFO;
typedef struct typedef struct
{ {
enum {hlp_link_none, hlp_link_link, hlp_link_popup, hlp_link_macro} cookie; enum {hlp_link_link, hlp_link_popup, hlp_link_macro} cookie;
LPCSTR lpszString; LPCSTR lpszString; /* name of the file to for the link (NULL if same file) */
LONG lHash; LONG lHash; /* topic index */
BOOL bClrChange; unsigned bClrChange : 1, /* true if the link is green & underlined */
unsigned window; wRefCount; /* number of internal references to this object */
unsigned window; /* window number for displaying the link (-1 is current) */
} HLPFILE_LINK; } HLPFILE_LINK;
enum para_type {para_normal_text, para_debug_text, para_image}; enum para_type {para_normal_text, para_debug_text, para_bitmap, para_metafile};
typedef struct tagHlpFileParagraph typedef struct tagHlpFileParagraph
{ {
...@@ -61,9 +62,20 @@ typedef struct tagHlpFileParagraph ...@@ -61,9 +62,20 @@ typedef struct tagHlpFileParagraph
} text; } text;
struct struct
{ {
HBITMAP hBitmap;
unsigned pos; /* 0: center, 1: left, 2: right */ unsigned pos; /* 0: center, 1: left, 2: right */
} image; union
{
struct
{
HBITMAP hBitmap;
} bmp;
struct
{
HMETAFILE hMetaFile;
SIZE mfSize;
} mf;
} u;
} gfx; /* for bitmaps and metafiles */
} u; } u;
HLPFILE_LINK* link; HLPFILE_LINK* link;
...@@ -142,4 +154,5 @@ HLPFILE_PAGE* HLPFILE_Contents(HLPFILE* hlpfile); ...@@ -142,4 +154,5 @@ HLPFILE_PAGE* HLPFILE_Contents(HLPFILE* hlpfile);
HLPFILE_PAGE* HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash); HLPFILE_PAGE* HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash);
HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset); HLPFILE_PAGE* HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset);
LONG HLPFILE_Hash(LPCSTR lpszContext); LONG HLPFILE_Hash(LPCSTR lpszContext);
void HLPFILE_FreeLink(HLPFILE_LINK* link);
void HLPFILE_FreeHlpFile(HLPFILE*); void HLPFILE_FreeHlpFile(HLPFILE*);
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
typedef struct tagHelpLinePart typedef struct tagHelpLinePart
{ {
RECT rect; RECT rect;
enum {hlp_line_part_text, hlp_line_part_image} cookie; enum {hlp_line_part_text, hlp_line_part_bitmap, hlp_line_part_metafile} cookie;
union union
{ {
struct struct
...@@ -54,9 +54,13 @@ typedef struct tagHelpLinePart ...@@ -54,9 +54,13 @@ typedef struct tagHelpLinePart
struct struct
{ {
HBITMAP hBitmap; HBITMAP hBitmap;
} image; } bitmap;
struct
{
HMETAFILE hMetaFile;
} metafile;
} u; } u;
HLPFILE_LINK link; HLPFILE_LINK* link;
struct tagHelpLinePart *next; struct tagHelpLinePart *next;
} WINHELP_LINE_PART; } WINHELP_LINE_PART;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment