/*
  Copyright (c) 2007-2008 Gordon Gremme <gordon@gremme.org>
  Copyright (c) 2007-2008 Center for Bioinformatics, University of Hamburg

  Permission to use, copy, modify, and distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
  copyright notice and this permission notice appear in all copies.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef DIAGRAM_LUA_H
#define DIAGRAM_LUA_H

#include "lua.h"

/* exports the Diagram class to Lua:

   -- Return a diagram object which contains the genome nodes given in
   -- <feature_index> in the given <range> of the sequence region with sequence
   -- ID <seqid>.
   function diagram_new(feature_index, range, seqid)

   -- Return a diagram object which contains the genome nodes given in
   -- <array>. The range from <startpos> to <endpos> determines the visible
   -- region and should include the nodes in <array>.
   function diagram_new_from_array(array, startpos, endpos)
*/
int gt_lua_open_diagram(lua_State*);

#define DIAGRAM_METATABLE  "GenomeTools.diagram"
#define check_diagram(L, POS) \
              (GtDiagram**) luaL_checkudata(L, POS, DIAGRAM_METATABLE)

#endif
