• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Golang glib.ToGObject函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/conformal/gotk3/glib.ToGObject函数的典型用法代码示例。如果您正苦于以下问题:Golang ToGObject函数的具体用法?Golang ToGObject怎么用?Golang ToGObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ToGObject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: BackForwardList

// BackForwardList is a wrapper around webkit_web_view_get_back_forward_list().
func (w *WebView) BackForwardList() *BackForwardList {
	c := C.webkit_web_view_get_back_forward_list(w.native())
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapBackForwardList(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:8,代码来源:webkit2.go


示例2: Flip

// Flip is a wrapper around gdk_pixbuf_flip().
func (v *Pixbuf) Flip(horizontal bool) (*Pixbuf, error) {
	c := C.gdk_pixbuf_flip(v.Native(), gbool(horizontal))
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
开发者ID:jrick,项目名称:gotk3,代码行数:11,代码来源:gdkpixbuf.go


示例3: ScaleSimple

// ScaleSimple is a wrapper around gdk_pixbuf_scale_simple().
func (v *Pixbuf) ScaleSimple(width, height int, interp InterpType) (*Pixbuf, error) {
	c := C.gdk_pixbuf_scale_simple(v.Native(), C.int(width), C.int(height), C.GdkInterpType(interp))
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
开发者ID:jrick,项目名称:gotk3,代码行数:11,代码来源:gdkpixbuf.go


示例4: Context

// Context is a wrapper around webkit_web_view_get_context().
func (w *WebView) Context() *WebContext {
	c := C.webkit_web_view_get_context(w.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapWebContext(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例5: RotateSimple

// RotateSimple is a wrapper around gdk_pixbuf_rotate_simple().
func (v *Pixbuf) RotateSimple(angle PixbufRotation) (*Pixbuf, error) {
	c := C.gdk_pixbuf_rotate_simple(v.Native(), C.GdkPixbufRotation(angle))
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
开发者ID:jrick,项目名称:gotk3,代码行数:11,代码来源:gdkpixbuf.go


示例6: SecurityManager

// SecurityManager is a wrapper around webkit_web_context_get_security_manager().
func (w *WebContext) SecurityManager() *SecurityManager {
	c := C.webkit_web_context_get_security_manager(w.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapSecurityManager(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例7: NewWebViewWithGroup

// NewWebViewWithGroup is a wrapper around webkit_web_view_new_with_group().
func NewWebViewWithGroup(group *WebViewGroup) *WebView {
	c := C.webkit_web_view_new_with_group(group.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapWebView(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例8: FaviconDatabase

// FaviconDatabase is a wrapper around webkit_web_context_get_favicon_database().
func (w *WebContext) FaviconDatabase() *FaviconDatabase {
	c := C.webkit_web_context_get_favicon_database(w.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapFaviconDatabase(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例9: DefaultWebContext

// DefaultWebContext is a wrapper around webkit_web_context_get_default().
func DefaultWebContext() *WebContext {
	c := C.webkit_web_context_get_default()
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapWebContext(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例10: NthItem

// NthItem is a wrapper around webkit_back_forward_list_get_nth_item().
func (l *BackForwardList) NthItem(n int) *BackForwardListItem {
	c := C.webkit_back_forward_list_get_nth_item(l.native(), C.gint(n))
	if c == nil {
		return nil
	}
	obj := &glib.Object{GObject: glib.ToGObject(unsafe.Pointer(c))}
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return wrapBackForwardListItem(obj)
}
开发者ID:jrick,项目名称:go-webkit2,代码行数:11,代码来源:webkit2.go


示例11: GetHeader

// GetHeader is a wrapper around gtk_list_box_row_get_header().
func (v *ListBoxRow) GetHeader() *Widget {
	c := C.gtk_list_box_row_get_header(v.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	w := wrapWidget(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return w
}
开发者ID:vvanpo,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10.go


示例12: ListBoxRowNew

func ListBoxRowNew() (*ListBoxRow, error) {
	c := C.gtk_list_box_row_new()
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	w := wrapListBoxRow(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return w, nil
}
开发者ID:vvanpo,项目名称:gotk3,代码行数:11,代码来源:gtk_3_10.go


示例13: GetDeviceManager

// GetDeviceManager() is a wrapper around gdk_display_get_device_manager().
func (v *Display) GetDeviceManager() (*DeviceManager, error) {
	c := C.gdk_display_get_device_manager(v.Native())
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	d := &DeviceManager{obj}
	obj.Ref()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return d, nil
}
开发者ID:jrick,项目名称:gotk3,代码行数:12,代码来源:gdk.go


示例14: DisplayGetDefault

// DisplayGetDefault() is a wrapper around gdk_display_get_default().
func DisplayGetDefault() (*Display, error) {
	c := C.gdk_display_get_default()
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	d := &Display{obj}
	obj.Ref()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return d, nil
}
开发者ID:jrick,项目名称:gotk3,代码行数:12,代码来源:gdk.go


示例15: GetSystemVisual

// GetSystemVisual is a wrapper around gdk_screen_get_system_visual().
func (v *Screen) GetSystemVisual() (*Visual, error) {
	c := C.gdk_screen_get_system_visual(v.native())
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	visual := &Visual{obj}
	obj.Ref()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return visual, nil
}
开发者ID:alimy,项目名称:gotk3,代码行数:12,代码来源:gdk.go


示例16: StackSwitcherNew

// StackSwitcherNew is a wrapper around gtk_stack_switcher_new().
func StackSwitcherNew() (*StackSwitcher, error) {
	c := C.gtk_stack_switcher_new()
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	s := wrapStackSwitcher(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return s, nil
}
开发者ID:vvanpo,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10.go


示例17: RevealerNew

// RevealerNew is a wrapper around gtk_revealer_new()
func RevealerNew() (*Revealer, error) {
	c := C.gtk_revealer_new()
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	r := wrapRevealer(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return r, nil
}
开发者ID:vvanpo,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10.go


示例18: PlugNew

// PlugNew is a wrapper around gtk_plug_new().
func PlugNew(socketId WindowId) (*Plug, error) {
	c := C.gtk_plug_new(C.Window(socketId))
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := wrapPlug(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
开发者ID:runjak,项目名称:gotk3,代码行数:12,代码来源:gtkx.go


示例19: GetVisibleChild

// GetVisibleChild is a wrapper around gtk_stack_get_visible_child().
func (v *Stack) GetVisibleChild() *Widget {
	c := C.gtk_stack_get_visible_child(v.native())
	if c == nil {
		return nil
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	s := wrapWidget(obj)
	obj.RefSink()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return s
}
开发者ID:vvanpo,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10.go


示例20: GetPlugWindow

// GetPlugWindow is a wrapper around gtk_socket_get_plug_window().
func (v *Socket) GetPlugWindow() (*gdk.Window, error) {
	c := C.gtk_socket_get_plug_window(v.Native())
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	w := &gdk.Window{obj}
	w.Ref()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return w, nil
}
开发者ID:runjak,项目名称:gotk3,代码行数:12,代码来源:gtkx.go



注:本文中的github.com/conformal/gotk3/glib.ToGObject函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang gtk.GridNew函数代码示例发布时间:2022-05-23
下一篇:
Golang glib.IdleAdd函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap