📄 ig_structs.h
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2005-2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file ig_structs.h
*
* $Revision: 1.3 $
*
* IG structure definitions used internally and externally
*
*/
#ifndef IG_STRUCTS_H
#define IG_STRUCTS_H
#ifdef __cplusplus
extern "C" {
#endif
#include "vdvd_types.h"
#include "directfb.h"
#define IG_MAX_PALETTE_COLORS 256
#define MAX_NAVIGATION_COMMANDS 255
#define MAX_WINDOWS 2
#define MAX_EFFECTS_OBJECTS 2
#define MAX_EFFECTS 128
#define SIZE_NAV_COMMAND 12
/* palette */
typedef struct tag_Palette
{
/* palettes are static sized always have 256 entries */
BYTE PaletteVersion;
DFBColor Colors[IG_MAX_PALETTE_COLORS];
IDirectFBPalette *DFBPal;
} PALETTE;
/* segment descriptor */
typedef struct tag_SegmentDescriptor
{
BYTE SegmentType;
USHORT SegmentLength;
} SEGMENT_DESCRIPTOR;
/* sequence descriptor */
typedef struct tag_Sequence_Descriptor
{
BYTE FirstInSequenceFlag : 1;
BYTE LastInSequenceFlag : 1;
BYTE Reserved : 6;
} SEQUENCE_DESCRIPTOR;
/* object data */
typedef struct tag_Object_Data
{
ULONG DataLength;
USHORT Width;
USHORT Height;
} OBJECT_DATA;
/* object defintion segment */
typedef struct tag_Object_Definition_Segment
{
BYTE VersionNumber;
SEQUENCE_DESCRIPTOR SeqDesc;
OBJECT_DATA ObjData;
BYTE InUse;
BYTE *RLEData; /* the rle decoded data */
IDirectFBSurface *SurfaceLUT8; /* a directFB surface to RLE decode into */
int pitch; /* returned from directfb surface->lock() */
} OBJECT_DEFINITION_SEGMENT;
/* window */
typedef struct tag_Window
{
USHORT X;
USHORT Y;
USHORT Width;
USHORT Height;
} WINDOW;
/* cropping rectangle */
typedef struct tag_Cropping_Rectangle
{
USHORT X;
USHORT Y;
USHORT Width;
USHORT Height;
} CROPPING_RECTANGLE;
/* Image class for cleaning up screen space quickly */
typedef struct tag_Image
{
USHORT X;
USHORT Y;
USHORT Width;
USHORT Height;
BYTE InUse;
} IMAGE;
/* composition object */
typedef struct tag_CompositionObject
{
USHORT ObjectIDRef;
BYTE WindowIDRef;
BYTE CroppedFlag : 1;
BYTE ForcedOnFlag : 1;
BYTE Reserved : 6;
USHORT XPosition;
USHORT YPosition;
CROPPING_RECTANGLE Rect;
} COMPOSITION_OBJECT;
/* video descriptor */
typedef struct _tag_Video_Descriptor
{
USHORT Width;
USHORT Height;
BYTE FrameRate; /* 4:4 spec bitorder*/
} VIDEO_DESCRIPTOR;
/* composition descriptor */
typedef struct tag_Composition_Descriptor
{
USHORT CompositionNumber;
BYTE CompositionState; /* 2:6 spec bitorder */
} COMPOSITION_DESCRIPTOR;
/* navigation command */
typedef struct _tag_IG_Navigation_Command
{
BYTE Command[SIZE_NAV_COMMAND];
} IG_NAVIGATION_COMMAND;
/* effect object */
typedef struct tag_Effect
{
ULONG EffectDuration; /* using a ulong for easy reading later instead of 3 bytes */
BYTE PaletteIDRef;
BYTE NumCompObjs; /* note this has to be less that MAX_EFFECTS_OBJECTS currently 2 */
COMPOSITION_OBJECT CompObjs[MAX_EFFECTS_OBJECTS];
} EFFECT;
/* effect sequence */
typedef struct tag_Effect_Sequence
{
BYTE NumWindows;
WINDOW WindowList[MAX_WINDOWS];
BYTE NumEffects;
EFFECT EffectsList[MAX_EFFECTS];
} EFFECT_SEQUENCE;
/* possible states for a button */
typedef enum tag_Button_State
{
BUTTON_DISABLED,
BUTTON_ENABLED,
BUTTON_SELECTED,
BUTTON_ACTIVE,
BUTTON_MAX
} BUTTON_STATE;
/* button */
typedef struct _tag_Button
{
USHORT ButtonID;
USHORT ButtonNumericSelectValue;
BYTE AutoActionFlag; /* 1:7 spec bitorder */
USHORT XPosition;
USHORT YPosition;
/* neighbor info */
USHORT UpperButtonIDRef;
USHORT LowerButtonIDRef;
USHORT LeftButtonIDRef;
USHORT RightButtonIDRef;
/* normal state info */
USHORT NormalStartObjectIDRef;
USHORT NormalEndObjectIDRef;
BYTE NormalRepeatFlag; /* 1:7 spec bitorder */
/* selected state info */
BYTE SelectedStateSoundIDRef;
USHORT SelectedStartObjectIDRef;
USHORT SelectedEndObjectIDRef;
BYTE SelectedRepeatFlag; /* 1:7 spec bitorder */
/* activation state info */
BYTE ActivatedStateSoundIDRef;
USHORT ActivatedStartObjectIDRef;
USHORT ActivatedEndObjectIDRef;
USHORT NumNavCommands;
IG_NAVIGATION_COMMAND NavCommands[MAX_NAVIGATION_COMMANDS];
/* additional flags not in spec to track current object displayed */
USHORT CurrentDisplayObjectIDRef;
BUTTON_STATE ButtonState; /* current state of this button */
} BUTTON;
/* button overlap group */
typedef struct tag_Button_Overlap_Group
{
USHORT DefaultValidButtonIDRef;
BYTE NumButtons;
BUTTON *Buttons;
} BUTTON_OVERLAP_GROUP;
/* page */
typedef struct tag_Page
{
BYTE PageID;
BYTE PageVersionNumber;
uint64 UO_mask_table;
EFFECT_SEQUENCE InEff;
EFFECT_SEQUENCE OutEff;
BYTE AnimationFrameRateCode;
USHORT DefaultSelectedButtonIDRef;
USHORT DefaultActivatedButtonIDRef;
BYTE PaletteIDRef;
BYTE NumBogs;
BUTTON_OVERLAP_GROUP *Bogs;
} PAGE;
/* presentation composition segment */
typedef struct tag_Interactive_Composition_Segment
{
VIDEO_DESCRIPTOR VideoDesc;
COMPOSITION_DESCRIPTOR CompDesc;
ULONG CompositionLength; /* spec uses 3 bytes */
BYTE StreamAndUIModel; /* 1:1:6 spec bitorder */
ULONG CompositionTimeoutPTS; /* upper 32 bits of 33 for PTS */
ULONG SelectionTimeoutPTS; /* upper 32 bits of 33 for PTS */
ULONG UserTimeoutDuration; /* 24 bits in spec */
BYTE NumPages;
PAGE *Pages;
ULONG PTS;
} INTERACTIVE_COMPOSITION_SEGMENT;
/* window definition segment */
typedef struct tag_Window_Defintion_Segment
{
SEGMENT_DESCRIPTOR SegDesc;
BYTE NumberOfWindows;
} WINDOW_DEFINITION_SEGMENT;
#ifdef __cplusplus
}
#endif
#endif /* IG_STRUCTS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -