// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.ApplicationCommandLine.html).
pub type ApplicationCommandLine
///|
pub(open) trait IApplicationCommandLine {
fn as_application_command_line(Self) -> ApplicationCommandLine
fn create_file_for_arg(Self, String) -> File = _
fn done(Self) -> Unit = _
fn get_cwd(Self) -> String? = _
fn get_exit_status(Self) -> Int = _
fn get_is_remote(Self) -> Bool = _
fn get_platform_data(Self) -> @glib.Variant? = _
fn get_stdin(Self) -> InputStream? = _
fn getenv(Self, String) -> String? = _
fn print_literal(Self, String) -> Unit = _
fn printerr_literal(Self, String) -> Unit = _
fn set_exit_status(Self, Int) -> Unit = _
}
///|
pub impl IApplicationCommandLine for ApplicationCommandLine with fn as_application_command_line(
self,
) {
self
}
///|
/// Implementation contract for ApplicationCommandLine.done. Self is the retained MoonBit state; the second parameter is the invoked ApplicationCommandLine object.
pub(open) trait VApplicationCommandLineDone {
fn done(Self, ApplicationCommandLine) -> Unit
}
///|
/// Implementation contract for ApplicationCommandLine.print_literal. Self is the retained MoonBit state; the second parameter is the invoked ApplicationCommandLine object.
pub(open) trait VApplicationCommandLinePrintLiteral {
fn print_literal(Self, ApplicationCommandLine, String) -> Unit
}
///|
/// Implementation contract for ApplicationCommandLine.printerr_literal. Self is the retained MoonBit state; the second parameter is the invoked ApplicationCommandLine object.
pub(open) trait VApplicationCommandLinePrinterrLiteral {
fn printerr_literal(Self, ApplicationCommandLine, String) -> Unit
}
///|
#borrow(self_, arg)
extern "c" fn moonbit_g_application_command_line_create_file_for_arg(
self_ : ApplicationCommandLine,
arg : Bytes,
) -> File = "moonbit_g_application_command_line_create_file_for_arg"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.create_file_for_arg.html).
pub fn ApplicationCommandLine::create_file_for_arg(
self : ApplicationCommandLine,
arg : String,
) -> File {
moonbit_g_application_command_line_create_file_for_arg(
self,
@encoding/utf8.encode(arg),
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.done.html).
#borrow(self)
pub extern "c" fn ApplicationCommandLine::done(self : ApplicationCommandLine) = "moonbit_g_application_command_line_done"
///|
#borrow(self_)
extern "c" fn moonbit_g_application_command_line_get_cwd(
self_ : ApplicationCommandLine,
) -> @glib.Nullable[Bytes] = "moonbit_g_application_command_line_get_cwd"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.get_cwd.html).
pub fn ApplicationCommandLine::get_cwd(
self : ApplicationCommandLine,
) -> String? {
let result = moonbit_g_application_command_line_get_cwd(self)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.get_exit_status.html).
#borrow(self)
pub extern "c" fn ApplicationCommandLine::get_exit_status(
self : ApplicationCommandLine,
) -> Int = "moonbit_g_application_command_line_get_exit_status"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.get_is_remote.html).
#borrow(self)
pub extern "c" fn ApplicationCommandLine::get_is_remote(
self : ApplicationCommandLine,
) -> Bool = "moonbit_g_application_command_line_get_is_remote"
///|
#borrow(self_)
extern "c" fn moonbit_g_application_command_line_get_platform_data(
self_ : ApplicationCommandLine,
) -> @glib.Nullable[@glib.Variant] = "moonbit_g_application_command_line_get_platform_data"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.get_platform_data.html).
pub fn ApplicationCommandLine::get_platform_data(
self : ApplicationCommandLine,
) -> @glib.Variant? {
let raw_result = moonbit_g_application_command_line_get_platform_data(self)
raw_result.to_option()
}
///|
#borrow(self_)
extern "c" fn moonbit_g_application_command_line_get_stdin(
self_ : ApplicationCommandLine,
) -> @glib.Nullable[InputStream] = "moonbit_g_application_command_line_get_stdin"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.get_stdin.html).
pub fn ApplicationCommandLine::get_stdin(
self : ApplicationCommandLine,
) -> InputStream? {
let raw_result = moonbit_g_application_command_line_get_stdin(self)
raw_result.to_option()
}
///|
#borrow(self_, name)
extern "c" fn moonbit_g_application_command_line_getenv(
self_ : ApplicationCommandLine,
name : Bytes,
) -> @glib.Nullable[Bytes] = "moonbit_g_application_command_line_getenv"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.getenv.html).
pub fn ApplicationCommandLine::getenv(
self : ApplicationCommandLine,
name : String,
) -> String? {
let result = moonbit_g_application_command_line_getenv(
self,
@encoding/utf8.encode(name),
)
match result.to_option() {
Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
None => None
}
}
///|
#borrow(self_, message)
extern "c" fn moonbit_g_application_command_line_print_literal(
self_ : ApplicationCommandLine,
message : Bytes,
) = "moonbit_g_application_command_line_print_literal"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.print_literal.html).
pub fn ApplicationCommandLine::print_literal(
self : ApplicationCommandLine,
message : String,
) -> Unit {
moonbit_g_application_command_line_print_literal(
self,
@encoding/utf8.encode(message),
)
}
///|
#borrow(self_, message)
extern "c" fn moonbit_g_application_command_line_printerr_literal(
self_ : ApplicationCommandLine,
message : Bytes,
) = "moonbit_g_application_command_line_printerr_literal"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.printerr_literal.html).
pub fn ApplicationCommandLine::printerr_literal(
self : ApplicationCommandLine,
message : String,
) -> Unit {
moonbit_g_application_command_line_printerr_literal(
self,
@encoding/utf8.encode(message),
)
}
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ApplicationCommandLine.set_exit_status.html).
#borrow(self)
pub extern "c" fn ApplicationCommandLine::set_exit_status(
self : ApplicationCommandLine,
exit_status : Int,
) = "moonbit_g_application_command_line_set_exit_status"
///|
impl IApplicationCommandLine with fn create_file_for_arg(self, arg) -> File {
self.as_application_command_line().create_file_for_arg(arg)
}
///|
impl IApplicationCommandLine with fn done(self) -> Unit {
self.as_application_command_line().done()
}
///|
impl IApplicationCommandLine with fn get_cwd(self) -> String? {
self.as_application_command_line().get_cwd()
}
///|
impl IApplicationCommandLine with fn get_exit_status(self) -> Int {
self.as_application_command_line().get_exit_status()
}
///|
impl IApplicationCommandLine with fn get_is_remote(self) -> Bool {
self.as_application_command_line().get_is_remote()
}
///|
impl IApplicationCommandLine with fn get_platform_data(self) -> @glib.Variant? {
self.as_application_command_line().get_platform_data()
}
///|
impl IApplicationCommandLine with fn get_stdin(self) -> InputStream? {
self.as_application_command_line().get_stdin()
}
///|
impl IApplicationCommandLine with fn getenv(self, name) -> String? {
self.as_application_command_line().getenv(name)
}
///|
impl IApplicationCommandLine with fn print_literal(self, message) -> Unit {
self.as_application_command_line().print_literal(message)
}
///|
impl IApplicationCommandLine with fn printerr_literal(self, message) -> Unit {
self.as_application_command_line().printerr_literal(message)
}
///|
impl IApplicationCommandLine with fn set_exit_status(self, exit_status) -> Unit {
self.as_application_command_line().set_exit_status(exit_status)
}
///|
pub fn ApplicationCommandLine::as_gobject_object(
self : ApplicationCommandLine,
) -> @gobject.Object = "%identity"
///|
pub impl @gobject.IObject for ApplicationCommandLine with fn as_object(self) {
self.as_gobject_object()
}