From: <kr_...@us...> - 2003-08-25 20:41:13
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv29626/src/cbits/Win32 Modified Files: Font.c Log Message: In this commit are implemented functions osGetTextColor, osGetWindowColor, osGetDialogColor. The osDefaultFontDef function now returns the default font for gnome application. The osDefaultFontDef and similar functions now returns new allocated string which is deallocated from Haskell world. Index: Font.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Font.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Font.c 25 Aug 2003 20:07:53 -0000 1.3 --- Font.c 25 Aug 2003 20:41:08 -0000 1.4 *************** *** 286,296 **** void osDefaultFontDef(char **face, int *size, int *weight, int *style) { ! static LOGFONT lf; GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf); ! *face = lf.lfFaceName; *size = -lf.lfHeight; *weight = lf.lfWeight; ! *style = 0; if (lf.lfItalic) *style |= FONT_ITALIC; --- 286,296 ---- void osDefaultFontDef(char **face, int *size, int *weight, int *style) { ! LOGFONT lf; GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf); ! *face = strdup(lf.lfFaceName); *size = -lf.lfHeight; *weight = lf.lfWeight; ! *style = 0; if (lf.lfItalic) *style |= FONT_ITALIC; *************** *** 301,305 **** void osSerifFontDef(char **face, int *size, int *weight, int *style) { ! *face = "Times New Roman"; *size = 10; *weight = 400; --- 301,305 ---- void osSerifFontDef(char **face, int *size, int *weight, int *style) { ! *face = strdup("Times New Roman"); *size = 10; *weight = 400; *************** *** 309,313 **** void osSansSerifFontDef(char **face, int *size, int *weight, int *style) { ! *face = "Arial"; *size = 10; *weight = 400; --- 309,313 ---- void osSansSerifFontDef(char **face, int *size, int *weight, int *style) { ! *face = strdup("Arial"); *size = 10; *weight = 400; *************** *** 317,321 **** void osSmallFontDef(char **face, int *size, int *weight, int *style) { ! *face = "Small Fonts"; *size = 7; *weight = 400; --- 317,321 ---- void osSmallFontDef(char **face, int *size, int *weight, int *style) { ! *face = strdup("Small Fonts"); *size = 7; *weight = 400; *************** *** 325,329 **** void osNonProportionalFontDef(char **face, int *size, int *weight, int *style) { ! *face = "Courier New"; *size = 10; *weight = 400; --- 325,329 ---- void osNonProportionalFontDef(char **face, int *size, int *weight, int *style) { ! *face = strdup("Courier New"); *size = 10; *weight = 400; *************** *** 333,337 **** void osSymbolFontDef(char **face, int *size, int *weight, int *style) { ! *face = "Symbol"; *size = 10; *weight = 400; --- 333,337 ---- void osSymbolFontDef(char **face, int *size, int *weight, int *style) { ! *face = strdup("Symbol"); *size = 10; *weight = 400; |