/*--------------------------------------------------------------------------
  Project:  Manual 2D Library - m2d
  File:     manualViewer.h

  Copyright (C)2007-2009 Nintendo  All Rights Reserved.

  These coded instructions, statements, and computer programs contain
  proprietary information of Nintendo of America Inc. and/or Nintendo
  Company Ltd., and are protected by Federal copyright law. They may
  not be disclosed to third parties or copied or duplicated in any form,
  in whole or in part, without the prior written consent of Nintendo.

  $Revision: 1758 $
 *-------------------------------------------------------------------------*/

#ifndef NTMV_M2D_MANUALVIEWER_H_
#define NTMV_M2D_MANUALVIEWER_H_

#ifdef __CWCC__
#pragma once
#endif

#include <nitro/types.h>
#include <nnsys/fnd.h>
#include <nnsys/g2d.h>

// Manual archive filename
#define NTMV_M2D_MANUALFILENAME     "manpages_narc.blz"

// Manual UI resource archive filename
#define NTMV_M2D_UIRESFILENAME      "m2dres_narc.blz"


#ifdef __cplusplus
extern "C" {
#endif


/*---------------------------------------------------------------------------*
  Name:         NTMVM2dManualViewerInfo

  Description:  Information structure for the NTMV manual viewer. Maintains information related to the manual viewer.
 *---------------------------------------------------------------------------*/
typedef struct NTMVM2dManualViewerInfo
{
    void*                   viewerObject;       // Viewer object

} NTMVM2dManualViewerInfo;

void                NTMV_M2dInitForFilePath(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo,
                        NNSFndAllocator*            pAllocator,
                        const char*                 manualFilePath,
                        const char*                 uiResFilePath,
                        const NNSG2dFont *const     fonts[]);

void                NTMV_M2dInitForMem(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo,
                        NNSFndAllocator*            pAllocator,
                        void*                       manualArcData,
                        void*                       uiResource,
                        const NNSG2dFont *const     fonts[]);

void                NTMV_M2dInitForFilePathEx(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo,
                        NNSFndAllocator*            pAllocator,
                        const char*                 manualFilePath,
                        const char*                 uiResFilePath,
                        const NNSG2dFont *const     fonts[],
                        u16                         lang);

void                NTMV_M2dInitForMemEx(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo,
                        NNSFndAllocator*            pAllocator,
                        void*                       manualArcData,
                        void*                       uiResource,
                        const NNSG2dFont *const     fonts[],
                        u16                         lang);

void                NTMV_M2dRun(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo);

void                NTMV_M2dFinalize(
                        NTMVM2dManualViewerInfo*    pManualViewerInfo,
                        NNSFndAllocator*            pAllocator);

#ifdef __cplusplus
} /* extern "C" */
#endif

/* NTMV_M2D_MANUALVIEWER_H_ */
#endif
