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}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/telhello1/gotk3.git
git@gitee.com:telhello1/gotk3.git
telhello1
gotk3
gotk3
v0.4.0

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385