Пример #1
0
func nativeFromRectangle(r interface{}) *gobject.GValue {
	if rec, ok := r.(Rectangle); ok {
		gv := gobject.CreateCGValue(GdkType.RECTANGLE, rec.ToNative())
		return gv
	}
	return nil
}
Пример #2
0
func nativeFromEntry(e interface{}) *gobject.GValue {
	if entry, ok := e.(Entry); ok {
		gv := gobject.CreateCGValue(GtkType.ENTRY, entry.ToNative())
		return gv
	}
	return nil
}
Пример #3
0
func nativeFromDevice(d interface{}) *gobject.GValue {
	if device, ok := d.(*Device); ok {
		gv := gobject.CreateCGValue(GdkType.DEVICE, device.ToNative())
		return gv
	}
	return nil
}
Пример #4
0
func nativeFromScreen(s interface{}) *gobject.GValue {
	if screen, ok := s.(*Screen); ok {
		gv := gobject.CreateCGValue(GdkType.SCREEN, screen.ToNative())
		return gv
	}
	return nil
}
Пример #5
0
func nativeFromDisplay(d interface{}) *gobject.GValue {
	if display, ok := d.(*Display); ok {
		gv := gobject.CreateCGValue(GdkType.DISPLAY, display.ToNative())
		return gv
	}
	return nil
}
Пример #6
0
func nativeFromColor(c interface{}) *gobject.GValue {
	if col, ok := c.(Color); ok {
		gv := gobject.CreateCGValue(GdkType.COLOR, col.ToNative())
		return gv
	}
	return nil
}
Пример #7
0
func nativeFromRGBA(rgba interface{}) *gobject.GValue {
	if r, ok := rgba.(RGBA); ok {
		gv := gobject.CreateCGValue(GdkType.RGBA, r.ToNative())
		return gv
	}
	return nil
}
Пример #8
0
func nativeFromContext(pc interface{}) *gobject.GValue {
	if c, ok := pc.(*Context); ok {
		gv := gobject.CreateCGValue(PangoTypes.CONTEXT, c.ToNative())
		return gv
	}
	return nil
}
Пример #9
0
func nativeFromWindow(w interface{}) *gobject.GValue {
	if window, ok := w.(*Window); ok {
		gv := gobject.CreateCGValue(GdkType.WINDOW, window.ToNative())
		return gv
	}
	return nil
}
Пример #10
0
func nativeFromButton(b interface{}) *gobject.GValue {
	if but, ok := b.(Button); ok {
		gv := gobject.CreateCGValue(GtkType.BUTTON, but.ToNative())
		return gv
	}
	return nil
}
Пример #11
0
func nativeFromLayout(layout interface{}) *gobject.GValue {
	if l, ok := layout.(*Layout); ok {
		gv := gobject.CreateCGValue(PangoTypes.LAYOUT, l.ToNative())
		return gv
	}
	return nil
}
Пример #12
0
func nativeFromFontFace(ff interface{}) *gobject.GValue {
	if f, ok := ff.(*FontFace); ok {
		gv := gobject.CreateCGValue(PangoTypes.FONT_FACE, f.ToNative())
		return gv
	}
	return nil
}
Пример #13
0
func nativeFromFontDescription(fd interface{}) *gobject.GValue {
	if f, ok := fd.(*FontDescription); ok {
		gv := gobject.CreateCGValue(PangoTypes.FONT_DESCRIPTION, f.ToNative())
		return gv
	}
	return nil
}
Пример #14
0
func nativeFromFontset(fs interface{}) *gobject.GValue {
	if f, ok := fs.(*Fontset); ok {
		gv := gobject.CreateCGValue(PangoTypes.FONTSET, f.ToNative())
		return gv
	}
	return nil
}
Пример #15
0
func nativeFromFontMap(fm interface{}) *gobject.GValue {
	if f, ok := fm.(*FontMap); ok {
		gv := gobject.CreateCGValue(PangoTypes.FONT_MAP, f.ToNative())
		return gv
	}
	return nil
}
Пример #16
0
func nativeFromWindow(w interface{}) *gobject.GValue {
	win, ok := w.(Window)
	if ok {
		gv := gobject.CreateCGValue(GtkType.WINDOW, win.ToNative())
		return gv
	}
	return nil
}
Пример #17
0
func nativeFromLabel(label interface{}) *gobject.GValue {
	l, ok := label.(Label)
	if ok {
		gv := gobject.CreateCGValue(GtkType.LABEL, l.ToNative())
		return gv
	}

	return nil
}
Пример #18
0
func nativeFromBox(b interface{}) *gobject.GValue {
	box, ok := b.(Box)
	if ok {
		gv := gobject.CreateCGValue(GtkType.BOX, box.ToNative())
		return gv
	}

	return nil
}
Пример #19
0
func nativeFromFrame(frame interface{}) *gobject.GValue {
	f, ok := frame.(Frame)
	if ok {
		gv := gobject.CreateCGValue(GtkType.FRAME, f.ToNative())
		return gv
	}

	return nil
}
Пример #20
0
// Convert from Go to Native
func nativeFromApp(app interface{}) *gobject.GValue {
	argapp := app.(gobject.ObjectLike)
	gv := gobject.CreateCGValue(GtkType.APPLICATION, argapp.ToNative())
	return gv
}