FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuInit.c
Go to the documentation of this file.
1
#include <string.h>
2
#include "
FBLib_TMSOSDMenu.h
"
3
4
word
OSDRgn
,
MyOSDRgn
,
OSDMenuSelectionBarRgn
;
5
bool
OSDDirty
,
TitleDirty
,
ListDirty
,
ButtonsDirty
,
LogoDirty
;
6
tMenu
Menu
[
NRMENULEVELS
];
7
dword
CurrentMenuLevel
;
8
dword
ButtonColor
;
9
tCursorType
MenuCursorType
;
10
tOSDMenuLastCursorType
OSDMenuLastCursor
=
LCT_NRCURSORS
;
11
12
word
InfoBoxOSDRgn
;
13
dword
InfoBoxTimeOut
;
14
byte
*
InfoBoxSaveArea
;
15
dword
InfoBoxSaveAreaX
,
InfoBoxSaveAreaY
;
16
bool
InfoBoxExitButton
;
17
18
word
MessageBoxOSDRgn
;
19
tMessageBox
MessageBox
;
20
bool
MessageBoxNoNormalMode
;
21
bool
MessageBoxAllowScrollOver
;
22
23
word
ProgressBarOSDRgn
;
24
word
ProgressBarFullRgn
;
25
dword
ProgressBarLastValue
= 0xfff;
26
27
word
ColorPickerOSDRgn
;
28
dword
ColorPickerColor
;
29
dword
ColorPickerDefaultColor
;
30
tCurrentColorSelected
CurrentColorSelected
;
31
int
ColorPickerLastCursorRed
,
ColorPickerLastCursorGreen
,
ColorPickerLastCursorBlue
;
32
33
word
WaitSpinnerRgn
;
34
int
WaitSpinnerIndex
;
35
dword
WaitSpinnerTimeout
;
36
37
dword
LastUnprocessedOSDMenuKey
;
38
39
tFontDataUC
OSDMenuFont_10
;
40
tFontDataUC
OSDMenuFont_12
;
41
tFontDataUC
OSDMenuFont_14
;
42
tFontDataUC
OSDMenuFont_16
;
43
tFontDataUC
OSDMenuFont_18
;
44
tFontDataUC
OSDMenuFont_20
;
45
tFontDataUC
OSDMenuFont_20B
;
46
47
void
OSDMenuInit
(
bool
AllowScrollingOfLongText,
bool
HasValueColumn,
bool
NumberedItems,
bool
ScrollLoop,
const
char
*TitleLeft,
const
char
*TitleRight)
48
{
49
tMenu
*pMenu;
50
51
TRACEENTER
();
52
53
pMenu = &
Menu
[
CurrentMenuLevel
];
54
55
memset(pMenu, 0,
sizeof
(
tMenu
));
56
57
OSDMenuLoadStdFonts
();
58
59
pMenu->
OSDMenuDisplayMode
=
OMDM_Standard
;
60
pMenu->
AllowScrollingOfLongText
= AllowScrollingOfLongText;
61
pMenu->
HasValueColumn
= HasValueColumn;
62
pMenu->
NumberedItems
= NumberedItems;
63
pMenu->
ScrollLoop
= ScrollLoop;
64
pMenu->
XPos
= 60;
65
pMenu->
Width
= 600;
66
pMenu->
ValueXPos
= 350;
67
pMenu->
ValueXOffset
= 15;
68
pMenu->
hasValueArrows
= FALSE;
69
pMenu->
MaxItems
= 30;
70
pMenu->
Item
= TAP_MemAlloc(pMenu->
MaxItems
*
sizeof
(
tItem
));
71
memset(&pMenu->
Item
[0], 0, pMenu->
MaxItems
*
sizeof
(
tItem
));
72
73
OSDMenuSetLineHeight
(
LH_Normal
);
74
75
if
(TitleLeft) strncpy(pMenu->
TitleLeft
, TitleLeft,
STDSTRINGSIZE
);
76
else
pMenu->
TitleLeft
[0] =
'\0'
;
77
78
pMenu->
TitleLeft
[
STDSTRINGSIZE
- 1] =
'\0'
;
79
80
if
(TitleRight) strncpy(pMenu->
TitleRight
, TitleRight,
STDSTRINGSIZE
);
81
else
pMenu->
TitleRight
[0] =
'\0'
;
82
83
pMenu->
TitleRight
[
STDSTRINGSIZE
- 1] =
'\0'
;
84
85
MenuCursorType
=
CT_Standard
;
86
87
TRACEEXIT
();
88
}
FBLib_TMSOSDMenu.h
NRMENULEVELS
#define NRMENULEVELS
Definition:
FBLib_TMSOSDMenu.h:9
OMDM_Standard
@ OMDM_Standard
Definition:
FBLib_TMSOSDMenu.h:60
tOSDMenuLastCursorType
tOSDMenuLastCursorType
Definition:
FBLib_TMSOSDMenu.h:126
LCT_NRCURSORS
@ LCT_NRCURSORS
Definition:
FBLib_TMSOSDMenu.h:129
STDSTRINGSIZE
#define STDSTRINGSIZE
Definition:
FBLib_TMSOSDMenu.h:8
OSDMenuLoadStdFonts
void OSDMenuLoadStdFonts(void)
Definition:
OSDMenuLoadStdFonts.c:3
tCurrentColorSelected
tCurrentColorSelected
Definition:
FBLib_TMSOSDMenu.h:119
ColorPickerLastCursorBlue
int ColorPickerLastCursorBlue
Definition:
OSDMenuInit.c:31
ColorPickerLastCursorRed
int ColorPickerLastCursorRed
Definition:
OSDMenuInit.c:31
OSDMenuLastCursor
tOSDMenuLastCursorType OSDMenuLastCursor
Definition:
OSDMenuInit.c:10
ColorPickerLastCursorGreen
int ColorPickerLastCursorGreen
Definition:
OSDMenuInit.c:31
InfoBoxSaveAreaX
dword InfoBoxSaveAreaX
Definition:
OSDMenuInit.c:15
LastUnprocessedOSDMenuKey
dword LastUnprocessedOSDMenuKey
Definition:
OSDMenuInit.c:37
Menu
tMenu Menu[NRMENULEVELS]
Definition:
OSDMenuInit.c:6
OSDMenuFont_18
tFontDataUC OSDMenuFont_18
Definition:
OSDMenuInit.c:43
OSDMenuInit
void OSDMenuInit(bool AllowScrollingOfLongText, bool HasValueColumn, bool NumberedItems, bool ScrollLoop, const char *TitleLeft, const char *TitleRight)
Definition:
OSDMenuInit.c:47
OSDDirty
bool OSDDirty
Definition:
OSDMenuInit.c:5
OSDMenuFont_10
tFontDataUC OSDMenuFont_10
Definition:
OSDMenuInit.c:39
ProgressBarFullRgn
word ProgressBarFullRgn
Definition:
OSDMenuInit.c:24
MessageBox
tMessageBox MessageBox
Definition:
OSDMenuInit.c:19
MessageBoxOSDRgn
word MessageBoxOSDRgn
Definition:
OSDMenuInit.c:18
InfoBoxTimeOut
dword InfoBoxTimeOut
Definition:
OSDMenuInit.c:13
WaitSpinnerTimeout
dword WaitSpinnerTimeout
Definition:
OSDMenuInit.c:35
InfoBoxExitButton
bool InfoBoxExitButton
Definition:
OSDMenuInit.c:16
ProgressBarOSDRgn
word ProgressBarOSDRgn
Definition:
OSDMenuInit.c:23
MessageBoxAllowScrollOver
bool MessageBoxAllowScrollOver
Definition:
OSDMenuInit.c:21
OSDMenuFont_12
tFontDataUC OSDMenuFont_12
Definition:
OSDMenuInit.c:40
OSDMenuFont_14
tFontDataUC OSDMenuFont_14
Definition:
OSDMenuInit.c:41
InfoBoxOSDRgn
word InfoBoxOSDRgn
Definition:
OSDMenuInit.c:12
ProgressBarLastValue
dword ProgressBarLastValue
Definition:
OSDMenuInit.c:25
CurrentColorSelected
tCurrentColorSelected CurrentColorSelected
Definition:
OSDMenuInit.c:30
OSDMenuFont_20B
tFontDataUC OSDMenuFont_20B
Definition:
OSDMenuInit.c:45
WaitSpinnerIndex
int WaitSpinnerIndex
Definition:
OSDMenuInit.c:34
InfoBoxSaveArea
byte * InfoBoxSaveArea
Definition:
OSDMenuInit.c:14
CurrentMenuLevel
dword CurrentMenuLevel
Definition:
OSDMenuInit.c:7
OSDMenuFont_20
tFontDataUC OSDMenuFont_20
Definition:
OSDMenuInit.c:44
ListDirty
bool ListDirty
Definition:
OSDMenuInit.c:5
ColorPickerOSDRgn
word ColorPickerOSDRgn
Definition:
OSDMenuInit.c:27
WaitSpinnerRgn
word WaitSpinnerRgn
Definition:
OSDMenuInit.c:33
ButtonsDirty
bool ButtonsDirty
Definition:
OSDMenuInit.c:5
OSDRgn
word OSDRgn
Definition:
OSDMenuInit.c:4
TitleDirty
bool TitleDirty
Definition:
OSDMenuInit.c:5
OSDMenuSelectionBarRgn
word OSDMenuSelectionBarRgn
Definition:
OSDMenuInit.c:4
LogoDirty
bool LogoDirty
Definition:
OSDMenuInit.c:5
MenuCursorType
tCursorType MenuCursorType
Definition:
OSDMenuInit.c:9
MyOSDRgn
word MyOSDRgn
Definition:
OSDMenuInit.c:4
ColorPickerDefaultColor
dword ColorPickerDefaultColor
Definition:
OSDMenuInit.c:29
MessageBoxNoNormalMode
bool MessageBoxNoNormalMode
Definition:
OSDMenuInit.c:20
ButtonColor
dword ButtonColor
Definition:
OSDMenuInit.c:8
InfoBoxSaveAreaY
dword InfoBoxSaveAreaY
Definition:
OSDMenuInit.c:15
OSDMenuFont_16
tFontDataUC OSDMenuFont_16
Definition:
OSDMenuInit.c:42
ColorPickerColor
dword ColorPickerColor
Definition:
OSDMenuInit.c:28
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
OSDMenuSetLineHeight
void OSDMenuSetLineHeight(tLineHeight type)
Definition:
OSDMenuSetLineHeight.c:3
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tCursorType
tCursorType
Definition:
libFireBird.h:2747
CT_Standard
@ CT_Standard
Definition:
libFireBird.h:2748
LH_Normal
@ LH_Normal
Definition:
libFireBird.h:2741
tFontDataUC
Definition:
libFireBird.h:1849
tItem
Definition:
FBLib_TMSOSDMenu.h:32
tMenu
Definition:
FBLib_TMSOSDMenu.h:67
tMenu::NumberedItems
bool NumberedItems
Definition:
FBLib_TMSOSDMenu.h:81
tMenu::AllowScrollingOfLongText
bool AllowScrollingOfLongText
Definition:
FBLib_TMSOSDMenu.h:76
tMenu::XPos
dword XPos
Definition:
FBLib_TMSOSDMenu.h:68
tMenu::Width
dword Width
Definition:
FBLib_TMSOSDMenu.h:69
tMenu::Item
tItem * Item
Definition:
FBLib_TMSOSDMenu.h:71
tMenu::OSDMenuDisplayMode
tOSDMenuDisplayMode OSDMenuDisplayMode
Definition:
FBLib_TMSOSDMenu.h:96
tMenu::hasValueArrows
bool hasValueArrows
Definition:
FBLib_TMSOSDMenu.h:82
tMenu::TitleRight
char TitleRight[STDSTRINGSIZE]
Definition:
FBLib_TMSOSDMenu.h:87
tMenu::HasValueColumn
bool HasValueColumn
Definition:
FBLib_TMSOSDMenu.h:77
tMenu::ValueXPos
dword ValueXPos
Definition:
FBLib_TMSOSDMenu.h:78
tMenu::MaxItems
int MaxItems
Definition:
FBLib_TMSOSDMenu.h:73
tMenu::ValueXOffset
int ValueXOffset
Definition:
FBLib_TMSOSDMenu.h:79
tMenu::TitleLeft
char TitleLeft[STDSTRINGSIZE]
Definition:
FBLib_TMSOSDMenu.h:86
tMenu::ScrollLoop
bool ScrollLoop
Definition:
FBLib_TMSOSDMenu.h:80
tMessageBox
Definition:
FBLib_TMSOSDMenu.h:108
TMSOSDMenu
OSDMenuInit.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3