| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587 |
- //
- // TIMCommonModel.h
- // TIMCommon
- //
- // Created by cologne on 2023/3/14.
- // Copyright © 2023 Tencent. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import <TUICore/TUICommonModel.h>
- #import "TIMDefine.h"
- NS_ASSUME_NONNULL_BEGIN
- ////////////////////////////////////////////////////////////////////////////////
- //
- // TUIPopView
- //
- /////////////////////////////////////////////////////////////////////////////////
- @class TUIPopView;
- @protocol TUIPopViewDelegate <NSObject>
- - (void)popView:(TUIPopView *)popView didSelectRowAtIndex:(NSInteger)index;
- @end
- @interface TUIPopView : UIView
- @property(nonatomic, strong) UITableView *tableView;
- @property(nonatomic, assign) CGPoint arrowPoint;
- @property(nonatomic, weak) id<TUIPopViewDelegate> delegate;
- - (void)setData:(NSMutableArray *)data;
- - (void)showInWindow:(UIWindow *)window;
- @end
- @interface TUIPopCellData : NSObject
- @property(nonatomic, strong) UIImage *image;
- @property(nonatomic, strong) NSString *title;
- @end
- @interface TUIPopCell : UITableViewCell
- @property(nonatomic, strong) UIImageView *image;
- @property(nonatomic, strong) UILabel *title;
- + (CGFloat)getHeight;
- - (void)setData:(TUIPopCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIModifyView
- //
- /////////////////////////////////////////////////////////////////////////////////
- @class TUIModifyView;
- @protocol TUIModifyViewDelegate <NSObject>
- - (void)modifyView:(TUIModifyView *)modifyView didModiyContent:(NSString *)content;
- @end
- @interface TUIModifyViewData : NSObject
- @property(nonatomic, strong) NSString *title;
- @property(nonatomic, strong) NSString *content;
- @property(nonatomic, strong) NSString *desc;
- @property(nonatomic, assign) BOOL enableNull;
- @end
- @interface TUIModifyView : UIView
- @property(nonatomic, strong) UIView *container;
- @property(nonatomic, strong) UILabel *title;
- @property(nonatomic, strong) UITextField *content;
- @property(nonatomic, strong) UILabel *descLabel;
- @property(nonatomic, strong) UIButton *confirm;
- @property(nonatomic, strong) UIView *hLine;
- @property(nonatomic, weak) id<TUIModifyViewDelegate> delegate;
- - (void)setData:(TUIModifyViewData *)data;
- - (void)showInWindow:(UIWindow *)window;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUINaviBarIndicatorView
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUINaviBarIndicatorView : UIView
- @property(nonatomic, strong) UIActivityIndicatorView *indicator;
- @property(nonatomic, strong) UILabel *label;
- @property(nonatomic, assign) CGFloat maxLabelLength;
- - (void)setTitle:(NSString *)title;
- - (void)startAnimating;
- - (void)stopAnimating;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonCellData : NSObject
- @property(strong) NSString *reuseId;
- @property(nonatomic, assign) SEL cselector;
- @property(nonatomic, strong) NSDictionary *ext;
- - (CGFloat)heightOfWidth:(CGFloat)width;
- - (CGFloat)estimatedHeight;
- @end
- @interface TUICommonTableViewCell : UITableViewCell
- @property(readonly) TUICommonCellData *data;
- @property UIColor *colorWhenTouched;
- @property BOOL changeColorWhenTouched;
- - (void)fillWithData:(TUICommonCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonTextCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonTextCellData : TUICommonCellData
- @property NSString *key;
- @property NSString *value;
- @property BOOL showAccessory;
- @property UIColor *keyColor;
- @property UIColor *valueColor;
- @property BOOL enableMultiLineValue;
- @property(nonatomic, assign) UIEdgeInsets keyEdgeInsets;
- @end
- @interface TUICommonTextCell : TUICommonTableViewCell
- @property UILabel *keyLabel;
- @property UILabel *valueLabel;
- @property(readonly) TUICommonTextCellData *textData;
- - (void)fillWithData:(TUICommonTextCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonSwitchCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonSwitchCellData : TUICommonCellData
- @property NSString *title;
- @property NSString *desc;
- @property(getter=isOn) BOOL on;
- @property CGFloat margin;
- @property SEL cswitchSelector;
- @property(nonatomic, assign) BOOL displaySeparatorLine;
- @property(nonatomic, assign) BOOL disableChecked;
- @end
- @interface TUICommonSwitchCell : TUICommonTableViewCell
- @property UILabel *titleLabel; // main title label
- @property UILabel *descLabel; // detail title label below the main title label, used for explaining details
- @property UISwitch *switcher;
- @property(readonly) TUICommonSwitchCellData *switchData;
- - (void)fillWithData:(TUICommonSwitchCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIButtonCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- typedef enum : NSUInteger {
- ButtonGreen,
- ButtonWhite,
- ButtonRedText,
- ButtonBule,
- } TUIButtonStyle;
- @interface TUIButtonCellData : TUICommonCellData
- @property(nonatomic, strong) NSString *title;
- @property SEL cbuttonSelector;
- @property TUIButtonStyle style;
- @property(nonatomic, strong) UIColor *textColor;
- @property(nonatomic, assign) BOOL hideSeparatorLine;
- @end
- @interface TUIButtonCell : TUICommonTableViewCell
- @property(nonatomic, strong) UIButton *button;
- @property TUIButtonCellData *buttonData;
- - (void)fillWithData:(TUIButtonCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIGroupPendencyCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- #define TUIGroupPendencyCellData_onPendencyChanged @"TUIGroupPendencyCellData_onPendencyChanged"
- @interface TUIGroupPendencyCellData : TUICommonCellData
- @property(nonatomic, strong) NSString *groupId;
- @property(nonatomic, strong) NSString *fromUser;
- @property(nonatomic, strong) NSString *toUser;
- @property(readonly) V2TIMGroupApplication *pendencyItem;
- @property NSURL *avatarUrl;
- @property NSString *title;
- /**
- * The joining group introduction of the requester. Such as "Xiao Ming applied to join the group".
- */
- @property NSString *requestMsg;
- /**
- * Agree or Not
- * YES: Agree; NO: Indicates that the current request was not granted, but does not mean that the request has been denied.
- */
- @property BOOL isAccepted;
- /**
- *
- * Refuse or Not
- * YES: Refuse; NO: Indicates that the current request is not denied, but does not mean that the request has been granted.
- */
- @property BOOL isRejectd;
- @property SEL cbuttonSelector;
- - (instancetype)initWithPendency:(V2TIMGroupApplication *)args;
- typedef void (^TUIGroupPendencyCellDataSuccessCallback)(void);
- typedef void (^TUIGroupPendencyCellDataFailureCallback)(int code, NSString *msg);
- - (void)agreeWithSuccess:(TUIGroupPendencyCellDataSuccessCallback)success
- failure:(TUIGroupPendencyCellDataFailureCallback)failure;
- - (void)rejectWithSuccess:(TUIGroupPendencyCellDataSuccessCallback)success
- failure:(TUIGroupPendencyCellDataFailureCallback)failure;
- - (void)accept;
- - (void)reject;
- @end
- @interface TUIGroupPendencyCell : TUICommonTableViewCell
- @property UIImageView *avatarView;
- @property UILabel *titleLabel;
- @property UILabel *addWordingLabel;
- @property UIButton *agreeButton;
- @property TUIGroupPendencyCellData *pendencyData;
- - (void)fillWithData:(TUIGroupPendencyCellData *)pendencyData;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIFaceCell & data
- //
- /////////////////////////////////////////////////////////////////////////////////
- /**
- * 【Module name】 TUIFaceCellData
- * 【Function description]】The name and local storage path of the stored emoticon.
- */
- @interface TUIFaceCellData : NSObject
- /**
- * The name of emoticon
- */
- @property(nonatomic, strong) NSString *name;
- /**
- * The localized name of the emoticon (the attribute used for internationalization, if it is empty or the length is 0, the name is displayed by default)
- */
- @property(nonatomic, copy) NSString *localizableName;
- /**
- * The storage path of the emoticon cached locally.
- */
- @property(nonatomic, strong) NSString *path;
- @end
- /**
- * 【Module name】TUIFaceCell
- * 【Function description】 Store the image of the emoticon, and initialize the Cell according to TUIFaceCellData.
- * In the emoticon view, TUIFaceCell is the unit displayed on the interface.
- */
- @interface TUIFaceCell : UICollectionViewCell
- /**
- * The image view for displaying emoticon
- */
- @property(nonatomic, strong) UIImageView *face;
- @property(nonatomic, strong) UIImage *staicImage;
- @property(nonatomic, strong) UIImage *gifImage;
- @property(nonatomic, copy) void(^longPressCallback)(UILongPressGestureRecognizer *recognizer);
- - (void)setData:(TUIFaceCellData *)data;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIFaceGroup
- //
- /////////////////////////////////////////////////////////////////////////////////
- /**
- * 【Module name】 TUIFaceGroup
- * 【Function description】 It is used to realize the grouping of emoticon, which is convenient for users to browse and select under different emoticon themes.
- * This class stores the index of each emoticon group, so that FaceView can locate each emoticon group.
- * At the same time, this class stores the path of all emoticon pictures in an emoticon group, and provides data such as the number of lines, the number of
- * emoticons in each line, etc., to locate specific emoticons
- */
- @interface TUIFaceGroup : NSObject
- /**
- * Index of emoticons group, begining with zero.
- */
- @property(nonatomic, assign) int groupIndex;
- /**
- * The resource path of the entire expression group
- */
- @property(nonatomic, strong) NSString *groupPath;
- /**
- * The number of lines of emoticons in the emoticon group
- */
- @property(nonatomic, assign) int rowCount;
- /**
- * The number of emoticons contained in each line
- */
- @property(nonatomic, assign) int itemCountPerRow;
- @property(nonatomic, strong) NSMutableArray *faces;
- @property(nonatomic, strong) NSDictionary *facesMap;
- /**
- * The flag of indicating whether to display the delete button
- * When set to YES, FaceView will display a "delete" icon in the lower right corner of the emoticon view. Clicking the icon can delete the entered emoticon
- * directly without evoking the keyboard.
- */
- @property(nonatomic, assign) BOOL needBackDelete;
- /**
- * The path to the cover image of the emoticon group
- */
- @property(nonatomic, strong) NSString *menuPath;
- @property(nonatomic, strong) TUIFaceGroup *recentGroup;
- @property(nonatomic, assign) BOOL isNeedAddInInputBar;
- @property(nonatomic, copy) NSString *groupName;
- @end
- @interface TUIEmojiTextAttachment : NSTextAttachment
- @property(nonatomic, strong) TUIFaceCellData *faceCellData;
- @property(nonatomic, copy) NSString *emojiTag;
- @property(nonatomic, assign) CGSize emojiSize; // For emoji image size
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIUnReadView
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUIUnReadView : UIView
- /**
- * The label of displaying unread message count
- */
- @property(nonatomic, strong) UILabel *unReadLabel;
- /**
- * Set the unread message count
- */
- - (void)setNum:(NSInteger)num;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIConversationPin
- //
- /////////////////////////////////////////////////////////////////////////////////
- extern NSString *kTopConversationListChangedNotification;
- @interface TUIConversationPin : NSObject
- + (instancetype)sharedInstance;
- /**
- *
- * Getting the list of pinned conversations
- */
- - (NSArray *)topConversationList;
- /**
- *
- * Pin the conversation
- */
- - (void)addTopConversation:(NSString *)conv callback:(void (^__nullable)(BOOL success, NSString *__nullable errorMessage))callback;
- /**
- *
- * Remove pinned conversations
- */
- - (void)removeTopConversation:(NSString *)conv callback:(void (^__nullable)(BOOL success, NSString *__nullable errorMessage))callback;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonContactSelectCellData
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonContactSelectCellData : TUICommonCellData
- @property(nonatomic, strong) NSString *identifier;
- @property(nonatomic, strong) NSString *title;
- @property(nonatomic, strong) NSURL *avatarUrl;
- @property(nonatomic, strong) UIImage *avatarImage;
- @property(nonatomic, getter=isSelected) BOOL selected;
- @property(nonatomic, getter=isEnabled) BOOL enabled;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonContactListPickerCell
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonContactListPickerCell : UICollectionViewCell
- @property UIImageView *avatar;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIContactListPickerOnCancel
- //
- /////////////////////////////////////////////////////////////////////////////////
- typedef void (^TUIContactListPickerOnCancel)(TUICommonContactSelectCellData *data);
- @interface TUIContactListPicker : UIControl
- @property(nonatomic, strong, readonly) UIButton *accessoryBtn;
- @property(nonatomic, strong) NSArray<TUICommonContactSelectCellData *> *selectArray;
- @property(nonatomic, copy) TUIContactListPickerOnCancel onCancel;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIProfileCardCell & vc
- //
- /////////////////////////////////////////////////////////////////////////////////
- @class TUIProfileCardCell;
- @protocol TUIProfileCardDelegate <NSObject>
- - (void)didTapOnAvatar:(TUIProfileCardCell *)cell;
- @end
- @interface TUIProfileCardCellData : TUICommonCellData
- @property(nonatomic, strong) UIImage *avatarImage;
- @property(nonatomic, strong) NSURL *avatarUrl;
- @property(nonatomic, strong) NSString *name;
- @property(nonatomic, strong) NSString *identifier;
- @property(nonatomic, strong) NSString *signature;
- @property(nonatomic, strong) UIImage *genderIconImage;
- @property(nonatomic, strong) NSString *genderString;
- @property BOOL showAccessory;
- @property BOOL showSignature;
- @end
- @interface TUIProfileCardCell : TUICommonTableViewCell
- @property(nonatomic, strong) UIImageView *avatar;
- @property(nonatomic, strong) UILabel *name;
- @property(nonatomic, strong) UILabel *identifier;
- @property(nonatomic, strong) UILabel *signature;
- @property(nonatomic, strong) UIImageView *genderIcon;
- @property(nonatomic, strong) TUIProfileCardCellData *cardData;
- @property(nonatomic, weak) id<TUIProfileCardDelegate> delegate;
- - (void)fillWithData:(TUIProfileCardCellData *)data;
- @end
- @interface TUIAvatarViewController : UIViewController
- @property(nonatomic, strong) TUIProfileCardCellData *avatarData;
- @end
- typedef NS_ENUM(NSUInteger, TUISelectAvatarType) {
- TUISelectAvatarTypeUserAvatar,
- TUISelectAvatarTypeGroupAvatar,
- TUISelectAvatarTypeCover,
- TUISelectAvatarTypeConversationBackGroundCover,
- };
- @interface TUISelectAvatarCardItem : NSObject
- @property(nonatomic, strong) NSString *posterUrlStr;
- @property(nonatomic, assign) BOOL isSelect;
- @property(nonatomic, copy) NSString *fullUrlStr;
- @property(nonatomic, assign) BOOL isDefaultBackgroundItem;
- @property(nonatomic, assign) BOOL isGroupGridAvatar;
- @property(nonatomic, copy) NSString *createGroupType;
- @property(nonatomic, strong) UIImage *cacheGroupGridAvatarImage;
- @end
- @interface TUISelectAvatarController : UIViewController
- @property(nonatomic, copy) void (^selectCallBack)(NSString *urlStr);
- @property(nonatomic, assign) TUISelectAvatarType selectAvatarType;
- @property(nonatomic, copy) NSString *profilFaceURL;
- @property(nonatomic, strong) UIImage *cacheGroupGridAvatarImage;
- @property(nonatomic, copy) NSString *createGroupType;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUICommonAvatarCell & Data
- //
- /////////////////////////////////////////////////////////////////////////////////
- @interface TUICommonAvatarCellData : TUICommonCellData
- ;
- @property(nonatomic, strong) NSString *key;
- @property(nonatomic, strong) NSString *value;
- @property BOOL showAccessory;
- @property(nonatomic, strong) UIImage *avatarImage;
- @property(nonatomic, strong) NSURL *avatarUrl;
- @end
- @interface TUICommonAvatarCell : TUICommonTableViewCell
- @property UILabel *keyLabel;
- @property UILabel *valueLabel;
- @property UIImageView *avatar;
- @property(readonly) TUICommonAvatarCellData *avatarData;
- - (void)fillWithData:(TUICommonAvatarCellData *)avatarData;
- @end
- /////////////////////////////////////////////////////////////////////////////////
- //
- // TUIConversationGroupItem
- //
- /////////////////////////////////////////////////////////////////////////////////
- extern NSUInteger kConversationMarkStarType;
- @interface TUIConversationGroupItem : NSObject
- @property(nonatomic, strong) NSString *groupName;
- @property(nonatomic, assign) NSInteger unreadCount;
- @property(nonatomic, assign) NSInteger groupIndex;
- @property(nonatomic, assign) BOOL isShow;
- @property(nonatomic, strong) UIButton *groupBtn;
- @end
- @interface TUISendMessageAppendParams : NSObject
- @property (nonatomic, assign) BOOL isSendPushInfo;
- @property (nonatomic, assign) BOOL isOnlineUserOnly;
- @property (nonatomic, assign) V2TIMMessagePriority priority;
- + (instancetype)defaultConfig;
- @end
- NS_ASSUME_NONNULL_END
|