#ifndef _FS_PDFLAYER_C_H_
#define _FS_PDFLAYER_C_H_

#ifdef __cplusplus
extern "C" {
#endif



typedef enum _FSUsageType {
e_FSUsageView = 0x0000,
e_FSUsageDesign = 0x0001,
e_FSUsagePrint = 0x0002,
e_FSUsageExport = 0x0003,
e_FSUsageZoom = 0x0004,
}FSUsageType;



typedef enum _FSUsageState {
e_FSStateON = 0x0000,
e_FSStateOFF = 0x0001,
e_FSStateUnchanged = 0x0002,
e_FSStateUndefined = 0x0003,
}FSUsageState;


typedef struct _FSLayerZoomData {
  float min_factor;
  float max_factor;
}FSLayerZoomData;

FSErrorCode FSDK_LayerTree_Create(const FS_PDFDOC_HANDLE document, FS_LAYERTREE_HANDLE* layertree_return_value);
FSErrorCode FSDK_LayerTree_IsEmpty(FS_LAYERTREE_HANDLE layertree_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerTree_Release(FS_LAYERTREE_HANDLE layertree_handle);
FSErrorCode FSDK_LayerTree_SetBaseState(FS_LAYERTREE_HANDLE layertree_handle, FSUsageState state, FS_BOOL* return_value);
FSErrorCode FSDK_LayerTree_GetRootNode(FS_LAYERTREE_HANDLE layertree_handle, FS_LAYERNODE_HANDLE* return_value);
FSErrorCode FSDK_LayerTree_GetDict(FS_LAYERTREE_HANDLE layertree_handle, FS_PDFDICTIONARY_HANDLE* return_value);
FSErrorCode FSDK_LayerTree_GetOCGs(FS_LAYERTREE_HANDLE layertree_handle, FS_PDFARRAY_HANDLE* return_value);
FSErrorCode FSDK_LayerTree_GetOCGsByPageIndex(FS_LAYERTREE_HANDLE layertree_handle, int page_index, FS_LAYERNODE_HANDLE* return_layernode_array, FS_UINT32* return_array_length);
typedef struct _FSLayerPrintData {
  FS_BSTR subtype;
  FSUsageState print_state;
}FSLayerPrintData;

FSErrorCode FSDK_LayerContext_Create(const FS_PDFDOC_HANDLE document, FSUsageType usage_type, FS_LAYERCONTEXT_HANDLE* layercontext_return_value);
FSErrorCode FSDK_LayerContext_Release(FS_LAYERCONTEXT_HANDLE layercontext_handle);
FSErrorCode FSDK_LayerContext_IsEmpty(FS_LAYERCONTEXT_HANDLE layercontext_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerContext_GetDocument(FS_LAYERCONTEXT_HANDLE layercontext_handle, FS_PDFDOC_HANDLE* return_value);
FSErrorCode FSDK_LayerContext_GetUsageType(FS_LAYERCONTEXT_HANDLE layercontext_handle, FSUsageType* return_value);
FSErrorCode FSDK_LayerContext_Reset(FS_LAYERCONTEXT_HANDLE layercontext_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerContext_CopyStates(FS_LAYERCONTEXT_HANDLE layercontext_handle, const FS_LAYERCONTEXT_HANDLE source_context, FS_BOOL* return_value);
FSErrorCode FSDK_LayerContext_MergeStates(FS_LAYERCONTEXT_HANDLE layercontext_handle, const FS_LAYERCONTEXT_HANDLE source_context, FS_BOOL* return_value);
FSErrorCode FSDK_LayerContext_IsVisible(FS_LAYERCONTEXT_HANDLE layercontext_handle, const FS_LAYERNODE_HANDLE layer, FS_BOOL* return_value);
FSErrorCode FSDK_LayerContext_SetVisible(FS_LAYERCONTEXT_HANDLE layercontext_handle, const FS_LAYERNODE_HANDLE layer, FS_BOOL is_visible, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_IsEmpty(FS_LAYERNODE_HANDLE layernode_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_Release(FS_LAYERNODE_HANDLE layernode_handle);
FSErrorCode FSDK_LayerNode_GetChildrenCount(FS_LAYERNODE_HANDLE layernode_handle, int* return_value);
FSErrorCode FSDK_LayerNode_GetChild(FS_LAYERNODE_HANDLE layernode_handle, int index, FS_LAYERNODE_HANDLE* return_value);
FSErrorCode FSDK_LayerNode_RemoveChild(FS_LAYERNODE_HANDLE layernode_handle, int index, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_MoveTo(FS_LAYERNODE_HANDLE layernode_handle, FS_LAYERNODE_HANDLE parent_layer_node, int index, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_AddChild(FS_LAYERNODE_HANDLE layernode_handle, int index, const wchar_t* name, FS_BOOL has_Layer, FS_LAYERNODE_HANDLE* return_value);
FSErrorCode FSDK_LayerNode_GetName(FS_LAYERNODE_HANDLE layernode_handle, FS_WSTR* return_value);
FSErrorCode FSDK_LayerNode_IsLocked(FS_LAYERNODE_HANDLE layernode_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_HasLayer(FS_LAYERNODE_HANDLE layernode_handle, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_HasIntent(FS_LAYERNODE_HANDLE layernode_handle, const char* intent, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_IsInPage(FS_LAYERNODE_HANDLE layernode_handle, const FS_PDFPAGE_HANDLE page, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_GetViewUsage(FS_LAYERNODE_HANDLE layernode_handle, FSUsageState* return_value);
FSErrorCode FSDK_LayerNode_GetExportUsage(FS_LAYERNODE_HANDLE layernode_handle, FSUsageState* return_value);
FSErrorCode FSDK_LayerNode_GetPrintUsage(FS_LAYERNODE_HANDLE layernode_handle, FSLayerPrintData* return_value);
FSErrorCode FSDK_LayerNode_GetZoomUsage(FS_LAYERNODE_HANDLE layernode_handle, FSLayerZoomData* return_value);
FSErrorCode FSDK_LayerNode_SetName(FS_LAYERNODE_HANDLE layernode_handle, const wchar_t* name, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_SetDefaultVisible(FS_LAYERNODE_HANDLE layernode_handle, FS_BOOL is_visible, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_SetViewUsage(FS_LAYERNODE_HANDLE layernode_handle,  FSUsageState state, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_SetExportUsage(FS_LAYERNODE_HANDLE layernode_handle,  FSUsageState state, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_SetPrintUsage(FS_LAYERNODE_HANDLE layernode_handle, const FSLayerPrintData data, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_SetZoomUsage(FS_LAYERNODE_HANDLE layernode_handle, const FSLayerZoomData data, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_GetGraphicsObjects(FS_LAYERNODE_HANDLE layernode_handle, const FS_PDFPAGE_HANDLE page, FS_GRAPHICSOBJECT_HANDLE* return_graphicsobjects_array, FS_UINT32* return_array_length_settingdata_array);
FSErrorCode FSDK_LayerNode_AddGraphicsObject(FS_LAYERNODE_HANDLE layernode_handle, const FS_PDFPAGE_HANDLE page, FS_GRAPHICSOBJECT_HANDLE graphicsobject, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_RemoveGraphicsObject(FS_LAYERNODE_HANDLE layernode_handle,  FS_GRAPHICSOBJECT_HANDLE graphics_object, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_RemoveUsage(FS_LAYERNODE_HANDLE layernode_handle,  FSUsageType usage_type, FS_BOOL* return_value);
FSErrorCode FSDK_LayerNode_GetDict(FS_LAYERNODE_HANDLE layernode_handle, FS_PDFDICTIONARY_HANDLE* return_value);
FSErrorCode FSDK_LayerNode_GetAnnots(FS_LAYERNODE_HANDLE layernode_handle, FS_ANNOT_HANDLE* return_annotarray, FS_UINT32* return_array_length);
#ifdef __cplusplus
}
#endif
#endif
