Changeset 119

Show
Ignore:
Timestamp:
05/18/06 23:08:27 (6 years ago)
Author:
DRK
Message:

* Added bindings for the Glitz and Xlib backends.
* Checked in cairooo: an OO layer on top of the cairo binding.
* Added snippets directory for cairooo
* Added basic tutorial on how to use cairooo
* Added a simple demo program.
* Added scripts for building import libraries.
* Fixed several bugs.
* Drank WAAY too much coffee.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cairo/README.html

    r97 r119  
    1414<!-- Build command: 
    1515rst2html.py - -date - -time README.rst README.html --> 
     16<div class="contents topic" id="contents"> 
     17<p class="topic-title first"><a name="contents">Contents</a></p> 
     18<ul class="simple"> 
     19<li><a class="reference" href="#introduction" id="id3" name="id3">Introduction</a></li> 
     20<li><a class="reference" href="#installation" id="id4" name="id4">Installation</a><ul> 
     21<li><a class="reference" href="#cairo-binding" id="id5" name="id5">cairo binding</a></li> 
     22<li><a class="reference" href="#cairooo-binding" id="id6" name="id6">cairooo binding</a></li> 
     23<li><a class="reference" href="#cairo-snippets" id="id7" name="id7">cairo snippets</a></li> 
     24<li><a class="reference" href="#cairooo-tutorial" id="id8" name="id8">cairooo tutorial</a></li> 
     25<li><a class="reference" href="#demos" id="id9" name="id9">demos</a></li> 
     26<li><a class="reference" href="#documentation" id="id10" name="id10">documentation</a></li> 
     27<li><a class="reference" href="#cairo-for-windows" id="id11" name="id11">cairo for Windows</a></li> 
     28</ul> 
     29</li> 
     30<li><a class="reference" href="#usage" id="id12" name="id12">Usage</a><ul> 
     31<li><a class="reference" href="#cairo" id="id13" name="id13">cairo</a></li> 
     32<li><a class="reference" href="#cairooo" id="id14" name="id14">cairooo</a></li> 
     33</ul> 
     34</li> 
     35<li><a class="reference" href="#contributing" id="id15" name="id15">Contributing</a></li> 
     36<li><a class="reference" href="#thanks" id="id16" name="id16">Thanks</a></li> 
     37<li><a class="reference" href="#credits" id="id17" name="id17">Credits</a></li> 
     38</ul> 
     39</div> 
    1640<div class="section" id="introduction"> 
    17 <h1><a name="introduction">Introduction</a></h1> 
     41<h1><a class="toc-backref" href="#id3" name="introduction">Introduction</a></h1> 
    1842<p>This project's aim is to provide a complete, up-to-date D binding for the 
    1943<a class="reference" href="http://cairographics.org/">cairo</a> 2D drawing API.  Currently, the binding supports the base cairo 
    20 functions, PNG functions, and Win32 functions.</p> 
     44functions and PNG functions.  It also contains support for the Glitz, Win32 
     45and Xlib backends, but these are largely untested.</p> 
     46<p>This project also provides an object-oriented layer above the raw bindings 
     47called <tt class="docutils literal"><span class="pre">cairooo</span></tt> which adds support for objects and exceptions, integrating 
     48cairo more seamlessly with D style programming.  In time, we hope to also 
     49provide a library of additional, high-level functionality with this layer.</p> 
    2150</div> 
    2251<div class="section" id="installation"> 
    23 <h1><a name="installation">Installation</a></h1> 
     52<h1><a class="toc-backref" href="#id4" name="installation">Installation</a></h1> 
     53<div class="section" id="cairo-binding"> 
     54<h2><a class="toc-backref" href="#id5" name="cairo-binding">cairo binding</a></h2> 
    2455<p>To install, simply copy the <tt class="docutils literal"><span class="pre">cairo</span></tt> directory to a place in your D 
    25 compiler's import path.  That's all there is to it.  Currently, there is no 
    26 automated support for building an import library, although this is planned 
    27 for a future release (ie: when I get around to it).</p> 
     56compiler's import path.  That's all there is to it.</p> 
     57<p>If you really want to have import libraries to use, then you can build these 
     58using the <tt class="docutils literal"><span class="pre">cairo-build.d</span></tt> script, which will place them in the <tt class="docutils literal"><span class="pre">lib</span></tt> 
     59directory.  It can be run using either:</p> 
     60<pre class="literal-block"> 
     61dmd -run cairo-build.d ARGS 
     62</pre> 
     63<p>Or, if that fails:</p> 
     64<pre class="literal-block"> 
     65build cairo-build.d 
     66cairo-build ARGS 
     67</pre> 
     68<p>The command line arguments may be empty (signifying a default build), or 
     69contain one or more targets to build.  You may also use the <tt class="docutils literal"><span class="pre">--verbose</span></tt> 
     70switch to get more verbose output, and the <tt class="docutils literal"><span class="pre">--debug</span></tt> switch to produce 
     71libraries with debug symbols <a class="footnote-reference" href="#debuglibs" id="id1" name="id1">[1]</a>.</p> 
     72<p>Use the <tt class="docutils literal"><span class="pre">--help</span></tt> switch for full usage information.</p> 
     73</div> 
     74<div class="section" id="cairooo-binding"> 
     75<h2><a class="toc-backref" href="#id6" name="cairooo-binding">cairooo binding</a></h2> 
     76<p>To install the cairooo binding, simply copy both the <tt class="docutils literal"><span class="pre">cairo</span></tt> and <tt class="docutils literal"><span class="pre">cairooo</span></tt> 
     77directories to a place on your D compiler's import path.</p> 
     78<p>If you want to build import libraries, then you can use the 
     79<tt class="docutils literal"><span class="pre">cairooo-build.d</span></tt> script, which will build them to the <tt class="docutils literal"><span class="pre">lib</span></tt> directory. 
     80Usage is mostly the same as using <tt class="docutils literal"><span class="pre">cairo-build.d</span></tt> (see above).</p> 
     81</div> 
     82<div class="section" id="cairo-snippets"> 
     83<h2><a class="toc-backref" href="#id7" name="cairo-snippets">cairo snippets</a></h2> 
     84<p>The <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> and <tt class="docutils literal"><span class="pre">cairooo_snippets</span></tt> directories contain the 
     85&quot;snippets&quot; example programs provided by the cairo developers ported to D. 
     86They use the <tt class="docutils literal"><span class="pre">cairo</span></tt> and <tt class="docutils literal"><span class="pre">cairooo</span></tt> bindings respectively.</p> 
     87<p>These do not have a &quot;proper&quot; build script like the binding itself: they are 
     88generally built with either a Windows batch file or shell script.  However, if 
     89you wish to build them manually, the command to do so usually looks like 
     90this:</p> 
     91<pre class="literal-block"> 
     92build -cleanup -release -inline -I.. NAME_OF_SNIPPET 
     93</pre> 
     94<p>Just be sure to create the <tt class="docutils literal"><span class="pre">output</span></tt> directory if it does not exist first.</p> 
     95</div> 
     96<div class="section" id="cairooo-tutorial"> 
     97<h2><a class="toc-backref" href="#id8" name="cairooo-tutorial">cairooo tutorial</a></h2> 
     98<p>The <tt class="docutils literal"><span class="pre">cairooo_tutorial</span></tt> contains the beginnings of a very simple introductory 
     99tutorial to programming image programs in D using the cairooo binding.  It is 
     100pathetically incomplete; however, it may be a useful starting point.</p> 
     101</div> 
     102<div class="section" id="demos"> 
     103<h2><a class="toc-backref" href="#id9" name="demos">demos</a></h2> 
     104<p>The <tt class="docutils literal"><span class="pre">demos</span></tt> directory will contain a few small demo programs to showcase the 
     105binding.  Currently, it only has one demo, so the plural is prehaps 
     106misleading.  Hopefully this will change :)</p> 
     107</div> 
     108<div class="section" id="documentation"> 
     109<h2><a class="toc-backref" href="#id10" name="documentation">documentation</a></h2> 
     110<p>Whilst this project hopes to eventually have full DDoc documentation for the 
     111cairooo binding, we will not be providing anything other than minimal 
     112documentation for the raw cairo API binding.  The rationale is that since the 
     113original C api and the raw D api are for the most part identical, there is no 
     114need to duplicate the existing C documentation.</p> 
     115<p>That said, the cairooo documentation itself is woefully lacking.  What does 
     116exist can be built using the following command:</p> 
     117<pre class="literal-block"> 
     118build &#64;build_docs_cairooo.brf 
     119</pre> 
     120<p>Please note that you will need to create the following directory structure 
     121<em>first</em> if it does not yet exist:</p> 
     122<pre class="literal-block"> 
     123docs\ 
     124  cairooo\ 
     125    extra\ 
     126    glitz\ 
     127    png\ 
     128    win32\ 
     129    xlib\ 
     130</pre> 
     131</div> 
    28132<div class="section" id="cairo-for-windows"> 
    29 <h2><a name="cairo-for-windows">cairo for Windows</a></h2> 
     133<h2><a class="toc-backref" href="#id11" name="cairo-for-windows">cairo for Windows</a></h2> 
    30134<p>If you are using Windows, you will also probably want to grab the cairo 
    31135library itself.  The best version I have found is on <a class="reference" href="http://www.iki.fi/tml/index.html">Tor Lillqvist</a>'s 
     
    44148</div> 
    45149<div class="section" id="usage"> 
    46 <h1><a name="usage">Usage</a></h1> 
     150<h1><a class="toc-backref" href="#id12" name="usage">Usage</a></h1> 
     151<div class="section" id="cairo"> 
     152<h2><a class="toc-backref" href="#id13" name="cairo">cairo</a></h2> 
    47153<p>To use the binding, simply import <tt class="docutils literal"><span class="pre">cairo.cairo</span></tt>, along with any other 
    48154parts of the library you need.  For example, if you wanted the base cairo 
     
    66172look in the <tt class="docutils literal"><span class="pre">cairo_snippets</span></tt> directory.</p> 
    67173</div> 
     174<div class="section" id="cairooo"> 
     175<h2><a class="toc-backref" href="#id14" name="cairooo">cairooo</a></h2> 
     176<p>To use the cairooo binding instead, import <tt class="docutils literal"><span class="pre">cairooo.all</span></tt>, along with any 
     177other parts of the library that you need.  To copy the above example, to 
     178import the base and PNG functions:</p> 
     179<pre class="literal-block"> 
     180import cairooo.all; 
     181import cairooo.png.all; 
     182</pre> 
     183<p>As with the raw binding, you need to tell the binding to load the cairo 
     184library before you can use it.  You can do that like so:</p> 
     185<pre class="literal-block"> 
     186Cairo.load(); 
     187CairoPNG.load(); 
     188</pre> 
     189<p>Again, if anything fails to load, an exception will be thrown.</p> 
     190<p>There are no huge, arbitrary differences between the flat C api and the 
     191object-oriented one.  The largest change is that anywhere you would pass a 
     192handle, you instead pass an object.  The naming translation is roughly:</p> 
     193<pre class="literal-block"> 
     194cairo_foo_bar_xxx_t* --&gt; FooBarXXX 
     195</pre> 
     196<p>An exception to this is the cairo context, <tt class="docutils literal"><span class="pre">cairo_t*</span></tt>, which becomes 
     197<tt class="docutils literal"><span class="pre">Context</span></tt>.</p> 
     198<p>Also, the following differences should be kept in mind:</p> 
     199<ul class="simple"> 
     200<li>&quot;lower_case_with_underscores&quot; functions become &quot;lowerCaseWithUnderscores&quot;.</li> 
     201<li>&quot;CAIRO_ENUM_TYPE_ENUM_NAME&quot; becomes &quot;EnumType.enumName&quot;.</li> 
     202</ul> 
     203<p>Finally, where there have been multiple ways of creating a certain kind of 
     204object (such as a Surface or Pattern), creating them is split between using 
     205constructors and static members.  This will get resolved eventually, but for 
     206the moment, which one to use is unclear.</p> 
     207<p>The general rule is that if you want to convert:</p> 
     208<pre class="literal-block"> 
     209xxx = cairo_some_object_create_foo(arg1, arg2, ...); 
     210</pre> 
     211<p>You should try the following:</p> 
     212<pre class="literal-block"> 
     213xxx = new SomeObject(arg1, arg2, ...); 
     214xxx = SomeObject.create(arg1, arg2, ...); 
     215xxx = SomeObject.createFoo(arg1, arg2, ...); 
     216</pre> 
     217<p>For more concrete examples, see the <tt class="docutils literal"><span class="pre">cairooo_snippets</span></tt>, <tt class="docutils literal"><span class="pre">cairooo_tutorial</span></tt> 
     218and <tt class="docutils literal"><span class="pre">demos</span></tt> directories.</p> 
     219</div> 
     220</div> 
    68221<div class="section" id="contributing"> 
    69 <h1><a name="contributing">Contributing</a></h1> 
    70 <p>The cairo api has a lot of functionality in it that this binding does not 
    71 yet cover: X11, PDF, PS and more.  However, the only binary version of cairo 
     222<h1><a class="toc-backref" href="#id15" name="contributing">Contributing</a></h1> 
     223<p>The cairo api has a functionality in it that this binding does not 
     224yet cover: PDF abd PS for example.  However, the only binary version of cairo 
    72225I have access to is limited to what is currently covered, and I have thus 
    73226far had no success in compiling cairo myself.</p> 
     
    75228binding for some currently unsupported part of cairo.  You can look at the 
    76229PNG binding for a simple example.</p> 
     230<p>That, or you can write samples and demos to test the bindings that I can't. 
     231In addition to being fun, you get to make pretty pictures in the process!</p> 
    77232</div> 
    78233<div class="section" id="thanks"> 
    79 <h1><a name="thanks">Thanks</a></h1> 
     234<h1><a class="toc-backref" href="#id16" name="thanks">Thanks</a></h1> 
    80235<ul class="simple"> 
    81236<li>Many thanks for the hard work by the people behind the cairo library.</li> 
     
    85240</div> 
    86241<div class="section" id="credits"> 
    87 <h1><a name="credits">Credits</a></h1> 
     242<h1><a class="toc-backref" href="#id17" name="credits">Credits</a></h1> 
    88243<p>cairo bindings for D Copyright © 2006 Daniel Keep.  Portions Copyright © 
    892442006 Michael Parker.</p> 
    90245<p>Released under the <a class="reference" href="http://www.opensource.org/licenses/bsd-license.php">BSD license</a>.</p> 
    91246<!-- Links --> 
     247<!-- Footnotes --> 
     248<table class="docutils footnote" frame="void" id="debuglibs" rules="none"> 
     249<colgroup><col class="label" /><col /></colgroup> 
     250<tbody valign="top"> 
     251<tr><td class="label"><a class="fn-backref" href="#id1" name="debuglibs">[1]</a></td><td>The debug libraries will have &quot;_debug&quot; appended to their 
     252filename, so you do not need to worry about overwriting your 
     253release libraries.</td></tr> 
     254</tbody> 
     255</table> 
    92256</div> 
    93257</div> 
    94258<div class="footer"> 
    95259<hr class="footer" /> 
    96 Generated on: 2006-05-04 14:08 UTC. 
     260Generated on: 2006-05-19 02:45 UTC. 
    97261 
    98262</div> 
  • trunk/cairo/README.rst

    r97 r119  
    88====================== 
    99 
     10.. contents:: 
     11 
    1012Introduction 
    1113============ 
     
    1315This project's aim is to provide a complete, up-to-date D binding for the 
    1416cairo_ 2D drawing API.  Currently, the binding supports the base cairo 
    15 functions, PNG functions, and Win32 functions. 
     17functions and PNG functions.  It also contains support for the Glitz, Win32 
     18and Xlib backends, but these are largely untested. 
     19 
     20This project also provides an object-oriented layer above the raw bindings 
     21called ``cairooo`` which adds support for objects and exceptions, integrating 
     22cairo more seamlessly with D style programming.  In time, we hope to also 
     23provide a library of additional, high-level functionality with this layer. 
    1624 
    1725Installation 
    1826============ 
    1927 
     28cairo binding 
     29------------- 
     30 
    2031To install, simply copy the ``cairo`` directory to a place in your D 
    21 compiler's import path.  That's all there is to it.  Currently, there is no 
    22 automated support for building an import library, although this is planned 
    23 for a future release (ie: when I get around to it). 
     32compiler's import path.  That's all there is to it. 
     33 
     34If you really want to have import libraries to use, then you can build these 
     35using the ``cairo-build.d`` script, which will place them in the ``lib`` 
     36directory.  It can be run using either:: 
     37 
     38  dmd -run cairo-build.d ARGS 
     39 
     40Or, if that fails:: 
     41 
     42  build cairo-build.d 
     43  cairo-build ARGS 
     44 
     45The command line arguments may be empty (signifying a default build), or 
     46contain one or more targets to build.  You may also use the ``--verbose`` 
     47switch to get more verbose output, and the ``--debug`` switch to produce 
     48libraries with debug symbols [#debuglibs]_. 
     49 
     50Use the ``--help`` switch for full usage information. 
     51 
     52cairooo binding 
     53--------------- 
     54 
     55To install the cairooo binding, simply copy both the ``cairo`` and ``cairooo`` 
     56directories to a place on your D compiler's import path. 
     57 
     58If you want to build import libraries, then you can use the 
     59``cairooo-build.d`` script, which will build them to the ``lib`` directory. 
     60Usage is mostly the same as using ``cairo-build.d`` (see above). 
     61 
     62cairo snippets 
     63-------------- 
     64 
     65The ``cairo_snippets`` and ``cairooo_snippets`` directories contain the 
     66"snippets" example programs provided by the cairo developers ported to D. 
     67They use the ``cairo`` and ``cairooo`` bindings respectively. 
     68 
     69These do not have a "proper" build script like the binding itself: they are 
     70generally built with either a Windows batch file or shell script.  However, if 
     71you wish to build them manually, the command to do so usually looks like 
     72this:: 
     73 
     74  build -cleanup -release -inline -I.. NAME_OF_SNIPPET 
     75 
     76Just be sure to create the ``output`` directory if it does not exist first. 
     77 
     78cairooo tutorial 
     79---------------- 
     80 
     81The ``cairooo_tutorial`` contains the beginnings of a very simple introductory 
     82tutorial to programming image programs in D using the cairooo binding.  It is 
     83pathetically incomplete; however, it may be a useful starting point. 
     84 
     85demos 
     86----- 
     87 
     88The ``demos`` directory will contain a few small demo programs to showcase the 
     89binding.  Currently, it only has one demo, so the plural is prehaps 
     90misleading.  Hopefully this will change :) 
     91 
     92documentation 
     93------------- 
     94 
     95Whilst this project hopes to eventually have full DDoc documentation for the 
     96cairooo binding, we will not be providing anything other than minimal 
     97documentation for the raw cairo API binding.  The rationale is that since the 
     98original C api and the raw D api are for the most part identical, there is no 
     99need to duplicate the existing C documentation. 
     100 
     101That said, the cairooo documentation itself is woefully lacking.  What does 
     102exist can be built using the following command:: 
     103 
     104  build @build_docs_cairooo.brf 
     105 
     106Please note that you will need to create the following directory structure 
     107*first* if it does not yet exist:: 
     108 
     109  docs\ 
     110    cairooo\ 
     111      extra\ 
     112      glitz\ 
     113      png\ 
     114      win32\ 
     115      xlib\ 
    24116 
    25117cairo for Windows 
     
    47139===== 
    48140 
     141cairo 
     142----- 
     143 
    49144To use the binding, simply import ``cairo.cairo``, along with any other 
    50145parts of the library you need.  For example, if you wanted the base cairo 
     
    69164look in the ``cairo_snippets`` directory. 
    70165 
     166cairooo 
     167------- 
     168 
     169To use the cairooo binding instead, import ``cairooo.all``, along with any 
     170other parts of the library that you need.  To copy the above example, to 
     171import the base and PNG functions:: 
     172 
     173  import cairooo.all; 
     174  import cairooo.png.all; 
     175 
     176As with the raw binding, you need to tell the binding to load the cairo 
     177library before you can use it.  You can do that like so:: 
     178 
     179  Cairo.load(); 
     180  CairoPNG.load(); 
     181 
     182Again, if anything fails to load, an exception will be thrown. 
     183 
     184There are no huge, arbitrary differences between the flat C api and the 
     185object-oriented one.  The largest change is that anywhere you would pass a 
     186handle, you instead pass an object.  The naming translation is roughly:: 
     187 
     188  cairo_foo_bar_xxx_t* --> FooBarXXX 
     189 
     190An exception to this is the cairo context, ``cairo_t*``, which becomes 
     191``Context``. 
     192 
     193Also, the following differences should be kept in mind: 
     194 
     195* "lower_case_with_underscores" functions become "lowerCaseWithUnderscores". 
     196* "CAIRO_ENUM_TYPE_ENUM_NAME" becomes "EnumType.enumName". 
     197 
     198Finally, where there have been multiple ways of creating a certain kind of 
     199object (such as a Surface or Pattern), creating them is split between using 
     200constructors and static members.  This will get resolved eventually, but for 
     201the moment, which one to use is unclear. 
     202 
     203The general rule is that if you want to convert:: 
     204   
     205  xxx = cairo_some_object_create_foo(arg1, arg2, ...); 
     206 
     207You should try the following:: 
     208 
     209  xxx = new SomeObject(arg1, arg2, ...); 
     210  xxx = SomeObject.create(arg1, arg2, ...); 
     211  xxx = SomeObject.createFoo(arg1, arg2, ...); 
     212 
     213For more concrete examples, see the ``cairooo_snippets``, ``cairooo_tutorial`` 
     214and ``demos`` directories. 
     215 
    71216Contributing 
    72217============ 
    73218 
    74 The cairo api has a lot of functionality in it that this binding does not 
    75 yet cover: X11, PDF, PS and more.  However, the only binary version of cairo 
     219The cairo api has a functionality in it that this binding does not 
     220yet cover: PDF abd PS for example.  However, the only binary version of cairo 
    76221I have access to is limited to what is currently covered, and I have thus 
    77222far had no success in compiling cairo myself. 
     
    80225binding for some currently unsupported part of cairo.  You can look at the 
    81226PNG binding for a simple example. 
     227 
     228That, or you can write samples and demos to test the bindings that I can't. 
     229In addition to being fun, you get to make pretty pictures in the process! 
    82230 
    83231Thanks 
     
    104252.. _example snippets: http://cairographics.org/samples/ 
    105253 
     254.. Footnotes 
     255 
     256.. [#debuglibs] The debug libraries will have "_debug" appended to their 
     257                filename, so you do not need to worry about overwriting your 
     258                release libraries. 
     259 
     260 
  • trunk/cairo/cairo/cairo.d

    r97 r119  
    22 * cairo bindings for D. 
    33 *  
    4  * Copyright: \&copy; 2006 Daniel Keep 
    5  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     4 * Authors: Daniel Keep 
     5 * Copyright: 2006, Daniel Keep 
     6 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    67 */ 
    78/* 
    8  * Copyright (c) 2006 Daniel Keep 
     9 * Copyright © 2006 Daniel Keep 
    910 * All rights reserved. 
    1011 * 
     
    6263        cairo_load("libcairo-2.dll"); 
    6364    else version(linux) 
    64         cairo_load("libcairo-2.so"); 
     65        cairo_load("libcairo.so"); 
    6566    else 
    6667    { 
  • trunk/cairo/cairo/cairofuncs.d

    r98 r119  
    55 * This file is automatically generated; do not directly modify. 
    66 * 
    7  * Copyright: \&copy; 2006 Daniel Keep 
    8  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     7 * Authors: Daniel Keep 
     8 * Copyright: 2006, Daniel Keep 
     9 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    910 */ 
    1011/* 
    11  * Copyright (c) 2006 Daniel Keep 
     12 * Copyright © 2006 Daniel Keep 
    1213 * All rights reserved. 
    1314 * 
  • trunk/cairo/cairo/cairotypes.d

    r98 r119  
    33 * by cairo. 
    44 * 
    5  * Copyright: \&copy; 2006, Daniel Keep. 
    6  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     5 * Authors: Daniel Keep 
     6 * Copyright: 2006, Daniel Keep 
     7 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    78 */ 
    89/* 
    9  * Copyright (c) 2006 Daniel Keep 
     10 * Copyright © 2006 Daniel Keep 
    1011 * All rights reserved. 
    1112 * 
     
    8788} 
    8889 
    89 alias cairo_status_t function(void* closure, char* data, uint length) cairo_write_func_t; 
    90  
    91 alias cairo_status_t function(void* closure, char* data, uint length) cairo_read_func_t; 
     90alias cairo_status_t function(void* closure, ubyte* data, uint length) cairo_write_func_t; 
     91 
     92alias cairo_status_t function(void* closure, ubyte* data, uint length) cairo_read_func_t; 
    9293 
    9394enum cairo_operator_t 
  • trunk/cairo/cairo/loader.d

    r97 r119  
    44 * the Derelict project's loader.d file. 
    55 * 
    6  * Copyright: \&copy; 2005-2006, Derelict developers; 
    7  *            \&copy; 2006 Daniel Keep. 
    8  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     6 * Authors: Daniel Keep 
     7 * Copyright: 2005-2006, Derelict developers; 
     8 *            2006, Daniel Keep. 
     9 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    910 */ 
    1011/* 
    11  * Copyright (c) 2006 Daniel Keep 
     12 * Copyright © 2006 Daniel Keep 
    1213 * All rights reserved. 
    1314 * 
     
    99100} 
    100101 
    101 class SharedLibLoadException : Exception 
     102class CairoLoaderException : Exception 
     103
     104    this(char[] msg) 
     105    { 
     106        super(msg); 
     107    } 
     108
     109 
     110class SharedLibLoadException : CairoLoaderException 
    102111{ 
    103112    this(char[] libName) 
     
    108117} 
    109118 
    110 class ProcNotFoundException : Exception 
     119class ProcNotFoundException : CairoLoaderException 
    111120{ 
    112121    this(SharedLib lib, char[] procName) 
     
    255264else version(linux) 
    256265{ 
     266    version(build) 
     267    { 
     268        pragma(link, dl); 
     269    } 
     270    else 
     271    { 
     272        pragma(lib, "dl.a"); 
     273    } 
     274     
    257275    private import std.c.linux.linux; 
    258276 
  • trunk/cairo/cairo/png/cairo_png.d

    r97 r119  
    33 * cairo's PNG support. 
    44 * 
    5  * Copyright: \&copy; 2006 Daniel Keep 
    6  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     5 * Authors: Daniel Keep 
     6 * Copyright: 2006, Daniel Keep 
     7 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    78 */ 
    89/* 
    9  * Copyright (c) 2006 Daniel Keep 
     10 * Copyright © 2006 Daniel Keep 
    1011 * All rights reserved. 
    1112 * 
  • trunk/cairo/cairo/png/cairofuncs_png.d

    r97 r119  
    55 * This file is automatically generated; do not directly modify. 
    66 * 
    7  * Copyright: \&copy; 2006 Daniel Keep 
    8  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     7 * Authors: Daniel Keep 
     8 * Copyright: 2006, Daniel Keep 
     9 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    910 */ 
    1011/* 
    11  * Copyright (c) 2006 Daniel Keep 
     12 * Copyright © 2006 Daniel Keep 
    1213 * All rights reserved. 
    1314 * 
  • trunk/cairo/cairo/png/cairotypes_png.d

    r97 r119  
    33 * Currently, it just imports cairo.cairotypes. 
    44 * 
    5  * Copyright: \&copy; 2006 Daniel Keep 
    6  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     5 * Authors: Daniel Keep 
     6 * Copyright: 2006, Daniel Keep 
     7 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    78 */ 
    89/* 
    9  * Copyright (c) 2006 Daniel Keep 
     10 * Copyright © 2006 Daniel Keep 
    1011 * All rights reserved. 
    1112 * 
  • trunk/cairo/cairo/win32/cairo_win32.d

    r97 r119  
    55 * 
    66 * Also, it requires the win32 bindings, which can be found 
    7  * at <http://www.dsource.org/projects/bindings/>
     7 * at (http://www.dsource.org/projects/bindings/)
    88 * 
    9  * Copyright: \&copy; 2006 Daniel Keep 
    10  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     9 * Authors: Daniel Keep 
     10 * Copyright: 2006, Daniel Keep 
     11 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    1112 */ 
    1213/* 
    13  * Copyright (c) 2006 Daniel Keep 
     14 * Copyright © 2006 Daniel Keep 
    1415 * All rights reserved. 
    1516 * 
  • trunk/cairo/cairo/win32/cairofuncs_win32.d

    r97 r119  
    55 * This file is automatically generated; do not directly modify. 
    66 * 
    7  * Copyright: \&copy; 2006 Daniel Keep 
    8  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     7 * Authors: Daniel Keep 
     8 * Copyright: 2006, Daniel Keep 
     9 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    910 */ 
    1011/* 
    11  * Copyright (c) 2006 Daniel Keep 
     12 * Copyright © 2006 Daniel Keep 
    1213 * All rights reserved. 
    1314 * 
  • trunk/cairo/cairo/win32/cairotypes_win32.d

    r97 r119  
    55 * import :) 
    66 * 
    7  * Copyright: \&copy; 2006 Daniel Keep 
    8  * License: BSD <http://www.opensource.org/licenses/bsd-license.php> 
     7 * Authors: Daniel Keep 
     8 * Copyright: 2006, Daniel Keep 
     9 * License: BSD v2 (http://www.opensource.org/licenses/bsd-license.php). 
    910 */ 
    1011/* 
    11  * Copyright (c) 2006 Daniel Keep 
     12 * Copyright © 2006 Daniel Keep 
    1213 * All rights reserved. 
    1314 * 
  • trunk/cairo/cairo_snippets/cairo_snippets_png.d

    r97 r119  
    7676    cairo_set_line_width(cr, LINE_WIDTH); 
    7777 
     78    // Clear the background 
     79    cairo_rectangle(cr, 0, 0, 1, 1); 
     80    cairo_set_source_rgba(cr, 1, 1, 1, 0); 
     81    cairo_set_operator(cr, cairo_operator_t.CAIRO_OPERATOR_CLEAR); 
     82    cairo_fill(cr); 
     83 
     84    // Reset the context for the snippet 
     85    cairo_set_source_rgb(cr, 0, 0, 0); 
     86    cairo_set_operator(cr, cairo_operator_t.CAIRO_OPERATOR_OVER); 
     87 
    7888    // Call the snippet. 
    7989    cairo_save(cr); 
  • trunk/cairo/cairo_snippets/cairo_snippets_png_run.sh

    r97 r119  
    1 #1/usr/bin/bash 
     1#!/bin/bash 
    22 
    33if [ ! -d output ]; then