| 79 | } |
| 80 | |
| 81 | BOOL CCursorFreeRDP::onNew(rdpContext *context, rdpPointer *pointer) |
| 82 | { |
| 83 | return TRUE; |
| 84 | BOOL bRet = TRUE; |
| 85 | QImage cursor(pointer->width, pointer->height, QImage::Format_ARGB32); |
| 86 | /** |
| 87 | * Drawing Monochrome Pointers: |
| 88 | * http://msdn.microsoft.com/en-us/library/windows/hardware/ff556143/ |
| 89 | * |
| 90 | * Drawing Color Pointers: |
| 91 | * http://msdn.microsoft.com/en-us/library/windows/hardware/ff556138/ |
| 92 | */ |
| 93 | bRet = freerdp_image_copy_from_pointer_data(cursor.bits(), |
| 94 | CBackendFreeRDP::GetImageFormat(cursor.format()), |
| 95 | 0, |
| 96 | 0, 0, cursor.width(), cursor.height(), |
| 97 | pointer->xorMaskData, |
| 98 | pointer->lengthXorMask, |
| 99 | pointer->andMaskData, |
| 100 | pointer->lengthAndMask, |
| 101 | pointer->xorBpp, |
| 102 | &context->gdi->palette); |
| 103 | if(bRet) |
| 104 | { |
| 105 | m_Cursor = cursor; |
| 106 | emit m_pConnect->sigUpdateCursor(QCursor(QPixmap::fromImage(m_Cursor), |
| 107 | pointer->xPos, pointer->yPos)); |
| 108 | } |
| 109 | return bRet; |
| 110 | } |
| 111 | |
| 112 | void CCursorFreeRDP::onFree(rdpContext* context, rdpPointer* pointer) |
| 113 | {} |