2015-04-21 12:44:14 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MENU_DISPLAY_H__
|
|
|
|
#define __MENU_DISPLAY_H__
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <boolean.h>
|
|
|
|
|
2015-06-15 00:08:25 +00:00
|
|
|
#include <queues/message_queue.h>
|
|
|
|
|
2015-06-15 15:34:12 +00:00
|
|
|
#include "menu_animation.h"
|
2015-06-13 21:07:27 +00:00
|
|
|
#include "../gfx/font_renderer_driver.h"
|
2015-04-22 23:21:43 +00:00
|
|
|
|
2015-04-21 12:44:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
typedef struct menu_framebuf
|
|
|
|
{
|
|
|
|
uint16_t *data;
|
|
|
|
unsigned width;
|
|
|
|
unsigned height;
|
|
|
|
size_t pitch;
|
|
|
|
bool dirty;
|
|
|
|
} menu_framebuf_t;
|
|
|
|
|
2015-06-14 13:34:05 +00:00
|
|
|
typedef struct menu_display
|
|
|
|
{
|
2015-06-15 00:37:32 +00:00
|
|
|
bool msg_force;
|
|
|
|
|
2015-06-14 13:34:05 +00:00
|
|
|
menu_framebuf_t frame_buf;
|
2015-09-06 03:00:08 +00:00
|
|
|
menu_animation_t *animation;
|
2015-06-14 13:34:05 +00:00
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
void *buf;
|
|
|
|
int size;
|
|
|
|
|
|
|
|
const uint8_t *framebuf;
|
|
|
|
bool alloc_framebuf;
|
|
|
|
} font;
|
|
|
|
|
|
|
|
unsigned header_height;
|
2015-06-15 00:08:25 +00:00
|
|
|
|
|
|
|
msg_queue_t *msg_queue;
|
2015-06-14 13:34:05 +00:00
|
|
|
} menu_display_t;
|
|
|
|
|
|
|
|
menu_display_t *menu_display_get_ptr(void);
|
|
|
|
|
2015-06-13 14:42:11 +00:00
|
|
|
menu_framebuf_t *menu_display_fb_get_ptr(void);
|
2015-04-21 12:44:14 +00:00
|
|
|
|
2015-09-25 11:12:21 +00:00
|
|
|
void menu_display_libretro(void);
|
2015-05-18 21:02:04 +00:00
|
|
|
|
2015-05-18 21:14:56 +00:00
|
|
|
void menu_display_fb_set_dirty(void);
|
|
|
|
|
|
|
|
void menu_display_fb_unset_dirty(void);
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
void menu_display_free(void *data);
|
2015-04-21 12:44:14 +00:00
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
bool menu_display_init(void *data);
|
2015-04-21 12:44:14 +00:00
|
|
|
|
|
|
|
bool menu_display_update_pending(void);
|
|
|
|
|
2015-05-12 12:41:01 +00:00
|
|
|
float menu_display_get_dpi(void);
|
2015-04-21 13:45:03 +00:00
|
|
|
|
2015-04-24 20:01:33 +00:00
|
|
|
bool menu_display_font_init_first(const void **font_driver,
|
|
|
|
void **font_handle, void *video_data, const char *font_path,
|
|
|
|
float font_size);
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
bool menu_display_font_bind_block(void *data,
|
2015-04-24 21:22:47 +00:00
|
|
|
const struct font_renderer *font_driver, void *userdata);
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
bool menu_display_font_flush_block(void *data,
|
2015-04-24 21:22:47 +00:00
|
|
|
const struct font_renderer *font_driver);
|
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
bool menu_display_init_main_font(void *data,
|
2015-05-01 12:00:03 +00:00
|
|
|
const char *font_path, float font_size);
|
2015-06-13 15:09:23 +00:00
|
|
|
|
2015-06-13 21:07:27 +00:00
|
|
|
void menu_display_free_main_font(void *data);
|
2015-05-01 12:00:03 +00:00
|
|
|
|
2015-05-12 12:41:01 +00:00
|
|
|
void menu_display_set_viewport(void);
|
2015-04-26 16:08:17 +00:00
|
|
|
|
2015-05-12 12:41:01 +00:00
|
|
|
void menu_display_unset_viewport(void);
|
2015-04-26 16:08:17 +00:00
|
|
|
|
2015-06-08 12:57:46 +00:00
|
|
|
void menu_display_timedate(char *s, size_t len, unsigned time_mode);
|
|
|
|
|
2015-09-22 20:10:43 +00:00
|
|
|
void menu_display_msg_queue_push(const char *msg, unsigned prio, unsigned duration,
|
|
|
|
bool flush);
|
|
|
|
|
2015-04-21 12:44:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|