RetroArch
Classes | Macros | Functions | Variables
rgui.c File Reference
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <string/stdstring.h>
#include <lists/string_list.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <encodings/utf.h>
#include <file/file_path.h>
#include <retro_inline.h>
#include "../../frontend/frontend_driver.h"
#include "menu_generic.h"
#include "../menu_driver.h"
#include "../menu_animation.h"
#include "../widgets/menu_input_dialog.h"
#include "../../configuration.h"
#include "../../gfx/drivers_font_renderer/bitmap.h"
Include dependency graph for rgui.c:

Classes

struct  rgui_colors_t
 
struct  rgui_t
 

Macros

#define RGUI_TERM_START_X(width)   (width / 21)
 
#define RGUI_TERM_START_Y(height)   (height / 9)
 
#define RGUI_TERM_WIDTH(width)   (((width - RGUI_TERM_START_X(width) - RGUI_TERM_START_X(width)) / (FONT_WIDTH_STRIDE)))
 
#define RGUI_TERM_HEIGHT(width, height)   (((height - RGUI_TERM_START_Y(height) - RGUI_TERM_START_X(width)) / (FONT_HEIGHT_STRIDE)) - 1)
 
#define argb32_to_pixel_platform_format(color)   argb32_to_rgba4444(color)
 

Functions

static uint16_t argb32_to_rgba4444 (uint32_t col)
 
static void prepare_rgui_colors (rgui_t *rgui, settings_t *settings)
 
static uint16_t rgui_bg_filler (rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
 
static uint16_t rgui_border_filler (rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)
 
static void rgui_fill_rect (rgui_t *rgui, uint16_t *data, size_t pitch, unsigned x, unsigned y, unsigned width, unsigned height, uint16_t dark_color, uint16_t light_color, uint16_t(*col)(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color))
 
static void rgui_color_rect (uint16_t *data, size_t pitch, unsigned fb_width, unsigned fb_height, unsigned x, unsigned y, unsigned width, unsigned height, uint16_t color)
 
static void blit_line (int x, int y, const char *message, uint16_t color)
 
static bool rguidisp_init_font (menu_handle_t *menu)
 
static void rgui_render_background (rgui_t *rgui)
 
static void rgui_set_message (void *data, const char *message)
 
static void rgui_render_messagebox (rgui_t *rgui, const char *message)
 
static void rgui_blit_cursor (void)
 
static void rgui_frame (void *data, video_frame_info_t *video_info)
 
static void rgui_render (void *data, bool is_idle)
 
static void rgui_framebuffer_free (void)
 
static voidrgui_init (void **userdata, bool video_is_threaded)
 
static void rgui_free (void *data)
 
static void rgui_set_texture (void)
 
static void rgui_navigation_clear (void *data, bool pending_push)
 
static void rgui_navigation_set (void *data, bool scroll)
 
static void rgui_navigation_set_last (void *data)
 
static void rgui_navigation_descend_alphabet (void *data, size_t *unused)
 
static void rgui_navigation_ascend_alphabet (void *data, size_t *unused)
 
static void rgui_populate_entries (void *data, const char *path, const char *label, unsigned k)
 
static int rgui_environ (enum menu_environ_cb type, void *data, void *userdata)
 
static int rgui_pointer_tap (void *data, unsigned x, unsigned y, unsigned ptr, menu_file_list_cbs_t *cbs, menu_entry_t *entry, unsigned action)
 

Variables

static uint16_trgui_framebuf_data = NULL
 
menu_ctx_driver_t menu_ctx_rgui
 

Macro Definition Documentation

◆ argb32_to_pixel_platform_format

#define argb32_to_pixel_platform_format (   color)    argb32_to_rgba4444(color)

◆ RGUI_TERM_HEIGHT

#define RGUI_TERM_HEIGHT (   width,
  height 
)    (((height - RGUI_TERM_START_Y(height) - RGUI_TERM_START_X(width)) / (FONT_HEIGHT_STRIDE)) - 1)

◆ RGUI_TERM_START_X

#define RGUI_TERM_START_X (   width)    (width / 21)

◆ RGUI_TERM_START_Y

#define RGUI_TERM_START_Y (   height)    (height / 9)

◆ RGUI_TERM_WIDTH

#define RGUI_TERM_WIDTH (   width)    (((width - RGUI_TERM_START_X(width) - RGUI_TERM_START_X(width)) / (FONT_WIDTH_STRIDE)))

Function Documentation

◆ argb32_to_rgba4444()

static uint16_t argb32_to_rgba4444 ( uint32_t  col)
static

◆ blit_line()

static void blit_line ( int  x,
int  y,
const char *  message,
uint16_t  color 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_rgui_colors()

static void prepare_rgui_colors ( rgui_t rgui,
settings_t settings 
)
static
Here is the caller graph for this function:

◆ rgui_bg_filler()

static uint16_t rgui_bg_filler ( rgui_t rgui,
unsigned  x,
unsigned  y,
uint16_t  dark_color,
uint16_t  light_color 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_blit_cursor()

static void rgui_blit_cursor ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_border_filler()

static uint16_t rgui_border_filler ( rgui_t rgui,
unsigned  x,
unsigned  y,
uint16_t  dark_color,
uint16_t  light_color 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_color_rect()

static void rgui_color_rect ( uint16_t data,
size_t  pitch,
unsigned  fb_width,
unsigned  fb_height,
unsigned  x,
unsigned  y,
unsigned  width,
unsigned  height,
uint16_t  color 
)
static
Here is the caller graph for this function:

◆ rgui_environ()

static int rgui_environ ( enum menu_environ_cb  type,
void data,
void userdata 
)
static
Here is the call graph for this function:

◆ rgui_fill_rect()

static void rgui_fill_rect ( rgui_t rgui,
uint16_t data,
size_t  pitch,
unsigned  x,
unsigned  y,
unsigned  width,
unsigned  height,
uint16_t  dark_color,
uint16_t  light_color,
uint16_t(*)(rgui_t *rgui, unsigned x, unsigned y, uint16_t dark_color, uint16_t light_color)  col 
)
static
Here is the caller graph for this function:

◆ rgui_frame()

static void rgui_frame ( void data,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:

◆ rgui_framebuffer_free()

static void rgui_framebuffer_free ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_free()

static void rgui_free ( void data)
static
Here is the call graph for this function:

◆ rgui_init()

static void* rgui_init ( void **  userdata,
bool  video_is_threaded 
)
static
Here is the call graph for this function:

◆ rgui_navigation_ascend_alphabet()

static void rgui_navigation_ascend_alphabet ( void data,
size_t *  unused 
)
static
Here is the call graph for this function:

◆ rgui_navigation_clear()

static void rgui_navigation_clear ( void data,
bool  pending_push 
)
static
Here is the call graph for this function:

◆ rgui_navigation_descend_alphabet()

static void rgui_navigation_descend_alphabet ( void data,
size_t *  unused 
)
static
Here is the call graph for this function:

◆ rgui_navigation_set()

static void rgui_navigation_set ( void data,
bool  scroll 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_navigation_set_last()

static void rgui_navigation_set_last ( void data)
static
Here is the call graph for this function:

◆ rgui_pointer_tap()

static int rgui_pointer_tap ( void data,
unsigned  x,
unsigned  y,
unsigned  ptr,
menu_file_list_cbs_t cbs,
menu_entry_t entry,
unsigned  action 
)
static
Here is the call graph for this function:

◆ rgui_populate_entries()

static void rgui_populate_entries ( void data,
const char *  path,
const char *  label,
unsigned  k 
)
static
Here is the call graph for this function:

◆ rgui_render()

static void rgui_render ( void data,
bool  is_idle 
)
static
Here is the call graph for this function:

◆ rgui_render_background()

static void rgui_render_background ( rgui_t rgui)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_render_messagebox()

static void rgui_render_messagebox ( rgui_t rgui,
const char *  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgui_set_message()

static void rgui_set_message ( void data,
const char *  message 
)
static
Here is the call graph for this function:

◆ rgui_set_texture()

static void rgui_set_texture ( void  )
static
Here is the call graph for this function:

◆ rguidisp_init_font()

static bool rguidisp_init_font ( menu_handle_t menu)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ menu_ctx_rgui

menu_ctx_driver_t menu_ctx_rgui

◆ rgui_framebuf_data

uint16_t* rgui_framebuf_data = NULL
static