forked from sass/libsass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsass_interface.h
82 lines (69 loc) · 2.04 KB
/
sass_interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#define SASS_INTERFACE
#include "sass.h"
#include "sass2scss/sass2scss.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SASS_STYLE_NESTED 0
#define SASS_STYLE_EXPANDED 1
#define SASS_STYLE_COMPACT 2
#define SASS_STYLE_COMPRESSED 3
#define SASS_SOURCE_COMMENTS_NONE 0
#define SASS_SOURCE_COMMENTS_DEFAULT 1
#define SASS_SOURCE_COMMENTS_MAP 2
struct sass_options {
int output_style;
int source_comments; // really want a bool, but C doesn't have them
const char* include_paths;
const char* image_path;
int precision;
};
struct sass_context {
const char* input_path;
const char* output_path;
const char* source_string;
char* output_string;
char* source_map_string;
const char* source_map_file;
struct sass_options options;
int error_status;
char* error_message;
struct Sass_C_Function_Descriptor* c_functions;
char** included_files;
int num_included_files;
};
struct sass_file_context {
const char* input_path;
const char* output_path;
char* output_string;
char* source_map_string;
const char* source_map_file;
struct sass_options options;
int error_status;
char* error_message;
struct Sass_C_Function_Descriptor* c_functions;
char** included_files;
int num_included_files;
};
struct sass_folder_context {
const char* search_path;
const char* output_path;
struct sass_options options;
int error_status;
char* error_message;
struct Sass_C_Function_Descriptor* c_functions;
char** included_files;
int num_included_files;
};
struct sass_context* sass_new_context (void);
struct sass_file_context* sass_new_file_context (void);
struct sass_folder_context* sass_new_folder_context (void);
void sass_free_context (struct sass_context* ctx);
void sass_free_file_context (struct sass_file_context* ctx);
void sass_free_folder_context (struct sass_folder_context* ctx);
int sass_compile (struct sass_context* ctx);
int sass_compile_file (struct sass_file_context* ctx);
int sass_compile_folder (struct sass_folder_context* ctx);
#ifdef __cplusplus
}
#endif