1 Star 0 Fork 0

满清末造 / gotk3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gvariantdict.go 1.17 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"
/*
* GVariantDict
*/
// VariantDict is a representation of GLib's VariantDict.
type VariantDict struct {
GVariantDict *C.GVariantDict
}
func (v *VariantDict) toGVariantDict() *C.GVariantDict {
if v == nil {
return nil
}
return v.native()
}
func (v *VariantDict) toVariantDict() *VariantDict {
return v
}
// newVariantDict creates a new VariantDict from a GVariantDict pointer.
func newVariantDict(p *C.GVariantDict) *VariantDict {
return &VariantDict{GVariantDict: p}
}
// native returns a pointer to the underlying GVariantDict.
func (v *VariantDict) native() *C.GVariantDict {
if v == nil || v.GVariantDict == nil {
return nil
}
p := unsafe.Pointer(v.GVariantDict)
return C.toGVariantDict(p)
}
// Native returns a pointer to the underlying GVariantDict.
func (v *VariantDict) 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

搜索帮助