// public static void DeleteFile(string filename) [static] :1150 void FileSystemImpl::DeleteFile(uString* filename_) { try { Xli::Disk->DeleteFile(uStringToXliString(filename_)); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public static extern Uno.IO.CppXliStreamHandle CppXliOpenRead(string filename) [static] :1105 ::Xli::Stream* FileSystemImpl::CppXliOpenRead(uString* filename_) { try { return Xli::Disk->OpenFile(uStringToXliString(filename_), Xli::FileModeRead); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public static void WriteAllBytes(string filename, byte[] bytes) [static] :1216 void FileSystemImpl::WriteAllBytes(uString* filename_, uArray* bytes_) { try { Xli::Managed<Xli::Stream> f = Xli::Disk->OpenFile(uStringToXliString(filename_), Xli::FileModeWrite); f->Write(bytes_->Ptr(), 1, bytes_->Length()); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
int Main(const Xli::Array<Xli::String>& args) { uRuntime uno; int flags = Xli::WindowFlagsResizeable; flags |= Xli::WindowFlagsDisablePowerSaver; # ifdef XLI_PLATFORM_ANDROID Xli::PlatformSpecific::Android::SetLogTag("MyMineral"); # endif try { uApplication app; Xli::Application::Run(&app, flags); } catch (const uThrowable& t) { Xli::String str = "(null)"; if (t.Exception && t.Exception->Message()) str = uStringToXliString(t.Exception->Message()); Xli::Exception x(str); x._func = t.Function; x._line = t.Line; throw x; } return 0; }
void GL__ShaderSource(::uStatic* __this, ::uUInt shader_, ::uString* source_) { Xli::String source = uStringToXliString(source_); const char* code[] = { #ifdef XLI_GL_DESKTOP "#version 120\n", #else "", #endif source.Ptr(), }; GLint len[] = { (GLint)strlen(code[0]), source.Length(), }; glShaderSource(shader_, 2, code, len); }
uType* uReflection::GetType(uString* name) { uType* result; return _Types->TryGetValue(uStringToXliString(name), result) ? result : NULL; }
int GL__GetUniformLocation(::uStatic* __this, ::uUInt program_, ::uString* name_) { return glGetUniformLocation(program_, uStringToXliString(name_).Ptr()); }