Package org.gnome.pango
Class AttrShape
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.pango.AttrShape
- All Implemented Interfaces:
Proxy
The
PangoAttrShape structure is used to represent attributes which
impose shape restrictions.-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new AttrShape.Allocate a new AttrShape.AttrShape(MemorySegment address) Create a AttrShape proxy instance for the provided memory address.AttrShape(Attribute attr, Rectangle inkRect, Rectangle logicalRect, MemorySegment data, AttrDataCopyFunc copyFunc, DestroyNotify destroyFunc) Allocate a new AttrShape with the fields set to the provided values.AttrShape(Attribute attr, Rectangle inkRect, Rectangle logicalRect, MemorySegment data, AttrDataCopyFunc copyFunc, DestroyNotify destroyFunc, Arena arena) Allocate a new AttrShape with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.static AttributeCreate a new shape attribute.static AttributenewWithData(Rectangle inkRect, Rectangle logicalRect, @Nullable MemorySegment data, @Nullable AttrDataCopyFunc copyFunc) Creates a new shape attribute.@Nullable AttributereadAttr()Read the value of the fieldattr.@Nullable AttrDataCopyFuncRead the value of the fieldcopy_func.readData()Read the value of the fielddata.@Nullable DestroyNotifyRead the value of the fielddestroy_func.@Nullable RectangleRead the value of the fieldink_rect.@Nullable RectangleRead the value of the fieldlogical_rect.voidWrite a value in the fieldattr.voidwriteCopyFunc(@Nullable AttrDataCopyFunc copyFunc, Arena _arena) Write a value in the fieldcopy_func.voidwriteData(MemorySegment data) Write a value in the fielddata.voidwriteDestroyFunc(@Nullable DestroyNotify destroyFunc, Arena _arena) Write a value in the fielddestroy_func.voidwriteInkRect(@Nullable Rectangle inkRect) Write a value in the fieldink_rect.voidwriteLogicalRect(@Nullable Rectangle logicalRect) Write a value in the fieldlogical_rect.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AttrShape
Create a AttrShape proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
AttrShape
Allocate a new AttrShape.- Parameters:
arena- to control the memory allocation scope
-
AttrShape
public AttrShape()Allocate a new AttrShape. The memory is allocated withArena.ofAuto(). -
AttrShape
public AttrShape(Attribute attr, Rectangle inkRect, Rectangle logicalRect, MemorySegment data, AttrDataCopyFunc copyFunc, DestroyNotify destroyFunc, Arena arena) Allocate a new AttrShape with the fields set to the provided values.- Parameters:
attr- value for the fieldattrinkRect- value for the fieldinkRectlogicalRect- value for the fieldlogicalRectdata- value for the fielddatacopyFunc- value for the fieldcopyFuncdestroyFunc- value for the fielddestroyFuncarena- to control the memory allocation scope
-
AttrShape
public AttrShape(Attribute attr, Rectangle inkRect, Rectangle logicalRect, MemorySegment data, AttrDataCopyFunc copyFunc, DestroyNotify destroyFunc) Allocate a new AttrShape with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
attr- value for the fieldattrinkRect- value for the fieldinkRectlogicalRect- value for the fieldlogicalRectdata- value for the fielddatacopyFunc- value for the fieldcopyFuncdestroyFunc- value for the fielddestroyFunc
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readAttr
Read the value of the fieldattr.- Returns:
- The value of the field
attr
-
writeAttr
Write a value in the fieldattr.- Parameters:
attr- The new value for the fieldattr
-
readInkRect
Read the value of the fieldink_rect.- Returns:
- The value of the field
ink_rect
-
writeInkRect
Write a value in the fieldink_rect.- Parameters:
inkRect- The new value for the fieldink_rect
-
readLogicalRect
Read the value of the fieldlogical_rect.- Returns:
- The value of the field
logical_rect
-
writeLogicalRect
Write a value in the fieldlogical_rect.- Parameters:
logicalRect- The new value for the fieldlogical_rect
-
readData
Read the value of the fielddata.- Returns:
- The value of the field
data
-
writeData
Write a value in the fielddata.- Parameters:
data- The new value for the fielddata
-
readCopyFunc
Read the value of the fieldcopy_func.- Returns:
- The value of the field
copy_func
-
writeCopyFunc
Write a value in the fieldcopy_func.- Parameters:
copyFunc- The new value for the fieldcopy_func_arena- to control the memory allocation scope
-
readDestroyFunc
Read the value of the fielddestroy_func.- Returns:
- The value of the field
destroy_func
-
writeDestroyFunc
Write a value in the fielddestroy_func.- Parameters:
destroyFunc- The new value for the fielddestroy_func_arena- to control the memory allocation scope
-
new_
Create a new shape attribute.A shape is used to impose a particular ink and logical rectangle on the result of shaping a particular glyph. This might be used, for instance, for embedding a picture or a widget inside a
PangoLayout.- Parameters:
inkRect- ink rectangle to assign to each characterlogicalRect- logical rectangle to assign to each character- Returns:
- the newly allocated
PangoAttribute, which should be freed withAttribute.destroy()
-
newWithData
public static Attribute newWithData(Rectangle inkRect, Rectangle logicalRect, @Nullable MemorySegment data, @Nullable AttrDataCopyFunc copyFunc) Creates a new shape attribute.Like
new_(org.gnome.pango.Rectangle, org.gnome.pango.Rectangle), but a user data pointer is also provided; this pointer can be accessed when later rendering the glyph.- Parameters:
inkRect- ink rectangle to assign to each characterlogicalRect- logical rectangle to assign to each characterdata- user data pointercopyFunc- function to copydatawhen the attribute is copied. Ifnull,datais simply copied as a pointer- Returns:
- the newly allocated
PangoAttribute, which should be freed withAttribute.destroy() - Since:
- 1.8
-