本文整理汇总了Golang中C.gconstpointer函数的典型用法代码示例。如果您正苦于以下问题:Golang gconstpointer函数的具体用法?Golang gconstpointer怎么用?Golang gconstpointer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gconstpointer函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Find
func (v SList) Find(data unsafe.Pointer) *SList {
return &SList{C.g_slist_find(v.GSList, C.gconstpointer(data))}
}
示例2: Index
func (v SList) Index(data unsafe.Pointer) int {
return int(C.g_slist_index(v.GSList, C.gconstpointer(data)))
}
示例3: RemoveAll
func (v SList) RemoveAll(data unsafe.Pointer) *SList {
return &SList{C.g_slist_remove_all(v.GSList, C.gconstpointer(data))}
}
示例4: Fill
// =================================
// gsize gst_buffer_fill (GstBuffer *buffer, gsize offset, gconstpointer src, gsize size);
func (this *Buffer) Fill(offset uint, src unsafe.Pointer, size uint) int {
return (int)(C.gst_buffer_fill((*C.GstBuffer)(this.GstBuffer), C.gsize(offset), C.gconstpointer(src), C.gsize(size)))
}
示例5: Remove
//GList* g_list_insert_sorted (GList *list,
// gpointer data,
// GCompareFunc func);
func (v GList) Remove(data unsafe.Pointer) *GList {
return &GList{C.g_list_remove(v.GList, C.gconstpointer(data))}
}
示例6: SetBoxedInterface
func (this *Value) SetBoxedInterface(x interface{}) {
Holder.Grab(x)
newboxed := C.malloc(C.size_t(unsafe.Sizeof([2]unsafe.Pointer{})))
C.memcpy(newboxed, unsafe.Pointer(&x), C.size_t(unsafe.Sizeof([2]unsafe.Pointer{})))
C.g_value_take_boxed(this.asC(), C.gconstpointer(newboxed))
}
示例7: SetBoxed
// g_value_take_boxed
func (this *Value) SetBoxed(x unsafe.Pointer) {
C.g_value_take_boxed(this.asC(), C.gconstpointer(x))
}