2007-04-17 21:53:34 +02:00
|
|
|
#ifndef __GECKO_DOCUMENT_OBJECT_H__
|
|
|
|
#define __GECKO_DOCUMENT_OBJECT_H__
|
|
|
|
|
|
|
|
#include <nsIDOMNode.h>
|
|
|
|
#include <nsIDOMHTMLImageElement.h>
|
|
|
|
|
|
|
|
#include "sugar-browser.h"
|
|
|
|
|
|
|
|
class GeckoDocumentObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GeckoDocumentObject(SugarBrowser *browser, nsIDOMNode *node);
|
|
|
|
~GeckoDocumentObject();
|
|
|
|
|
|
|
|
bool IsImage();
|
|
|
|
char *GetImageURI();
|
|
|
|
char *GetImageName();
|
2007-04-18 14:21:49 +02:00
|
|
|
char *GetImageMimeType();
|
2007-04-17 21:53:34 +02:00
|
|
|
bool SaveImage(const char *filename);
|
|
|
|
private:
|
|
|
|
SugarBrowser *mBrowser;
|
|
|
|
nsCOMPtr<nsIDOMNode> mNode;
|
|
|
|
nsCOMPtr<nsIDOMHTMLImageElement> mImage;
|
|
|
|
nsCString mImageURI;
|
|
|
|
nsCString mImageName;
|
2007-04-18 14:21:49 +02:00
|
|
|
nsCString mImageMimeType;
|
2007-04-17 21:53:34 +02:00
|
|
|
protected:
|
|
|
|
/* additional members */
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GECKO_DOCUMENT_OBJECT_H__
|