Tepl.FileLoader¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Tepl.FileLoader(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(buffer, file)¶
- Parameters:
buffer (
Tepl.Buffer) – theTepl.Bufferto load the content into.
- Returns:
a new
Tepl.FileLoaderobject.- Return type:
Creates a new
Tepl.FileLoaderobject. The content is read from theTepl.Filelocation.If not already done, call
Tepl.File.set_location() before calling this constructor. The previous location is anyway not needed, because as soon as the file loading begins, the buffer is emptied. Setting theTepl.Filelocation directly permits to update the UI, to display the good location when the file is loading.New in version 1.0.
- get_buffer()¶
- Returns:
the
Tepl.Bufferto load the content into.- Return type:
Tepl.BufferorNone
New in version 1.0.
- load_async(io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int) – the I/O priority of the request. E.g.GLib.PRIORITY_LOW,GLib.PRIORITY_DEFAULTorGLib.PRIORITY_HIGH.cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied.
Loads asynchronously the file content into the
Tepl.Buffer.See the
Gio.AsyncResultdocumentation to know how to use this function.New in version 5.0.
- load_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult.- Raises:
- Returns:
whether the content has been loaded successfully.
- Return type:
Finishes a file loading started with
Tepl.FileLoader.load_async().New in version 1.0.
Property Details¶
- Tepl.FileLoader.props.buffer¶
- Name:
buffer- Type:
- Default Value:
- Flags:
The
Tepl.Bufferto load the content into. TheTepl.FileLoaderobject has a weak reference to the buffer.New in version 1.0.
- Tepl.FileLoader.props.file¶
- Name:
file- Type:
- Default Value:
- Flags:
The
Tepl.File. TheTepl.FileLoaderobject has a weak reference to the file.New in version 1.0.