[go: up one dir, main page]

File: tilda.h

package info (click to toggle)
tilda 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,860 kB
  • ctags: 481
  • sloc: ansic: 5,730; makefile: 115; xml: 48; sh: 35
file content (56 lines) | stat: -rw-r--r-- 1,727 bytes parent folder | download
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
51
52
53
54
55
56
/*
 * This is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Library General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef TILDA_H
#define TILDA_H

#include "tilda_window.h"

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define TILDA_VERSION PACKAGE_NAME " " PACKAGE_VERSION
#define QUICK_STRCMP(a, b) (*(a)!=*(b)? \
    (int) ((unsigned char) *(a) - (unsigned char) *(b)) : \
    strcmp ((a), (b)))

struct lock_info
{
    gint pid;
    gint instance;
    gint file_descriptor;
};

#define GUINT16_TO_FLOAT(color) (color / (double) 0xFFFF)
#define GUINT16_FROM_FLOAT(value) ((int) (value * 0xFFFF + 0.5))

#define RGB(r,g,b) (r) / (gdouble)G_MAXUINT16, \
                     (g) / (gdouble)G_MAXUINT16, \
                     (b) / (gdouble)G_MAXUINT16, 1.

G_END_DECLS

#endif

/* Future compatibility with VTE-2.90 */
#ifndef VTE_290 
#define vte_terminal_set_colors_rgba vte_terminal_set_colors
#define vte_terminal_set_color_background_rgba vte_terminal_set_color_background
#define vte_terminal_set_color_foreground_rgba vte_terminal_set_color_foreground
#define vte_terminal_set_color_cursor_rgba vte_terminal_set_color_cursor
#define VteTerminalCursorShape VteCursorShape
#endif