static VALUE rg_initialize(VALUE self, VALUE base_stream, VALUE converter) { G_INITIALIZE(self, g_converter_output_stream_new(RVAL2GOUTPUTSTREAM(base_stream), RVAL2GCONVERTER(converter))); return Qnil; }
static VALUE stream_initialize(int argc, VALUE *argv, VALUE self) { VALUE base_stream, byte_order; rb_scan_args(argc, argv, "11", &base_stream, &byte_order); G_INITIALIZE(self, g_data_output_stream_new(RVAL2GOUTPUTSTREAM(base_stream))); if (!NIL_P(byte_order)) g_data_output_stream_set_byte_order(_SELF(self), RVAL2GDATASTREAMBYTEORDER(byte_order)); return Qnil; }
static VALUE rg_write_contents(int argc, VALUE *argv, VALUE self) { VALUE stream, flags, rb_cancellable; GCancellable *cancellable; gboolean result; GError *error = NULL; rb_scan_args(argc, argv, "21", &stream, &flags, &rb_cancellable); cancellable = NIL_P(rb_cancellable) ? NULL : RVAL2GCANCELLABLE(rb_cancellable); result = vte_terminal_write_contents(_SELF(self), RVAL2GOUTPUTSTREAM(stream), RVAL2VTETERMINALWRITEFLAGS(flags), cancellable, &error); if (error) RAISE_GERROR(error); return CBOOL2RVAL(result); }