本文整理匯總了Golang中C.GdkRectangle.y方法的典型用法代碼示例。如果您正苦於以下問題:Golang GdkRectangle.y方法的具體用法?Golang GdkRectangle.y怎麽用?Golang GdkRectangle.y使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類C.GdkRectangle
的用法示例。
在下文中一共展示了GdkRectangle.y方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: ToNative
func (self Rectangle) ToNative() unsafe.Pointer {
var cr C.GdkRectangle
cr.x = C.int(self.X)
cr.y = C.int(self.Y)
cr.width = C.int(self.Width)
cr.height = C.int(self.Height)
return unsafe.Pointer(&cr)
}
示例2: our_area_get_child_position_callback
//export our_area_get_child_position_callback
func our_area_get_child_position_callback(overlay *C.GtkOverlay, widget *C.GtkWidget, rect *C.GdkRectangle, data C.gpointer) C.gboolean {
var nat C.GtkRequisition
a := (*area)(unsafe.Pointer(data))
rect.x = C.int(a.textfieldx)
rect.y = C.int(a.textfieldy)
C.gtk_widget_get_preferred_size(a.textfieldw, nil, &nat)
rect.width = C.int(nat.width)
rect.height = C.int(nat.height)
return C.TRUE
}
示例3: Invalidate
func (v *GdkWindow) Invalidate(rect *Rectangle, invalidate_children bool) {
if rect != nil {
var _rect C.GdkRectangle
_rect.x = C.gint(rect.X)
_rect.y = C.gint(rect.Y)
_rect.width = C.gint(rect.Width)
_rect.height = C.gint(rect.Height)
C.gdk_window_invalidate_rect(v.Window, &_rect, bool2gboolean(invalidate_children))
} else {
C.gdk_window_invalidate_rect(v.Window, nil, bool2gboolean(invalidate_children))
}
}