File: gpredict-utils.h

package info (click to toggle)
gpredict 2.3-72-gc596101-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 12,264 kB
  • sloc: ansic: 39,918; makefile: 469; python: 143; sh: 85
file content (50 lines) | stat: -rw-r--r-- 1,974 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef GPREDICT_UTILS_H
#define GPREDICT_UTILS_H 1

#include <gtk/gtk.h>

#define M_TO_FT(x) (3.2808399*x)
#define FT_TO_M(x) (x/3.2808399)
#define KM_TO_MI(x) (x/1.609344)
#define MI_TO_KM(x) (1.609344*x)

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif


GtkWidget      *gpredict_hpixmap_button(const gchar * file,
                                        const gchar * text,
                                        const gchar * tooltip);

GtkWidget      *gpredict_vpixmap_button(const gchar * file,
                                        const gchar * text,
                                        const gchar * tooltip);

GtkWidget      *gpredict_hstock_button(const gchar * stock_id,
                                       const gchar * text,
                                       const gchar * tooltip);

GtkWidget      *gpredict_mini_mod_button(const gchar * pixmapfile,
                                         const gchar * tooltip);

void            gpredict_set_combo_tooltips(GtkWidget * combo, gpointer text);

gint            gpredict_file_copy(const gchar * in, const gchar * out);

void            rgba_from_cfg(guint cfg_rgba, GdkRGBA * gdk_rgba);
guint           rgba_to_cfg(const GdkRGBA * gdk_rgba);
void            rgb_from_cfg(guint cfg_rgb, GdkRGBA * gdk_rgba);
guint           rgb_to_cfg(const GdkRGBA * gdk_rgba);

void            rgb2gdk(guint rgb, GdkColor * color);
void            rgba2gdk(guint rgba, GdkColor * color, guint16 * alpha);
void            gdk2rgb(const GdkColor * color, guint * rgb);
void            gdk2rgba(const GdkColor * color, guint16 alpha, guint * rgba);
gchar          *rgba2html(guint rgba);
int             gpredict_strcmp(const char *s1, const char *s2);
char           *gpredict_strcasestr(const char *s1, const char *s2);
gboolean        gpredict_save_key_file(GKeyFile * cfgdata,
                                       const char *filename);
gboolean        gpredict_legal_char(int ch);
#endif