Update for new SDK

svn path=/trunk/netsurf/; revision=5915
This commit is contained in:
Chris Young 2008-12-20 10:54:59 +00:00
parent e34ed32685
commit 5bff3e3287
5 changed files with 39 additions and 28 deletions

View File

@ -19,9 +19,29 @@
#ifndef AMIGA_COMPAT_H
#define AMIGA_COMPAT_H
//#include <sys/unistd.h>
#include <termios.h>
#include <sys/utsname.h>
/* 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);

View File

@ -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)

View File

@ -25,16 +25,6 @@
#include <dos/dos.h>
#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,

View File

@ -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

View File

@ -22,14 +22,14 @@
#include <proto/timer.h>
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);