From 9896e7a7da34e393b5ed2920c7406731382cf508 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 31 May 2011 19:21:32 -0400 Subject: Rename typedefs.h -> common.h. --- src/client.h | 2 +- src/common.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/display.c | 2 +- src/display.h | 2 +- src/track.c | 2 +- src/typedefs.h | 45 --------------------------------------------- src/xen_linpicker.h | 2 +- 7 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 src/common.h delete mode 100644 src/typedefs.h (limited to 'src') diff --git a/src/client.h b/src/client.h index eed9bae..7dee5e3 100644 --- a/src/client.h +++ b/src/client.h @@ -18,7 +18,7 @@ #ifndef _NITPICKER_CLIENT_H_ #define _NITPICKER_CLIENT_H_ -#include "typedefs.h" +#include "common.h" #include "buffer.h" #include "view.h" diff --git a/src/common.h b/src/common.h new file mode 100644 index 0000000..c2b82ce --- /dev/null +++ b/src/common.h @@ -0,0 +1,45 @@ +#ifndef _TYPEDEFS_H_ +#define _TYPEDEFS_H_ + +/* Vchan/Xenstore parameters */ +#define LINPICKER_TOKEN "@i" +#define LINPICKER_VPORT 6000 + +/* Security label dimensions */ +#define FONT_FILE PKGDATADIR "/decker.ttf" +#define BFONT_HEIGHT 18 +#define SFONT_HEIGHT 14 +#define SECLABEL_HEIGHT (BFONT_HEIGHT + 6) +#define MOUSELABEL_HEIGHT (SFONT_HEIGHT + 8) +#define MOUSELABEL_WIDTH MOUSELABEL_HEIGHT +#define MOUSELABEL_OFFSET 0 +#define MAX_THUMBS 5 +#define THUMB_SCALE 6 +#define THUMB_PAD 25 +#define BORDER_WIDTH 2 +#define CURSOR_WIDTH 10 + +/* General defines */ +#define NITPICKER_OK 0 +#define NITPICKER_ERR_ILLEGAL_ID -11 +#define NITPICKER_ERR_OUT_OF_MEM -12 +#define NITPICKER_ERR_OUT_OF_CLIENTS -13 +#define NITPICKER_ERR_OUT_OF_BUFS -14 +#define NITPICKER_ERR_OUT_OF_VIEWS -15 +#define NITPICKER_ERR_NO_BUFFER -16 + +#define STATE_FREE 0 +#define STATE_ALLOCATED 1 + +/* Utility macros */ +#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a)) + +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +#endif diff --git a/src/display.c b/src/display.c index 85bc3c2..76d2d80 100644 --- a/src/display.c +++ b/src/display.c @@ -12,7 +12,7 @@ #include #include -#include "typedefs.h" +#include "common.h" #include "view.h" #include "client.h" #include "display.h" diff --git a/src/display.h b/src/display.h index d132b54..a3d5ec4 100644 --- a/src/display.h +++ b/src/display.h @@ -19,7 +19,7 @@ #include -#include "typedefs.h" +#include "common.h" #include "view.h" #include "buffer.h" #include "client.h" diff --git a/src/track.c b/src/track.c index b831665..60737b9 100644 --- a/src/track.c +++ b/src/track.c @@ -32,7 +32,7 @@ #include #include "libvchan.h" -#include "typedefs.h" +#include "common.h" #include "comm-structs.h" diff --git a/src/typedefs.h b/src/typedefs.h deleted file mode 100644 index c2b82ce..0000000 --- a/src/typedefs.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _TYPEDEFS_H_ -#define _TYPEDEFS_H_ - -/* Vchan/Xenstore parameters */ -#define LINPICKER_TOKEN "@i" -#define LINPICKER_VPORT 6000 - -/* Security label dimensions */ -#define FONT_FILE PKGDATADIR "/decker.ttf" -#define BFONT_HEIGHT 18 -#define SFONT_HEIGHT 14 -#define SECLABEL_HEIGHT (BFONT_HEIGHT + 6) -#define MOUSELABEL_HEIGHT (SFONT_HEIGHT + 8) -#define MOUSELABEL_WIDTH MOUSELABEL_HEIGHT -#define MOUSELABEL_OFFSET 0 -#define MAX_THUMBS 5 -#define THUMB_SCALE 6 -#define THUMB_PAD 25 -#define BORDER_WIDTH 2 -#define CURSOR_WIDTH 10 - -/* General defines */ -#define NITPICKER_OK 0 -#define NITPICKER_ERR_ILLEGAL_ID -11 -#define NITPICKER_ERR_OUT_OF_MEM -12 -#define NITPICKER_ERR_OUT_OF_CLIENTS -13 -#define NITPICKER_ERR_OUT_OF_BUFS -14 -#define NITPICKER_ERR_OUT_OF_VIEWS -15 -#define NITPICKER_ERR_NO_BUFFER -16 - -#define STATE_FREE 0 -#define STATE_ALLOCATED 1 - -/* Utility macros */ -#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a)) - -#ifndef MAX -#define MAX(a,b) ((a)>(b)?(a):(b)) -#endif - -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif - -#endif diff --git a/src/xen_linpicker.h b/src/xen_linpicker.h index 1b643f2..701ad4c 100644 --- a/src/xen_linpicker.h +++ b/src/xen_linpicker.h @@ -3,7 +3,7 @@ #include -#include "typedefs.h" +#include "common.h" #include "xen_backend.h" #include "server.h" #include "buffer.h" -- cgit v1.2.3