cairo-gobject 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +32 -0
  3. data/ext/cairo-gobject/extconf.rb +85 -0
  4. data/ext/cairo-gobject/rb-cairo-gobject.c +150 -0
  5. data/ext/cairo-gobject/rb-cairo-gobject.h +42 -0
  6. data/extconf.rb +71 -0
  7. data/lib/2.0/cairo_gobject.so +0 -0
  8. data/lib/2.1/cairo_gobject.so +0 -0
  9. data/lib/2.2/cairo_gobject.so +0 -0
  10. data/lib/cairo-gobject.rb +30 -0
  11. data/test/cairo-gobject-test-utils.rb +21 -0
  12. data/test/run-test.rb +50 -0
  13. data/test/test_cairoantialias.rb +23 -0
  14. data/test/test_cairocontent.rb +23 -0
  15. data/test/test_cairocontext.rb +24 -0
  16. data/test/test_cairodevicetype.rb +23 -0
  17. data/test/test_cairoextend.rb +23 -0
  18. data/test/test_cairofillrule.rb +23 -0
  19. data/test/test_cairofilter.rb +23 -0
  20. data/test/test_cairofontslant.rb +23 -0
  21. data/test/test_cairofonttype.rb +23 -0
  22. data/test/test_cairofontweight.rb +23 -0
  23. data/test/test_cairoformat.rb +23 -0
  24. data/test/test_cairohintmetrics.rb +23 -0
  25. data/test/test_cairohintstyle.rb +23 -0
  26. data/test/test_cairoimagesurface.rb +23 -0
  27. data/test/test_cairolinecap.rb +23 -0
  28. data/test/test_cairolinejoin.rb +23 -0
  29. data/test/test_cairooperator.rb +23 -0
  30. data/test/test_cairopathdatatype.rb +23 -0
  31. data/test/test_cairopatterntype.rb +23 -0
  32. data/test/test_cairoregion.rb +23 -0
  33. data/test/test_cairoregionoverlap.rb +23 -0
  34. data/test/test_cairoscaledfont.rb +32 -0
  35. data/test/test_cairostatus.rb +23 -0
  36. data/test/test_cairosubpixelorder.rb +23 -0
  37. data/test/test_cairosurfacetype.rb +23 -0
  38. data/test/test_cairotextclusterflags.rb +23 -0
  39. metadata +122 -0
data/test/run-test.rb ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
20
+ ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
21
+
22
+ glib_base = File.join(ruby_gnome2_base, "glib2")
23
+ gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
24
+ cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
25
+
26
+ modules = [
27
+ [glib_base, "glib2"],
28
+ [gobject_introspection_base, "gobject-introspection"],
29
+ [cairo_gobject_base, "cairo-gobject"],
30
+ ]
31
+ modules.each do |target, module_name|
32
+ if system("which make > /dev/null")
33
+ `make -C #{target.dump} > /dev/null` or exit(false)
34
+ end
35
+ $LOAD_PATH.unshift(File.join(target, "ext", module_name))
36
+ $LOAD_PATH.unshift(File.join(target, "lib"))
37
+ end
38
+
39
+ $LOAD_PATH.unshift(File.join(glib_base, "test"))
40
+ require "glib-test-init"
41
+
42
+ $LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
43
+ require "gobject-introspection-test-utils"
44
+
45
+ $LOAD_PATH.unshift(File.join(cairo_gobject_base, "test"))
46
+ require "cairo-gobject-test-utils"
47
+
48
+ require "cairo-gobject"
49
+
50
+ exit Test::Unit::AutoRunner.run(true)
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCaitoAntialias < Test::Unit::TestCase
18
+ def test_cairo_antialias
19
+ assert_nothing_raised do
20
+ CairoGObject::Antialias.new(CairoGObject::Antialias::DEFAULT)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoContent < Test::Unit::TestCase
18
+ def test_cairo_content
19
+ assert_nothing_raised do
20
+ CairoGObject::Content.new(CairoGObject::Content::COLOR)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoContext < Test::Unit::TestCase
18
+ def test_cairo_context
19
+ assert_nothing_raised do
20
+ surface = Cairo::ImageSurface.new(Cairo::Format::ARGB32, 290, 200)
21
+ Cairo::Context.new(surface)
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoDeviceType < Test::Unit::TestCase
18
+ def test_cairo_device_type
19
+ assert_nothing_raised do
20
+ CairoGObject::DeviceType.new(CairoGObject::DeviceType::GL)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoExtend < Test::Unit::TestCase
18
+ def test_cairo_extend
19
+ assert_nothing_raised do
20
+ CairoGObject::Extend.new(CairoGObject::Extend::REPEAT)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoFullRule < Test::Unit::TestCase
18
+ def test_cairo_fill_rule
19
+ assert_nothing_raised do
20
+ CairoGObject::FillRule.new(CairoGObject::FillRule::WINDING)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoFilter < Test::Unit::TestCase
18
+ def test_cairo_filter
19
+ assert_nothing_raised do
20
+ CairoGObject::Filter.new(Cairo::Filter::GAUSSIAN)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoFontSlant < Test::Unit::TestCase
18
+ def test_cairo_font_slant
19
+ assert_nothing_raised do
20
+ CairoGObject::FontSlant.new(Cairo::FontSlant::NORMAL)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoFontType < Test::Unit::TestCase
18
+ def test_caito_font_type
19
+ assert_nothing_raised do
20
+ CairoGObject::FontType.new(CairoGObject::FontType::FT)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCaitoFontWeight < Test::Unit::TestCase
18
+ def test_cairo_font_weight
19
+ assert_nothing_raised do
20
+ CairoGObject::FontWeight.new(Cairo::FontWeight::BOLD)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoFormat < Test::Unit::TestCase
18
+ def test_cairo_format
19
+ assert_nothing_raised do
20
+ CairoGObject::Format.new(Cairo::Format::RGB24)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoHintMetrics < Test::Unit::TestCase
18
+ def test_cairo_hint_metrics
19
+ assert_nothing_raised do
20
+ CairoGObject::HintMetrics.new(Cairo::HintMetrics::ON)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoHintStyle < Test::Unit::TestCase
18
+ def test_cairo_hintstyle
19
+ assert_nothing_raised do
20
+ CairoGObject::HintStyle.new(Cairo::HintStyle::MEDIUM)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoImageSurface < Test::Unit::TestCase
18
+ def test_cairo_image_surface
19
+ assert_nothing_raised do
20
+ Cairo::ImageSurface.new(Cairo::Format::ARGB32, 290, 200)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestLineCap < Test::Unit::TestCase
18
+ def test_cairo_linecap
19
+ assert_nothing_raised do
20
+ CairoGObject::LineCap.new(Cairo::LineCap::ROUND)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2013 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestCairoLineJoin < Test::Unit::TestCase
18
+ def test_cairo_linejoin
19
+ assert_nothing_raised do
20
+ CairoGObject::LineJoin.new(Cairo::LineJoin::ROUND)
21
+ end
22
+ end
23
+ end