1 /* 2 * This is free software; you can redistribute it and/or modify it under 3 * the terms of the GNU Library General Public License as published by 4 * the Free Software Foundation; either version 2 of the License, or 5 * (at your option) any later version. 6 * 7 * This program is distributed in the hope that it will be useful, but 8 * WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 * General Public License for more details. 11 * 12 * You should have received a copy of the GNU Library General Public 13 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 14 */ 15 16 #ifndef TILDA_H 17 #define TILDA_H 18 19 #include <gtk/gtk.h> 20 21 G_BEGIN_DECLS 22 23 #define TILDA_VERSION PACKAGE_NAME " " PACKAGE_VERSION 24 25 struct lock_info 26 { 27 gint pid; 28 gint instance; 29 gint file_descriptor; 30 }; 31 32 #define GUINT16_TO_FLOAT(color) ((color) / (double) 0xFFFF) 33 #define GUINT16_FROM_FLOAT(value) ((int) ((value) * 0xFFFF + 0.5)) 34 35 #define RGB(r,g,b) (r) / (gdouble)G_MAXUINT16, \ 36 (g) / (gdouble)G_MAXUINT16, \ 37 (b) / (gdouble)G_MAXUINT16, 1. 38 39 G_END_DECLS 40 41 #endif 42