summaryrefslogtreecommitdiff
path: root/atari/gemtk
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-01-01 22:08:19 +0100
committerOle Loots <ole@monochrom.net>2013-01-01 22:08:19 +0100
commitc0e6cf65902f93bc2286c72e28d916341ec641a6 (patch)
tree4b60625e733639d49d631a6bfdde042cf66a27d5 /atari/gemtk
parentcecccf09edf7e7296e4765f7e70e4c42c5ad8805 (diff)
downloadnetsurf-c0e6cf65902f93bc2286c72e28d916341ec641a6.tar.gz
netsurf-c0e6cf65902f93bc2286c72e28d916341ec641a6.tar.bz2
Implemented caret redraw.
Diffstat (limited to 'atari/gemtk')
-rw-r--r--atari/gemtk/gemtk.h6
-rw-r--r--atari/gemtk/guiwin.c4
-rw-r--r--atari/gemtk/utils.c10
3 files changed, 18 insertions, 2 deletions
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index b70ec0621..ee4ebc0c0 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -33,6 +33,12 @@
extern unsigned short _systype_v;
unsigned short _systype (void);
+/*
+* Chech for GRECT intersection without modifiend the src rectangles
+* return true when the GRECT's intersect, fals otherwise.
+*/
+bool rc_intersect_ro(GRECT *a, GRECT *b);
+
#ifndef POINT_WITHIN
# define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \
&& (_y >= r.g_y) && (_y <= r.g_y + r.g_h))
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index f0bb7445d..2a3693b2d 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -26,8 +26,8 @@
#include <mt_gem.h>
#include "gemtk.h"
-#define DEBUG_PRINT(x) printf x
-//#define DEBUG_PRINT(x)
+//#define DEBUG_PRINT(x) printf x
+#define DEBUG_PRINT(x)
struct gui_window_s {
short handle;
diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c
index 82f74f965..d365aefb5 100644
--- a/atari/gemtk/utils.c
+++ b/atari/gemtk/utils.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <stdint.h>
+#include <stdbool.h>
#include <gem.h>
#include "gemtk.h"
@@ -38,3 +39,12 @@ unsigned short _systype (void)
return _systype_v;
}
+bool rc_intersect_ro(GRECT *a, GRECT *b)
+{
+ GRECT r1, r2;
+
+ r1 = *a;
+ r2 = *b;
+
+ return((bool)rc_intersect(&r1, &r2));
+}