module FFI::BitMasks

Adds bitmask types to FFI libraries.

Constants

VERSION

ffi-bit_masks version

Public Instance Methods

bit_mask(name,flags,type=:uint) click to toggle source

Defines a new bitmask.

@param [Symbol] name

The name of the bitmask.

@param [Hash{Symbol => Integer}] flags

The flags and their masks.

@param [Symbol] type

The underlying type.

@return [BitMask]

The new bitmask.
# File lib/ffi/bit_masks.rb, line 24
def bit_mask(name,flags,type=:uint)
  bit_mask = BitMask.new(flags,type)

  typedef(bit_mask,name)
  return bit_mask
end