Class: GOffice::FileOpener
- Inherits:
-
Object
- Object
- GOffice::FileOpener
- Defined in:
- (unknown)
Class Method Summary collapse
-
.for_id(id) ⇒ GOffice::FileOpener
Searches for file opener with given id, registered using go_file_opener_register.
Instance Method Summary collapse
-
#can_probe(pl) ⇒ Boolean
True if fo has a probe function.
-
#description ⇒ String
Description.
- #description=(description) ⇒ String
-
#id ⇒ String
Id.
- #id=(id) ⇒ String
-
#initialize(id, description, suffixes, mimes, probe_func, open_func) ⇒ GOffice::FileOpener
constructor
Creates new GOFile::Opener object.
- #interactive_only=(interactive_only) ⇒ Boolean
-
#interactive_only? ⇒ Boolean
Interactive-only.
-
#is_encoding_dependent ⇒ Boolean
True if fo is encoding dependent.
-
#mimes ⇒ GLib::SList<String>
The supported mime types.
-
#open(opt_enc, io_context, view, input) ⇒ nil
Reads content of file_name file into workbook wbv is attached to.
-
#probe(input, pl) ⇒ Boolean
Checks if a given file is supported by the opener.
-
#register(priority) ⇒ nil
Adds fo opener to the list of available file openers, making it available for Gnumeric i/o routines.
-
#suffixes ⇒ GLib::SList<String>
supported file types.
-
#unregister ⇒ nil
Removes fo opener from list of available file openers.
Constructor Details
#initialize(id, description, suffixes, mimes, probe_func, open_func) ⇒ GOffice::FileOpener
Creates new GOFile::Opener object. Optional id will be used after registering it with go_file_opener_register function. associate with the opener associate with the opener
Class Method Details
.for_id(id) ⇒ GOffice::FileOpener
Searches for file opener with given id, registered using go_file_opener_register
Instance Method Details
#can_probe(pl) ⇒ Boolean
Returns true if fo has a probe function.
#description ⇒ String
Returns description.
#description=(description) ⇒ String
#id ⇒ String
Returns id.
#id=(id) ⇒ String
#interactive_only=(interactive_only) ⇒ Boolean
#interactive_only? ⇒ Boolean
Returns interactive-only.
#is_encoding_dependent ⇒ Boolean
Returns true if fo is encoding dependent.
#mimes ⇒ GLib::SList<String>
Returns the supported mime types.
#open(opt_enc, io_context, view, input) ⇒ nil
Reads content of file_name file into workbook wbv is attached to. Results are reported using io_context object, use go_io_error_occurred to find out if operation was successful. The state of wbv and its workbook is undefined if operation fails, you should destroy them in that case.
#probe(input, pl) ⇒ Boolean
Checks if a given file is supported by the opener.
#register(priority) ⇒ nil
Adds fo opener to the list of available file openers, making it available for Gnumeric i/o routines. The opener is registered with given priority. The priority is used to determine the order in which openers will be tried when reading a file. The higher the priority, the sooner it will be tried. Default XML-based Gnumeric file opener is registered at priority 50. Recommended range for priority is [0, 100]. Reference count for the opener is incremented inside the function, but you don't have to (and shouldn't) call g_object_unref on it if it's floating object (for example, when you pass object newly created with go_file_opener_new and not referenced anywhere).
#suffixes ⇒ GLib::SList<String>
supported file types.
#unregister ⇒ nil
Removes fo opener from list of available file openers. Reference count for the opener is decremented inside the function.