Golang GetSignal示例

说明

golang getsignal示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Golang

命名空间/包名称: github.com/therecipe/qt

示例#1
文件: macextras.go 项目: mouse225/qt

//export callbackQMacToolBarItemActivated
func callbackQMacToolBarItemActivated(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QMacToolBarItem::activated")

	if signal := qt.GetSignal(C.GoString(ptrName), "activated"); signal != nil {
		signal.(func())()
	}

}

示例#2
文件: webchannel.go 项目: mouse225/qt

//export callbackQWebChannelBlockUpdatesChanged
func callbackQWebChannelBlockUpdatesChanged(ptr unsafe.Pointer, ptrName *C.char, block C.int) {
	defer qt.Recovering("callback QWebChannel::blockUpdatesChanged")

	if signal := qt.GetSignal(C.GoString(ptrName), "blockUpdatesChanged"); signal != nil {
		signal.(func(bool))(int(block) != 0)
	}

}

示例#3
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketStateChanged
func callbackQWebSocketStateChanged(ptr unsafe.Pointer, ptrName *C.char, state C.int) {
	defer qt.Recovering("callback QWebSocket::stateChanged")

	if signal := qt.GetSignal(C.GoString(ptrName), "stateChanged"); signal != nil {
		signal.(func(network.QAbstractSocket__SocketState))(network.QAbstractSocket__SocketState(state))
	}

}

示例#4
文件: webchannel.go 项目: mouse225/qt

//export callbackQWebChannelAbstractTransportMessageReceived
func callbackQWebChannelAbstractTransportMessageReceived(ptr unsafe.Pointer, ptrName *C.char, message unsafe.Pointer, transport unsafe.Pointer) {
	defer qt.Recovering("callback QWebChannelAbstractTransport::messageReceived")

	if signal := qt.GetSignal(C.GoString(ptrName), "messageReceived"); signal != nil {
		signal.(func(*core.QJsonObject, *QWebChannelAbstractTransport))(core.NewQJsonObjectFromPointer(message), NewQWebChannelAbstractTransportFromPointer(transport))
	}

}

示例#5
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketBinaryFrameReceived
func callbackQWebSocketBinaryFrameReceived(ptr unsafe.Pointer, ptrName *C.char, frame unsafe.Pointer, isLastFrame C.int) {
	defer qt.Recovering("callback QWebSocket::binaryFrameReceived")

	if signal := qt.GetSignal(C.GoString(ptrName), "binaryFrameReceived"); signal != nil {
		signal.(func(*core.QByteArray, bool))(core.NewQByteArrayFromPointer(frame), int(isLastFrame) != 0)
	}

}

示例#6
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketBinaryMessageReceived
func callbackQWebSocketBinaryMessageReceived(ptr unsafe.Pointer, ptrName *C.char, message unsafe.Pointer) {
	defer qt.Recovering("callback QWebSocket::binaryMessageReceived")

	if signal := qt.GetSignal(C.GoString(ptrName), "binaryMessageReceived"); signal != nil {
		signal.(func(*core.QByteArray))(core.NewQByteArrayFromPointer(message))
	}

}

示例#7
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketAboutToClose
func callbackQWebSocketAboutToClose(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QWebSocket::aboutToClose")

	if signal := qt.GetSignal(C.GoString(ptrName), "aboutToClose"); signal != nil {
		signal.(func())()
	}

}

示例#8
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketServerOriginAuthenticationRequired
func callbackQWebSocketServerOriginAuthenticationRequired(ptr unsafe.Pointer, ptrName *C.char, authenticator unsafe.Pointer) {
	defer qt.Recovering("callback QWebSocketServer::originAuthenticationRequired")

	if signal := qt.GetSignal(C.GoString(ptrName), "originAuthenticationRequired"); signal != nil {
		signal.(func(*QWebSocketCorsAuthenticator))(NewQWebSocketCorsAuthenticatorFromPointer(authenticator))
	}

}

示例#9
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketServerNewConnection
func callbackQWebSocketServerNewConnection(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QWebSocketServer::newConnection")

	if signal := qt.GetSignal(C.GoString(ptrName), "newConnection"); signal != nil {
		signal.(func())()
	}

}

示例#10
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketBytesWritten
func callbackQWebSocketBytesWritten(ptr unsafe.Pointer, ptrName *C.char, bytes C.longlong) {
	defer qt.Recovering("callback QWebSocket::bytesWritten")

	if signal := qt.GetSignal(C.GoString(ptrName), "bytesWritten"); signal != nil {
		signal.(func(int64))(int64(bytes))
	}

}

示例#11
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketDisconnected
func callbackQWebSocketDisconnected(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QWebSocket::disconnected")

	if signal := qt.GetSignal(C.GoString(ptrName), "disconnected"); signal != nil {
		signal.(func())()
	}

}

示例#12
文件: scripttools.go 项目: mouse225/qt

//export callbackQScriptEngineDebuggerEvaluationSuspended
func callbackQScriptEngineDebuggerEvaluationSuspended(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QScriptEngineDebugger::evaluationSuspended")

	if signal := qt.GetSignal(C.GoString(ptrName), "evaluationSuspended"); signal != nil {
		signal.(func())()
	}

}

示例#13
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketServerClosed
func callbackQWebSocketServerClosed(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QWebSocketServer::closed")

	if signal := qt.GetSignal(C.GoString(ptrName), "closed"); signal != nil {
		signal.(func())()
	}

}

示例#14
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketTextMessageReceived
func callbackQWebSocketTextMessageReceived(ptr unsafe.Pointer, ptrName *C.char, message *C.char) {
	defer qt.Recovering("callback QWebSocket::textMessageReceived")

	if signal := qt.GetSignal(C.GoString(ptrName), "textMessageReceived"); signal != nil {
		signal.(func(string))(C.GoString(message))
	}

}

示例#15
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketTextFrameReceived
func callbackQWebSocketTextFrameReceived(ptr unsafe.Pointer, ptrName *C.char, frame *C.char, isLastFrame C.int) {
	defer qt.Recovering("callback QWebSocket::textFrameReceived")

	if signal := qt.GetSignal(C.GoString(ptrName), "textFrameReceived"); signal != nil {
		signal.(func(string, bool))(C.GoString(frame), int(isLastFrame) != 0)
	}

}

示例#16
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketReadChannelFinished
func callbackQWebSocketReadChannelFinished(ptr unsafe.Pointer, ptrName *C.char) {
	defer qt.Recovering("callback QWebSocket::readChannelFinished")

	if signal := qt.GetSignal(C.GoString(ptrName), "readChannelFinished"); signal != nil {
		signal.(func())()
	}

}

示例#17
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketError2
func callbackQWebSocketError2(ptr unsafe.Pointer, ptrName *C.char, error C.int) {
	defer qt.Recovering("callback QWebSocket::error")

	if signal := qt.GetSignal(C.GoString(ptrName), "error2"); signal != nil {
		signal.(func(network.QAbstractSocket__SocketError))(network.QAbstractSocket__SocketError(error))
	}

}

示例#18
文件: websockets.go 项目: mouse225/qt

//export callbackQMaskGeneratorTimerEvent
func callbackQMaskGeneratorTimerEvent(ptr unsafe.Pointer, ptrName *C.char, event unsafe.Pointer) {
	defer qt.Recovering("callback QMaskGenerator::timerEvent")

	if signal := qt.GetSignal(C.GoString(ptrName), "timerEvent"); signal != nil {
		signal.(func(*core.QTimerEvent))(core.NewQTimerEventFromPointer(event))
	} else {
		NewQMaskGeneratorFromPointer(ptr).TimerEventDefault(core.NewQTimerEventFromPointer(event))
	}
}

示例#19
文件: websockets.go 项目: mouse225/qt

//export callbackQWebSocketChildEvent
func callbackQWebSocketChildEvent(ptr unsafe.Pointer, ptrName *C.char, event unsafe.Pointer) {
	defer qt.Recovering("callback QWebSocket::childEvent")

	if signal := qt.GetSignal(C.GoString(ptrName), "childEvent"); signal != nil {
		signal.(func(*core.QChildEvent))(core.NewQChildEventFromPointer(event))
	} else {
		NewQWebSocketFromPointer(ptr).ChildEventDefault(core.NewQChildEventFromPointer(event))
	}
}

示例#20
文件: webchannel.go 项目: mouse225/qt

//export callbackQWebChannelAbstractTransportCustomEvent
func callbackQWebChannelAbstractTransportCustomEvent(ptr unsafe.Pointer, ptrName *C.char, event unsafe.Pointer) {
	defer qt.Recovering("callback QWebChannelAbstractTransport::customEvent")

	if signal := qt.GetSignal(C.GoString(ptrName), "customEvent"); signal != nil {
		signal.(func(*core.QEvent))(core.NewQEventFromPointer(event))
	} else {
		NewQWebChannelAbstractTransportFromPointer(ptr).CustomEventDefault(core.NewQEventFromPointer(event))
	}
}

示例#21
文件: scripttools.go 项目: mouse225/qt

//export callbackQScriptEngineDebuggerCustomEvent
func callbackQScriptEngineDebuggerCustomEvent(ptr unsafe.Pointer, ptrName *C.char, event unsafe.Pointer) {
	defer qt.Recovering("callback QScriptEngineDebugger::customEvent")

	if signal := qt.GetSignal(C.GoString(ptrName), "customEvent"); signal != nil {
		signal.(func(*core.QEvent))(core.NewQEventFromPointer(event))
	} else {
		NewQScriptEngineDebuggerFromPointer(ptr).CustomEventDefault(core.NewQEventFromPointer(event))
	}
}

示例#22
文件: macextras.go 项目: mouse225/qt

//export callbackQMacToolBarItemCustomEvent
func callbackQMacToolBarItemCustomEvent(ptr unsafe.Pointer, ptrName *C.char, event unsafe.Pointer) {
	defer qt.Recovering("callback QMacToolBarItem::customEvent")

	if signal := qt.GetSignal(C.GoString(ptrName), "customEvent"); signal != nil {
		signal.(func(*core.QEvent))(core.NewQEventFromPointer(event))
	} else {
		NewQMacToolBarItemFromPointer(ptr).CustomEventDefault(core.NewQEventFromPointer(event))
	}
}

示例#23
文件: qmediagaplessplaybackcontrol.go 项目: xland/qt

//export callbackQMediaGaplessPlaybackControlAdvancedToNextMedia
func callbackQMediaGaplessPlaybackControlAdvancedToNextMedia(ptrName *C.char) {
	qt.GetSignal(C.GoString(ptrName), "advancedToNextMedia").(func())()
}

示例#24
文件: qnearfieldmanager.go 项目: xland/qt

//export callbackQNearFieldManagerTargetLost
func callbackQNearFieldManagerTargetLost(ptrName *C.char, target unsafe.Pointer) {
	qt.GetSignal(C.GoString(ptrName), "targetLost").(func(*QNearFieldTarget))(NewQNearFieldTargetFromPointer(target))
}

示例#25
文件: qhelpsearchquerywidget.go 项目: xland/qt

//export callbackQHelpSearchQueryWidgetSearch
func callbackQHelpSearchQueryWidgetSearch(ptrName *C.char) {
	qt.GetSignal(C.GoString(ptrName), "search").(func())()
}

示例#26
文件: qsocketnotifier.go 项目: xland/qt

//export callbackQSocketNotifierActivated
func callbackQSocketNotifierActivated(ptrName *C.char, socket C.int) {
	qt.GetSignal(C.GoString(ptrName), "activated").(func(int))(int(socket))
}

示例#27
文件: qhelpindexmodel.go 项目: xland/qt

//export callbackQHelpIndexModelIndexCreationStarted
func callbackQHelpIndexModelIndexCreationStarted(ptrName *C.char) {
	qt.GetSignal(C.GoString(ptrName), "indexCreationStarted").(func())()
}

示例#28
文件: qabstractsocket.go 项目: xland/qt

//export callbackQAbstractSocketStateChanged
func callbackQAbstractSocketStateChanged(ptrName *C.char, socketState C.int) {
	qt.GetSignal(C.GoString(ptrName), "stateChanged").(func(QAbstractSocket__SocketState))(QAbstractSocket__SocketState(socketState))
}

示例#29
文件: qabstractsocket.go 项目: xland/qt

//export callbackQAbstractSocketHostFound
func callbackQAbstractSocketHostFound(ptrName *C.char) {
	qt.GetSignal(C.GoString(ptrName), "hostFound").(func())()
}

示例#30
文件: qabstractsocket.go 项目: xland/qt

//export callbackQAbstractSocketDisconnected
func callbackQAbstractSocketDisconnected(ptrName *C.char) {
	qt.GetSignal(C.GoString(ptrName), "disconnected").(func())()
}

展开阅读全文