1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-22 01:02:17 -05:00

More documentation.

This commit is contained in:
Merlijn Wajer 2010-06-15 19:15:52 +02:00
parent 7a45c45ea9
commit 57b0f143c7
13 changed files with 137 additions and 28 deletions

View File

@ -33,3 +33,7 @@ html:
latex2html $(psbook_).tex -local_icons -nofootnode latex2html $(psbook_).tex -local_icons -nofootnode
latex2html $(book_).tex -local_icons -nofootnode latex2html $(book_).tex -local_icons -nofootnode
latex2html $(dev_).tex -local_icons -nofootnode latex2html $(dev_).tex -local_icons -nofootnode
sphinx:
$(MAKE) -C Pics/
$(MAKE) html -C sphinx

View File

@ -2,16 +2,10 @@ digraph Client {
Client [shape=box] Client [shape=box]
Client -> IOManager IOManager -> Client
Client -> Finder Finder -> Client
Client -> Bitmaps Bitmaps -> Client
Client -> Files Files -> Client
Client -> OCR OCR -> Client
Client -> DTM DTM -> Client
Finder -> IOManager
Finder -> Bitmaps
Finder -> DTM
OCR -> IOManager
} }

View File

@ -1,7 +1,7 @@
.PHONY: default clean .PHONY: default clean
files := Client_Classes FindColor Input_Diag Window DTM TMWindow files := Client_Classes FindColor Input_Diag Window DTM TMWindow client_classes_dependencies
build = dot $(1).dot -Tpng > $(1).png build = dot $(1).dot -Tpng > $(1).png
default: dotit default: dotit
@ -14,6 +14,9 @@ dotit: $(files)
Client_Classes: Client_Classes:
$(call build,Client_Classes) $(call build,Client_Classes)
client_classes_dependencies:
$(call build,client_classes_dependencies)
FindColor: FindColor:
$(call build,FindColor) $(call build,FindColor)

View File

@ -0,0 +1,22 @@
digraph Client {
Client [shape=box]
IOManager -> Client
Finder -> Client
Bitmaps -> Client
Files -> Client
OCR -> Client
DTM -> Client
Finder -> IOManager
Finder -> Bitmaps
Finder -> DTM
OCR -> IOManager
OCR -> Bitmaps
OCR -> Finder
Bitmaps -> IOManager
}

View File

@ -25,8 +25,8 @@ Contents:
bugreport.rst bugreport.rst
tutorial.rst tutorial.rst
referencescript.rst referencescript.rst
referencesimba.rst
referencemml.rst referencemml.rst
referencesimba.rst
docdoc.rst docdoc.rst
todo.rst todo.rst
pymml.rst pymml.rst

View File

@ -1,2 +1,19 @@
TClient Class Client Class
============= ============
The ``TClient`` class is the class that glues all other MML classes together
into one usable class. Internally, quite some MML classes require other MML
classes, and they access these other classes through their "parent" ``TClient``
class.
An image tells more than a thousands words:
.. image:: ../../Pics/Client_Classes.png
And the class dependency graph: (An arrow indicates a dependency)
.. image:: ../../Pics/client_classes_dependencies.png
The client class does not do much else except creating the classes when it is
created and destroying the classes when it is being destroyed.

View File

@ -1,9 +1,53 @@
TWindow Class IOManager Class
============= ===============
.. note::
This page is still WIP.
It only covers the function of the IOManager class vaguely. In reality, the
IOManager unit contains quite some classes, each with a (slightly) different
function. There are not yet documented. (Perhaps BenLand100 can do this?)
The IOManager class manages the core functionality for retreiving Window data,
such as the actual pixel data and the position and dimension of a window.
The main purpose is to form a cross platform class to retrieve window
information, press and poll mouse buttons and to press and poll keyboard keys.
The IOManager is the only class that should use platform (or operating system)
specific calls; this is all abstracted by the IOManager class.
To achieve this, several abstract classes are defined by the IOManager class.
Every operating system (or window system) needs it's own implementation of the
``TWindow_Abstract`` class. We wrote one for both Linux and Windows.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
linux.rst os_linux.rst
windows.rst os_windows.rst
Offscreen image capturing
-------------------------
On Linux, offscreen image capturing is possible when compositing is turned on.
With compiz, this is turned on by default. Other windows managers like Metacity
and KWin can turn this on. When enabled, Simba can capture images from windows
that are below others. Minimized does not work. It is also possible to turn on
Compositing for specific X11 Windows with an api call, but this is currently not
implemented.
The status on Windows is unknown.
Silent Input
------------
So what is Silent Input?
We define Silent Input as methods to manipulate the user's mouse and keyboard,
without visually using them. So what does this mean?
This basically means that you will still be able to use your mouse while
the MML is performing mouse operations on your targetted window/client.
However, silent input is very hard to implement, and often hardly supported
by host operating systems. Often silent mouse or keyboard input is simply
ignored. So in general it is advised to stick to non silent input.

View File

@ -1,4 +1,4 @@
Linux Specific Code Linux Specific Parts
=================== ====================

View File

@ -1,4 +1,4 @@
Windows Specific Code Windows Specific Parts
===================== ======================

View File

@ -1,10 +1,22 @@
MML Reference MML Reference
============= =============
The Mufasa Macro Library is the core library of Simba. The Mufasa Macro Library is the core library of Simba. It is used not just to
provide scripts with the required functionality, but also used to pick colours
and select windows with Simba itself. The MML can run without any user
interface.
The MML is split up in "Core" classes and "Addon" classes.
.. note::
This section needs to explain more on the core/addon differences,
and provide some more general info about the mml.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
mmlref/client.rst mmlref/client.rst
mmlref/iomanager.rst mmlref/iomanager.rst
mmlref/finder.rst
mmlref/bitmap.rst
mmlref/ocr.rst

View File

@ -16,10 +16,11 @@ Simba can:
* Find and read colours on the screen. * Find and read colours on the screen.
* Click or move the mouse to a specific position on the screen. Typically * Click or move the mouse to a specific position on the screen. Typically
this is the position of a found color or bitmap. this is the position of a found color or bitmap.
* Read and write files.
* Connect to the internet to read websites and post data to them.
* Read text on the screen and turn it into actual text. (Optical Character * Read text on the screen and turn it into actual text. (Optical Character
Recognition) Recognition)
* Capture and analyse images on the screen.
* Read and write files.
* Connect to the internet to read websites and post data to them.
* Run pascal programs for you. If you're a bit creative you can have a lot * Run pascal programs for you. If you're a bit creative you can have a lot
of fun stuff with Simba, you can even make a game in it. of fun stuff with Simba, you can even make a game in it.

View File

@ -72,3 +72,15 @@ It is important to understand, however, that premature optimization usually
ends up hurting development by introducing bugs and other forms of ends up hurting development by introducing bugs and other forms of
instability. Simba attempts to find a middle-ground and has sacrificed some instability. Simba attempts to find a middle-ground and has sacrificed some
speed for readability and maintainability, but is overall still quite fast. speed for readability and maintainability, but is overall still quite fast.
Open Minded
~~~~~~~~~~~
Open minded. We appreciate your help, ideas and critisism!
Well Documented
===============
Simba is well documented. (You're looking the documentation right now...)
There is still stuff left to document but overall the documentation is pretty
good.

View File

@ -18,7 +18,7 @@
See the file COPYING, included in this distribution, See the file COPYING, included in this distribution,
for details about the copyright. for details about the copyright.
Linux OS specific implemetation for Mufasa Macro Library Linux OS specific implementation for Mufasa Macro Library
} }
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
unit os_linux; unit os_linux;