summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_s60_p.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-09-23 06:31:23 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-09-23 13:10:41 (GMT)
commit7dcf984f85a3a75ce4c078cc931bd9d2304bc235 (patch)
treed18699427b8ffe5843e82c3057c70b9db53d136d /src/gui/image/qpixmap_s60_p.h
parent48d0f84958fdc2dcffab75f33842a9dbc3d4d7b1 (diff)
downloadQt-7dcf984f85a3a75ce4c078cc931bd9d2304bc235.zip
Qt-7dcf984f85a3a75ce4c078cc931bd9d2304bc235.tar.gz
Qt-7dcf984f85a3a75ce4c078cc931bd9d2304bc235.tar.bz2
Modify functions for native pixmap data conversion on Symbian.
We need a way to support converion to and from multiple native pixmap types from multiple pixmap backends. Instead of adding more virtual functions to QPixmapData, make the existing one more generic but pass an opaque pointer and a type and do some internal casting. Currently this function is Symbian only, but could easily be extended to work on other platforms. Reviewed-by: Aleksandar Babic Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/gui/image/qpixmap_s60_p.h')
-rw-r--r--src/gui/image/qpixmap_s60_p.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h
index 21f1bb3..4498c05 100644
--- a/src/gui/image/qpixmap_s60_p.h
+++ b/src/gui/image/qpixmap_s60_p.h
@@ -66,17 +66,17 @@ class QSymbianBitmapDataAccess;
class QSymbianFbsHeapLock
{
public:
-
+
enum LockAction {
Unlock
};
-
+
explicit QSymbianFbsHeapLock(LockAction a);
~QSymbianFbsHeapLock();
- void relock();
-
+ void relock();
+
private:
-
+
LockAction action;
bool wasLocked;
};
@@ -102,13 +102,16 @@ public:
void beginDataAccess();
void endDataAccess(bool readOnly=false) const;
+ void* toNativeType(NativeType type);
+ void fromNativeType(void* pixmap, NativeType type);
+
private:
- void release();
- void fromSymbianBitmap(CFbsBitmap* bitmap);
- bool initSymbianBitmapContext();
+ void release();
+ void fromSymbianBitmap(CFbsBitmap* bitmap);
+ bool initSymbianBitmapContext();
QSymbianBitmapDataAccess *symbianBitmapDataAccess;
-
+
CFbsBitmap *cfbsBitmap;
CFbsBitmapDevice *bitmapDevice;
CBitmapContext *bitmapContext;