gio.PollableUtils

Undocumented in source.

Public Imports

gio.c.types
public import gio.c.types;
gtkc.giotypes
public import gtkc.giotypes;

Members

Functions

pollableSourceNew
Source pollableSourceNew(ObjectG pollableStream)

Utility method for GPollableInputStream and GPollableOutputStream implementations. Creates a new glib.Source that expects a callback of type GPollableSourceFunc The new source does not actually do anything on its own; use Source.addChildSource to add other sources to it to cause it to trigger.

pollableSourceNewFull
Source pollableSourceNewFull(ObjectG pollableStream, Source childSource, Cancellable cancellable)

Utility method for GPollableInputStream and GPollableOutputStream implementations. Creates a new glib.Source, as with g_pollable_source_new(), but also attaching child_source (with a dummy callback), and cancellable, if they are non-NULL.

pollableStreamRead
ptrdiff_t pollableStreamRead(InputStream stream, ubyte[] buffer, bool blocking, Cancellable cancellable)

Tries to read from stream, as with InputStream.read (if blocking is TRUE) or g_pollable_input_stream_read_nonblocking() (if blocking is FALSE). This can be used to more easily share code between blocking and non-blocking implementations of a method.

pollableStreamWrite
ptrdiff_t pollableStreamWrite(OutputStream stream, ubyte[] buffer, bool blocking, Cancellable cancellable)

Tries to write to stream, as with OutputStream.write (if blocking is TRUE) or g_pollable_output_stream_write_nonblocking() (if blocking is FALSE). This can be used to more easily share code between blocking and non-blocking implementations of a method.

pollableStreamWriteAll
bool pollableStreamWriteAll(OutputStream stream, ubyte[] buffer, bool blocking, size_t bytesWritten, Cancellable cancellable)

Tries to write count bytes to stream, as with OutputStream.writeAll, but using g_pollable_stream_write() rather than OutputStream.write.