1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 13:24:14 +01:00

- API change in WINGs for WMDraw*String().

WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
  arguments. WMDrawImageString() receives 2 colors (text & background).
  This is to allow easy extension for Xft/Xrender and hide X low level details
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Removed obsoleted acconfig.h and implemented its functionality using
  AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
  This will definitely enforce the need to use autoconf 2.5x
This commit is contained in:
dan
2002-10-08 08:26:06 +00:00
parent e98da5a628
commit a2b404b5b3
58 changed files with 554 additions and 601 deletions

View File

@@ -327,13 +327,13 @@ updateSVSlider(WMSlider *sPtr, Bool saturation, WMFont *font, RHSVColor *hsv)
if (hsv->value < 128 || !saturation) {
WMColor *col = WMWhiteColor(scr);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(col), font, 2,
WMDrawString(scr, WMGetPixmapXID(pixmap), col, font, 2,
(16 - WMFontHeight(font))/2 - 1, buffer, strlen(buffer));
WMReleaseColor(col);
} else {
WMColor *col = WMBlackColor(scr);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(col), font, 2,
WMDrawString(scr, WMGetPixmapXID(pixmap), col, font, 2,
(16 - WMFontHeight(font))/2 - 1, buffer, strlen(buffer));
WMReleaseColor(col);
}
@@ -368,14 +368,14 @@ updateHueSlider(WMSlider *sPtr, WMFont *font, RHSVColor *hsv)
if (hsv->value < 128) {
WMColor *col = WMWhiteColor(scr);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(col), font, 2,
WMDrawString(scr, WMGetPixmapXID(pixmap), col, font, 2,
(16 - WMFontHeight(font))/2 - 1,
_("Hue"), strlen(_("Hue")));
WMReleaseColor(col);
} else {
WMColor *col = WMBlackColor(scr);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(col), font, 2,
WMDrawString(scr, WMGetPixmapXID(pixmap), col, font, 2,
(16 - WMFontHeight(font))/2 - 1,
_("Hue"), strlen(_("Hue")));
WMReleaseColor(col);
@@ -489,8 +489,8 @@ paintGradListItem(WMList *lPtr, int index, Drawable d, char *text, int state,
XCopyArea(WMScreenDisplay(scr), panel->gimage, d, WMColorGC(white),
0, height*index, 30, height, x + 5, y);
}
WMDrawString(scr, d, WMColorGC(black), panel->listFont,
x + 40, y + 1, text, strlen(text));
WMDrawString(scr, d, black, panel->listFont, x + 40, y + 1,
text, strlen(text));
WMReleaseColor(white);
WMReleaseColor(black);
@@ -1333,7 +1333,7 @@ CreateTexturePanel(WMWindow *keyWindow)
WMColorGC(color), 0, 0, 130, 16);
WMReleaseColor(color);
color = WMWhiteColor(color);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(color),
WMDrawString(scr, WMGetPixmapXID(pixmap), color,
panel->listFont, 2,
(16 - WMFontHeight(panel->listFont))/2 - 1,
"Brightness", 10);
@@ -1357,7 +1357,7 @@ CreateTexturePanel(WMWindow *keyWindow)
WMColorGC(color), 0, 0, 130, 16);
WMReleaseColor(color);
color = WMWhiteColor(scr);
WMDrawString(scr, WMGetPixmapXID(pixmap), WMColorGC(color),
WMDrawString(scr, WMGetPixmapXID(pixmap), color,
panel->listFont, 2,
(16 - WMFontHeight(panel->listFont))/2 - 1,
"Contrast", 8);
@@ -1463,9 +1463,8 @@ CreateTexturePanel(WMWindow *keyWindow)
WMReleaseColor(color);
color = WMWhiteColor(scr);
WMDrawString(scr, p, WMColorGC(color), panel->listFont,
2, 1, "0%", 2);
WMDrawString(scr, p, WMColorGC(color), panel->listFont,
WMDrawString(scr, p, color, panel->listFont, 2, 1, "0%", 2);
WMDrawString(scr, p, color, panel->listFont,
153 - WMWidthOfString(panel->listFont, "100%", 4), 1,
"100%", 4);
WMReleaseColor(color);