projects
/
demo_prior
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dbg gui, imtk text drawing
[demo_prior]
/
src
/
imtk
/
layout.c
diff --git
a/src/imtk/layout.c
b/src/imtk/layout.c
index
098bf53
..
6bc9fe7
100644
(file)
--- a/
src/imtk/layout.c
+++ b/
src/imtk/layout.c
@@
-99,3
+99,14
@@
void imtk_layout_get_bounds(int *bbox)
{
memcpy(bbox, st[top].box, sizeof st[top].box);
}
{
memcpy(bbox, st[top].box, sizeof st[top].box);
}
+
+int imtk_layout_contains(int x, int y)
+{
+ if(x < st[top].box[0] || x >= st[top].box[0] + st[top].box[2]) {
+ return 0;
+ }
+ if(y < st[top].box[1] || y >= st[top].box[1] + st[top].box[3]) {
+ return 0;
+ }
+ return 1;
+}