From 79ae37a35c594854f4fd9362c894ca65de32643e Mon Sep 17 00:00:00 2001 From: kojima Date: Sun, 21 May 2000 23:56:33 +0000 Subject: [PATCH] added options to change default fonts --- WINGs/ChangeLog | 6 ++++++ WINGs/WINGs.h | 7 ++++++- WINGs/WINGsP.h | 2 +- WINGs/widgets.c | 18 ++++++++++++++++++ WINGs/wpopupbutton.c | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 918efc44..d6f30202 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -1,3 +1,9 @@ +changes since wmaker 0.62.0: +............................ +- added WMSetWidgetDefaultFont(), WMSetWidgetDefaultBoldFont() + + + changes since wmaker 0.62.0: ............................ - added WM{S,G}etDataFormat() diff --git a/WINGs/WINGs.h b/WINGs/WINGs.h index 068f0aa2..0afab32c 100644 --- a/WINGs/WINGs.h +++ b/WINGs/WINGs.h @@ -7,7 +7,7 @@ #include #include -#define WINGS_H_VERSION 20000402 +#define WINGS_H_VERSION 20000521 #ifdef __cplusplus @@ -648,6 +648,11 @@ WMFont *WMUserFontOfSize(WMScreen *scrPtr, int size); WMFont *WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size); */ + +void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font); + +void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font); + WMFont *WMSystemFontOfSize(WMScreen *scrPtr, int size); WMFont *WMBoldSystemFontOfSize(WMScreen *scrPtr, int size); diff --git a/WINGs/WINGsP.h b/WINGs/WINGsP.h index 48cdf428..f26adcdd 100644 --- a/WINGs/WINGsP.h +++ b/WINGs/WINGsP.h @@ -8,7 +8,7 @@ #include "WINGs.h" -#if WINGS_H_VERSION < 20000402 +#if WINGS_H_VERSION < 20000521 #error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it. #endif diff --git a/WINGs/widgets.c b/WINGs/widgets.c index 8c54416d..19875bff 100644 --- a/WINGs/widgets.c +++ b/WINGs/widgets.c @@ -815,6 +815,24 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) } + +void +WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font) +{ + WMReleaseFont(scr->normalFont); + scr->normalFont = WMRetainFont(font); +} + + +void +WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font) +{ + WMReleaseFont(scr->boldFont); + scr->boldFont = WMRetainFont(font); +} + + + void WMHangData(WMWidget *widget, void *data) { diff --git a/WINGs/wpopupbutton.c b/WINGs/wpopupbutton.c index d09661b7..bf656465 100644 --- a/WINGs/wpopupbutton.c +++ b/WINGs/wpopupbutton.c @@ -15,7 +15,7 @@ typedef struct W_PopUpButton { char *caption; WMBag *items; - + short selectedItemIndex; short highlightedItem;