Ejemplo n.º 1
0
// WindowNew is a wrapper around gtk_window_new().
func WindowNew(t WindowType) (*Window, error) {
	c := C.gtk_window_new(C.GtkWindowType(t))
	if c == nil {
		return nil, nilPtrErr
	}
	return wrapWindow(wrapObject(unsafe.Pointer(c))), nil
}
Ejemplo n.º 2
0
func NewWindow(tp WindowType) *Window {
	ret := C.gtk_window_new(C.GtkWindowType(tp))
	if ret == nil {
		return nil
	}
	return ToWindow(unsafe.Pointer(ret))
}
Ejemplo n.º 3
0
// Create new window
func NewWindow(wtype GtkWindowType, properties map[string]interface{}) (w *Window) {
	w = &Window{}

	o := C.gtk_window_new(C.GtkWindowType(wtype))

	w.Container = NewContainer(unsafe.Pointer(o))

	w.object = C.to_GtkWindow(unsafe.Pointer(o))
	return w
}
Ejemplo n.º 4
0
func Window(t GtkWindowType) *GtkWindow {
	return &GtkWindow{GtkWidget{
		C.gtk_window_new(C.GtkWindowType(t))}}
}
Ejemplo n.º 5
0
	TREE_VIEW_GRID_LINES_VERTICAL   = C.GtkTreeViewGridLines(C.GTK_TREE_VIEW_GRID_LINES_VERTICAL)
	TREE_VIEW_GRID_LINES_BOTH       = C.GtkTreeViewGridLines(C.GTK_TREE_VIEW_GRID_LINES_BOTH)

	// Unit
	UNIT_NONE   = C.GtkUnit(C.GTK_UNIT_NONE)
	UNIT_POINTS = C.GtkUnit(C.GTK_UNIT_POINTS)
	UNIT_INCH   = C.GtkUnit(C.GTK_UNIT_INCH)
	UNIT_MM     = C.GtkUnit(C.GTK_UNIT_MM)

	// WidgetHelpType
	WIDGET_HELP_TOOLTIP    = C.GtkWidgetHelpType(C.GTK_WIDGET_HELP_TOOLTIP)
	WIDGET_HELP_WHATS_THIS = C.GtkWidgetHelpType(C.GTK_WIDGET_HELP_WHATS_THIS)

	// WindowPosition
	WIN_POS_NONE             = C.GtkWindowPosition(C.GTK_WIN_POS_NONE)
	WIN_POS_CENTER           = C.GtkWindowPosition(C.GTK_WIN_POS_CENTER)
	WIN_POS_MOUSE            = C.GtkWindowPosition(C.GTK_WIN_POS_MOUSE)
	WIN_POS_CENTER_ALWAYS    = C.GtkWindowPosition(C.GTK_WIN_POS_CENTER_ALWAYS)
	WIN_POS_CENTER_ON_PARENT = C.GtkWindowPosition(C.GTK_WIN_POS_CENTER_ON_PARENT)

	// WindowType
	WINDOW_TOPLEVEL = C.GtkWindowType(C.GTK_WINDOW_TOPLEVEL)
	WINDOW_POPUP    = C.GtkWindowType(C.GTK_WINDOW_POPUP)

	// WrapMode
	WRAP_NONE      = C.GtkWrapMode(C.GTK_WRAP_NONE)
	WRAP_CHAR      = C.GtkWrapMode(C.GTK_WRAP_CHAR)
	WRAP_WORD      = C.GtkWrapMode(C.GTK_WRAP_WORD)
	WRAP_WORD_CHAR = C.GtkWrapMode(C.GTK_WRAP_WORD_CHAR)
)
Ejemplo n.º 6
0
Archivo: window.go Proyecto: ziutek/gtk
// Returns C pointer
func NewWindow(t WindowType) *Window {
	w := new(Window)
	w.SetPtr(glib.Pointer(C.gtk_window_new(C.GtkWindowType(t))))
	return w
}