16 // |
16 // |
17 |
17 |
18 |
18 |
19 // Include Files |
19 // Include Files |
20 #include <e32def.h> |
20 #include <e32def.h> |
|
21 #include <pixelformats.h> |
21 #include <graphics/suerror.h> |
22 #include <graphics/suerror.h> |
22 #include "symbianstream.h" |
23 #include "symbianstream.h" |
23 #include "surfacestream.h" |
24 #include "surfacestream.h" |
24 #include "streammap.h" |
25 #include "streammap.h" |
25 #include "openwfcpanic.h" |
26 #include "openwfcpanic.h" |
135 } |
136 } |
136 EXPORT_C void SymbianStreamGetHeader( SymbianStreamType aStream, |
137 EXPORT_C void SymbianStreamGetHeader( SymbianStreamType aStream, |
137 khronos_int32_t* aWidth, |
138 khronos_int32_t* aWidth, |
138 khronos_int32_t* aHeight, |
139 khronos_int32_t* aHeight, |
139 khronos_int32_t* aStride, |
140 khronos_int32_t* aStride, |
140 TUidPixelFormat* aFormat, |
141 khronos_int32_t* aFormat, |
141 khronos_int32_t* aPixelSize) |
142 khronos_int32_t* aPixelSize) |
142 { |
143 { |
143 CSurfaceStream* stream=CSurfaceStream::FromHandle(aStream); |
144 CSurfaceStream* stream=CSurfaceStream::FromHandle(aStream); |
144 __ASSERT_ALWAYS(stream, Panic(EOwfSymbianStreamBadArgument)); |
145 __ASSERT_ALWAYS(stream, Panic(EOwfSymbianStreamBadArgument)); |
145 stream->GetHeader(aWidth,aHeight,aStride,aFormat,aPixelSize); |
146 stream->GetHeader(aWidth,aHeight,aStride,aFormat,aPixelSize); |
361 { |
362 { |
362 stream->ProcessNotifications(aEvent, aScreenNumber, CSurfaceStream::ECheckVisibleOperation, aSerialNumber, NULL); |
363 stream->ProcessNotifications(aEvent, aScreenNumber, CSurfaceStream::ECheckVisibleOperation, aSerialNumber, NULL); |
363 } |
364 } |
364 } |
365 } |
365 |
366 |
366 EXPORT_C TInt32 |
|
367 SymbianStreamProcessDisplayedNotifications(SymbianStreamType aStream, |
|
368 khronos_int32_t aEvent, |
|
369 khronos_int32_t aScreenNumber, |
|
370 khronos_int32_t aSerialNumber, |
|
371 khronos_int32_t* aReturnMask) |
|
372 { |
|
373 CSurfaceStream* stream = CSurfaceStream::FromHandle(aStream); |
|
374 TInt32 event = aEvent & (ESOWF_EventDisplayed | ESOWF_EventDisplayedX); |
|
375 if (stream && event) |
|
376 { |
|
377 stream->ProcessNotifications(aEvent, |
|
378 aScreenNumber, |
|
379 CSurfaceStream::EDefaultOperation, |
|
380 aSerialNumber, |
|
381 aReturnMask); |
|
382 } |
|
383 return event; |
|
384 } |
|
385 |
|
386 EXPORT_C TInt32 |
|
387 SymbianStreamProcessAvailableNotifications(SymbianStreamType aStream, |
|
388 khronos_int32_t aEvent, |
|
389 khronos_int32_t aScreenNumber, |
|
390 khronos_int32_t aSerialNumber, |
|
391 khronos_int32_t* aReturnMask) |
|
392 { |
|
393 CSurfaceStream* stream = CSurfaceStream::FromHandle(aStream); |
|
394 TInt32 event = aEvent & ESOWF_EventAvailable; |
|
395 if (stream && event) |
|
396 { |
|
397 stream->ProcessNotifications(aEvent, |
|
398 aScreenNumber, |
|
399 CSurfaceStream::EDefaultOperation, |
|
400 aSerialNumber, |
|
401 aReturnMask); |
|
402 } |
|
403 return ESOWF_EventAvailable; |
|
404 } |
|
405 |
|
406 EXPORT_C TErrCode |
367 EXPORT_C TErrCode |
407 SymbianStreamAddExtendedObserver(SymbianStreamType aStream, |
368 SymbianStreamAddExtendedObserver(SymbianStreamType aStream, |
408 SymbianStreamCallback aObserver, |
369 SymbianStreamCallback aObserver, |
409 void* aData, |
370 void* aData, |
410 khronos_int32_t aScreenNumber, |
371 khronos_int32_t aScreenNumber, |