Enlightenment CVS committal
Author : turran
Project : e17
Module : proto/enesim
Dir : e17/proto/enesim/src/lib
Modified Files:
enesim_private.h
Added Files:
.cvsignore
Log Message:
- Add ignore files
- Clean up several warnings (thanks caro)
===================================================================
RCS file: /cvs/e/e17/proto/enesim/src/lib/enesim_private.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- enesim_private.h 12 Oct 2007 11:04:52 -0000 1.1
+++ enesim_private.h 14 Oct 2007 17:49:28 -0000 1.2
@@ -7,6 +7,7 @@
*/
#include <assert.h>
+#include <stdlib.h>
#include "Edata.h"
/* FIXME move the above to other place */
@@ -18,9 +19,49 @@
int h;
} Enesim_Rectangle;
+/**
+ * To be documented
+ * FIXME: To be fixed
+ */
static inline int enesim_rectangle_is_empty(Enesim_Rectangle *r)
{
return ((r->w < 1) || (r->h < 1));
+}
+/**
+ * To be documented
+ * FIXME: To be fixed
+ */
+static inline int enesim_spans_common(int c1, int l1, int c2, int l2)
+{
+ return (!(((c2 + l2) <= c1) || (c2 >= (c1 + l1))));
+}
+/**
+ * To be documented
+ * FIXME: To be fixed
+ */
+static inline int enesim_rects_intersect(int x, int y, int w, int h, int xx,
+ int yy, int ww, int hh)
+{
+ return (enesim_spans_common(x, w, xx, ww) && enesim_spans_common(y, h,
yy, hh));
+}
+/**
+ * To be documented
+ * FIXME: To be fixed
+ */
+static inline int enesim_hline_cut(int x, int *w, int *rx, int *rw, int cx)
+{
+
+ if ((x <= cx) && (x + *w > cx))
+ {
+ int x2;
+
+ x2 = x + *w;
+ *w = cx - x;
+ *rx = cx;
+ *rw = x2 - cx;
+ return 1;
+ }
+ return 0;
}
/** @} */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs