~ubuntu-branches/ubuntu/quantal/libcm/quantal

« back to all changes in this revision

Viewing changes to src/node.h

  • Committer: Bazaar Package Importer
  • Author(s): Loic Minier, Josselin Mouette, Loic Minier
  • Date: 2008-05-26 14:43:19 UTC
  • mfrom: (3.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080526144319-ddwovigo7i925ewr
Tags: 0.1.1-4
[ Josselin Mouette ]
* Allow libgl-dev and libglu-dev as alternative dependencies for
  libcm-dev. Closes: #478887.

[ Loic Minier ]
* Don't copy config.guess/.sub after unpatch in clean; should avoid having
  them in the .diff.gz -- not needed as we always update them after patching
  anyway -- and should fix conversion to source format 3.0; closes: #482728.
* Stop shipping *.la files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* libcm - A library with a xlib wrapper and a gl based scene graph
 
2
 * Copyright (C) 2005, 2006  Red Hat, Inc.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the 
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA  02111-1307, USA.
 
18
 *
 
19
 * Author: Soren Sandmann (sandmann@redhat.com)
 
20
 */
1
21
#ifndef _RENDER_H
2
22
#define _RENDER_H
3
23
 
4
24
#include <glib.h>
5
25
#include <glib-object.h>
6
26
 
 
27
#include "ws.h"
 
28
 
 
29
#include <GL/gl.h>
 
30
 
7
31
/* A RenderNode will assume that it has a coordinate system
8
32
 * with properties such that
9
33
 *
88
112
#define CM_IS_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  CM_TYPE_NODE))
89
113
#define CM_NODE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  CM_TYPE_NODE, CmNodeClass))
90
114
 
 
115
typedef struct _CmState CmState;
91
116
typedef struct _CmNode CmNode;
92
117
typedef struct _CmNodeClass CmNodeClass;
93
118
typedef struct Extents Extents;
 
119
typedef struct _CmTexInfo CmTexInfo;
94
120
 
95
121
struct Extents
96
122
{
102
128
    double depth;
103
129
};
104
130
 
 
131
struct _CmTexInfo
 
132
{
 
133
    GLuint      texture;
 
134
 
 
135
    double      u1;
 
136
    double      v1;
 
137
    double      u2;     
 
138
    double      v2;
 
139
 
 
140
    int         x1;
 
141
    int         y1;
 
142
    int         x2;
 
143
    int         y2;
 
144
};
 
145
 
105
146
struct _CmNode
106
147
{
107
 
    GObject parent_instance;
 
148
    GObject      parent_instance;
108
149
 
109
 
    CmNode      *parent;
 
150
    GList       *parents;
110
151
};
111
152
 
112
153
struct _CmNodeClass
113
154
{
114
155
    GObjectClass parent_class;
115
156
 
116
 
    void (* render) (CmNode *node);
117
 
    void (* compute_extents) (CmNode    *node,
118
 
                              Extents *extents);
 
157
    void (* render) (CmNode *node,
 
158
                     CmState *state);
 
159
    void (* compute_extents) (CmNode      *node,
 
160
                              Extents     *extents);
 
161
    WsRegion * (* get_covered_region) (CmNode *node);
119
162
};
120
163
 
121
164
GType cm_node_get_type (void);
122
165
 
123
166
void cm_node_get_extents (CmNode    *node,
124
167
                       Extents *extents);
125
 
void cm_node_render (CmNode *node);
 
168
void cm_node_render (CmNode *node,
 
169
                     CmState *state);
126
170
void cm_node_queue_repaint (CmNode *node);
127
171
gdouble cm_node_get_time (CmNode *node);
128
 
void cm_node_render (CmNode *node);
129
172
void cm_node_own_child (CmNode *node,
130
173
                        CmNode **child_location,
131
174
                        CmNode *child);
132
175
void cm_node_disown_child (CmNode *node,
133
176
                           CmNode **child_location);
 
177
WsRegion *cm_node_get_covered_region (CmNode *node);
 
178
gboolean cm_node_is_toplevel (CmNode *node);
134
179
 
135
180
#endif /* _RENDER_H */