iPXE
Functions
wininit.c File Reference

MuCurses initialisation functions. More...

#include <stddef.h>
#include <curses.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
WINDOWinitscr (void)
 Initialise console environment. More...
 
int endwin (void)
 Finalise console environment. More...
 

Detailed Description

MuCurses initialisation functions.

Definition in file wininit.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ initscr()

WINDOW* initscr ( void  )

Initialise console environment.

Return values
*winreturn pointer to stdscr

Definition at line 17 of file wininit.c.

17  {
18  /* determine console size */
19  /* initialise screen */
20  stdscr->scr->init( stdscr->scr );
21  stdscr->height = LINES;
22  stdscr->width = COLS;
23  move ( 0, 0 );
24  return stdscr;
25 }
#define LINES(...)
Define inline lines.
Definition: linebuf_test.c:44
#define stdscr
Definition: curses.h:110
#define COLS
Definition: curses.h:111
static int move(int y, int x)
Definition: curses.h:593

References COLS, LINES, move(), and stdscr.

Referenced by login_ui(), pxe_menu_select(), settings_ui(), and show_menu().

◆ endwin()

int endwin ( void  )

Finalise console environment.

Definition at line 31 of file wininit.c.

31  {
32  attrset ( 0 );
33  color_set ( 0, NULL );
34  curs_set ( 1 );
35  mvprintw ( ( LINES - 1 ), 0, "\n" );
36  stdscr->scr->exit( stdscr->scr );
37  return OK;
38 }
static int attrset(int attrs)
Definition: curses.h:516
#define mvprintw(y, x, fmt,...)
Definition: curses.h:648
#define LINES(...)
Define inline lines.
Definition: linebuf_test.c:44
Definition: sis900.h:208
#define stdscr
Definition: curses.h:110
int curs_set(int visibility)
Set cursor visibility.
Definition: mucurses.c:153
#define color_set(cpno, opts)
Definition: curses.h:240
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References attrset(), color_set, curs_set(), LINES, mvprintw, NULL, OK, and stdscr.

Referenced by login_ui(), pxe_menu_select(), settings_ui(), and show_menu().