FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuScrollPageUp.c
Go to the documentation of this file.
1
#include "
FBLib_TMSOSDMenu.h
"
2
3
int
OSDMenuScrollPageUp
(
void
)
4
{
5
TRACEENTER
();
6
7
tMenu
*pMenu;
8
int
ret, x;
9
10
pMenu = &
Menu
[
CurrentMenuLevel
];
11
12
if
((pMenu->
CurrentSelection
== 0) && pMenu->
ScrollLoop
)
13
{
14
ret =
OSDMenuFindPreviousSelectableEntry
(pMenu->
NrItems
);
15
}
16
else
if
(pMenu->
CurrentSelection
== pMenu->
CurrentTopIndex
)
17
{
18
x = pMenu->
CurrentSelection
- pMenu->
NrLines
;
19
if
(x < 0) x = 0;
20
ret =
OSDMenuFindPreviousSelectableEntry
(x + 1);
21
}
22
else
23
ret =
OSDMenuFindPreviousSelectableEntry
(pMenu->
CurrentTopIndex
+ 1);
24
25
if
(ret == -1)
26
{
27
TRACEEXIT
();
28
return
-1;
29
}
30
31
pMenu->
CurrentSelection
= ret;
32
ListDirty
= TRUE;
33
34
TRACEEXIT
();
35
return
ret;
36
}
FBLib_TMSOSDMenu.h
Menu
tMenu Menu[NRMENULEVELS]
Definition:
OSDMenuInit.c:6
CurrentMenuLevel
dword CurrentMenuLevel
Definition:
OSDMenuInit.c:7
ListDirty
bool ListDirty
Definition:
FBLib_TMSOSDMenu.h:223
OSDMenuScrollPageUp
int OSDMenuScrollPageUp(void)
Definition:
OSDMenuScrollPageUp.c:3
OSDMenuFindPreviousSelectableEntry
int OSDMenuFindPreviousSelectableEntry(int CurrentSelection)
Definition:
OSDMenuFindPreviousSelectableEntry.c:3
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tMenu
Definition:
FBLib_TMSOSDMenu.h:67
tMenu::CurrentSelection
int CurrentSelection
Definition:
FBLib_TMSOSDMenu.h:74
tMenu::NrLines
int NrLines
Definition:
FBLib_TMSOSDMenu.h:70
tMenu::CurrentTopIndex
int CurrentTopIndex
Definition:
FBLib_TMSOSDMenu.h:75
tMenu::NrItems
int NrItems
Definition:
FBLib_TMSOSDMenu.h:72
tMenu::ScrollLoop
bool ScrollLoop
Definition:
FBLib_TMSOSDMenu.h:80
TMSOSDMenu
OSDMenuScrollPageUp.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3