1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 04:44:16 +01:00

- added WMCopyFontWithChanges() a more generic and powerful function, meant

to replace WMNormalizeFont(), WMEmphasizeFont(), WMStrenghtenFont(),
  WMUnemphasizeFont() and WMUnstrenghtenFont() which are now obsolete and
  were removed.
This commit is contained in:
dan
2002-11-22 04:49:05 +00:00
parent 0bfa12a1fc
commit 18b3753227
4 changed files with 346 additions and 143 deletions

View File

@@ -117,15 +117,6 @@ typedef enum {
} WMFontFlags;
/* Font copy masks */
typedef enum {
WFMUnchanged = 0,
WFMMediumWeight = 1,
WFMNormalWeight = 2,
WFMRegularWeight = 3
} WMCopyFontMask;
/* Use default system font size in system font name */
enum {
WFDefaultSize = -1
@@ -441,8 +432,6 @@ typedef struct WMGenericPanel {
} WMGenericPanel;
typedef struct WMInputPanel {
WMWindow *win; /* window */
WMButton *defBtn; /* default button */
@@ -454,6 +443,34 @@ typedef struct WMInputPanel {
} WMInputPanel;
#define WFAUnchanged (NULL)
/* Struct for font change operations */
typedef struct WMFontAttributes {
char *foundry;
char *family;
char *weight;
char *slant;
char *setWidth;
char *addStyle;
char *pixelSize;
char *pointSize;
char *resolutionX;
char *resolutionY;
char *spacing;
char *averageWidth;
char *registry;
char *encoding;
} WMFontAttributes;
extern const WMFontAttributes *WFANormal;
extern const WMFontAttributes *WFABold;
extern const WMFontAttributes *WFANonBold;
extern const WMFontAttributes *WFAEmphasized;
extern const WMFontAttributes *WFANonEmphasized;
extern const WMFontAttributes *WFABoldEmphasized;
/* WMRuler: */
typedef struct {
WMArray *tabs; /* a growable array of tabstops */
@@ -736,7 +753,11 @@ WMFont* WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName, WMFontFlags flags);
WMFont* WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName,
WMFontFlags flags);
WMFont* WMCopyFontWithChanges(WMScreen *scrPtr, WMFont *font,
const WMFontAttributes *changes);
WMFont* WMRetainFont(WMFont *font);
@@ -767,16 +788,6 @@ WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
XFontSet WMGetFontFontSet(WMFont *font);
WMFont* WMNormalizeFont(WMScreen *scr, WMFont *font);
WMFont* WMStrengthenFont(WMScreen *scr, WMFont *font);
WMFont* WMUnstrengthenFont(WMScreen *scr, WMFont *font);
WMFont* WMEmphasizeFont(WMScreen *scr, WMFont *font);
WMFont* WMUnemphasizeFont(WMScreen *scr, WMFont *font);
/* ....................................................................... */
WMPixmap* WMRetainPixmap(WMPixmap *pixmap);