本文整理汇总了Golang中github.com/andre-hub/gotk3/glib.ToGObject函数的典型用法代码示例。如果您正苦于以下问题:Golang ToGObject函数的具体用法?Golang ToGObject怎么用?Golang ToGObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ToGObject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: GetStack
// GetStack is a wrapper around gtk_stack_switcher_get_stack().
func (v *StackSwitcher) GetStack() *Stack {
c := C.gtk_stack_switcher_get_stack(v.native())
if c == nil {
return nil
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
s := wrapStack(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return s
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例2: ColorButtonNew
// ColorButtonNew is a wrapper around gtk_color_button_new().
func ColorButtonNew() (*ColorButton, error) {
c := C.gtk_color_button_new()
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
tb := wrapColorButton(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return tb, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:sqp_gtk.go
示例3: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例4: 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}
obj.Ref()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return p, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例5: GetImage
// GetImage is a wrapper around gtk_message_dialog_get_image().
func (v *MessageDialog) GetImage() (*Widget, error) {
c := C.gtk_message_dialog_get_image(v.native())
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
w := wrapWidget(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return w, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_6-10.go
示例6: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例7: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例8: GetDefaultGroup
// GetDefaultGroup() is a wrapper around gdk_display_get_default_group().
func (v *Display) GetDefaultGroup() (*Window, error) {
c := C.gdk_display_get_default_group(v.native())
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
w := &Window{obj}
obj.Ref()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return w, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例9: GetDefaultScreen
// GetDefaultScreen() is a wrapper around gdk_display_get_default_screen().
func (v *Display) GetDefaultScreen() (*Screen, error) {
c := C.gdk_display_get_default_screen(v.native())
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
s := &Screen{obj}
obj.Ref()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return s, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例10: 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:LittleBuster,项目名称:gotk3,代码行数:11,代码来源:gtk_3_10-12.go
示例11: ColorButtonNewWithRGBA
// ColorButtonNewWithRGBA is a wrapper around gtk_color_button_new_with_rgba().
func ColorButtonNewWithRGBA(gdkColor *gdk.RGBA) (*ColorButton, error) {
c := C.gtk_color_button_new_with_rgba((*C.GdkRGBA)(unsafe.Pointer((&gdkColor.RGBA))))
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
tb := wrapColorButton(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return tb, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:sqp_gtk.go
示例12: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例13: GetRowAtY
// GetRowAtY is a wrapper around gtk_list_box_get_row_at_y().
func (v *ListBox) GetRowAtY(y int) *ListBoxRow {
c := C.gtk_list_box_get_row_at_y(v.native(), C.gint(y))
if c == nil {
return nil
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
l := wrapListBoxRow(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return l
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例14: GetCustomTitle
// GetCustomTitle is a wrapper around gtk_header_bar_get_custom_title().
func (v *HeaderBar) GetCustomTitle() (*Widget, error) {
c := C.gtk_header_bar_get_custom_title(v.native())
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
w := wrapWidget(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return w, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例15: GetSelectedRow
// GetSelectedRow is a wrapper around gtk_list_box_get_selected_row().
func (v *ListBox) GetSelectedRow() *ListBoxRow {
c := C.gtk_list_box_get_selected_row(v.native())
if c == nil {
return nil
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
l := wrapListBoxRow(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return l
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例16: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gdk.go
示例17: HeaderBarNew
// HeaderBarNew is a wrapper around gtk_header_bar_new().
func HeaderBarNew() (*HeaderBar, error) {
c := C.gtk_header_bar_new()
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
h := wrapHeaderBar(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return h, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例18: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例19: SearchBarNew
// SearchBarNew is a wrapper around gtk_search_bar_new()
func SearchBarNew() (*SearchBar, error) {
c := C.gtk_search_bar_new()
if c == nil {
return nil, nilPtrErr
}
obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
s := wrapSearchBar(obj)
obj.RefSink()
runtime.SetFinalizer(obj, (*glib.Object).Unref)
return s, nil
}
开发者ID:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
示例20: 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:LittleBuster,项目名称:gotk3,代码行数:12,代码来源:gtk_3_10-12.go
注:本文中的github.com/andre-hub/gotk3/glib.ToGObject函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论