Debian Codegraph @

gtk/print/gtkprintutils.c

raw symbols SCIP
1 /* GTK - The GIMP Toolkit
2 * gtkpapersize.c: Paper Size
3 * Copyright (C) 2006, Red Hat, Inc.
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 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, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "config.h"cxx . . $ `<file>/build/config.h`/
20 #include "gtkprintutilsprivate.h"cxx . . $ `<file>/gtk/print/gtkprintutilsprivate.h`/
21
22 double
23 _gtk_print_convert_to_mmcxx . . $ _gtk_print_convert_to_mm(22115c009b206bef). (double len,
24 GtkUnitcxx . . $ GtkUnit# unit)
25 {
26 switch (unit)
27 {
28 case GTK_UNIT_MMcxx . . $ GTK_UNIT_MM.:
29 return len;
30 case GTK_UNIT_INCHcxx . . $ GTK_UNIT_INCH.:
31 return len * MM_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:26:9`!;
32 case GTK_UNIT_NONEcxx . . $ GTK_UNIT_NONE.:
33 default:
34 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Unsupported unit");
35 G_GNUC_FALLTHROUGHcxx . . $ `<external>/12741050725406041920/gmacros.h:689:9`!;
36 case GTK_UNIT_POINTScxx . . $ GTK_UNIT_POINTS.:
37 return len * (MM_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:26:9`! / POINTS_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:27:9`!);
38 break;
39 }
40 }
41
42 double
43 _gtk_print_convert_from_mmcxx . . $ _gtk_print_convert_from_mm(22115c009b206bef). (double len,
44 GtkUnitcxx . . $ GtkUnit# unit)
45 {
46 switch (unit)
47 {
48 case GTK_UNIT_MMcxx . . $ GTK_UNIT_MM.:
49 return len;
50 case GTK_UNIT_INCHcxx . . $ GTK_UNIT_INCH.:
51 return len / MM_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:26:9`!;
52 case GTK_UNIT_NONEcxx . . $ GTK_UNIT_NONE.:
53 default:
54 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Unsupported unit");
55 G_GNUC_FALLTHROUGHcxx . . $ `<external>/12741050725406041920/gmacros.h:689:9`!;
56 case GTK_UNIT_POINTScxx . . $ GTK_UNIT_POINTS.:
57 return len / (MM_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:26:9`! / POINTS_PER_INCHcxx . . $ `gtk/print/gtkprintutilsprivate.h:27:9`!);
58 break;
59 }
60 }