1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

For libwraster:

---------------

- Added retain/release mechanism to RImage by adding RRetainImage() and
  RReleaseImage(). RDestroyImage() is an alias to RReleaseImage() now, but
  will be removed in a future release because it no longer fits with the
  semantics. Will be kept for a while to allow a smoother transition.
  More about in wrlib/NEWS


For WINGs:
----------

- Small API change:
  1. Renamed WMSetApplicationIconImage(), WMGetApplicationIconImage() and
     WMSetWindowMiniwindowImage() to respectively WMSetApplicationIconPixmap(),
     WMGetApplicationIconPixmap() and WMSetWindowMiniwindowPixmap()
     They operate on a WMPixmap which is practically an X Pixmap with no alpha
     channel information and the new name is more suggestive and also leaves
     room for the new functions added for operating on images with alpha info.
  2. Added WMSetApplicationIconImage() and WMGetApplicationIconImage() which
     operate on an RImage and store alpha information too.
  3. Added WMGetApplicationIconBlendedPixmap() which will take the image with
     alpha set by WMSetApplicationIconImage() and will blend it with a color.
     If color is NULL it will blend using the default panel color (#aeaaae)
  All these changes will allow WINGs to handle images with alpha blending
  correctly in panels and wherever else needed. More about in WINGs/NEWS.
- updated panels to use the newly available RImages if present and fallback
  to old WMPixmaps if not, to properly show alpha blended images.
- replaced some still left malloc's with wmalloc's.


For Window Maker:
-----------------
- Fixed wrong mapping position of the "Docked Applications Panel" for some
  icons.
- Smoother animation for the smiley =)
- Made images with alpha blending be shown correctly in the panels and the
  icon chooser.
- The icon image set to be shown in panels ("Logo.WMPanel") will be
  automatically updated if its entry in WMWindowAttributes changes (without
  a need to restart as until now).


*** Note!!! ***

If you are developing applications with one of libwraster or libWINGs
then you should look to wrlib/NEWS and WINGs/NEWS to see what changed
and how should you update your code.
This commit is contained in:
dan
2001-04-21 07:12:21 +00:00
parent eb11184ef0
commit 36e46831e0
52 changed files with 782 additions and 466 deletions

View File

@@ -55,6 +55,7 @@ RCreateImage(unsigned width, unsigned height, int alpha)
image->width = width;
image->height = height;
image->format = alpha ? RRGBAFormat : RRGBFormat;
image->refCount = 1;
/* the +4 is to give extra bytes at the end of the buffer,
* so that we can optimize image conversion for MMX(tm).. see convert.c
@@ -70,6 +71,44 @@ RCreateImage(unsigned width, unsigned height, int alpha)
}
RImage*
RRetainImage(RImage *image)
{
if (image)
image->refCount++;
return image;
}
void
RReleaseImage(RImage *image)
{
assert(image!=NULL);
image->refCount--;
if (image->refCount < 1) {
free(image->data);
free(image);
}
}
/* Obsoleted function. Use RReleaseImage() instead. This was kept only to
* allow a smoother transition and to avoid breaking existing programs, but
* it will be removed in a future release. Right now is just an alias to
* RReleaseImage(). Do _NOT_ use RDestroyImage() anymore in your programs.
* Being an alias to RReleaseImage() this function no longer actually
* destroys the image, unless the image is no longer retained in some other
* place.
*/
void
RDestroyImage(RImage *image)
{
RReleaseImage(image);
}
RImage*
RCloneImage(RImage *image)
@@ -126,16 +165,6 @@ RGetSubImage(RImage *image, int x, int y, unsigned width, unsigned height)
}
void
RDestroyImage(RImage *image)
{
assert(image!=NULL);
free(image->data);
free(image);
}
/*
*----------------------------------------------------------------------
* RCombineImages-