#![allow(non_camel_case_types)]

extern crate libc;
use libc::{c_long,c_int,c_uint,c_char,c_void,c_double};
use std::fmt;

/* automatically generated by rust-bindgen */


pub type ptrdiff_t = c_long;
pub use libc::size_t;
pub type wchar_t = c_int;
pub enum Union_Sass_Value { }
pub type Enum_Sass_Tag = c_uint;
pub const SASS_BOOLEAN: c_uint = 0;
pub const SASS_NUMBER: c_uint = 1;
pub const SASS_COLOR: c_uint = 2;
pub const SASS_STRING: c_uint = 3;
pub const SASS_LIST: c_uint = 4;
pub const SASS_MAP: c_uint = 5;
pub const SASS_NULL: c_uint = 6;
pub const SASS_ERROR: c_uint = 7;
pub const SASS_WARNING: c_uint = 8;
pub type Enum_Sass_Separator = c_uint;
pub const SASS_COMMA: c_uint = 0;
pub const SASS_SPACE: c_uint = 1;
pub enum Struct_Sass_Import { }
pub enum Struct_Sass_C_Import_Descriptor { }
pub type Sass_C_Import_Callback = *mut c_void;
pub type Sass_C_Import_Fn =
    ::std::option::Option<extern "C" fn
                              (url: *const c_char,
                               prev: *const c_char,
                               cookie: *mut c_void)
                              -> *mut *mut Struct_Sass_Import>;
pub enum Struct_Sass_C_Function_Descriptor { }
pub type Sass_C_Function_List = *mut c_void;
pub type Sass_C_Function_Callback = *mut c_void;
pub type Sass_C_Function =
    ::std::option::Option<extern "C" fn
                              (arg1: *const Union_Sass_Value,
                               cookie: *mut c_void)
                              -> *mut Union_Sass_Value>;
pub type Enum_Sass_Output_Style = c_uint;
pub const SASS_STYLE_NESTED: c_uint = 0;
pub const SASS_STYLE_EXPANDED: c_uint = 1;
pub const SASS_STYLE_COMPACT: c_uint = 2;
pub const SASS_STYLE_COMPRESSED: c_uint = 3;

pub enum Struct_Sass_Compiler { }
pub enum Struct_Sass_Options { }
pub enum Struct_Sass_Context { }
pub enum Struct_Sass_File_Context { }
pub enum Struct_Sass_Data_Context { }

unsafe impl Send for Struct_Sass_Context {}
unsafe impl Send for Struct_Sass_Options {}
unsafe impl Send for Union_Sass_Value {}

impl fmt::Debug for Struct_Sass_Options {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Struct_Sass_Options {:p}", self)
    }
}

impl fmt::Debug for Union_Sass_Value {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "Union_Sass_Value {:p}", self)
    }
}

extern "C" {
  pub fn sass_value_get_tag(v: *const Union_Sass_Value) -> Enum_Sass_Tag;
  pub fn sass_value_is_null(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_number(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_string(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_boolean(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_color(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_list(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_map(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_error(v: *const Union_Sass_Value) -> u8;
  pub fn sass_value_is_warning(v: *const Union_Sass_Value) -> u8;
  pub fn sass_number_get_value(v: *const Union_Sass_Value)
   -> c_double;
  pub fn sass_number_set_value(v: *mut Union_Sass_Value,
                               value: c_double) -> ();
  pub fn sass_number_get_unit(v: *const Union_Sass_Value)
   -> *const c_char;
  pub fn sass_number_set_unit(v: *mut Union_Sass_Value,
                              unit: *mut c_char) -> ();
  pub fn sass_string_get_value(v: *const Union_Sass_Value)
   -> *const c_char;
  pub fn sass_string_set_value(v: *mut Union_Sass_Value,
                               value: *mut c_char) -> ();
  pub fn sass_boolean_get_value(v: *const Union_Sass_Value) -> u8;
  pub fn sass_boolean_set_value(v: *mut Union_Sass_Value, value: u8) -> ();
  pub fn sass_color_get_r(v: *const Union_Sass_Value) -> c_double;
  pub fn sass_color_set_r(v: *mut Union_Sass_Value, r: c_double)
   -> ();
  pub fn sass_color_get_g(v: *const Union_Sass_Value) -> c_double;
  pub fn sass_color_set_g(v: *mut Union_Sass_Value, g: c_double)
   -> ();
  pub fn sass_color_get_b(v: *const Union_Sass_Value) -> c_double;
  pub fn sass_color_set_b(v: *mut Union_Sass_Value, b: c_double)
   -> ();
  pub fn sass_color_get_a(v: *const Union_Sass_Value) -> c_double;
  pub fn sass_color_set_a(v: *mut Union_Sass_Value, a: c_double)
   -> ();
  pub fn sass_list_get_length(v: *const Union_Sass_Value) -> size_t;
  pub fn sass_list_get_separator(v: *const Union_Sass_Value)
   -> Enum_Sass_Separator;
  pub fn sass_list_set_separator(v: *mut Union_Sass_Value,
                                 value: Enum_Sass_Separator) -> ();
  pub fn sass_list_get_value(v: *const Union_Sass_Value, i: size_t)
   -> *mut Union_Sass_Value;
  pub fn sass_list_set_value(v: *mut Union_Sass_Value, i: size_t,
                             value: *mut Union_Sass_Value) -> ();
  pub fn sass_map_get_length(v: *const Union_Sass_Value) -> size_t;
  pub fn sass_map_get_key(v: *const Union_Sass_Value, i: size_t)
   -> *mut Union_Sass_Value;
  pub fn sass_map_set_key(v: *mut Union_Sass_Value, i: size_t,
                          arg1: *mut Union_Sass_Value) -> ();
  pub fn sass_map_get_value(v: *const Union_Sass_Value, i: size_t)
   -> *mut Union_Sass_Value;
  pub fn sass_map_set_value(v: *mut Union_Sass_Value, i: size_t,
                            arg1: *mut Union_Sass_Value) -> ();
  pub fn sass_error_get_message(v: *const Union_Sass_Value)
   -> *mut c_char;
  pub fn sass_error_set_message(v: *mut Union_Sass_Value,
                                msg: *mut c_char) -> ();
  pub fn sass_warning_get_message(v: *const Union_Sass_Value)
   -> *mut c_char;
  pub fn sass_warning_set_message(v: *mut Union_Sass_Value,
                                  msg: *mut c_char) -> ();
  pub fn sass_make_null() -> *mut Union_Sass_Value;
  pub fn sass_make_boolean(val: u8) -> *mut Union_Sass_Value;
  pub fn sass_make_string(val: *const c_char)
   -> *mut Union_Sass_Value;
  pub fn sass_make_number(val: c_double,
                          unit: *const c_char)
   -> *mut Union_Sass_Value;
  pub fn sass_make_color(r: c_double, g: c_double,
                         b: c_double, a: c_double)
   -> *mut Union_Sass_Value;
  pub fn sass_make_list(len: size_t, sep: Enum_Sass_Separator)
   -> *mut Union_Sass_Value;
  pub fn sass_make_map(len: size_t) -> *mut Union_Sass_Value;
  pub fn sass_make_error(msg: *const c_char)
   -> *mut Union_Sass_Value;
  pub fn sass_make_warning(msg: *const c_char)
   -> *mut Union_Sass_Value;
  pub fn sass_delete_value(val: *mut Union_Sass_Value) -> ();
  pub fn sass_clone_value(val: *const Union_Sass_Value)
   -> *mut Union_Sass_Value;
  pub fn sass_make_importer(arg1: Sass_C_Import_Fn,
                            cookie: *mut c_void)
   -> Sass_C_Import_Callback;
  pub fn sass_import_get_function(_fn: Sass_C_Import_Callback)
   -> Sass_C_Import_Fn;
  pub fn sass_import_get_cookie(_fn: Sass_C_Import_Callback)
   -> *mut c_void;
  pub fn sass_delete_importer(_fn: Sass_C_Import_Callback) -> ();
  pub fn sass_make_import_list(length: size_t)
   -> *mut *mut Struct_Sass_Import;
  pub fn sass_make_import_entry(path: *const c_char,
                                source: *mut c_char,
                                srcmap: *mut c_char)
   -> *mut Struct_Sass_Import;
  pub fn sass_make_import(path: *const c_char,
                          base: *const c_char,
                          source: *mut c_char,
                          srcmap: *mut c_char)
   -> *mut Struct_Sass_Import;
  pub fn sass_import_set_list_entry(list: *mut *mut Struct_Sass_Import,
                                    idx: size_t,
                                    entry: *mut Struct_Sass_Import) -> ();
  pub fn sass_import_get_list_entry(list: *mut *mut Struct_Sass_Import,
                                    idx: size_t) -> *mut Struct_Sass_Import;
  pub fn sass_import_get_path(arg1: *mut Struct_Sass_Import)
   -> *const c_char;
  pub fn sass_import_get_base(arg1: *mut Struct_Sass_Import)
   -> *const c_char;
  pub fn sass_import_get_source(arg1: *mut Struct_Sass_Import)
   -> *const c_char;
  pub fn sass_import_get_srcmap(arg1: *mut Struct_Sass_Import)
   -> *const c_char;
  pub fn sass_import_take_source(arg1: *mut Struct_Sass_Import)
   -> *mut c_char;
  pub fn sass_import_take_srcmap(arg1: *mut Struct_Sass_Import)
   -> *mut c_char;
  pub fn sass_delete_import_list(arg1: *mut *mut Struct_Sass_Import) -> ();
  pub fn sass_delete_import(arg1: *mut Struct_Sass_Import) -> ();
  pub fn sass_make_function_list(length: size_t) -> Sass_C_Function_List;
  pub fn sass_make_function(signature: *const c_char,
                            _fn: Sass_C_Function,
                            cookie: *mut c_void)
   -> Sass_C_Function_Callback;
  pub fn sass_function_get_list_entry(list: Sass_C_Function_List,
                                      pos: size_t)
   -> Sass_C_Function_Callback;
  pub fn sass_function_set_list_entry(list: Sass_C_Function_List,
                                      pos: size_t,
                                      cb: Sass_C_Function_Callback) -> ();
  pub fn sass_function_get_signature(_fn: Sass_C_Function_Callback)
   -> *const c_char;
  pub fn sass_function_get_function(_fn: Sass_C_Function_Callback)
   -> Sass_C_Function;
  pub fn sass_function_get_cookie(_fn: Sass_C_Function_Callback)
   -> *mut c_void;
  pub fn sass_string_quote(str: *const c_char,
                           quotemark: c_char)
   -> *mut c_char;
  pub fn sass_string_unquote(str: *const c_char)
   -> *mut c_char;
  pub fn libsass_version() -> *const c_char;
  pub fn sass_make_options() -> *mut Struct_Sass_Options;
  pub fn sass_make_file_context(input_path: *const c_char)
   -> *mut Struct_Sass_File_Context;
  pub fn sass_make_data_context(source_string: *mut c_char)
   -> *mut Struct_Sass_Data_Context;
  pub fn sass_compile_file_context(ctx: *mut Struct_Sass_File_Context)
   -> c_int;
  pub fn sass_compile_data_context(ctx: *mut Struct_Sass_Data_Context)
   -> c_int;
  pub fn sass_make_file_compiler(file_ctx: *mut Struct_Sass_File_Context)
   -> *mut Struct_Sass_Compiler;
  pub fn sass_make_data_compiler(data_ctx: *mut Struct_Sass_Data_Context)
   -> *mut Struct_Sass_Compiler;
  pub fn sass_compiler_parse(compiler: *mut Struct_Sass_Compiler)
   -> c_int;
  pub fn sass_compiler_execute(compiler: *mut Struct_Sass_Compiler)
   -> c_int;
  pub fn sass_delete_compiler(compiler: *mut Struct_Sass_Compiler) -> ();
  pub fn sass_delete_file_context(ctx: *mut Struct_Sass_File_Context) -> ();
  pub fn sass_delete_data_context(ctx: *mut Struct_Sass_Data_Context) -> ();
  pub fn sass_file_context_get_context(file_ctx:
                                           *mut Struct_Sass_File_Context)
   -> *mut Struct_Sass_Context;
  pub fn sass_data_context_get_context(data_ctx:
                                           *mut Struct_Sass_Data_Context)
   -> *mut Struct_Sass_Context;
  pub fn sass_context_get_options(ctx: *mut Struct_Sass_Context)
   -> *mut Struct_Sass_Options;
  pub fn sass_file_context_get_options(file_ctx:
                                           *mut Struct_Sass_File_Context)
   -> *mut Struct_Sass_Options;
  pub fn sass_data_context_get_options(data_ctx:
                                           *mut Struct_Sass_Data_Context)
   -> *mut Struct_Sass_Options;
  pub fn sass_file_context_set_options(file_ctx:
                                           *mut Struct_Sass_File_Context,
                                       opt: *mut Struct_Sass_Options) -> ();
  pub fn sass_data_context_set_options(data_ctx:
                                           *mut Struct_Sass_Data_Context,
                                       opt: *mut Struct_Sass_Options) -> ();
  pub fn sass_option_get_precision(options: *mut Struct_Sass_Options)
   -> c_int;
  pub fn sass_option_get_output_style(options: *mut Struct_Sass_Options)
   -> Enum_Sass_Output_Style;
  pub fn sass_option_get_source_comments(options: *mut Struct_Sass_Options)
   -> u8;
  pub fn sass_option_get_source_map_embed(options: *mut Struct_Sass_Options)
   -> u8;
  pub fn sass_option_get_source_map_contents(options:
                                                 *mut Struct_Sass_Options)
   -> u8;
  pub fn sass_option_get_omit_source_map_url(options:
                                                 *mut Struct_Sass_Options)
   -> u8;
  pub fn sass_option_get_is_indented_syntax_src(options:
                                                    *mut Struct_Sass_Options)
   -> u8;
  pub fn sass_option_get_input_path(options: *mut Struct_Sass_Options)
   -> *const c_char;
  pub fn sass_option_get_output_path(options: *mut Struct_Sass_Options)
   -> *const c_char;
  pub fn sass_option_get_image_path(options: *mut Struct_Sass_Options)
   -> *const c_char;
  pub fn sass_option_get_include_path(options: *mut Struct_Sass_Options)
   -> *const c_char;
  pub fn sass_option_get_source_map_file(options: *mut Struct_Sass_Options)
   -> *const c_char;
  pub fn sass_option_get_c_functions(options: *mut Struct_Sass_Options)
   -> Sass_C_Function_List;
  pub fn sass_option_get_importer(options: *mut Struct_Sass_Options)
   -> Sass_C_Import_Callback;
  pub fn sass_option_set_precision(options: *mut Struct_Sass_Options,
                                   precision: c_int) -> ();
  pub fn sass_option_set_output_style(options: *mut Struct_Sass_Options,
                                      output_style: Enum_Sass_Output_Style)
   -> ();
  pub fn sass_option_set_source_comments(options: *mut Struct_Sass_Options,
                                         source_comments: u8) -> ();
  pub fn sass_option_set_source_map_embed(options: *mut Struct_Sass_Options,
                                          source_map_embed: u8) -> ();
  pub fn sass_option_set_source_map_contents(options:
                                                 *mut Struct_Sass_Options,
                                             source_map_contents: u8) -> ();
  pub fn sass_option_set_omit_source_map_url(options:
                                                 *mut Struct_Sass_Options,
                                             omit_source_map_url: u8) -> ();
  pub fn sass_option_set_is_indented_syntax_src(options:
                                                    *mut Struct_Sass_Options,
                                                is_indented_syntax_src: u8)
   -> ();
  pub fn sass_option_set_input_path(options: *mut Struct_Sass_Options,
                                    input_path: *const c_char)
   -> ();
  pub fn sass_option_set_output_path(options: *mut Struct_Sass_Options,
                                     output_path: *const c_char)
   -> ();
  pub fn sass_option_set_image_path(options: *mut Struct_Sass_Options,
                                    image_path: *const c_char)
   -> ();
  pub fn sass_option_set_include_path(options: *mut Struct_Sass_Options,
                                      include_path: *const c_char)
   -> ();
  pub fn sass_option_set_source_map_file(options: *mut Struct_Sass_Options,
                                         source_map_file:
                                             *const c_char) -> ();
  pub fn sass_option_set_c_functions(options: *mut Struct_Sass_Options,
                                     c_functions: Sass_C_Function_List)
   -> ();
  pub fn sass_option_set_importer(options: *mut Struct_Sass_Options,
                                  importer: Sass_C_Import_Callback) -> ();
  pub fn sass_context_get_output_string(ctx: *mut Struct_Sass_Context)
   -> *const c_char;
  pub fn sass_context_get_error_status(ctx: *mut Struct_Sass_Context)
   -> c_int;
  pub fn sass_context_get_error_json(ctx: *mut Struct_Sass_Context)
   -> *const c_char;
  pub fn sass_context_get_error_message(ctx: *mut Struct_Sass_Context)
   -> *const c_char;
  pub fn sass_context_get_error_file(ctx: *mut Struct_Sass_Context)
   -> *const c_char;
  pub fn sass_context_get_error_line(ctx: *mut Struct_Sass_Context)
   -> size_t;
  pub fn sass_context_get_error_column(ctx: *mut Struct_Sass_Context)
   -> size_t;
  pub fn sass_context_get_source_map_string(ctx: *mut Struct_Sass_Context)
   -> *const c_char;
  pub fn sass_context_get_included_files(ctx: *mut Struct_Sass_Context)
   -> *mut *mut c_char;
  pub fn sass_context_take_error_json(ctx: *mut Struct_Sass_Context)
   -> *mut c_char;
  pub fn sass_context_take_error_message(ctx: *mut Struct_Sass_Context)
   -> *mut c_char;
  pub fn sass_context_take_error_file(ctx: *mut Struct_Sass_Context)
   -> *mut c_char;
  pub fn sass_context_take_output_string(ctx: *mut Struct_Sass_Context)
   -> *mut c_char;
  pub fn sass_context_take_source_map_string(ctx: *mut Struct_Sass_Context)
   -> *mut c_char;
  pub fn sass_option_push_include_path(options: *mut Struct_Sass_Options,
                                       path: *const c_char) -> ();

  // sass2scss.h
  pub fn sass2scss(sass: *const c_char, options: c_int)
   -> *mut c_char;
  pub fn sass2scss_version() -> *const c_char;

}
