Changeset 1150 for framspy


Ignore:
Timestamp:
10/01/21 17:11:05 (3 years ago)
Author:
sz
Message:

low level functions for getting more info about framsticks object properties (flags, full names, help texts, groups)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • framspy/frams.py

    r1146 r1150  
    152152                return ExtValue._stringFromC(c_api.extStringValue(self.__ptr))
    153153
     154
     155        def _propCount(self):
     156                return c_api.extPropCount(self.__ptr)
     157
     158        def _propId(self,i):
     159                return ExtValue._stringFromC(c_api.extPropId(self.__ptr,i))
     160
     161        def _propName(self,i):
     162                return ExtValue._stringFromC(c_api.extPropName(self.__ptr,i))
     163
     164        def _propType(self,i):
     165                return ExtValue._stringFromC(c_api.extPropType(self.__ptr,i))
     166
     167        def _propHelp(self,i):
     168                h=c_api.extPropHelp(self.__ptr,i) #unlike other string fields, help is sometimes NULL
     169                return ExtValue._stringFromC(h) if h!=None else '';
     170
     171        def _propFlags(self,i):
     172                return c_api.extPropFlags(self.__ptr,i)
     173
     174        def _propGroup(self,i):
     175                return c_api.extPropGroup(self.__ptr,i)
     176
     177        def _groupCount(self):
     178                return c_api.extGroupCount(self.__ptr)
     179
     180        def _groupName(self,i):
     181                return ExtValue._stringFromC(c_api.extGroupName(self.__ptr,i))
     182
     183        def _groupMember(self,g,i):
     184                return c_api.extGroupMember(self.__ptr,g,i)
     185
     186        def _memberCount(self,g):
     187                return c_api.extMemberCount(self.__ptr,g)
    154188
    155189        def __str__(self):
     
    336370        c_api.extPropId.argtypes = [ctypes.c_void_p, ctypes.c_int]
    337371        c_api.extPropId.restype = ctypes.c_char_p
     372        c_api.extPropName.argtypes = [ctypes.c_void_p, ctypes.c_int]
     373        c_api.extPropName.restype = ctypes.c_char_p
    338374        c_api.extPropType.argtypes = [ctypes.c_void_p, ctypes.c_int]
    339375        c_api.extPropType.restype = ctypes.c_char_p
     376        c_api.extPropGroup.argtypes = [ctypes.c_void_p, ctypes.c_int]
     377        c_api.extPropGroup.restype = ctypes.c_int
     378        c_api.extPropFlags.argtypes = [ctypes.c_void_p, ctypes.c_int]
     379        c_api.extPropFlags.restype = ctypes.c_int
     380        c_api.extPropHelp.argtypes = [ctypes.c_void_p, ctypes.c_int]
     381        c_api.extPropHelp.restype = ctypes.c_char_p
    340382        c_api.extPropFind.argtypes = [ctypes.c_void_p, ctypes.c_char_p]
    341383        c_api.extPropFind.restype = ctypes.c_int
     
    346388        c_api.extPropCall.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int, ctypes.c_void_p]
    347389        c_api.extPropCall.restype = ctypes.c_void_p
     390        c_api.extGroupCount.argtypes = [ctypes.c_void_p]
     391        c_api.extGroupCount.restype = ctypes.c_int
     392        c_api.extGroupName.argtypes = [ctypes.c_void_p, ctypes.c_int]
     393        c_api.extGroupName.restype = ctypes.c_char_p
     394        c_api.extGroupMember.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]
     395        c_api.extGroupMember.restype = ctypes.c_int
     396        c_api.extMemberCount.argtypes = [ctypes.c_void_p, ctypes.c_int]
     397        c_api.extMemberCount.restype = ctypes.c_int
    348398        c_api.rootObject.argtypes = []
    349399        c_api.rootObject.restype = ctypes.c_void_p
Note: See TracChangeset for help on using the changeset viewer.