diff --git a/shard.yml b/shard.yml index 99dd4b7b5..0fd9dbd94 100644 --- a/shard.yml +++ b/shard.yml @@ -8,8 +8,8 @@ dependencies: gi-crystal: github: hugopl/gi-crystal version: ">= 0.15.0" - harfbuzz: - github: hugopl/harfbuzz.cr + pango: + github: hugopl/pango.cr version: ">= 0.1.0" crystal: ">= 1.4.1" diff --git a/spec/pango_font_metrics_spec.cr b/spec/pango_font_metrics_spec.cr deleted file mode 100644 index d5a8c4bf4..000000000 --- a/spec/pango_font_metrics_spec.cr +++ /dev/null @@ -1,7 +0,0 @@ -require "./spec_helper" - -describe Pango::FontMetrics do - it "is a heap wrapper" do - sizeof(Pango::FontMetrics).should eq(sizeof(Pointer(Void))) - end -end diff --git a/src/bindings/pango/attribute.cr b/src/bindings/pango/attribute.cr deleted file mode 100644 index 64e4f2e81..000000000 --- a/src/bindings/pango/attribute.cr +++ /dev/null @@ -1,20 +0,0 @@ -module Pango - class Attribute - def initialize(pointer : Pointer(Void), transfer : GICrystal::Transfer) - raise ArgumentError.new("Tried to generate struct with a NULL pointer") if pointer.null? - - @pointer = if transfer.none? - LibPango.pango_attribute_copy(pointer) - else - pointer - end - end - - def finalize - {% if flag?(:debugmemory) %} - LibC.printf("~%s at %p\n", self.class.name.to_unsafe, self) - {% end %} - LibPango.pango_attribute_destroy(to_unsafe) - end - end -end diff --git a/src/bindings/pango/binding.yml b/src/bindings/pango/binding.yml deleted file mode 100644 index d5d513c9e..000000000 --- a/src/bindings/pango/binding.yml +++ /dev/null @@ -1,24 +0,0 @@ -namespace: Pango -version: "1.0" -require_after: -- attribute.cr -- font_metrics.cr -- layout.cr - -types: - Attribute: - binding_strategy: heap_wrapper_struct - ignore_fields: - - klass - ignore_methods: - - init - - destroy - AttrList: - ignore_methods: - - ref - - unref - FontMetrics: - binding_strategy: heap_wrapper_struct - ignore_methods: - - ref - - unref diff --git a/src/bindings/pango/font_metrics.cr b/src/bindings/pango/font_metrics.cr deleted file mode 100644 index fcbbc2f5d..000000000 --- a/src/bindings/pango/font_metrics.cr +++ /dev/null @@ -1,17 +0,0 @@ -module Pango - class FontMetrics - def initialize(pointer : Pointer(Void), transfer : GICrystal::Transfer) - raise ArgumentError.new("Tried to generate struct with a NULL pointer") if pointer.null? - - @pointer = pointer - LibPango.pango_font_metrics_ref(to_unsafe) if transfer.none? - end - - def finalize - {% if flag?(:debugmemory) %} - LibC.printf("~%s at %p - ref count: %d\n", self.class.name.to_unsafe, self, ref_count) - {% end %} - LibPango.pango_font_metrics_unref(to_unsafe) - end - end -end diff --git a/src/bindings/pango/layout.cr b/src/bindings/pango/layout.cr deleted file mode 100644 index 66818db82..000000000 --- a/src/bindings/pango/layout.cr +++ /dev/null @@ -1,15 +0,0 @@ -module Pango - class Layout < GObject::Object - def set_text(text : ::String) : Nil - LibPango.pango_layout_set_text(to_unsafe, text, text.bytesize) - end - - def set_text(bytes : Bytes) - LibPango.pango_layout_set_text(to_unsafe, bytes, bytes.size) - end - - def set_text(bytes : Bytes, length : Int32) - LibPango.pango_layout_set_text(to_unsafe, bytes, length) - end - end -end