1 //******************************************************************************
2 //  Copyright (c) 2017 by Željan Rikalo
3 //
4 //  See the included file COPYING.TXT for details about the copyright.
5 //
6 //  This program is distributed in the hope that it will be useful,
7 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10 
11 
12 #include "qbackingstore_c.h"
13 
QBackingStore_Create(QWindowH window)14 QBackingStoreH QBackingStore_Create(QWindowH window)
15 {
16   return (QBackingStoreH) new QBackingStore((QWindow*)window);
17 }
18 
QBackingStore_Destroy(QBackingStoreH handle)19 void QBackingStore_Destroy(QBackingStoreH handle)
20 {
21   delete (QBackingStore *)handle;
22 }
23 
QBackingStore_window(QBackingStoreH handle)24 QWindowH QBackingStore_window(QBackingStoreH handle)
25 {
26   return (QWindowH) ((QBackingStore *)handle)->window();
27 }
28 
QBackingStore_paintDevice(QBackingStoreH handle)29 QPaintDeviceH QBackingStore_paintDevice(QBackingStoreH handle)
30 {
31   return (QPaintDeviceH) ((QBackingStore *)handle)->paintDevice();
32 }
33 
QBackingStore_flush(QBackingStoreH handle,const QRegionH region,QWindowH window,const QPointH offset)34 void QBackingStore_flush(QBackingStoreH handle, const QRegionH region, QWindowH window, const QPointH offset)
35 {
36   ((QBackingStore *)handle)->flush(*(const QRegion*) region, (QWindow *)window, *(const QPoint*) offset);
37 }
38 
QBackingStore_resize(QBackingStoreH handle,const QSizeH AnonParam1)39 void QBackingStore_resize(QBackingStoreH handle, const QSizeH AnonParam1)
40 {
41   ((QBackingStore *)handle)->resize(*(const QSize*)AnonParam1);
42 }
43 
QBackingStore_size(QBackingStoreH handle,PSize retval)44 void QBackingStore_size(QBackingStoreH handle, PSize retval)
45 {
46   *(QSize *)retval = ((QBackingStore *)handle)->size();
47 }
48 
QBackingStore_scroll(QBackingStoreH handle,const QRegionH area,int dx,int dy)49 bool QBackingStore_scroll(QBackingStoreH handle, const QRegionH area, int dx, int dy)
50 {
51   return ((QBackingStore *)handle)->scroll(*(const QRegion*)area, dx, dy);
52 }
53 
QBackingStore_beginPaint(QBackingStoreH handle,const QRegionH AnonParam1)54 void QBackingStore_beginPaint(QBackingStoreH handle, const QRegionH AnonParam1)
55 {
56   ((QBackingStore *)handle)->beginPaint(*(const QRegion*)AnonParam1);
57 }
58 
QBackingStore_endPaint(QBackingStoreH handle)59 void QBackingStore_endPaint(QBackingStoreH handle)
60 {
61   ((QBackingStore *)handle)->endPaint();
62 }
63 
QBackingStore_setStaticContents(QBackingStoreH handle,const QRegionH AnonParam1)64 void QBackingStore_setStaticContents(QBackingStoreH handle, const QRegionH AnonParam1)
65 {
66   ((QBackingStore *)handle)->setStaticContents(*(const QRegion*)AnonParam1);
67 }
68 
QBackingStore_staticContents(QBackingStoreH handle,QRegionH retval)69 void QBackingStore_staticContents(QBackingStoreH handle, QRegionH retval)
70 {
71 	*(QRegion *)retval = ((QBackingStore *)handle)->staticContents();
72 }
73 
QBackingStore_hasStaticContents(QBackingStoreH handle)74 bool QBackingStore_hasStaticContents(QBackingStoreH handle)
75 {
76   return (bool) ((QBackingStore *)handle)->hasStaticContents();
77 }
78 
79