Esempio n. 1
0
 def string_from_bytes(self, target, obj, strng):
     self.smart.exp_stringFromBytes.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_char_p
     ]
     self.smart.exp_stringFromBytes.restype = ct.c_int
     return self.smart.exp_stringFromBytes(target, obj,
                                           Sh.string_to_char_p(strng))
Esempio n. 2
0
 def get_field_byte(self, target, obj, path):
     self.smart.exp_getFieldByte.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_char_p
     ]
     self.smart.exp_getFieldByte.restype = ct.c_int
     return self.smart.exp_getFieldByte(target, obj,
                                        Sh.string_to_char_p(path))
Esempio n. 3
0
 def get_field_float(self, target, obj, path):
     self.smart.exp_getFieldFloat.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_char_p
     ]
     self.smart.exp_getFieldFloat.restype = ct.c_double
     return self.smart.exp_getFieldFloat(target, obj,
                                         Sh.string_to_char_p(path))
Esempio n. 4
0
 def is_path_valid(self, target, obj, path):
     self.smart.exp_isPathValid.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_char_p
     ]
     self.smart.exp_isPathValid.restype = ct.c_bool
     return self.smart.exp_isPathValid(target, obj,
                                       Sh.string_to_char_p(path))
Esempio n. 5
0
 def send_keys(self, target, text, keywait, keymodwait):
     self.smart.exp_sendKeys.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_char_p, ct.c_int, ct.c_int
     ]
     self.smart.exp_sendKeys.restype = None
     self.smart.exp_sendKeys(target, Sh.string_to_char_p(text), keywait,
                             keymodwait)
Esempio n. 6
0
 def get_field_array_char(self, target, obj, path, index):
     self.smart.exp_getFieldArrayChar.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_void_p, ct.c_int
     ]
     self.smart.exp_getFieldArrayChar.restype = ct.c_int
     return self.smart.exp_getFieldArrayChar(target, obj,
                                             Sh.string_to_char_p(path),
                                             index)
Esempio n. 7
0
 def get_field_array_size(self, target, obj, path, dimension):
     self.smart.exp_getFieldArraySize.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_void_p, ct.c_int
     ]
     self.smart.exp_getFieldArraySize.restype = ct.c_int
     return self.smart.exp_getFieldArraySize(target, obj,
                                             Sh.string_to_char_p(path),
                                             dimension)
Esempio n. 8
0
 def get_field_array_2d_short(self, target, obj, path, x, y):
     self.smart.exp_getFieldArray2DShort.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_void_p, ct.c_int,
         ct.c_int
     ]
     self.smart.exp_getFieldArray2DShort.restype = ct.c_int
     return self.smart.exp_getFieldArray2DShort(target, obj,
                                                Sh.string_to_char_p(path),
                                                x, y)
Esempio n. 9
0
 def get_field_array_3d_long_l(self, target, obj, path, x, y, z):
     self.smart.exp_getFieldArray3DLongL.argtypes = [
         ct.POINTER(Sh.SMARTClient), ct.c_void_p, ct.c_void_p, ct.c_int,
         ct.c_int, ct.c_int
     ]
     self.smart.exp_getFieldArray3DLongL.restype = ct.c_int
     return self.smart.exp_getFieldArray3DLongL(target, obj,
                                                Sh.string_to_char_p(path),
                                                x, y, z)
Esempio n. 10
0
 def get_target_dimensions(self, target):
     width = ct.c_int()
     height = ct.c_int()
     self.smart.EIOS_GetTargetDimensions.argtypes = [
         ct.POINTER(ct.c_int), ct.POINTER(ct.c_int)
     ]
     self.smart.EIOS_GetTargetDimensions.restype = None
     self.smart.EIOS_GetTargetDimensions(target, ct.byref(width),
                                         ct.byref(height))
     return Sh.Size(width, height)
Esempio n. 11
0
 def get__mouse_position(self, target):
     x = ct.c_int()
     y = ct.c_int()
     self.smart.EIOS_GetMousePosition.argtypes = [
         ct.POINTER(Sh.SMARTClient),
         ct.POINTER(ct.c_int),
         ct.POINTER(ct.c_int)
     ]
     self.smart.EIOS_GetMousePosition.restype = None
     self.smart.EIOS_GetMousePosition(target, ct.byref(x), ct.byref(y))
     return Sh.Point(x, y)
Esempio n. 12
0
 def spawn_client(self, java_exec, remote_path, root, params, width, height,
                  initseq, useragent, javaargs, plugins):
     self.smart.exp_spawnClient.argtypes = [
         ct.c_char_p, ct.c_char_p, ct.c_char_p, ct.c_char_p, ct.c_int,
         ct.c_int, ct.c_char_p, ct.c_char_p, ct.c_char_p, ct.c_char_p
     ]
     self.smart.exp_spawnClient.restype = ct.POINTER(Sh.SMARTClient)
     return self.smart.exp_spawnClient(Sh.string_to_char_p(java_exec),
                                       Sh.string_to_char_p(remote_path),
                                       Sh.string_to_char_p(root),
                                       Sh.string_to_char_p(params), width,
                                       height, Sh.string_to_char_p(initseq),
                                       Sh.string_to_char_p(useragent),
                                       Sh.string_to_char_p(javaargs),
                                       Sh.string_to_char_p(plugins))
Esempio n. 13
0
def get_int(reference, hook):
    return Sh.get_overflow(
        Smart.smart_instance.get_field_int(Smart.smart_instance.target,
                                           reference, hook[0]) * hook[1])
Esempio n. 14
0
def string_from_bytes(reference, strng):
    return Smart.smart_instance.smart.exp_stringFromBytes(
        Smart.smart_instance.target, reference, Sh.string_to_char_p(strng))
Esempio n. 15
0
def get_array_2d_bool(reference, hook, x, y):
    return Smart.smart_instance.smart.exp_getFieldArray2DBool(
        Smart.smart_instance.target, reference, Sh.string_to_char_p(hook[0]),
        x, y)