summaryrefslogtreecommitdiff
path: root/atari/gemtk/objc.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-01-07 20:04:44 +0100
committerOle Loots <ole@monochrom.net>2013-01-07 20:04:44 +0100
commit0bbccaa9359b3cedf9f37cd8e322edc90240a7bc (patch)
tree3161618fdbc1f716d8949c60605a1427f92451a2 /atari/gemtk/objc.c
parent5acf36b89ecda31515de975be85197e0a4395db7 (diff)
downloadnetsurf-0bbccaa9359b3cedf9f37cd8e322edc90240a7bc.tar.gz
netsurf-0bbccaa9359b3cedf9f37cd8e322edc90240a7bc.tar.bz2
Finally it compiles without WinDom - still some things to bring back:
- Serch window - Pop Menus in the settings dialog
Diffstat (limited to 'atari/gemtk/objc.c')
-rw-r--r--atari/gemtk/objc.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/atari/gemtk/objc.c b/atari/gemtk/objc.c
index 90c4d88ac..3bf8ebbe0 100644
--- a/atari/gemtk/objc.c
+++ b/atari/gemtk/objc.c
@@ -23,6 +23,31 @@
#include "gemtk.h"
+char *get_text(OBJECT * tree, short idx)
+{
+ static char p[]="";
+ USERBLK *user;
+ char *retval;
+
+ switch (tree[idx].ob_type & 0x00FF) {
+ case G_BUTTON:
+ case G_STRING:
+ case G_TITLE:
+ return( tree[idx].ob_spec.free_string);
+ case G_TEXT:
+ case G_BOXTEXT:
+ case G_FTEXT:
+ case G_FBOXTEXT:
+ return (tree[idx].ob_spec.tedinfo->te_ptext);
+ case G_ICON:
+ case G_CICON:
+ return (tree[idx].ob_spec.iconblk->ib_ptext);
+ break;
+
+ default: break;
+ }
+ return (p);
+}
OBJECT *get_tree(int idx)
{
@@ -56,3 +81,26 @@ GRECT * obj_screen_rect(OBJECT * tree, short obj)
return(&obj_screen);
}
+
+
+void obj_mouse_sprite(OBJECT *tree, int index)
+{
+ MFORM mform;
+ int dum;
+
+ if ((tree[index].ob_type & 0xFF) != G_ICON)
+ return;
+
+ dum = tree[index].ob_spec.iconblk->ib_char;
+ mform . mf_nplanes = 1;
+ mform . mf_fg = (dum>>8)&0x0F;
+ mform . mf_bg = dum>>12;
+ mform . mf_xhot = 0; /* to prevent the mform to "jump" on the */
+ mform . mf_yhot = 0; /* screen (zebulon rules!) */
+
+ for( dum = 0; dum<16; dum ++) {
+ mform . mf_mask[dum] = tree[index].ob_spec.iconblk->ib_pmask[dum];
+ mform . mf_data[dum] = tree[index].ob_spec.iconblk->ib_pdata[dum];
+ }
+ graf_mouse(USER_DEF, &mform);
+}