Ejemplo n.º 1
0
// IsInhibited is a wrapper around gtk_application_is_inhibited().
func (v *Application) IsInhibited(flags ApplicationInhibitFlags) bool {
	return gobool(C.gtk_application_is_inhibited(v.native(), C.GtkApplicationInhibitFlags(flags)))
}
Ejemplo n.º 2
0
// Inhibited is a wrapper around gtk_application_inhibit().
func (v *Application) Inhibited(w *Window, flags ApplicationInhibitFlags, reason string) uint {
	cstr1 := (*C.gchar)(C.CString(reason))
	defer C.free(unsafe.Pointer(cstr1))

	return uint(C.gtk_application_inhibit(v.native(), w.native(), C.GtkApplicationInhibitFlags(flags), cstr1))
}
Ejemplo n.º 3
0
/*
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <glib.h>
#include <stdlib.h>
*/
import "C"

var (
	// AccelFlags
	ACCEL_VISIBLE = C.GtkAccelFlags(C.GTK_ACCEL_VISIBLE)
	ACCEL_LOCKED  = C.GtkAccelFlags(C.GTK_ACCEL_LOCKED)
	ACCEL_MASK    = C.GtkAccelFlags(C.GTK_ACCEL_MASK)

	// ApplicationInhibitFlags
	APPLICATION_INHIBIT_LOGOUT  = C.GtkApplicationInhibitFlags(C.GTK_APPLICATION_INHIBIT_LOGOUT)
	APPLICATION_INHIBIT_SWITCH  = C.GtkApplicationInhibitFlags(C.GTK_APPLICATION_INHIBIT_SWITCH)
	APPLICATION_INHIBIT_SUSPEND = C.GtkApplicationInhibitFlags(C.GTK_APPLICATION_INHIBIT_SUSPEND)
	APPLICATION_INHIBIT_IDLE    = C.GtkApplicationInhibitFlags(C.GTK_APPLICATION_INHIBIT_IDLE)

	// AttachOptions
	EXPAND = C.GtkAttachOptions(C.GTK_EXPAND)
	SHRINK = C.GtkAttachOptions(C.GTK_SHRINK)
	FILL   = C.GtkAttachOptions(C.GTK_FILL)

	// CalendarDisplayOptions
	CALENDAR_SHOW_HEADING      = C.GtkCalendarDisplayOptions(C.GTK_CALENDAR_SHOW_HEADING)
	CALENDAR_SHOW_DAY_NAMES    = C.GtkCalendarDisplayOptions(C.GTK_CALENDAR_SHOW_DAY_NAMES)
	CALENDAR_NO_MONTH_CHANGE   = C.GtkCalendarDisplayOptions(C.GTK_CALENDAR_NO_MONTH_CHANGE)
	CALENDAR_SHOW_WEEK_NUMBERS = C.GtkCalendarDisplayOptions(C.GTK_CALENDAR_SHOW_WEEK_NUMBERS)
	CALENDAR_SHOW_DETAILS      = C.GtkCalendarDisplayOptions(C.GTK_CALENDAR_SHOW_DETAILS)