123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- #ifndef _SVC_IMGWRITE_H
- #define _SVC_IMGWRITE_H
- #include <api/service/services.h>
- #include <bfc/platform/platform.h>
- #include <bfc/dispatch.h>
- class NOVTABLE svc_imageWriter : public Dispatchable {
- public:
- static FOURCC getServiceType() { return WaSvc::IMAGEWRITER; }
-
- const wchar_t * getImageTypeName();
-
-
- const wchar_t * getExtensions();
-
-
- int setConfig(const wchar_t * item, const wchar_t * value);
-
-
-
- int getConfig(const wchar_t * item, wchar_t * value, int valuelen);
-
-
- int bitDepthSupported(int depth);
-
- void * convert(const void *pixels, int bitDepth, int w, int h, int *length);
-
- enum {
- GETIMAGETYPENAME=10,
- GETEXTENSIONS=20,
- SETCONFIG=30,
- GETCONFIG=40,
- BITDEPTHSUPPORTED=50,
- CONVERT=60,
- };
- };
- inline const wchar_t *svc_imageWriter::getImageTypeName() {
- return _call(GETIMAGETYPENAME, L"");
- }
- inline const wchar_t *svc_imageWriter::getExtensions() {
- return _call(GETEXTENSIONS, L"");
- }
- inline int svc_imageWriter::setConfig(const wchar_t * item, const wchar_t * value) {
- return _call(SETCONFIG, (int)0, item, value);
- }
- inline int svc_imageWriter::getConfig(const wchar_t * item, wchar_t * value, int valuelen) {
- return _call(GETCONFIG, (int)0, item, value, valuelen);
- }
- inline int svc_imageWriter::bitDepthSupported(int depth) {
- return _call(BITDEPTHSUPPORTED, (int)0, depth);
- }
- inline void * svc_imageWriter::convert(const void *pixels, int bitDepth, int w, int h, int *length) {
- return _call(CONVERT, (void*)0, pixels, bitDepth, w, h, length);
- }
- class NOVTABLE svc_imageWriterI : public svc_imageWriter {
- public:
- virtual const wchar_t * getExtensions()=0;
- virtual const wchar_t * getImageTypeName()=0;
- virtual int setConfig(const wchar_t * item, const wchar_t * value){return 0;}
- virtual int getConfig(const wchar_t * item, wchar_t * value, int valuelen){return 0;}
- virtual int bitDepthSupported(int depth)=0;
- virtual void * convert(const void *pixels, int bitDepth, int w, int h, int *length)=0;
- protected:
- RECVS_DISPATCH;
- };
- #endif
|