Aw object data camera

From ActiveWiki
Jump to navigation Jump to search
aw_object_data_camera

Description

Defines the data structure in AW_OBJECT_DATA of a camera object.

Notes

(This is preliminary documentation and is subject to change)

// AW_OBJECT_TYPE_CAMERA
typedef struct aw_object_data_camera {
  unsigned char         version;      // structure version (set by SDK)
  unsigned short        flags;
  float                 zoom;
  unsigned char         name_len;     // length of 1st string in str_data
  char                  reserved[12]; // Bytes reserverd for future use
  // note: increase the strucure's total size
  // by the length of the strings
  // when allocating memory for this structure!
  // (str_data is the reference to the first byte)
  char                  str_data[1];
} aw_object_data_camera;


The total length of the data is calculated as:

len = sizeof (aw_object_data_camera) + camera->name_len;


See also

aw_data, AW_OBJECT_DATA, AW_OBJECT_TYPE, AW_EVENT_OBJECT_ADD