Package org.gnome.pango
Class AttrSize
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.pango.AttrSize
- All Implemented Interfaces:
Proxy
The
PangoAttrSize
structure is used to represent attributes which
set font size.-
Constructor Summary
ConstructorDescriptionAttrSize()
Allocate a new AttrSize.Allocate a new AttrSize.AttrSize
(MemorySegment address) Create a AttrSize proxy instance for the provided memory address.Allocate a new AttrSize with the fields set to the provided values.Allocate a new AttrSize with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.static Attribute
new_
(int size) Create a new font-size attribute in fractional points.static Attribute
newAbsolute
(int size) Create a new font-size attribute in device units.readAttr()
Read the value of the fieldattr
.int
readSize()
Read the value of the fieldsize
.void
Write a value in the fieldattr
.void
writeSize
(int size) Write a value in the fieldsize
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AttrSize
Create a AttrSize proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
AttrSize
Allocate a new AttrSize.- Parameters:
arena
- to control the memory allocation scope
-
AttrSize
public AttrSize()Allocate a new AttrSize. The memory is allocated withArena.ofAuto()
. -
AttrSize
-
AttrSize
Allocate a new AttrSize with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
attr
- value for the fieldattr
size
- value for the fieldsize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readAttr
-
writeAttr
Write a value in the fieldattr
.- Parameters:
attr
- The new value for the fieldattr
-
readSize
public int readSize()Read the value of the fieldsize
.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(int size) Write a value in the fieldsize
.- Parameters:
size
- The new value for the fieldsize
-
new_
Create a new font-size attribute in fractional points.- Parameters:
size
- the font size, inPANGO_SCALE
-ths of a point- Returns:
- the newly allocated
PangoAttribute
, which should be freed withAttribute.destroy()
-
newAbsolute
Create a new font-size attribute in device units.- Parameters:
size
- the font size, inPANGO_SCALE
-ths of a device unit- Returns:
- the newly allocated
PangoAttribute
, which should be freed withAttribute.destroy()
-