kmadej_fast_excel_fork 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.travis.yml +28 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +70 -0
- data/Makefile +14 -0
- data/README.md +95 -0
- data/Rakefile +24 -0
- data/appveyor.yml +25 -0
- data/benchmarks/1k_rows.rb +59 -0
- data/benchmarks/20k_rows.rb +26 -0
- data/benchmarks/init.rb +59 -0
- data/benchmarks/memory.rb +49 -0
- data/examples/example.rb +42 -0
- data/examples/example_align.rb +23 -0
- data/examples/example_chart.rb +21 -0
- data/examples/example_colors.rb +37 -0
- data/examples/example_formula.rb +18 -0
- data/examples/example_image.rb +13 -0
- data/examples/example_styles.rb +27 -0
- data/examples/logo.png +0 -0
- data/extconf.rb +0 -0
- data/fast_excel.gemspec +20 -0
- data/lib/fast_excel.rb +600 -0
- data/lib/fast_excel/binding.rb +2819 -0
- data/lib/fast_excel/binding/chart.rb +2666 -0
- data/lib/fast_excel/binding/format.rb +1177 -0
- data/lib/fast_excel/binding/workbook.rb +338 -0
- data/lib/fast_excel/binding/worksheet.rb +1555 -0
- data/libxlsxwriter/.gitignore +49 -0
- data/libxlsxwriter/.indent.pro +125 -0
- data/libxlsxwriter/.travis.yml +25 -0
- data/libxlsxwriter/CONTRIBUTING.md +226 -0
- data/libxlsxwriter/Changes.txt +557 -0
- data/libxlsxwriter/LICENSE.txt +89 -0
- data/libxlsxwriter/Makefile +156 -0
- data/libxlsxwriter/Readme.md +78 -0
- data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +30 -0
- data/libxlsxwriter/cocoapods/libxlsxwriter.modulemap +7 -0
- data/libxlsxwriter/include/xlsxwriter.h +23 -0
- data/libxlsxwriter/include/xlsxwriter/app.h +79 -0
- data/libxlsxwriter/include/xlsxwriter/chart.h +3476 -0
- data/libxlsxwriter/include/xlsxwriter/common.h +372 -0
- data/libxlsxwriter/include/xlsxwriter/content_types.h +74 -0
- data/libxlsxwriter/include/xlsxwriter/core.h +51 -0
- data/libxlsxwriter/include/xlsxwriter/custom.h +52 -0
- data/libxlsxwriter/include/xlsxwriter/drawing.h +111 -0
- data/libxlsxwriter/include/xlsxwriter/format.h +1214 -0
- data/libxlsxwriter/include/xlsxwriter/hash_table.h +76 -0
- data/libxlsxwriter/include/xlsxwriter/packager.h +80 -0
- data/libxlsxwriter/include/xlsxwriter/relationships.h +77 -0
- data/libxlsxwriter/include/xlsxwriter/shared_strings.h +83 -0
- data/libxlsxwriter/include/xlsxwriter/styles.h +77 -0
- data/libxlsxwriter/include/xlsxwriter/theme.h +47 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +214 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/queue.h +694 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/tmpfileplus.h +53 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/tree.h +801 -0
- data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +375 -0
- data/libxlsxwriter/include/xlsxwriter/utility.h +166 -0
- data/libxlsxwriter/include/xlsxwriter/workbook.h +757 -0
- data/libxlsxwriter/include/xlsxwriter/worksheet.h +2641 -0
- data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +178 -0
- data/libxlsxwriter/lib/.gitignore +0 -0
- data/libxlsxwriter/libxlsxwriter.podspec +47 -0
- data/libxlsxwriter/src/Makefile +130 -0
- data/libxlsxwriter/src/app.c +443 -0
- data/libxlsxwriter/src/chart.c +6346 -0
- data/libxlsxwriter/src/content_types.c +345 -0
- data/libxlsxwriter/src/core.c +293 -0
- data/libxlsxwriter/src/custom.c +224 -0
- data/libxlsxwriter/src/drawing.c +746 -0
- data/libxlsxwriter/src/format.c +729 -0
- data/libxlsxwriter/src/hash_table.c +223 -0
- data/libxlsxwriter/src/packager.c +948 -0
- data/libxlsxwriter/src/relationships.c +245 -0
- data/libxlsxwriter/src/shared_strings.c +266 -0
- data/libxlsxwriter/src/styles.c +1088 -0
- data/libxlsxwriter/src/theme.c +348 -0
- data/libxlsxwriter/src/utility.c +515 -0
- data/libxlsxwriter/src/workbook.c +1930 -0
- data/libxlsxwriter/src/worksheet.c +5022 -0
- data/libxlsxwriter/src/xmlwriter.c +355 -0
- data/libxlsxwriter/third_party/minizip/Makefile +44 -0
- data/libxlsxwriter/third_party/minizip/Makefile.am +45 -0
- data/libxlsxwriter/third_party/minizip/Makefile.orig +25 -0
- data/libxlsxwriter/third_party/minizip/MiniZip64_Changes.txt +6 -0
- data/libxlsxwriter/third_party/minizip/MiniZip64_info.txt +74 -0
- data/libxlsxwriter/third_party/minizip/README.txt +5 -0
- data/libxlsxwriter/third_party/minizip/configure.ac +32 -0
- data/libxlsxwriter/third_party/minizip/crypt.h +131 -0
- data/libxlsxwriter/third_party/minizip/ioapi.c +247 -0
- data/libxlsxwriter/third_party/minizip/ioapi.h +208 -0
- data/libxlsxwriter/third_party/minizip/iowin32.c +456 -0
- data/libxlsxwriter/third_party/minizip/iowin32.h +28 -0
- data/libxlsxwriter/third_party/minizip/make_vms.com +25 -0
- data/libxlsxwriter/third_party/minizip/miniunz.c +660 -0
- data/libxlsxwriter/third_party/minizip/miniunzip.1 +63 -0
- data/libxlsxwriter/third_party/minizip/minizip.1 +46 -0
- data/libxlsxwriter/third_party/minizip/minizip.c +520 -0
- data/libxlsxwriter/third_party/minizip/minizip.pc.in +12 -0
- data/libxlsxwriter/third_party/minizip/mztools.c +291 -0
- data/libxlsxwriter/third_party/minizip/mztools.h +37 -0
- data/libxlsxwriter/third_party/minizip/unzip.c +2125 -0
- data/libxlsxwriter/third_party/minizip/unzip.h +437 -0
- data/libxlsxwriter/third_party/minizip/zip.c +2007 -0
- data/libxlsxwriter/third_party/minizip/zip.h +367 -0
- data/libxlsxwriter/third_party/tmpfileplus/Makefile +42 -0
- data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c +342 -0
- data/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.h +53 -0
- data/libxlsxwriter/version.txt +1 -0
- data/test/date_test.rb +22 -0
- data/test/default_format_test.rb +19 -0
- data/test/format_test.rb +171 -0
- data/test/test_helper.rb +52 -0
- data/test/tmpfile_test.rb +23 -0
- data/test/worksheet_test.rb +86 -0
- metadata +182 -0
|
@@ -0,0 +1,2819 @@
|
|
|
1
|
+
# Generated by ffi_gen. Please do not change this file by hand.
|
|
2
|
+
|
|
3
|
+
require 'ffi'
|
|
4
|
+
|
|
5
|
+
module Libxlsxwriter
|
|
6
|
+
extend FFI::Library
|
|
7
|
+
|
|
8
|
+
LIB_FILENAME = if RUBY_PLATFORM =~ /darwin/
|
|
9
|
+
"libxlsxwriter.dylib"
|
|
10
|
+
else
|
|
11
|
+
"libxlsxwriter.so"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
ffi_lib File.expand_path("./../../../libxlsxwriter/lib/#{LIB_FILENAME}", __FILE__)
|
|
15
|
+
|
|
16
|
+
def self.attach_function(name, *_)
|
|
17
|
+
begin; super; rescue FFI::NotFoundError => e
|
|
18
|
+
(class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def qmd_trace_elem(elem)
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def qmd_trace_head(head)
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def qmd_savelink(name, link)
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def trashit(x)
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def qmd_list_check_head(head, field)
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def qmd_list_check_next(elm, field)
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def qmd_list_check_prev(elm, field)
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def qmd_tailq_check_head(head, field)
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def qmd_tailq_check_tail(head, headname)
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def qmd_tailq_check_next(elm, field)
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def qmd_tailq_check_prev(elm, field)
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
SPLAY_NEGINF = -1
|
|
67
|
+
|
|
68
|
+
SPLAY_INF = 1
|
|
69
|
+
|
|
70
|
+
RB_BLACK = 0
|
|
71
|
+
|
|
72
|
+
RB_RED = 1
|
|
73
|
+
|
|
74
|
+
def rb_prototype(name, type, field, cmp)
|
|
75
|
+
rb_prototype_internal(name, type, field, cmp, )
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def rb_generate(name, type, field, cmp)
|
|
79
|
+
rb_generate_internal(name, type, field, cmp, )
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def rb_generate_internal(name, type, field, cmp, attr)
|
|
83
|
+
rb_generate_insert_color(name, type, field, attr)
|
|
84
|
+
rb_generate_remove_color(name, type, field, attr)
|
|
85
|
+
rb_generate_insert(name, type, field, cmp, attr)
|
|
86
|
+
rb_generate_remove(name, type, field, attr)
|
|
87
|
+
rb_generate_find(name, type, field, cmp, attr)
|
|
88
|
+
rb_generate_nfind(name, type, field, cmp, attr)
|
|
89
|
+
rb_generate_next(name, type, field, attr)
|
|
90
|
+
rb_generate_prev(name, type, field, attr)
|
|
91
|
+
rb_generate_minmax(name, type, field, attr)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
RB_NEGINF = -1
|
|
95
|
+
|
|
96
|
+
RB_INF = 1
|
|
97
|
+
|
|
98
|
+
SHEETNAME_MAX = 31
|
|
99
|
+
|
|
100
|
+
MAX_COL_NAME_LENGTH = "$XFD".length
|
|
101
|
+
|
|
102
|
+
MAX_ROW_NAME_LENGTH = "$1048576".length
|
|
103
|
+
|
|
104
|
+
MAX_CELL_NAME_LENGTH = "$XFWD$1048576".length
|
|
105
|
+
|
|
106
|
+
DATETIME_LENGTH = "2016-12-12T23:00:00Z".length
|
|
107
|
+
|
|
108
|
+
EPOCH_1900 = 0
|
|
109
|
+
|
|
110
|
+
EPOCH_1904 = 1
|
|
111
|
+
|
|
112
|
+
UINT32_T_LENGTH = "4294967296".length
|
|
113
|
+
|
|
114
|
+
FILENAME_LENGTH = 128
|
|
115
|
+
|
|
116
|
+
IGNORE = 1
|
|
117
|
+
|
|
118
|
+
SCHEMA_MS = "http://schemas.microsoft.com/office/2006/relationships"
|
|
119
|
+
|
|
120
|
+
SCHEMA_ROOT = "http://schemas.openxmlformats.org"
|
|
121
|
+
|
|
122
|
+
def error(message)
|
|
123
|
+
fprintf(STDERR, "[ERROR][%s:%d]: \"message\"\n", FILE, LINE)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def mem_error()
|
|
127
|
+
error("Memory allocation failed.")
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def warn(message)
|
|
131
|
+
fprintf(STDERR, "[WARNING]: \"message\"\n")
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def warn_format(message)
|
|
135
|
+
fprintf(STDERR, "[WARNING]: \"message\"\n")
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def warn_format1(message, var)
|
|
139
|
+
fprintf(STDERR, "[WARNING]: \"message\"\n", var)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def warn_format2(message, var1, var2)
|
|
143
|
+
fprintf(STDERR, "[WARNING]: \"message\"\n", var1, var2)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
FORMAT_FIELD_LEN = 128
|
|
147
|
+
|
|
148
|
+
DEFAULT_FONT_NAME = "Calibri"
|
|
149
|
+
|
|
150
|
+
DEFAULT_FONT_FAMILY = 2
|
|
151
|
+
|
|
152
|
+
DEFAULT_FONT_THEME = 1
|
|
153
|
+
|
|
154
|
+
PROPERTY_UNSET = -1
|
|
155
|
+
|
|
156
|
+
COLOR_UNSET = -1
|
|
157
|
+
|
|
158
|
+
COLOR_MASK = 0xFFFFFF
|
|
159
|
+
|
|
160
|
+
MIN_FONT_SIZE = 1
|
|
161
|
+
|
|
162
|
+
MAX_FONT_SIZE = 409
|
|
163
|
+
|
|
164
|
+
CHART_NUM_FORMAT_LEN = 128
|
|
165
|
+
|
|
166
|
+
CHART_DEFAULT_GAP = 501
|
|
167
|
+
|
|
168
|
+
def cell(cell)
|
|
169
|
+
return name_to_row(cell), name_to_col(cell)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def cols(cols)
|
|
173
|
+
return name_to_col(cols), name_to_col_2(cols)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def range(range)
|
|
177
|
+
return name_to_row(range), name_to_col(range), name_to_row_2(range), name_to_col_2(range)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
ROW_MAX = 1048576
|
|
181
|
+
|
|
182
|
+
COL_MAX = 16384
|
|
183
|
+
|
|
184
|
+
COL_META_MAX = 128
|
|
185
|
+
|
|
186
|
+
HEADER_FOOTER_MAX = 255
|
|
187
|
+
|
|
188
|
+
MAX_NUMBER_URLS = 65530
|
|
189
|
+
|
|
190
|
+
PANE_NAME_LENGTH = 12
|
|
191
|
+
|
|
192
|
+
BREAKS_MAX = 1023
|
|
193
|
+
|
|
194
|
+
DEFINED_NAME_LENGTH = 128
|
|
195
|
+
|
|
196
|
+
APP_PACKAGE = "application/vnd.openxmlformats-package."
|
|
197
|
+
|
|
198
|
+
APP_DOCUMENT = "application/vnd.openxmlformats-officedocument."
|
|
199
|
+
|
|
200
|
+
MAXU32 = 0xffffffff
|
|
201
|
+
|
|
202
|
+
ZLIB_FILEFUNC_SEEK_CUR = 1
|
|
203
|
+
|
|
204
|
+
ZLIB_FILEFUNC_SEEK_END = 2
|
|
205
|
+
|
|
206
|
+
ZLIB_FILEFUNC_SEEK_SET = 0
|
|
207
|
+
|
|
208
|
+
ZLIB_FILEFUNC_MODE_READ = 1
|
|
209
|
+
|
|
210
|
+
ZLIB_FILEFUNC_MODE_WRITE = 2
|
|
211
|
+
|
|
212
|
+
ZLIB_FILEFUNC_MODE_READWRITEFILTER = 3
|
|
213
|
+
|
|
214
|
+
ZLIB_FILEFUNC_MODE_EXISTING = 4
|
|
215
|
+
|
|
216
|
+
ZLIB_FILEFUNC_MODE_CREATE = 8
|
|
217
|
+
|
|
218
|
+
Z_BZIP2ED = 12
|
|
219
|
+
|
|
220
|
+
ZIP_OK = 0
|
|
221
|
+
|
|
222
|
+
ZIP_EOF = 0
|
|
223
|
+
|
|
224
|
+
def zip_errno(_Z_ERRNO)
|
|
225
|
+
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
ZIP_PARAMERROR = (-102)
|
|
229
|
+
|
|
230
|
+
ZIP_BADZIPFILE = (-103)
|
|
231
|
+
|
|
232
|
+
ZIP_INTERNALERROR = (-104)
|
|
233
|
+
|
|
234
|
+
DEF_MEM_LEVEL = 8
|
|
235
|
+
|
|
236
|
+
APPEND_STATUS_CREATE = 0
|
|
237
|
+
|
|
238
|
+
APPEND_STATUS_CREATEAFTER = 1
|
|
239
|
+
|
|
240
|
+
APPEND_STATUS_ADDINZIP = 2
|
|
241
|
+
|
|
242
|
+
ZIP_BUFFER_SIZE = 16384
|
|
243
|
+
|
|
244
|
+
TMPFILE_KEEP = 1
|
|
245
|
+
|
|
246
|
+
MAX_ATTRIBUTE_LENGTH = 256
|
|
247
|
+
|
|
248
|
+
ATTR_32 = 32
|
|
249
|
+
|
|
250
|
+
VERSION = "0.6.9"
|
|
251
|
+
|
|
252
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:boolean).</em>
|
|
253
|
+
#
|
|
254
|
+
# === Options:
|
|
255
|
+
# :false_ ::
|
|
256
|
+
# False value.
|
|
257
|
+
# :true_ ::
|
|
258
|
+
# True value.
|
|
259
|
+
#
|
|
260
|
+
# @method _enum_boolean_
|
|
261
|
+
# @return [Symbol]
|
|
262
|
+
# @scope class
|
|
263
|
+
enum :boolean, [
|
|
264
|
+
:false_, 0,
|
|
265
|
+
:true_, 1
|
|
266
|
+
]
|
|
267
|
+
|
|
268
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:error).</em>
|
|
269
|
+
#
|
|
270
|
+
# === Options:
|
|
271
|
+
# :no_error ::
|
|
272
|
+
# No error.
|
|
273
|
+
# :error_memory_malloc_failed ::
|
|
274
|
+
# Memory error, failed to malloc() required memory.
|
|
275
|
+
# :error_creating_xlsx_file ::
|
|
276
|
+
# Error creating output xlsx file. Usually a permissions error.
|
|
277
|
+
# :error_creating_tmpfile ::
|
|
278
|
+
# Error encountered when creating a tmpfile during file assembly.
|
|
279
|
+
# :error_zip_file_operation ::
|
|
280
|
+
# Zlib error with a file operation while creating xlsx file.
|
|
281
|
+
# :error_zip_file_add ::
|
|
282
|
+
# Zlib error when adding sub file to xlsx file.
|
|
283
|
+
# :error_zip_close ::
|
|
284
|
+
# Zlib error when closing xlsx file.
|
|
285
|
+
# :error_null_parameter_ignored ::
|
|
286
|
+
# NULL function parameter ignored.
|
|
287
|
+
# :error_parameter_validation ::
|
|
288
|
+
# Function parameter validation error.
|
|
289
|
+
# :error_sheetname_length_exceeded ::
|
|
290
|
+
# Worksheet name exceeds Excel's limit of 31 characters.
|
|
291
|
+
# :error_invalid_sheetname_character ::
|
|
292
|
+
# Worksheet name contains invalid Excel character: '():*?/\\'
|
|
293
|
+
# :error_sheetname_already_used ::
|
|
294
|
+
# Worksheet name is already in use.
|
|
295
|
+
# :error_128_string_length_exceeded ::
|
|
296
|
+
# Parameter exceeds Excel's limit of 128 characters.
|
|
297
|
+
# :error_255_string_length_exceeded ::
|
|
298
|
+
# Parameter exceeds Excel's limit of 255 characters.
|
|
299
|
+
# :error_max_string_length_exceeded ::
|
|
300
|
+
# String exceeds Excel's limit of 32,767 characters.
|
|
301
|
+
# :error_shared_string_index_not_found ::
|
|
302
|
+
# Error finding internal string index.
|
|
303
|
+
# :error_worksheet_index_out_of_range ::
|
|
304
|
+
# Worksheet row or column index out of range.
|
|
305
|
+
# :error_worksheet_max_number_urls_exceeded ::
|
|
306
|
+
# Maximum number of worksheet URLs (65530) exceeded.
|
|
307
|
+
# :error_image_dimensions ::
|
|
308
|
+
# Couldn't read image dimensions or DPI.
|
|
309
|
+
# :max_errno ::
|
|
310
|
+
#
|
|
311
|
+
#
|
|
312
|
+
# @method _enum_error_
|
|
313
|
+
# @return [Symbol]
|
|
314
|
+
# @scope class
|
|
315
|
+
enum :error, [
|
|
316
|
+
:no_error, 0,
|
|
317
|
+
:error_memory_malloc_failed, 1,
|
|
318
|
+
:error_creating_xlsx_file, 2,
|
|
319
|
+
:error_creating_tmpfile, 3,
|
|
320
|
+
:error_zip_file_operation, 4,
|
|
321
|
+
:error_zip_file_add, 5,
|
|
322
|
+
:error_zip_close, 6,
|
|
323
|
+
:error_null_parameter_ignored, 7,
|
|
324
|
+
:error_parameter_validation, 8,
|
|
325
|
+
:error_sheetname_length_exceeded, 9,
|
|
326
|
+
:error_invalid_sheetname_character, 10,
|
|
327
|
+
:error_sheetname_already_used, 11,
|
|
328
|
+
:error_128_string_length_exceeded, 12,
|
|
329
|
+
:error_255_string_length_exceeded, 13,
|
|
330
|
+
:error_max_string_length_exceeded, 14,
|
|
331
|
+
:error_shared_string_index_not_found, 15,
|
|
332
|
+
:error_worksheet_index_out_of_range, 16,
|
|
333
|
+
:error_worksheet_max_number_urls_exceeded, 17,
|
|
334
|
+
:error_image_dimensions, 18,
|
|
335
|
+
:max_errno, 19
|
|
336
|
+
]
|
|
337
|
+
|
|
338
|
+
# = Fields:
|
|
339
|
+
# :year ::
|
|
340
|
+
# (Integer) Year : 1900 - 9999
|
|
341
|
+
# :month ::
|
|
342
|
+
# (Integer) Month : 1 - 12
|
|
343
|
+
# :day ::
|
|
344
|
+
# (Integer) Day : 1 - 31
|
|
345
|
+
# :hour ::
|
|
346
|
+
# (Integer) Hour : 0 - 23
|
|
347
|
+
# :min ::
|
|
348
|
+
# (Integer) Minute : 0 - 59
|
|
349
|
+
# :sec ::
|
|
350
|
+
# (Float) Seconds : 0 - 59.999
|
|
351
|
+
module DatetimeWrappers
|
|
352
|
+
# @param [Integer] date_1904
|
|
353
|
+
# @return [Float]
|
|
354
|
+
def to_excel_date(date_1904)
|
|
355
|
+
Libxlsxwriter.datetime_to_excel_date(self, date_1904)
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
class Datetime < FFI::Struct
|
|
360
|
+
include DatetimeWrappers
|
|
361
|
+
layout :year, :int,
|
|
362
|
+
:month, :int,
|
|
363
|
+
:day, :int,
|
|
364
|
+
:hour, :int,
|
|
365
|
+
:min, :int,
|
|
366
|
+
:sec, :double
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:custom_property_types).</em>
|
|
370
|
+
#
|
|
371
|
+
# === Options:
|
|
372
|
+
# :none ::
|
|
373
|
+
#
|
|
374
|
+
# :string ::
|
|
375
|
+
#
|
|
376
|
+
# :double ::
|
|
377
|
+
#
|
|
378
|
+
# :integer ::
|
|
379
|
+
#
|
|
380
|
+
# :boolean ::
|
|
381
|
+
#
|
|
382
|
+
# :datetime ::
|
|
383
|
+
#
|
|
384
|
+
#
|
|
385
|
+
# @method _enum_custom_property_types_
|
|
386
|
+
# @return [Symbol]
|
|
387
|
+
# @scope class
|
|
388
|
+
enum :custom_property_types, [
|
|
389
|
+
:none, 0,
|
|
390
|
+
:string, 1,
|
|
391
|
+
:double, 2,
|
|
392
|
+
:integer, 3,
|
|
393
|
+
:boolean, 4,
|
|
394
|
+
:datetime, 5
|
|
395
|
+
]
|
|
396
|
+
|
|
397
|
+
# = Fields:
|
|
398
|
+
# :stqh_first ::
|
|
399
|
+
# (FFI::Pointer(*Format))
|
|
400
|
+
# :stqh_last ::
|
|
401
|
+
# (FFI::Pointer(**Format))
|
|
402
|
+
class Formats < FFI::Struct
|
|
403
|
+
layout :stqh_first, :pointer,
|
|
404
|
+
:stqh_last, :pointer
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# = Fields:
|
|
408
|
+
# :stqh_first ::
|
|
409
|
+
# (FFI::Pointer(*Tuple))
|
|
410
|
+
# :stqh_last ::
|
|
411
|
+
# (FFI::Pointer(**Tuple))
|
|
412
|
+
class Tuples < FFI::Struct
|
|
413
|
+
layout :stqh_first, :pointer,
|
|
414
|
+
:stqh_last, :pointer
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# = Fields:
|
|
418
|
+
# :stqh_first ::
|
|
419
|
+
# (FFI::Pointer(*CustomProperty))
|
|
420
|
+
# :stqh_last ::
|
|
421
|
+
# (FFI::Pointer(**CustomProperty))
|
|
422
|
+
class CustomProperties < FFI::Struct
|
|
423
|
+
layout :stqh_first, :pointer,
|
|
424
|
+
:stqh_last, :pointer
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# = Fields:
|
|
428
|
+
# :stqe_next ::
|
|
429
|
+
# (FFI::Pointer(*Tuple))
|
|
430
|
+
class TupleListPointers < FFI::Struct
|
|
431
|
+
layout :stqe_next, :pointer
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# = Fields:
|
|
435
|
+
# :key ::
|
|
436
|
+
# (String)
|
|
437
|
+
# :value ::
|
|
438
|
+
# (String)
|
|
439
|
+
# :list_pointers ::
|
|
440
|
+
# (TupleListPointers)
|
|
441
|
+
class Tuple < FFI::Struct
|
|
442
|
+
layout :key, :string,
|
|
443
|
+
:value, :string,
|
|
444
|
+
:list_pointers, TupleListPointers.by_value
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# = Fields:
|
|
448
|
+
# :string ::
|
|
449
|
+
# (String)
|
|
450
|
+
# :number ::
|
|
451
|
+
# (Float)
|
|
452
|
+
# :integer ::
|
|
453
|
+
# (Integer)
|
|
454
|
+
# :boolean ::
|
|
455
|
+
# (Integer)
|
|
456
|
+
# :datetime ::
|
|
457
|
+
# (Datetime)
|
|
458
|
+
class CustomPropertyU < FFI::Union
|
|
459
|
+
layout :string, :string,
|
|
460
|
+
:number, :double,
|
|
461
|
+
:integer, :int,
|
|
462
|
+
:boolean, :uchar,
|
|
463
|
+
:datetime, Datetime.by_value
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# = Fields:
|
|
467
|
+
# :stqe_next ::
|
|
468
|
+
# (FFI::Pointer(*CustomProperty))
|
|
469
|
+
class CustomPropertyListPointers < FFI::Struct
|
|
470
|
+
layout :stqe_next, :pointer
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# = Fields:
|
|
474
|
+
# :type ::
|
|
475
|
+
# (Symbol from _enum_custom_property_types_)
|
|
476
|
+
# :name ::
|
|
477
|
+
# (String)
|
|
478
|
+
# :u ::
|
|
479
|
+
# (CustomPropertyU)
|
|
480
|
+
# :list_pointers ::
|
|
481
|
+
# (CustomPropertyListPointers)
|
|
482
|
+
class CustomProperty < FFI::Struct
|
|
483
|
+
layout :type, :custom_property_types,
|
|
484
|
+
:name, :string,
|
|
485
|
+
:u, CustomPropertyU.by_value,
|
|
486
|
+
:list_pointers, CustomPropertyListPointers.by_value
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
# = Fields:
|
|
490
|
+
# :rbh_root ::
|
|
491
|
+
# (FFI::Pointer(*SstElement))
|
|
492
|
+
class SstRbTree < FFI::Struct
|
|
493
|
+
layout :rbh_root, :pointer
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# = Fields:
|
|
497
|
+
# :stqh_first ::
|
|
498
|
+
# (FFI::Pointer(*SstElement))
|
|
499
|
+
# :stqh_last ::
|
|
500
|
+
# (FFI::Pointer(**SstElement))
|
|
501
|
+
class SstOrderList < FFI::Struct
|
|
502
|
+
layout :stqh_first, :pointer,
|
|
503
|
+
:stqh_last, :pointer
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# = Fields:
|
|
507
|
+
# :stqe_next ::
|
|
508
|
+
# (FFI::Pointer(*SstElement))
|
|
509
|
+
class SstElementSstOrderPointers < FFI::Struct
|
|
510
|
+
layout :stqe_next, :pointer
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# = Fields:
|
|
514
|
+
# :rbe_left ::
|
|
515
|
+
# (FFI::Pointer(*SstElement))
|
|
516
|
+
# :rbe_right ::
|
|
517
|
+
# (FFI::Pointer(*SstElement))
|
|
518
|
+
# :rbe_parent ::
|
|
519
|
+
# (FFI::Pointer(*SstElement))
|
|
520
|
+
# :rbe_color ::
|
|
521
|
+
# (Integer)
|
|
522
|
+
class SstElementSstTreePointers < FFI::Struct
|
|
523
|
+
layout :rbe_left, :pointer,
|
|
524
|
+
:rbe_right, :pointer,
|
|
525
|
+
:rbe_parent, :pointer,
|
|
526
|
+
:rbe_color, :int
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# = Fields:
|
|
530
|
+
# :index ::
|
|
531
|
+
# (Integer)
|
|
532
|
+
# :string ::
|
|
533
|
+
# (String)
|
|
534
|
+
# :sst_order_pointers ::
|
|
535
|
+
# (SstElementSstOrderPointers)
|
|
536
|
+
# :sst_tree_pointers ::
|
|
537
|
+
# (SstElementSstTreePointers)
|
|
538
|
+
class SstElement < FFI::Struct
|
|
539
|
+
layout :index, :uint,
|
|
540
|
+
:string, :string,
|
|
541
|
+
:sst_order_pointers, SstElementSstOrderPointers.by_value,
|
|
542
|
+
:sst_tree_pointers, SstElementSstTreePointers.by_value
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# = Fields:
|
|
546
|
+
# :file ::
|
|
547
|
+
# (FFI::Pointer(*FILE))
|
|
548
|
+
# :string_count ::
|
|
549
|
+
# (Integer)
|
|
550
|
+
# :unique_count ::
|
|
551
|
+
# (Integer)
|
|
552
|
+
# :order_list ::
|
|
553
|
+
# (SstOrderList)
|
|
554
|
+
# :rb_tree ::
|
|
555
|
+
# (SstRbTree)
|
|
556
|
+
module SstWrappers
|
|
557
|
+
# @return [nil]
|
|
558
|
+
def free()
|
|
559
|
+
Libxlsxwriter.sst_free(self)
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
# @return [nil]
|
|
563
|
+
def assemble_xml_file()
|
|
564
|
+
Libxlsxwriter.sst_assemble_xml_file(self)
|
|
565
|
+
end
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
class Sst < FFI::Struct
|
|
569
|
+
include SstWrappers
|
|
570
|
+
layout :file, :pointer,
|
|
571
|
+
:string_count, :uint,
|
|
572
|
+
:unique_count, :uint,
|
|
573
|
+
:order_list, SstOrderList,
|
|
574
|
+
:rb_tree, SstRbTree
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# @method sst_new()
|
|
578
|
+
# @return [Sst]
|
|
579
|
+
# @scope class
|
|
580
|
+
attach_function :sst_new, :lxw_sst_new, [], Sst
|
|
581
|
+
|
|
582
|
+
# @method sst_free(sst)
|
|
583
|
+
# @param [Sst] sst
|
|
584
|
+
# @return [nil]
|
|
585
|
+
# @scope class
|
|
586
|
+
attach_function :sst_free, :lxw_sst_free, [Sst], :void
|
|
587
|
+
|
|
588
|
+
# @method get_sst_index(sst, string)
|
|
589
|
+
# @param [Sst] sst
|
|
590
|
+
# @param [String] string
|
|
591
|
+
# @return [SstElement]
|
|
592
|
+
# @scope class
|
|
593
|
+
attach_function :get_sst_index, :lxw_get_sst_index, [Sst, :string], SstElement
|
|
594
|
+
|
|
595
|
+
# @method sst_assemble_xml_file(self_)
|
|
596
|
+
# @param [Sst] self_
|
|
597
|
+
# @return [nil]
|
|
598
|
+
# @scope class
|
|
599
|
+
attach_function :sst_assemble_xml_file, :lxw_sst_assemble_xml_file, [Sst], :void
|
|
600
|
+
|
|
601
|
+
# = Fields:
|
|
602
|
+
# :stqh_first ::
|
|
603
|
+
# (FFI::Pointer(*HashElement))
|
|
604
|
+
# :stqh_last ::
|
|
605
|
+
# (FFI::Pointer(**HashElement))
|
|
606
|
+
class HashOrderList < FFI::Struct
|
|
607
|
+
layout :stqh_first, :pointer,
|
|
608
|
+
:stqh_last, :pointer
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
# = Fields:
|
|
612
|
+
# :slh_first ::
|
|
613
|
+
# (FFI::Pointer(*HashElement))
|
|
614
|
+
class HashBucketList < FFI::Struct
|
|
615
|
+
layout :slh_first, :pointer
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# = Fields:
|
|
619
|
+
# :num_buckets ::
|
|
620
|
+
# (Integer)
|
|
621
|
+
# :used_buckets ::
|
|
622
|
+
# (Integer)
|
|
623
|
+
# :unique_count ::
|
|
624
|
+
# (Integer)
|
|
625
|
+
# :free_key ::
|
|
626
|
+
# (Integer)
|
|
627
|
+
# :free_value ::
|
|
628
|
+
# (Integer)
|
|
629
|
+
# :order_list ::
|
|
630
|
+
# (HashOrderList)
|
|
631
|
+
# :buckets ::
|
|
632
|
+
# (FFI::Pointer(**HashBucketList))
|
|
633
|
+
class HashTable < FFI::Struct
|
|
634
|
+
layout :num_buckets, :uint,
|
|
635
|
+
:used_buckets, :uint,
|
|
636
|
+
:unique_count, :uint,
|
|
637
|
+
:free_key, :uchar,
|
|
638
|
+
:free_value, :uchar,
|
|
639
|
+
:order_list, HashOrderList,
|
|
640
|
+
:buckets, :pointer
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
# = Fields:
|
|
644
|
+
# :stqe_next ::
|
|
645
|
+
# (FFI::Pointer(*HashElement))
|
|
646
|
+
class HashElementHashOrderPointers < FFI::Struct
|
|
647
|
+
layout :stqe_next, :pointer
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
# = Fields:
|
|
651
|
+
# :sle_next ::
|
|
652
|
+
# (FFI::Pointer(*HashElement))
|
|
653
|
+
class HashElementHashListPointers < FFI::Struct
|
|
654
|
+
layout :sle_next, :pointer
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
# = Fields:
|
|
658
|
+
# :key ::
|
|
659
|
+
# (FFI::Pointer(*Void))
|
|
660
|
+
# :value ::
|
|
661
|
+
# (FFI::Pointer(*Void))
|
|
662
|
+
# :hash_order_pointers ::
|
|
663
|
+
# (HashElementHashOrderPointers)
|
|
664
|
+
# :hash_list_pointers ::
|
|
665
|
+
# (HashElementHashListPointers)
|
|
666
|
+
class HashElement < FFI::Struct
|
|
667
|
+
layout :key, :pointer,
|
|
668
|
+
:value, :pointer,
|
|
669
|
+
:hash_order_pointers, HashElementHashOrderPointers.by_value,
|
|
670
|
+
:hash_list_pointers, HashElementHashListPointers.by_value
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
# @method hash_key_exists(hash, key, key_len)
|
|
674
|
+
# @param [HashTable] hash
|
|
675
|
+
# @param [FFI::Pointer(*Void)] key
|
|
676
|
+
# @param [Integer] key_len
|
|
677
|
+
# @return [HashElement]
|
|
678
|
+
# @scope class
|
|
679
|
+
attach_function :hash_key_exists, :lxw_hash_key_exists, [HashTable, :pointer, :ulong], HashElement
|
|
680
|
+
|
|
681
|
+
# @method insert_hash_element(hash, key, value, key_len)
|
|
682
|
+
# @param [HashTable] hash
|
|
683
|
+
# @param [FFI::Pointer(*Void)] key
|
|
684
|
+
# @param [FFI::Pointer(*Void)] value
|
|
685
|
+
# @param [Integer] key_len
|
|
686
|
+
# @return [HashElement]
|
|
687
|
+
# @scope class
|
|
688
|
+
attach_function :insert_hash_element, :lxw_insert_hash_element, [HashTable, :pointer, :pointer, :ulong], HashElement
|
|
689
|
+
|
|
690
|
+
# @method hash_new(num_buckets, free_key, free_value)
|
|
691
|
+
# @param [Integer] num_buckets
|
|
692
|
+
# @param [Integer] free_key
|
|
693
|
+
# @param [Integer] free_value
|
|
694
|
+
# @return [HashTable]
|
|
695
|
+
# @scope class
|
|
696
|
+
attach_function :hash_new, :lxw_hash_new, [:uint, :uchar, :uchar], HashTable
|
|
697
|
+
|
|
698
|
+
# @method hash_free(hash)
|
|
699
|
+
# @param [HashTable] hash
|
|
700
|
+
# @return [nil]
|
|
701
|
+
# @scope class
|
|
702
|
+
attach_function :hash_free, :lxw_hash_free, [HashTable], :void
|
|
703
|
+
|
|
704
|
+
require_relative 'binding/chart'
|
|
705
|
+
|
|
706
|
+
# = Fields:
|
|
707
|
+
# :stqh_first ::
|
|
708
|
+
# (FFI::Pointer(*DrawingObject))
|
|
709
|
+
# :stqh_last ::
|
|
710
|
+
# (FFI::Pointer(**DrawingObject))
|
|
711
|
+
class DrawingObjects < FFI::Struct
|
|
712
|
+
layout :stqh_first, :pointer,
|
|
713
|
+
:stqh_last, :pointer
|
|
714
|
+
end
|
|
715
|
+
|
|
716
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:drawing_types).</em>
|
|
717
|
+
#
|
|
718
|
+
# === Options:
|
|
719
|
+
# :none ::
|
|
720
|
+
#
|
|
721
|
+
# :image ::
|
|
722
|
+
#
|
|
723
|
+
# :chart ::
|
|
724
|
+
#
|
|
725
|
+
# :shape ::
|
|
726
|
+
#
|
|
727
|
+
#
|
|
728
|
+
# @method _enum_drawing_types_
|
|
729
|
+
# @return [Symbol]
|
|
730
|
+
# @scope class
|
|
731
|
+
enum :drawing_types, [
|
|
732
|
+
:none, 0,
|
|
733
|
+
:image, 1,
|
|
734
|
+
:chart, 2,
|
|
735
|
+
:shape, 3
|
|
736
|
+
]
|
|
737
|
+
|
|
738
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:anchor_types).</em>
|
|
739
|
+
#
|
|
740
|
+
# === Options:
|
|
741
|
+
# :type_none ::
|
|
742
|
+
#
|
|
743
|
+
# :type_image ::
|
|
744
|
+
#
|
|
745
|
+
# :type_chart ::
|
|
746
|
+
#
|
|
747
|
+
#
|
|
748
|
+
# @method _enum_anchor_types_
|
|
749
|
+
# @return [Symbol]
|
|
750
|
+
# @scope class
|
|
751
|
+
enum :anchor_types, [
|
|
752
|
+
:type_none, 0,
|
|
753
|
+
:type_image, 1,
|
|
754
|
+
:type_chart, 2
|
|
755
|
+
]
|
|
756
|
+
|
|
757
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:anchor_edit_types).</em>
|
|
758
|
+
#
|
|
759
|
+
# === Options:
|
|
760
|
+
# :as_none ::
|
|
761
|
+
#
|
|
762
|
+
# :as_relative ::
|
|
763
|
+
#
|
|
764
|
+
# :as_one_cell ::
|
|
765
|
+
#
|
|
766
|
+
# :as_absolute ::
|
|
767
|
+
#
|
|
768
|
+
#
|
|
769
|
+
# @method _enum_anchor_edit_types_
|
|
770
|
+
# @return [Symbol]
|
|
771
|
+
# @scope class
|
|
772
|
+
enum :anchor_edit_types, [
|
|
773
|
+
:as_none, 0,
|
|
774
|
+
:as_relative, 1,
|
|
775
|
+
:as_one_cell, 2,
|
|
776
|
+
:as_absolute, 3
|
|
777
|
+
]
|
|
778
|
+
|
|
779
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:image_types).</em>
|
|
780
|
+
#
|
|
781
|
+
# === Options:
|
|
782
|
+
# :unknown ::
|
|
783
|
+
#
|
|
784
|
+
# :png ::
|
|
785
|
+
#
|
|
786
|
+
# :jpeg ::
|
|
787
|
+
#
|
|
788
|
+
# :bmp ::
|
|
789
|
+
#
|
|
790
|
+
#
|
|
791
|
+
# @method _enum_image_types_
|
|
792
|
+
# @return [Symbol]
|
|
793
|
+
# @scope class
|
|
794
|
+
enum :image_types, [
|
|
795
|
+
:unknown, 0,
|
|
796
|
+
:png, 1,
|
|
797
|
+
:jpeg, 2,
|
|
798
|
+
:bmp, 3
|
|
799
|
+
]
|
|
800
|
+
|
|
801
|
+
# = Fields:
|
|
802
|
+
# :col ::
|
|
803
|
+
# (Integer)
|
|
804
|
+
# :row ::
|
|
805
|
+
# (Integer)
|
|
806
|
+
# :col_offset ::
|
|
807
|
+
# (Float)
|
|
808
|
+
# :row_offset ::
|
|
809
|
+
# (Float)
|
|
810
|
+
class DrawingCoords < FFI::Struct
|
|
811
|
+
layout :col, :uint,
|
|
812
|
+
:row, :uint,
|
|
813
|
+
:col_offset, :double,
|
|
814
|
+
:row_offset, :double
|
|
815
|
+
end
|
|
816
|
+
|
|
817
|
+
# = Fields:
|
|
818
|
+
# :stqe_next ::
|
|
819
|
+
# (FFI::Pointer(*DrawingObject))
|
|
820
|
+
class DrawingObjectListPointers < FFI::Struct
|
|
821
|
+
layout :stqe_next, :pointer
|
|
822
|
+
end
|
|
823
|
+
|
|
824
|
+
# = Fields:
|
|
825
|
+
# :anchor_type ::
|
|
826
|
+
# (Integer)
|
|
827
|
+
# :edit_as ::
|
|
828
|
+
# (Integer)
|
|
829
|
+
# :from ::
|
|
830
|
+
# (DrawingCoords)
|
|
831
|
+
# :to ::
|
|
832
|
+
# (DrawingCoords)
|
|
833
|
+
# :col_absolute ::
|
|
834
|
+
# (Integer)
|
|
835
|
+
# :row_absolute ::
|
|
836
|
+
# (Integer)
|
|
837
|
+
# :width ::
|
|
838
|
+
# (Integer)
|
|
839
|
+
# :height ::
|
|
840
|
+
# (Integer)
|
|
841
|
+
# :shape ::
|
|
842
|
+
# (Integer)
|
|
843
|
+
# :description ::
|
|
844
|
+
# (String)
|
|
845
|
+
# :url ::
|
|
846
|
+
# (String)
|
|
847
|
+
# :tip ::
|
|
848
|
+
# (String)
|
|
849
|
+
# :list_pointers ::
|
|
850
|
+
# (DrawingObjectListPointers)
|
|
851
|
+
class DrawingObject < FFI::Struct
|
|
852
|
+
layout :anchor_type, :uchar,
|
|
853
|
+
:edit_as, :uchar,
|
|
854
|
+
:from, DrawingCoords.by_value,
|
|
855
|
+
:to, DrawingCoords.by_value,
|
|
856
|
+
:col_absolute, :uint,
|
|
857
|
+
:row_absolute, :uint,
|
|
858
|
+
:width, :uint,
|
|
859
|
+
:height, :uint,
|
|
860
|
+
:shape, :uchar,
|
|
861
|
+
:description, :string,
|
|
862
|
+
:url, :string,
|
|
863
|
+
:tip, :string,
|
|
864
|
+
:list_pointers, DrawingObjectListPointers.by_value
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
# = Fields:
|
|
868
|
+
# :file ::
|
|
869
|
+
# (FFI::Pointer(*FILE))
|
|
870
|
+
# :embedded ::
|
|
871
|
+
# (Integer)
|
|
872
|
+
# :drawing_objects ::
|
|
873
|
+
# (DrawingObjects)
|
|
874
|
+
module DrawingWrappers
|
|
875
|
+
# @return [nil]
|
|
876
|
+
def free()
|
|
877
|
+
Libxlsxwriter.drawing_free(self)
|
|
878
|
+
end
|
|
879
|
+
|
|
880
|
+
# @return [nil]
|
|
881
|
+
def assemble_xml_file()
|
|
882
|
+
Libxlsxwriter.drawing_assemble_xml_file(self)
|
|
883
|
+
end
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
class Drawing < FFI::Struct
|
|
887
|
+
include DrawingWrappers
|
|
888
|
+
layout :file, :pointer,
|
|
889
|
+
:embedded, :uchar,
|
|
890
|
+
:drawing_objects, DrawingObjects
|
|
891
|
+
end
|
|
892
|
+
|
|
893
|
+
# @method drawing_new()
|
|
894
|
+
# @return [Drawing]
|
|
895
|
+
# @scope class
|
|
896
|
+
attach_function :drawing_new, :lxw_drawing_new, [], Drawing
|
|
897
|
+
|
|
898
|
+
# @method drawing_free(drawing)
|
|
899
|
+
# @param [Drawing] drawing
|
|
900
|
+
# @return [nil]
|
|
901
|
+
# @scope class
|
|
902
|
+
attach_function :drawing_free, :lxw_drawing_free, [Drawing], :void
|
|
903
|
+
|
|
904
|
+
# @method drawing_assemble_xml_file(self_)
|
|
905
|
+
# @param [Drawing] self_
|
|
906
|
+
# @return [nil]
|
|
907
|
+
# @scope class
|
|
908
|
+
attach_function :drawing_assemble_xml_file, :lxw_drawing_assemble_xml_file, [Drawing], :void
|
|
909
|
+
|
|
910
|
+
# @method free_drawing_object(drawing_object)
|
|
911
|
+
# @param [DrawingObject] drawing_object
|
|
912
|
+
# @return [nil]
|
|
913
|
+
# @scope class
|
|
914
|
+
attach_function :free_drawing_object, :lxw_free_drawing_object, [DrawingObject], :void
|
|
915
|
+
|
|
916
|
+
# @method add_drawing_object(drawing, drawing_object)
|
|
917
|
+
# @param [Drawing] drawing
|
|
918
|
+
# @param [DrawingObject] drawing_object
|
|
919
|
+
# @return [nil]
|
|
920
|
+
# @scope class
|
|
921
|
+
attach_function :add_drawing_object, :lxw_add_drawing_object, [Drawing, DrawingObject], :void
|
|
922
|
+
|
|
923
|
+
# @method strerror(error_num)
|
|
924
|
+
# @param [Symbol from _enum_error_] error_num
|
|
925
|
+
# @return [String]
|
|
926
|
+
# @scope class
|
|
927
|
+
attach_function :strerror, :lxw_strerror, [:error], :string
|
|
928
|
+
|
|
929
|
+
# @method quote_sheetname(str)
|
|
930
|
+
# @param [String] str
|
|
931
|
+
# @return [String]
|
|
932
|
+
# @scope class
|
|
933
|
+
attach_function :quote_sheetname, :lxw_quote_sheetname, [:string], :string
|
|
934
|
+
|
|
935
|
+
# @method col_to_name(col_name, col_num, absolute)
|
|
936
|
+
# @param [String] col_name
|
|
937
|
+
# @param [Integer] col_num
|
|
938
|
+
# @param [Integer] absolute
|
|
939
|
+
# @return [nil]
|
|
940
|
+
# @scope class
|
|
941
|
+
attach_function :col_to_name, :lxw_col_to_name, [:string, :ushort, :uchar], :void
|
|
942
|
+
|
|
943
|
+
# @method rowcol_to_cell(cell_name, row, col)
|
|
944
|
+
# @param [String] cell_name
|
|
945
|
+
# @param [Integer] row
|
|
946
|
+
# @param [Integer] col
|
|
947
|
+
# @return [nil]
|
|
948
|
+
# @scope class
|
|
949
|
+
attach_function :rowcol_to_cell, :lxw_rowcol_to_cell, [:string, :uint, :ushort], :void
|
|
950
|
+
|
|
951
|
+
# @method rowcol_to_cell_abs(cell_name, row, col, abs_row, abs_col)
|
|
952
|
+
# @param [String] cell_name
|
|
953
|
+
# @param [Integer] row
|
|
954
|
+
# @param [Integer] col
|
|
955
|
+
# @param [Integer] abs_row
|
|
956
|
+
# @param [Integer] abs_col
|
|
957
|
+
# @return [nil]
|
|
958
|
+
# @scope class
|
|
959
|
+
attach_function :rowcol_to_cell_abs, :lxw_rowcol_to_cell_abs, [:string, :uint, :ushort, :uchar, :uchar], :void
|
|
960
|
+
|
|
961
|
+
# @method rowcol_to_range(range, first_row, first_col, last_row, last_col)
|
|
962
|
+
# @param [String] range
|
|
963
|
+
# @param [Integer] first_row
|
|
964
|
+
# @param [Integer] first_col
|
|
965
|
+
# @param [Integer] last_row
|
|
966
|
+
# @param [Integer] last_col
|
|
967
|
+
# @return [nil]
|
|
968
|
+
# @scope class
|
|
969
|
+
attach_function :rowcol_to_range, :lxw_rowcol_to_range, [:string, :uint, :ushort, :uint, :ushort], :void
|
|
970
|
+
|
|
971
|
+
# @method rowcol_to_range_abs(range, first_row, first_col, last_row, last_col)
|
|
972
|
+
# @param [String] range
|
|
973
|
+
# @param [Integer] first_row
|
|
974
|
+
# @param [Integer] first_col
|
|
975
|
+
# @param [Integer] last_row
|
|
976
|
+
# @param [Integer] last_col
|
|
977
|
+
# @return [nil]
|
|
978
|
+
# @scope class
|
|
979
|
+
attach_function :rowcol_to_range_abs, :lxw_rowcol_to_range_abs, [:string, :uint, :ushort, :uint, :ushort], :void
|
|
980
|
+
|
|
981
|
+
# @method rowcol_to_formula_abs(formula, sheetname, first_row, first_col, last_row, last_col)
|
|
982
|
+
# @param [String] formula
|
|
983
|
+
# @param [String] sheetname
|
|
984
|
+
# @param [Integer] first_row
|
|
985
|
+
# @param [Integer] first_col
|
|
986
|
+
# @param [Integer] last_row
|
|
987
|
+
# @param [Integer] last_col
|
|
988
|
+
# @return [nil]
|
|
989
|
+
# @scope class
|
|
990
|
+
attach_function :rowcol_to_formula_abs, :lxw_rowcol_to_formula_abs, [:string, :string, :uint, :ushort, :uint, :ushort], :void
|
|
991
|
+
|
|
992
|
+
# @method name_to_row(row_str)
|
|
993
|
+
# @param [String] row_str
|
|
994
|
+
# @return [Integer]
|
|
995
|
+
# @scope class
|
|
996
|
+
attach_function :name_to_row, :lxw_name_to_row, [:string], :uint
|
|
997
|
+
|
|
998
|
+
# @method name_to_col(col_str)
|
|
999
|
+
# @param [String] col_str
|
|
1000
|
+
# @return [Integer]
|
|
1001
|
+
# @scope class
|
|
1002
|
+
attach_function :name_to_col, :lxw_name_to_col, [:string], :ushort
|
|
1003
|
+
|
|
1004
|
+
# @method name_to_row_2(row_str)
|
|
1005
|
+
# @param [String] row_str
|
|
1006
|
+
# @return [Integer]
|
|
1007
|
+
# @scope class
|
|
1008
|
+
attach_function :name_to_row_2, :lxw_name_to_row_2, [:string], :uint
|
|
1009
|
+
|
|
1010
|
+
# @method name_to_col_2(col_str)
|
|
1011
|
+
# @param [String] col_str
|
|
1012
|
+
# @return [Integer]
|
|
1013
|
+
# @scope class
|
|
1014
|
+
attach_function :name_to_col_2, :lxw_name_to_col_2, [:string], :ushort
|
|
1015
|
+
|
|
1016
|
+
# @method datetime_to_excel_date(datetime, date_1904)
|
|
1017
|
+
# @param [Datetime] datetime
|
|
1018
|
+
# @param [Integer] date_1904
|
|
1019
|
+
# @return [Float]
|
|
1020
|
+
# @scope class
|
|
1021
|
+
attach_function :datetime_to_excel_date, :lxw_datetime_to_excel_date, [Datetime, :uchar], :double
|
|
1022
|
+
|
|
1023
|
+
# @method strdup(str)
|
|
1024
|
+
# @param [String] str
|
|
1025
|
+
# @return [String]
|
|
1026
|
+
# @scope class
|
|
1027
|
+
attach_function :strdup, :lxw_strdup, [:string], :string
|
|
1028
|
+
|
|
1029
|
+
# @method utf8_strlen(str)
|
|
1030
|
+
# @param [String] str
|
|
1031
|
+
# @return [Integer]
|
|
1032
|
+
# @scope class
|
|
1033
|
+
attach_function :utf8_strlen, :lxw_utf8_strlen, [:string], :ulong
|
|
1034
|
+
|
|
1035
|
+
# @method str_tolower(str)
|
|
1036
|
+
# @param [String] str
|
|
1037
|
+
# @return [nil]
|
|
1038
|
+
# @scope class
|
|
1039
|
+
attach_function :str_tolower, :lxw_str_tolower, [:string], :void
|
|
1040
|
+
|
|
1041
|
+
# @method tmpfile(tmpdir)
|
|
1042
|
+
# @param [String] tmpdir
|
|
1043
|
+
# @return [FFI::Pointer(*FILE)]
|
|
1044
|
+
# @scope class
|
|
1045
|
+
attach_function :tmpfile, :lxw_tmpfile, [:string], :pointer
|
|
1046
|
+
|
|
1047
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:gridlines).</em>
|
|
1048
|
+
#
|
|
1049
|
+
# === Options:
|
|
1050
|
+
# :hide_all ::
|
|
1051
|
+
# Hide screen and print gridlines.
|
|
1052
|
+
# :show_screen ::
|
|
1053
|
+
# Show screen gridlines.
|
|
1054
|
+
# :show_print ::
|
|
1055
|
+
# Show print gridlines.
|
|
1056
|
+
# :show_all ::
|
|
1057
|
+
# Show screen and print gridlines.
|
|
1058
|
+
#
|
|
1059
|
+
# @method _enum_gridlines_
|
|
1060
|
+
# @return [Symbol]
|
|
1061
|
+
# @scope class
|
|
1062
|
+
enum :gridlines, [
|
|
1063
|
+
:hide_all, 0,
|
|
1064
|
+
:show_screen, 1,
|
|
1065
|
+
:show_print, 2,
|
|
1066
|
+
:show_all, 3
|
|
1067
|
+
]
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
# <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:pane_types).</em>
|
|
1071
|
+
#
|
|
1072
|
+
# === Options:
|
|
1073
|
+
# :no_panes ::
|
|
1074
|
+
#
|
|
1075
|
+
# :freeze_panes ::
|
|
1076
|
+
#
|
|
1077
|
+
# :split_panes ::
|
|
1078
|
+
#
|
|
1079
|
+
# :freeze_split_panes ::
|
|
1080
|
+
#
|
|
1081
|
+
#
|
|
1082
|
+
# @method _enum_pane_types_
|
|
1083
|
+
# @return [Symbol]
|
|
1084
|
+
# @scope class
|
|
1085
|
+
enum :pane_types, [
|
|
1086
|
+
:no_panes, 0,
|
|
1087
|
+
:freeze_panes, 1,
|
|
1088
|
+
:split_panes, 2,
|
|
1089
|
+
:freeze_split_panes, 3
|
|
1090
|
+
]
|
|
1091
|
+
|
|
1092
|
+
# = Fields:
|
|
1093
|
+
# :stqh_first ::
|
|
1094
|
+
# (FFI::Pointer(*MergedRange))
|
|
1095
|
+
# :stqh_last ::
|
|
1096
|
+
# (FFI::Pointer(**MergedRange))
|
|
1097
|
+
class MergedRanges < FFI::Struct
|
|
1098
|
+
layout :stqh_first, :pointer,
|
|
1099
|
+
:stqh_last, :pointer
|
|
1100
|
+
end
|
|
1101
|
+
|
|
1102
|
+
# = Fields:
|
|
1103
|
+
# :stqh_first ::
|
|
1104
|
+
# (FFI::Pointer(*Selection))
|
|
1105
|
+
# :stqh_last ::
|
|
1106
|
+
# (FFI::Pointer(**Selection))
|
|
1107
|
+
class Selections < FFI::Struct
|
|
1108
|
+
layout :stqh_first, :pointer,
|
|
1109
|
+
:stqh_last, :pointer
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1112
|
+
# = Fields:
|
|
1113
|
+
# :stqh_first ::
|
|
1114
|
+
# (FFI::Pointer(*ImageOptions))
|
|
1115
|
+
# :stqh_last ::
|
|
1116
|
+
# (FFI::Pointer(**ImageOptions))
|
|
1117
|
+
class ImageData < FFI::Struct
|
|
1118
|
+
layout :stqh_first, :pointer,
|
|
1119
|
+
:stqh_last, :pointer
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# = Fields:
|
|
1123
|
+
# :stqh_first ::
|
|
1124
|
+
# (FFI::Pointer(*ImageOptions))
|
|
1125
|
+
# :stqh_last ::
|
|
1126
|
+
# (FFI::Pointer(**ImageOptions))
|
|
1127
|
+
class ChartData < FFI::Struct
|
|
1128
|
+
layout :stqh_first, :pointer,
|
|
1129
|
+
:stqh_last, :pointer
|
|
1130
|
+
end
|
|
1131
|
+
|
|
1132
|
+
# = Fields:
|
|
1133
|
+
# :hidden ::
|
|
1134
|
+
# (Integer) Hide the row/column
|
|
1135
|
+
# :level ::
|
|
1136
|
+
# (Integer)
|
|
1137
|
+
# :collapsed ::
|
|
1138
|
+
# (Integer)
|
|
1139
|
+
class RowColOptions < FFI::Struct
|
|
1140
|
+
layout :hidden, :uchar,
|
|
1141
|
+
:level, :uchar,
|
|
1142
|
+
:collapsed, :uchar
|
|
1143
|
+
end
|
|
1144
|
+
|
|
1145
|
+
require_relative 'binding/format'
|
|
1146
|
+
|
|
1147
|
+
#
|
|
1148
|
+
# = Fields:
|
|
1149
|
+
# :firstcol ::
|
|
1150
|
+
# (Integer)
|
|
1151
|
+
# :lastcol ::
|
|
1152
|
+
# (Integer)
|
|
1153
|
+
# :width ::
|
|
1154
|
+
# (Float)
|
|
1155
|
+
# :format ::
|
|
1156
|
+
# (Format)
|
|
1157
|
+
# :hidden ::
|
|
1158
|
+
# (Integer)
|
|
1159
|
+
# :level ::
|
|
1160
|
+
# (Integer)
|
|
1161
|
+
# :collapsed ::
|
|
1162
|
+
# (Integer)
|
|
1163
|
+
class ColOptions < FFI::Struct
|
|
1164
|
+
layout :firstcol, :ushort,
|
|
1165
|
+
:lastcol, :ushort,
|
|
1166
|
+
:width, :double,
|
|
1167
|
+
:format, Format,
|
|
1168
|
+
:hidden, :uchar,
|
|
1169
|
+
:level, :uchar,
|
|
1170
|
+
:collapsed, :uchar
|
|
1171
|
+
end
|
|
1172
|
+
|
|
1173
|
+
# = Fields:
|
|
1174
|
+
# :stqe_next ::
|
|
1175
|
+
# (FFI::Pointer(*MergedRange))
|
|
1176
|
+
class MergedRangeListPointers < FFI::Struct
|
|
1177
|
+
layout :stqe_next, :pointer
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
# = Fields:
|
|
1181
|
+
# :first_row ::
|
|
1182
|
+
# (Integer)
|
|
1183
|
+
# :last_row ::
|
|
1184
|
+
# (Integer)
|
|
1185
|
+
# :first_col ::
|
|
1186
|
+
# (Integer)
|
|
1187
|
+
# :last_col ::
|
|
1188
|
+
# (Integer)
|
|
1189
|
+
# :list_pointers ::
|
|
1190
|
+
# (MergedRangeListPointers)
|
|
1191
|
+
class MergedRange < FFI::Struct
|
|
1192
|
+
layout :first_row, :uint,
|
|
1193
|
+
:last_row, :uint,
|
|
1194
|
+
:first_col, :ushort,
|
|
1195
|
+
:last_col, :ushort,
|
|
1196
|
+
:list_pointers, MergedRangeListPointers.by_value
|
|
1197
|
+
end
|
|
1198
|
+
|
|
1199
|
+
# = Fields:
|
|
1200
|
+
# :in_use ::
|
|
1201
|
+
# (Integer)
|
|
1202
|
+
# :first_row ::
|
|
1203
|
+
# (Integer)
|
|
1204
|
+
# :last_row ::
|
|
1205
|
+
# (Integer)
|
|
1206
|
+
class RepeatRows < FFI::Struct
|
|
1207
|
+
layout :in_use, :uchar,
|
|
1208
|
+
:first_row, :uint,
|
|
1209
|
+
:last_row, :uint
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
# = Fields:
|
|
1213
|
+
# :in_use ::
|
|
1214
|
+
# (Integer)
|
|
1215
|
+
# :first_col ::
|
|
1216
|
+
# (Integer)
|
|
1217
|
+
# :last_col ::
|
|
1218
|
+
# (Integer)
|
|
1219
|
+
class RepeatCols < FFI::Struct
|
|
1220
|
+
layout :in_use, :uchar,
|
|
1221
|
+
:first_col, :ushort,
|
|
1222
|
+
:last_col, :ushort
|
|
1223
|
+
end
|
|
1224
|
+
|
|
1225
|
+
# = Fields:
|
|
1226
|
+
# :in_use ::
|
|
1227
|
+
# (Integer)
|
|
1228
|
+
# :first_row ::
|
|
1229
|
+
# (Integer)
|
|
1230
|
+
# :last_row ::
|
|
1231
|
+
# (Integer)
|
|
1232
|
+
# :first_col ::
|
|
1233
|
+
# (Integer)
|
|
1234
|
+
# :last_col ::
|
|
1235
|
+
# (Integer)
|
|
1236
|
+
class PrintArea < FFI::Struct
|
|
1237
|
+
layout :in_use, :uchar,
|
|
1238
|
+
:first_row, :uint,
|
|
1239
|
+
:last_row, :uint,
|
|
1240
|
+
:first_col, :ushort,
|
|
1241
|
+
:last_col, :ushort
|
|
1242
|
+
end
|
|
1243
|
+
|
|
1244
|
+
# = Fields:
|
|
1245
|
+
# :in_use ::
|
|
1246
|
+
# (Integer)
|
|
1247
|
+
# :first_row ::
|
|
1248
|
+
# (Integer)
|
|
1249
|
+
# :last_row ::
|
|
1250
|
+
# (Integer)
|
|
1251
|
+
# :first_col ::
|
|
1252
|
+
# (Integer)
|
|
1253
|
+
# :last_col ::
|
|
1254
|
+
# (Integer)
|
|
1255
|
+
class Autofilter < FFI::Struct
|
|
1256
|
+
layout :in_use, :uchar,
|
|
1257
|
+
:first_row, :uint,
|
|
1258
|
+
:last_row, :uint,
|
|
1259
|
+
:first_col, :ushort,
|
|
1260
|
+
:last_col, :ushort
|
|
1261
|
+
end
|
|
1262
|
+
|
|
1263
|
+
# = Fields:
|
|
1264
|
+
# :type ::
|
|
1265
|
+
# (Integer)
|
|
1266
|
+
# :first_row ::
|
|
1267
|
+
# (Integer)
|
|
1268
|
+
# :first_col ::
|
|
1269
|
+
# (Integer)
|
|
1270
|
+
# :top_row ::
|
|
1271
|
+
# (Integer)
|
|
1272
|
+
# :left_col ::
|
|
1273
|
+
# (Integer)
|
|
1274
|
+
# :x_split ::
|
|
1275
|
+
# (Float)
|
|
1276
|
+
# :y_split ::
|
|
1277
|
+
# (Float)
|
|
1278
|
+
class Panes < FFI::Struct
|
|
1279
|
+
layout :type, :uchar,
|
|
1280
|
+
:first_row, :uint,
|
|
1281
|
+
:first_col, :ushort,
|
|
1282
|
+
:top_row, :uint,
|
|
1283
|
+
:left_col, :ushort,
|
|
1284
|
+
:x_split, :double,
|
|
1285
|
+
:y_split, :double
|
|
1286
|
+
end
|
|
1287
|
+
|
|
1288
|
+
# = Fields:
|
|
1289
|
+
# :stqe_next ::
|
|
1290
|
+
# (FFI::Pointer(*Selection))
|
|
1291
|
+
class SelectionListPointers < FFI::Struct
|
|
1292
|
+
layout :stqe_next, :pointer
|
|
1293
|
+
end
|
|
1294
|
+
|
|
1295
|
+
# = Fields:
|
|
1296
|
+
# :pane ::
|
|
1297
|
+
# (Array<Integer>)
|
|
1298
|
+
# :active_cell ::
|
|
1299
|
+
# (Array<Integer>)
|
|
1300
|
+
# :sqref ::
|
|
1301
|
+
# (Array<Integer>)
|
|
1302
|
+
# :list_pointers ::
|
|
1303
|
+
# (SelectionListPointers)
|
|
1304
|
+
class Selection < FFI::Struct
|
|
1305
|
+
layout :pane, [:char, 12],
|
|
1306
|
+
:active_cell, [:char, 28],
|
|
1307
|
+
:sqref, [:char, 28],
|
|
1308
|
+
:list_pointers, SelectionListPointers.by_value
|
|
1309
|
+
end
|
|
1310
|
+
|
|
1311
|
+
# = Fields:
|
|
1312
|
+
# :stqe_next ::
|
|
1313
|
+
# (FFI::Pointer(*ImageOptions))
|
|
1314
|
+
class ImageOptionsListPointers < FFI::Struct
|
|
1315
|
+
layout :stqe_next, :pointer
|
|
1316
|
+
end
|
|
1317
|
+
|
|
1318
|
+
# = Fields:
|
|
1319
|
+
# :x_offset ::
|
|
1320
|
+
# (Integer) Offset from the left of the cell in pixels.
|
|
1321
|
+
# :y_offset ::
|
|
1322
|
+
# (Integer) Offset from the top of the cell in pixels.
|
|
1323
|
+
# :x_scale ::
|
|
1324
|
+
# (Float) X scale of the image as a decimal.
|
|
1325
|
+
# :y_scale ::
|
|
1326
|
+
# (Float) Y scale of the image as a decimal.
|
|
1327
|
+
# :row ::
|
|
1328
|
+
# (Integer)
|
|
1329
|
+
# :col ::
|
|
1330
|
+
# (Integer)
|
|
1331
|
+
# :filename ::
|
|
1332
|
+
# (String)
|
|
1333
|
+
# :url ::
|
|
1334
|
+
# (String)
|
|
1335
|
+
# :tip ::
|
|
1336
|
+
# (String)
|
|
1337
|
+
# :anchor ::
|
|
1338
|
+
# (Integer)
|
|
1339
|
+
# :stream ::
|
|
1340
|
+
# (FFI::Pointer(*FILE)) Internal metadata.
|
|
1341
|
+
# :image_type ::
|
|
1342
|
+
# (Integer)
|
|
1343
|
+
# :width ::
|
|
1344
|
+
# (Float)
|
|
1345
|
+
# :height ::
|
|
1346
|
+
# (Float)
|
|
1347
|
+
# :short_name ::
|
|
1348
|
+
# (String)
|
|
1349
|
+
# :extension ::
|
|
1350
|
+
# (String)
|
|
1351
|
+
# :x_dpi ::
|
|
1352
|
+
# (Float)
|
|
1353
|
+
# :y_dpi ::
|
|
1354
|
+
# (Float)
|
|
1355
|
+
# :chart ::
|
|
1356
|
+
# (Chart)
|
|
1357
|
+
# :list_pointers ::
|
|
1358
|
+
# (ImageOptionsListPointers)
|
|
1359
|
+
class ImageOptions < FFI::Struct
|
|
1360
|
+
layout :x_offset, :int,
|
|
1361
|
+
:y_offset, :int,
|
|
1362
|
+
:x_scale, :double,
|
|
1363
|
+
:y_scale, :double,
|
|
1364
|
+
:row, :uint,
|
|
1365
|
+
:col, :ushort,
|
|
1366
|
+
:filename, :string,
|
|
1367
|
+
:url, :string,
|
|
1368
|
+
:tip, :string,
|
|
1369
|
+
:anchor, :uchar,
|
|
1370
|
+
:stream, :pointer,
|
|
1371
|
+
:image_type, :uchar,
|
|
1372
|
+
:width, :double,
|
|
1373
|
+
:height, :double,
|
|
1374
|
+
:short_name, :string,
|
|
1375
|
+
:extension, :string,
|
|
1376
|
+
:x_dpi, :double,
|
|
1377
|
+
:y_dpi, :double,
|
|
1378
|
+
:chart, Chart,
|
|
1379
|
+
:list_pointers, ImageOptionsListPointers.by_value
|
|
1380
|
+
end
|
|
1381
|
+
|
|
1382
|
+
# = Fields:
|
|
1383
|
+
# :margin ::
|
|
1384
|
+
# (Float) Header or footer margin in inches. Excel default is 0.3.
|
|
1385
|
+
class HeaderFooterOptions < FFI::Struct
|
|
1386
|
+
layout :margin, :double
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
# = Fields:
|
|
1390
|
+
# :no_select_locked_cells ::
|
|
1391
|
+
# (Integer) Turn off selection of locked cells. This in on in Excel by default.
|
|
1392
|
+
# :no_select_unlocked_cells ::
|
|
1393
|
+
# (Integer) Turn off selection of unlocked cells. This in on in Excel by default.
|
|
1394
|
+
# :format_cells ::
|
|
1395
|
+
# (Integer) Prevent formatting of cells.
|
|
1396
|
+
# :format_columns ::
|
|
1397
|
+
# (Integer) Prevent formatting of columns.
|
|
1398
|
+
# :format_rows ::
|
|
1399
|
+
# (Integer) Prevent formatting of rows.
|
|
1400
|
+
# :insert_columns ::
|
|
1401
|
+
# (Integer) Prevent insertion of columns.
|
|
1402
|
+
# :insert_rows ::
|
|
1403
|
+
# (Integer) Prevent insertion of rows.
|
|
1404
|
+
# :insert_hyperlinks ::
|
|
1405
|
+
# (Integer) Prevent insertion of hyperlinks.
|
|
1406
|
+
# :delete_columns ::
|
|
1407
|
+
# (Integer) Prevent deletion of columns.
|
|
1408
|
+
# :delete_rows ::
|
|
1409
|
+
# (Integer) Prevent deletion of rows.
|
|
1410
|
+
# :sort ::
|
|
1411
|
+
# (Integer) Prevent sorting data.
|
|
1412
|
+
# :autofilter ::
|
|
1413
|
+
# (Integer) Prevent filtering data.
|
|
1414
|
+
# :pivot_tables ::
|
|
1415
|
+
# (Integer) Prevent insertion of pivot tables.
|
|
1416
|
+
# :scenarios ::
|
|
1417
|
+
# (Integer) Protect scenarios.
|
|
1418
|
+
# :objects ::
|
|
1419
|
+
# (Integer) Protect drawing objects.
|
|
1420
|
+
# :no_sheet ::
|
|
1421
|
+
# (Integer)
|
|
1422
|
+
# :content ::
|
|
1423
|
+
# (Integer)
|
|
1424
|
+
# :is_configured ::
|
|
1425
|
+
# (Integer)
|
|
1426
|
+
# :hash ::
|
|
1427
|
+
# (Array<Integer>)
|
|
1428
|
+
class Protection < FFI::Struct
|
|
1429
|
+
layout :no_select_locked_cells, :uchar,
|
|
1430
|
+
:no_select_unlocked_cells, :uchar,
|
|
1431
|
+
:format_cells, :uchar,
|
|
1432
|
+
:format_columns, :uchar,
|
|
1433
|
+
:format_rows, :uchar,
|
|
1434
|
+
:insert_columns, :uchar,
|
|
1435
|
+
:insert_rows, :uchar,
|
|
1436
|
+
:insert_hyperlinks, :uchar,
|
|
1437
|
+
:delete_columns, :uchar,
|
|
1438
|
+
:delete_rows, :uchar,
|
|
1439
|
+
:sort, :uchar,
|
|
1440
|
+
:autofilter, :uchar,
|
|
1441
|
+
:pivot_tables, :uchar,
|
|
1442
|
+
:scenarios, :uchar,
|
|
1443
|
+
:objects, :uchar,
|
|
1444
|
+
:no_sheet, :uchar,
|
|
1445
|
+
:content, :uchar,
|
|
1446
|
+
:is_configured, :uchar,
|
|
1447
|
+
:hash, [:char, 5]
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
require_relative 'binding/worksheet'
|
|
1451
|
+
|
|
1452
|
+
#
|
|
1453
|
+
# = Fields:
|
|
1454
|
+
# :stqh_first ::
|
|
1455
|
+
# (Chart)
|
|
1456
|
+
# :stqh_last ::
|
|
1457
|
+
# (FFI::Pointer(**Chart))
|
|
1458
|
+
class Charts < FFI::Struct
|
|
1459
|
+
layout :stqh_first, Chart,
|
|
1460
|
+
:stqh_last, :pointer
|
|
1461
|
+
end
|
|
1462
|
+
|
|
1463
|
+
# = Fields:
|
|
1464
|
+
# :tqh_first ::
|
|
1465
|
+
# (FFI::Pointer(*DefinedName))
|
|
1466
|
+
# :tqh_last ::
|
|
1467
|
+
# (FFI::Pointer(**DefinedName))
|
|
1468
|
+
class DefinedNames < FFI::Struct
|
|
1469
|
+
layout :tqh_first, :pointer,
|
|
1470
|
+
:tqh_last, :pointer
|
|
1471
|
+
end
|
|
1472
|
+
|
|
1473
|
+
# = Fields:
|
|
1474
|
+
# :tqe_next ::
|
|
1475
|
+
# (FFI::Pointer(*DefinedName))
|
|
1476
|
+
# :tqe_prev ::
|
|
1477
|
+
# (FFI::Pointer(**DefinedName))
|
|
1478
|
+
class DefinedNameListPointers < FFI::Struct
|
|
1479
|
+
layout :tqe_next, :pointer,
|
|
1480
|
+
:tqe_prev, :pointer
|
|
1481
|
+
end
|
|
1482
|
+
|
|
1483
|
+
# = Fields:
|
|
1484
|
+
# :index ::
|
|
1485
|
+
# (Integer)
|
|
1486
|
+
# :hidden ::
|
|
1487
|
+
# (Integer)
|
|
1488
|
+
# :name ::
|
|
1489
|
+
# (Array<Integer>)
|
|
1490
|
+
# :app_name ::
|
|
1491
|
+
# (Array<Integer>)
|
|
1492
|
+
# :formula ::
|
|
1493
|
+
# (Array<Integer>)
|
|
1494
|
+
# :normalised_name ::
|
|
1495
|
+
# (Array<Integer>)
|
|
1496
|
+
# :normalised_sheetname ::
|
|
1497
|
+
# (Array<Integer>)
|
|
1498
|
+
# :list_pointers ::
|
|
1499
|
+
# (DefinedNameListPointers)
|
|
1500
|
+
class DefinedName < FFI::Struct
|
|
1501
|
+
layout :index, :short,
|
|
1502
|
+
:hidden, :uchar,
|
|
1503
|
+
:name, [:char, 128],
|
|
1504
|
+
:app_name, [:char, 128],
|
|
1505
|
+
:formula, [:char, 128],
|
|
1506
|
+
:normalised_name, [:char, 128],
|
|
1507
|
+
:normalised_sheetname, [:char, 128],
|
|
1508
|
+
:list_pointers, DefinedNameListPointers.by_value
|
|
1509
|
+
end
|
|
1510
|
+
|
|
1511
|
+
# = Fields:
|
|
1512
|
+
# :title ::
|
|
1513
|
+
# (String) The title of the Excel Document.
|
|
1514
|
+
# :subject ::
|
|
1515
|
+
# (String) The subject of the Excel Document.
|
|
1516
|
+
# :author ::
|
|
1517
|
+
# (String) The author of the Excel Document.
|
|
1518
|
+
# :manager ::
|
|
1519
|
+
# (String) The manager field of the Excel Document.
|
|
1520
|
+
# :company ::
|
|
1521
|
+
# (String) The company field of the Excel Document.
|
|
1522
|
+
# :category ::
|
|
1523
|
+
# (String) The category of the Excel Document.
|
|
1524
|
+
# :keywords ::
|
|
1525
|
+
# (String) The keywords of the Excel Document.
|
|
1526
|
+
# :comments ::
|
|
1527
|
+
# (String) The comment field of the Excel Document.
|
|
1528
|
+
# :status ::
|
|
1529
|
+
# (String) The status of the Excel Document.
|
|
1530
|
+
# :hyperlink_base ::
|
|
1531
|
+
# (String) The hyperlink base url of the Excel Document.
|
|
1532
|
+
# :created ::
|
|
1533
|
+
# (Integer)
|
|
1534
|
+
class DocProperties < FFI::Struct
|
|
1535
|
+
layout :title, :string,
|
|
1536
|
+
:subject, :string,
|
|
1537
|
+
:author, :string,
|
|
1538
|
+
:manager, :string,
|
|
1539
|
+
:company, :string,
|
|
1540
|
+
:category, :string,
|
|
1541
|
+
:keywords, :string,
|
|
1542
|
+
:comments, :string,
|
|
1543
|
+
:status, :string,
|
|
1544
|
+
:hyperlink_base, :string,
|
|
1545
|
+
:created, :long
|
|
1546
|
+
end
|
|
1547
|
+
|
|
1548
|
+
#
|
|
1549
|
+
# = Fields:
|
|
1550
|
+
# :stqh_first ::
|
|
1551
|
+
# (FFI::Pointer(*HeadingPair))
|
|
1552
|
+
# :stqh_last ::
|
|
1553
|
+
# (FFI::Pointer(**HeadingPair))
|
|
1554
|
+
class HeadingPairs < FFI::Struct
|
|
1555
|
+
layout :stqh_first, :pointer,
|
|
1556
|
+
:stqh_last, :pointer
|
|
1557
|
+
end
|
|
1558
|
+
|
|
1559
|
+
# = Fields:
|
|
1560
|
+
# :stqh_first ::
|
|
1561
|
+
# (FFI::Pointer(*PartName))
|
|
1562
|
+
# :stqh_last ::
|
|
1563
|
+
# (FFI::Pointer(**PartName))
|
|
1564
|
+
class PartNames < FFI::Struct
|
|
1565
|
+
layout :stqh_first, :pointer,
|
|
1566
|
+
:stqh_last, :pointer
|
|
1567
|
+
end
|
|
1568
|
+
|
|
1569
|
+
# = Fields:
|
|
1570
|
+
# :stqe_next ::
|
|
1571
|
+
# (FFI::Pointer(*HeadingPair))
|
|
1572
|
+
class HeadingPairListPointers < FFI::Struct
|
|
1573
|
+
layout :stqe_next, :pointer
|
|
1574
|
+
end
|
|
1575
|
+
|
|
1576
|
+
# = Fields:
|
|
1577
|
+
# :key ::
|
|
1578
|
+
# (String)
|
|
1579
|
+
# :value ::
|
|
1580
|
+
# (String)
|
|
1581
|
+
# :list_pointers ::
|
|
1582
|
+
# (HeadingPairListPointers)
|
|
1583
|
+
class HeadingPair < FFI::Struct
|
|
1584
|
+
layout :key, :string,
|
|
1585
|
+
:value, :string,
|
|
1586
|
+
:list_pointers, HeadingPairListPointers.by_value
|
|
1587
|
+
end
|
|
1588
|
+
|
|
1589
|
+
# = Fields:
|
|
1590
|
+
# :stqe_next ::
|
|
1591
|
+
# (FFI::Pointer(*PartName))
|
|
1592
|
+
class PartNameListPointers < FFI::Struct
|
|
1593
|
+
layout :stqe_next, :pointer
|
|
1594
|
+
end
|
|
1595
|
+
|
|
1596
|
+
# = Fields:
|
|
1597
|
+
# :name ::
|
|
1598
|
+
# (String)
|
|
1599
|
+
# :list_pointers ::
|
|
1600
|
+
# (PartNameListPointers)
|
|
1601
|
+
class PartName < FFI::Struct
|
|
1602
|
+
layout :name, :string,
|
|
1603
|
+
:list_pointers, PartNameListPointers.by_value
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
# = Fields:
|
|
1607
|
+
# :file ::
|
|
1608
|
+
# (FFI::Pointer(*FILE))
|
|
1609
|
+
# :heading_pairs ::
|
|
1610
|
+
# (HeadingPairs)
|
|
1611
|
+
# :part_names ::
|
|
1612
|
+
# (PartNames)
|
|
1613
|
+
# :properties ::
|
|
1614
|
+
# (DocProperties)
|
|
1615
|
+
# :num_heading_pairs ::
|
|
1616
|
+
# (Integer)
|
|
1617
|
+
# :num_part_names ::
|
|
1618
|
+
# (Integer)
|
|
1619
|
+
module AppWrappers
|
|
1620
|
+
# @return [nil]
|
|
1621
|
+
def free()
|
|
1622
|
+
Libxlsxwriter.app_free(self)
|
|
1623
|
+
end
|
|
1624
|
+
|
|
1625
|
+
# @return [nil]
|
|
1626
|
+
def assemble_xml_file()
|
|
1627
|
+
Libxlsxwriter.app_assemble_xml_file(self)
|
|
1628
|
+
end
|
|
1629
|
+
|
|
1630
|
+
# @param [String] name
|
|
1631
|
+
# @return [nil]
|
|
1632
|
+
def add_part_name(name)
|
|
1633
|
+
Libxlsxwriter.app_add_part_name(self, name)
|
|
1634
|
+
end
|
|
1635
|
+
|
|
1636
|
+
# @param [String] key
|
|
1637
|
+
# @param [String] value
|
|
1638
|
+
# @return [nil]
|
|
1639
|
+
def add_heading_pair(key, value)
|
|
1640
|
+
Libxlsxwriter.app_add_heading_pair(self, key, value)
|
|
1641
|
+
end
|
|
1642
|
+
end
|
|
1643
|
+
|
|
1644
|
+
class App < FFI::Struct
|
|
1645
|
+
include AppWrappers
|
|
1646
|
+
layout :file, :pointer,
|
|
1647
|
+
:heading_pairs, HeadingPairs,
|
|
1648
|
+
:part_names, PartNames,
|
|
1649
|
+
:properties, DocProperties,
|
|
1650
|
+
:num_heading_pairs, :uint,
|
|
1651
|
+
:num_part_names, :uint
|
|
1652
|
+
end
|
|
1653
|
+
|
|
1654
|
+
# @method app_new()
|
|
1655
|
+
# @return [App]
|
|
1656
|
+
# @scope class
|
|
1657
|
+
attach_function :app_new, :lxw_app_new, [], App
|
|
1658
|
+
|
|
1659
|
+
# @method app_free(app)
|
|
1660
|
+
# @param [App] app
|
|
1661
|
+
# @return [nil]
|
|
1662
|
+
# @scope class
|
|
1663
|
+
attach_function :app_free, :lxw_app_free, [App], :void
|
|
1664
|
+
|
|
1665
|
+
# @method app_assemble_xml_file(self_)
|
|
1666
|
+
# @param [App] self_
|
|
1667
|
+
# @return [nil]
|
|
1668
|
+
# @scope class
|
|
1669
|
+
attach_function :app_assemble_xml_file, :lxw_app_assemble_xml_file, [App], :void
|
|
1670
|
+
|
|
1671
|
+
# @method app_add_part_name(self_, name)
|
|
1672
|
+
# @param [App] self_
|
|
1673
|
+
# @param [String] name
|
|
1674
|
+
# @return [nil]
|
|
1675
|
+
# @scope class
|
|
1676
|
+
attach_function :app_add_part_name, :lxw_app_add_part_name, [App, :string], :void
|
|
1677
|
+
|
|
1678
|
+
# @method app_add_heading_pair(self_, key, value)
|
|
1679
|
+
# @param [App] self_
|
|
1680
|
+
# @param [String] key
|
|
1681
|
+
# @param [String] value
|
|
1682
|
+
# @return [nil]
|
|
1683
|
+
# @scope class
|
|
1684
|
+
attach_function :app_add_heading_pair, :lxw_app_add_heading_pair, [App, :string, :string], :void
|
|
1685
|
+
|
|
1686
|
+
# = Fields:
|
|
1687
|
+
# :file ::
|
|
1688
|
+
# (FFI::Pointer(*FILE))
|
|
1689
|
+
# :default_types ::
|
|
1690
|
+
# (Tuples)
|
|
1691
|
+
# :overrides ::
|
|
1692
|
+
# (Tuples)
|
|
1693
|
+
module ContentTypesWrappers
|
|
1694
|
+
# @return [nil]
|
|
1695
|
+
def free()
|
|
1696
|
+
Libxlsxwriter.content_types_free(self)
|
|
1697
|
+
end
|
|
1698
|
+
|
|
1699
|
+
# @return [nil]
|
|
1700
|
+
def assemble_xml_file()
|
|
1701
|
+
Libxlsxwriter.content_types_assemble_xml_file(self)
|
|
1702
|
+
end
|
|
1703
|
+
end
|
|
1704
|
+
|
|
1705
|
+
class ContentTypes < FFI::Struct
|
|
1706
|
+
include ContentTypesWrappers
|
|
1707
|
+
layout :file, :pointer,
|
|
1708
|
+
:default_types, Tuples,
|
|
1709
|
+
:overrides, Tuples
|
|
1710
|
+
end
|
|
1711
|
+
|
|
1712
|
+
# @method content_types_new()
|
|
1713
|
+
# @return [ContentTypes]
|
|
1714
|
+
# @scope class
|
|
1715
|
+
attach_function :content_types_new, :lxw_content_types_new, [], ContentTypes
|
|
1716
|
+
|
|
1717
|
+
# @method content_types_free(content_types)
|
|
1718
|
+
# @param [ContentTypes] content_types
|
|
1719
|
+
# @return [nil]
|
|
1720
|
+
# @scope class
|
|
1721
|
+
attach_function :content_types_free, :lxw_content_types_free, [ContentTypes], :void
|
|
1722
|
+
|
|
1723
|
+
# @method content_types_assemble_xml_file(content_types)
|
|
1724
|
+
# @param [ContentTypes] content_types
|
|
1725
|
+
# @return [nil]
|
|
1726
|
+
# @scope class
|
|
1727
|
+
attach_function :content_types_assemble_xml_file, :lxw_content_types_assemble_xml_file, [ContentTypes], :void
|
|
1728
|
+
|
|
1729
|
+
# @method ct_add_default(content_types, key, value)
|
|
1730
|
+
# @param [ContentTypes] content_types
|
|
1731
|
+
# @param [String] key
|
|
1732
|
+
# @param [String] value
|
|
1733
|
+
# @return [nil]
|
|
1734
|
+
# @scope class
|
|
1735
|
+
attach_function :ct_add_default, :lxw_ct_add_default, [ContentTypes, :string, :string], :void
|
|
1736
|
+
|
|
1737
|
+
# @method ct_add_override(content_types, key, value)
|
|
1738
|
+
# @param [ContentTypes] content_types
|
|
1739
|
+
# @param [String] key
|
|
1740
|
+
# @param [String] value
|
|
1741
|
+
# @return [nil]
|
|
1742
|
+
# @scope class
|
|
1743
|
+
attach_function :ct_add_override, :lxw_ct_add_override, [ContentTypes, :string, :string], :void
|
|
1744
|
+
|
|
1745
|
+
# @method ct_add_worksheet_name(content_types, name)
|
|
1746
|
+
# @param [ContentTypes] content_types
|
|
1747
|
+
# @param [String] name
|
|
1748
|
+
# @return [nil]
|
|
1749
|
+
# @scope class
|
|
1750
|
+
attach_function :ct_add_worksheet_name, :lxw_ct_add_worksheet_name, [ContentTypes, :string], :void
|
|
1751
|
+
|
|
1752
|
+
# @method ct_add_chart_name(content_types, name)
|
|
1753
|
+
# @param [ContentTypes] content_types
|
|
1754
|
+
# @param [String] name
|
|
1755
|
+
# @return [nil]
|
|
1756
|
+
# @scope class
|
|
1757
|
+
attach_function :ct_add_chart_name, :lxw_ct_add_chart_name, [ContentTypes, :string], :void
|
|
1758
|
+
|
|
1759
|
+
# @method ct_add_drawing_name(content_types, name)
|
|
1760
|
+
# @param [ContentTypes] content_types
|
|
1761
|
+
# @param [String] name
|
|
1762
|
+
# @return [nil]
|
|
1763
|
+
# @scope class
|
|
1764
|
+
attach_function :ct_add_drawing_name, :lxw_ct_add_drawing_name, [ContentTypes, :string], :void
|
|
1765
|
+
|
|
1766
|
+
# @method ct_add_shared_strings(content_types)
|
|
1767
|
+
# @param [ContentTypes] content_types
|
|
1768
|
+
# @return [nil]
|
|
1769
|
+
# @scope class
|
|
1770
|
+
attach_function :ct_add_shared_strings, :lxw_ct_add_shared_strings, [ContentTypes], :void
|
|
1771
|
+
|
|
1772
|
+
# @method ct_add_calc_chain(content_types)
|
|
1773
|
+
# @param [ContentTypes] content_types
|
|
1774
|
+
# @return [nil]
|
|
1775
|
+
# @scope class
|
|
1776
|
+
attach_function :ct_add_calc_chain, :lxw_ct_add_calc_chain, [ContentTypes], :void
|
|
1777
|
+
|
|
1778
|
+
# @method ct_add_custom_properties(content_types)
|
|
1779
|
+
# @param [ContentTypes] content_types
|
|
1780
|
+
# @return [nil]
|
|
1781
|
+
# @scope class
|
|
1782
|
+
attach_function :ct_add_custom_properties, :lxw_ct_add_custom_properties, [ContentTypes], :void
|
|
1783
|
+
|
|
1784
|
+
# = Fields:
|
|
1785
|
+
# :file ::
|
|
1786
|
+
# (FFI::Pointer(*FILE))
|
|
1787
|
+
# :properties ::
|
|
1788
|
+
# (DocProperties)
|
|
1789
|
+
module CoreWrappers
|
|
1790
|
+
# @return [nil]
|
|
1791
|
+
def free()
|
|
1792
|
+
Libxlsxwriter.core_free(self)
|
|
1793
|
+
end
|
|
1794
|
+
|
|
1795
|
+
# @return [nil]
|
|
1796
|
+
def assemble_xml_file()
|
|
1797
|
+
Libxlsxwriter.core_assemble_xml_file(self)
|
|
1798
|
+
end
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1801
|
+
class Core < FFI::Struct
|
|
1802
|
+
include CoreWrappers
|
|
1803
|
+
layout :file, :pointer,
|
|
1804
|
+
:properties, DocProperties
|
|
1805
|
+
end
|
|
1806
|
+
|
|
1807
|
+
# @method core_new()
|
|
1808
|
+
# @return [Core]
|
|
1809
|
+
# @scope class
|
|
1810
|
+
attach_function :core_new, :lxw_core_new, [], Core
|
|
1811
|
+
|
|
1812
|
+
# @method core_free(core)
|
|
1813
|
+
# @param [Core] core
|
|
1814
|
+
# @return [nil]
|
|
1815
|
+
# @scope class
|
|
1816
|
+
attach_function :core_free, :lxw_core_free, [Core], :void
|
|
1817
|
+
|
|
1818
|
+
# @method core_assemble_xml_file(self_)
|
|
1819
|
+
# @param [Core] self_
|
|
1820
|
+
# @return [nil]
|
|
1821
|
+
# @scope class
|
|
1822
|
+
attach_function :core_assemble_xml_file, :lxw_core_assemble_xml_file, [Core], :void
|
|
1823
|
+
|
|
1824
|
+
# = Fields:
|
|
1825
|
+
# :file ::
|
|
1826
|
+
# (FFI::Pointer(*FILE))
|
|
1827
|
+
# :custom_properties ::
|
|
1828
|
+
# (CustomProperties)
|
|
1829
|
+
# :pid ::
|
|
1830
|
+
# (Integer)
|
|
1831
|
+
module CustomWrappers
|
|
1832
|
+
# @return [nil]
|
|
1833
|
+
def free()
|
|
1834
|
+
Libxlsxwriter.custom_free(self)
|
|
1835
|
+
end
|
|
1836
|
+
|
|
1837
|
+
# @return [nil]
|
|
1838
|
+
def assemble_xml_file()
|
|
1839
|
+
Libxlsxwriter.custom_assemble_xml_file(self)
|
|
1840
|
+
end
|
|
1841
|
+
end
|
|
1842
|
+
|
|
1843
|
+
class Custom < FFI::Struct
|
|
1844
|
+
include CustomWrappers
|
|
1845
|
+
layout :file, :pointer,
|
|
1846
|
+
:custom_properties, CustomProperties,
|
|
1847
|
+
:pid, :uint
|
|
1848
|
+
end
|
|
1849
|
+
|
|
1850
|
+
# @method custom_new()
|
|
1851
|
+
# @return [Custom]
|
|
1852
|
+
# @scope class
|
|
1853
|
+
attach_function :custom_new, :lxw_custom_new, [], Custom
|
|
1854
|
+
|
|
1855
|
+
# @method custom_free(custom)
|
|
1856
|
+
# @param [Custom] custom
|
|
1857
|
+
# @return [nil]
|
|
1858
|
+
# @scope class
|
|
1859
|
+
attach_function :custom_free, :lxw_custom_free, [Custom], :void
|
|
1860
|
+
|
|
1861
|
+
# @method custom_assemble_xml_file(self_)
|
|
1862
|
+
# @param [Custom] self_
|
|
1863
|
+
# @return [nil]
|
|
1864
|
+
# @scope class
|
|
1865
|
+
attach_function :custom_assemble_xml_file, :lxw_custom_assemble_xml_file, [Custom], :void
|
|
1866
|
+
|
|
1867
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1868
|
+
#
|
|
1869
|
+
# @method _callback_open_file_func_(voidpf, opaque, filename, mode)
|
|
1870
|
+
# @param [FFI::Pointer(Voidpf)] voidpf
|
|
1871
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1872
|
+
# @param [String] filename
|
|
1873
|
+
# @param [Integer] mode
|
|
1874
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1875
|
+
# @scope class
|
|
1876
|
+
callback :open_file_func, [:pointer, :pointer, :string, :int], :pointer
|
|
1877
|
+
|
|
1878
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1879
|
+
#
|
|
1880
|
+
# @method _callback_read_file_func_(u_long, opaque, stream, buf, size)
|
|
1881
|
+
# @param [Integer] u_long
|
|
1882
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1883
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1884
|
+
# @param [FFI::Pointer(*Void)] buf
|
|
1885
|
+
# @param [Integer] size
|
|
1886
|
+
# @return [Integer]
|
|
1887
|
+
# @scope class
|
|
1888
|
+
callback :read_file_func, [:ulong, :pointer, :pointer, :pointer, :ulong], :ulong
|
|
1889
|
+
|
|
1890
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1891
|
+
#
|
|
1892
|
+
# @method _callback_write_file_func_(u_long, opaque, stream, buf, size)
|
|
1893
|
+
# @param [Integer] u_long
|
|
1894
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1895
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1896
|
+
# @param [FFI::Pointer(*Void)] buf
|
|
1897
|
+
# @param [Integer] size
|
|
1898
|
+
# @return [Integer]
|
|
1899
|
+
# @scope class
|
|
1900
|
+
callback :write_file_func, [:ulong, :pointer, :pointer, :pointer, :ulong], :ulong
|
|
1901
|
+
|
|
1902
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1903
|
+
#
|
|
1904
|
+
# @method _callback_close_file_func_(opaque, stream)
|
|
1905
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1906
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1907
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1908
|
+
# @scope class
|
|
1909
|
+
callback :close_file_func, [:pointer, :pointer], :pointer
|
|
1910
|
+
|
|
1911
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1912
|
+
#
|
|
1913
|
+
# @method _callback_testerror_file_func_(opaque, stream)
|
|
1914
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1915
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1916
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1917
|
+
# @scope class
|
|
1918
|
+
callback :testerror_file_func, [:pointer, :pointer], :pointer
|
|
1919
|
+
|
|
1920
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1921
|
+
#
|
|
1922
|
+
# @method _callback_tell_file_func_(opaque, stream)
|
|
1923
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1924
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1925
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1926
|
+
# @scope class
|
|
1927
|
+
callback :tell_file_func, [:pointer, :pointer], :pointer
|
|
1928
|
+
|
|
1929
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1930
|
+
#
|
|
1931
|
+
# @method _callback_seek_file_func_(opaque, stream, offset, origin)
|
|
1932
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1933
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1934
|
+
# @param [Integer] offset
|
|
1935
|
+
# @param [Integer] origin
|
|
1936
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1937
|
+
# @scope class
|
|
1938
|
+
callback :seek_file_func, [:pointer, :pointer, :ulong, :int], :pointer
|
|
1939
|
+
|
|
1940
|
+
# = Fields:
|
|
1941
|
+
# :zopen_file ::
|
|
1942
|
+
# (Proc(_callback_open_file_func_))
|
|
1943
|
+
# :zread_file ::
|
|
1944
|
+
# (Proc(_callback_read_file_func_))
|
|
1945
|
+
# :zwrite_file ::
|
|
1946
|
+
# (Proc(_callback_write_file_func_))
|
|
1947
|
+
# :ztell_file ::
|
|
1948
|
+
# (Proc(_callback_tell_file_func_))
|
|
1949
|
+
# :zseek_file ::
|
|
1950
|
+
# (Proc(_callback_seek_file_func_))
|
|
1951
|
+
# :zclose_file ::
|
|
1952
|
+
# (Proc(_callback_close_file_func_))
|
|
1953
|
+
# :zerror_file ::
|
|
1954
|
+
# (Proc(_callback_testerror_file_func_))
|
|
1955
|
+
# :opaque ::
|
|
1956
|
+
# (FFI::Pointer(Voidpf))
|
|
1957
|
+
class ZlibFilefuncDefS < FFI::Struct
|
|
1958
|
+
layout :zopen_file, :open_file_func,
|
|
1959
|
+
:zread_file, :read_file_func,
|
|
1960
|
+
:zwrite_file, :write_file_func,
|
|
1961
|
+
:ztell_file, :tell_file_func,
|
|
1962
|
+
:zseek_file, :seek_file_func,
|
|
1963
|
+
:zclose_file, :close_file_func,
|
|
1964
|
+
:zerror_file, :testerror_file_func,
|
|
1965
|
+
:opaque, :pointer
|
|
1966
|
+
end
|
|
1967
|
+
|
|
1968
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1969
|
+
#
|
|
1970
|
+
# @method _callback_tell64_file_func_(zpos64_t, opaque, stream)
|
|
1971
|
+
# @param [Integer] zpos64_t
|
|
1972
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1973
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1974
|
+
# @return [Integer]
|
|
1975
|
+
# @scope class
|
|
1976
|
+
callback :tell64_file_func, [:ulong_long, :pointer, :pointer], :ulong_long
|
|
1977
|
+
|
|
1978
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1979
|
+
#
|
|
1980
|
+
# @method _callback_seek64_file_func_(opaque, stream, offset, origin)
|
|
1981
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1982
|
+
# @param [FFI::Pointer(Voidpf)] stream
|
|
1983
|
+
# @param [Integer] offset
|
|
1984
|
+
# @param [Integer] origin
|
|
1985
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1986
|
+
# @scope class
|
|
1987
|
+
callback :seek64_file_func, [:pointer, :pointer, :ulong_long, :int], :pointer
|
|
1988
|
+
|
|
1989
|
+
# <em>This entry is only for documentation and no real method.</em>
|
|
1990
|
+
#
|
|
1991
|
+
# @method _callback_open64_file_func_(voidpf, opaque, filename, mode)
|
|
1992
|
+
# @param [FFI::Pointer(Voidpf)] voidpf
|
|
1993
|
+
# @param [FFI::Pointer(Voidpf)] opaque
|
|
1994
|
+
# @param [FFI::Pointer(*Void)] filename
|
|
1995
|
+
# @param [Integer] mode
|
|
1996
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
1997
|
+
# @scope class
|
|
1998
|
+
callback :open64_file_func, [:pointer, :pointer, :pointer, :int], :pointer
|
|
1999
|
+
|
|
2000
|
+
# = Fields:
|
|
2001
|
+
# :zopen64_file ::
|
|
2002
|
+
# (Proc(_callback_open64_file_func_))
|
|
2003
|
+
# :zread_file ::
|
|
2004
|
+
# (Proc(_callback_read_file_func_))
|
|
2005
|
+
# :zwrite_file ::
|
|
2006
|
+
# (Proc(_callback_write_file_func_))
|
|
2007
|
+
# :ztell64_file ::
|
|
2008
|
+
# (Proc(_callback_tell64_file_func_))
|
|
2009
|
+
# :zseek64_file ::
|
|
2010
|
+
# (Proc(_callback_seek64_file_func_))
|
|
2011
|
+
# :zclose_file ::
|
|
2012
|
+
# (Proc(_callback_close_file_func_))
|
|
2013
|
+
# :zerror_file ::
|
|
2014
|
+
# (Proc(_callback_testerror_file_func_))
|
|
2015
|
+
# :opaque ::
|
|
2016
|
+
# (FFI::Pointer(Voidpf))
|
|
2017
|
+
class ZlibFilefunc64DefS < FFI::Struct
|
|
2018
|
+
layout :zopen64_file, :open64_file_func,
|
|
2019
|
+
:zread_file, :read_file_func,
|
|
2020
|
+
:zwrite_file, :write_file_func,
|
|
2021
|
+
:ztell64_file, :tell64_file_func,
|
|
2022
|
+
:zseek64_file, :seek64_file_func,
|
|
2023
|
+
:zclose_file, :close_file_func,
|
|
2024
|
+
:zerror_file, :testerror_file_func,
|
|
2025
|
+
:opaque, :pointer
|
|
2026
|
+
end
|
|
2027
|
+
|
|
2028
|
+
# @method fill_fopen64_filefunc(pzlib_filefunc_def)
|
|
2029
|
+
# @param [ZlibFilefunc64DefS] pzlib_filefunc_def
|
|
2030
|
+
# @return [nil]
|
|
2031
|
+
# @scope class
|
|
2032
|
+
attach_function :fill_fopen64_filefunc, :fill_fopen64_filefunc, [ZlibFilefunc64DefS], :void
|
|
2033
|
+
|
|
2034
|
+
# @method fill_fopen_filefunc(pzlib_filefunc_def)
|
|
2035
|
+
# @param [ZlibFilefuncDefS] pzlib_filefunc_def
|
|
2036
|
+
# @return [nil]
|
|
2037
|
+
# @scope class
|
|
2038
|
+
attach_function :fill_fopen_filefunc, :fill_fopen_filefunc, [ZlibFilefuncDefS], :void
|
|
2039
|
+
|
|
2040
|
+
# = Fields:
|
|
2041
|
+
# :zfile_func64 ::
|
|
2042
|
+
# (ZlibFilefunc64DefS)
|
|
2043
|
+
# :zopen32_file ::
|
|
2044
|
+
# (Proc(_callback_open_file_func_))
|
|
2045
|
+
# :ztell32_file ::
|
|
2046
|
+
# (Proc(_callback_tell_file_func_))
|
|
2047
|
+
# :zseek32_file ::
|
|
2048
|
+
# (Proc(_callback_seek_file_func_))
|
|
2049
|
+
class ZlibFilefunc6432DefS < FFI::Struct
|
|
2050
|
+
layout :zfile_func64, ZlibFilefunc64DefS.by_value,
|
|
2051
|
+
:zopen32_file, :open_file_func,
|
|
2052
|
+
:ztell32_file, :tell_file_func,
|
|
2053
|
+
:zseek32_file, :seek_file_func
|
|
2054
|
+
end
|
|
2055
|
+
|
|
2056
|
+
# @method call_zopen64(pfilefunc, filename, mode)
|
|
2057
|
+
# @param [ZlibFilefunc6432DefS] pfilefunc
|
|
2058
|
+
# @param [FFI::Pointer(*Void)] filename
|
|
2059
|
+
# @param [Integer] mode
|
|
2060
|
+
# @return [FFI::Pointer(Voidpf)]
|
|
2061
|
+
# @scope class
|
|
2062
|
+
attach_function :call_zopen64, :call_zopen64, [ZlibFilefunc6432DefS, :pointer, :int], :pointer
|
|
2063
|
+
|
|
2064
|
+
# @method call_zseek64(pfilefunc, filestream, offset, origin)
|
|
2065
|
+
# @param [ZlibFilefunc6432DefS] pfilefunc
|
|
2066
|
+
# @param [FFI::Pointer(Voidpf)] filestream
|
|
2067
|
+
# @param [Integer] offset
|
|
2068
|
+
# @param [Integer] origin
|
|
2069
|
+
# @return [Integer]
|
|
2070
|
+
# @scope class
|
|
2071
|
+
attach_function :call_zseek64, :call_zseek64, [ZlibFilefunc6432DefS, :pointer, :ulong_long, :int], :long
|
|
2072
|
+
|
|
2073
|
+
# @method call_ztell64(pfilefunc, filestream)
|
|
2074
|
+
# @param [ZlibFilefunc6432DefS] pfilefunc
|
|
2075
|
+
# @param [FFI::Pointer(Voidpf)] filestream
|
|
2076
|
+
# @return [Integer]
|
|
2077
|
+
# @scope class
|
|
2078
|
+
attach_function :call_ztell64, :call_ztell64, [ZlibFilefunc6432DefS, :pointer], :ulong_long
|
|
2079
|
+
|
|
2080
|
+
# @method fill_zlib_filefunc64_32_def_from_filefunc32(p_filefunc64_32, p_filefunc32)
|
|
2081
|
+
# @param [ZlibFilefunc6432DefS] p_filefunc64_32
|
|
2082
|
+
# @param [ZlibFilefuncDefS] p_filefunc32
|
|
2083
|
+
# @return [nil]
|
|
2084
|
+
# @scope class
|
|
2085
|
+
attach_function :fill_zlib_filefunc64_32_def_from_filefunc32, :fill_zlib_filefunc64_32_def_from_filefunc32, [ZlibFilefunc6432DefS, ZlibFilefuncDefS], :void
|
|
2086
|
+
|
|
2087
|
+
# = Fields:
|
|
2088
|
+
# :tm_sec ::
|
|
2089
|
+
# (Integer) seconds after the minute - (0,59)
|
|
2090
|
+
# :tm_min ::
|
|
2091
|
+
# (Integer) minutes after the hour - (0,59)
|
|
2092
|
+
# :tm_hour ::
|
|
2093
|
+
# (Integer) hours since midnight - (0,23)
|
|
2094
|
+
# :tm_mday ::
|
|
2095
|
+
# (Integer) day of the month - (1,31)
|
|
2096
|
+
# :tm_mon ::
|
|
2097
|
+
# (Integer) months since January - (0,11)
|
|
2098
|
+
# :tm_year ::
|
|
2099
|
+
# (Integer) years - (1980..2044)
|
|
2100
|
+
class TmZipS < FFI::Struct
|
|
2101
|
+
layout :tm_sec, :uint,
|
|
2102
|
+
:tm_min, :uint,
|
|
2103
|
+
:tm_hour, :uint,
|
|
2104
|
+
:tm_mday, :uint,
|
|
2105
|
+
:tm_mon, :uint,
|
|
2106
|
+
:tm_year, :uint
|
|
2107
|
+
end
|
|
2108
|
+
|
|
2109
|
+
# = Fields:
|
|
2110
|
+
# :tmz_date ::
|
|
2111
|
+
# (TmZipS) date in understandable format
|
|
2112
|
+
# :dos_date ::
|
|
2113
|
+
# (Integer) if dos_date == 0, tmu_date is used
|
|
2114
|
+
# :internal_fa ::
|
|
2115
|
+
# (Integer) internal file attributes 2 bytes
|
|
2116
|
+
# :external_fa ::
|
|
2117
|
+
# (Integer) external file attributes 4 bytes
|
|
2118
|
+
class ZipFileinfo < FFI::Struct
|
|
2119
|
+
layout :tmz_date, TmZipS.by_value,
|
|
2120
|
+
:dos_date, :ulong,
|
|
2121
|
+
:internal_fa, :ulong,
|
|
2122
|
+
:external_fa, :ulong
|
|
2123
|
+
end
|
|
2124
|
+
|
|
2125
|
+
# @method zip_open(pathname, append)
|
|
2126
|
+
# @param [String] pathname
|
|
2127
|
+
# @param [Integer] append
|
|
2128
|
+
# @return [FFI::Pointer(ZipFile)]
|
|
2129
|
+
# @scope class
|
|
2130
|
+
attach_function :zip_open, :zipOpen, [:string, :int], :pointer
|
|
2131
|
+
|
|
2132
|
+
# @method zip_open64(pathname, append)
|
|
2133
|
+
# @param [FFI::Pointer(*Void)] pathname
|
|
2134
|
+
# @param [Integer] append
|
|
2135
|
+
# @return [FFI::Pointer(ZipFile)]
|
|
2136
|
+
# @scope class
|
|
2137
|
+
attach_function :zip_open64, :zipOpen64, [:pointer, :int], :pointer
|
|
2138
|
+
|
|
2139
|
+
# @method zip_open2(pathname, append, globalcomment, pzlib_filefunc_def)
|
|
2140
|
+
# @param [String] pathname
|
|
2141
|
+
# @param [Integer] append
|
|
2142
|
+
# @param [FFI::Pointer(*Zipcharpc)] globalcomment
|
|
2143
|
+
# @param [ZlibFilefuncDefS] pzlib_filefunc_def
|
|
2144
|
+
# @return [FFI::Pointer(ZipFile)]
|
|
2145
|
+
# @scope class
|
|
2146
|
+
attach_function :zip_open2, :zipOpen2, [:string, :int, :pointer, ZlibFilefuncDefS], :pointer
|
|
2147
|
+
|
|
2148
|
+
# @method zip_open2_64(pathname, append, globalcomment, pzlib_filefunc_def)
|
|
2149
|
+
# @param [FFI::Pointer(*Void)] pathname
|
|
2150
|
+
# @param [Integer] append
|
|
2151
|
+
# @param [FFI::Pointer(*Zipcharpc)] globalcomment
|
|
2152
|
+
# @param [ZlibFilefunc64DefS] pzlib_filefunc_def
|
|
2153
|
+
# @return [FFI::Pointer(ZipFile)]
|
|
2154
|
+
# @scope class
|
|
2155
|
+
attach_function :zip_open2_64, :zipOpen2_64, [:pointer, :int, :pointer, ZlibFilefunc64DefS], :pointer
|
|
2156
|
+
|
|
2157
|
+
# @method zip_open_new_file_in_zip(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level)
|
|
2158
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2159
|
+
# @param [String] filename
|
|
2160
|
+
# @param [ZipFileinfo] zipfi
|
|
2161
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2162
|
+
# @param [Integer] size_extrafield_local
|
|
2163
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2164
|
+
# @param [Integer] size_extrafield_global
|
|
2165
|
+
# @param [String] comment
|
|
2166
|
+
# @param [Integer] method
|
|
2167
|
+
# @param [Integer] level
|
|
2168
|
+
# @return [Integer]
|
|
2169
|
+
# @scope class
|
|
2170
|
+
attach_function :zip_open_new_file_in_zip, :zipOpenNewFileInZip, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int], :int
|
|
2171
|
+
|
|
2172
|
+
# @method zip_open_new_file_in_zip64(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, zip64)
|
|
2173
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2174
|
+
# @param [String] filename
|
|
2175
|
+
# @param [ZipFileinfo] zipfi
|
|
2176
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2177
|
+
# @param [Integer] size_extrafield_local
|
|
2178
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2179
|
+
# @param [Integer] size_extrafield_global
|
|
2180
|
+
# @param [String] comment
|
|
2181
|
+
# @param [Integer] method
|
|
2182
|
+
# @param [Integer] level
|
|
2183
|
+
# @param [Integer] zip64
|
|
2184
|
+
# @return [Integer]
|
|
2185
|
+
# @scope class
|
|
2186
|
+
attach_function :zip_open_new_file_in_zip64, :zipOpenNewFileInZip64, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int], :int
|
|
2187
|
+
|
|
2188
|
+
# @method zip_open_new_file_in_zip2(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw)
|
|
2189
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2190
|
+
# @param [String] filename
|
|
2191
|
+
# @param [ZipFileinfo] zipfi
|
|
2192
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2193
|
+
# @param [Integer] size_extrafield_local
|
|
2194
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2195
|
+
# @param [Integer] size_extrafield_global
|
|
2196
|
+
# @param [String] comment
|
|
2197
|
+
# @param [Integer] method
|
|
2198
|
+
# @param [Integer] level
|
|
2199
|
+
# @param [Integer] raw
|
|
2200
|
+
# @return [Integer]
|
|
2201
|
+
# @scope class
|
|
2202
|
+
attach_function :zip_open_new_file_in_zip2, :zipOpenNewFileInZip2, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int], :int
|
|
2203
|
+
|
|
2204
|
+
# @method zip_open_new_file_in_zip2_64(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, zip64)
|
|
2205
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2206
|
+
# @param [String] filename
|
|
2207
|
+
# @param [ZipFileinfo] zipfi
|
|
2208
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2209
|
+
# @param [Integer] size_extrafield_local
|
|
2210
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2211
|
+
# @param [Integer] size_extrafield_global
|
|
2212
|
+
# @param [String] comment
|
|
2213
|
+
# @param [Integer] method
|
|
2214
|
+
# @param [Integer] level
|
|
2215
|
+
# @param [Integer] raw
|
|
2216
|
+
# @param [Integer] zip64
|
|
2217
|
+
# @return [Integer]
|
|
2218
|
+
# @scope class
|
|
2219
|
+
attach_function :zip_open_new_file_in_zip2_64, :zipOpenNewFileInZip2_64, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int, :int], :int
|
|
2220
|
+
|
|
2221
|
+
# @method zip_open_new_file_in_zip3(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, window_bits, mem_level, strategy, password, crc_for_crypting)
|
|
2222
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2223
|
+
# @param [String] filename
|
|
2224
|
+
# @param [ZipFileinfo] zipfi
|
|
2225
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2226
|
+
# @param [Integer] size_extrafield_local
|
|
2227
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2228
|
+
# @param [Integer] size_extrafield_global
|
|
2229
|
+
# @param [String] comment
|
|
2230
|
+
# @param [Integer] method
|
|
2231
|
+
# @param [Integer] level
|
|
2232
|
+
# @param [Integer] raw
|
|
2233
|
+
# @param [Integer] window_bits
|
|
2234
|
+
# @param [Integer] mem_level
|
|
2235
|
+
# @param [Integer] strategy
|
|
2236
|
+
# @param [String] password
|
|
2237
|
+
# @param [Integer] crc_for_crypting
|
|
2238
|
+
# @return [Integer]
|
|
2239
|
+
# @scope class
|
|
2240
|
+
attach_function :zip_open_new_file_in_zip3, :zipOpenNewFileInZip3, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int, :int, :int, :int, :string, :ulong], :int
|
|
2241
|
+
|
|
2242
|
+
# @method zip_open_new_file_in_zip3_64(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, window_bits, mem_level, strategy, password, crc_for_crypting, zip64)
|
|
2243
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2244
|
+
# @param [String] filename
|
|
2245
|
+
# @param [ZipFileinfo] zipfi
|
|
2246
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2247
|
+
# @param [Integer] size_extrafield_local
|
|
2248
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2249
|
+
# @param [Integer] size_extrafield_global
|
|
2250
|
+
# @param [String] comment
|
|
2251
|
+
# @param [Integer] method
|
|
2252
|
+
# @param [Integer] level
|
|
2253
|
+
# @param [Integer] raw
|
|
2254
|
+
# @param [Integer] window_bits
|
|
2255
|
+
# @param [Integer] mem_level
|
|
2256
|
+
# @param [Integer] strategy
|
|
2257
|
+
# @param [String] password
|
|
2258
|
+
# @param [Integer] crc_for_crypting
|
|
2259
|
+
# @param [Integer] zip64
|
|
2260
|
+
# @return [Integer]
|
|
2261
|
+
# @scope class
|
|
2262
|
+
attach_function :zip_open_new_file_in_zip3_64, :zipOpenNewFileInZip3_64, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int, :int, :int, :int, :string, :ulong, :int], :int
|
|
2263
|
+
|
|
2264
|
+
# @method zip_open_new_file_in_zip4(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, window_bits, mem_level, strategy, password, crc_for_crypting, version_made_by, flag_base)
|
|
2265
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2266
|
+
# @param [String] filename
|
|
2267
|
+
# @param [ZipFileinfo] zipfi
|
|
2268
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2269
|
+
# @param [Integer] size_extrafield_local
|
|
2270
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2271
|
+
# @param [Integer] size_extrafield_global
|
|
2272
|
+
# @param [String] comment
|
|
2273
|
+
# @param [Integer] method
|
|
2274
|
+
# @param [Integer] level
|
|
2275
|
+
# @param [Integer] raw
|
|
2276
|
+
# @param [Integer] window_bits
|
|
2277
|
+
# @param [Integer] mem_level
|
|
2278
|
+
# @param [Integer] strategy
|
|
2279
|
+
# @param [String] password
|
|
2280
|
+
# @param [Integer] crc_for_crypting
|
|
2281
|
+
# @param [Integer] version_made_by
|
|
2282
|
+
# @param [Integer] flag_base
|
|
2283
|
+
# @return [Integer]
|
|
2284
|
+
# @scope class
|
|
2285
|
+
attach_function :zip_open_new_file_in_zip4, :zipOpenNewFileInZip4, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int, :int, :int, :int, :string, :ulong, :ulong, :ulong], :int
|
|
2286
|
+
|
|
2287
|
+
# @method zip_open_new_file_in_zip4_64(file, filename, zipfi, extrafield_local, size_extrafield_local, extrafield_global, size_extrafield_global, comment, method, level, raw, window_bits, mem_level, strategy, password, crc_for_crypting, version_made_by, flag_base, zip64)
|
|
2288
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2289
|
+
# @param [String] filename
|
|
2290
|
+
# @param [ZipFileinfo] zipfi
|
|
2291
|
+
# @param [FFI::Pointer(*Void)] extrafield_local
|
|
2292
|
+
# @param [Integer] size_extrafield_local
|
|
2293
|
+
# @param [FFI::Pointer(*Void)] extrafield_global
|
|
2294
|
+
# @param [Integer] size_extrafield_global
|
|
2295
|
+
# @param [String] comment
|
|
2296
|
+
# @param [Integer] method
|
|
2297
|
+
# @param [Integer] level
|
|
2298
|
+
# @param [Integer] raw
|
|
2299
|
+
# @param [Integer] window_bits
|
|
2300
|
+
# @param [Integer] mem_level
|
|
2301
|
+
# @param [Integer] strategy
|
|
2302
|
+
# @param [String] password
|
|
2303
|
+
# @param [Integer] crc_for_crypting
|
|
2304
|
+
# @param [Integer] version_made_by
|
|
2305
|
+
# @param [Integer] flag_base
|
|
2306
|
+
# @param [Integer] zip64
|
|
2307
|
+
# @return [Integer]
|
|
2308
|
+
# @scope class
|
|
2309
|
+
attach_function :zip_open_new_file_in_zip4_64, :zipOpenNewFileInZip4_64, [:pointer, :string, ZipFileinfo, :pointer, :uint, :pointer, :uint, :string, :int, :int, :int, :int, :int, :int, :string, :ulong, :ulong, :ulong, :int], :int
|
|
2310
|
+
|
|
2311
|
+
# @method zip_write_in_file_in_zip(file, buf, len)
|
|
2312
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2313
|
+
# @param [FFI::Pointer(*Void)] buf
|
|
2314
|
+
# @param [Integer] len
|
|
2315
|
+
# @return [Integer]
|
|
2316
|
+
# @scope class
|
|
2317
|
+
attach_function :zip_write_in_file_in_zip, :zipWriteInFileInZip, [:pointer, :pointer, :uint], :int
|
|
2318
|
+
|
|
2319
|
+
# @method zip_close_file_in_zip(file)
|
|
2320
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2321
|
+
# @return [Integer]
|
|
2322
|
+
# @scope class
|
|
2323
|
+
attach_function :zip_close_file_in_zip, :zipCloseFileInZip, [:pointer], :int
|
|
2324
|
+
|
|
2325
|
+
# @method zip_close_file_in_zip_raw(file, uncompressed_size, crc32)
|
|
2326
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2327
|
+
# @param [Integer] uncompressed_size
|
|
2328
|
+
# @param [Integer] crc32
|
|
2329
|
+
# @return [Integer]
|
|
2330
|
+
# @scope class
|
|
2331
|
+
attach_function :zip_close_file_in_zip_raw, :zipCloseFileInZipRaw, [:pointer, :ulong, :ulong], :int
|
|
2332
|
+
|
|
2333
|
+
# @method zip_close_file_in_zip_raw64(file, uncompressed_size, crc32)
|
|
2334
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2335
|
+
# @param [Integer] uncompressed_size
|
|
2336
|
+
# @param [Integer] crc32
|
|
2337
|
+
# @return [Integer]
|
|
2338
|
+
# @scope class
|
|
2339
|
+
attach_function :zip_close_file_in_zip_raw64, :zipCloseFileInZipRaw64, [:pointer, :ulong_long, :ulong], :int
|
|
2340
|
+
|
|
2341
|
+
# @method zip_close(file, global_comment)
|
|
2342
|
+
# @param [FFI::Pointer(ZipFile)] file
|
|
2343
|
+
# @param [String] global_comment
|
|
2344
|
+
# @return [Integer]
|
|
2345
|
+
# @scope class
|
|
2346
|
+
attach_function :zip_close, :zipClose, [:pointer, :string], :int
|
|
2347
|
+
|
|
2348
|
+
# @method zip_remove_extra_info_block(p_data, data_len, s_header)
|
|
2349
|
+
# @param [String] p_data
|
|
2350
|
+
# @param [FFI::Pointer(*Int)] data_len
|
|
2351
|
+
# @param [Integer] s_header
|
|
2352
|
+
# @return [Integer]
|
|
2353
|
+
# @scope class
|
|
2354
|
+
attach_function :zip_remove_extra_info_block, :zipRemoveExtraInfoBlock, [:string, :pointer, :short], :int
|
|
2355
|
+
|
|
2356
|
+
# = Fields:
|
|
2357
|
+
# :file ::
|
|
2358
|
+
# (FFI::Pointer(*FILE))
|
|
2359
|
+
module ThemeWrappers
|
|
2360
|
+
# @return [nil]
|
|
2361
|
+
def free()
|
|
2362
|
+
Libxlsxwriter.theme_free(self)
|
|
2363
|
+
end
|
|
2364
|
+
|
|
2365
|
+
# @return [nil]
|
|
2366
|
+
def xml_declaration()
|
|
2367
|
+
Libxlsxwriter.theme_xml_declaration(self)
|
|
2368
|
+
end
|
|
2369
|
+
|
|
2370
|
+
# @return [nil]
|
|
2371
|
+
def assemble_xml_file()
|
|
2372
|
+
Libxlsxwriter.theme_assemble_xml_file(self)
|
|
2373
|
+
end
|
|
2374
|
+
end
|
|
2375
|
+
|
|
2376
|
+
class Theme < FFI::Struct
|
|
2377
|
+
include ThemeWrappers
|
|
2378
|
+
layout :file, :pointer
|
|
2379
|
+
end
|
|
2380
|
+
|
|
2381
|
+
# @method theme_new()
|
|
2382
|
+
# @return [Theme]
|
|
2383
|
+
# @scope class
|
|
2384
|
+
attach_function :theme_new, :lxw_theme_new, [], Theme
|
|
2385
|
+
|
|
2386
|
+
# @method theme_free(theme)
|
|
2387
|
+
# @param [Theme] theme
|
|
2388
|
+
# @return [nil]
|
|
2389
|
+
# @scope class
|
|
2390
|
+
attach_function :theme_free, :lxw_theme_free, [Theme], :void
|
|
2391
|
+
|
|
2392
|
+
# @method theme_xml_declaration(self_)
|
|
2393
|
+
# @param [Theme] self_
|
|
2394
|
+
# @return [nil]
|
|
2395
|
+
# @scope class
|
|
2396
|
+
attach_function :theme_xml_declaration, :lxw_theme_xml_declaration, [Theme], :void
|
|
2397
|
+
|
|
2398
|
+
# @method theme_assemble_xml_file(self_)
|
|
2399
|
+
# @param [Theme] self_
|
|
2400
|
+
# @return [nil]
|
|
2401
|
+
# @scope class
|
|
2402
|
+
attach_function :theme_assemble_xml_file, :lxw_theme_assemble_xml_file, [Theme], :void
|
|
2403
|
+
|
|
2404
|
+
# = Fields:
|
|
2405
|
+
# :file ::
|
|
2406
|
+
# (FFI::Pointer(*FILE))
|
|
2407
|
+
# :font_count ::
|
|
2408
|
+
# (Integer)
|
|
2409
|
+
# :xf_count ::
|
|
2410
|
+
# (Integer)
|
|
2411
|
+
# :dxf_count ::
|
|
2412
|
+
# (Integer)
|
|
2413
|
+
# :num_format_count ::
|
|
2414
|
+
# (Integer)
|
|
2415
|
+
# :border_count ::
|
|
2416
|
+
# (Integer)
|
|
2417
|
+
# :fill_count ::
|
|
2418
|
+
# (Integer)
|
|
2419
|
+
# :xf_formats ::
|
|
2420
|
+
# (Formats)
|
|
2421
|
+
# :dxf_formats ::
|
|
2422
|
+
# (Formats)
|
|
2423
|
+
module StylesWrappers
|
|
2424
|
+
# @return [nil]
|
|
2425
|
+
def free()
|
|
2426
|
+
Libxlsxwriter.styles_free(self)
|
|
2427
|
+
end
|
|
2428
|
+
|
|
2429
|
+
# @return [nil]
|
|
2430
|
+
def assemble_xml_file()
|
|
2431
|
+
Libxlsxwriter.styles_assemble_xml_file(self)
|
|
2432
|
+
end
|
|
2433
|
+
end
|
|
2434
|
+
|
|
2435
|
+
class Styles < FFI::Struct
|
|
2436
|
+
include StylesWrappers
|
|
2437
|
+
layout :file, :pointer,
|
|
2438
|
+
:font_count, :uint,
|
|
2439
|
+
:xf_count, :uint,
|
|
2440
|
+
:dxf_count, :uint,
|
|
2441
|
+
:num_format_count, :uint,
|
|
2442
|
+
:border_count, :uint,
|
|
2443
|
+
:fill_count, :uint,
|
|
2444
|
+
:xf_formats, Formats,
|
|
2445
|
+
:dxf_formats, Formats
|
|
2446
|
+
end
|
|
2447
|
+
|
|
2448
|
+
# @method styles_new()
|
|
2449
|
+
# @return [Styles]
|
|
2450
|
+
# @scope class
|
|
2451
|
+
attach_function :styles_new, :lxw_styles_new, [], Styles
|
|
2452
|
+
|
|
2453
|
+
# @method styles_free(styles)
|
|
2454
|
+
# @param [Styles] styles
|
|
2455
|
+
# @return [nil]
|
|
2456
|
+
# @scope class
|
|
2457
|
+
attach_function :styles_free, :lxw_styles_free, [Styles], :void
|
|
2458
|
+
|
|
2459
|
+
# @method styles_assemble_xml_file(self_)
|
|
2460
|
+
# @param [Styles] self_
|
|
2461
|
+
# @return [nil]
|
|
2462
|
+
# @scope class
|
|
2463
|
+
attach_function :styles_assemble_xml_file, :lxw_styles_assemble_xml_file, [Styles], :void
|
|
2464
|
+
|
|
2465
|
+
# = Fields:
|
|
2466
|
+
# :stqh_first ::
|
|
2467
|
+
# (FFI::Pointer(*RelTuple))
|
|
2468
|
+
# :stqh_last ::
|
|
2469
|
+
# (FFI::Pointer(**RelTuple))
|
|
2470
|
+
class RelTuples < FFI::Struct
|
|
2471
|
+
layout :stqh_first, :pointer,
|
|
2472
|
+
:stqh_last, :pointer
|
|
2473
|
+
end
|
|
2474
|
+
|
|
2475
|
+
# = Fields:
|
|
2476
|
+
# :stqe_next ::
|
|
2477
|
+
# (FFI::Pointer(*RelTuple))
|
|
2478
|
+
class RelTupleListPointers < FFI::Struct
|
|
2479
|
+
layout :stqe_next, :pointer
|
|
2480
|
+
end
|
|
2481
|
+
|
|
2482
|
+
# = Fields:
|
|
2483
|
+
# :type ::
|
|
2484
|
+
# (String)
|
|
2485
|
+
# :target ::
|
|
2486
|
+
# (String)
|
|
2487
|
+
# :target_mode ::
|
|
2488
|
+
# (String)
|
|
2489
|
+
# :list_pointers ::
|
|
2490
|
+
# (RelTupleListPointers)
|
|
2491
|
+
class RelTuple < FFI::Struct
|
|
2492
|
+
layout :type, :string,
|
|
2493
|
+
:target, :string,
|
|
2494
|
+
:target_mode, :string,
|
|
2495
|
+
:list_pointers, RelTupleListPointers.by_value
|
|
2496
|
+
end
|
|
2497
|
+
|
|
2498
|
+
# Struct to represent a relationships.
|
|
2499
|
+
#
|
|
2500
|
+
# = Fields:
|
|
2501
|
+
# :file ::
|
|
2502
|
+
# (FFI::Pointer(*FILE))
|
|
2503
|
+
# :rel_id ::
|
|
2504
|
+
# (Integer)
|
|
2505
|
+
# :relationships ::
|
|
2506
|
+
# (RelTuples)
|
|
2507
|
+
module RelationshipsWrappers
|
|
2508
|
+
# @return [nil]
|
|
2509
|
+
def assemble_xml_file()
|
|
2510
|
+
Libxlsxwriter.relationships_assemble_xml_file(self)
|
|
2511
|
+
end
|
|
2512
|
+
end
|
|
2513
|
+
|
|
2514
|
+
class Relationships < FFI::Struct
|
|
2515
|
+
include RelationshipsWrappers
|
|
2516
|
+
layout :file, :pointer,
|
|
2517
|
+
:rel_id, :uint,
|
|
2518
|
+
:relationships, RelTuples
|
|
2519
|
+
end
|
|
2520
|
+
|
|
2521
|
+
# *INDENT-ON*
|
|
2522
|
+
#
|
|
2523
|
+
# @method relationships_new()
|
|
2524
|
+
# @return [Relationships]
|
|
2525
|
+
# @scope class
|
|
2526
|
+
attach_function :relationships_new, :lxw_relationships_new, [], Relationships
|
|
2527
|
+
|
|
2528
|
+
# @method free_relationships(relationships)
|
|
2529
|
+
# @param [Relationships] relationships
|
|
2530
|
+
# @return [nil]
|
|
2531
|
+
# @scope class
|
|
2532
|
+
attach_function :free_relationships, :lxw_free_relationships, [Relationships], :void
|
|
2533
|
+
|
|
2534
|
+
# @method relationships_assemble_xml_file(self_)
|
|
2535
|
+
# @param [Relationships] self_
|
|
2536
|
+
# @return [nil]
|
|
2537
|
+
# @scope class
|
|
2538
|
+
attach_function :relationships_assemble_xml_file, :lxw_relationships_assemble_xml_file, [Relationships], :void
|
|
2539
|
+
|
|
2540
|
+
# @method add_document_relationship(self_, type, target)
|
|
2541
|
+
# @param [Relationships] self_
|
|
2542
|
+
# @param [String] type
|
|
2543
|
+
# @param [String] target
|
|
2544
|
+
# @return [nil]
|
|
2545
|
+
# @scope class
|
|
2546
|
+
attach_function :add_document_relationship, :lxw_add_document_relationship, [Relationships, :string, :string], :void
|
|
2547
|
+
|
|
2548
|
+
# @method add_package_relationship(self_, type, target)
|
|
2549
|
+
# @param [Relationships] self_
|
|
2550
|
+
# @param [String] type
|
|
2551
|
+
# @param [String] target
|
|
2552
|
+
# @return [nil]
|
|
2553
|
+
# @scope class
|
|
2554
|
+
attach_function :add_package_relationship, :lxw_add_package_relationship, [Relationships, :string, :string], :void
|
|
2555
|
+
|
|
2556
|
+
# @method add_ms_package_relationship(self_, type, target)
|
|
2557
|
+
# @param [Relationships] self_
|
|
2558
|
+
# @param [String] type
|
|
2559
|
+
# @param [String] target
|
|
2560
|
+
# @return [nil]
|
|
2561
|
+
# @scope class
|
|
2562
|
+
attach_function :add_ms_package_relationship, :lxw_add_ms_package_relationship, [Relationships, :string, :string], :void
|
|
2563
|
+
|
|
2564
|
+
# @method add_worksheet_relationship(self_, type, target, target_mode)
|
|
2565
|
+
# @param [Relationships] self_
|
|
2566
|
+
# @param [String] type
|
|
2567
|
+
# @param [String] target
|
|
2568
|
+
# @param [String] target_mode
|
|
2569
|
+
# @return [nil]
|
|
2570
|
+
# @scope class
|
|
2571
|
+
attach_function :add_worksheet_relationship, :lxw_add_worksheet_relationship, [Relationships, :string, :string, :string], :void
|
|
2572
|
+
|
|
2573
|
+
require_relative 'binding/workbook'
|
|
2574
|
+
|
|
2575
|
+
#
|
|
2576
|
+
# = Fields:
|
|
2577
|
+
# :file ::
|
|
2578
|
+
# (FFI::Pointer(*FILE))
|
|
2579
|
+
# :workbook ::
|
|
2580
|
+
# (Workbook)
|
|
2581
|
+
# :buffer_size ::
|
|
2582
|
+
# (Integer)
|
|
2583
|
+
# :zipfile ::
|
|
2584
|
+
# (FFI::Pointer(ZipFile))
|
|
2585
|
+
# :zipfile_info ::
|
|
2586
|
+
# (ZipFileinfo)
|
|
2587
|
+
# :filename ::
|
|
2588
|
+
# (String)
|
|
2589
|
+
# :buffer ::
|
|
2590
|
+
# (String)
|
|
2591
|
+
# :tmpdir ::
|
|
2592
|
+
# (String)
|
|
2593
|
+
# :chart_count ::
|
|
2594
|
+
# (Integer)
|
|
2595
|
+
# :drawing_count ::
|
|
2596
|
+
# (Integer)
|
|
2597
|
+
module PackagerWrappers
|
|
2598
|
+
# @return [nil]
|
|
2599
|
+
def free()
|
|
2600
|
+
Libxlsxwriter.packager_free(self)
|
|
2601
|
+
end
|
|
2602
|
+
end
|
|
2603
|
+
|
|
2604
|
+
class Packager < FFI::Struct
|
|
2605
|
+
include PackagerWrappers
|
|
2606
|
+
layout :file, :pointer,
|
|
2607
|
+
:workbook, Workbook,
|
|
2608
|
+
:buffer_size, :ulong,
|
|
2609
|
+
:zipfile, :pointer,
|
|
2610
|
+
:zipfile_info, ZipFileinfo.by_value,
|
|
2611
|
+
:filename, :string,
|
|
2612
|
+
:buffer, :string,
|
|
2613
|
+
:tmpdir, :string,
|
|
2614
|
+
:chart_count, :ushort,
|
|
2615
|
+
:drawing_count, :ushort
|
|
2616
|
+
end
|
|
2617
|
+
|
|
2618
|
+
# @method packager_new(filename, tmpdir)
|
|
2619
|
+
# @param [String] filename
|
|
2620
|
+
# @param [String] tmpdir
|
|
2621
|
+
# @return [Packager]
|
|
2622
|
+
# @scope class
|
|
2623
|
+
attach_function :packager_new, :lxw_packager_new, [:string, :string], Packager
|
|
2624
|
+
|
|
2625
|
+
# @method packager_free(packager)
|
|
2626
|
+
# @param [Packager] packager
|
|
2627
|
+
# @return [nil]
|
|
2628
|
+
# @scope class
|
|
2629
|
+
attach_function :packager_free, :lxw_packager_free, [Packager], :void
|
|
2630
|
+
|
|
2631
|
+
# @method create_package(self_)
|
|
2632
|
+
# @param [Packager] self_
|
|
2633
|
+
# @return [Symbol from _enum_error_]
|
|
2634
|
+
# @scope class
|
|
2635
|
+
attach_function :create_package, :lxw_create_package, [Packager], :error
|
|
2636
|
+
|
|
2637
|
+
# @method tmpfileplus(dir, prefix, pathname, keep)
|
|
2638
|
+
# @param [String] dir
|
|
2639
|
+
# @param [String] prefix
|
|
2640
|
+
# @param [FFI::Pointer(**CharS)] pathname
|
|
2641
|
+
# @param [Integer] keep
|
|
2642
|
+
# @return [FFI::Pointer(*FILE)]
|
|
2643
|
+
# @scope class
|
|
2644
|
+
attach_function :tmpfileplus, :tmpfileplus, [:string, :string, :pointer, :int], :pointer
|
|
2645
|
+
|
|
2646
|
+
# @method tmpfileplus_f(dir, prefix, pathnamebuf, pathsize, keep)
|
|
2647
|
+
# @param [String] dir
|
|
2648
|
+
# @param [String] prefix
|
|
2649
|
+
# @param [String] pathnamebuf
|
|
2650
|
+
# @param [Integer] pathsize
|
|
2651
|
+
# @param [Integer] keep
|
|
2652
|
+
# @return [FFI::Pointer(*FILE)]
|
|
2653
|
+
# @scope class
|
|
2654
|
+
attach_function :tmpfileplus_f, :tmpfileplus_f, [:string, :string, :string, :ulong, :int], :pointer
|
|
2655
|
+
|
|
2656
|
+
# = Fields:
|
|
2657
|
+
# :stqe_next ::
|
|
2658
|
+
# (FFI::Pointer(*XmlAttribute))
|
|
2659
|
+
class XmlAttributeListEntries < FFI::Struct
|
|
2660
|
+
layout :stqe_next, :pointer
|
|
2661
|
+
end
|
|
2662
|
+
|
|
2663
|
+
# = Fields:
|
|
2664
|
+
# :key ::
|
|
2665
|
+
# (Array<Integer>)
|
|
2666
|
+
# :value ::
|
|
2667
|
+
# (Array<Integer>)
|
|
2668
|
+
# :list_entries ::
|
|
2669
|
+
# (XmlAttributeListEntries)
|
|
2670
|
+
class XmlAttribute < FFI::Struct
|
|
2671
|
+
layout :key, [:char, 256],
|
|
2672
|
+
:value, [:char, 256],
|
|
2673
|
+
:list_entries, XmlAttributeListEntries.by_value
|
|
2674
|
+
end
|
|
2675
|
+
|
|
2676
|
+
# Use queue.h macros to define the xml_attribute_list type.
|
|
2677
|
+
#
|
|
2678
|
+
# = Fields:
|
|
2679
|
+
# :stqh_first ::
|
|
2680
|
+
# (XmlAttribute)
|
|
2681
|
+
# :stqh_last ::
|
|
2682
|
+
# (FFI::Pointer(**XmlAttribute))
|
|
2683
|
+
class XmlAttributeList < FFI::Struct
|
|
2684
|
+
layout :stqh_first, XmlAttribute,
|
|
2685
|
+
:stqh_last, :pointer
|
|
2686
|
+
end
|
|
2687
|
+
|
|
2688
|
+
# Create a new attribute struct to add to a xml_attribute_list.
|
|
2689
|
+
#
|
|
2690
|
+
# @method new_attribute_str(key, value)
|
|
2691
|
+
# @param [String] key
|
|
2692
|
+
# @param [String] value
|
|
2693
|
+
# @return [XmlAttribute]
|
|
2694
|
+
# @scope class
|
|
2695
|
+
attach_function :new_attribute_str, :lxw_new_attribute_str, [:string, :string], XmlAttribute
|
|
2696
|
+
|
|
2697
|
+
# @method new_attribute_int(key, value)
|
|
2698
|
+
# @param [String] key
|
|
2699
|
+
# @param [Integer] value
|
|
2700
|
+
# @return [XmlAttribute]
|
|
2701
|
+
# @scope class
|
|
2702
|
+
attach_function :new_attribute_int, :lxw_new_attribute_int, [:string, :uint], XmlAttribute
|
|
2703
|
+
|
|
2704
|
+
# @method new_attribute_dbl(key, value)
|
|
2705
|
+
# @param [String] key
|
|
2706
|
+
# @param [Float] value
|
|
2707
|
+
# @return [XmlAttribute]
|
|
2708
|
+
# @scope class
|
|
2709
|
+
attach_function :new_attribute_dbl, :lxw_new_attribute_dbl, [:string, :double], XmlAttribute
|
|
2710
|
+
|
|
2711
|
+
# Create the XML declaration in an XML file.
|
|
2712
|
+
#
|
|
2713
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2714
|
+
#
|
|
2715
|
+
# @method xml_declaration(xmlfile)
|
|
2716
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2717
|
+
# @return [nil]
|
|
2718
|
+
# @scope class
|
|
2719
|
+
attach_function :xml_declaration, :lxw_xml_declaration, [:pointer], :void
|
|
2720
|
+
|
|
2721
|
+
# Write an XML start tag with optional attributes.
|
|
2722
|
+
#
|
|
2723
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2724
|
+
# @param tag The XML tag to write.
|
|
2725
|
+
# @param attributes An optional list of attributes to add to the tag.
|
|
2726
|
+
#
|
|
2727
|
+
# @method xml_start_tag(xmlfile, tag, attributes)
|
|
2728
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2729
|
+
# @param [String] tag
|
|
2730
|
+
# @param [XmlAttributeList] attributes
|
|
2731
|
+
# @return [nil]
|
|
2732
|
+
# @scope class
|
|
2733
|
+
attach_function :xml_start_tag, :lxw_xml_start_tag, [:pointer, :string, XmlAttributeList], :void
|
|
2734
|
+
|
|
2735
|
+
# Write an XML start tag with optional un-encoded attributes.
|
|
2736
|
+
# This is a minor optimization for attributes that don't need encoding.
|
|
2737
|
+
#
|
|
2738
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2739
|
+
# @param tag The XML tag to write.
|
|
2740
|
+
# @param attributes An optional list of attributes to add to the tag.
|
|
2741
|
+
#
|
|
2742
|
+
# @method xml_start_tag_unencoded(xmlfile, tag, attributes)
|
|
2743
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2744
|
+
# @param [String] tag
|
|
2745
|
+
# @param [XmlAttributeList] attributes
|
|
2746
|
+
# @return [nil]
|
|
2747
|
+
# @scope class
|
|
2748
|
+
attach_function :xml_start_tag_unencoded, :lxw_xml_start_tag_unencoded, [:pointer, :string, XmlAttributeList], :void
|
|
2749
|
+
|
|
2750
|
+
# Write an XML end tag.
|
|
2751
|
+
#
|
|
2752
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2753
|
+
# @param tag The XML tag to write.
|
|
2754
|
+
#
|
|
2755
|
+
# @method xml_end_tag(xmlfile, tag)
|
|
2756
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2757
|
+
# @param [String] tag
|
|
2758
|
+
# @return [nil]
|
|
2759
|
+
# @scope class
|
|
2760
|
+
attach_function :xml_end_tag, :lxw_xml_end_tag, [:pointer, :string], :void
|
|
2761
|
+
|
|
2762
|
+
# Write an XML empty tag with optional attributes.
|
|
2763
|
+
#
|
|
2764
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2765
|
+
# @param tag The XML tag to write.
|
|
2766
|
+
# @param attributes An optional list of attributes to add to the tag.
|
|
2767
|
+
#
|
|
2768
|
+
# @method xml_empty_tag(xmlfile, tag, attributes)
|
|
2769
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2770
|
+
# @param [String] tag
|
|
2771
|
+
# @param [XmlAttributeList] attributes
|
|
2772
|
+
# @return [nil]
|
|
2773
|
+
# @scope class
|
|
2774
|
+
attach_function :xml_empty_tag, :lxw_xml_empty_tag, [:pointer, :string, XmlAttributeList], :void
|
|
2775
|
+
|
|
2776
|
+
# Write an XML empty tag with optional un-encoded attributes.
|
|
2777
|
+
# This is a minor optimization for attributes that don't need encoding.
|
|
2778
|
+
#
|
|
2779
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2780
|
+
# @param tag The XML tag to write.
|
|
2781
|
+
# @param attributes An optional list of attributes to add to the tag.
|
|
2782
|
+
#
|
|
2783
|
+
# @method xml_empty_tag_unencoded(xmlfile, tag, attributes)
|
|
2784
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2785
|
+
# @param [String] tag
|
|
2786
|
+
# @param [XmlAttributeList] attributes
|
|
2787
|
+
# @return [nil]
|
|
2788
|
+
# @scope class
|
|
2789
|
+
attach_function :xml_empty_tag_unencoded, :lxw_xml_empty_tag_unencoded, [:pointer, :string, XmlAttributeList], :void
|
|
2790
|
+
|
|
2791
|
+
# Write an XML element containing data and optional attributes.
|
|
2792
|
+
#
|
|
2793
|
+
# @param xmlfile A FILE pointer to the output XML file.
|
|
2794
|
+
# @param tag The XML tag to write.
|
|
2795
|
+
# @param data The data section of the XML element.
|
|
2796
|
+
# @param attributes An optional list of attributes to add to the tag.
|
|
2797
|
+
#
|
|
2798
|
+
# @method xml_data_element(xmlfile, tag, data, attributes)
|
|
2799
|
+
# @param [FFI::Pointer(*FILE)] xmlfile
|
|
2800
|
+
# @param [String] tag
|
|
2801
|
+
# @param [String] data
|
|
2802
|
+
# @param [XmlAttributeList] attributes
|
|
2803
|
+
# @return [nil]
|
|
2804
|
+
# @scope class
|
|
2805
|
+
attach_function :xml_data_element, :lxw_xml_data_element, [:pointer, :string, :string, XmlAttributeList], :void
|
|
2806
|
+
|
|
2807
|
+
# @method escape_control_characters(string)
|
|
2808
|
+
# @param [String] string
|
|
2809
|
+
# @return [String]
|
|
2810
|
+
# @scope class
|
|
2811
|
+
attach_function :escape_control_characters, :lxw_escape_control_characters, [:string], :string
|
|
2812
|
+
|
|
2813
|
+
# @method escape_data(data)
|
|
2814
|
+
# @param [String] data
|
|
2815
|
+
# @return [String]
|
|
2816
|
+
# @scope class
|
|
2817
|
+
attach_function :escape_data, :lxw_escape_data, [:string], :string
|
|
2818
|
+
|
|
2819
|
+
end
|