You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.5 KiB
39 lines
1.5 KiB
import 'dart:ffi'; |
|
|
|
import 'package:ffi/ffi.dart'; |
|
|
|
import 'xdga_directories_bindings_generated.dart'; |
|
|
|
const String _libName = 'xdga_directories'; |
|
|
|
/// The dynamic library in which the symbols for [XdgaDirectoriesBindings] can be found. |
|
final DynamicLibrary _dylib = () { |
|
return DynamicLibrary.open('lib$_libName.so'); |
|
}(); |
|
|
|
/// The bindings to the native functions in [_dylib]. |
|
final XdgaDirectoriesBindings _bindings = XdgaDirectoriesBindings(_dylib); |
|
|
|
/// QStandardPaths::CacheLocation |
|
String getCacheLocation() => _bindings.getCacheLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::AppDataLocation |
|
String getAppDataLocation() => _bindings.getAppDataLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::DocumentsLocation |
|
String getDocumentsLocation() => _bindings.getDocumentsLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::DownloadLocation |
|
String getDownloadLocation() => _bindings.getDownloadLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::MusicLocation |
|
String getMusicLocation() => _bindings.getMusicLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::PicturesLocation |
|
String getPicturesLocation() => _bindings.getPicturesLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::GenericDataLocation |
|
String getGenericDataLocation() => _bindings.getGenericDataLocation().cast<Utf8>().toDartString(); |
|
|
|
/// QStandardPaths::MoviesLocation |
|
String getMoviesLocation() => _bindings.getMoviesLocation().cast<Utf8>().toDartString();
|
|
|