gtksource.file_loader
Module for [FileLoader] class
Types 3
Methods
FileLoader self()Returns `this`, for use in `with` statements.FileLoaderGidBuilder builder()Get builder for [gtksource.file_loader.FileLoader] Returns: New builder objectgtksource.buffer.Buffer buffer() @propertyGet `buffer` property. Returns: The #GtkSourceBuffer to load the contents into. The #GtkSourceFileLoader object has a weak reference to the buffer.gtksource.file.File file() @propertyGet `file` property. Returns: The #GtkSourceFile. The #GtkSourceFileLoader object has a weak reference to the file.gio.input_stream.InputStream inputStream() @propertyGet `inputStream` property. Returns: The #GInputStream to load. Useful for reading stdin. If this property is set, the #GtkSourceFileLoader:location property is ignored.gio.file.File location() @propertyGet `location` property. Returns: The #GFile to load. If the #GtkSourceFileLoader:input-stream is null, by default the location is taken from the #GtkSourceFile at construction time.gtksource.file_loader.FileLoader newFromStream(gtksource.buffer.Buffer buffer, gtksource.file.File file, gio.input_stream.InputStream stream)Creates a new #GtkSourceFileLoader object. The contents is read from stream.void loadAsync(int ioPriority, gio.cancellable.Cancellable cancellable = null, gio.types.FileProgressCallback progressCallback = null, gio.types.AsyncReadyCallback callback = null)Loads asynchronously the file or input stream contents into the #GtkSourceBuffer. See the #GAsyncResult documentation to know how to use this function.bool loadFinish(gio.async_result.AsyncResult result)Finishes a file loading started with [gtksource.file_loader.FileLoader.loadAsync].void setCandidateEncodings(gtksource.encoding.Encoding[] candidateEncodings)Sets the candidate encodings for the file loading. The encodings are tried in the same order as the list.Constructors
this(gtksource.buffer.Buffer buffer, gtksource.file.File file)Creates a new #GtkSourceFileLoader object. The contents is read from the #GtkSourceFile's location. If not already done, call [gtksource.file.File.setLocation] before calling this constructor. The ...Methods
T buffer(gtksource.buffer.Buffer propval)Set `buffer` property. Params: propval = The #GtkSourceBuffer to load the contents into. The #GtkSourceFileLoader object has a weak reference to the buffer. Returns: Builder instance for fluent cha...T file(gtksource.file.File propval)Set `file` property. Params: propval = The #GtkSourceFile. The #GtkSourceFileLoader object has a weak reference to the file. Returns: Builder instance for fluent chainingT inputStream(gio.input_stream.InputStream propval)Set `inputStream` property. Params: propval = The #GInputStream to load. Useful for reading stdin. If this property is set, the #GtkSourceFileLoader:location property is ignored. Returns: Builder i...T location(gio.file.File propval)Set `location` property. Params: propval = The #GFile to load. If the #GtkSourceFileLoader:input-stream is null, by default the location is taken from the #GtkSourceFile at construction time. Retur...Fluent builder for [gtksource.file_loader.FileLoader]
Methods