1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-28 09:22:27 +01:00

Started to move towards using xft2 only, for a unified font/locale handling

in WINGs
This commit is contained in:
dan
2003-08-07 00:26:21 +00:00
parent 0852957ea1
commit 74ba4f8eef
11 changed files with 48 additions and 387 deletions

View File

@@ -107,22 +107,6 @@ enum {
};
/* Font flags */
typedef enum {
WFDefaultFont = 0,
WFNormalFont = (1<<0),
WFFontSet = (1<<1),
WFAntialiased = (1<<2),
WFNotAntialiased = (1<<3)
} WMFontFlags;
/* Use default system font size in system font name */
enum {
WFDefaultSize = -1
};
/* frame title positions */
typedef enum {
WTPNoTitle,
@@ -746,18 +730,11 @@ Bool WMIsAntialiasingEnabled(WMScreen *scrPtr);
/* ....................................................................... */
WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFontSet(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
WMFont* WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName,
WMFontFlags flags);
//??
WMFont* WMCreateFontWithAttributes(WMScreen *scrPtr, char *fontName,
WMFontAttributes *attribs);
WMFont* WMCopyFontWithChanges(WMScreen *scrPtr, WMFont *font,
const WMFontAttributes *changes);
@@ -770,15 +747,6 @@ char* WMGetFontName(WMFont *font);
unsigned int WMFontHeight(WMFont *font);
Bool WMIsAntialiasedFont(WMFont *font);
/*
WMFont* WMUserFontOfSize(WMScreen *scrPtr, int size);
WMFont* WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
*/
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
@@ -791,8 +759,6 @@ WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size);
WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
XFontSet WMGetFontFontSet(WMFont *font);
/* ....................................................................... */
WMPixmap* WMRetainPixmap(WMPixmap *pixmap);

View File

@@ -24,7 +24,7 @@ extern "C" {
#define DOUBLE_BUFFER
#define WC_UserWidget 128
@@ -48,17 +48,20 @@ typedef struct W_Application {
typedef struct W_Font {
struct W_Screen *screen;
union {
XFontSet set;
XFontStruct *normal;
struct _XftFont *xft;
} font;
#ifdef XFT
struct _XftFont *font;
#else
// pick one
//XFontSet font;
XFontStruct *font;
#endif
short height;
short y;
short refCount;
char *name;
unsigned int notFontSet:1;
unsigned int antialiased:1;
//unsigned int notFontSet:1;
//unsigned int antialiased:1;
} W_Font;
@@ -97,7 +100,7 @@ typedef struct W_FocusInfo {
struct W_DraggingInfo {
Window destinationWindow;
Window sourceWindow;
WMPoint location;
unsigned sourceOperation;
@@ -116,7 +119,7 @@ struct W_DraggingInfo {
WMSize mouseOffset;
unsigned finished:1;
};
typedef struct W_Screen {
Display *display;
@@ -139,8 +142,6 @@ typedef struct W_Screen {
struct _XftDraw *xftdraw; /* shared XftDraw */
Bool hasXftSupport; /* if it can antialias text */
/* application related */
W_FocusInfo *focusInfo;
@@ -416,8 +417,6 @@ typedef struct W_EventHandler {
typedef struct _WINGsConfiguration {
char *systemFont;
char *boldSystemFont;
char *antialiasedSystemFont;
char *antialiasedBoldSystemFont;
int defaultFontSize;
Bool antialiasedText;
Bool useMultiByte;