comparison os2/dw.c @ 1075:3d117071a50b

Renamed Mac _dw_default_font() to dw_font_set_default() and added it on OS/2 and Windows. Function added to the public export list... GTK2/3 support will be added shortly.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 26 Jun 2011 02:07:49 +0000
parents 240bd5fb8453
children 34f1d6f5f1c3
comparison
equal deleted inserted replaced
1074:53fc692279fc 1075:3d117071a50b
3667 DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_MS_COUNT,(void *)aulBuffer, 4*sizeof(ULONG)); 3667 DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_MS_COUNT,(void *)aulBuffer, 4*sizeof(ULONG));
3668 3668
3669 desktop = WinQueryDesktopWindow(dwhab, NULLHANDLE); 3669 desktop = WinQueryDesktopWindow(dwhab, NULLHANDLE);
3670 3670
3671 if(!IS_WARP4()) 3671 if(!IS_WARP4())
3672 DefaultFont = "8.Helv"; 3672 DefaultFont = strdup("8.Helv");
3673 else
3674 DefaultFont = strdup(DefaultFont);
3673 3675
3674 /* This is a window that hangs around as long as the 3676 /* This is a window that hangs around as long as the
3675 * application does and handles menu messages. 3677 * application does and handles menu messages.
3676 */ 3678 */
3677 hwndApp = dw_window_new(HWND_OBJECT, "", 0); 3679 hwndApp = dw_window_new(HWND_OBJECT, "", 0);
4126 WinReleasePS(fd.hpsScreen); 4128 WinReleasePS(fd.hpsScreen);
4127 /* Figure out what the user selected and return that */ 4129 /* Figure out what the user selected and return that */
4128 size = FIXEDINT(fd.fxPointSize); 4130 size = FIXEDINT(fd.fxPointSize);
4129 sprintf(buf, "%d.%s", size, fd.fAttrs.szFacename); 4131 sprintf(buf, "%d.%s", size, fd.fAttrs.szFacename);
4130 return buf; 4132 return buf;
4133 }
4134
4135 /*
4136 * Sets the default font used on text based widgets.
4137 * Parameters:
4138 * fontname: Font name in Dynamic Windows format.
4139 */
4140 void API dw_font_set_default(char *fontname)
4141 {
4142 char *oldfont = DefaultFont;
4143
4144 DefaultFont = strdup(fontname);
4145 free(oldfont);
4131 } 4146 }
4132 4147
4133 /* 4148 /*
4134 * Sets the font used by a specified window (widget) handle. 4149 * Sets the font used by a specified window (widget) handle.
4135 * Parameters: 4150 * Parameters: