From 5bff3e3287501d494536b074a5c540c5be2e94bd Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 20 Dec 2008 10:54:59 +0000 Subject: Update for new SDK svn path=/trunk/netsurf/; revision=5915 --- amiga/compat.h | 22 +++++++++++++++++++++- amiga/gui.c | 13 +++++++------ amiga/gui.h | 10 ---------- amiga/schedule.c | 16 ++++++++-------- amiga/schedule.h | 6 +++--- 5 files changed, 39 insertions(+), 28 deletions(-) (limited to 'amiga') diff --git a/amiga/compat.h b/amiga/compat.h index ff418e161..c0064e11e 100755 --- a/amiga/compat.h +++ b/amiga/compat.h @@ -19,9 +19,29 @@ #ifndef AMIGA_COMPAT_H #define AMIGA_COMPAT_H //#include -#include #include +/* for termios.h compatiblity */ +typedef unsigned int tcflag_t; +typedef unsigned char cc_t; +typedef unsigned int speed_t; + +#define NCCS 16 + +struct termios { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_cc[NCCS]; + /* Private */ + speed_t c_ispeed; + speed_t c_ospeed; + int type; + unsigned int flags; +}; +/**/ + extern gid_t getegid(void); extern uid_t geteuid(void); extern uid_t getuid(void); diff --git a/amiga/gui.c b/amiga/gui.c index c52ea7490..dac6f8d25 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -188,15 +188,15 @@ void gui_init(int argc, char** argv) ASO_NoTrack,FALSE, TAG_DONE); - tioreq= (struct timerequest *)AllocSysObjectTags(ASOT_IOREQUEST, - ASOIOR_Size,sizeof(struct timerequest), + tioreq= (struct TimeRequest *)AllocSysObjectTags(ASOT_IOREQUEST, + ASOIOR_Size,sizeof(struct TimeRequest), ASOIOR_ReplyPort,msgport, ASO_NoTrack,FALSE, TAG_DONE); OpenDevice("timer.device",UNIT_WAITUNTIL,(struct IORequest *)tioreq,0); - TimerBase = (struct Device *)tioreq->tr_node.io_Device; + TimerBase = (struct Device *)tioreq->Request.io_Device; ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase,"main",1,NULL); if(!(appport = AllocSysObjectTags(ASOT_PORT, @@ -2308,9 +2308,9 @@ void ami_init_mouse_pointers(void) POINTERA_WordWidth, (width + 15) / 16, POINTERA_XResolution, POINTERXRESN_SCREENRES, POINTERA_YResolution, POINTERYRESN_SCREENRESASPECT, - POINTERA_Dummy + 0x07, data, - POINTERA_Dummy + 0x08, width, - POINTERA_Dummy + 0x09, height, + POINTERA_ImageData, data, + POINTERA_Width, width, + POINTERA_Height, height, TAG_DONE); } } @@ -2656,6 +2656,7 @@ void gui_create_form_select_menu(struct browser_window *bw, void gui_launch_url(const char *url) { + printf("%s\n",url); } void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg) diff --git a/amiga/gui.h b/amiga/gui.h index 3793587d0..d2c12e96d 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -25,16 +25,6 @@ #include #include "desktop/gui.h" -/* temp icon.library stuff */ -#define ICONCTRLA_SetImageDataFormat (ICONA_Dummy + 0x67) /*103*/ -#define ICONCTRLA_GetImageDataFormat (ICONA_Dummy + 0x68) /*104*/ - -/* Values for ICONCTRLA_Set/GetImageDataFormat */ -#define IDFMT_BITMAPPED (0) /* Bitmapped icon (planar, legacy) */ -#define IDFMT_PALETTEMAPPED (1) /* Palette mapped icon (chunky, V44+) */ -#define IDFMT_DIRECTMAPPED (2) /* Direct mapped icon (truecolor 0xAARRGGBB, V51+) */ -/* temp icon.library stuff */ - enum { GID_MAIN=0, diff --git a/amiga/schedule.c b/amiga/schedule.c index dd50a8cc5..008bf4d01 100755 --- a/amiga/schedule.c +++ b/amiga/schedule.c @@ -51,13 +51,13 @@ void schedule(int t, void (*callback)(void *p), void *p) nscb = (struct nscallback *)obj->objstruct; - nscb->tv.tv_sec = 0; - nscb->tv.tv_micro = t*10000; + nscb->tv.Seconds = 0; + nscb->tv.Microseconds = t*10000; - while(nscb->tv.tv_micro >= 1000000) + while(nscb->tv.Microseconds >= 1000000) { - nscb->tv.tv_sec++; - nscb->tv.tv_micro -= 1000000; + nscb->tv.Seconds++; + nscb->tv.Microseconds -= 1000000; } GetSysTime(&tv); @@ -66,9 +66,9 @@ void schedule(int t, void (*callback)(void *p), void *p) if(nscb->treq = AllocVec(sizeof(struct timerequest),MEMF_PRIVATE | MEMF_CLEAR)) { *nscb->treq = *tioreq; - nscb->treq->tr_node.io_Command=TR_ADDREQUEST; - nscb->treq->tr_time.tv_sec=nscb->tv.tv_sec; // secs - nscb->treq->tr_time.tv_micro=nscb->tv.tv_micro; // micro + nscb->treq->Request.io_Command=TR_ADDREQUEST; + nscb->treq->Time.Seconds=nscb->tv.tv_sec; // secs + nscb->treq->Time.Microseconds=nscb->tv.Microseconds; // micro SendIO((struct IORequest *)nscb->treq); } #endif diff --git a/amiga/schedule.h b/amiga/schedule.h index 02d70450f..3317101ed 100755 --- a/amiga/schedule.h +++ b/amiga/schedule.h @@ -22,14 +22,14 @@ #include struct MinList *schedule_list; -struct timerequest *tioreq; +struct TimeRequest *tioreq; struct nscallback { - struct timeval tv; + struct TimeVal tv; void *callback; void *p; - struct timerequest *treq; + struct TimeRequest *treq; }; void ami_remove_timer_event(struct nscallback *nscb); -- cgit v1.2.3