New User to OS4 Coding requires some routines

3 posts / 0 new
Last post
djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
New User to OS4 Coding requires some routines

Hi all,

Great forum you have here, I hope it starts coming to life soon. In the meantime... I have been looking across various Amiga sites and there are plenty of libraries X, Y and Z, but for beginners little documentation of how to quickly get started and up and running.

I am hoping to start work on a medium-sized project this year when AVD and the X1000 arrives and I need to know a few fundamental principles and common routines.

(edited post, see next)

djrikki
djrikki's picture
Offline
Last seen: 2 years 11 months ago
Joined: 2011-01-14 23:02
The user interface will be

The user interface will be built entirely with AVD and the coding will be written in C++.

It will need to carry out the following operations:

Image loading

1) Detect File Type
2) How to open a requester, listing filtered by support image types above
3) Load PNGs, GIFs or JPG... WebP would be nice also.
4) Load image into an object
5) Scale image/object

XML Handling

1) Read a plain text file/xml file
2) Parse the XML file into an array or structure so I can...
a) Address tag data
b) Manipulate and add new tag data into the structure
3) Write the plain text file/xml file back to disk.

Nb: Projects will be created in PROGDIR: So a nice example of how to open/close files would be useful as well.

GUI

I guess AVD will format the code so I can act on user interaction. Eg. Able to read a slider to get the value, set minimum and maximum of a slider in C++ - just one example.

Upload

Does AmigaOS4 come with a Curl command as standard?

Curl method:

1) How to call an external command using C++?
2) Act on its result

If not implement this myself, which will require routines for:

1) Check an internet connection is available
2) Reach an FTP Site
3) Upload a file
4) Provide a progress bar
5) Check file has finished uploading
6) Error handling

AmigaOS.net - Discover Amiga, Discover AmigaOS.net
Jack for AmigaOS
Samba Idiot's Guide

Hans
Hans's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 2010-12-09 22:04
I can't give you exact code,

I can't give you exact code, but here are a few pointers:

Image Loading: Use the AmigaOS datatypes system; specifically the picture datatype. It can both identify image files, and load them in, so long as there is a datatype for that particular image format.

XML Handling: IIRC, the application.library has basic XML handling, primarily designed for handling XML based prefs files. Otherwise, there's the expat library on os4depot, along with a few others (just search for XML on os4depot).

GUI: AVD will eventually have a GUI designer. In the meantime, there is an ReAction guide on os4depot, plus some examples (search for ReAction on os4depot).

Upload: You will find libcurl on os4depot. If you want to roll your own, there should be some example network code available. Like most OSes, AmigaOS uses BSD style sockets for networking, so lots of networking code can be recompiled on AmigaOS with little changes, if any.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Log in or register to post comments