brst-binding-ruby 0.1.0
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/CHANGELOG.md +23 -0
- data/CMakeLists.txt +95 -0
- data/LICENSE +31 -0
- data/README.md +173 -0
- data/lib/brst/binding/ruby/asian.rb +46 -0
- data/lib/brst/binding/ruby/base.rb +50 -0
- data/lib/brst/binding/ruby/date.rb +42 -0
- data/lib/brst/binding/ruby/destination.rb +46 -0
- data/lib/brst/binding/ruby/doc_compression.rb +39 -0
- data/lib/brst/binding/ruby/doc_embedded_file.rb +39 -0
- data/lib/brst/binding/ruby/doc_encoder.rb +41 -0
- data/lib/brst/binding/ruby/doc_encoding_utf.rb +39 -0
- data/lib/brst/binding/ruby/doc_ext_gstate.rb +39 -0
- data/lib/brst/binding/ruby/doc_font.rb +43 -0
- data/lib/brst/binding/ruby/doc_image_jpeg.rb +40 -0
- data/lib/brst/binding/ruby/doc_image_png.rb +41 -0
- data/lib/brst/binding/ruby/doc_image_tiff.rb +41 -0
- data/lib/brst/binding/ruby/doc_info.rb +40 -0
- data/lib/brst/binding/ruby/doc_matrix.rb +46 -0
- data/lib/brst/binding/ruby/doc_output_intent.rb +40 -0
- data/lib/brst/binding/ruby/doc_page.rb +48 -0
- data/lib/brst/binding/ruby/doc_page_pattern.rb +46 -0
- data/lib/brst/binding/ruby/doc_pattern.rb +40 -0
- data/lib/brst/binding/ruby/doc_pdfa.rb +41 -0
- data/lib/brst/binding/ruby/doc_save.rb +40 -0
- data/lib/brst/binding/ruby/doc_security.rb +41 -0
- data/lib/brst/binding/ruby/doc_viewer.rb +41 -0
- data/lib/brst/binding/ruby/doc_xobject.rb +39 -0
- data/lib/brst/binding/ruby/error.rb +43 -0
- data/lib/brst/binding/ruby/ext_gstate.rb +41 -0
- data/lib/brst/binding/ruby/font.rb +40 -0
- data/lib/brst/binding/ruby/geometry.rb +93 -0
- data/lib/brst/binding/ruby/image.rb +45 -0
- data/lib/brst/binding/ruby/library.rb +46 -0
- data/lib/brst/binding/ruby/page_routines.rb +56 -0
- data/lib/brst/binding/ruby/page_sizes.rb +38 -0
- data/lib/brst/binding/ruby/page_xobject.rb +40 -0
- data/lib/brst/binding/ruby/stream_geometry.rb +81 -0
- data/lib/brst/binding/ruby/stream_text.rb +48 -0
- data/lib/brst/binding/ruby/text.rb +67 -0
- data/lib/brst/binding/ruby/types.rb +622 -0
- data/lib/brst/binding/ruby/unicode_glyph.rb +40 -0
- data/lib/brst/binding/ruby/version.rb +7 -0
- data/lib/brst/binding/ruby/xobject.rb +39 -0
- data/lib/brst/binding/ruby.rb +30 -0
- data/lib/brst-binding-ruby.rb +5 -0
- metadata +139 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module Error
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Error_Check, [:Error], :uint32
|
|
36
|
+
safe_attach :BRST_Doc_Error_Code, [:Doc], :uint32
|
|
37
|
+
safe_attach :BRST_Doc_Error_DetailCode, [:Doc], :uint32
|
|
38
|
+
safe_attach :BRST_Doc_Error_Reset, [:Doc], :void
|
|
39
|
+
safe_attach :BRST_Doc_Error_SetHandler, [:Doc, :pointer], :uint32
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module ExtGstate
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_ExtGState_SetAlphaStroke, [:ExtGState, :float], :uint32
|
|
36
|
+
safe_attach :BRST_ExtGState_SetAlphaFill, [:ExtGState, :float], :uint32
|
|
37
|
+
safe_attach :BRST_ExtGState_SetBlendMode, [:ExtGState, :BlendMode], :uint32
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module Font
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Font_Descent, [:Font, :float], :float
|
|
36
|
+
safe_attach :BRST_Font_TextWidth2, [:Font, :float, :float, :float, :string], :float
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module Geometry
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Page_GSave, [:Page], :uint32
|
|
36
|
+
safe_attach :BRST_Page_GRestore, [:Page], :uint32
|
|
37
|
+
safe_attach :BRST_Page_Concat, [:Page, :float, :float, :float, :float, :float, :float], :uint32
|
|
38
|
+
safe_attach :BRST_Page_Translate, [:Page, :float, :float], :uint32
|
|
39
|
+
safe_attach :BRST_Page_Scale, [:Page, :float, :float], :uint32
|
|
40
|
+
safe_attach :BRST_Page_RotateDeg, [:Page, :float], :uint32
|
|
41
|
+
safe_attach :BRST_Page_Rotate, [:Page, :float], :uint32
|
|
42
|
+
safe_attach :BRST_Page_Skew, [:Page, :float, :float], :uint32
|
|
43
|
+
safe_attach :BRST_Page_Circle, [:Page, :float, :float, :float], :uint32
|
|
44
|
+
safe_attach :BRST_Page_Ellipse, [:Page, :float, :float, :float, :float], :uint32
|
|
45
|
+
safe_attach :BRST_Page_Arc, [:Page, :float, :float, :float, :float, :float], :uint32
|
|
46
|
+
safe_attach :BRST_Page_SetGrayFill, [:Page, :float], :uint32
|
|
47
|
+
safe_attach :BRST_Page_SetGrayStroke, [:Page, :float], :uint32
|
|
48
|
+
safe_attach :BRST_Page_SetRGBFill, [:Page, :float, :float, :float], :uint32
|
|
49
|
+
safe_attach :BRST_Page_SetRGBFillUint, [:Page, :uint8, :uint8, :uint8], :uint32
|
|
50
|
+
safe_attach :BRST_Page_SetRGBFillHex, [:Page, :uint32], :uint32
|
|
51
|
+
safe_attach :BRST_Page_SetRGBStroke, [:Page, :float, :float, :float], :uint32
|
|
52
|
+
safe_attach :BRST_Page_SetRGBStrokeUint, [:Page, :uint8, :uint8, :uint8], :uint32
|
|
53
|
+
safe_attach :BRST_Page_SetRGBStrokeHex, [:Page, :uint32], :uint32
|
|
54
|
+
safe_attach :BRST_Page_SetCMYKFill, [:Page, :float, :float, :float, :float], :uint32
|
|
55
|
+
safe_attach :BRST_Page_SetCMYKStroke, [:Page, :float, :float, :float, :float], :uint32
|
|
56
|
+
safe_attach :BRST_Page_Clip, [:Page], :uint32
|
|
57
|
+
safe_attach :BRST_Page_Eoclip, [:Page], :uint32
|
|
58
|
+
safe_attach :BRST_Page_Stroke, [:Page], :uint32
|
|
59
|
+
safe_attach :BRST_Page_ClosePathStroke, [:Page], :uint32
|
|
60
|
+
safe_attach :BRST_Page_Fill, [:Page], :uint32
|
|
61
|
+
safe_attach :BRST_Page_Eofill, [:Page], :uint32
|
|
62
|
+
safe_attach :BRST_Page_FillStroke, [:Page], :uint32
|
|
63
|
+
safe_attach :BRST_Page_EofillStroke, [:Page], :uint32
|
|
64
|
+
safe_attach :BRST_Page_ClosePathFillStroke, [:Page], :uint32
|
|
65
|
+
safe_attach :BRST_Page_ClosePathEofillStroke, [:Page], :uint32
|
|
66
|
+
safe_attach :BRST_Page_EndPath, [:Page], :uint32
|
|
67
|
+
safe_attach :BRST_Page_MoveTo, [:Page, :float, :float], :uint32
|
|
68
|
+
safe_attach :BRST_Page_LineTo, [:Page, :float, :float], :uint32
|
|
69
|
+
safe_attach :BRST_Page_CurveTo, [:Page, :float, :float, :float, :float, :float, :float], :uint32
|
|
70
|
+
safe_attach :BRST_Page_CurveTo2, [:Page, :float, :float, :float, :float], :uint32
|
|
71
|
+
safe_attach :BRST_Page_CurveTo3, [:Page, :float, :float, :float, :float], :uint32
|
|
72
|
+
safe_attach :BRST_Page_ClosePath, [:Page], :uint32
|
|
73
|
+
safe_attach :BRST_Page_Rectangle, [:Page, :float, :float, :float, :float], :uint32
|
|
74
|
+
safe_attach :BRST_Page_SetLineWidth, [:Page, :float], :uint32
|
|
75
|
+
safe_attach :BRST_Page_SetLineCap, [:Page, :LineCap], :uint32
|
|
76
|
+
safe_attach :BRST_Page_SetLineJoin, [:Page, :LineJoin], :uint32
|
|
77
|
+
safe_attach :BRST_Page_SetMiterLimit, [:Page, :float], :uint32
|
|
78
|
+
safe_attach :BRST_Page_SetDash, [:Page, :pointer, :uint32, :float], :uint32
|
|
79
|
+
safe_attach :BRST_Page_SetFlat, [:Page, :float], :uint32
|
|
80
|
+
safe_attach :BRST_Page_GrayFill, [:Page], :float
|
|
81
|
+
safe_attach :BRST_Page_GrayStroke, [:Page], :float
|
|
82
|
+
safe_attach :BRST_Page_StrokeColorSpace, [:Page], :ColorSpace
|
|
83
|
+
safe_attach :BRST_Page_FillColorSpace, [:Page], :ColorSpace
|
|
84
|
+
safe_attach :BRST_Page_LineWidth, [:Page], :float
|
|
85
|
+
safe_attach :BRST_Page_LineCap, [:Page], :LineCap
|
|
86
|
+
safe_attach :BRST_Page_LineJoin, [:Page], :LineJoin
|
|
87
|
+
safe_attach :BRST_Page_MiterLimit, [:Page], :float
|
|
88
|
+
safe_attach :BRST_Page_Flat, [:Page], :float
|
|
89
|
+
safe_attach :BRST_Page_Matrix, [:Page], :Matrix
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module Image
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Image_AddSMask, [:Image, :Image], :uint32
|
|
36
|
+
safe_attach :BRST_Image_Width, [:Image], :uint32
|
|
37
|
+
safe_attach :BRST_Image_Height, [:Image], :uint32
|
|
38
|
+
safe_attach :BRST_Image_BitsPerComponent, [:Image], :uint32
|
|
39
|
+
safe_attach :BRST_Image_ColorSpace, [:Image], :string
|
|
40
|
+
safe_attach :BRST_Image_SetColorMask, [:Image, :uint32, :uint32, :uint32, :uint32, :uint32, :uint32], :uint32
|
|
41
|
+
safe_attach :BRST_Image_SetMaskImage, [:Image, :Image], :uint32
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ffi"
|
|
4
|
+
|
|
5
|
+
module Brst
|
|
6
|
+
module Binding
|
|
7
|
+
module Ruby
|
|
8
|
+
# Locates libBeresta's shared library so generated FFI modules can call
|
|
9
|
+
# `ffi_lib Brst::Binding::Ruby::Library.lib_path`.
|
|
10
|
+
#
|
|
11
|
+
# Resolution order:
|
|
12
|
+
# 1. ENV["BRST_BINDING_RUBY_LIB"] — explicit override (any path or name)
|
|
13
|
+
# 2. ext/libBeresta/lib/libbrst.{dylib,so} (vendored build output)
|
|
14
|
+
# 3. ext/libBeresta/build/src/libbrst.{dylib,so} (in-tree build output)
|
|
15
|
+
# 4. "brst" / "libbrst" — let ffi/dlopen search system paths
|
|
16
|
+
module Library
|
|
17
|
+
module_function
|
|
18
|
+
|
|
19
|
+
def lib_path
|
|
20
|
+
@lib_path ||= resolve!
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def resolve!
|
|
24
|
+
if (override = ENV["BRST_BINDING_RUBY_LIB"]) && !override.empty?
|
|
25
|
+
return override
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
candidates = []
|
|
29
|
+
gem_root = File.expand_path("../../../..", __dir__)
|
|
30
|
+
|
|
31
|
+
%w[dylib so].each do |ext|
|
|
32
|
+
candidates << File.join(gem_root, "ext", "libBeresta", "lib", "libbrst.#{ext}")
|
|
33
|
+
candidates << File.join(gem_root, "ext", "libBeresta", "build", "src", "libbrst.#{ext}")
|
|
34
|
+
candidates << File.join(gem_root, "build", "libBeresta-build", "src", "libbrst.#{ext}")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
found = candidates.find { |p| File.exist?(p) }
|
|
38
|
+
return found if found
|
|
39
|
+
|
|
40
|
+
# Fall back to library names; FFI will search system paths.
|
|
41
|
+
%w[brst libbrst]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module PageRoutines
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Page_SetWidth, [:Page, :float], :uint32
|
|
36
|
+
safe_attach :BRST_Page_SetHeight, [:Page, :float], :uint32
|
|
37
|
+
safe_attach :BRST_Page_SetBoundary, [:Page, :PageBoundary, :float, :float, :float, :float], :uint32
|
|
38
|
+
safe_attach :BRST_Page_SetSize, [:Page, :PageSizes, :PageOrientation], :uint32
|
|
39
|
+
safe_attach :BRST_Page_SetRotate, [:Page, :uint16], :uint32
|
|
40
|
+
safe_attach :BRST_Page_SetSlideShow, [:Page, :PageTransition, :float, :float], :uint32
|
|
41
|
+
safe_attach :BRST_Page_SetHorizontalScaling, [:Page, :float], :uint32
|
|
42
|
+
safe_attach :BRST_Page_GStateDepth, [:Page], :uint32
|
|
43
|
+
safe_attach :BRST_Page_HorizontalScaling, [:Page], :float
|
|
44
|
+
safe_attach :BRST_Page_SetZoom, [:Page, :float], :uint32
|
|
45
|
+
safe_attach :BRST_Page_Width, [:Page], :float
|
|
46
|
+
safe_attach :BRST_Page_Height, [:Page], :float
|
|
47
|
+
safe_attach :BRST_Page_GMode, [:Page], :uint16
|
|
48
|
+
safe_attach :BRST_Page_MMgr, [:Page], :MMgr
|
|
49
|
+
safe_attach :BRST_Page_Insert_Shared_Content_Stream, [:Page, :Dict], :uint32
|
|
50
|
+
safe_attach :BRST_Page_RawWrite, [:Page, :string], :uint32
|
|
51
|
+
safe_attach :BRST_Page_SetExtGState, [:Page, :ExtGState], :uint32
|
|
52
|
+
safe_attach :BRST_Page_Destination_New, [:Page], :Destination
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module PageSizes
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module PageXobject
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Page_XObject_Execute, [:Page, :XObject], :uint32
|
|
36
|
+
safe_attach :BRST_Dict_XObject_Execute, [:Dict, :XObject], :uint32
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module StreamGeometry
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Stream_GSave, [:Stream], :uint32
|
|
36
|
+
safe_attach :BRST_Stream_GRestore, [:Stream], :uint32
|
|
37
|
+
safe_attach :BRST_Stream_Concat, [:Stream, :float, :float, :float, :float, :float, :float], :uint32
|
|
38
|
+
safe_attach :BRST_Stream_Translate, [:Stream, :float, :float], :uint32
|
|
39
|
+
safe_attach :BRST_Stream_Scale, [:Stream, :float, :float], :uint32
|
|
40
|
+
safe_attach :BRST_Stream_RotateDeg, [:Stream, :float], :uint32
|
|
41
|
+
safe_attach :BRST_Stream_Rotate, [:Stream, :float], :uint32
|
|
42
|
+
safe_attach :BRST_Stream_Skew, [:Stream, :float, :float], :uint32
|
|
43
|
+
safe_attach :BRST_Stream_Circle, [:Stream, :float, :float, :float], :uint32
|
|
44
|
+
safe_attach :BRST_Stream_SetGrayFill, [:Stream, :float], :uint32
|
|
45
|
+
safe_attach :BRST_Stream_SetGrayStroke, [:Stream, :float], :uint32
|
|
46
|
+
safe_attach :BRST_Stream_SetRGBFill, [:Stream, :float, :float, :float], :uint32
|
|
47
|
+
safe_attach :BRST_Stream_SetRGBFillUint, [:Stream, :uint8, :uint8, :uint8], :uint32
|
|
48
|
+
safe_attach :BRST_Stream_SetRGBFillHex, [:Stream, :uint32], :uint32
|
|
49
|
+
safe_attach :BRST_Stream_SetRGBStroke, [:Stream, :float, :float, :float], :uint32
|
|
50
|
+
safe_attach :BRST_Stream_SetRGBStrokeUint, [:Stream, :uint8, :uint8, :uint8], :uint32
|
|
51
|
+
safe_attach :BRST_Stream_SetRGBStrokeHex, [:Stream, :uint32], :uint32
|
|
52
|
+
safe_attach :BRST_Stream_SetCMYKFill, [:Stream, :float, :float, :float, :float], :uint32
|
|
53
|
+
safe_attach :BRST_Stream_SetCMYKStroke, [:Stream, :float, :float, :float, :float], :uint32
|
|
54
|
+
safe_attach :BRST_Stream_Clip, [:Stream], :uint32
|
|
55
|
+
safe_attach :BRST_Stream_Eoclip, [:Stream], :uint32
|
|
56
|
+
safe_attach :BRST_Stream_Stroke, [:Stream], :uint32
|
|
57
|
+
safe_attach :BRST_Stream_ClosePathStroke, [:Stream], :uint32
|
|
58
|
+
safe_attach :BRST_Stream_Fill, [:Stream], :uint32
|
|
59
|
+
safe_attach :BRST_Stream_Eofill, [:Stream], :uint32
|
|
60
|
+
safe_attach :BRST_Stream_FillStroke, [:Stream], :uint32
|
|
61
|
+
safe_attach :BRST_Stream_EofillStroke, [:Stream], :uint32
|
|
62
|
+
safe_attach :BRST_Stream_ClosePathFillStroke, [:Stream], :uint32
|
|
63
|
+
safe_attach :BRST_Stream_ClosePathEofillStroke, [:Stream], :uint32
|
|
64
|
+
safe_attach :BRST_Stream_EndPath, [:Stream], :uint32
|
|
65
|
+
safe_attach :BRST_Stream_MoveTo, [:Stream, :float, :float], :uint32
|
|
66
|
+
safe_attach :BRST_Stream_LineTo, [:Stream, :float, :float], :uint32
|
|
67
|
+
safe_attach :BRST_Stream_CurveTo, [:Stream, :float, :float, :float, :float, :float, :float], :uint32
|
|
68
|
+
safe_attach :BRST_Stream_CurveTo2, [:Stream, :float, :float, :float, :float], :uint32
|
|
69
|
+
safe_attach :BRST_Stream_CurveTo3, [:Stream, :float, :float, :float, :float], :uint32
|
|
70
|
+
safe_attach :BRST_Stream_ClosePath, [:Stream], :uint32
|
|
71
|
+
safe_attach :BRST_Stream_Rectangle, [:Stream, :float, :float, :float, :float], :uint32
|
|
72
|
+
safe_attach :BRST_Stream_SetLineWidth, [:Stream, :float], :uint32
|
|
73
|
+
safe_attach :BRST_Stream_SetLineCap, [:Stream, :LineCap], :uint32
|
|
74
|
+
safe_attach :BRST_Stream_SetLineJoin, [:Stream, :LineJoin], :uint32
|
|
75
|
+
safe_attach :BRST_Stream_SetMiterLimit, [:Stream, :float], :uint32
|
|
76
|
+
safe_attach :BRST_Stream_SetDash, [:Stream, :pointer, :uint32, :float], :uint32
|
|
77
|
+
safe_attach :BRST_Stream_SetFlat, [:Stream, :float], :uint32
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module StreamText
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Stream_BeginText, [:Stream], :uint32
|
|
36
|
+
safe_attach :BRST_Stream_EndText, [:Stream], :uint32
|
|
37
|
+
safe_attach :BRST_Stream_SetTextLeading, [:Stream, :float], :uint32
|
|
38
|
+
safe_attach :BRST_Stream_SetTextRenderingMode, [:Stream, :TextRenderingMode], :uint32
|
|
39
|
+
safe_attach :BRST_Stream_MoveTextPos, [:Stream, :float, :float], :uint32
|
|
40
|
+
safe_attach :BRST_Stream_MoveTextPos2, [:Stream, :float, :float], :uint32
|
|
41
|
+
safe_attach :BRST_Stream_SetTextMatrix, [:Stream, :float, :float, :float, :float, :float, :float], :uint32
|
|
42
|
+
safe_attach :BRST_Stream_ShowText, [:Stream, :Font, :string], :uint32
|
|
43
|
+
safe_attach :BRST_Stream_TextOut, [:Stream, :Font, :float, :float, :string], :uint32
|
|
44
|
+
safe_attach :BRST_Stream_MoveToNextLine, [:Stream], :uint32
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# AUTO-GENERATED by brst-binding-ruby's generator (generator/bin/brst-binding-ruby-gen).
|
|
4
|
+
# Source of truth: libBeresta gen/data/*.lsp (S-expression definitions).
|
|
5
|
+
# DO NOT EDIT BY HAND. Re-generate with `rake generate`.
|
|
6
|
+
|
|
7
|
+
require "ffi"
|
|
8
|
+
require_relative "library"
|
|
9
|
+
require_relative "types"
|
|
10
|
+
|
|
11
|
+
module Brst
|
|
12
|
+
module Binding
|
|
13
|
+
module Ruby
|
|
14
|
+
module Text
|
|
15
|
+
extend FFI::Library
|
|
16
|
+
ffi_lib Brst::Binding::Ruby::Library.lib_path
|
|
17
|
+
|
|
18
|
+
Brst::Binding::Ruby::Types.apply(self)
|
|
19
|
+
|
|
20
|
+
MISSING_SYMBOLS = []
|
|
21
|
+
|
|
22
|
+
# Wraps `attach_function` so that captions whose actual C symbol
|
|
23
|
+
# is missing from the loaded libBeresta build (e.g. caption /
|
|
24
|
+
# symbol drift in upstream .lsp data, or features compiled
|
|
25
|
+
# out) — or whose declared parameter types reference a struct
|
|
26
|
+
# / enum the .lsp data never declared — don't break the entire
|
|
27
|
+
# gem load. Each miss is recorded in MISSING_SYMBOLS for
|
|
28
|
+
# diagnostic surfaces.
|
|
29
|
+
def self.safe_attach(name, args, ret)
|
|
30
|
+
attach_function(name, args, ret)
|
|
31
|
+
rescue FFI::NotFoundError, TypeError => e
|
|
32
|
+
MISSING_SYMBOLS << [name, e.message]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
safe_attach :BRST_Page_BeginText, [:Page], :uint32
|
|
36
|
+
safe_attach :BRST_Page_EndText, [:Page], :uint32
|
|
37
|
+
safe_attach :BRST_Page_SetTextLeading, [:Page, :float], :uint32
|
|
38
|
+
safe_attach :BRST_Page_SetFontAndSize, [:Page, :Font, :float], :uint32
|
|
39
|
+
safe_attach :BRST_Dict_SetFontAndSize, [:Dict, :Font, :float], :uint32
|
|
40
|
+
safe_attach :BRST_Page_SetTextRenderingMode, [:Page, :TextRenderingMode], :uint32
|
|
41
|
+
safe_attach :BRST_Page_SetTextRise, [:Page, :float], :uint32
|
|
42
|
+
safe_attach :BRST_Page_MoveTextPos, [:Page, :float, :float], :uint32
|
|
43
|
+
safe_attach :BRST_Page_MoveTextPos2, [:Page, :float, :float], :uint32
|
|
44
|
+
safe_attach :BRST_Page_SetTextMatrix, [:Page, :float, :float, :float, :float, :float, :float], :uint32
|
|
45
|
+
safe_attach :BRST_Page_MoveToNextLine, [:Page], :uint32
|
|
46
|
+
safe_attach :BRST_Page_ShowText, [:Page, :string], :uint32
|
|
47
|
+
safe_attach :BRST_Page_ShowTextNextLine, [:Page, :string], :uint32
|
|
48
|
+
safe_attach :BRST_Page_ShowTextNextLineEx, [:Page, :float, :float, :string], :uint32
|
|
49
|
+
safe_attach :BRST_Page_TextOut, [:Page, :float, :float, :string], :uint32
|
|
50
|
+
safe_attach :BRST_Page_TextRect, [:Page, :float, :float, :float, :float, :string, :TextAlignment, :pointer], :uint32
|
|
51
|
+
safe_attach :BRST_Page_SetCharSpace, [:Page, :float], :uint32
|
|
52
|
+
safe_attach :BRST_Page_SetWordSpace, [:Page, :float], :uint32
|
|
53
|
+
safe_attach :BRST_Page_TextMatrix, [:Page], :Matrix
|
|
54
|
+
safe_attach :BRST_Page_TextLeading, [:Page], :float
|
|
55
|
+
safe_attach :BRST_Page_TextRenderingMode, [:Page], :TextRenderingMode
|
|
56
|
+
safe_attach :BRST_Page_TextRise, [:Page], :float
|
|
57
|
+
safe_attach :BRST_Page_CharSpace, [:Page], :float
|
|
58
|
+
safe_attach :BRST_Page_WordSpace, [:Page], :float
|
|
59
|
+
safe_attach :BRST_Page_CurrentTextPos2, [:Page, :pointer], :uint32
|
|
60
|
+
safe_attach :BRST_Page_CurrentFont, [:Page], :Font
|
|
61
|
+
safe_attach :BRST_Page_CurrentFontSize, [:Page], :float
|
|
62
|
+
safe_attach :BRST_Page_TextWidth, [:Page, :string], :float
|
|
63
|
+
safe_attach :BRST_Page_MeasureText, [:Page, :string, :float, :int32, :pointer], :uint32
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|