summaryrefslogtreecommitdiff
path: root/atari/gemtk/objc.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-12-31 03:37:43 +0100
committerOle Loots <ole@monochrom.net>2012-12-31 03:37:43 +0100
commit695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9 (patch)
tree4a95965fa12b7e5d2029e6a36e22774c2892b7d5 /atari/gemtk/objc.c
parentf0f57e34314b1a2e3327ab0ae65ec840efa3ee3a (diff)
downloadnetsurf-695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9.tar.gz
netsurf-695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9.tar.bz2
Moved form handling into gemtk,
removed several windom includes
Diffstat (limited to 'atari/gemtk/objc.c')
-rw-r--r--atari/gemtk/objc.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/atari/gemtk/objc.c b/atari/gemtk/objc.c
new file mode 100644
index 000000000..90c4d88ac
--- /dev/null
+++ b/atari/gemtk/objc.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2013 Ole Loots <ole@monochrom.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf 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 General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Module Description:
+ *
+ * AES Object tree tools.
+ *
+ */
+
+ #include "gemtk.h"
+
+
+OBJECT *get_tree(int idx)
+{
+
+ OBJECT *tree;
+
+ rsrc_gaddr(R_TREE, idx, &tree);
+
+ return tree;
+}
+
+bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
+{
+ GRECT obj_screen;
+ bool ret = false;
+
+ objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
+ obj_screen.g_w = tree[obj].ob_width;
+ obj_screen.g_h = tree[obj].ob_height;
+
+ ret = RC_WITHIN(&obj_screen, area);
+
+ return(ret);
+}
+
+GRECT * obj_screen_rect(OBJECT * tree, short obj)
+{
+ static GRECT obj_screen;
+
+ get_objframe(tree, obj, &obj_screen);
+
+ return(&obj_screen);
+}