mirror of
https://github.com/WinampDesktop/winamp.git
synced 2024-09-24 15:54:12 +00:00
28 lines
854 B
C++
28 lines
854 B
C++
#include "api.h"
|
|
#include "SkinBitmapElement.h"
|
|
#include "PaletteManager.h"
|
|
|
|
SkinBitmapElement::SkinBitmapElement(const wchar_t *_id, const wchar_t *_filename, const wchar_t *_rootpath, int _x, int _y, int _w, int _h, ifc_xmlreaderparams *pars, int script_id, int secondarycounter, const wchar_t *colorgrp)
|
|
: filename(_filename), rootpath(_rootpath), x(_x), y(_y), w(_w), h(_h),
|
|
scriptid(script_id), seccount(secondarycounter), colorgroup(colorgrp),
|
|
region(NULL)
|
|
{
|
|
id = _id;
|
|
|
|
if (pars)
|
|
{
|
|
for (size_t i = 0;i != pars->getNbItems();i++)
|
|
params.addItem(pars->getItemName(i), pars->getItemValue(i));
|
|
}
|
|
}
|
|
|
|
SkinBitmapElement::~SkinBitmapElement()
|
|
{
|
|
if (region != NULL) WASABI_API_PALETTE->garbageCollectRegionServer(region);
|
|
region = NULL;
|
|
}
|
|
|
|
SkinItem *SkinBitmapElement::getAncestor()
|
|
{
|
|
return WASABI_API_PALETTE->getBitmapAncestor(this);
|
|
}
|