Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#if !defined(TOONZ_PARAMS_H__)
Toshihiro Shimizu 890ddd
#define TOONZ_PARAMS_H__
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <toonz_plugin.h></toonz_plugin.h>
Toshihiro Shimizu 890ddd
//#include <toonz_hostif.h></toonz_hostif.h>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#if defined(_MSC_VER)
Toshihiro Shimizu 890ddd
#pragma pack(push, 1)
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#if defined(DEFAULT)
Toshihiro Shimizu 890ddd
/* remove creepy macro in tcommon.h */
Toshihiro Shimizu 890ddd
#undef DEFAULT
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_double_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_DOUBLE;
Shinya Kitaoka 120a6e
  static const int RANGED  = 1;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef double valuetype;
Shinya Kitaoka 120a6e
  typedef double iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  double def;
Shinya Kitaoka 120a6e
  double min, max;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_double_t_ toonz_param_traits_double_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_int_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_INT;
Shinya Kitaoka 120a6e
  static const int RANGED  = 1;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef int valuetype;
Shinya Kitaoka 120a6e
  typedef int iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  int def;
Shinya Kitaoka 120a6e
  int min, max;
Shinya Kitaoka 120a6e
  int reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_int_t_ toonz_param_traits_int_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_range_t_ {
Shinya Kitaoka 120a6e
  double a, b;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_range_t_ toonz_param_range_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_range_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_RANGE;
Shinya Kitaoka 120a6e
  static const int RANGED  = 1;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef toonz_param_range_t valuetype;
Shinya Kitaoka 120a6e
  typedef toonz_param_range_t iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  toonz_param_range_t def;
Shinya Kitaoka 120a6e
  toonz_param_range_t minmax;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_range_t_ toonz_param_traits_range_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_color_t_ {
Shinya Kitaoka 120a6e
  int c0, c1, c2, m;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_color_t_ toonz_param_color_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_color_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_PIXEL;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef toonz_param_color_t valuetype;
Shinya Kitaoka 120a6e
  typedef toonz_param_color_t iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  toonz_param_color_t def;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_color_t_ toonz_param_traits_color_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_point_t_ {
Shinya Kitaoka 120a6e
  double x, y;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_point_t_ toonz_param_point_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_point_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_POINT;
Shinya Kitaoka 120a6e
  static const int RANGED  = 1;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef toonz_param_point_t valuetype;
Shinya Kitaoka 120a6e
  typedef toonz_param_point_t iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  toonz_param_point_t def;
Shinya Kitaoka 120a6e
  toonz_param_point_t min;
Shinya Kitaoka 120a6e
  toonz_param_point_t max;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_point_t_ toonz_param_traits_point_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_enum_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_ENUM;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef int valuetype;
Shinya Kitaoka 120a6e
  typedef int iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  int def;
Shinya Kitaoka 120a6e
  int enums;
Shinya Kitaoka 120a6e
  const char **array;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_enum_t_ toonz_param_traits_enum_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_bool_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_BOOL;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef int valuetype;
Shinya Kitaoka 120a6e
  typedef int iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  int def;
Shinya Kitaoka 120a6e
  int reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_bool_t_ toonz_param_traits_bool_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_spectrum_t_ {
Shinya Kitaoka 120a6e
  double w;
Shinya Kitaoka 120a6e
  double c0, c1, c2, m;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_spectrum_t_ toonz_param_spectrum_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_spectrum_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_SPECTRUM;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef toonz_param_spectrum_t valuetype;
Shinya Kitaoka 120a6e
  typedef toonz_param_spectrum_t iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  double def;
Shinya Kitaoka 120a6e
  int points;
Shinya Kitaoka 120a6e
  toonz_param_spectrum_t *array;
Shinya Kitaoka 120a6e
  int reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_spectrum_t_ toonz_param_traits_spectrum_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_string_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_STRING;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 1;
Shinya Kitaoka 120a6e
  typedef const char *valuetype;
Shinya Kitaoka 120a6e
  typedef char iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  const char *def;
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_string_t_ toonz_param_traits_string_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_tonecurve_point_t_ {
Shinya Kitaoka 120a6e
  double x, y;
Shinya Kitaoka 120a6e
  double c0, c1, c2, c3;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_tonecurve_point_t_ toonz_param_tonecurve_point_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_tonecurve_value_t_ {
Shinya Kitaoka 120a6e
  double x;
Shinya Kitaoka 120a6e
  double y;
Shinya Kitaoka 120a6e
  int channel;
Shinya Kitaoka 120a6e
  int interp;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
typedef toonz_param_tonecurve_value_t_ toonz_param_tonecurve_value_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_traits_tonecurve_t_ {
Toshihiro Shimizu 890ddd
#if defined(__cplusplus)
Shinya Kitaoka 120a6e
  static const int E       = TOONZ_PARAM_TYPE_TONECURVE;
Shinya Kitaoka 120a6e
  static const int RANGED  = 0;
Shinya Kitaoka 120a6e
  static const int DEFAULT = 0;
Shinya Kitaoka 120a6e
  typedef toonz_param_tonecurve_point_t valuetype;
Shinya Kitaoka 120a6e
  typedef toonz_param_tonecurve_value_t iovaluetype;
Toshihiro Shimizu 890ddd
#endif
Shinya Kitaoka 120a6e
  double reserved_;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef toonz_param_traits_tonecurve_t_ toonz_param_traits_tonecurve_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TOONZ_PARAM_DESC_TYPE_PARAM (0)
Toshihiro Shimizu 890ddd
#define TOONZ_PARAM_DESC_TYPE_PAGE (1)
Toshihiro Shimizu 890ddd
#define TOONZ_PARAM_DESC_TYPE_GROUP (2)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_base_t_ {
Shinya Kitaoka 120a6e
  toonz_if_version_t ver;
Shinya Kitaoka 120a6e
  int type;
Shinya Kitaoka 120a6e
  const char *label;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_desc_t_ {
Shinya Kitaoka 120a6e
  struct toonz_param_base_t_ base;
Shinya Kitaoka 120a6e
  const char *key;
Shinya Kitaoka 120a6e
  const char *note;
Shinya Kitaoka 120a6e
  void *reserved_[2];
Shinya Kitaoka 120a6e
  int traits_tag;
Shinya Kitaoka 120a6e
  union {
Shinya Kitaoka 120a6e
    toonz_param_traits_double_t d;
Shinya Kitaoka 120a6e
    toonz_param_traits_int_t i;
Shinya Kitaoka 120a6e
    toonz_param_traits_enum_t e;
Shinya Kitaoka 120a6e
    toonz_param_traits_range_t rd;
Shinya Kitaoka 120a6e
    toonz_param_traits_bool_t b;
Shinya Kitaoka 120a6e
    toonz_param_traits_color_t c;
Shinya Kitaoka 120a6e
    toonz_param_traits_point_t p;
Shinya Kitaoka 120a6e
    toonz_param_traits_spectrum_t g;
Shinya Kitaoka 120a6e
    toonz_param_traits_string_t s;
Shinya Kitaoka 120a6e
    toonz_param_traits_tonecurve_t t;
Shinya Kitaoka 120a6e
  } traits;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef struct toonz_param_desc_t_ toonz_param_desc_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_group_t_ {
Shinya Kitaoka 120a6e
  struct toonz_param_base_t_ base;
Shinya Kitaoka 120a6e
  int num;
Shinya Kitaoka 120a6e
  toonz_param_desc_t *array;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef struct toonz_param_group_t_ toonz_param_group_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
struct toonz_param_page_t_ {
Shinya Kitaoka 120a6e
  struct toonz_param_base_t_ base;
Shinya Kitaoka 120a6e
  int num;
Shinya Kitaoka 120a6e
  toonz_param_group_t *array;
Toshihiro Shimizu 890ddd
} TOONZ_PACK;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef struct toonz_param_page_t_ toonz_param_page_t;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#if defined(_MSC_VER)
Toshihiro Shimizu 890ddd
#pragma pack(pop)
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif