OS4 DepotLogo by Nickman 
(anonymous IP: 18.207.134.98,1373) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (330)
   o Datatype (47)
   o Demo (186)
   o Development (541)
   o Document (21)
   o Driver (89)
   o Emulation (142)
   o Game (874)
   o Graphics (469)
   o Library (102)
   o Network (206)
   o Office (56)
   o Utility (825)
   o Video (62)

Total files: 3950

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Development » Library » Toolkit » olctk.lha

OLTKC Library

Description: Simple AOS4 dev toolkit
Download: olctk.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 124kb
Version: 0.1
Date: 30 Apr 2016
Author: Olrick Lefebvre
Submitter: Olrick Lefebvre
Email: olrick lefebvre/olrick fr
Requirements: none
Category: development/library/toolkit
License: Freeware
Distribute: yes
Min OS Version: 4.1
FileID: 9843
 
Comments: 2
Snapshots: 0
Videos: 0
Downloads: 69  (Current version)
69  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
This is a simple toolkit library I've created to get rid of AOS technical
aspects, 
because I prefer to concentrate on the interesting part of a project rather than
loosing 
time copying and pasting the same message switch over and over.
I guess it can be of some interest for others and it will be required for my
next release 
of USB driver for missile launchers, so here is the first release.

There are few basic functionnalities for the moment being as I will add more
when needed.
Supported functionnalities are:
  - signal handler management
  - timer handler management
  - ReAction window events management

Installation
============
Very complex, just drop oltkc.library near your project or add it to LIBS:

if you want to use the library in a program, copy the content of the include
drawer 
in SDK:local/common/include


Usage in a program
==================
Add the include <proto/oltkc.h> in your program and define a global interface:
struct OLTKCIFace *IOLTKC = NULL;

First you have to instanciate an EventManager, that's the main class which will
do the job:
    EventManager *mgr = IOLTKC->NewEventManager("Sample");

Then you register some event handlers of your choice:
    IOLTKC->SetOnSignal(mgr, SIGBREAKF_CTRL_C, control_c, NULL, false);
    This will trigger control_c() each time you press ^C. 
    
    IOLTKC->AddTimer(mgr, UNIT_VBLANK, DELAY_S, DELAY_uS, true, MY_TIMER_ID,
on_timer, NULL);
    This will trigger on_timer() periodically.
    
    IOLTKC->SetDefaultOnWindowEvent(mgr, winobj, default_window_callback, NULL,
true);
    This will trigger default_window_callback() every time an event is set to
your window.
    
    IOLTKC->SetOnWindowEvent(mgr, winobj, WMHI_CLOSEWINDOW,
close_window_callback, NULL, true);
    This will trigger close_window_callback() every time the close gadget is
clicked.

Then just let the EventManager take care of the job:
    IOLTKC->Run(mgr);

You leave the manager by "terminating" it somewhere in your event handling code:
    IOLTKC->Terminate(mgr);

Key features:
- you don't have to bother about how to use a timer in AmigaOS, 
  just write a function and add it to the manager with a delay
- you don't have to bother about the different signals you want to Wait() for, 
  just add the function you want being called for a signal
- you can register and unregister a timer, signal or event anytime
- you don't have to bother about canceling timers when it's unregistered 
  or the manager terminated, it's taken care of for you
- you don't have to bother about unregistering all your handlers when 
  the manager terminates, it's taken care of for you

A sample program is included to demonstrate the functionnalities.


Bug Report
==========
If you've found a bug, 
- please switch to the debug version of the library and capture the traces, for
example with Sashimi,
- describe precisely the scenario which reproduces the bug,
- describe precisely your hardware and OS setup

Send it to me olrick.lefebvre()olrick.fr


ToDo
====
- add functionnalities as it is needed or asked for


Greetings
=========

Thanks to:
- the AmiOuest Team and friends for the support, the nice parties and the beer
sharings:
	Alexandre Balaban
	Guillaume 'zzd10h' Boesel
	Hugues 'HunoPPC' Nouvel
	Jérome 'Glames' Senay
	Mathias 'Corto' Parnaudeau
	Philippe 'Elwood' Ferrucci

- Tonyw and BroadBlues for their help and advices about library development

- AmigaOS software and hardware developpers for keeping this party going



Copyright © 2004-2019 by Björn Hagström All Rights Reserved