diff --git a/Doc/Makefile b/Doc/Makefile index d8a1679..ce0bae1 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -33,3 +33,7 @@ html: latex2html $(psbook_).tex -local_icons -nofootnode latex2html $(book_).tex -local_icons -nofootnode latex2html $(dev_).tex -local_icons -nofootnode + +sphinx: + $(MAKE) -C Pics/ + $(MAKE) html -C sphinx diff --git a/Doc/Pics/Client_Classes.dot b/Doc/Pics/Client_Classes.dot index fbdebfc..6d9cf48 100644 --- a/Doc/Pics/Client_Classes.dot +++ b/Doc/Pics/Client_Classes.dot @@ -2,16 +2,10 @@ digraph Client { Client [shape=box] - Client -> IOManager - Client -> Finder - Client -> Bitmaps - Client -> Files - Client -> OCR - Client -> DTM - - Finder -> IOManager - Finder -> Bitmaps - Finder -> DTM - - OCR -> IOManager + IOManager -> Client + Finder -> Client + Bitmaps -> Client + Files -> Client + OCR -> Client + DTM -> Client } diff --git a/Doc/Pics/Makefile b/Doc/Pics/Makefile index 1c24601..0ab983a 100644 --- a/Doc/Pics/Makefile +++ b/Doc/Pics/Makefile @@ -1,7 +1,7 @@ .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 default: dotit @@ -14,6 +14,9 @@ dotit: $(files) Client_Classes: $(call build,Client_Classes) +client_classes_dependencies: + $(call build,client_classes_dependencies) + FindColor: $(call build,FindColor) diff --git a/Doc/Pics/client_classes_dependencies.dot b/Doc/Pics/client_classes_dependencies.dot new file mode 100644 index 0000000..ab0c07d --- /dev/null +++ b/Doc/Pics/client_classes_dependencies.dot @@ -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 + +} diff --git a/Doc/sphinx/index.rst b/Doc/sphinx/index.rst index 1ed9c1c..258ea21 100644 --- a/Doc/sphinx/index.rst +++ b/Doc/sphinx/index.rst @@ -25,8 +25,8 @@ Contents: bugreport.rst tutorial.rst referencescript.rst - referencesimba.rst referencemml.rst + referencesimba.rst docdoc.rst todo.rst pymml.rst diff --git a/Doc/sphinx/mmlref/client.rst b/Doc/sphinx/mmlref/client.rst index aab2500..dd6640e 100644 --- a/Doc/sphinx/mmlref/client.rst +++ b/Doc/sphinx/mmlref/client.rst @@ -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. diff --git a/Doc/sphinx/mmlref/iomanager.rst b/Doc/sphinx/mmlref/iomanager.rst index df45429..58fe288 100644 --- a/Doc/sphinx/mmlref/iomanager.rst +++ b/Doc/sphinx/mmlref/iomanager.rst @@ -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:: :maxdepth: 2 - linux.rst - windows.rst + os_linux.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. diff --git a/Doc/sphinx/mmlref/os_linux.rst b/Doc/sphinx/mmlref/os_linux.rst index 491f4d4..8c336c6 100644 --- a/Doc/sphinx/mmlref/os_linux.rst +++ b/Doc/sphinx/mmlref/os_linux.rst @@ -1,4 +1,4 @@ -Linux Specific Code -=================== +Linux Specific Parts +==================== diff --git a/Doc/sphinx/mmlref/os_windows.rst b/Doc/sphinx/mmlref/os_windows.rst index 1b64aac..14b6dbf 100644 --- a/Doc/sphinx/mmlref/os_windows.rst +++ b/Doc/sphinx/mmlref/os_windows.rst @@ -1,4 +1,4 @@ -Windows Specific Code -===================== +Windows Specific Parts +====================== diff --git a/Doc/sphinx/referencemml.rst b/Doc/sphinx/referencemml.rst index dc29c1b..65d33c5 100644 --- a/Doc/sphinx/referencemml.rst +++ b/Doc/sphinx/referencemml.rst @@ -1,10 +1,22 @@ 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:: :maxdepth: 2 mmlref/client.rst mmlref/iomanager.rst + mmlref/finder.rst + mmlref/bitmap.rst + mmlref/ocr.rst diff --git a/Doc/sphinx/whatis.rst b/Doc/sphinx/whatis.rst index 5cd1cad..d04d034 100644 --- a/Doc/sphinx/whatis.rst +++ b/Doc/sphinx/whatis.rst @@ -16,10 +16,11 @@ Simba can: * Find and read colours on the screen. * Click or move the mouse to a specific position on the screen. Typically 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 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 of fun stuff with Simba, you can even make a game in it. diff --git a/Doc/sphinx/whysimba.rst b/Doc/sphinx/whysimba.rst index 40ad359..afcb1c2 100644 --- a/Doc/sphinx/whysimba.rst +++ b/Doc/sphinx/whysimba.rst @@ -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 instability. Simba attempts to find a middle-ground and has sacrificed some 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. diff --git a/Units/MMLCore/os_linux.pas b/Units/MMLCore/os_linux.pas index 31bce13..9635240 100644 --- a/Units/MMLCore/os_linux.pas +++ b/Units/MMLCore/os_linux.pas @@ -18,7 +18,7 @@ See the file COPYING, included in this distribution, for details about the copyright. - Linux OS specific implemetation for Mufasa Macro Library + Linux OS specific implementation for Mufasa Macro Library } {$mode objfpc}{$H+} unit os_linux;