当前位置: 首页>>代码示例>>Golang>>正文


Golang C.guint32函数代码示例

本文整理汇总了Golang中C.guint32函数的典型用法代码示例。如果您正苦于以下问题:Golang guint32函数的具体用法?Golang guint32怎么用?Golang guint32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了guint32函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: DropFinish

/*
Ends the drag operation after a drop.

This function is called by the drag destination.
*/
func DropFinish(context IsDragContext, success bool, time_ uint32) {
	__cgo__success := C.gboolean(0)
	if success {
		__cgo__success = C.gboolean(1)
	}
	C.gdk_drop_finish(context.GetDragContextPointer(), __cgo__success, C.guint32(time_))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:13,代码来源:gdk_functions.go

示例2: DropReply

/*
Accepts or rejects a drop.

This function is called by the drag destination in response
to a drop initiated by the drag source.
*/
func DropReply(context IsDragContext, accepted bool, time_ uint32) {
	__cgo__accepted := C.gboolean(0)
	if accepted {
		__cgo__accepted = C.gboolean(1)
	}
	C.gdk_drop_reply(context.GetDragContextPointer(), __cgo__accepted, C.guint32(time_))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:14,代码来源:gdk_functions.go

示例3: ToNative

func (self Color) ToNative() unsafe.Pointer {
	var cColor *C.GdkColor = C._new_color()

	cColor.pixel = C.guint32(self.Pixel)
	cColor.red = C.guint16(self.Red)
	cColor.green = C.guint16(self.Green)
	cColor.blue = C.guint16(self.Blue)

	return unsafe.Pointer(cColor)
}
开发者ID:jkeys089,项目名称:go-gtk3,代码行数:10,代码来源:gdk3.go

示例4: Grab

// Grab() is a wrapper around gdk_device_grab().
func (v *Device) Grab(w *Window, ownership GrabOwnership, owner_events bool, event_mask EventMask, cursor *Cursor, time uint32) GrabStatus {
	ret := C.gdk_device_grab(
		v.native(),
		w.native(),
		C.GdkGrabOwnership(ownership),
		gbool(owner_events),
		C.GdkEventMask(event_mask),
		cursor.native(),
		C.guint32(time),
	)
	return GrabStatus(ret)
}
开发者ID:yamnikov-oleg,项目名称:gotk3,代码行数:13,代码来源:gdk.go

示例5: SelectionOwnerSet

/*
Sets the owner of the given selection.
*/
func SelectionOwnerSet(owner IsWindow, selection C.GdkAtom, time_ uint32, send_event bool) (return__ bool) {
	var __cgo__owner *C.GdkWindow
	if owner != nil {
		__cgo__owner = owner.GetWindowPointer()
	}
	__cgo__send_event := C.gboolean(0)
	if send_event {
		__cgo__send_event = C.gboolean(1)
	}
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_selection_owner_set(__cgo__owner, selection, C.guint32(time_), __cgo__send_event)
	return__ = __cgo__return__ == C.gboolean(1)
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:17,代码来源:gdk_functions.go

示例6: NewHTMLFilter

func NewHTMLFilter(flags uint32, colour int32) *aFilter {
	f := C.g_mime_filter_html_new(C.guint32(flags), C.guint32(colour))
	defer unref(C.gpointer(f))
	return castFilter(f)
}
开发者ID:partkyle,项目名称:go-gmime,代码行数:5,代码来源:filter.go

示例7: NewEnrichedFilter

func NewEnrichedFilter(flags int32) *aFilter {
	f := C.g_mime_filter_enriched_new(C.guint32(flags))
	return castFilter(f)
}
开发者ID:partkyle,项目名称:go-gmime,代码行数:4,代码来源:filter.go

示例8: PresentWithTime

// PresentWithTime is a wrapper around gtk_window_present_with_time().
func (v *Window) PresentWithTime(ts uint32) {
	C.gtk_window_present_with_time(v.native(), C.guint32(ts))
}
开发者ID:twstrike,项目名称:gotk3,代码行数:4,代码来源:window.go

示例9: Set

// Set() is a wrapper around g_object_set().  However, unlike
// g_object_set(), this function only sets one name value pair.  Make
// multiple calls to this function to set multiple properties.
func (v *Object) Set(name string, value interface{}) error {
	cstr := C.CString(name)
	defer C.free(unsafe.Pointer(cstr))

	if _, ok := value.(Object); ok {
		value = value.(Object).GObject
	}

	var p unsafe.Pointer = nil
	switch value.(type) {
	case bool:
		c := gbool(value.(bool))
		p = unsafe.Pointer(&c)
	case int8:
		c := C.gint8(value.(int8))
		p = unsafe.Pointer(&c)
	case int16:
		c := C.gint16(value.(int16))
		p = unsafe.Pointer(&c)
	case int32:
		c := C.gint32(value.(int32))
		p = unsafe.Pointer(&c)
	case int64:
		c := C.gint64(value.(int64))
		p = unsafe.Pointer(&c)
	case int:
		c := C.gint(value.(int))
		p = unsafe.Pointer(&c)
	case uint8:
		c := C.guchar(value.(uint8))
		p = unsafe.Pointer(&c)
	case uint16:
		c := C.guint16(value.(uint16))
		p = unsafe.Pointer(&c)
	case uint32:
		c := C.guint32(value.(uint32))
		p = unsafe.Pointer(&c)
	case uint64:
		c := C.guint64(value.(uint64))
		p = unsafe.Pointer(&c)
	case uint:
		c := C.guint(value.(uint))
		p = unsafe.Pointer(&c)
	case uintptr:
		p = unsafe.Pointer(C.gpointer(value.(uintptr)))
	case float32:
		c := C.gfloat(value.(float32))
		p = unsafe.Pointer(&c)
	case float64:
		c := C.gdouble(value.(float64))
		p = unsafe.Pointer(&c)
	case string:
		cstr := C.CString(value.(string))
		defer C.free(unsafe.Pointer(cstr))
		p = unsafe.Pointer(cstr)
	default:
		if pv, ok := value.(unsafe.Pointer); ok {
			p = pv
		} else {
			// Constants with separate types are not type asserted
			// above, so do a runtime check here instead.
			val := reflect.ValueOf(value)
			switch val.Kind() {
			case reflect.Int, reflect.Int8, reflect.Int16,
				reflect.Int32, reflect.Int64:
				c := C.int(val.Int())
				p = unsafe.Pointer(&c)
			case reflect.Uintptr:
				p = unsafe.Pointer(C.gpointer(val.Pointer()))
			}
		}
	}
	// Can't call g_object_set() as it uses a variable arg list, use a
	// wrapper instead
	if p != nil {
		C._g_object_set_one(C.gpointer(v.GObject), (*C.gchar)(cstr), p)
		return nil
	} else {
		return errors.New("Unable to perform type conversion")
	}
}
开发者ID:jrick,项目名称:gotk3,代码行数:84,代码来源:glib.go

示例10: DragDrop

/*
Drops on the current destination.

This function is called by the drag source.
*/
func DragDrop(context IsDragContext, time_ uint32) {
	C.gdk_drag_drop(context.GetDragContextPointer(), C.guint32(time_))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:9,代码来源:gdk_functions.go

示例11: Fill

func (p *Pixbuf) Fill(pixel uint32) {
	C.gdk_pixbuf_fill(p.GPixbuf, C.guint32(pixel))
}
开发者ID:hauke96,项目名称:go-gtk,代码行数:3,代码来源:gdkpixbuf.go

示例12: Fill

/*
Clears a pixbuf to the given RGBA value, converting the RGBA value into
the pixbuf's pixel format. The alpha will be ignored if the pixbuf
doesn't have an alpha channel.
*/
func (self *TraitPixbuf) Fill(pixel uint32) {
	C.gdk_pixbuf_fill(self.CPointer, C.guint32(pixel))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:9,代码来源:gdkpixbuf_traits.go

示例13: SelectionSendNotify

/*
Sends a response to SelectionRequest event.
*/
func SelectionSendNotify(requestor IsWindow, selection C.GdkAtom, target C.GdkAtom, property C.GdkAtom, time_ uint32) {
	C.gdk_selection_send_notify(requestor.GetWindowPointer(), selection, target, property, C.guint32(time_))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:7,代码来源:gdk_functions.go

示例14: UnicodeToKeyval

func UnicodeToKeyval(v rune) uint {
	return uint(C.gdk_unicode_to_keyval(C.guint32(v)))
}
开发者ID:gotk3,项目名称:gotk3,代码行数:3,代码来源:gdk.go

示例15: SelectionSendNotifyForDisplay

/*
Send a response to SelectionRequest event.
*/
func SelectionSendNotifyForDisplay(display IsDisplay, requestor IsWindow, selection C.GdkAtom, target C.GdkAtom, property C.GdkAtom, time_ uint32) {
	C.gdk_selection_send_notify_for_display(display.GetDisplayPointer(), requestor.GetWindowPointer(), selection, target, property, C.guint32(time_))
	return
}
开发者ID:reusee,项目名称:ggir,代码行数:7,代码来源:gdk_functions.go


注:本文中的C.guint32函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。