예제 #1
0
파일: GAction.go 프로젝트: gotk3/gio
//void
//g_action_activate (GAction *action,
//                   GVariant *parameter);
//Activates the action.
//parameter must be the correct type of parameter for the action (ie: the parameter type given at construction time). If the parameter type was NULL then parameter must also be NULL.
//If the parameter GVariant is floating, it is consumed.
func (v *Action) Activate(parameter *glib.Variant) {
	C.g_action_activate(v.native(), (*C.GVariant)(parameter.ToGVariant()))
}
예제 #2
0
파일: GAction.go 프로젝트: gotk3/gio
//gchar *
//g_action_print_detailed_name (const gchar *action_name,
//                              GVariant *target_value);
//Formats a detailed action name from action_name and target_value .
//It is an error to call this function with an invalid action name.
//This function is the opposite of g_action_parse_detailed_action_name(). It will produce a string that can be parsed back to the action_name and target_value by that function.
//See that function for the types of strings that will be printed by this function.
func (v *Action) ActionPrintDetailedName(action_name string, target_value *glib.Variant) string {
	cstr := C.CString(action_name)
	defer C.free(unsafe.Pointer(cstr))
	cstrRes := (*C.char)(C.g_action_print_detailed_name((*C.gchar)(cstr), (*C.GVariant)(target_value.ToGVariant())))
	return C.GoString(cstrRes)
}
예제 #3
0
파일: GAction.go 프로젝트: gotk3/gio
//void
//g_action_change_state (GAction *action,
//                       GVariant *value);
//Request for the state of action to be changed to value .
//The action must be stateful and value must be of the correct type. See g_action_get_state_type().
//This call merely requests a change. The action may refuse to change its state or may change its state to something other than value . See g_action_get_state_hint().
//If the value GVariant is floating, it is consumed.
func (v *Action) ChangeState(value *glib.Variant) {
	C.g_action_change_state(v.native(), (*C.GVariant)(value.ToGVariant()))
}