87 t->cbSize =
sizeof(*t);
96 t->cbSize =
sizeof(*t);
110 t->cbSize =
sizeof(*t);
128 s->font_cache =
NULL;
131 s->script_cache =
NULL;
134 TRACE_(richedit_style)(
"ME_MakeStyle %p, total refs=%d\n",
s,
all_refs);
138#define COPY_STYLE_ITEM(mask, member) \
139 if (mod->dwMask & mask) { \
141 fmt.member = mod->member;\
144#define COPY_STYLE_ITEM_MEMCPY(mask, member) \
145 if (mod->dwMask & mask) { \
147 CopyMemory(fmt.member, mod->member, sizeof(mod->member));\
181 fmt.dwEffects &= ~(
mod->dwMask);
182 fmt.dwEffects |=
mod->dwEffects &
mod->dwMask;
183 fmt.dwMask |=
mod->dwMask;
189 fmt.dwEffects &= ~CFE_AUTOCOLOR;
198 fmt.dwEffects &= ~CFE_UNDERLINE;
210 fmt.dwEffects &= ~CFE_BOLD;
217 TRACE_(richedit_style)(
"found existing style %p\n",
s);
226 TRACE_(richedit_style)(
"created new style %p\n",
s);
260 *
p++ = (*
q > 255) ?
'?' : *
q;
310 if (
s->fmt.dwEffects &
s->fmt.dwMask &
CFM_BOLD)
373 int i,
empty, age = 0x7FFFFFFF;
376 if (
c->current_style ==
s)
return;
383 c->editor->pFontCache[
i].nAge++;
386 item = &
c->editor->pFontCache[
i];
389 if (
item->nAge > age)
402 item = &
c->editor->pFontCache[
i];
403 TRACE_(richedit_style)(
"font reused %d\n",
i );
412 TRACE_(richedit_style)(
"font deleted %d\n",
empty );
417 TRACE_(richedit_style)(
"font created %d\n",
empty );
421 s->font_cache =
item;
424 if (!
c->orig_font)
c->orig_font = old_font;
432 if (
c->current_style &&
c->current_style->font_cache)
435 c->current_style->font_cache =
NULL;
437 c->current_style =
s;
448 s->font_cache =
NULL;
459 TRACE_(richedit_style)(
"ME_AddRefStyle %p, new refs=%d, total refs=%d\n",
s,
s->nRefs,
all_refs);
467 TRACE_(richedit_style)(
"destroy style %p, total refs=%d\n",
s,
all_refs);
469 TRACE_(richedit_style)(
"release style %p, new refs=%d, total refs=%d\n",
s,
s->nRefs,
all_refs);
470 if (!
all_refs)
TRACE(
"all style references freed (good!)\n");
484 return from->pRun->member.run.style;
std::map< E_MODULE, HMODULE > mod
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static const WCHAR empty[]
#define WINE_DECLARE_DEBUG_CHANNEL(x)
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL ME_IsSelection(ME_TextEditor *editor)
int ME_GetSelection(ME_TextEditor *editor, ME_Cursor **from, ME_Cursor **to)
#define COPY_STYLE_ITEM(mask, member)
static void ME_LogFontFromStyle(ME_Context *c, LOGFONTW *lf, const ME_Style *s)
static void ME_DumpStyleEffect(char **p, const char *name, const CHARFORMAT2W *fmt, int mask)
BOOL cfany_to_cf2w(CHARFORMAT2W *to, const CHARFORMAT2W *from)
void ME_DumpStyle(ME_Style *s)
void ME_SaveTempStyle(ME_TextEditor *editor, ME_Style *style)
void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc)
void ME_ReleaseStyle(ME_Style *s)
void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048])
ME_Style * ME_MakeStyle(CHARFORMAT2W *style)
void ME_InitCharFormat2W(CHARFORMAT2W *pFmt)
void ME_AddRefStyle(ME_Style *s)
ME_Style * ME_ApplyStyle(ME_TextEditor *editor, ME_Style *sSrc, CHARFORMAT2W *mod)
#define COPY_STYLE_ITEM_MEMCPY(mask, member)
void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt)
BOOL cf2w_to_cfany(CHARFORMAT2W *to, const CHARFORMAT2W *from)
void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod)
ME_Style * ME_GetInsertStyle(ME_TextEditor *editor, int nCursor)
void select_style(ME_Context *c, ME_Style *s)
void ME_ClearTempStyle(ME_TextEditor *editor)
static BOOL ME_IsFontEqual(const LOGFONTW *p1, const LOGFONTW *p2)
static void release_font_cache(ME_FontCacheItem *item)
void ME_DestroyStyle(ME_Style *s)
HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
int ME_twips2pointsY(const ME_Context *c, int y) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemBack(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLenum GLsizei const GLchar * buf
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 sprintf(buf, format,...)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define yHeightCharPtsMost
struct _charformat2w CHARFORMAT2W
#define CFM_UNDERLINETYPE
#define CFU_UNDERLINENONE
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
WCHAR lfFaceName[LF_FACESIZE]
union tagME_DisplayItem::@535 member
SCRIPT_CACHE script_cache
ME_FontCacheItem * font_cache
#define FIELD_OFFSET(t, f)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)