1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-25 10:42:20 -05:00

Initial commit for Mufasa v2.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@1 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-08-28 22:19:25 +00:00
commit 18419b36cc
27 changed files with 8101 additions and 0 deletions

View File

@ -0,0 +1,13 @@
digraph Client {
Client [shape=box]
Client -> Window
Client -> ColorFinder
Client -> Bitmaps
Client -> Files
Client -> Strings
Client -> OCR
Client -> DTM
}

415
Doc/Pics/Client_Classes.eps Normal file
View File

@ -0,0 +1,415 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009)
%%For: (merlijn) Merlijn,,,
%%Title: Client
%%Pages: 1
%%BoundingBox: 36 36 768 152
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
1 setmiterlimit
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 768 152
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 732 116 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% Client
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
newpath 446 108 moveto
390 108 lineto
390 72 lineto
446 72 lineto
closepath stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
397.5 85.9 moveto 41 (Client) alignedtext
grestore
% Window
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
50 18 50.22 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
21.5 13.9 moveto 57 (Window) alignedtext
grestore
% Client->Window
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 390 86 moveto
335 79 212 60 109 36 curveto
105 35 102 34 98 33 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 98.58 29.52 moveto
88 30 lineto
96.57 36.23 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 98.58 29.52 moveto
88 30 lineto
96.57 36.23 lineto
closepath stroke
grestore
% ColorFinder
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
184 18 66.01 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
144.5 13.9 moveto 79 (ColorFinder) alignedtext
grestore
% Client->ColorFinder
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 390 81 moveto
353 70 285 49 238 34 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 238.58 30.52 moveto
228 31 lineto
236.57 37.23 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 238.58 30.52 moveto
228 31 lineto
236.57 37.23 lineto
closepath stroke
grestore
% Bitmaps
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
318 18 50.03 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
290 13.9 moveto 56 (Bitmaps) alignedtext
grestore
% Client->Bitmaps
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 393 72 moveto
380 63 363 50 348 40 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 350.1 37.2 moveto
340 34 lineto
345.9 42.8 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 350.1 37.2 moveto
340 34 lineto
345.9 42.8 lineto
closepath stroke
grestore
% Files
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
418 18 31.96 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
403 13.9 moveto 30 (Files) alignedtext
grestore
% Client->Files
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 418 72 moveto
418 64 418 55 418 46 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 421.5 46 moveto
418 36 lineto
414.5 46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 421.5 46 moveto
418 36 lineto
414.5 46 lineto
closepath stroke
grestore
% Strings
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
513 18 45.17 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
488.5 13.9 moveto 49 (Strings) alignedtext
grestore
% Client->Strings
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 442 72 moveto
454 63 470 50 484 40 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 486.1 42.8 moveto
492 34 lineto
481.9 37.2 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 486.1 42.8 moveto
492 34 lineto
481.9 37.2 lineto
closepath stroke
grestore
% OCR
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
608 18 32.16 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
592.5 13.9 moveto 31 (OCR) alignedtext
grestore
% Client->OCR
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 446 80 moveto
476 70 525 53 567 36 curveto
569 35 571 34 573 33 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 574.28 36.26 moveto
582 29 lineto
571.44 29.86 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 574.28 36.26 moveto
582 29 lineto
571.44 29.86 lineto
closepath stroke
grestore
% DTM
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
691 18 32.86 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
675 13.9 moveto 32 (DTM) alignedtext
grestore
% Client->DTM
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 446 85 moveto
490 77 577 59 649 36 curveto
651 35 653 34 656 33 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 657.28 36.26 moveto
665 29 lineto
654.44 29.86 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 657.28 36.26 moveto
665 29 lineto
654.44 29.86 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
end
restore
%%EOF

BIN
Doc/Pics/Client_Classes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

12
Doc/Pics/FindColor.dot Normal file
View File

@ -0,0 +1,12 @@
digraph FindColor {
"Retreive Client Pixel Data" -> "Match pixels with tolerance"
"Match pixels with tolerance" -> "We found a pixel that matched"
"Match pixels with tolerance" -> "We found no pixel that matched"
"We found a pixel that matched" -> "Done with finding"
"We found no pixel that matched" -> "Done with finding"
"Done with finding" -> "Free Client Pixel Data"
"Free Client Pixel Data" -> "Return the coordinates of the found pixel, if any"
}

399
Doc/Pics/FindColor.eps Normal file
View File

@ -0,0 +1,399 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009)
%%For: (merlijn) Merlijn,,,
%%Title: FindColor
%%Pages: 1
%%BoundingBox: 36 36 706 440
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
1 setmiterlimit
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 706 440
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 670 404 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% Retreive Client Pixel Data
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
328 378 134.81 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
239 373.9 moveto 178 (Retreive Client Pixel Data) alignedtext
grestore
% Match pixels with tolerance
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
328 306 143.15 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
233 301.9 moveto 190 (Match pixels with tolerance) alignedtext
grestore
% Retreive Client Pixel Data->Match pixels with tolerance
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 328 360 moveto
328 352 328 343 328 334 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 331.5 334 moveto
328 324 lineto
324.5 334 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 331.5 334 moveto
328 324 lineto
324.5 334 lineto
closepath stroke
grestore
% We found a pixel that matched
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
158 234 157.93 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
52 229.9 moveto 212 (We found a pixel that matched) alignedtext
grestore
% Match pixels with tolerance->We found a pixel that matched
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 287 289 moveto
264 278 234 266 209 255 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 210.56 251.86 moveto
200 251 lineto
207.72 258.26 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 210.56 251.86 moveto
200 251 lineto
207.72 258.26 lineto
closepath stroke
grestore
% We found no pixel that matched
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
498 234 164.19 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
387.5 229.9 moveto 221 (We found no pixel that matched) alignedtext
grestore
% Match pixels with tolerance->We found no pixel that matched
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 369 289 moveto
392 278 422 266 447 255 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 448.28 258.26 moveto
456 251 lineto
445.44 251.86 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 448.28 258.26 moveto
456 251 lineto
445.44 251.86 lineto
closepath stroke
grestore
% Done with finding
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
328 162 96.78 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
266 157.9 moveto 124 (Done with finding) alignedtext
grestore
% We found a pixel that matched->Done with finding
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 199 217 moveto
223 206 254 193 280 182 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 281.28 185.26 moveto
289 178 lineto
278.44 178.86 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 281.28 185.26 moveto
289 178 lineto
278.44 178.86 lineto
closepath stroke
grestore
% We found no pixel that matched->Done with finding
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 457 217 moveto
433 206 402 193 376 182 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 377.56 178.86 moveto
367 178 lineto
374.72 185.26 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 377.56 178.86 moveto
367 178 lineto
374.72 185.26 lineto
closepath stroke
grestore
% Free Client Pixel Data
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
328 90 114.85 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
253 85.9 moveto 150 (Free Client Pixel Data) alignedtext
grestore
% Done with finding->Free Client Pixel Data
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 328 144 moveto
328 136 328 127 328 118 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 331.5 118 moveto
328 108 lineto
324.5 118 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 331.5 118 moveto
328 108 lineto
324.5 118 lineto
closepath stroke
grestore
% Return the coordinates of the found pixel, if any
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
328 18 241.12 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
162.5 13.9 moveto 331 (Return the coordinates of the found pixel, if any) alignedtext
grestore
% Free Client Pixel Data->Return the coordinates of the found pixel, if any
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 328 72 moveto
328 64 328 55 328 46 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 331.5 46 moveto
328 36 lineto
324.5 46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 331.5 46 moveto
328 36 lineto
324.5 46 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
end
restore
%%EOF

BIN
Doc/Pics/FindColor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

23
Doc/Pics/Input_Diag.dot Normal file
View File

@ -0,0 +1,23 @@
digraph input_types {
Input [shape=box]
Input -> Silent
Input -> "Not Silent"
"Not Silent" -> Mouse
"Not Silent" -> Keyboard
Silent -> Mouse
Silent -> Keyboard
Mouse -> Click
Click -> Left
Click -> Right
Click -> Middle
Mouse -> Move
Keyboard -> Down
Keyboard -> Up
}

568
Doc/Pics/Input_Diag.eps Normal file
View File

@ -0,0 +1,568 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009)
%%For: (merlijn) Merlijn,,,
%%Title: input_types
%%Pages: 1
%%BoundingBox: 36 36 462 368
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
1 setmiterlimit
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 462 368
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 426 332 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% Input
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
newpath 282 324 moveto
228 324 lineto
228 288 lineto
282 288 lineto
closepath stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
236.5 301.9 moveto 37 (Input) alignedtext
grestore
% Silent
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
197 234 38.91 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
177 229.9 moveto 40 (Silent) alignedtext
grestore
% Input->Silent
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 240 288 moveto
233 280 224 269 217 259 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 219.8 256.9 moveto
211 251 lineto
214.2 261.1 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 219.8 256.9 moveto
211 251 lineto
214.2 261.1 lineto
closepath stroke
grestore
% Not Silent
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
313 234 59.06 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
278.5 229.9 moveto 69 (Not Silent) alignedtext
grestore
% Input->Not Silent
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 270 288 moveto
277 279 285 269 293 260 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 295.8 262.1 moveto
299 252 lineto
290.2 257.9 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 295.8 262.1 moveto
299 252 lineto
290.2 257.9 lineto
closepath stroke
grestore
% Mouse
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
197 162 41.19 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
175 157.9 moveto 44 (Mouse) alignedtext
grestore
% Silent->Mouse
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 197 216 moveto
197 208 197 199 197 190 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 200.5 190 moveto
197 180 lineto
193.5 190 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 200.5 190 moveto
197 180 lineto
193.5 190 lineto
closepath stroke
grestore
% Keyboard
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
312 162 55.09 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
280 157.9 moveto 64 (Keyboard) alignedtext
grestore
% Silent->Keyboard
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 220 219 moveto
236 209 259 195 277 183 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 278.96 185.92 moveto
286 178 lineto
275.56 179.8 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 278.96 185.92 moveto
286 178 lineto
275.56 179.8 lineto
closepath stroke
grestore
% Not Silent->Mouse
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 287 218 moveto
270 208 248 194 230 183 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 231.26 179.63 moveto
221 177 lineto
227.38 185.46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 231.26 179.63 moveto
221 177 lineto
227.38 185.46 lineto
closepath stroke
grestore
% Not Silent->Keyboard
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 313 216 moveto
312 208 312 199 312 190 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 315.5 190 moveto
312 180 lineto
308.5 190 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 315.5 190 moveto
312 180 lineto
308.5 190 lineto
closepath stroke
grestore
% Click
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
115 90 32.86 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
99 85.9 moveto 32 (Click) alignedtext
grestore
% Mouse->Click
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 178 146 moveto
167 136 152 123 140 112 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 142.55 109.6 moveto
133 105 lineto
137.6 114.55 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 142.55 109.6 moveto
133 105 lineto
137.6 114.55 lineto
closepath stroke
grestore
% Move
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
203 90 36.83 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
184.5 85.9 moveto 37 (Move) alignedtext
grestore
% Mouse->Move
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 199 144 moveto
200 136 200 127 201 118 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 204.5 118 moveto
201 108 lineto
197.5 118 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 204.5 118 moveto
201 108 lineto
197.5 118 lineto
closepath stroke
grestore
% Down
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
307 90 39.11 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
286.5 85.9 moveto 41 (Down) alignedtext
grestore
% Keyboard->Down
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 311 144 moveto
310 136 310 127 309 118 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 312.48 117.6 moveto
308 108 lineto
305.51 118.3 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 312.48 117.6 moveto
308 108 lineto
305.51 118.3 lineto
closepath stroke
grestore
% Up
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
391 90 27 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
381.5 85.9 moveto 19 (Up) alignedtext
grestore
% Keyboard->Up
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 331 145 moveto
342 135 355 122 367 112 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 369.78 114.22 moveto
375 105 lineto
365.17 108.95 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 369.78 114.22 moveto
375 105 lineto
365.17 108.95 lineto
closepath stroke
grestore
% Left
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
30 18 29.88 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
16.5 13.9 moveto 27 (Left) alignedtext
grestore
% Click->Left
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 97 75 moveto
84 65 68 51 55 39 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 57.1 36.2 moveto
47 33 lineto
52.9 41.8 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 57.1 36.2 moveto
47 33 lineto
52.9 41.8 lineto
closepath stroke
grestore
% Right
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
115 18 36.83 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
96.5 13.9 moveto 37 (Right) alignedtext
grestore
% Click->Right
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 115 72 moveto
115 64 115 55 115 46 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 118.5 46 moveto
115 36 lineto
111.5 46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 118.5 46 moveto
115 36 lineto
111.5 46 lineto
closepath stroke
grestore
% Middle
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
211 18 41.19 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
189 13.9 moveto 44 (Middle) alignedtext
grestore
% Click->Middle
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 134 75 moveto
147 65 166 51 182 40 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 184.1 42.8 moveto
190 34 lineto
179.9 37.2 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 184.1 42.8 moveto
190 34 lineto
179.9 37.2 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
end
restore
%%EOF

BIN
Doc/Pics/Input_Diag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

15
Doc/Pics/Window.dot Normal file
View File

@ -0,0 +1,15 @@
digraph Window {
"Target Window" [shape=box]
"Target Window" -> "Window Dimensions"
"Target Window" -> "Window Pixel Data"
// "Target Window" -> "Input Event"
"Window Dimensions" -> "Width"
"Window Dimensions" -> "Height"
// "Input Event" -> "Mouse Event"
// "Input Event" -> "Key Event"
}

325
Doc/Pics/Window.eps Normal file
View File

@ -0,0 +1,325 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009)
%%For: (merlijn) Merlijn,,,
%%Title: Window
%%Pages: 1
%%BoundingBox: 36 36 486 224
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
1 setmiterlimit
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 486 224
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 450 188 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% Target Window
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
newpath 284 180 moveto
164 180 lineto
164 144 lineto
284 144 lineto
closepath stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
171.5 157.9 moveto 105 (Target Window) alignedtext
grestore
% Window Dimensions
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
109 90 109.1 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
38.5 85.9 moveto 141 (Window Dimensions) alignedtext
grestore
% Target Window->Window Dimensions
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 195 144 moveto
180 135 161 124 146 114 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 147.26 110.63 moveto
137 108 lineto
143.38 116.46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 147.26 110.63 moveto
137 108 lineto
143.38 116.46 lineto
closepath stroke
grestore
% Window Pixel Data
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
339 90 102.84 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
273 85.9 moveto 132 (Window Pixel Data) alignedtext
grestore
% Target Window->Window Pixel Data
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 253 144 moveto
268 135 287 123 303 113 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 305.62 115.46 moveto
312 107 lineto
301.74 109.63 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 305.62 115.46 moveto
312 107 lineto
301.74 109.63 lineto
closepath stroke
grestore
% Width
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
59 18 39.81 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
38 13.9 moveto 42 (Width) alignedtext
grestore
% Window Dimensions->Width
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 96 72 moveto
91 64 84 53 77 44 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 79.8 41.9 moveto
71 36 lineto
74.2 46.1 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 79.8 41.9 moveto
71 36 lineto
74.2 46.1 lineto
closepath stroke
grestore
% Height
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
160 18 43.08 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
137 13.9 moveto 46 (Height) alignedtext
grestore
% Window Dimensions->Height
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 122 72 moveto
128 64 135 53 142 44 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 144.8 46.1 moveto
148 36 lineto
139.2 41.9 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 144.8 46.1 moveto
148 36 lineto
139.2 41.9 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
end
restore
%%EOF

BIN
Doc/Pics/Window.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

12
Doc/Pics/Window_Types.dot Normal file
View File

@ -0,0 +1,12 @@
digraph Window_Types {
"Window" [shape=box]
"Window" -> "XWindow"
"Window" -> "Raw Data Pointer"
"Window" -> "Windows-Alike Window"
"Windows-Alike Window" -> "Bitmap"
"Windows-Alike Window" -> "Windows Window"
"Windows-Alike Window" -> "Device Context"
}

383
Doc/Pics/Window_Types.eps Normal file
View File

@ -0,0 +1,383 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Graphviz version 2.20.2 (Mon Mar 30 10:09:11 UTC 2009)
%%For: (merlijn) Merlijn,,,
%%Title: Window_Types
%%Pages: 1
%%BoundingBox: 36 36 799 224
%%EndComments
save
%%BeginProlog
/DotDict 200 dict def
DotDict begin
/setupLatin1 {
mark
/EncodingVector 256 array def
EncodingVector 0
ISOLatin1Encoding 0 255 getinterval putinterval
EncodingVector 45 /hyphen put
% Set up ISO Latin 1 character encoding
/starnetISO {
dup dup findfont dup length dict begin
{ 1 index /FID ne { def }{ pop pop } ifelse
} forall
/Encoding EncodingVector def
currentdict end definefont
} def
/Times-Roman starnetISO def
/Times-Italic starnetISO def
/Times-Bold starnetISO def
/Times-BoldItalic starnetISO def
/Helvetica starnetISO def
/Helvetica-Oblique starnetISO def
/Helvetica-Bold starnetISO def
/Helvetica-BoldOblique starnetISO def
/Courier starnetISO def
/Courier-Oblique starnetISO def
/Courier-Bold starnetISO def
/Courier-BoldOblique starnetISO def
cleartomark
} bind def
%%BeginResource: procset graphviz 0 0
/coord-font-family /Times-Roman def
/default-font-family /Times-Roman def
/coordfont coord-font-family findfont 8 scalefont def
/InvScaleFactor 1.0 def
/set_scale {
dup 1 exch div /InvScaleFactor exch def
scale
} bind def
% styles
/solid { [] 0 setdash } bind def
/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
/bold { 2 setlinewidth } bind def
/filled { } bind def
/unfilled { } bind def
/rounded { } bind def
/diagonals { } bind def
% hooks for setting color
/nodecolor { sethsbcolor } bind def
/edgecolor { sethsbcolor } bind def
/graphcolor { sethsbcolor } bind def
/nopcolor {pop pop pop} bind def
/beginpage { % i j npages
/npages exch def
/j exch def
/i exch def
/str 10 string def
npages 1 gt {
gsave
coordfont setfont
0 0 moveto
(\() show i str cvs show (,) show j str cvs show (\)) show
grestore
} if
} bind def
/set_font {
findfont exch
scalefont setfont
} def
% draw text fitted to its expected width
/alignedtext { % width text
/text exch def
/width exch def
gsave
width 0 gt {
[] 0 setdash
text stringwidth pop width exch sub text length div 0 text ashow
} if
grestore
} def
/boxprim { % xcorner ycorner xsize ysize
4 2 roll
moveto
2 copy
exch 0 rlineto
0 exch rlineto
pop neg 0 rlineto
closepath
} bind def
/ellipse_path {
/ry exch def
/rx exch def
/y exch def
/x exch def
matrix currentmatrix
newpath
x y translate
rx ry scale
0 0 1 0 360 arc
setmatrix
} bind def
/endpage { showpage } bind def
/showpage { } def
/layercolorseq
[ % layer color sequence - darkest to lightest
[0 0 0]
[.2 .8 .8]
[.4 .8 .8]
[.6 .8 .8]
[.8 .8 .8]
]
def
/layerlen layercolorseq length def
/setlayer {/maxlayer exch def /curlayer exch def
layercolorseq curlayer 1 sub layerlen mod get
aload pop sethsbcolor
/nodecolor {nopcolor} def
/edgecolor {nopcolor} def
/graphcolor {nopcolor} def
} bind def
/onlayer { curlayer ne {invis} if } def
/onlayers {
/myupper exch def
/mylower exch def
curlayer mylower lt
curlayer myupper gt
or
{invis} if
} def
/curlayer 0 def
%%EndResource
%%EndProlog
%%BeginSetup
14 default-font-family set_font
1 setmiterlimit
% /arrowlength 10 def
% /arrowwidth 5 def
% make sure pdfmark is harmless for PS-interpreters other than Distiller
/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
% make '<<' and '>>' safe on PS Level 1 devices
/languagelevel where {pop languagelevel}{1} ifelse
2 lt {
userdict (<<) cvn ([) cvn load put
userdict (>>) cvn ([) cvn load put
} if
%%EndSetup
setupLatin1
%%Page: 1 1
%%PageBoundingBox: 36 36 799 224
%%PageOrientation: Portrait
0 0 1 beginpage
gsave
36 36 763 188 boxprim clip newpath
1 1 set_scale 0 rotate 40 40 translate
% Window
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
newpath 266 180 moveto
194 180 lineto
194 144 lineto
266 144 lineto
closepath stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
201.5 157.9 moveto 57 (Window) alignedtext
grestore
% XWindow
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
58 90 57.87 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
24 85.9 moveto 68 (XWindow) alignedtext
grestore
% Window->XWindow
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 194 147 moveto
167 136 131 121 103 109 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 103.58 105.46 moveto
93 105 lineto
100.98 111.96 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 103.58 105.46 moveto
93 105 lineto
100.98 111.96 lineto
closepath stroke
grestore
% Raw Data Pointer
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
230 90 96.09 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
168.5 85.9 moveto 123 (Raw Data Pointer) alignedtext
grestore
% Window->Raw Data Pointer
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 230 144 moveto
230 136 230 127 230 118 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 233.5 118 moveto
230 108 lineto
226.5 118 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 233.5 118 moveto
230 108 lineto
226.5 118 lineto
closepath stroke
grestore
% Windows-Alike Window
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
469 90 125.08 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
387 85.9 moveto 164 (Windows-Alike Window) alignedtext
grestore
% Window->Windows-Alike Window
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 266 151 moveto
303 140 360 123 405 109 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 406.43 112.23 moveto
415 106 lineto
404.42 105.52 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 406.43 112.23 moveto
415 106 lineto
404.42 105.52 lineto
closepath stroke
grestore
% Bitmap
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
308 18 45.17 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
283.5 13.9 moveto 49 (Bitmap) alignedtext
grestore
% Windows-Alike Window->Bitmap
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 430 73 moveto
405 61 372 47 347 35 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 348.56 31.86 moveto
338 31 lineto
345.72 38.26 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 348.56 31.86 moveto
338 31 lineto
345.72 38.26 lineto
closepath stroke
grestore
% Windows Window
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
469 18 97.98 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
406.5 13.9 moveto 125 (Windows Window) alignedtext
grestore
% Windows-Alike Window->Windows Window
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 469 72 moveto
469 64 469 55 469 46 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 472.5 46 moveto
469 36 lineto
465.5 46 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 472.5 46 moveto
469 36 lineto
465.5 46 lineto
closepath stroke
grestore
% Device Context
gsave
1 setlinewidth
0.000 0.000 0.000 nodecolor
670 18 84.97 18 ellipse_path stroke
0.000 0.000 0.000 nodecolor
14 /Times-Roman set_font
616.5 13.9 moveto 107 (Device Context) alignedtext
grestore
% Windows-Alike Window->Device Context
gsave
1 setlinewidth
0.000 0.000 0.000 edgecolor
newpath 516 73 moveto
546 62 585 48 616 37 curveto
stroke
0.000 0.000 0.000 edgecolor
newpath 617.43 40.23 moveto
626 34 lineto
615.42 33.52 lineto
closepath fill
1 setlinewidth
solid
0.000 0.000 0.000 edgecolor
newpath 617.43 40.23 moveto
626 34 lineto
615.42 33.52 lineto
closepath stroke
grestore
endpage
showpage
grestore
%%PageTrailer
%%EndPage: 1
%%Trailer
end
restore
%%EOF

BIN
Doc/Pics/Window_Types.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
Doc/mufasa_intro.pdf Normal file

Binary file not shown.

123
Doc/mufasa_intro.tex Normal file
View File

@ -0,0 +1,123 @@
\documentclass[a4paper, 10pt]{article}
\usepackage{graphicx}
\begin{document}
\title{Mufasa Client Class}
\author{Merlijn Wajer}
\maketitle
\section{Introduction}
This is the official Mufasa Documentation.
The main purpose of this document is to provide a clear view on Mufasa's architecture.
\section{What is Mufasa?}
Mufasa is a project that aims to create two things, a GUI to create scripts, and a Mufasa Macro Library.
The Mufasa Macro Library (MML) will provide one with a way to control the mouse and keyboard, open files, open web pages, and capturing and analyzing images.
The GUI will use MML for most of it's features. Each script thread will also use a Client class.
\subsection{Simple feature overview}
Mufasa is:
\begin{itemize}
\item Object Oriented. This means the code is generally more
readable, and easier to maintain.
\item Free Software.\footnote{License here}
\item MOAR
\end{itemize}
\section{Important Classes in MML}
\subsection{The Client Class}
The Client Class is the main Class, and is created to be able
to run seperately from the User Interface, thus being thread safe.
The Client class is mainly designed to be a container for other classes.
\begin{figure}[h]
\includegraphics[scale=0.4]{Pics/Client_Classes}
\caption{Classes that the Client contains.}
\end{figure}
\pagebreak
\subsection{The Window Class}
\begin{figure}[h]
\includegraphics[scale=0.4]{Pics/Window}
\caption{The structure of the Window class}
\end{figure}
The window class manages the core functionality for retreiving Window data, such as the actual pixels, position, or dimensions.
\begin{figure}[h]
\includegraphics[scale=0.4]{Pics/Window_Types}
\caption{Different types of Windows. Note that XWindow is only for non-Windows systems.}
\end{figure}
Figure 3 shows the three different Window Types supported by Mufasa.
Quick overview of functions:
\begin{itemize}
\item ReturnData
\item FreeReturnedData
\item GetDimensions
\item SetTargetWindow
\item SetTargetIntArray
\item SetTargetXWindow
\item GetPixel
\end{itemize}
Together, these functions form the core of the window management, except for input.
\subsection{The Input Class}
The Input Class is the class that takes care of all the input.
\begin{figure}[h]
\includegraphics[scale=0.4]{Pics/Input_Diag}
\caption{Input Functionality.}
\end{figure}
As one can see in Figure 4, MML aims to support both Silent and non Silent Input.
Since the Input heavily differs per operating system, the Input class should have a general way of sending keys, possibly at the expense of losing some functionality.
\subsection{The Color Convertions Include}
This .inc file contains pascal code to quickly convert one colour type to another.
It also adds support for comparing colours. The reason this is not a class, is because constantly dereferencing a class to call a single function doesn't do the speed of a program any good. There also wasn't really a need for a class, since none of these functions need to be initialized in any way.
\subsection{The Colour Class}
The colour class is a Class that does all the colour identfying and locating work. (FindColor, for example)
The colour class uses the Convertions include for several of it's functions.
A FindColor-derivative function in Mufasa exists generally out of the following steps:
\begin{itemize}
\item Retrieve Client Data.
\item Loop over the data, possibly with a special algorithm.
\item Check the current pixel data against another colour, possibly with tolerance.
\item Free the Client Data.
\item Return found point(s).
\end{itemize}
\begin{figure}[h]
\includegraphics[scale=0.4]{Pics/FindColor}
\caption{A basic find colour.}
\end{figure}
\subsection{Notes on the previously mentioned classes}
At this point it is unsure if the Input class will also take care of Sockets and Files. Most likely these will get their own class.
\section{More On The Core Classes}
The previously mentioned MML classes are considered to be the absolute core of the library. (Although one could argue that even the Colour class isn't part of the core classes.)
With these classes most functions that Mufasa will contain can be created. if you can make FindColor, you can make FindColorsSpiralTolerance, they don't really differ a lot. The same goes for DTM's, OCR and Bitmaps. Mouse and keyboard functions will be done with the Input class.
The MML contains more classes, and they will mainly utilize the previous mentioned classes.
It is essential to understand the Classes architecture to fully understand Mufasa.
Before work on other classes will be done, the core classes must be finished and stable.
\end{document}

41
Units/MMLCore/client.pas Normal file
View File

@ -0,0 +1,41 @@
unit Client;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, MufasaTypes, Window, Input;
type
TClient = class(TObject)
constructor Create;
destructor Destroy; override;
public
MWindow: TMWindow;
MInput: TMInput;
end;
implementation
// Possibly pass arguments to a default window.
constructor TClient.Create;
begin
inherited Create;
MWindow := TMWindow.Create(Self);
MInput := TMInput.Create(Self);
end;
destructor TClient.Destroy;
begin
MWindow.Destroy;
MInput.Destroy;
inherited;
end;
end.

44
Units/MMLCore/input.pas Normal file
View File

@ -0,0 +1,44 @@
unit Input;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, mufasatypes;
type
TMInput = class(TObject)
constructor Create(Client: TObject);
destructor Destroy; override;
procedure GetMousePos(var X, Y: Integer);
public
Client: TObject;
end;
implementation
uses
Client;
constructor TMInput.Create(Client: TObject);
begin
inherited Create;
Self.Client := Client;
end;
destructor TMInput.Destroy;
begin
inherited;
end;
procedure TMInput.GetMousePos(var X, Y: Integer);
begin
end;
end.

View File

@ -0,0 +1,23 @@
unit MufasaTypes;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
type
TRGB32 = packed record
B, G, R, A: Byte;
end;
PRGB32 = ^TRGB32;
TTargetWindowMode = (w_BMP, w_Window, w_HDC, w_ArrayPtr, w_XWindow);
implementation
end.

172
Units/MMLCore/window.pas Normal file
View File

@ -0,0 +1,172 @@
unit Window;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, mufasatypes
{$IFDEF LINUX}, xlib, x, xutil, ctypes{$ENDIF};
type
TMWindow = class(TObject)
function ReturnData(xs, ys, width, height: Integer): PRGB32;
procedure FreeReturnData;
procedure GetDimensions(var W, H: Integer);
constructor Create(Client: TObject);
destructor Destroy; override;
protected
// Reference to client.
Client: TObject;
// Target Window Mode.
TargetMode: TTargetWindowMode;
{$IFDEF LINUX}
// X Display
XDisplay: PDisplay;
// Connection Number
XConnectionNumber: Integer;
// X Window
CurWindow: QWord;
// Desktop Window
DesktopWindow: QWord;
// X Screen
XScreen: PScreen;
// X Screen Number
XScreenNum: Integer;
// The X Image pointer.
XWindowImage: PXImage;
{$IFDEF M_MEMORY_DEBUG}
// XImageFreed should be True if there is currently no
// XImage loaded. If one is loaded, XImageFreed is true.
// If ReturnData is called while XImageFreed is false,
// we throw an exception.
// Same for FreeReturnData with XImageFreed true.
XImageFreed: Boolean;
{$ENDIF}
{$ELSE}
{$ENDIF}
end;
implementation
uses
Client;
constructor TMWindow.Create(Client: TObject);
begin
inherited Create;
Self.Client := Client;
{$IFDEF LINUX}
Self.TargetMode := w_XWindow;
Self.XDisplay := XOpenDisplay(nil);
if Self.XDisplay = nil then
begin
// throw Exception
end;
Self.XConnectionNumber:= ConnectionNumber(Self.XDisplay);
Self.XScreen := XDefaultScreenOfDisplay(Self.XDisplay);
Self.XScreenNum:= DefaultScreen(Self.XDisplay);
Self.DesktopWindow:= RootWindow(Self.XDisplay, Self.XScreenNum);
Self.CurWindow:= Self.DesktopWindow;
{$ELSE}
// Set Target mode for windows.
{$ENDIF}
end;
destructor TMWindow.Destroy;
begin
{$IFDEF LINUX}
XCloseDisplay(Self.XDisplay);
{$ENDIF}
inherited;
end;
function TMWindow.ReturnData(xs, ys, width, height: Integer): PRGB32;
begin
end;
procedure TMWindow.FreeReturnData;
begin
end;
// Too global.
function MufasaXErrorHandler(para1:PDisplay; para2:PXErrorEvent):cint;cdecl;
begin;
result := 0;
Writeln('X Error: ');
writeln('Error code: ' + inttostr(para2^.error_code));
writeln('Display: ' + inttostr(LongWord(para2^.display)));
writeln('Minor code: ' + inttostr(para2^.minor_code));
writeln('Request code: ' + inttostr(para2^.request_code));
writeln('Resource ID: ' + inttostr(para2^.resourceid));
writeln('Serial: ' + inttostr(para2^.serial));
writeln('Type: ' + inttostr(para2^._type));
end;
procedure TMWindow.GetDimensions(var W, H: Integer);
{$IFDEF LINUX}
var
Attrib: TXWindowAttributes;
newx,newy : integer;
childwindow : x.TWindow;
Old_Handler: TXErrorHandler;
{$ENDIF}
begin
case TargetMode of
w_Window:
begin
end;
w_XWindow:
begin
{$IFDEF LINUX}
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
if XGetWindowAttributes(Self.XDisplay, Self.CurWindow, @Attrib) <> 0 Then
begin
XTranslateCoordinates(Self.XDisplay, Self.CurWindow, self.DesktopWindow, 0,0,@newx,@newy, @childwindow);
W := Attrib.Width;
H := Attrib.Height;
end else
begin
W := -1;
H := -1;
end;
XSetErrorHandler(Old_Handler);
{$ELSE}
WriteLn('You dummy! How are you going to use w_XWindow on non Linux systems?');
{$ENDIF}
End;
w_ArrayPtr:
begin
end;
end;
end;
end.

202
project1.lpi Normal file
View File

@ -0,0 +1,202 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="7"/>
<General>
<MainUnit Value="0"/>
<TargetFileExt Value=""/>
<UseXPManifest Value="True"/>
<ActiveEditorIndexAtStart Value="1"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="9">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<CursorPos X="45" Y="20"/>
<TopLine Value="1"/>
<EditorIndex Value="1"/>
<UsageCount Value="27"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="64" Y="46"/>
<TopLine Value="18"/>
<EditorIndex Value="0"/>
<UsageCount Value="27"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="client.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Client"/>
<CursorPos X="18" Y="34"/>
<TopLine Value="10"/>
<UsageCount Value="27"/>
</Unit2>
<Unit3>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<UnitName Value="CompTypes"/>
<CursorPos X="62" Y="426"/>
<TopLine Value="426"/>
<EditorIndex Value="2"/>
<UsageCount Value="14"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="mufasatypes.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MufasaTypes"/>
<CursorPos X="52" Y="20"/>
<TopLine Value="1"/>
<UsageCount Value="27"/>
</Unit4>
<Unit5>
<Filename Value="window.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Window"/>
<CursorPos X="4" Y="100"/>
<TopLine Value="85"/>
<UsageCount Value="27"/>
</Unit5>
<Unit6>
<Filename Value="../../Documents/fpc/rtl/inc/systemh.inc"/>
<CursorPos X="3" Y="261"/>
<TopLine Value="246"/>
<UsageCount Value="9"/>
</Unit6>
<Unit7>
<Filename Value="input.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Input"/>
<CursorPos X="5" Y="20"/>
<TopLine Value="15"/>
<UsageCount Value="26"/>
</Unit7>
<Unit8>
<Filename Value="../cogat/Units/CogatUnits/compinput.pas"/>
<UnitName Value="CompInput"/>
<CursorPos X="39" Y="486"/>
<TopLine Value="469"/>
<EditorIndex Value="3"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit8>
</Units>
<JumpHistory Count="14" HistoryIndex="13">
<Position1>
<Filename Value="unit1.pas"/>
<Caret Line="14" Column="31" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
<Caret Line="17" Column="38" TopLine="3"/>
</Position2>
<Position3>
<Filename Value="../cogat/Units/CogatUnits/compinput.pas"/>
<Caret Line="7" Column="22" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="113" Column="45" TopLine="111"/>
</Position4>
<Position5>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="161" Column="27" TopLine="146"/>
</Position5>
<Position6>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="3" Column="87" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="97" Column="32" TopLine="82"/>
</Position7>
<Position8>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="161" Column="31" TopLine="148"/>
</Position8>
<Position9>
<Filename Value="../cogat/Units/CogatUnits/comptypes.pas"/>
<Caret Line="426" Column="59" TopLine="411"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
<Caret Line="14" Column="55" TopLine="1"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
<Caret Line="17" Column="46" TopLine="1"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
<Caret Line="32" Column="43" TopLine="16"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
<Caret Line="44" Column="4" TopLine="18"/>
</Position13>
<Position14>
<Filename Value="project1.lpr"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position14>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/"/>
<OtherUnitFiles Value="$(ProjPath)/Units/MMLCore/"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

21
project1.lpr Normal file
View File

@ -0,0 +1,21 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, LResources, Client, MufasaTypes, Window, Input
{ you can add units after this };
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
begin
{$I project1.lrs}
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

5237
project1.lrs Normal file

File diff suppressed because it is too large Load Diff

19
unit1.lfm Normal file
View File

@ -0,0 +1,19 @@
object Form1: TForm1
Left = 293
Height = 516
Top = 200
Width = 779
Caption = 'Form1'
ClientHeight = 516
ClientWidth = 779
LCLVersion = '0.9.29'
object Button1: TButton
Left = 69
Height = 25
Top = 32
Width = 75
Caption = 'Button1'
OnClick = Button1Click
TabOrder = 0
end
end

7
unit1.lrs Normal file
View File

@ -0,0 +1,7 @@
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'%'#1#6'Height'#3#4#2#3'Top'#3#200#0#5'Wid'
+'th'#3#11#3#7'Caption'#6#5'Form1'#12'ClientHeight'#3#4#2#11'ClientWidth'#3#11
+#3#10'LCLVersion'#6#6'0.9.29'#0#7'TButton'#7'Button1'#4'Left'#2'E'#6'Height'
+#2#25#3'Top'#2' '#5'Width'#2'K'#7'Caption'#6#7'Button1'#7'OnClick'#7#12'Butt'
+'on1Click'#8'TabOrder'#2#0#0#0#0
]);

47
unit1.pas Normal file
View File

@ -0,0 +1,47 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Client;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
Var
Client: TClient;
w,h:integer;
begin
Client := TClient.Create;
Client.MWindow.GetDimensions(w, h);
writeln(inttostr(w) + ' , ' + inttostr(h));
Client.Destroy;
end;
initialization
{$I unit1.lrs}
end.