Пример #1
0
func (self *Box) QueryChildPacking(w WidgetLike) (expand bool, fill bool, padding uint, ptype GtkPackType) {
	var e C.gboolean
	var f C.gboolean
	var p C.guint
	var t C.GtkPackType
	C.gtk_box_query_child_packing(self.object, w.W().object, &e, &f, &p, &t)

	return gobject.GoBool(unsafe.Pointer(&e)), gobject.GoBool(unsafe.Pointer(&f)), uint(p), GtkPackType(t)
}
Пример #2
0
// Conversion function
func newEventFromNative(obj unsafe.Pointer) interface{} {
	// Cast to EventAny to extract type and send var
	var window *Window = nil
	ceventAny := (*C.GdkEventAny)(obj)
	t := int(ceventAny._type)
	if win, err := gobject.ConvertToGo(unsafe.Pointer(ceventAny.window)); err == nil {
		window = win.(*Window)
	}
	se := ceventAny.send_event
	send := gobject.GoBool(unsafe.Pointer(&se))

	// Create new EventAny Struct
	eventAny := EventAny{t, window, send}

	// test specific events
	switch t {
	case GdkEventType.KEY_PRESS, GdkEventType.KEY_RELEASE:
		ek := createEventKey(obj)
		ek.EventAny = eventAny
		return ek
	case GdkEventType.BUTTON_PRESS, GdkEventType.BUTTON_PRESS_2, GdkEventType.BUTTON_PRESS_3,
		GdkEventType.BUTTON_RELEASE:
		eb := createEventButton(obj)
		eb.EventAny = eventAny
		return eb
	}
	return eventAny
}
Пример #3
0
func (self *Label) GetSelectionBounds() (bool, int, int) {
	var start C.gint
	var end C.gint
	b := C.gtk_label_get_selection_bounds(self.object, &start, &end)
	isSel := gobject.GoBool(unsafe.Pointer(&b))

	return isSel, int(start), int(end)
}
Пример #4
0
func (self *FontDescription) BetterMatch(oldMatch, newMatch *FontDescription) bool {
	var fDesc *C.PangoFontDescription = nil

	if oldMatch != nil {
		fDesc = oldMatch.object
	}

	b := C.pango_font_description_better_match(self.object, fDesc, newMatch.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #5
0
func (self Rectangle) Intersect(r2 Rectangle) (bool, Rectangle) {
	var cr3 C.GdkRectangle
	cr1 := nativeFromRectangle(self)
	defer cr1.Free()
	cr2 := nativeFromRectangle(r2)
	defer cr2.Free()
	b := C.gdk_rectangle_intersect((*C.GdkRectangle)(cr1.GetPtr()), (*C.GdkRectangle)(cr2.GetPtr()), &cr3)
	rec := newRectangleFromNative(unsafe.Pointer(&cr3)).(Rectangle)

	return gobject.GoBool(unsafe.Pointer(&b)), rec
}
Пример #6
0
// Conversion function
func newEventFromNative(obj unsafe.Pointer) interface{} {
	// Cast to EventAny to extract type and send var
	ceventAny := (*C.GdkEventAny)(obj)
	t := GdkEventType(ceventAny._type)
	se := ceventAny.send_event
	send := gobject.GoBool(unsafe.Pointer(&se))

	// Create new EventAny Struct
	eventAny := EventAny{t, send}

	// test specific events
	switch t {
	case EventType.KEY_PRESS, EventType.KEY_RELEASE:
		ek := createEventKey(obj)
		ek.EventAny = eventAny
		return ek
	case EventType.BUTTON_PRESS, EventType.BUTTON_PRESS_2, EventType.BUTTON_PRESS_3,
		EventType.BUTTON_RELEASE:
		eb := createEventButton(obj)
		eb.EventAny = eventAny
		return eb
	}
	return eventAny
}
Пример #7
0
func (self *Label) GetUseUnderline() bool {
	b := C.gtk_label_get_use_underline(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #8
0
func (self *Label) GetUseMarkup() bool {
	b := C.gtk_label_get_use_markup(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #9
0
func (self *Window) GetSkipPagerHint() bool {
	b := gobject.GetProperty(self, "skip-pager-hint")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #10
0
func (self *Window) GetFocusOnMap() bool {
	b := gobject.GetProperty(self, "focus-on-map")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #11
0
func (self *Button) GetUseUnderline() bool {
	b := C.gtk_button_get_use_underline(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #12
0
func (self *Widget) IsFocus() bool {
	b := C.gtk_widget_is_focus(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #13
0
func (self *Widget) InDestruction() bool {
	b := C.gtk_widget_in_destruction(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #14
0
func (self *Window) GetUrgencyHint() bool {
	b := gobject.GetProperty(self, "urgency-hint")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #15
0
func (self *Window) GetModal() bool {
	b := gobject.GetProperty(self, "modal")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #16
0
func (self *Window) GetDeletable() bool {
	b := gobject.GetProperty(self, "deletable")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #17
0
func (self *Window) GetDecorated() bool {
	b := gobject.GetProperty(self, "decorated")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #18
0
func (self *Window) GetMnemonicsVisible() bool {
	b := gobject.GetProperty(self, "mnemonics-visible")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #19
0
func (self *Window) GetDestroyWithParent() bool {
	b := gobject.GetProperty(self, "destroy-with-parent")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #20
0
func (self *Label) GetSingleLineMode() bool {
	b := C.gtk_label_get_single_line_mode(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #21
0
func (self *Label) GetTrackVisitedLinks() bool {
	b := C.gtk_label_get_track_visited_links(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #22
0
func (self *FontDescription) GetSizeIsAbsolute() bool {
	b := C.pango_font_description_get_size_is_absolute(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #23
0
func (self *Widget) Activate() bool {
	b := C.gtk_widget_activate(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #24
0
func (self *Box) GetHomogeneous() bool {
	h := gobject.GetProperty(self, "homogeneous")
	defer h.Free()
	return gobject.GoBool(h.GetPtr())
}
Пример #25
0
func (self *Button) GetUseStock() bool {
	b := C.gtk_button_get_use_stock(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #26
0
func (self *Label) GetLineWrap() bool {
	lw := C.gtk_label_get_line_wrap(self.object)
	return gobject.GoBool(unsafe.Pointer(&lw))
}
Пример #27
0
func (self *Button) GetFocusOnClick() bool {
	b := C.gtk_button_get_focus_on_click(self.object)
	return gobject.GoBool(unsafe.Pointer(&b))
}
Пример #28
0
func (self *Window) GetAcceptFocus() bool {
	b := gobject.GetProperty(self, "accept-focus")
	defer b.Free()
	return gobject.GoBool(b.GetPtr())
}
Пример #29
0
func (self *Label) GetSelectable() bool {
	sel := C.gtk_label_get_selectable(self.object)
	return gobject.GoBool(unsafe.Pointer(&sel))
}
Пример #30
0
func GSourceRemove(tag uint) bool {
	b := C.g_source_remove(C.guint(tag))
	return gobject.GoBool(unsafe.Pointer(&b))
}