#ifndef _FS_PARAGRAPHEDITING_C_H_
#define _FS_PARAGRAPHEDITING_C_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "fs_basictypes_c.h"
#include "fs_common_c.h"


typedef enum _FSJoinSplitOperationType {
e_FSJoinSplitOperationTypeJoin = 0,
e_FSJoinSplitOperationTypeSpilt = 1,
e_FSJoinSplitOperationTypeLink = 2,
e_FSJoinSplitOperationTypeUnlink = 3,
e_FSJoinSplitOperationTypeSelectNone = 4,
e_FSJoinSplitOperationTypeClose = 5,
}FSJoinSplitOperationType;



typedef enum _FSBulletType {
e_FSBulletTypeNone = 0,
e_FSBulletTypeSolidCircle = 1,
e_FSBulletTypeSolidRectangle = 2,
e_FSBulletTypeSolidDiamond = 3,
e_FSBulletTypeCheck = 4,
e_FSBulletTypeRightArrow = 5,
e_FSBulletTypeInverseTangentCircle = 6,
e_FSBulletTypeDiagonalUpRightArrow = 7,
e_FSBulletTypeBlackDiamondMinusWhite = 8,
}FSBulletType;



typedef enum _FSNumberingType {
e_FSNumberingTypeNone = 0,
e_FSNumberingTypeDecimalDot = 1,
e_FSNumberingTypeDecimalRParen = 2,
e_FSNumberingTypeUpperLatinDot = 3,
e_FSNumberingTypeLowerLatinRParen = 4,
e_FSNumberingTypeLowerLatinDot = 5,
}FSNumberingType;


typedef struct _FSParagraphEditingProviderCallback {
  void* user_data;
  void (*Release)(void* user_data);
  FSMatrix (*GetRenderMatrix)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  void* (*GetPageViewHandle)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  FSRectF (*GetClientRect)(void* user_data, const FS_PDFDOC_HANDLE document);
  float (*GetScale)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  FS_BOOL (*GotoPageView)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index, float left, float top);
  void (*GetVisiblePageIndexArray)(void* user_data, const FS_PDFDOC_HANDLE document, FS_INT32** return_int32array, FS_UINT32* return_int32array_length);
  FSRectF (*GetPageVisibleRect)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  FSRectF (*GetPageRect)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  int (*GetCurrentPageIndex)(void* user_data, const FS_PDFDOC_HANDLE document);
  FSRotation (*GetRotation)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
  void (*InvalidateRect)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index, FSRectF* invalid_rects,  FS_UINT32 array_length_rect_array);
  void (*AddUndoItem)(void* user_data, const FS_PARAGRAPHEDITINGUNDOITEM_HANDLE undo_item);
  void (*SetDocChangeMark)(void* user_data, const FS_PDFDOC_HANDLE document);
  void (*NotifyTextInputReachLimit)(void* user_data, const FS_PDFDOC_HANDLE document, int page_index);
}FSParagraphEditingProviderCallback;

FSErrorCode FSDK_ParagraphEditingUndoItem_Release(FS_PARAGRAPHEDITINGUNDOITEM_HANDLE paragrapheditingundoitem_handle);
FSErrorCode FSDK_ParagraphEditingUndoItem_IsEmpty(FS_PARAGRAPHEDITINGUNDOITEM_HANDLE paragrapheditingundoitem_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditingUndoItem_Undo(FS_PARAGRAPHEDITINGUNDOITEM_HANDLE paragrapheditingundoitem_handle);
FSErrorCode FSDK_ParagraphEditingUndoItem_Redo(FS_PARAGRAPHEDITINGUNDOITEM_HANDLE paragrapheditingundoitem_handle);
FSErrorCode FSDK_ParagraphEditing_Release(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle);
FSErrorCode FSDK_ParagraphEditing_IsEmpty(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_Activate(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_Deactivate(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_StartEditing(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF start_point, const FSPointF end_point);
FSErrorCode FSDK_ParagraphEditing_ExitEditing(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_end_directly);
FSErrorCode FSDK_ParagraphEditing_InsertText(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, const wchar_t* text, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_Render(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, const int* int32array, FS_UINT32 array_length_page_index_array, const FS_RENDERER_HANDLE renderer, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnChar(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_UINT32 char_code, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnKeyDown(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_UINT32 key_code, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnKeyUp(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_UINT32 key_code, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnLButtonDown(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnLButtonUp(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnLButtonDoubleClick(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnMouseMove(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_OnMouseWheel(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int page_index, const FSPointF point, FS_INT32 delta, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanSelectAll(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_SelectAll(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanDelete(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_DeleteSelected(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanCopy(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CopySelected(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanCut(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CutSelected(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanPaste(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_PasteSelected(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_CanDeselectAll(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_DeselectAll(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditing_SetFontName(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, const wchar_t* font_name);
FSErrorCode FSDK_ParagraphEditing_SetFontSize(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, float font_size);
FSErrorCode FSDK_ParagraphEditing_SetTextColor(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_RGB text_color);
FSErrorCode FSDK_ParagraphEditing_SetBold(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_bold);
FSErrorCode FSDK_ParagraphEditing_SetItalic(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_italic);
FSErrorCode FSDK_ParagraphEditing_SetAlignment(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle,  FSAlignment alignment);
FSErrorCode FSDK_ParagraphEditing_SetCharSpace(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, float char_space);
FSErrorCode FSDK_ParagraphEditing_SetCharHorizontalScale(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, int scale);
FSErrorCode FSDK_ParagraphEditing_SetLineSpace(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, float line_space);
FSErrorCode FSDK_ParagraphEditing_SetUnderline(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_underline);
FSErrorCode FSDK_ParagraphEditing_SetStrikethrough(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_striketrough);
FSErrorCode FSDK_ParagraphEditing_SetSuperscript(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_superscript);
FSErrorCode FSDK_ParagraphEditing_SetSubscript(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FS_BOOL is_subscript);
FSErrorCode FSDK_ParagraphEditing_SetParagraphSpacing(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, float paragraph_space);
FSErrorCode FSDK_ParagraphEditing_Indent(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle);
FSErrorCode FSDK_ParagraphEditing_Dedent(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle);
FSErrorCode FSDK_ParagraphEditing_SetBulletedList(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FSBulletType bullet_type);
FSErrorCode FSDK_ParagraphEditing_SetNumberedList(FS_PARAGRAPHEDITING_HANDLE paragraphediting_handle, FSNumberingType numbering_type);
FSErrorCode FSDK_JoinSplit_Release(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_IsEmpty(FS_JOINSPLIT_HANDLE joinsplit_handle, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_Activate(FS_JOINSPLIT_HANDLE joinsplit_handle, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_Deactivate(FS_JOINSPLIT_HANDLE joinsplit_handle, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_ExitJoinEditing(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_Render(FS_JOINSPLIT_HANDLE joinsplit_handle, int* int32array, FS_UINT32 array_length_page_index_array, const FS_RENDERER_HANDLE renderer, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_OnLButtonDown(FS_JOINSPLIT_HANDLE joinsplit_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_OnLButtonUp(FS_JOINSPLIT_HANDLE joinsplit_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_OnMouseMove(FS_JOINSPLIT_HANDLE joinsplit_handle, int page_index, const FSPointF point, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_GetEnableStatus(FS_JOINSPLIT_HANDLE joinsplit_handle,  FSJoinSplitOperationType type, FS_BOOL* return_value);
FSErrorCode FSDK_JoinSplit_JoinBoxes(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_SplitBoxes(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_LinkBoxes(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_UnlinkBoxes(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_JoinSplit_SelectNone(FS_JOINSPLIT_HANDLE joinsplit_handle);
FSErrorCode FSDK_ParagraphEditingMgr_Create(FSParagraphEditingProviderCallback* callback, const FS_PDFDOC_HANDLE document, FS_PARAGRAPHEDITINGMGR_HANDLE* paragrapheditingmgr_return_value);
FSErrorCode FSDK_ParagraphEditingMgr_Release(FS_PARAGRAPHEDITINGMGR_HANDLE paragrapheditingmgr_handle);
FSErrorCode FSDK_ParagraphEditingMgr_IsEmpty(FS_PARAGRAPHEDITINGMGR_HANDLE paragrapheditingmgr_handle, FS_BOOL* return_value);
FSErrorCode FSDK_ParagraphEditingMgr_GetParagraphEditing(FS_PARAGRAPHEDITINGMGR_HANDLE paragrapheditingmgr_handle, FS_PARAGRAPHEDITING_HANDLE* return_value);
FSErrorCode FSDK_ParagraphEditingMgr_GetJoinSplit(FS_PARAGRAPHEDITINGMGR_HANDLE paragrapheditingmgr_handle, FS_JOINSPLIT_HANDLE* return_value);
FSErrorCode FSDK_ParagraphEditingMgr_SetSystemDPI(FS_PARAGRAPHEDITINGMGR_HANDLE paragrapheditingmgr_handle, float horizontal_dpi, float vertical_dpi);
#ifdef __cplusplus
}
#endif
#endif
