|
iPXE
|
Jump scrolling. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | jump_scroller |
| A jump scroller. More... | |
Macros | |
| #define | SCROLL(delta) ( ( unsigned int ) ( uint16_t ) ( int16_t ) (delta) ) |
| Construct scroll movement. More... | |
| #define | SCROLL_DELTA(scroll) ( ( int16_t ) ( (scroll) & 0x0000ffffUL ) ) |
| Extract change in scroller position. More... | |
| #define | SCROLL_FLAGS 0xffff0000UL |
| Scroll movement flags. More... | |
| #define | SCROLL_WRAP 0x80000000UL |
| Wrap around scrolling. More... | |
| #define | SCROLL_NONE SCROLL ( 0 ) |
| Do not scroll. More... | |
| #define | SCROLL_UP SCROLL ( -1 ) |
| Scroll up by one line. More... | |
| #define | SCROLL_DOWN SCROLL ( +1 ) |
| Scroll down by one line. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | jump_scroll_is_first (struct jump_scroller *scroll) |
| Check if jump scroller is currently on first page. More... | |
| static int | jump_scroll_is_last (struct jump_scroller *scroll) |
| Check if jump scroller is currently on last page. More... | |
| unsigned int | jump_scroll_key (struct jump_scroller *scroll, int key) |
| Jump scrolling. More... | |
| unsigned int | jump_scroll_move (struct jump_scroller *scroll, unsigned int move) |
| Move scroller. More... | |
| int | jump_scroll (struct jump_scroller *scroll) |
| Jump scroll to new page (if applicable) More... | |
Jump scrolling.
Definition in file jumpscroll.h.
Construct scroll movement.
| delta | Change in scroller position |
| move | Scroll movement |
Definition at line 32 of file jumpscroll.h.
| #define SCROLL_DELTA | ( | scroll | ) | ( ( int16_t ) ( (scroll) & 0x0000ffffUL ) ) |
Extract change in scroller position.
| move | Scroll movement |
| delta | Change in scroller position |
Definition at line 40 of file jumpscroll.h.
| #define SCROLL_FLAGS 0xffff0000UL |
Scroll movement flags.
Definition at line 43 of file jumpscroll.h.
| #define SCROLL_WRAP 0x80000000UL |
Wrap around scrolling.
Definition at line 44 of file jumpscroll.h.
| #define SCROLL_NONE SCROLL ( 0 ) |
Do not scroll.
Definition at line 47 of file jumpscroll.h.
| #define SCROLL_UP SCROLL ( -1 ) |
Scroll up by one line.
Definition at line 50 of file jumpscroll.h.
| #define SCROLL_DOWN SCROLL ( +1 ) |
Scroll down by one line.
Definition at line 53 of file jumpscroll.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Check if jump scroller is currently on first page.
| scroll | Jump scroller |
| is_first | Scroller is currently on first page |
Definition at line 61 of file jumpscroll.h.
References jump_scroller::first.
Referenced by draw_menu_items(), and draw_setting_rows().
|
inlinestatic |
Check if jump scroller is currently on last page.
| scroll | Jump scroller |
| is_last | Scroller is currently on last page |
Definition at line 72 of file jumpscroll.h.
References jump_scroller::count, jump_scroller::first, and jump_scroller::rows.
Referenced by draw_menu_items(), and draw_setting_rows().
| unsigned int jump_scroll_key | ( | struct jump_scroller * | scroll, |
| int | key | ||
| ) |
Jump scrolling.
Handle keypress
| scroll | Jump scroller |
| key | Key pressed by user |
| move | Scroller movement, or zero |
Definition at line 42 of file jumpscroll.c.
References assert(), jump_scroller::count, jump_scroller::current, jump_scroller::first, flags, key, KEY_DOWN, KEY_END, KEY_HOME, KEY_NPAGE, KEY_PPAGE, KEY_UP, jump_scroller::rows, SCROLL, SCROLL_WRAP, and TAB.
Referenced by form_loop(), main_loop(), and menu_loop().
| unsigned int jump_scroll_move | ( | struct jump_scroller * | scroll, |
| unsigned int | move | ||
| ) |
Move scroller.
| scroll | Jump scroller |
| move | Scroller movement |
| move | Continuing scroller movement (if applicable) |
Definition at line 92 of file jumpscroll.c.
References assert(), jump_scroller::count, jump_scroller::current, move(), SCROLL, SCROLL_DELTA, SCROLL_FLAGS, and SCROLL_WRAP.
Referenced by form_loop(), main_loop(), and menu_loop().
| int jump_scroll | ( | struct jump_scroller * | scroll | ) |
Jump scroll to new page (if applicable)
| scroll | Jump scroller |
| jumped | Jumped to a new page |
Definition at line 140 of file jumpscroll.c.
References assert(), jump_scroller::count, jump_scroller::current, jump_scroller::first, index, and jump_scroller::rows.
Referenced by main_loop(), menu_loop(), and show_menu().
1.8.15