Exemple #1
0
// GetIconStock is a wrapper around gtk_entry_get_icon_stock().
func (v *Entry) GetIconStock(iconPos EntryIconPosition) (string, error) {
	c := C.gtk_entry_get_icon_stock(v.Native(),
		C.GtkEntryIconPosition(iconPos))
	if c == nil {
		return "", nilPtrErr
	}
	return C.GoString((*C.char)(c)), nil
}
Exemple #2
0
// SetIconFromStock is a wrapper around gtk_entry_set_icon_from_stock().
func (v *Entry) SetIconFromStock(iconPos EntryIconPosition, stockID string) {
	cstr := C.CString(stockID)
	defer C.free(unsafe.Pointer(cstr))
	C.gtk_entry_set_icon_from_stock(v.Native(),
		C.GtkEntryIconPosition(iconPos), (*C.gchar)(cstr))
}
Exemple #3
0
	DIR_TAB_BACKWARD = C.GtkDirectionType(C.GTK_DIR_TAB_BACKWARD)
	DIR_UP           = C.GtkDirectionType(C.GTK_DIR_UP)
	DIR_DOWN         = C.GtkDirectionType(C.GTK_DIR_DOWN)
	DIR_LEFT         = C.GtkDirectionType(C.GTK_DIR_LEFT)
	DIR_RIGHT        = C.GtkDirectionType(C.GTK_DIR_RIGHT)

	// DragResult
	DRAG_RESULT_SUCCESS         = C.GtkDragResult(C.GTK_DRAG_RESULT_SUCCESS)
	DRAG_RESULT_NO_TARGET       = C.GtkDragResult(C.GTK_DRAG_RESULT_NO_TARGET)
	DRAG_RESULT_USER_CANCELLED  = C.GtkDragResult(C.GTK_DRAG_RESULT_USER_CANCELLED)
	DRAG_RESULT_TIMEOUT_EXPIRED = C.GtkDragResult(C.GTK_DRAG_RESULT_TIMEOUT_EXPIRED)
	DRAG_RESULT_GRAB_BROKEN     = C.GtkDragResult(C.GTK_DRAG_RESULT_GRAB_BROKEN)
	DRAG_RESULT_ERROR           = C.GtkDragResult(C.GTK_DRAG_RESULT_ERROR)

	// EntryIconPosition
	ENTRY_ICON_PRIMARY   = C.GtkEntryIconPosition(C.GTK_ENTRY_ICON_PRIMARY)
	ENTRY_ICON_SECONDARY = C.GtkEntryIconPosition(C.GTK_ENTRY_ICON_SECONDARY)

	// EventSequenceState
	EVENT_SEQUENCE_NONE    = C.GtkEventSequenceState(C.GTK_EVENT_SEQUENCE_NONE)
	EVENT_SEQUENCE_CLAIMED = C.GtkEventSequenceState(C.GTK_EVENT_SEQUENCE_CLAIMED)
	EVENT_SEQUENCE_DENIED  = C.GtkEventSequenceState(C.GTK_EVENT_SEQUENCE_DENIED)

	// ExpanderStyle
	EXPANDER_COLLAPSED      = C.GtkExpanderStyle(C.GTK_EXPANDER_COLLAPSED)
	EXPANDER_SEMI_COLLAPSED = C.GtkExpanderStyle(C.GTK_EXPANDER_SEMI_COLLAPSED)
	EXPANDER_SEMI_EXPANDED  = C.GtkExpanderStyle(C.GTK_EXPANDER_SEMI_EXPANDED)
	EXPANDER_EXPANDED       = C.GtkExpanderStyle(C.GTK_EXPANDER_EXPANDED)

	// FileChooserAction
	FILE_CHOOSER_ACTION_OPEN          = C.GtkFileChooserAction(C.GTK_FILE_CHOOSER_ACTION_OPEN)