cutego/gui/qpixmapcache.go

53 lines
939 B
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package gui
//#include "qpixmapcache.h"
import "C"
import (
"unsafe"
)
type QPixmapCache struct {
ptr unsafe.Pointer
}
2015-11-09 20:23:42 +03:00
type QPixmapCache_ITF interface {
QPixmapCache_PTR() *QPixmapCache
2015-10-24 18:18:24 +03:00
}
func (p *QPixmapCache) Pointer() unsafe.Pointer {
return p.ptr
}
func (p *QPixmapCache) SetPointer(ptr unsafe.Pointer) {
p.ptr = ptr
}
2015-11-09 20:23:42 +03:00
func PointerFromQPixmapCache(ptr QPixmapCache_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QPixmapCache_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQPixmapCacheFromPointer(ptr unsafe.Pointer) *QPixmapCache {
2015-10-24 18:18:24 +03:00
var n = new(QPixmapCache)
n.SetPointer(ptr)
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QPixmapCache) QPixmapCache_PTR() *QPixmapCache {
2015-10-24 18:18:24 +03:00
return ptr
}
func QPixmapCache_CacheLimit() int {
return int(C.QPixmapCache_QPixmapCache_CacheLimit())
}
func QPixmapCache_Clear() {
C.QPixmapCache_QPixmapCache_Clear()
}
func QPixmapCache_SetCacheLimit(n int) {
C.QPixmapCache_QPixmapCache_SetCacheLimit(C.int(n))
}