// public bool Apply(object obj) [instance] :101
bool UxTemplate::Apply(uObject* obj)
{
    if (!uUnbox<bool>(::TYPES[0/*bool*/], uPtr(_matches)->Invoke(1, obj)))
        return true;

    return uUnbox<bool>(::TYPES[0/*bool*/], uPtr(_apply)->Invoke(1, obj));
}
Exemplo n.º 2
0
// public byte[] ReadBytes(int byteCount) [instance] :57
uArray* BinaryReader::ReadBytes(int byteCount)
{
    if (byteCount < 0)
        U_THROW(::g::Uno::ArgumentOutOfRangeException::New6(::STRINGS[0/*"byteCount"*/]));

    uArray* buffer = uArray::New(::TYPES[0/*byte[]*/], byteCount);
    int offset = 0;

    do
    {
        int read = uPtr(_stream)->Read(buffer, offset, byteCount - offset);
        offset = offset + read;

        if (read == 0)
            break;
    }
    while (offset < byteCount);

    if (offset == byteCount)
        return buffer;

    uArray* result = uArray::New(::TYPES[0/*byte[]*/], offset);

    for (int i = 0; i < offset; i++)
        uPtr(result)->Item<uint8_t>(i) = uPtr(buffer)->Item<uint8_t>(i);

    return result;
}
// public static operator ==(Android.Base.Wrappers.JWrapper a, Android.Base.Wrappers.JWrapper b) [static] :2636
bool JWrapper::op_Equality(JWrapper* a, JWrapper* b)
{
    if ((a == NULL) || (b == NULL))
        return b == a;
    else
        return ::g::Android::Base::JNI::IsSameObject(uPtr(a)->_GetJavaObject(), uPtr(b)->_GetJavaObject());
}
Exemplo n.º 4
0
// private void fireResultCode() [instance] :418
void AndroidCameraImpl__TakePictureTask::fireResultCode()
{
    ::g::Fuse::Camera::AndroidCameraImpl::_pendingTask() = NULL;

    if (_success)
        ::g::Uno::Threading::Promise__Resolve_fn(uPtr(_futurePath), ::g::Fuse::Camera::PictureResult::New1(_payload, 0));
    else
        uPtr(_futurePath)->Reject(::g::Uno::Exception::New2(_payload));
}
Exemplo n.º 5
0
// public void Flush() [instance] :1967
void StreamWriter::Flush()
{
    if (_index != 0)
    {
        uPtr(_stream)->Write(_buffer, 0, _index);
        _index = 0;
    }

    uPtr(_stream)->Flush();
}
// public static int get_TimestampNow() [static] :11
int DateUtil::TimestampNow()
{
    ::g::Uno::Time::ZonedDateTime* d = ::g::Uno::DateTime::Now();
    int mon = ((uPtr(d)->Year() - 2000) * 12) + uPtr(d)->Month();
    int day = (mon * 31) + d->Day();
    int hour = (day * 24) + d->Hour();
    int min = (hour * 60) + d->Minute();
    int sec = (min * 60) + d->Second();
    return sec;
}
// public static void Update(string path, byte[] bytes) [static] :157
void FileCache::Update(uString* path, uArray* bytes)
{
    FileCache_typeof()->Init();
    bool ret3;
    ::g::Outracks::Simulator::ByteFileSource* fs = NULL;

    if ((::g::Uno::Collections::Dictionary__TryGetValue_fn(uPtr(FileCache::_cache()), path, (void**)(&fs), &ret3), ret3))
        uPtr(fs)->Update(bytes);
    else
        ::g::Uno::Collections::Dictionary__set_Item_fn(uPtr(FileCache::_cache()), path, ::g::Outracks::Simulator::ByteFileSource::New1(path, bytes));
}
// public static int get_TimestampNow() [static] :11
int DateUtil::TimestampNow()
{
    uStackFrame __("Experimental.Http.Internal.DateUtil", "get_TimestampNow()");
    ::g::Uno::Time::ZonedDateTime* d = ::g::Uno::DateTime::Now();
    int mon = ((uPtr(d)->Year() - 2000) * 12) + uPtr(d)->Month();
    int day = (mon * 31) + d->Day();
    int hour = (day * 24) + d->Hour();
    int min = (hour * 60) + d->Minute();
    int sec = (min * 60) + d->Second();
    return sec;
}
Exemplo n.º 9
0
uType* uType::MakeGeneric(size_t count, uType** args)
{
    if (count != GenericCount)
        U_THROW_IOORE();

    uPtr(args);
    for (size_t i = 0; i < count; i++)
        uPtr(args[i]);

    return uGetParameterization(uTypeKey(this, args));
}
Exemplo n.º 10
0
// public override sealed int Read(byte[] dst, int byteOffset, int byteCount) :1327
void MemoryStream__Read_fn(MemoryStream* __this, uArray* dst, int* byteOffset, int* byteCount, int* __retval)
{
    int byteCount_ = *byteCount;
    int byteOffset_ = *byteOffset;
    int i = 0;

    for (; (i < byteCount_) && ((__this->Position() + (int64_t)i) < __this->Length()); i++)
        uPtr(dst)->Item<uint8_t>(i + byteOffset_) = uPtr(__this->_buffer)->Item<uint8_t>((int)__this->Position() + i);

    __this->Position(__this->Position() + (int64_t)i);
    return *__retval = i, void();
}
// protected override sealed void OnApply(Fuse.Controls.Rectangle self) :13
void HamburgerIcon__Template__OnApply_fn(HamburgerIcon__Template* __this, ::g::Fuse::Controls::Rectangle* self)
{
    bool ret2;
    bool ret3;
    bool ret4;
    ::g::Fuse::Drawing::SolidColor* temp = ::g::Fuse::Drawing::SolidColor::New1();
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::Rectangle::CornerRadiusProperty()), self, uCRef(::g::Uno::Float4__New2(3.0f, 3.0f, 3.0f, 3.0f)), &ret2);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Elements::Element::HeightProperty()), self, uCRef(3.0f), &ret3);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Elements::Element::MarginProperty()), self, uCRef(::g::Uno::Float4__New2(0.0f, 2.0f, 0.0f, 2.0f)), &ret4);
    temp->Color(::g::Uno::Float4__New2(1.0f, 1.0f, 1.0f, 1.0f));
    uPtr(self)->AddStyleFill(temp);
}
Exemplo n.º 12
0
// protected override sealed void OnApply(Fuse.Controls.Text self) :41
void MainView__Template__OnApply_fn(MainView__Template* __this, ::g::Fuse::Controls::Text* self)
{
    bool ret2;
    bool ret3;
    bool ret4;
    bool ret5;
    bool ret6;
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::TextControl::TextWrappingProperty()), self, uCRef<int>(1), &ret2);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::TextControl::FontSizeProperty()), self, uCRef(16.0f), &ret3);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::TextControl::TextAlignmentProperty()), self, uCRef<int>(1), &ret4);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::TextControl::TextColorProperty()), self, uCRef(::g::Uno::Float4__New2(1.0f, 1.0f, 1.0f, 1.0f)), &ret5);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Elements::Element::YProperty()), self, uCRef(100.0f), &ret6);
}
Exemplo n.º 13
0
// private void InitializeUX() [instance] :10
void Cloud::InitializeUX()
{
    uStackFrame __("Cloud", "InitializeUX()");
    ::g::Fuse::Controls::Image* temp = ::g::Fuse::Controls::Image::New2();
    ::g::Fuse::Effects::DropShadow* temp1 = ::g::Fuse::Effects::DropShadow::New1();
    temp->Color(::g::Uno::Float4__New2(0.4235294f, 0.4156863f, 0.4705882f, 1.0f));
    temp->Alignment(10);
    temp->File(::g::Uno::UX::BundleFileSource::New1(::g::outsideTheBox_bundle::cloudf6cd2dfe()));
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp->Effects()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[4/*Fuse.Effects.Effect*/])), temp1);
    temp1->Size(5.0f);
    temp1->Distance(10.0f);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[7/*Fuse.Node*/])), temp);
}
Exemplo n.º 14
0
// private void InitializeUX() [instance] :29
void CloseIcon::InitializeUX()
{
    CloseIcon__Template* collection1;
    ::g::Fuse::Style* temp = ::g::Fuse::Style::New1();
    collection1 = CloseIcon__Template::New1(this);
    uPtr(collection1)->Cascade(true);
    true;
    uPtr(collection1)->AffectSubtypes(true);
    true;
    CloseIcon__Template* temp1 = collection1;
    ::g::Fuse::Controls::Rectangle* temp2 = ::g::Fuse::Controls::Rectangle::New2();
    ::g::Fuse::Rotation* temp3 = ::g::Fuse::Rotation::New1();
    ::g::Fuse::Controls::Rectangle* temp4 = ::g::Fuse::Controls::Rectangle::New2();
    ::g::Fuse::Rotation* temp5 = ::g::Fuse::Rotation::New1();
    Width(25.0f);
    Height(25.0f);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp->Templates()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[3/*Uno.UX.ITemplate*/])), (uObject*)temp1);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp2->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[5/*Fuse.Transform*/])), temp3);
    temp3->Degrees(45.0f);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(temp4->Transforms()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[5/*Fuse.Transform*/])), temp5);
    temp5->Degrees(-45.0f);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[4/*Fuse.Node*/])), temp2);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(Children()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[4/*Fuse.Node*/])), temp4);
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(Styles()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::TYPES[2/*Fuse.Style*/])), temp);
}
Exemplo n.º 15
0
// public static void ClearName(object obj) [static] :45
void NameRegistry::ClearName(uObject* obj)
{
    NameRegistry_typeof()->Init();
    bool ret9;
    uString* ret10;
    bool ret11;

    if ((::g::Uno::Collections::Dictionary__ContainsKey_fn(uPtr(NameRegistry::_names()), obj, &ret9), ret9))
    {
        uString* name = (::g::Uno::Collections::Dictionary__get_Item_fn(uPtr(NameRegistry::_names()), obj, &ret10), ret10);
        ::g::Uno::Collections::Dictionary__Remove_fn(uPtr(NameRegistry::_names()), obj, &ret11);
        NameRegistry::NotifyNameChanged(obj, name);
    }
}
// public Fuse.Drawing.Polygon get_Output() [instance] :185
::g::Fuse::Drawing::Polygon* Stroke::Output()
{
    uStackFrame __("Fuse.Entities.Processing.Stroke", "get_Output()");
    ::g::Fuse::Drawing::Polygon* ret2;
    ::g::Fuse::Drawing::Polygon* ret3;

    if (_output != NULL)
        return _output;

    if ((_source == NULL) || ((::g::Fuse::IOutput::get_Output_ex(uInterface(uPtr(_source), ::TYPES[2/*Fuse.IOutput<Fuse.Drawing.Polygon>*/]), &ret2), ret2) == NULL))
        return NULL;

    _output = uPtr((::g::Fuse::IOutput::get_Output_ex(uInterface(uPtr(Source()), ::TYPES[2/*Fuse.IOutput<Fuse.Drawing.Polygon>*/]), &ret3), ret3))->Stroke(::g::Uno::Math::Max1(0.1f, Width()), Offset(), StartCap(), EndCap());
    return _output;
}
// public Fuse.Entities.Mesh get_Output() [instance] :80
::g::Fuse::Entities::Mesh* Extrude::Output()
{
    uStackFrame __("Fuse.Entities.Processing.Extrude", "get_Output()");
    ::g::Fuse::Drawing::Polygon* ret2;
    ::g::Fuse::Drawing::Polygon* ret3;

    if (_output != NULL)
        return _output;

    if ((_source == NULL) || ((::g::Fuse::IOutput::get_Output_ex(uInterface(uPtr(_source), ::TYPES[2/*Fuse.IOutput<Fuse.Drawing.Polygon>*/]), &ret2), ret2) == NULL))
        return NULL;

    _output = ::g::Fuse::Entities::Mesh::New2(uPtr((::g::Fuse::IOutput::get_Output_ex(uInterface(uPtr(_source), ::TYPES[2/*Fuse.IOutput<Fuse.Drawing.Polygon>*/]), &ret3), ret3))->Extrude(Depth(), SmoothingThreshold()));
    return _output;
}
Exemplo n.º 18
0
// public override sealed void Write(byte[] src, int byteOffset, int byteCount) :1313
void MemoryStream__Write_fn(MemoryStream* __this, uArray* src, int* byteOffset, int* byteCount)
{
    int byteCount_ = *byteCount;
    int byteOffset_ = *byteOffset;
    __this->EnsureCapacity(byteCount_);

    for (int i = byteOffset_; i < (byteOffset_ + byteCount_); i++)
    {
        uPtr(__this->_buffer)->Item<uint8_t>((int)__this->Position()) = uPtr(src)->Item<uint8_t>(i);
        __this->Position(__this->Position() + 1LL);
    }

    if (__this->Position() > __this->Length())
        __this->_length = __this->Position();
}
Exemplo n.º 19
0
// private void OnPointerWheelChanged(object sender, Uno.Platform.PointerEventArgs args) [instance] :166
void DesktopRootViewport::OnPointerWheelChanged(uObject* sender, ::g::Uno::Platform::PointerEventArgs* args)
{
    uStackFrame __("Fuse.Desktop.DesktopRootViewport", "OnPointerWheelChanged(object,Uno.Platform.PointerEventArgs)");

    try
    {
        if (Content() != NULL)
            uPtr(args)->Handled(uPtr(::g::Fuse::Input::Pointer::RaiseWheelMoved(Content(), TranslatePointerEvent(args)))->IsHandled());
    }
    catch (const uThrowable& __t)
    {
        ::g::Uno::Exception* e = __t.Exception;
        ::g::Fuse::AppBase::OnUnhandledExceptionInternal(e);
    }
}
Exemplo n.º 20
0
// private void ReadBuffer() [instance] :1852
void StreamReader::ReadBuffer()
{
    _charPos = 0;
    _charLen = 0;

    do
    {
        _byteLen = uPtr(_stream)->Read(_byteBuffer, 0, uPtr(_byteBuffer)->Length());

        if (_byteLen == 0)
            return;

        _charLen = (_charLen + uPtr(_decoder)->GetChars(_byteBuffer, 0, _byteLen, _charBuffer, _charLen));
    }
    while (_charLen == 0);
}
// protected override sealed void OnSet(T value, object origin) :52
void UxProperty__OnSet_fn(UxProperty* __this, void* value, uObject* origin)
{
    uType* __types[] = {
        __this->__type->T(0),
    };
    uPtr(__this->_setter)->Invoke(2, uBoxPtr(__types[0], value), origin);
}
// protected override sealed void OnRemoveListener(Uno.UX.ValueChangedHandler<T> listener) :71
void UxProperty__OnRemoveListener_fn(UxProperty* __this, uDelegate* listener)
{
    if (::g::Uno::Delegate::op_Equality(__this->_remover, NULL))
        return;

    uPtr(__this->_remover)->InvokeVoid(listener);
}
// protected override sealed T OnGet() :58
void UxProperty__OnGet_fn(UxProperty* __this, uTRef __retval)
{
    uType* __types[] = {
        __this->__type->T(0),
    };
    return __retval.Store(__types[0], uUnboxAny(__types[0], uPtr(__this->_getter)->Invoke())), void();
}
// public static Outracks.Simulator.ByteFileSource GetFileSource(string path) [static] :168
::g::Outracks::Simulator::ByteFileSource* FileCache::GetFileSource(uString* path)
{
    uStackFrame __("Outracks.Simulator.FileCache", "GetFileSource(string)");
    FileCache_typeof()->Init();
    ::g::Outracks::Simulator::ByteFileSource* ret2;
    return (::g::Uno::Collections::Dictionary__get_Item_fn(uPtr(FileCache::_cache()), path, &ret2), ret2);
}
Exemplo n.º 25
0
uDelegate* uDelegate::New(uType* type, uObject* object, size_t offset, uType* generic)
{
    U_ASSERT(offset && offset < 0xffff); // Max ‭8191‬ virtual functions is enough for now
    uDelegate* result = New(type, *(void**)((uint8_t*)uPtr(object)->GetType() + offset), object, generic);
    result->_this = object;
    return result;
}
Exemplo n.º 26
0
// internal void InitializeUX() [instance] :42
void Payment::InitializeUX1()
{
    ::g::Fuse::Resources::FileImageSource* temp = ::g::Fuse::Resources::FileImageSource::New1();
    ::g::Uno::UX::Resource* temp1 = ::g::Uno::UX::Resource::New1(::STRINGS[0/*"iconFile"*/], temp);
    temp->File(::g::Uno::UX::BundleFileSource::New1(::g::WelcomeAnimation_bundle::paymentfbc7c195()));
    ::g::Uno::Collections::ICollection::Add_ex(uInterface(uPtr(Resources()), ::g::Uno::Collections::ICollection_typeof()->MakeType(::g::Uno::UX::Resource_typeof())), temp1);
}
Exemplo n.º 27
0
// private void ResizeTo(int newSize) [instance] :1371
void MemoryStream::ResizeTo(int newSize)
{
    uArray* newBuffer = uArray::New(::TYPES[0/*byte[]*/], newSize);
    ::g::Uno::Array::Copy1(::TYPES[6/*Uno.Array.Copy<byte>*/], _buffer, newBuffer, uPtr(_buffer)->Length());
    _buffer = newBuffer;
    _nextIncrease = Capacity();
}
Exemplo n.º 28
0
// protected override sealed void OnApply(Fuse.Controls.PlainTextEdit self) :49
void NativeStyle__Template1__OnApply_fn(NativeStyle__Template1* __this, ::g::Fuse::Controls::PlainTextEdit* self)
{
    uStackFrame __("Fuse.Desktop.NativeStyle.Template1", "OnApply(Fuse.Controls.PlainTextEdit)");
    bool ret2;
    NativeStyle__Template1__Factory* temp = NativeStyle__Template1__Factory::New2(__this);
    ::g::Fuse::StyleProperty1__SetStyle_fn(uPtr(::g::Fuse::Controls::PlainTextEdit::NativeEditProperty()), self, temp, &ret2);
}
Exemplo n.º 29
0
// public static void Vibrate(double seconds) [static] :15
void Vibration::Vibrate(double seconds)
{
    uStackFrame __("Fuse.Vibration.Vibration", "Vibrate(double)");
    ::g::Android::Base::Permissions::RequestPermission(::g::Android::Base::Permissions::VIBRATE());
    ::g::Android::android::app::Activity* a = ::g::Android::android::app::Activity::GetAppActivity();
    ::g::Android::android::os::Vibrator* v = uCast< ::g::Android::android::os::Vibrator*>(uPtr(a)->getSystemService(::g::Android::android::content::Context::VIBRATOR_SERVICE()), ::TYPES[1/*Android.android.os.Vibrator*/]);
    uPtr(v)->vibrate1((int64_t)(seconds * 1000.0));
}
Exemplo n.º 30
0
// private static void NotifyNameChanged(object obj, string name) [static] :79
void NameRegistry::NotifyNameChanged(uObject* obj, uString* name)
{
    NameRegistry_typeof()->Init();
    uArray* array2;
    int index3;
    int length4;
    bool ret14;
    ::g::Uno::Collections::List* ret15;

    if ((::g::Uno::Collections::Dictionary__ContainsKey_fn(uPtr(NameRegistry::_listeners()), name, &ret14), ret14))

        for (array2 = (uArray*)uPtr((::g::Uno::Collections::Dictionary__get_Item_fn(uPtr(NameRegistry::_listeners()), name, &ret15), ret15))->ToArray(), index3 = 0, length4 = uPtr(array2)->Length(); index3 < length4; ++index3)
        {
            uObject* listener = uPtr(array2)->Strong<uObject*>(index3);
            ::g::Fuse::Scripting::INameListener::OnNameChanged(uInterface(uPtr(listener), ::g::Fuse::Scripting::INameListener_typeof()), obj, name);
        }
}