Debian Codegraph @

lib/common/colorprocs.h

raw
1 /// @file
2 /// @ingroup common_utils
3 /*************************************************************************
4 * Copyright (c) 2011 AT&T Intellectual Property
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * which accompanies this distribution, and is available at
8 * https://www.eclipse.org/legal/epl-v10.html
9 *
10 * Contributors: Details at https://graphviz.org
11 *************************************************************************/
12
13 #pragma once
14
15 #include "config.h"
16
17 #include "color.h"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 #ifdef GVDLL
24 #ifdef GVC_EXPORTS
25 #define COLORPROCS_API __declspec(dllexport)
26 #else
27 #define COLORPROCS_API __declspec(dllimport)
28 #endif
29 #endif
30
31 #ifndef COLORPROCS_API
32 #define COLORPROCS_API /* nothing */
33 #endif
34
35 /// set current color scheme for resolving names
36 ///
37 /// Callers should eventually free the returned pointer from this function.
38 ///
39 /// @param s Color scheme to set
40 /// @return Previous color scheme
41 COLORPROCS_API char *setColorScheme(const char *s);
42
43 COLORPROCS_API int colorxlate(const char *str, gvcolor_t *color,
44 color_type_t target_type);
45
46 #undef COLORPROCS_API
47
48 #ifdef __cplusplus
49 }
50 #endif