Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef __TENV_H__
Toshihiro Shimizu 890ddd
#define __TENV_H__
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonz4.6\tmacro.h"
Toshihiro Shimizu 890ddd
#include "toonz4.6\avl.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef TNZAPI
Toshihiro Shimizu 890ddd
#ifdef TNZ_IS_COMMONLIB
Toshihiro Shimizu 890ddd
#define TNZAPI TNZ_EXPORT_API
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define TNZAPI TNZ_IMPORT_API
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Prototypes */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*
Toshihiro Shimizu 890ddd
 *  Suffissi:
Shinya Kitaoka 120a6e
 *
Shinya Kitaoka 120a6e
 *    _s : string
Shinya Kitaoka 120a6e
 *    _i : int
Toshihiro Shimizu 890ddd
 *    _c : char
Toshihiro Shimizu 890ddd
 *    _d : double
Toshihiro Shimizu 890ddd
 *    _r : rational (stringa;e.s: per l'aspect ratio "4/3")
Shinya Kitaoka 120a6e
 *
Toshihiro Shimizu 890ddd
 * n.b. non bisogna fare free() delle stringhe ritornate da tenv_get_var_s()
Shinya Kitaoka 120a6e
 *
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*
Shinya Kitaoka 120a6e
 *  La lista completa delle variabili di setup e del tipo a cui sono
Toshihiro Shimizu 890ddd
 *  associate e' mostrato in fondo al file.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Set delle variabili (fanno prima un check)
Toshihiro Shimizu 890ddd
 * Ritornano FALSE se falliscono
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI int tenv_set_var_s(char *var_name, char *value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_set_var_i(char *var_name, int value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_set_var_c(char *var_name, char value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_set_var_d(char *var_name, double value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_set_var_r(char *var_name, char *value);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
/* Get delle variabili
Toshihiro Shimizu 890ddd
 * Ritornano FALSE se falliscono
Toshihiro Shimizu 890ddd
 * Non si deve assolutamente liberare nulla !!
Shinya Kitaoka 120a6e
 * In fondo a questo file viene spiegato come utilizzare
Toshihiro Shimizu 890ddd
 * le seguenti funzioni per tutte le variabili di setup.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_var_s(char *var_name, char **value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_var_i(char *var_name, int *value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_var_c(char *var_name, char *value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_var_d(char *var_name, double *value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_var_r(char *var_name, char **value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Check delle variabili (  range_min <=  value  <= range_max  )
Toshihiro Shimizu 890ddd
 * Ritornano FALSE se falliscono
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_var_s(char *var_name, char *value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_var_i(char *var_name, int value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_var_c(char *var_name, char value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_var_d(char *var_name, double value);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_var_r(char *var_name, char *value);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Ritorna il messaggio di errore settato dalla libreria
Shinya Kitaoka 120a6e
 *
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI char *tenv_get_error_string(void);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Ritorna il codice di errore settato dalla libreria.
Toshihiro Shimizu 890ddd
 * I codici di errore hanno il prefisso TENV_ERR_.
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
int tenv_get_error_code(void);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Error Codes */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_ERR_VARIABLE_TYPE 1
Toshihiro Shimizu 890ddd
#define TENV_ERR_OUT_OF_MEMORY 2
Toshihiro Shimizu 890ddd
#define TENV_ERR_INSERT_VARIABLE 3
Toshihiro Shimizu 890ddd
#define TENV_ERR_REMOVE_VARIABLE 4
Toshihiro Shimizu 890ddd
#define TENV_ERR_FIND_VARIABLE 5
Toshihiro Shimizu 890ddd
#define TENV_ERR_VARIABLE_RANGE 6
Toshihiro Shimizu 890ddd
#define TENV_ERR_VARIABLE_VALUE 7
Toshihiro Shimizu 890ddd
#define TENV_ERR_SETUP_NOT_FOUND 8
Toshihiro Shimizu 890ddd
#define TENV_ERR_SETUP_STAT_FAILED 9
Toshihiro Shimizu 890ddd
#define TENV_ERR_SETUP_OPEN_FAILED 10
Toshihiro Shimizu 890ddd
#define TENV_ERR_TOONZROOT_NOT_FOUND 11
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_OPEN_FAILED 20
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_ITEM_EXIST 21
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_UPDATE_FAILED 22
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_DELETE_FAILED 23
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_REMOVE_FAILED 24
Toshihiro Shimizu 890ddd
#define TENV_ERR_LIST_SET_FAILED 25
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Enums */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
typedef enum {
Shinya Kitaoka 120a6e
  TENV_NONE,
Shinya Kitaoka 120a6e
  TENV_CHAR,
Shinya Kitaoka 120a6e
  TENV_INT,
Shinya Kitaoka 120a6e
  TENV_DOUBLE,
Shinya Kitaoka 120a6e
  TENV_STRING,
Shinya Kitaoka 120a6e
  TENV_STRINGV,
Shinya Kitaoka 120a6e
  TENV_RATIONAL
Toshihiro Shimizu 890ddd
} TENV_TYPES;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
typedef struct {
Shinya Kitaoka 120a6e
  char *alias_str;
Shinya Kitaoka 120a6e
  char *alias_for;
Toshihiro Shimizu 890ddd
} TENV_ALIAS;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Structures */
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
typedef struct {
Shinya Kitaoka 120a6e
  int id;
Shinya Kitaoka 120a6e
  TENV_TYPES type;
Shinya Kitaoka 120a6e
  char *var_name;
Shinya Kitaoka 120a6e
  char *lbl_name;
Shinya Kitaoka 120a6e
  double from, to, step, def, cur;
Shinya Kitaoka 120a6e
  int prec;
Shinya Kitaoka 120a6e
  char *rational_def;
Shinya Kitaoka 120a6e
  char *rational_cur;
Shinya Kitaoka 120a6e
  char *string;
Shinya Kitaoka 120a6e
  int stringv_num;
Shinya Kitaoka 120a6e
  int stringv_cur;
Shinya Kitaoka 120a6e
  int stringv_def;
Shinya Kitaoka 120a6e
  char **stringv;
Shinya Kitaoka 120a6e
  char loaded;
Shinya Kitaoka 120a6e
  int n_aliases;
Shinya Kitaoka 120a6e
  TENV_ALIAS *alias;
Toshihiro Shimizu 890ddd
} TENV_INFO;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Prototypes */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI void tenv_init(void);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI TENV_INFO *tenv_get_var_info(char *var_name);
Toshihiro Shimizu 890ddd
TNZAPI TENV_INFO *tenv_get_first_var(void);
Toshihiro Shimizu 890ddd
TNZAPI TENV_INFO *tenv_get_next_var(void);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_update_current_values(char *fname);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_for_save(char *fname);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_write(char *fname);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_write_def(char *fname);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_varcmp(TENV_INFO *ptr1, TENV_INFO *ptr2);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
TNZAPI int tenv_setups_set(char *setup_name);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_setups_add(char *setup_name);
Shinya Kitaoka 120a6e
TNZAPI int tenv_setups_scan(int (*func)(char *setup_name, void *usr),
Shinya Kitaoka 120a6e
                            void *usr);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_setups_remove(char *setup_name);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_delete_setups_file(void);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_setups_does_exist(char *setup_name);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_setups_update_list(void);
Toshihiro Shimizu 890ddd
TNZAPI char *tenv_get_filesetup(void);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_is_database_enabled(void);
Toshihiro Shimizu 890ddd
TNZAPI void tenv_set_pt_flag(int mode);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_get_pt_flag(void);
Toshihiro Shimizu 890ddd
TNZAPI int tenv_check_cosmo(void);
Toshihiro Shimizu 890ddd
TNZAPI void tenv_refresh(void);
Toshihiro Shimizu 890ddd
TNZAPI void tenv_set_default_filesetup(void);
Toshihiro Shimizu 890ddd
TNZAPI void tenv_rgb_update(char *filesetup);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* Defines */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_ID(p) (p)->id
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_TYPE(p) (p)->type
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_VAR_NAME(p) (p)->var_name
Toshihiro Shimizu 890ddd
#define TENV_LBL_NAME(p) (p)->lbl_name
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_CHAR_FROM(p) (char)(p)->from
Toshihiro Shimizu 890ddd
#define TENV_CHAR_TO(p) (char)(p)->to
Toshihiro Shimizu 890ddd
#define TENV_CHAR_STEP(p) (char)(p)->step
Toshihiro Shimizu 890ddd
#define TENV_CHAR_DEF(p) (char)(p)->def
Toshihiro Shimizu 890ddd
#define TENV_CHAR_CURR(p) (char)(p)->cur
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_INT_FROM(p) (int)(p)->from
Toshihiro Shimizu 890ddd
#define TENV_INT_TO(p) (int)(p)->to
Toshihiro Shimizu 890ddd
#define TENV_INT_STEP(p) (int)(p)->step
Toshihiro Shimizu 890ddd
#define TENV_INT_DEF(p) (int)(p)->def
Toshihiro Shimizu 890ddd
#define TENV_INT_CURR(p) (int)(p)->cur
Toshihiro Shimizu 890ddd
#define TENV_INT_PREC(p) (int)(p)->prec
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_FROM(p) (p)->from
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_TO(p) (p)->to
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_STEP(p) (p)->step
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_DEF(p) (p)->def
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_CURR(p) (p)->cur
Toshihiro Shimizu 890ddd
#define TENV_DOUBLE_PREC(p) (p)->prec
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_FROM(p) (p)->from
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_TO(p) (p)->to
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_STEP(p) (p)->step
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_DEF_N(p) (p)->def
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_CUR_N(p) (p)->cur
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_DEF_S(p) (p)->rational_def
Toshihiro Shimizu 890ddd
#define TENV_RATIONAL_CUR_S(p) (p)->rational_cur
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_STRING(p) (p)->string
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#define TENV_STRINGV_N(p) (p)->stringv_num
Toshihiro Shimizu 890ddd
#define TENV_STRINGV_C(p) (p)->stringv_cur
Toshihiro Shimizu 890ddd
#define TENV_STRINGV_D(p) (p)->stringv_def
Toshihiro Shimizu 890ddd
#define TENV_STRINGV_I(p, i) (p)->stringv[i]
Toshihiro Shimizu 890ddd
#define TENV_STRINGV_P(p) (p)->stringv
Toshihiro Shimizu 890ddd
#define TENV_STRINGV(p) (p)->stringv[TENV_STRINGV_C(p)]
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_CHAR(var_name, lbl_name, from, to, step, def)             \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_CHAR, var_name, lbl_name, from, to, step, def, NULL)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_INT(var_name, lbl_name, from, to, step, def)              \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_INT, var_name, lbl_name, from, to, step, def, NULL)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_DOUBLE(var_name, lbl_name, from, to, step, def, prec)     \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_DOUBLE, var_name, lbl_name, from, to, step, def, prec,    \
Shinya Kitaoka 120a6e
                NULL)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_RATIONAL(var_name, lbl_name, from, to, step, def)         \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_RATIONAL, var_name, lbl_name, from, to, step, def, NULL)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_STRING(var_name, lbl_name, string)                        \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_STRING, var_name, lbl_name, string, NULL)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/* una macro per contare il numero di elementi di un array  */
Toshihiro Shimizu 890ddd
#define NUMBER_OF_ELEMENTS(T) (sizeof(T) / sizeof(T[0]))
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_STRINGV(var_name, lbl_name, stringv, index_of_def)        \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_STRINGV, var_name, lbl_name, stringv,                     \
Shinya Kitaoka 120a6e
                stringv[NUMBER_OF_ELEMENTS(stringv) - 1]                       \
Shinya Kitaoka 120a6e
                    ? NUMBER_OF_ELEMENTS(stringv)                              \
Shinya Kitaoka 120a6e
                    : NUMBER_OF_ELEMENTS(stringv) - 1,                         \
Shinya Kitaoka 120a6e
                index_of_def, NULL)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#define TENV_ADD_VAR_STRINGVV(var_name, lbl_name, stringv, items_num,          \
Shinya Kitaoka 120a6e
                              index_of_def)                                    \
Shinya Kitaoka 120a6e
  tenv_add_node(TENV_STRINGV, var_name, lbl_name, stringv, items_num,          \
Shinya Kitaoka 120a6e
                index_of_def, NULL)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char Tenv_string_error[2048];
Toshihiro Shimizu 890ddd
static int Tenv_code_error;
Shinya Kitaoka 120a6e
static TREE *Tenv_tree  = NULL;
Toshihiro Shimizu 890ddd
static int Tenv_pt_flag = FALSE;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
static char *Tenv_yes_no[]       = {"yes", "no"};
Shinya Kitaoka 120a6e
static char *Tenv_yes_no_u[]     = {"YES", "NO"};
Shinya Kitaoka 120a6e
static char *Tenv_status_mode[]  = {"disabled", "enabled"};
Shinya Kitaoka 120a6e
static char *Tenv_browser_mode[] = {"show all files", "show significant only"};
Shinya Kitaoka 120a6e
static char *Tenv_turn_mode[]    = {"ON", "OFF"};
Shinya Kitaoka 120a6e
static char *Tenv_onion_img_mode[] = {"keep loaded", "load when needed",
Shinya Kitaoka 120a6e
                                      "disabled"};
Toshihiro Shimizu 890ddd
static char *Tenv_flash_viewer[] = {"Internal", "System"};
Shinya Kitaoka 120a6e
static char *Tenv_work_res[] = {"pal",  "ntsc", "640",      "1K",      "1280",
Shinya Kitaoka 120a6e
                                "1.5K", "1840", "1920",     "2K",      "2560",
Shinya Kitaoka 120a6e
                                "3K",   "4K",   "cin_half", "cin_full"};
Toshihiro Shimizu 890ddd
static char *Tenv_camera_prev[] = {"Vertical_Fit(TV)", "Horiz_Fit(Film)"};
Shinya Kitaoka 120a6e
static char *Tenv_fc_trasp[]    = {"white", "black"};
Toshihiro Shimizu 890ddd
static char *Tenv_ddr_connect[] = {"SCSI", "ETHERNET"};
Toshihiro Shimizu 890ddd
static char *Tenv_default_plt[] = {"32 inks + 128 paints",
Shinya Kitaoka 120a6e
                                   "256 inks + 256 paints"};
Shinya Kitaoka 120a6e
static char *Tenv_scanner_dpi[]    = {"LOW", "MEDIUM", "HIGH"};
Shinya Kitaoka 120a6e
static char *Tenv_scanner_tone[]   = {"B&W", "GREYTONES", "RGB"};
Toshihiro Shimizu 890ddd
static char *Tenv_scanner_driver[] = {"INTERNAL"
Toshihiro Shimizu 890ddd
#ifdef WIN32
Shinya Kitaoka 120a6e
                                      ,
Shinya Kitaoka 120a6e
                                      "TWAIN"
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
static char *Tenv_north_south[] = {"NORTH", "SOUTH", "NONE"};
Shinya Kitaoka 120a6e
static char *Tenv_east_west[]   = {"EAST", "WEST", "NONE"};
Shinya Kitaoka 120a6e
static char *Tenv_top_bottom[]  = {"TOP", "BOTTOM"};
Shinya Kitaoka 120a6e
static char *Tenv_autocenter[]  = {"using pegholes", "taped pegbar", "OFF"};
Shinya Kitaoka 120a6e
static char *Tenv_adjust_mode[] = {"BLACK EQ", "HISTOGRAM", "HISTO-L", "NONE"};
Shinya Kitaoka 120a6e
static char *Tenv_compr_mode[]  = {"compressed", "uncompressed"};
Shinya Kitaoka 120a6e
static char *Tenv_tz_compr_mode[] = {"Toonz RLE", "LZW (Toonz 4.2 compatible)"};
Shinya Kitaoka 120a6e
static char *Tenv_matte_chan[]    = {"write", "do_not_write"};
Shinya Kitaoka 120a6e
static char *Tenv_colorstyle[]    = {"gray scale", "full color"};
Shinya Kitaoka 120a6e
static char *Tenv_tga_subtypes[] = {"gray scale", "color mapped", "full color"};
Toshihiro Shimizu 890ddd
static char *Tenv_bmp_subtypes[] = {"black and white", "gray scale",
Shinya Kitaoka 120a6e
                                    "color mapped", "full color"};
Shinya Kitaoka 120a6e
static char *Tenv_orientation[] = {"RIGHT BOTTOM", "RIGHT TOP",  "LEFT BOTTOM",
Shinya Kitaoka 120a6e
                                   "LEFT TOP",     "TOP RIGHT",  "TOP LEFT",
Shinya Kitaoka 120a6e
                                   "BOTTOM RIGHT", "BOTTOM LEFT"};
Shinya Kitaoka 120a6e
static char *Tenv_rgb_bpp[] = {"8 (gray scale)", "24 (RGB)", "32 (RGBM)",
Shinya Kitaoka 120a6e
                               "48 (RGB)", "64 (RGBM)"};
Toshihiro Shimizu 890ddd
static char *Tenv_mm_rgb_bpp[] = {"32 (RGBM)", "64 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_tga_bpp[]    = {"8 (gray scale)",
Shinya Kitaoka 120a6e
                               "8 (fast cmapped-16)",
Shinya Kitaoka 120a6e
                               "8 (fast cmapped-24)",
Shinya Kitaoka 120a6e
                               "8 (fast cmapped-32)",
Shinya Kitaoka 120a6e
                               "8 (smart cmapped-16)",
Shinya Kitaoka 120a6e
                               "8 (smart cmapped-24)",
Shinya Kitaoka 120a6e
                               "8 (smart cmapped-32)",
Shinya Kitaoka 120a6e
                               "16 (RGB)",
Shinya Kitaoka 120a6e
                               "24 (RGB)",
Shinya Kitaoka 120a6e
                               "32 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_mm_tga_bpp[] = {"8 (fast cmapped-32)", "8 (smart cmapped-32)",
Shinya Kitaoka 120a6e
                                  "32 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_tga_bpp_bgt[] = {
Shinya Kitaoka 120a6e
    "8 (gray scale)", "8 (cmapped-16)", "8 (cmapped-24)", "8 (cmapped-32)",
Shinya Kitaoka 120a6e
    "16 (RGB)",       "24 (RGB)",       "32 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_bmp_bpp[] = {"1 (black and white)", "4 (gray scale)",
Shinya Kitaoka 120a6e
                               "8 (gray scale)",      "8 (fast cmapped)",
Shinya Kitaoka 120a6e
                               "8 (smart cmapped)",   "24 (RGB)"};
Shinya Kitaoka 120a6e
static char *Tenv_bmp_bpp_bgt[] = {"1 (black and white)", "4 (gray scale)",
Shinya Kitaoka 120a6e
                                   "8 (gray scale)", "8 (cmapped)", "24 (RGB)"};
Shinya Kitaoka 120a6e
static char *Tenv_jpg_bpp[]      = {"8 (gray scale)", "24 (RGB)"};
Toshihiro Shimizu 890ddd
static char *Tenv_tif_compress[] = {"NONE", "CCITTFAX3", "CCITTFAX4",
Shinya Kitaoka 120a6e
                                    "PACKBITS", "LZW"};
Toshihiro Shimizu 890ddd
static char *Tenv_mm_tif_compress[] = {"NONE", "PACKBITS", "LZW"};
Shinya Kitaoka 120a6e
static char *Tenv_tif_bpp[]         = {"1 (black and white)",
Shinya Kitaoka 120a6e
                               "1 (white and black)",
Shinya Kitaoka 120a6e
                               "8 (gray scale)",
Shinya Kitaoka 120a6e
                               "8 (fast cmapped)",
Shinya Kitaoka 120a6e
                               "8 (smart cmapped)",
Shinya Kitaoka 120a6e
                               "24 (RGB)",
Shinya Kitaoka 120a6e
                               "32 (RGBM)",
Shinya Kitaoka 120a6e
                               "48 (RGB)",
Shinya Kitaoka 120a6e
                               "64 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_mm_tif_bpp[]  = {"32 (RGBM)", "64 (RGBM)"};
Toshihiro Shimizu 890ddd
static char *Tenv_tif_bpp_bgt[] = {"1 (black and white)",
Shinya Kitaoka 120a6e
                                   "1 (white and black)",
Shinya Kitaoka 120a6e
                                   "8 (gray scale)",
Shinya Kitaoka 120a6e
                                   "8 (cmapped)",
Shinya Kitaoka 120a6e
                                   "24 (RGB)",
Shinya Kitaoka 120a6e
                                   "32 (RGBM)",
Shinya Kitaoka 120a6e
                                   "48 (RGB)",
Shinya Kitaoka 120a6e
                                   "64 (RGBM)"};
Shinya Kitaoka 120a6e
static char *Tenv_screen_buf[]  = {"singlebuffer", "doublebuffer"};
Shinya Kitaoka 120a6e
static char *Tenv_loading_pol[] = {"whole level", "first only", "one every 10",
Shinya Kitaoka 120a6e
                                   "one every 4", "one every 2"};
Shinya Kitaoka 120a6e
static char *Tenv_unit_system[] = {"inches/degrees", "pulses", "cm/degrees",
Shinya Kitaoka 120a6e
                                   "mm/degrees"};
Shinya Kitaoka 120a6e
static char *Tenv_field_guide[] = {"cinemascope", "vistavision", "normal",
Shinya Kitaoka 120a6e
                                   "hdtv"};
Toshihiro Shimizu 890ddd
static char *Tenv_frame_count[] = {"by footage", "by number", "by timecode"};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*
Toshihiro Shimizu 890ddd
static char *Tenv_col_order   [] = { "right to left", "left to right" };
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char *Tenv_levcol_move[] = {"click&drag", "ALT+click&drag"};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char *Tenv_numcol_move[] = {"click&drag", "ALT+click&drag"};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
static char *Tenv_xsh_pegbar_look[]  = {"detailed", "bounding box"};
Shinya Kitaoka 120a6e
static char *Tenv_xsh_load_at_once[] = {"yes", "no"};
Shinya Kitaoka 120a6e
static char *Tenv_xsh_column_icon_loading_policy[] = {"immediately",
Shinya Kitaoka 120a6e
                                                      "on demand"};
Shinya Kitaoka 120a6e
static char *Tenv_xsh_level_names[]    = {"repeat at marks", "first cell only"};
Shinya Kitaoka 120a6e
static char *Tenv_xsh_cuts_and_holds[] = {"yes", "no"};
Shinya Kitaoka 120a6e
static char *Tenv_subpix_move[]        = {"all", "none", "only_rgb"};
Shinya Kitaoka 120a6e
static char *Tenv_bpc_prec[]           = {"32 bit", "64 bit"};
Toshihiro Shimizu 890ddd
static char *Tenv_resample_t[] = {"standard_quality", "improved_quality",
Shinya Kitaoka 120a6e
                                  "high_quality"};
Toshihiro Shimizu 890ddd
static char *Tenv_ident_img_h[] = {"link_to_previous",
Shinya Kitaoka 120a6e
                                   "do_not_link_to_previous"};
Shinya Kitaoka 120a6e
static char *Tenv_cosmo_compr[] = {/*"BLACK&WHITE", "GREYTONES",
Shinya Kitaoka 120a6e
                                     "256 COLORS", "4096 COLORS", */
Shinya Kitaoka 120a6e
                                   "COSMO_PAL", "COSMO_NTSC"};
Toshihiro Shimizu 890ddd
static char *Tenv_screen_pix[] = {"16 bit", "32 bit"};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
static char *Tenv_axis_frame[] = {"frame_on_vertical", "frame_on_horizontal"};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char *Tenv_transition[] = {"linear", "speedin/out", "easein/out"};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char *Tenv_buttons_style[] = {"classic", "modern"};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
static char *Tenv_color_res[] = {"1 bit", "8 bit", "full color"};
Toshihiro Shimizu 890ddd
/*---------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
  Per le seguenti variabili di setup fare:
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
           {
Shinya Kitaoka 120a6e
             char *value;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             tenv_get_var_s(var_name, &value);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
           }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- General --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    TOONZ_DATA_BASE
Toshihiro Shimizu 890ddd
    TOONZ_DATA_BASE_STATUS
Toshihiro Shimizu 890ddd
    TOONZ_STUDIO_PLT
Toshihiro Shimizu 890ddd
    TOONZ_WORKING_RES
Toshihiro Shimizu 890ddd
    TOONZ_CAMERA_PREVALENCE
Toshihiro Shimizu 890ddd
    TOONZ_SCREEN_PIXEL       (solo per WINDOWS NT)
Toshihiro Shimizu 890ddd
    FULL_COLOR_TRANSPARENCY
Toshihiro Shimizu 890ddd
    DDR_CONNECTION
Toshihiro Shimizu 890ddd
    TOONZ_DEFAULT_PLT
Toshihiro Shimizu 890ddd
    TOONZ_TZUP_COMPRESSION
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Input --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    INPUT_PAP_FILE
Toshihiro Shimizu 890ddd
    INPUT_SCANNER_DPI
Toshihiro Shimizu 890ddd
    INPUT_SCANNER_TONE
Toshihiro Shimizu 890ddd
    INPUT_PAPER_FEEDER
Toshihiro Shimizu 890ddd
    INPUT_FDG_FILE
Toshihiro Shimizu 890ddd
    INPUT_PEGS
Toshihiro Shimizu 890ddd
    INPUT_NORTH_SOUTH
Toshihiro Shimizu 890ddd
    INPUT_EAST_WEST
Toshihiro Shimizu 890ddd
    INPUT_AUTOPOS
Toshihiro Shimizu 890ddd
    INPUT_AUTOADJUST
Toshihiro Shimizu 890ddd
    INPUT_AUTOADJUST_MODE
Toshihiro Shimizu 890ddd
    INPUT_AUTOCLOSE
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Bgtiler --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    BGTILER_RGB_COMPRESSION
Toshihiro Shimizu 890ddd
    BGTILER_TGA_COMPRESSION
Toshihiro Shimizu 890ddd
    BGTILER_TGA_SUBTYPES
Toshihiro Shimizu 890ddd
    BGTILER_TGA_BITS_PER_PIXEL
Toshihiro Shimizu 890ddd
    BGTILER_TIFF_COMPRESSION
Toshihiro Shimizu 890ddd
    BGTILER_TIFF_BITS_PER_PIXEL
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Pltedit --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    PLT_SCREEN_BUFFERS
Toshihiro Shimizu 890ddd
    PLTEDIT_COLOR_CHIPS_NUM
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Inknpaint --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    INKNPAINT_UNDO
Toshihiro Shimizu 890ddd
    INKNP_COLOR_CHIPS_NUM
Toshihiro Shimizu 890ddd
    INKNPAINT_ONION_SKIN_IMAGE
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Xsheet --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    XSHEET_DEFAULT_LOADING_POLICY
Toshihiro Shimizu 890ddd
    XSHEET_DEFAULT_OUTPUT_IMF
Toshihiro Shimizu 890ddd
    XSHEET_UNITS_SYSTEM
Toshihiro Shimizu 890ddd
    XSHEET_FIELD_GUIDE_TYPE
Toshihiro Shimizu 890ddd
    XSHEET_GRAPH_AXIS_FRAME
Toshihiro Shimizu 890ddd
    FRAME_COUNTER
Toshihiro Shimizu 890ddd
    COLUMN_ORDER
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Casm --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    CASM_SUBPIXEL_MOVE
Toshihiro Shimizu 890ddd
    CASM_RESAMPLE_TYPE
Toshihiro Shimizu 890ddd
    IDENTICAL_IMAGES_HANDLER
Toshihiro Shimizu 890ddd
    CASM_RGB_SUBTYPE
Toshihiro Shimizu 890ddd
    CASM_RGB_WRITE_MATTE
Toshihiro Shimizu 890ddd
    CASM_TGA_COMPRESSION
Toshihiro Shimizu 890ddd
    CASM_TGA_SUBTYPES
Toshihiro Shimizu 890ddd
    CASM_TGA_BITS_PER_PIXEL
Toshihiro Shimizu 890ddd
    CASM_TIFF_ORIENTATION
Toshihiro Shimizu 890ddd
    CASM_TIFF_COMPRESSION
Toshihiro Shimizu 890ddd
    CASM_TIFF_BITS_PER_PIXEL
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Eth rec --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    TOONZ_RECDEV_NET
Toshihiro Shimizu 890ddd
    TOONZ_REMOTE_DDR_USER
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    -- Flip --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
    AUTO_SCREEN_FIT
Toshihiro Shimizu 890ddd
    COSMO_CAMERA_DEFAULT
Toshihiro Shimizu 890ddd
    COMPRESSION_DEFAULT
Toshihiro Shimizu 890ddd
    LOAD_FULL_COLOR_LEVELS
Toshihiro Shimizu 890ddd
    FILL_UNPAINTED_LEVELS
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
                ****************************************
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  Per le seguenti variabili di setup fare:
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
           {
Shinya Kitaoka 120a6e
             int value;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             tenv_get_var_i(var_name, &value);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
           }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   -- General --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   TOONZ_FRAMERATE
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   -- Input
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   INPUT_SCANNER_BRIGHTNESS
Toshihiro Shimizu 890ddd
   INPUT_SCANNER_CONTRAST
Toshihiro Shimizu 890ddd
   INPUT_SCANNER_THRESHOLD
Toshihiro Shimizu 890ddd
   INPUT_SHARPNESS
Toshihiro Shimizu 890ddd
   INPUT_PROCESS_BRIGHTNESS
Toshihiro Shimizu 890ddd
   INPUT_PROCESS_CONTRAST
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   -- Inknpaint --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   TOONZ_FILL_DEPTH
Toshihiro Shimizu 890ddd
   TOONZ_SHIFT_FILL_DEPTH
Toshihiro Shimizu 890ddd
   RECTACLOSE_DISTANCE
Toshihiro Shimizu 890ddd
   RECTACLOSE_ANGLE
Toshihiro Shimizu 890ddd
   RECTACLOSE_USED_INK
Toshihiro Shimizu 890ddd
   RECTACLOSE_INK_OPACITY
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   -- Xsheet --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CAMERA_FIELD
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_FIELD_GUIDE_SIZE
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CAMERA_XRES
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CLC_RED
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CLC_GREEN
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CLC_BLUE
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_CLC_MATTE
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_SUBSAMPLING
Toshihiro Shimizu 890ddd
   XSHEET_DEFAULT_BG_SUBSAMPLING
Toshihiro Shimizu 890ddd
   XSHEET_MARKER
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
                ****************************************
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  Per le seguenti variabili di setup fare:
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
           {
Shinya Kitaoka 120a6e
             double value;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             tenv_get_var_d(var_name, &value);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
             .
Shinya Kitaoka 120a6e
           }
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  -- Input --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  INPUT_ASPECT_RATIO
Toshihiro Shimizu 890ddd
  INPUT_FIELD_SIZE
Toshihiro Shimizu 890ddd
  INPUT_NORTH_SOUTH_SHIFT
Toshihiro Shimizu 890ddd
  INPUT_EAST_WEST_SHIFT
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  -- Xsheet --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  XSHEET_DEFAULT_CAMERA_AR
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  -- Casm --
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
  CASM_RENDER_TILE
Toshihiro Shimizu 890ddd
  CASM_MEMORY_CHUNK
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
Toshihiro Shimizu 890ddd
---------------------------------------------------------------------------*/
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif /* __TENV_H__ */