1 Star 0 Fork 0

满清末造 / gotk3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gicon.go 694 Bytes
一键复制 编辑 原始数据 按行查看 历史
ioncloud64 提交于 2020-01-03 03:24 . Added support for GIcon
package glib
// #include <gio/gio.h>
// #include <glib.h>
// #include <glib-object.h>
// #include "glib.go.h"
import "C"
import "unsafe"
type FileIcon struct {
*Object
}
// native() returns a pointer to the underlying GFileIcon.
func (v *FileIcon) Native() *C.GFileIcon {
if v == nil || v.GObject == nil {
return nil
}
return C.toGFileIcon(unsafe.Pointer(v.GObject))
}
// FileIconNew is a wrapper around g_file_icon_new().
func FileIconNew(path string) *FileIcon {
file := FileNew(path)
c := C.g_file_icon_new(file.Native())
if c == nil {
return nil
}
return wrapFileIcon(wrapObject(unsafe.Pointer(c)))
}
func wrapFileIcon(obj *Object) *FileIcon {
return &FileIcon{obj}
}
1
https://gitee.com/antkillerfarm/gotk3.git
git@gitee.com:antkillerfarm/gotk3.git
antkillerfarm
gotk3
gotk3
v0.4.0

搜索帮助