1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 16:55:01 -05:00

More libMML

This commit is contained in:
Merlijn Wajer 2010-06-01 01:59:48 +02:00
parent 168b8a3c03
commit 0d2ad4a81a
6 changed files with 176 additions and 136 deletions

View File

@ -42,412 +42,412 @@
<Filename Value="libmml.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="libmml"/>
<CursorPos X="26" Y="60"/>
<TopLine Value="40"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<IsVisibleTab Value="True"/>
<UsageCount Value="33"/>
<TopLine Value="202"/>
<CursorPos X="4" Y="223"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="../../../fpc/rtl/inc/systemh.inc"/>
<CursorPos X="36" Y="282"/>
<TopLine Value="259"/>
<IsVisibleTab Value="True"/>
<TopLine Value="259"/>
<CursorPos X="36" Y="282"/>
<UsageCount Value="9"/>
</Unit1>
<Unit2>
<Filename Value="../../Units/MMLCore/client.pas"/>
<UnitName Value="Client"/>
<CursorPos X="7" Y="50"/>
<TopLine Value="33"/>
<EditorIndex Value="5"/>
<WindowIndex Value="0"/>
<TopLine Value="33"/>
<CursorPos X="7" Y="50"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<UnitName Value="IOManager"/>
<CursorPos X="59" Y="30"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="59" Y="30"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="../../../lazarus/lcl/fileutil.pas"/>
<UnitName Value="FileUtil"/>
<CursorPos X="69" Y="243"/>
<TopLine Value="220"/>
<IsVisibleTab Value="True"/>
<TopLine Value="220"/>
<CursorPos X="69" Y="243"/>
<UsageCount Value="9"/>
</Unit4>
<Unit5>
<Filename Value="../../../lazarus/lcl/lclproc.pas"/>
<UnitName Value="LCLProc"/>
<CursorPos X="76" Y="43"/>
<TopLine Value="18"/>
<IsVisibleTab Value="True"/>
<TopLine Value="18"/>
<CursorPos X="76" Y="43"/>
<UsageCount Value="9"/>
</Unit5>
<Unit6>
<Filename Value="../../../lazarus/lcl/widgetset/wslclclasses.pp"/>
<UnitName Value="WSLCLClasses"/>
<CursorPos X="61" Y="18"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="61" Y="18"/>
<UsageCount Value="9"/>
</Unit6>
<Unit7>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<UnitName Value="os_linux"/>
<CursorPos X="75" Y="32"/>
<TopLine Value="56"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="56"/>
<CursorPos X="75" Y="32"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="../../../fpc/packages/x11/src/xlib.pp"/>
<UnitName Value="xlib"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit8>
<Unit9>
<Filename Value="../../../lazarus/lcl/interfaces/nogui/interfaces.pp"/>
<UnitName Value="Interfaces"/>
<CursorPos X="19" Y="7"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="19" Y="7"/>
<UsageCount Value="9"/>
</Unit9>
<Unit10>
<Filename Value="../../../fpc/packages/fcl-base/src/syncobjs.pp"/>
<UnitName Value="syncobjs"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="146"/>
<IsVisibleTab Value="True"/>
<TopLine Value="146"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit10>
<Unit11>
<Filename Value="../../../fpc/rtl/unix/sysutils.pp"/>
<UnitName Value="sysutils"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit11>
<Unit12>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<UnitName Value="finder"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit12>
<Unit13>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<UnitName Value="bitmaps"/>
<CursorPos X="29" Y="122"/>
<TopLine Value="100"/>
<EditorIndex Value="4"/>
<WindowIndex Value="0"/>
<TopLine Value="100"/>
<CursorPos X="29" Y="122"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="../../../lazarus/lcl/graphics.pp"/>
<UnitName Value="Graphics"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="23"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="23"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="../../../lazarus/lcl/graphtype.pp"/>
<UnitName Value="GraphType"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit15>
<Unit16>
<Filename Value="../../Units/MMLCore/mufasabase.pas"/>
<UnitName Value="mufasabase"/>
<CursorPos X="2" Y="6"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="2" Y="6"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="../../Units/Linux/xtest.pas"/>
<UnitName Value="XTest"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit17>
<Unit18>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<UnitName Value="MufasaTypes"/>
<CursorPos X="61" Y="108"/>
<TopLine Value="306"/>
<EditorIndex Value="7"/>
<WindowIndex Value="0"/>
<TopLine Value="306"/>
<CursorPos X="61" Y="108"/>
<UsageCount Value="15"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="../../../lazarus/components/mouseandkeyinput/xkeyinput.pas"/>
<UnitName Value="XKeyInput"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit19>
<Unit20>
<Filename Value="../../../fpc/packages/x11/src/keysym.pp"/>
<UnitName Value="keysym"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit20>
<Unit21>
<Filename Value="../../../lazarus/lcl/lcltype.pp"/>
<UnitName Value="LCLType"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="34"/>
<IsVisibleTab Value="True"/>
<TopLine Value="34"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit21>
<Unit22>
<Filename Value="../../../lazarus/lcl/lclintf.pas"/>
<UnitName Value="LCLIntf"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="34"/>
<IsVisibleTab Value="True"/>
<TopLine Value="34"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit22>
<Unit23>
<Filename Value="../../Units/MMLCore/libloader.pas"/>
<UnitName Value="libloader"/>
<CursorPos X="57" Y="48"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="57" Y="48"/>
<UsageCount Value="9"/>
</Unit23>
<Unit24>
<Filename Value="../../Units/Linux/xinput.pas"/>
<UnitName Value="xinput"/>
<CursorPos X="71" Y="780"/>
<TopLine Value="763"/>
<IsVisibleTab Value="True"/>
<TopLine Value="763"/>
<CursorPos X="71" Y="780"/>
<UsageCount Value="9"/>
</Unit24>
<Unit25>
<Filename Value="../../../fpc/packages/x11/src/x.pp"/>
<UnitName Value="x"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="387"/>
<IsVisibleTab Value="True"/>
<TopLine Value="387"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit25>
<Unit26>
<Filename Value="../../Units/MMLCore/tpa.pas"/>
<UnitName Value="tpa"/>
<CursorPos X="3" Y="206"/>
<TopLine Value="12"/>
<IsVisibleTab Value="True"/>
<TopLine Value="12"/>
<CursorPos X="3" Y="206"/>
<UsageCount Value="9"/>
</Unit26>
<Unit27>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<UnitName Value="ocr"/>
<CursorPos X="33" Y="33"/>
<TopLine Value="63"/>
<IsVisibleTab Value="True"/>
<TopLine Value="63"/>
<CursorPos X="33" Y="33"/>
<UsageCount Value="9"/>
</Unit27>
<Unit28>
<Filename Value="../../../lazarus/lcl/widgetset/wsreferences.pp"/>
<UnitName Value="WSReferences"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit28>
<Unit29>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<UnitName Value="mufasatypesutil"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="41"/>
<IsVisibleTab Value="True"/>
<TopLine Value="41"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit29>
<Unit30>
<Filename Value="../../Units/MMLCore/colour_conv.pas"/>
<UnitName Value="colour_conv"/>
<CursorPos X="6" Y="33"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="6" Y="33"/>
<UsageCount Value="9"/>
</Unit30>
<Unit31>
<Filename Value="../../../fpc/rtl/objpas/math.pp"/>
<UnitName Value="math"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="23"/>
<IsVisibleTab Value="True"/>
<TopLine Value="23"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit31>
<Unit32>
<Filename Value="../../Units/MMLCore/dtm.pas"/>
<UnitName Value="dtm"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="9"/>
</Unit32>
<Unit33>
<Filename Value="../../Units/MMLCore/dtmutil.pas"/>
<UnitName Value="dtmutil"/>
<CursorPos X="18" Y="76"/>
<TopLine Value="1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="1"/>
<CursorPos X="18" Y="76"/>
<UsageCount Value="9"/>
</Unit33>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="libmml.lpr"/>
<Caret Line="7" Column="15" TopLine="1"/>
<Caret Line="30" Column="2" TopLine="4"/>
</Position1>
<Position2>
<Filename Value="libmml.lpr"/>
<Caret Line="24" Column="76" TopLine="1"/>
<Caret Line="6" Column="17" TopLine="1"/>
</Position2>
<Position3>
<Filename Value="libmml.lpr"/>
<Caret Line="7" Column="8" TopLine="1"/>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="30" Column="80" TopLine="12"/>
</Position3>
<Position4>
<Filename Value="libmml.lpr"/>
<Caret Line="12" Column="11" TopLine="1"/>
<Filename Value="../../Units/MMLCore/mufasabase.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="15" TopLine="1"/>
<Caret Line="6" Column="23" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="libmml.lpr"/>
<Caret Line="31" Column="25" TopLine="1"/>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="122" Column="11" TopLine="105"/>
</Position6>
<Position7>
<Filename Value="libmml.lpr"/>
<Caret Line="30" Column="2" TopLine="4"/>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="30" Column="59" TopLine="1"/>
</Position7>
<Position8>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="17" TopLine="1"/>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="123" Column="7" TopLine="100"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="30" Column="80" TopLine="12"/>
<Caret Line="122" Column="29" TopLine="100"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLCore/mufasabase.pas"/>
<Caret Line="1" Column="1" TopLine="1"/>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="33" Column="40" TopLine="23"/>
</Position10>
<Position11>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="23" TopLine="1"/>
<Caret Line="6" Column="18" TopLine="1"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="122" Column="11" TopLine="105"/>
<Filename Value="libmml.lpr"/>
<Caret Line="19" Column="19" TopLine="1"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLCore/iomanager.pas"/>
<Caret Line="30" Column="59" TopLine="1"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="85" Column="21" TopLine="68"/>
</Position13>
<Position14>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="123" Column="7" TopLine="100"/>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="26" Column="79" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/bitmaps.pas"/>
<Caret Line="122" Column="29" TopLine="100"/>
<Filename Value="libmml.lpr"/>
<Caret Line="27" Column="32" TopLine="1"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="33" Column="40" TopLine="23"/>
<Filename Value="libmml.lpr"/>
<Caret Line="44" Column="42" TopLine="13"/>
</Position16>
<Position17>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="18" TopLine="1"/>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="79" Column="5" TopLine="52"/>
</Position17>
<Position18>
<Filename Value="libmml.lpr"/>
<Caret Line="19" Column="19" TopLine="1"/>
<Caret Line="44" Column="65" TopLine="26"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="85" Column="21" TopLine="68"/>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="51" TopLine="1"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/os_linux.pas"/>
<Caret Line="26" Column="79" TopLine="1"/>
<Filename Value="libmml.lpr"/>
<Caret Line="44" Column="57" TopLine="26"/>
</Position20>
<Position21>
<Filename Value="libmml.lpr"/>
<Caret Line="27" Column="32" TopLine="1"/>
<Caret Line="6" Column="69" TopLine="1"/>
</Position21>
<Position22>
<Filename Value="libmml.lpr"/>
<Caret Line="44" Column="42" TopLine="13"/>
<Caret Line="64" Column="10" TopLine="35"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="79" Column="5" TopLine="52"/>
<Filename Value="libmml.lpr"/>
<Caret Line="54" Column="4" TopLine="36"/>
</Position23>
<Position24>
<Filename Value="libmml.lpr"/>
<Caret Line="44" Column="65" TopLine="26"/>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<Caret Line="103" Column="16" TopLine="88"/>
</Position24>
<Position25>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="51" TopLine="1"/>
<Caret Line="55" Column="51" TopLine="40"/>
</Position25>
<Position26>
<Filename Value="libmml.lpr"/>
<Caret Line="44" Column="57" TopLine="26"/>
<Caret Line="11" Column="21" TopLine="1"/>
</Position26>
<Position27>
<Filename Value="libmml.lpr"/>
<Caret Line="6" Column="69" TopLine="1"/>
<Caret Line="57" Column="6" TopLine="40"/>
</Position27>
<Position28>
<Filename Value="libmml.lpr"/>
<Caret Line="64" Column="10" TopLine="35"/>
<Caret Line="154" Column="22" TopLine="137"/>
</Position28>
<Position29>
<Filename Value="libmml.lpr"/>
<Caret Line="54" Column="4" TopLine="36"/>
<Caret Line="113" Column="50" TopLine="89"/>
</Position29>
<Position30>
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<Caret Line="103" Column="16" TopLine="88"/>
<Filename Value="libmml.lpr"/>
<Caret Line="111" Column="38" TopLine="89"/>
</Position30>
</JumpHistory>
</ProjectOptions>

View File

@ -9,7 +9,6 @@ uses
type
PTPoint = ^TPoint;
PPDTM = ^PDTM;
Const
@ -31,12 +30,6 @@ begin
result:=0;
end;
function test: pchar; cdecl;
begin
result := PChar('hello world');
raise exception.Create('wat');
end;
{ Mouse }
function getMousePos(var t: tpoint): integer; cdecl;
@ -56,7 +49,7 @@ end;
function setMousePos(var t: tpoint): integer; cdecl;
begin
try
C.IOManager.SetMousePos(t.x,t.y);
C.IOManager.MoveMouse(t.x,t.y);
result := RESULT_OK;
except on e : Exception do
begin
@ -109,6 +102,11 @@ begin
end;
function findColor(var x, y: integer; color, x1, y1, x2, y2: integer): boolean;
begin
C.MFinder.FindColor(x, y, color, x1, y1, x2, y2);
end;
function returnpoints: PTPoint; cdecl;
begin
@ -131,7 +129,7 @@ begin
i := i + 1;
end;
function givedtm:PPDTM; cdecl;
{function givedtm:PPDTM; cdecl;
var
dtm: PPDTM;
begin
@ -152,7 +150,7 @@ begin
result:=dtm;
//result.n := PChar('wat');
//writeln('woohoo');
end;
end; }
function returnarray: tpointarray; cdecl;
var
@ -214,17 +212,19 @@ end;
exports
test,
init,
{ Mouse }
getMousePos,
setMousePos,
getMouseButtonState,
setMouseButtonState,
{ Finder }
findColor,
returnpoints,
printpoints,
hoi,
givedtm,
givedtm2,
returnarray,
printarray,
fpc_freemem_,

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
from ctypes import *
import platform
from mmlmouse import Mouse
from mmlcolor import Color
from time import sleep
class MMLCoreException(Exception):
@ -28,12 +28,19 @@ class MMLCore(object):
DLL = MMLCore('../libmml.so')
c = Color(DLL)
ret = c.find((0, 0, 100, 100), 0)
print ret
m = Mouse(DLL)
print m[(Mouse.Pos, Mouse.Left, Mouse.Right)]
m[(Mouse.Pos, Mouse.Right)] = ((300,300), True)
print m.getButtonStates()
sleep(0.5)
m.setPos((200,200))
sleep(2)
@ -43,7 +50,8 @@ for v in zip((Mouse.Left, Mouse.Right), m[(Mouse.Left, Mouse.Right)]):
print v
print m.getPos()
if hasattr(ret,'__iter__'):
m.setPos(ret)
del DLL

View File

@ -0,0 +1,30 @@
from ctypes import *
from mmltypes import isiterable
from mmltypes import POINT, PPOINT, PINTEGER
class ColorException(Exception):
def __init__(self, err):
Exception.__init__(self, err)
# FIXME: Complete...
class Color(object):
'''
The Color class.
'''
_mc = None
def __init__(self, MC):
self._mc = MC
self._initialiseDLLFuncs()
def find(self, box, color):
x, y = (c_int(-1), c_int(-1))
self._mc.dll.findColor(byref(x), byref(y), color, *box)
return (x, y)
def _initialiseDLLFuncs(self):
self._mc.dll.findColor.restype = c_bool
self._mc.dll.findColor.argtypes = [PINTEGER, PINTEGER, c_int, c_int,
c_int, c_int, c_int]

View File

@ -19,7 +19,7 @@ class Mouse(object):
_mc = None
Left, Right, Middle, Pos = 'Left', 'Right', 'Middle', 'Pos'
# last pointer position
# last mouse pointer position
_lpp = (0, 0)
def __init__(self, MC):
@ -87,7 +87,7 @@ class Mouse(object):
else:
if item in ak:
if item == self.Pos:
self_.setMousePos(value)
self._setMousePos(value)
elif item in self._getButtons().keys():
self._setMouseButtonState(self._buttonToInt(item), \
1 if value else 0)
@ -135,7 +135,8 @@ class Mouse(object):
return ok == 1
def _setMouseButtonState(self, button, state):
ok = self._mc.dll.setMouseButtonState(c_int(button), c_int(state), *map(lambda x: c_int(x), self._getMousePos()))
ok = self._mc.dll.setMouseButtonState(c_int(button), c_int(state),
*map(lambda x: c_int(x), self._getMousePos()))
if ok != 0:
pass # Raise exception
return ok

View File

@ -9,5 +9,6 @@ class POINT(Structure):
('y', c_int)]
PPOINT = POINTER(POINT)
PINTEGER = POINTER(c_int)
isiterable = lambda x: hasattr(x, '__iter__')