代码拉取完成,页面将自动刷新
package gdk
// #include <gdk/gdk.h>
import "C"
// TestRenderSync retrieves a pixel from window to force the windowing system to carry out any pending rendering commands.
// This function is intended to be used to synchronize with rendering pipelines, to benchmark windowing system rendering operations.
// This is a wrapper around gdk_test_render_sync().
func TestRenderSync(window *Window) {
C.gdk_test_render_sync(window.native())
}
// TestSimulateButton simulates a single mouse button event (press or release) at the given coordinates relative to the window.
// Hint: a single click of a button requires this method to be called twice, once for pressed and once for released.
// In most cases, gtk.TestWidgetClick() should be used.
//
// button: Mouse button number, starts with 0
// modifiers: Keyboard modifiers for the button event
// buttonPressRelease: either GDK_BUTTON_PRESS or GDK_BUTTON_RELEASE
//
// This is a wrapper around gdk_test_simulate_button().
func TestSimulateButton(window *Window, x, y int, button uint, modifiers ModifierType, buttonPressRelease EventType) bool {
return gobool(C.gdk_test_simulate_button(window.native(), C.gint(x), C.gint(y), C.guint(button), C.GdkModifierType(modifiers), C.GdkEventType(buttonPressRelease)))
}
// TestSimulateButton simulates a keyboard event (press or release) at the given coordinates relative to the window.
// If the coordinates (-1, -1) are used, the window origin is used instead.
// Hint: a single key press requires this method to be called twice, once for pressed and once for released.
// In most cases, gtk.TestWidgetSendKey() should be used.
//
// keyval: A GDK keyboard value (See KeyvalFromName(), UnicodeToKeyval(), ...)
// modifiers: Keyboard modifiers for the key event
// buttonPressRelease: either GDK_BUTTON_PRESS or GDK_BUTTON_RELEASE
//
// This is a wrapper around gdk_test_simulate_key().
func TestSimulateKey(window *Window, x, y int, keyval uint, modifiers ModifierType, buttonPressRelease EventType) bool {
return gobool(C.gdk_test_simulate_key(window.native(), C.gint(x), C.gint(y), C.guint(keyval), C.GdkModifierType(modifiers), C.GdkEventType(buttonPressRelease)))
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。