Package org.freedesktop.harfbuzz
Enum Class MemoryMode
- All Implemented Interfaces:
Serializable,Comparable<MemoryMode>,Constable,Enumeration
@Generated("io.github.jwharm.JavaGI")
public enum MemoryMode
extends Enum<MemoryMode>
implements Enumeration
Data type holding the memory modes available to
client programs.
Regarding these various memory-modes:
- In no case shall the HarfBuzz client modify memory
that is passed to HarfBuzz in a blob. If there is
any such possibility,
HBMEMORYMODEDUPLICATEshould be used such that HarfBuzz makes a copy immediately,
- Use
HBMEMORYMODEREADONLYotherwise, unless you really really really know what you are doing,
HBMEMORYMODEWRITABLEis appropriate if you really made a copy of data solely for the purpose of passing to HarfBuzz and doing that just once (no reuse!),
- If the font is mmap()ed, it's okay to use
HBMEMORYMODEREADONLYMAYMAKEWRITABLE,however, using that mode correctly is very tricky. UseHBMEMORYMODEREADONLYinstead.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHarfBuzz immediately makes a copy of the data.HarfBuzz client will never modify the data, and HarfBuzz will never modify the data.See aboveHarfBuzz client made a copy of the data solely for HarfBuzz, so HarfBuzz may modify the data. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypegetType()Get the GType of the MemoryMode classintgetValue()Get the numeric value of this enumstatic MemoryModeof(int value) Create a new MemoryMode for the provided valuestatic MemoryModeof(MemorySegment address) Create a new MemoryMode for the value in the provided memory address.static MemoryModeReturns the enum constant of this class with the specified name.static MemoryMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DUPLICATE
HarfBuzz immediately makes a copy of the data. -
READONLY
HarfBuzz client will never modify the data, and HarfBuzz will never modify the data. -
WRITABLE
HarfBuzz client made a copy of the data solely for HarfBuzz, so HarfBuzz may modify the data. -
READONLY_MAY_MAKE_WRITABLE
See above
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
of
Create a new MemoryMode for the provided value- Parameters:
value- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValuein interfaceEnumeration- Returns:
- the enum value
-
of
Create a new MemoryMode for the value in the provided memory address.- Parameters:
address- the memory address holding a enum value- Returns:
- the enum for the value in the provided memory address
-
getType
-