Image rendering code modified. Normal image rendering now happens

in the usual place at image.cpp. only RDF cases are handled here.
This commit is contained in:
radha%netscape.com 1998-10-01 04:55:50 +00:00
Родитель c5fd4a2b3e
Коммит 427b6cd865
6 изменённых файлов: 28 добавлений и 35 удалений

Просмотреть файл

@ -1752,7 +1752,7 @@ XFE_Frame::initializeMWContext(EFrameType frame_type,
// set image library Callback functions
CONTEXT_DATA (m_context)->DisplayPixmap
= (DisplayPixmapPtr)fe_DisplayPixmap;
= (DisplayPixmapPtr)NULL/* fe_DisplayPixmap */;
CONTEXT_DATA (m_context)->NewPixmap = (NewPixmapPtr)NULL;
CONTEXT_DATA (m_context)->ImageComplete = (ImageCompletePtr)NULL;

Просмотреть файл

@ -263,11 +263,7 @@ XFE_Image::getURLExit_cb(URL_Struct *pUrl, int iStatus, MWContext *pContext)
// The XFE handle to the image library callback -IMGCB_DisplayPixmap
extern "C" void
fe_DisplayPixmap(MWContext * context,
IL_Pixmap * image, IL_Pixmap * mask,
PRInt32 x, PRInt32 y,
PRInt32 x_offset, PRInt32 y_offset,
PRInt32 width, PRInt32 height)
fe_DisplayPixmap(MWContext * context, IL_Pixmap * image, IL_Pixmap * mask, PRInt32 width, PRInt32 height)
{
XFE_Frame * frameHandle=(XFE_Frame *)NULL;
@ -282,26 +278,19 @@ fe_DisplayPixmap(MWContext * context,
* pixmap display
*/
if (context->type != MWContextIcon)
{
/* Call the frame's displayImage method */
XFE_Image::DisplayImage(context, image, mask,
x, y, x_offset, y_offset,
width, height);
}
else
{
/* If the context type is MWContextIcon, get a handle to
* NavCenterView and let it handle pixmap
*/
XFE_View * navCenterView = XFE_View::getNavCenterView(frameHandle->getView());
if (navCenterView)
{
Widget buttonWidget = CONTEXT_WIDGET(context);
navCenterView->handleDisplayPixmap(buttonWidget, image, mask, width, height);
}
if (context->type == MWContextIcon)
{
/* If the context type is MWContextIcon, get a handle to
* NavCenterView and let it handle pixmap
*/
XFE_View * navCenterView = XFE_View::getNavCenterView(frameHandle->getView());
if (navCenterView)
{
Widget buttonWidget = CONTEXT_WIDGET(context);
navCenterView->handleDisplayPixmap(buttonWidget, image, mask, width, height);
}
}
}
} /* DisplayPixmap */
@ -378,6 +367,7 @@ XFE_Image::ImageComplete(MWContext * context, IL_Pixmap * image)
} /* ImageComplete */
#ifdef UNDEF
// The actual XFE function that renders image on a HTML area
/*static*/ void
@ -535,3 +525,5 @@ XFE_Image::DisplayImage(MWContext * context,
} /* displayImage */
#endif /* UNDEF */

Просмотреть файл

@ -44,12 +44,13 @@ public:
static void getURLExit_cb (URL_Struct *pUrl, int iStatus,
MWContext *pContext);
/*
static void DisplayImage (MWContext * context,
IL_Pixmap * image, IL_Pixmap * mask,
PRInt32 x, PRInt32 y,
PRInt32 x_offset, PRInt32 y_offset,
PRInt32 width, PRInt32 height);
*/
static void NewPixmap (MWContext * context,
IL_Pixmap * image, Boolean mask);
static void ImageComplete (MWContext * context, IL_Pixmap * image);
@ -74,10 +75,7 @@ protected:
/* This is still used by xfe.c */
extern "C" void fe_DisplayPixmap (MWContext * context,
IL_Pixmap * image, IL_Pixmap * mask,
PRInt32 x, PRInt32 y,
PRInt32 x_offset, PRInt32 y_offset,
PRInt32 width, PRInt32 height);
IL_Pixmap * image, IL_Pixmap * mask, PRInt32 , PRInt32);
#endif /* _xfe_image_h */

Просмотреть файл

@ -34,7 +34,7 @@
#if 0
extern "C"
{
void DisplayPixmap(MWContext *, IL_Pixmap *, IL_Pixmap * , PRInt32, PRInt32, PRInt32, PRInt32, PRInt32, PRInt32);
void DisplayPixmap(MWContext *, IL_Pixmap *, IL_Pixmap *);
void NewPixmap(MWContext *, IL_Pixmap * image, PRBool mask);
void ImageComplete(MWContext *, IL_Pixmap * image);
void fe_load_default_font(MWContext *context);
@ -128,7 +128,7 @@ XFE_RDFImage::RDFDisplayPixmap(IL_Pixmap * image, IL_Pixmap * mask, PRInt32 widt
m_image = image;
m_mask = mask;
imageWidth = width;
imageHeight = height;
imageHeight = height;
pairCount++;
if (!completelyLoaded)
@ -137,8 +137,10 @@ XFE_RDFImage::RDFDisplayPixmap(IL_Pixmap * image, IL_Pixmap * mask, PRInt32 widt
client_data->widget = (Widget)callbackData;
client_data->image = getPixmap();
client_data->mask = getMask();
/*
client_data->width = width;
client_data->height = height;
*/
completelyLoaded = True;
if (isrequestorAlive(client_data->widget))
(*completeCallback)(client_data);

Просмотреть файл

@ -65,8 +65,9 @@ public:
void setCompleteCallback (completeCallbackPtr callback,
void * callbackData);
void RDFDisplayPixmap (IL_Pixmap * image, IL_Pixmap * mask,
PRInt32 width, PRInt32 height);
void RDFDisplayPixmap (IL_Pixmap * image, IL_Pixmap * mask,
PRInt32 width, PRInt32 height);
void RDFNewPixmap (IL_Pixmap * image, PRBool isMask);
void RDFImageComplete (IL_Pixmap * image);
void addListener (void * requestedObj, Widget w,

Просмотреть файл

@ -2894,7 +2894,7 @@ fe_CreateNewContext(MWContextType type, Widget w, fe_colormap *cmap,
CONTEXT_DATA (context)->colormap = cmap;
// set image library Callback functions
CONTEXT_DATA (context)->DisplayPixmap = (DisplayPixmapPtr)fe_DisplayPixmap;
CONTEXT_DATA (context)->DisplayPixmap = (DisplayPixmapPtr) NULL /* fe_DisplayPixmap */;
CONTEXT_DATA (context)->NewPixmap = (NewPixmapPtr)NULL;
CONTEXT_DATA (context)->ImageComplete = (ImageCompletePtr)NULL;