d25d58eaeb9ffbbec0780e7464684844445b9775
[jabaws.git] / binaries / src / ViennaRNA / RNAforester / g2-0.70 / src / g2_physical_device.h
1 /*****************************************************************************
2 **  Copyright (C) 1998-2001  Ljubomir Milanovic & Horst Wagner
3 **  This file is part of the g2 library
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18 ******************************************************************************/
19 #ifndef _G2_PHYSICAL_DEVICE_H
20 #define _G2_PHYSICAL_DEVICE_H
21
22 #include "g2.h"
23 #include "g2_funix.h"
24
25
26 typedef enum _g2_coor {               /* coord. type */
27     g2_IntCoor, g2_DoubleCoor
28 } g2_coor;
29
30
31 typedef struct _g2_funix_fun {        /* funix--function paar */
32     g2_funix  fx;                     /* function index */
33     int       (*fun)();               /* pointer to function */
34 } g2_funix_fun;
35
36
37 typedef struct _g2_physical_device {
38     int           pid;                /* physical device id */
39     void          *pdp;               /* pointer to something in phys. dev. */
40     g2_coor       coor_type;          /* coordinate type */
41     g2_funix_fun  *ff;                /* list of funix-function pairs */
42     double        a11, a22;           /* coordinate transformation (ud->pd) */
43     double        b1,  b2;            /*  Ar + B */
44
45     double        x_origin;           /* User coordinates specification */
46     double        y_origin;
47     double        x_mul;
48     double        y_mul;
49 } g2_physical_device;
50
51
52
53 g2_physical_device *g2_create_physical_device(int pid,
54                                               void *pdp,
55                                               g2_coor ct,
56                                               const g2_funix_fun *ff,
57                                               double a11, double a22,
58                                               double b1,  double b2);
59 void g2_destroy_physical_device(g2_physical_device *pd);
60
61 #endif /* _G2_PHYSICAL_DEVICE_H */