Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
cr-num.h
Go to the documentation of this file.
1/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
2
3/*
4 * This file is part of The Croco Library
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2.1 of the GNU Lesser General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program 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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
19 *
20 * Author: Dodji Seketeli
21 * See COPYRIGHTS file for copyright information
22 */
23
24
31#ifndef __CR_NUM_H__
32#define __CR_NUM_H__
33
34#include <glib.h>
35#include "cr-utils.h"
36#include "cr-parsing-location.h"
37
38G_BEGIN_DECLS
39
78
79
84typedef struct _CRNum CRNum ;
85
90struct _CRNum
91{
93 gdouble val ;
95} ;
96
97CRNum *
98cr_num_new (void) ;
99
100CRNum *
101cr_num_new_with_val (gdouble a_val,
102 enum CRNumType a_type) ;
103
104CRNum *
105cr_num_dup (CRNum const *a_this) ;
106
107guchar *
108cr_num_to_string (CRNum const *a_this) ;
109
110enum CRStatus
111cr_num_copy (CRNum *a_dest, CRNum const *a_src) ;
112
113enum CRStatus
114cr_num_set (CRNum *a_this, gdouble a_val,
115 enum CRNumType a_type) ;
116
117gboolean
119
120void
122
123
124G_END_DECLS
125
126
127#endif /*__CR_NUM_H__*/
enum CRStatus cr_num_set(CRNum *a_this, gdouble a_val, enum CRNumType a_type)
CRNum * cr_num_new_with_val(gdouble a_val, enum CRNumType a_type)
void cr_num_destroy(CRNum *a_this)
enum CRStatus cr_num_copy(CRNum *a_dest, CRNum const *a_src)
gboolean cr_num_is_fixed_length(CRNum const *a_this)
CRNum * cr_num_dup(CRNum const *a_this)
CRNum * cr_num_new(void)
guchar * cr_num_to_string(CRNum const *a_this)
CRNumType
The different types of numbers.
Definition cr-num.h:55
@ NUM_LENGTH_PC
Definition cr-num.h:65
@ NUM_FREQ_HZ
Definition cr-num.h:71
@ NUM_LENGTH_EM
Definition cr-num.h:58
@ NUM_GENERIC
Definition cr-num.h:57
@ NUM_TIME_MS
Definition cr-num.h:69
@ NUM_LENGTH_MM
Definition cr-num.h:63
@ NUM_LENGTH_PT
Definition cr-num.h:64
@ NUM_LENGTH_CM
Definition cr-num.h:62
@ NUM_TIME_S
Definition cr-num.h:70
@ NUM_LENGTH_IN
Definition cr-num.h:61
@ NUM_LENGTH_PX
Definition cr-num.h:60
@ NUM_LENGTH_EX
Definition cr-num.h:59
@ NUM_FREQ_KHZ
Definition cr-num.h:72
@ NUM_INHERIT
Definition cr-num.h:74
@ NUM_AUTO
Definition cr-num.h:56
@ NUM_ANGLE_DEG
Definition cr-num.h:66
@ NUM_PERCENTAGE
Definition cr-num.h:73
@ NUM_ANGLE_GRAD
Definition cr-num.h:68
@ NUM_ANGLE_RAD
Definition cr-num.h:67
@ NB_NUM_TYPE
Definition cr-num.h:76
@ NUM_UNKNOWN_TYPE
Definition cr-num.h:75
The declaration of the CRParsingLocation object.
The Croco library basic types definitions And global definitions.
CRStatus
The status type returned by the methods of the croco library.
Definition cr-utils.h:42
An abstraction of a number (num) as defined in the css2 spec.
Definition cr-num.h:91
enum CRNumType type
Definition cr-num.h:92
CRParsingLocation location
Definition cr-num.h:94
gdouble val
Definition cr-num.h:93