cutego/gui/qdropevent.go

100 lines
2.4 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package gui
//#include "qdropevent.h"
import "C"
import (
"github.com/therecipe/qt/core"
"unsafe"
)
type QDropEvent struct {
core.QEvent
}
2015-11-09 20:23:42 +03:00
type QDropEvent_ITF interface {
core.QEvent_ITF
QDropEvent_PTR() *QDropEvent
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func PointerFromQDropEvent(ptr QDropEvent_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QDropEvent_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQDropEventFromPointer(ptr unsafe.Pointer) *QDropEvent {
2015-10-24 18:18:24 +03:00
var n = new(QDropEvent)
n.SetPointer(ptr)
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QDropEvent) QDropEvent_PTR() *QDropEvent {
2015-10-24 18:18:24 +03:00
return ptr
}
func (ptr *QDropEvent) SetDropAction(action core.Qt__DropAction) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QDropEvent_SetDropAction(ptr.Pointer(), C.int(action))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func NewQDropEvent(pos core.QPointF_ITF, actions core.Qt__DropAction, data core.QMimeData_ITF, buttons core.Qt__MouseButton, modifiers core.Qt__KeyboardModifier, ty core.QEvent__Type) *QDropEvent {
return NewQDropEventFromPointer(C.QDropEvent_NewQDropEvent(core.PointerFromQPointF(pos), C.int(actions), core.PointerFromQMimeData(data), C.int(buttons), C.int(modifiers), C.int(ty)))
2015-10-24 18:18:24 +03:00
}
func (ptr *QDropEvent) AcceptProposedAction() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QDropEvent_AcceptProposedAction(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QDropEvent) DropAction() core.Qt__DropAction {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__DropAction(C.QDropEvent_DropAction(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QDropEvent) KeyboardModifiers() core.Qt__KeyboardModifier {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__KeyboardModifier(C.QDropEvent_KeyboardModifiers(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QDropEvent) MimeData() *core.QMimeData {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.NewQMimeDataFromPointer(C.QDropEvent_MimeData(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return nil
}
func (ptr *QDropEvent) MouseButtons() core.Qt__MouseButton {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__MouseButton(C.QDropEvent_MouseButtons(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QDropEvent) PossibleActions() core.Qt__DropAction {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__DropAction(C.QDropEvent_PossibleActions(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QDropEvent) ProposedAction() core.Qt__DropAction {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__DropAction(C.QDropEvent_ProposedAction(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QDropEvent) Source() *core.QObject {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.NewQObjectFromPointer(C.QDropEvent_Source(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return nil
}