OS4 DepotLogo by Alkaron 
(anonymous IP:,2193) 

   Bug tracker
   Locale browser


   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (596)
   o Document (22)
   o Driver (97)
   o Emulation (147)
   o Game (1004)
   o Graphics (497)
   o Library (115)
   o Network (232)
   o Office (66)
   o Utility (923)
   o Video (69)

Total files: 4365

Full index file
Recent index file



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: 91  (Current version)
91  (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
because I prefer to concentrate on the interesting part of a project rather than
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

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
in SDK:local/common/include

Usage in a program
Add the include <proto/oltkc.h> in your program and define a global interface:

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. 
on_timer, NULL);
    This will trigger on_timer() periodically.
    IOLTKC->SetDefaultOnWindowEvent(mgr, winobj, default_window_callback, NULL,
    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

Then just let the EventManager take care of the job:

You leave the manager by "terminating" it somewhere in your event handling code:

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

- add functionnalities as it is needed or asked for


Thanks to:
- the AmiOuest Team and friends for the support, the nice parties and the beer
	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-2024 by Björn Hagström All Rights Reserved