libcss
Loading...
Searching...
No Matches
src
select
helpers.h
Go to the documentation of this file.
1
/*
2
* This file is part of LibCSS
3
* Licensed under the MIT License,
4
* http://www.opensource.org/licenses/mit-license.php
5
* Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
6
*/
7
8
#ifndef css_select_helpers_h_
9
#define css_select_helpers_h_
10
14
static
inline
css_unit
css__to_css_unit(uint32_t u)
15
{
16
switch
(u) {
17
case
UNIT_PX
:
return
CSS_UNIT_PX
;
18
case
UNIT_EX
:
return
CSS_UNIT_EX
;
19
case
UNIT_EM
:
return
CSS_UNIT_EM
;
20
case
UNIT_IN
:
return
CSS_UNIT_IN
;
21
case
UNIT_CM
:
return
CSS_UNIT_CM
;
22
case
UNIT_MM
:
return
CSS_UNIT_MM
;
23
case
UNIT_PT
:
return
CSS_UNIT_PT
;
24
case
UNIT_PC
:
return
CSS_UNIT_PC
;
25
case
UNIT_CH
:
return
CSS_UNIT_CH
;
26
case
UNIT_REM
:
return
CSS_UNIT_REM
;
27
case
UNIT_LH
:
return
CSS_UNIT_LH
;
28
case
UNIT_VH
:
return
CSS_UNIT_VH
;
29
case
UNIT_VW
:
return
CSS_UNIT_VW
;
30
case
UNIT_VI
:
return
CSS_UNIT_VI
;
31
case
UNIT_VB
:
return
CSS_UNIT_VB
;
32
case
UNIT_VMIN
:
return
CSS_UNIT_VMIN
;
33
case
UNIT_VMAX
:
return
CSS_UNIT_VMAX
;
34
case
UNIT_Q
:
return
CSS_UNIT_Q
;
35
case
UNIT_PCT
:
return
CSS_UNIT_PCT
;
36
case
UNIT_DEG
:
return
CSS_UNIT_DEG
;
37
case
UNIT_GRAD
:
return
CSS_UNIT_GRAD
;
38
case
UNIT_RAD
:
return
CSS_UNIT_RAD
;
39
case
UNIT_MS
:
return
CSS_UNIT_MS
;
40
case
UNIT_S
:
return
CSS_UNIT_S
;
41
case
UNIT_HZ
:
return
CSS_UNIT_HZ
;
42
case
UNIT_KHZ
:
return
CSS_UNIT_KHZ
;
43
}
44
45
return
0;
46
}
47
48
#endif
UNIT_VW
@ UNIT_VW
Definition
bytecode.h:63
UNIT_CH
@ UNIT_CH
Definition
bytecode.h:59
UNIT_GRAD
@ UNIT_GRAD
Definition
bytecode.h:74
UNIT_PCT
@ UNIT_PCT
Definition
bytecode.h:70
UNIT_PT
@ UNIT_PT
Definition
bytecode.h:57
UNIT_Q
@ UNIT_Q
Definition
bytecode.h:68
UNIT_VB
@ UNIT_VB
Definition
bytecode.h:65
UNIT_KHZ
@ UNIT_KHZ
Definition
bytecode.h:84
UNIT_VMIN
@ UNIT_VMIN
Definition
bytecode.h:66
UNIT_S
@ UNIT_S
Definition
bytecode.h:80
UNIT_CM
@ UNIT_CM
Definition
bytecode.h:55
UNIT_REM
@ UNIT_REM
Definition
bytecode.h:60
UNIT_IN
@ UNIT_IN
Definition
bytecode.h:54
UNIT_EX
@ UNIT_EX
Definition
bytecode.h:52
UNIT_MM
@ UNIT_MM
Definition
bytecode.h:56
UNIT_HZ
@ UNIT_HZ
Definition
bytecode.h:83
UNIT_VMAX
@ UNIT_VMAX
Definition
bytecode.h:67
UNIT_DEG
@ UNIT_DEG
Definition
bytecode.h:73
UNIT_PC
@ UNIT_PC
Definition
bytecode.h:58
UNIT_EM
@ UNIT_EM
Definition
bytecode.h:53
UNIT_PX
@ UNIT_PX
Definition
bytecode.h:51
UNIT_VI
@ UNIT_VI
Definition
bytecode.h:64
UNIT_RAD
@ UNIT_RAD
Definition
bytecode.h:75
UNIT_LH
@ UNIT_LH
Definition
bytecode.h:61
UNIT_VH
@ UNIT_VH
Definition
bytecode.h:62
UNIT_MS
@ UNIT_MS
Definition
bytecode.h:79
css_unit
css_unit
Definition
types.h:82
CSS_UNIT_HZ
@ CSS_UNIT_HZ
Definition
types.h:111
CSS_UNIT_PX
@ CSS_UNIT_PX
Definition
types.h:83
CSS_UNIT_LH
@ CSS_UNIT_LH
Definition
types.h:93
CSS_UNIT_VMIN
@ CSS_UNIT_VMIN
Definition
types.h:98
CSS_UNIT_Q
@ CSS_UNIT_Q
Definition
types.h:100
CSS_UNIT_VMAX
@ CSS_UNIT_VMAX
Definition
types.h:99
CSS_UNIT_MM
@ CSS_UNIT_MM
Definition
types.h:88
CSS_UNIT_EM
@ CSS_UNIT_EM
Definition
types.h:85
CSS_UNIT_PCT
@ CSS_UNIT_PCT
Definition
types.h:102
CSS_UNIT_VI
@ CSS_UNIT_VI
Definition
types.h:96
CSS_UNIT_MS
@ CSS_UNIT_MS
Definition
types.h:108
CSS_UNIT_KHZ
@ CSS_UNIT_KHZ
Definition
types.h:112
CSS_UNIT_CM
@ CSS_UNIT_CM
Definition
types.h:87
CSS_UNIT_IN
@ CSS_UNIT_IN
Definition
types.h:86
CSS_UNIT_REM
@ CSS_UNIT_REM
Definition
types.h:92
CSS_UNIT_RAD
@ CSS_UNIT_RAD
Definition
types.h:106
CSS_UNIT_EX
@ CSS_UNIT_EX
Definition
types.h:84
CSS_UNIT_PT
@ CSS_UNIT_PT
Definition
types.h:89
CSS_UNIT_PC
@ CSS_UNIT_PC
Definition
types.h:90
CSS_UNIT_GRAD
@ CSS_UNIT_GRAD
Definition
types.h:105
CSS_UNIT_CH
@ CSS_UNIT_CH
Definition
types.h:91
CSS_UNIT_DEG
@ CSS_UNIT_DEG
Definition
types.h:104
CSS_UNIT_S
@ CSS_UNIT_S
Definition
types.h:109
CSS_UNIT_VW
@ CSS_UNIT_VW
Definition
types.h:95
CSS_UNIT_VH
@ CSS_UNIT_VH
Definition
types.h:94
CSS_UNIT_VB
@ CSS_UNIT_VB
Definition
types.h:97
Generated on Fri Dec 12 2025 12:50:39 for libcss by
1.9.8