Package org.gnome.webkit
Class ApplicationInfo
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.webkit.ApplicationInfo
-
Constructor Summary
ConstructorDescriptionCreates a newWebKitApplicationInfo
ApplicationInfo
(MemorySegment address) Create a ApplicationInfo proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the name of the application.static Type
getType()
Get the GType of the ApplicationInfo classvoid
Get the application version previously set with webkit_application_info_set_version().ref()
Atomically increments the reference count of this ApplicationInfo by one.void
Set the name of the application.void
setVersion
(long major, long minor, long micro) Set the application version.void
unref()
Atomically decrements the reference count of this ApplicationInfo by one.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ApplicationInfo
Create a ApplicationInfo proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ApplicationInfo
Creates a newWebKitApplicationInfo
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-
-
Method Details
-
getType
-
getName
Get the name of the application.If webkit_application_info_set_name() hasn't been called with a valid name, this returns g_get_prgname().
- Returns:
- the application name
-
getVersion
public void getVersion(Out<Long> major, @Nullable @Nullable Out<Long> minor, @Nullable @Nullable Out<Long> micro) Get the application version previously set with webkit_application_info_set_version().- Parameters:
major
- return location for the major version numberminor
- return location for the minor version numbermicro
- return location for the micro version number
-
ref
Atomically increments the reference count of this ApplicationInfo by one.This function is MT-safe and may be called from any thread.
- Returns:
- The passed in
WebKitApplicationInfo
-
setName
Set the name of the application.If not provided, or
null
is passed, g_get_prgname() will be used.- Parameters:
name
- the application name
-
setVersion
public void setVersion(long major, long minor, long micro) Set the application version.If the application doesn't use the format major.minor.micro you can pass 0 as the micro to use major.minor, or pass 0 as both micro and minor to use only major number. Any other format must be converted to major.minor.micro so that it can be used in version comparisons.
- Parameters:
major
- the major version numberminor
- the minor version numbermicro
- the micro version number
-
unref
public void unref()Atomically decrements the reference count of this ApplicationInfo by one.If the reference count drops to 0, all memory allocated by the
WebKitApplicationInfo
is released. This function is MT-safe and may be called from any thread.
-