summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_fontservice.inc18
-rw-r--r--include/m_fontservice.h66
2 files changed, 24 insertions, 60 deletions
diff --git a/include/delphi/m_fontservice.inc b/include/delphi/m_fontservice.inc
index 4c6f5c09f4..1a906e596e 100644
--- a/include/delphi/m_fontservice.inc
+++ b/include/delphi/m_fontservice.inc
@@ -67,20 +67,12 @@ type
// and getting one out again
PFontID_tag = ^TFontID_tag;
TFontID_tag = record
- cbSize : int;
- // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
group : array[0..63] of AnsiChar;
- // [TRANSLATED-BY-CORE] the name of the font setting e.g. 'contacts' in the 'contact list' group
name : array[0..63] of AnsiChar;
- // the 'module' in the database where the font data is stored
dbSettingsGroup: array[0..31] of AnsiChar;
- // prepended to the settings used to store this font's data in the db
prefix : array[0..31] of AnsiChar;
- // bitwise OR of the FIDF_* flags above
flags : dword;
deffontsettings: TFontSettings; // defaults, if flags & FIDF_DEFAULTVALID
- // controls the order in the font group in which the fonts are listed in the
- // UI (if order fields are equal, they will be ordered alphabetically by name)
order : int;
backgroundGroup:array [0..63] of AnsiChar;
backgroundName: array [0..63] of AnsiChar;
@@ -90,20 +82,12 @@ type
PFontIDW_tag = ^TFontIDW_tag;
TFontIDW_tag = record
- cbSize : int;
- // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
group : array[0..63] of WideChar;
- // [TRANSLATED-BY-CORE] the name of the font setting e.g. 'contacts' in the 'contact list' group
name : array[0..63] of WideChar;
- // the 'module' in the database where the font data is stored
dbSettingsGroup: array[0..31] of AnsiChar;
- // prepended to the settings used to store this font's data in the db
prefix : array[0..31] of AnsiChar;
- // bitwise OR of the FIDF_* flags above
flags : dword;
deffontsettings: TFontSettingsW; // defaults, if flags & FIDF_DEFAULTVALID
- // controls the order in the font group in which the fonts are listed in the
- // UI (if order fields are equal, they will be ordered alphabetically by name)
order : int;
backgroundGroup:array [0..63] of WideChar;
backgroundName: array [0..63] of WideChar;
@@ -121,7 +105,6 @@ function Font_Get(pGroup,pName:pAnsiChar; pFont:pLogFontA) : longint; stdcall; e
type
PColourID_tag = ^TColourID_tag;
TColourID_tag = record
- cbSize : int;
group : array[0..63] of AnsiChar;
name : array[0..63] of AnsiChar;
dbSettingsGroup : array[0..31] of AnsiChar;
@@ -135,7 +118,6 @@ type
PColourIDW_tag = ^TColourIDW_tag;
TColourIDW_tag = record
- cbSize : int;
group : array[0..63] of WideChar;
name : array[0..63] of WideChar;
dbSettingsGroup : array[0..31] of AnsiChar;
diff --git a/include/m_fontservice.h b/include/m_fontservice.h
index ffb8cbfea2..3bda3038f1 100644
--- a/include/m_fontservice.h
+++ b/include/m_fontservice.h
@@ -9,6 +9,24 @@
#include <m_core.h>
#endif
+struct MBaseFontObject
+{
+ char group[64]; // [TRANSLATED-BY-CORE]
+ char name[64]; // [TRANSLATED-BY-CORE]
+ char dbSettingsGroup[32];
+ char setting[32];
+ DWORD flags;
+};
+
+struct MBaseFontObjectW
+{
+ wchar_t group[64];
+ wchar_t name[64];
+ char dbSettingsGroup[32];
+ char setting[32];
+ DWORD flags;
+};
+
//////////////////////////////////////////////////////////////////////////
//
// FONTS
@@ -66,14 +84,8 @@ struct FontSettingsW
// are translated by the core, which may lead to double translation.
// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
-struct FontID
+struct FontID : public MBaseFontObject
{
- int cbSize;
- char group[64]; // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
- char name[64]; // [TRANSLATED-BY-CORE] this is the name of the font setting - e.g. 'contacts' in the 'contact list' group
- char dbSettingsGroup[32]; // the 'module' in the database where the font data is stored
- char prefix[32]; // this is prepended to the settings used to store this font's data in the db
- DWORD flags; // bitwise OR of the FIDF_* flags above
FontSettings deffontsettings; // defaults, valid if flags & FIDF_DEFAULTVALID
int order; // controls the order in the font group in which the fonts are listed in the UI (if order fields are equal,
// they will be ordered alphabetically by name)
@@ -81,14 +93,8 @@ struct FontID
char backgroundName[64];
};
-struct FontIDW
+struct FontIDW : public MBaseFontObjectW
{
- int cbSize;
- wchar_t group[64]; // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
- wchar_t name[64]; // [TRANSLATED-BY-CORE] this is the name of the font setting - e.g. 'contacts' in the 'contact list' group
- char dbSettingsGroup[32]; // the 'module' in the database where the font data is stored
- char prefix[32]; // this is prepended to the settings used to store this font's data in the db
- DWORD flags; // bitwise OR of the FIDF_* flags above
FontSettingsW deffontsettings; // defaults, valid if flags & FIDF_DEFAULTVALID
int order; // controls the order in the font group in which the fonts are listed in the UI (if order fields are equal,
// they will be ordered alphabetically by name)
@@ -132,27 +138,15 @@ __forceinline COLORREF Font_GetW(FontIDW &p, LOGFONTW *pFont)
// are translated by the core, which may lead to double translation.
// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
-struct ColourID
+struct ColourID : public MBaseFontObject
{
- int cbSize;
- char group[64]; // [TRANSLATED-BY-CORE]
- char name[64]; // [TRANSLATED-BY-CORE]
- char dbSettingsGroup[32];
- char setting[32];
- DWORD flags; // not used
COLORREF defcolour; // default value
int order;
};
// a font identifier structure - used for registering a font, and getting one out again
-struct ColourIDW
+struct ColourIDW : public MBaseFontObjectW
{
- int cbSize;
- wchar_t group[64]; // [TRANSLATED-BY-CORE]
- wchar_t name[64]; // [TRANSLATED-BY-CORE]
- char dbSettingsGroup[32];
- char setting[32];
- DWORD flags; // not used
COLORREF defcolour; // default value
int order;
};
@@ -191,27 +185,15 @@ struct FONTEFFECT
DWORD secondaryColour; // ARGB
};
-struct EffectID
+struct EffectID : public MBaseFontObject
{
- int cbSize;
- char group[64];
- char name[64];
- char dbSettingsGroup[32];
- char setting[32];
- DWORD flags;
FONTEFFECT defeffect;
int order;
FONTEFFECT value;
};
-struct EffectIDW
+struct EffectIDW : public MBaseFontObjectW
{
- int cbSize;
- wchar_t group[64];
- wchar_t name[64];
- char dbSettingsGroup[32];
- char setting[32];
- DWORD flags;
FONTEFFECT defeffect;
int order;
FONTEFFECT value;