1 Star 0 Fork 0

满清末造 / gotk3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gvariantbuilder.go 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
// Same copyright and license as the rest of the files in this project
// GVariant : GVariant — strongly typed value datatype
// https://developer.gnome.org/glib/2.26/glib-GVariant.html
package glib
// #include <glib.h>
// #include <glib-object.h>
// #include "glib.go.h"
// #include "gvariant.go.h"
import "C"
import "unsafe"
/*
* GVariantBuilder
*/
// VariantBuilder is a representation of GLib's VariantBuilder.
type VariantBuilder struct {
GVariantBuilder *C.GVariantBuilder
}
func (v *VariantBuilder) toGVariantBuilder() *C.GVariantBuilder {
if v == nil {
return nil
}
return v.native()
}
func (v *VariantBuilder) toVariantBuilder() *VariantBuilder {
return v
}
// newVariantBuilder creates a new VariantBuilder from a GVariantBuilder pointer.
func newVariantBuilder(p *C.GVariantBuilder) *VariantBuilder {
return &VariantBuilder{GVariantBuilder: p}
}
// native returns a pointer to the underlying GVariantBuilder.
func (v *VariantBuilder) native() *C.GVariantBuilder {
if v == nil || v.GVariantBuilder == nil {
return nil
}
p := unsafe.Pointer(v.GVariantBuilder)
return C.toGVariantBuilder(p)
}
// Native returns a pointer to the underlying GVariantBuilder.
func (v *VariantBuilder) Native() uintptr {
return uintptr(unsafe.Pointer(v.native()))
}
1
https://gitee.com/antkillerfarm/gotk3.git
git@gitee.com:antkillerfarm/gotk3.git
antkillerfarm
gotk3
gotk3
v0.4.0

搜索帮助

53164aa7 5694891 3bd8fe86 5694891