int Fl_Cairo_Window_Wrapper::handle(int event) { Dart_Handle args[1] = { Dart_NewInteger((int64_t)event) }; Dart_Handle ret = HandleError(Dart_Invoke(_ref, Dart_NewStringFromCString("doHandle"), 1, args)); int64_t returnValue; Dart_IntegerToInt64(ret, &returnValue); return returnValue; }
inline void getValue<std::int32_t>(Dart_NativeArguments args, int index, std::int32_t* value) { Dart_Handle handle = Dart_GetNativeArgument(args, index); assert(Dart_IsInteger(handle)); std::int64_t temp; Dart_IntegerToInt64(handle, &temp); *value = static_cast<std::int32_t>(temp); }
gboolean _gdart_marshaller_check_argument_flags( GdartBridgeContext *self, Dart_Handle element, gpointer type, const EnumInfoKlass *type_klass, Dart_Handle *dart_error_out, GError **error) { Dart_Handle base_object_class, temp_result, inner_container, name_handle; bool is_proper_type; int64_t raw_result; base_object_class = gdart_bridge_context_get_base_enum_class(self, dart_error_out, error); if (base_object_class == NULL) { return false; } temp_result = Dart_ObjectIsType(element, base_object_class, &is_proper_type); if (Dart_IsError(temp_result)) { *dart_error_out = temp_result; g_set_error(error, GDART_ERROR, 1, "Error from Dart operation."); goto error; } if (!is_proper_type) { *dart_error_out = gdart_bridge_context_create_error_handle(self, "%s: received an unexpected base info type", G_STRFUNC); g_set_error(error, GDART_ERROR, 1, "%s: received an unexpected base info type", G_STRFUNC); goto error; } name_handle = Dart_NewStringFromCString("index"); if (Dart_IsError(name_handle)) { *dart_error_out = name_handle; g_set_error(error, GDART_ERROR, 1, "Error from Dart operation."); return FALSE; } inner_container = Dart_GetField(element, name_handle); if (Dart_IsError(inner_container)) { *dart_error_out = inner_container; g_set_error(error, GDART_ERROR, 1, "Error from Dart operation."); return FALSE; } temp_result = Dart_IntegerToInt64(inner_container, &raw_result); if (Dart_IsError(temp_result)) { *dart_error_out = temp_result; g_set_error(error, GDART_ERROR, 1, "Error from Dart operation."); return FALSE; } return TRUE; error: return FALSE; }