NAVIGATOR_INVOKE_QUERY_ACTION_TYPE_ALL = 2 navigator_invoke_query_action_type_t = c_int NAVIGATOR_INVOKE_PERIMETER_TYPE_UNSPECIFIED = 0 NAVIGATOR_INVOKE_PERIMETER_TYPE_PERSONAL = 1 NAVIGATOR_INVOKE_PERIMETER_TYPE_ENTERPRISE = 2 navigator_invoke_perimeter_type_t = c_int NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_UNSPECIFIED = 0 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_PRESERVE = 1 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_COPY_RO = 2 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_COPY_RW = 3 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_LINK = 4 navigator_invoke_file_transfer_mode_t = c_int navigator_invoke_invocation_create = _func(c_int, POINTER(POINTER(navigator_invoke_invocation_t))) navigator_invoke_invocation_destroy = _func(c_int, POINTER(navigator_invoke_invocation_t)) navigator_invoke_invocation_set_id = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_target = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_source = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_action = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_type = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_uri = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_file_transfer_mode = _func(c_int, POINTER(navigator_invoke_invocation_t), navigator_invoke_file_transfer_mode_t) navigator_invoke_invocation_set_data = _func(c_int, POINTER(navigator_invoke_invocation_t), c_void_p, c_int) navigator_invoke_invocation_set_perimeter = _func(c_int, POINTER(navigator_invoke_invocation_t), navigator_invoke_perimeter_type_t) navigator_invoke_invocation_set_metadata = _func(c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_target_type_mask = _func(c_int, POINTER(navigator_invoke_invocation_t), c_int) navigator_invoke_invocation_get_id = _func(c_char_p, POINTER(navigator_invoke_invocation_t)) navigator_invoke_invocation_get_target = _func(c_char_p, POINTER(navigator_invoke_invocation_t)) navigator_invoke_invocation_get_source = _func(c_char_p, POINTER(navigator_invoke_invocation_t))
BATTERY_CHARGING_NOT_CHARGING = 0 BATTERY_CHARGING_TRICKLE_CHARGING = 1 BATTERY_CHARGING_CONSTANT_CURRENT = 2 BATTERY_CHARGING_CONSTANT_VOLTAGE = 3 BATTERY_CHARGING_DONE_CHARGING = 4 battery_charging_state_t = c_int BATTERY_TIME_NA = 65535 BATTERY_INVALID_VALUE = 80000000 battery_special_values_t = c_int class battery_info_t(Structure): _fields_ = [] battery_request_events = _func(c_int, c_int) battery_stop_events = _func(c_int, c_int) battery_get_domain = _func(c_int) battery_event_get_info = _func(POINTER(battery_info_t), POINTER(bps_event_t)) battery_get_info = _func(c_int, POINTER(POINTER(battery_info_t))) battery_free_info = _func(None, POINTER(POINTER(battery_info_t))) battery_info_is_battery_ready = _func(c_int, POINTER(battery_info_t)) battery_info_is_battery_present = _func(c_int, POINTER(battery_info_t)) battery_info_get_battery_id = _func(c_int, POINTER(battery_info_t)) battery_info_is_battery_ok = _func(c_int, POINTER(battery_info_t)) battery_info_get_state_of_charge = _func(c_int, POINTER(battery_info_t)) battery_info_get_state_of_health = _func(c_int, POINTER(battery_info_t)) battery_info_get_charger_info = _func(c_int, POINTER(battery_info_t)) battery_info_get_device_name = _func(c_char_p, POINTER(battery_info_t)) battery_info_get_time_to_empty = _func(c_int, POINTER(battery_info_t))
# The possible application perimeter types NOTIFICATION_PERIMETER_TYPE_UNSPECIFIED = 0 NOTIFICATION_PERIMETER_TYPE_PERSONAL = 1 NOTIFICATION_PERIMETER_TYPE_ENTERPRISE = 2 notification_perimeter_type_t = c_int # The possible notification response events NOTIFICATION_OK = 0x00 NOTIFICATION_ERROR = 0x01 NOTIFICATION_CHOICE = 0x02 notification_response_t = c_int # The maximum number of prompt choices that can be displayed by a dialog. NOTIFICATION_MAX_PROMPT_CHOICES = 4 notification_request_events = _func(c_int, c_int) notification_stop_events = _func(c_int, c_int) notification_get_domain = _func(c_int) notification_message_create = _func(c_int, POINTER(POINTER(notification_message_t))) notification_message_destroy = _func(None, POINTER(POINTER(notification_message_t))) notification_message_set_request_id = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_item_id = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_title = _func(c_int, POINTER(notification_message_t), c_char_p)
NAVIGATOR_INVOKE_QUERY_ACTION_TYPE_ALL = 2 navigator_invoke_query_action_type_t = c_int NAVIGATOR_INVOKE_PERIMETER_TYPE_UNSPECIFIED = 0 NAVIGATOR_INVOKE_PERIMETER_TYPE_PERSONAL = 1 NAVIGATOR_INVOKE_PERIMETER_TYPE_ENTERPRISE = 2 navigator_invoke_perimeter_type_t = c_int NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_UNSPECIFIED = 0 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_PRESERVE = 1 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_COPY_RO = 2 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_COPY_RW = 3 NAVIGATOR_INVOKE_FILE_TRANSFER_MODE_LINK = 4 navigator_invoke_file_transfer_mode_t = c_int navigator_invoke_invocation_create = _func( c_int, POINTER(POINTER(navigator_invoke_invocation_t))) navigator_invoke_invocation_destroy = _func( c_int, POINTER(navigator_invoke_invocation_t)) navigator_invoke_invocation_set_id = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_target = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_source = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_action = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_type = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_uri = _func( c_int, POINTER(navigator_invoke_invocation_t), c_char_p) navigator_invoke_invocation_set_file_transfer_mode = _func(
self.a_position = prog.attribute('a_position') self.a_texcoord = prog.attribute('a_texcoord') @classmethod def context_cached(cls): try: support = context.font_support except AttributeError: support = context.font_support = cls() return support font_load = _func(c_int, POINTER(Font), c_char_p, c_int, c_int) font_render_text = _func(None, POINTER(FontSupport), POINTER(Font), c_char_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float) font_measure_text = _func(None, POINTER(Font), c_char_p, POINTER(c_float), POINTER(c_float)) #---------------------------- # apply argtypes/restype to all functions # _register_funcs(_dll, globals()) # EOF
# The possible application perimeter types NOTIFICATION_PERIMETER_TYPE_UNSPECIFIED = 0 NOTIFICATION_PERIMETER_TYPE_PERSONAL = 1 NOTIFICATION_PERIMETER_TYPE_ENTERPRISE = 2 notification_perimeter_type_t = c_int # The possible notification response events NOTIFICATION_OK = 0x00 NOTIFICATION_ERROR = 0x01 NOTIFICATION_CHOICE = 0x02 notification_response_t = c_int # The maximum number of prompt choices that can be displayed by a dialog. NOTIFICATION_MAX_PROMPT_CHOICES = 4 notification_request_events = _func(c_int, c_int) notification_stop_events = _func(c_int, c_int) notification_get_domain = _func(c_int) notification_message_create = _func(c_int, POINTER(POINTER(notification_message_t))) notification_message_destroy = _func(None, POINTER(POINTER(notification_message_t))) notification_message_set_request_id = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_item_id = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_title = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_subtitle = _func(c_int, POINTER(notification_message_t), c_char_p) # deprecated notification_message_set_badge = _func(c_int, POINTER(notification_message_t)) notification_message_set_sound_url = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_invocation_target = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_invocation_payload = _func(c_int, POINTER(notification_message_t), c_void_p, c_int) notification_message_set_invocation_encoded_payload = _func(c_int, POINTER(notification_message_t), c_char_p) notification_message_set_invocation_type = _func(c_int, POINTER(notification_message_t), c_char_p)
BATTERY_CHARGING_TRICKLE_CHARGING = 1 BATTERY_CHARGING_CONSTANT_CURRENT = 2 BATTERY_CHARGING_CONSTANT_VOLTAGE = 3 BATTERY_CHARGING_DONE_CHARGING = 4 battery_charging_state_t = c_int BATTERY_TIME_NA = 65535 BATTERY_INVALID_VALUE = 80000000 battery_special_values_t = c_int class battery_info_t(Structure): _fields_ = [] battery_request_events = _func(c_int, c_int) battery_stop_events = _func(c_int, c_int) battery_get_domain = _func(c_int) battery_event_get_info = _func(POINTER(battery_info_t), POINTER(bps_event_t)) battery_get_info = _func(c_int, POINTER(POINTER(battery_info_t))) battery_free_info = _func(None, POINTER(POINTER(battery_info_t))) battery_info_is_battery_ready = _func(c_int, POINTER(battery_info_t)) battery_info_is_battery_present = _func(c_int, POINTER(battery_info_t)) battery_info_get_battery_id = _func(c_int, POINTER(battery_info_t)) battery_info_is_battery_ok = _func(c_int, POINTER(battery_info_t)) battery_info_get_state_of_charge = _func(c_int, POINTER(battery_info_t)) battery_info_get_state_of_health = _func(c_int, POINTER(battery_info_t)) battery_info_get_charger_info = _func(c_int, POINTER(battery_info_t)) battery_info_get_device_name = _func(c_char_p, POINTER(battery_info_t)) battery_info_get_time_to_empty = _func(c_int, POINTER(battery_info_t))
return w.value, h.value def render(self, text, x, y, color, rotation=0): if isinstance(color, Color): color = color.tuple() text = text.encode('ascii', 'replace') # print('render', text, x, y, color) bbutil_render_text(self.font, text, x, y, -rotation, *color) class font_t(Structure): _fields_ = [] bbutil_load_font = _func(POINTER(font_t), c_char_p, c_int, c_int) bbutil_destroy_font = _func(None, POINTER(font_t)) bbutil_measure_text = _func(None, POINTER(font_t), c_char_p, POINTER(c_float), POINTER(c_float)) bbutil_render_text = _func(None, POINTER(font_t), c_char_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float) #---------------------------- # apply argtypes/restype to all functions # _register_funcs(_dll, globals()) # EOF