Package org.gnome.gtksourceview
Class Encoding
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gtksourceview.Encoding
- All Implemented Interfaces:
Proxy
Character encoding.
The GtkSourceEncoding
boxed type represents a character encoding. It is used
for example by GtkSourceFile
. Note that the text in GTK widgets is always
encoded in UTF-8.
-
Constructor Summary
ConstructorDescriptionEncoding
(MemorySegment address) Create a Encoding proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Used by language bindings.void
free()
Used by language bindings.getAll()
Gets all encodings.Gets the character set of theGtkSourceEncoding
, such as "UTF-8" or "ISO-8859-1".static Encoding
Gets theGtkSourceEncoding
for the current locale.Gets the list of default candidate encodings to try when loading a file.static Encoding
getFromCharset
(String charset) Gets aGtkSourceEncoding
from a character set such as "UTF-8" or "ISO-8859-1".getName()
Gets the name of theGtkSourceEncoding
such as "Unicode" or "Western".static Type
getType()
Get the GType of the Encoding classstatic Encoding
getUtf8()
toString()
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Encoding
Create a Encoding proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
getAll
-
getCurrent
Gets theGtkSourceEncoding
for the current locale.See also
GLib.getCharset(io.github.jwharm.javagi.base.Out<java.lang.String>)
.- Returns:
- the current locale encoding.
-
getDefaultCandidates
Gets the list of default candidate encodings to try when loading a file.See
FileLoader.setCandidateEncodings(org.gnome.glib.SList<org.gnome.gtksourceview.Encoding>)
.This function returns a different list depending on the current locale (i.e. language, country and default encoding). The UTF-8 encoding and the current locale encoding are guaranteed to be present in the returned list.
- Returns:
- the list of default candidate encodings. Free with g_slist_free().
-
getFromCharset
-
getUtf8
-
copy
-
free
public void free()Used by language bindings. -
getCharset
Gets the character set of theGtkSourceEncoding
, such as "UTF-8" or "ISO-8859-1".- Returns:
- the character set of the
GtkSourceEncoding
.
-
getName
Gets the name of theGtkSourceEncoding
such as "Unicode" or "Western".- Returns:
- the name of the
GtkSourceEncoding
.
-
toString
-