From c3781520ba4e3a4e02339331b914e2e888fad8b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Sat, 20 Aug 2011 12:17:25 -0400 Subject: README file populated. License warnings added everywhere. --- README | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) (limited to 'README') diff --git a/README b/README index e69de29..eb8b103 100644 --- a/README +++ b/README @@ -0,0 +1,80 @@ +===================================== +gempy - A Python Module for Atari GEM +===================================== + +.. Contents:: + +What is gempy? +-------------- + +gempy is a small package that provides access to GEM on the Atari ST +platform. Additionally, gempy includes code for the core of Python to enable limited shared library support on multitasking Atari operating systems. + +Most GEM calls under gempy should be accessed via the Pythonic interface provided by the package. The current functionality is limited as this project is not yet complete. Direct calls to the AES and VDI, however, are accessible. + +gempy has only been tested on FreeMiNT. While much of it may work on TOS or, possibly, MagiC, niether has been tested. + +Building Python +--------------- + +gempy and its associated modifications to Python are currently tested against Python 2.7. Please see ``INSTALL`` for more information on how to build everything. + +Using gempy +----------- + +Once built, gempy is rather simple to use. From any Python prompt, simply import the package: + + >>> import gem + +To get started with a GEM window, a simple sequence can be used. First, the GEM application must be initialized: + + >>> app = gem.Application() + +If you wish to use a resource file, that may be loaded next: + + >>> app.load_resource("example.rsc") + +Windows are created by simply calling the ``new_window()`` method on the application: + + >>> app.new_window((x, y, w, h), "My Window") + +To do anything useful with the window or application, some GEM event handlers have to be created. Event handlers are objects that are used to process messages, timer events, and mouse actions. Normally, such event handlers will extend the appropriate base class. For example, a message event handler would be defined as: + + >>> class MyMessageHandler(gem.MessageEvent): + >>> ... + +Defined event handlers must then be assigned to the application. Once assigned, the ``app.event_loop()`` method can be called to handle the details of triggering the proper event handlers: + + >>> app.message_event = MyMessageHandler() + >>> app.event_loop() + +The event loop can be broken simply by having something change the value of the application's ``event_processing`` attribute to ``False``. Once the application is complete, is should shutdown properly: + + >>> app.destroy() + +The gempy distribution provides two example applications in the ``example/`` directory. + +License +------- + +gempy is licensed under the GNU Lesser General Public License Version 3, +which is included in the file entitled ``LICENSE``. + + gempy + Copyright (C) 2011 Jeffrey Armstrong + + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + -- cgit v1.2.3