Example #1
0
func (w *Window) msgBoxError(primarytext string, secondarytext string) (done chan struct{}) {
	done = make(chan struct{})
	go func() {
		<-_msgBox(w, primarytext, secondarytext, C.GtkMessageType(C.GTK_MESSAGE_ERROR), C.GtkButtonsType(C.GTK_BUTTONS_OK))
		done <- struct{}{}
	}()
	return done
}
Example #2
0
	LICENSE_BSD           = C.GtkLicense(C.GTK_LICENSE_BSD)
	LICENSE_MIT_X11       = C.GtkLicense(C.GTK_LICENSE_MIT_X11)
	LICENSE_ARTISTIC      = C.GtkLicense(C.GTK_LICENSE_ARTISTIC)
	LICENSE_GPL_2_0_ONLY  = C.GtkLicense(C.GTK_LICENSE_GPL_2_0_ONLY)
	LICENSE_GPL_3_0_ONLY  = C.GtkLicense(C.GTK_LICENSE_GPL_3_0_ONLY)
	LICENSE_LGPL_2_1_ONLY = C.GtkLicense(C.GTK_LICENSE_LGPL_2_1_ONLY)
	LICENSE_LGPL_3_0_ONLY = C.GtkLicense(C.GTK_LICENSE_LGPL_3_0_ONLY)

	// MenuDirectionType
	MENU_DIR_PARENT = C.GtkMenuDirectionType(C.GTK_MENU_DIR_PARENT)
	MENU_DIR_CHILD  = C.GtkMenuDirectionType(C.GTK_MENU_DIR_CHILD)
	MENU_DIR_NEXT   = C.GtkMenuDirectionType(C.GTK_MENU_DIR_NEXT)
	MENU_DIR_PREV   = C.GtkMenuDirectionType(C.GTK_MENU_DIR_PREV)

	// MessageType
	MESSAGE_INFO     = C.GtkMessageType(C.GTK_MESSAGE_INFO)
	MESSAGE_WARNING  = C.GtkMessageType(C.GTK_MESSAGE_WARNING)
	MESSAGE_QUESTION = C.GtkMessageType(C.GTK_MESSAGE_QUESTION)
	MESSAGE_ERROR    = C.GtkMessageType(C.GTK_MESSAGE_ERROR)
	MESSAGE_OTHER    = C.GtkMessageType(C.GTK_MESSAGE_OTHER)

	// MovementStep
	MOVEMENT_LOGICAL_POSITIONS = C.GtkMovementStep(C.GTK_MOVEMENT_LOGICAL_POSITIONS)
	MOVEMENT_VISUAL_POSITIONS  = C.GtkMovementStep(C.GTK_MOVEMENT_VISUAL_POSITIONS)
	MOVEMENT_WORDS             = C.GtkMovementStep(C.GTK_MOVEMENT_WORDS)
	MOVEMENT_DISPLAY_LINES     = C.GtkMovementStep(C.GTK_MOVEMENT_DISPLAY_LINES)
	MOVEMENT_DISPLAY_LINE_ENDS = C.GtkMovementStep(C.GTK_MOVEMENT_DISPLAY_LINE_ENDS)
	MOVEMENT_PARAGRAPHS        = C.GtkMovementStep(C.GTK_MOVEMENT_PARAGRAPHS)
	MOVEMENT_PARAGRAPH_ENDS    = C.GtkMovementStep(C.GTK_MOVEMENT_PARAGRAPH_ENDS)
	MOVEMENT_PAGES             = C.GtkMovementStep(C.GTK_MOVEMENT_PAGES)
	MOVEMENT_BUFFER_ENDS       = C.GtkMovementStep(C.GTK_MOVEMENT_BUFFER_ENDS)
Example #3
0
func (v *InfoBar) SetMessageType(messageType MessageType) {
	C.gtk_info_bar_set_message_type(v.native(), C.GtkMessageType(messageType))
}
Example #4
0
func msgBoxError(parent *Window, primarytext string, secondarytext string) {
	_msgBox(parent, primarytext, secondarytext, C.GtkMessageType(C.GTK_MESSAGE_ERROR), C.GtkButtonsType(C.GTK_BUTTONS_OK))
}