r4877 chris_y - /trunk/netsurf/amiga/gui.c
netsurf at semichrome.net
netsurf at semichrome.net
Sun Aug 3 17:13:57 BST 2008
Author: chris_y
Date: Sun Aug 3 11:13:57 2008
New Revision: 4877
URL: http://source.netsurf-browser.org?rev=4877&view=rev
Log:
Opens and closes timer.device, and creates a new list - required for scheduling code
in schedule.c
Modified:
trunk/netsurf/amiga/gui.c
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=4877&r1=4876&r2=4877&view=diff
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Sun Aug 3 11:13:57 2008
@@ -18,11 +18,15 @@
#include "desktop/gui.h"
#include "desktop/netsurf.h"
+#include "desktop/options.h"
#include "utils/messages.h"
#include <proto/exec.h>
#include <proto/intuition.h>
#include "amiga/gui.h"
#include "amiga/plotters.h"
+#include "amiga/schedule.h"
+#include "amiga/object.h"
+#include <proto/timer.h>
struct browser_window *curbw;
@@ -30,16 +34,38 @@
char *adblock_stylesheet_url;
struct gui_window *search_current_window = NULL;
+struct MsgPort *msgport;
+struct timerequest *tioreq;
+struct Device *TimerBase;
+struct TimerIFace *ITimer;
+
static bool gui_start = true;
void gui_init(int argc, char** argv)
{
+ msgport = AllocSysObjectTags(ASOT_PORT,
+ ASO_NoTrack,FALSE,
+ TAG_DONE);
+
+ tioreq= (struct timerequest *)AllocSysObjectTags(ASOT_IOREQUEST,
+ ASOIOR_Size,sizeof(struct timerequest),
+ ASOIOR_ReplyPort,msgport,
+ ASO_NoTrack,FALSE,
+ TAG_DONE);
+
+ OpenDevice("timer.device",UNIT_VBLANK,(struct IORequest *)tioreq,0);
+
+ TimerBase = (struct Device *)tioreq->tr_node.io_Device;
+ ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase,"main",1,NULL);
+
verbose_log = true;
- messages_load("amiga_temp_build/messages");
- default_stylesheet_url = "file://netsurf/amiga_temp_build/default.css"; //"http://www.unsatisfactorysoftware.co.uk/newlook.css"; //path_to_url(buf);
- options_read("options");
-
+ messages_load("resources/messages"); // check locale language and read appropriate file
+ default_stylesheet_url = "file://netsurf/resources/default.css"; //"http://www.unsatisfactorysoftware.co.uk/newlook.css"; //path_to_url(buf);
+ options_read("resources/options");
plot=amiplot;
+
+ schedule_list = NewObjList();
+
}
void gui_init2(int argc, char** argv)
@@ -104,6 +130,16 @@
void gui_quit(void)
{
+ if(ITimer)
+ {
+ DropInterface((struct Interface *)ITimer);
+ }
+
+ CloseDevice((struct IORequest *) tioreq);
+ FreeSysObject(ASOT_IOREQUEST,tioreq);
+ FreeSysObject(ASOT_PORT,msgport);
+
+ FreeObjList(schedule_list);
}
struct gui_window *gui_create_browser_window(struct browser_window *bw,
@@ -127,6 +163,10 @@
WA_Height, 600,
WA_IDCMP, IDCMP_CLOSEWINDOW,
WA_Title, "NetSurf",
+ WA_AutoAdjust, TRUE,
+ WA_SizeGadget, TRUE,
+ WA_SizeBRight, TRUE,
+ WA_SizeBBottom, TRUE,
TAG_DONE);
curwin=gwin; //test
More information about the netsurf-commits
mailing list