File src/gnome/enum.c

Functions

TYPE_NAME_VAR (varname, ts) Return a string representation of the given ENUM or FLAGS.
local enum_add_sub (L, mode) Perform an "addition" or "subtraction" on an enum.
local enum_tonumber (enum) In order to see the numerical value of ENUM or FLAG, or to compare it with a number, use this method.
lg_get_constant (L, index, ts, raise_error) Retrieve the value of an enum on the Lua stack.
lg_push_constant (L, ts, value) Create a userdata representing an ENUM value


Functions

TYPE_NAME_VAR (varname, ts)
Return a string representation of the given ENUM or FLAGS. It is in the form enumtype:value|value|value

Parameters

  • varname:
  • ts:
local enum_add_sub (L, mode)
Perform an "addition" or "subtraction" on an enum. The enum must actually be a flag field; do a bitwise OR with the parameter, which must be a flags field of the same type.

Parameters

  • L:
  • mode: 0=addition, 1=subtraction
local enum_tonumber (enum)
In order to see the numerical value of ENUM or FLAG, or to compare it with a number, use this method. value = enum_var:tonumber()

Parameters

  • enum:

Return values:

  1. the integer value (may be negative)
lg_get_constant (L, index, ts, raise_error)
Retrieve the value of an enum on the Lua stack. Optionally check the enum type.

Parameters

  • L:
  • index:
  • ts:
  • raise_error:
lg_push_constant (L, ts, value)
Create a userdata representing an ENUM value

Parameters

  • L:
  • ts:
  • value:

Return value:

1

Valid XHTML 1.0!