mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] renderers: add on_help to renderer interface
This will be used to tell a render to display a help message.
This commit is contained in:
parent
a00a6429d3
commit
5dce97264b
@ -35,6 +35,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(x)->on_mouse_shape && \
|
||||
(x)->on_mouse_event && \
|
||||
(x)->on_alert && \
|
||||
(x)->on_help && \
|
||||
(x)->render_startup && \
|
||||
(x)->render && \
|
||||
(x)->update_fps)
|
||||
@ -114,6 +115,7 @@ typedef bool (* LG_RendererOnMouseEvent )(void * opaque, const bool visi
|
||||
typedef bool (* LG_RendererOnFrameFormat)(void * opaque, const LG_RendererFormat format, bool useDMA);
|
||||
typedef bool (* LG_RendererOnFrame )(void * opaque, const FrameBuffer * frame, int dmaFD);
|
||||
typedef void (* LG_RendererOnAlert )(void * opaque, const LG_MsgAlert alert, const char * message, bool ** closeFlag);
|
||||
typedef void (* LG_RendererOnHelp )(void * opaque, const char * message);
|
||||
typedef bool (* LG_RendererRenderStartup)(void * opaque);
|
||||
typedef bool (* LG_RendererRender )(void * opaque, LG_RendererRotate rotate);
|
||||
typedef void (* LG_RendererUpdateFPS )(void * opaque, const float avgUPS, const float avgFPS);
|
||||
@ -134,6 +136,7 @@ typedef struct LG_Renderer
|
||||
LG_RendererOnFrameFormat on_frame_format;
|
||||
LG_RendererOnFrame on_frame;
|
||||
LG_RendererOnAlert on_alert;
|
||||
LG_RendererOnHelp on_help;
|
||||
LG_RendererRenderStartup render_startup;
|
||||
LG_RendererRender render;
|
||||
LG_RendererUpdateFPS update_fps;
|
||||
|
@ -476,6 +476,11 @@ void egl_on_alert(void * opaque, const LG_MsgAlert alert, const char * message,
|
||||
this->showAlert = true;
|
||||
}
|
||||
|
||||
void egl_on_help(void * opaque, const char * message)
|
||||
{
|
||||
// TODO: Implement this.
|
||||
}
|
||||
|
||||
bool egl_render_startup(void * opaque)
|
||||
{
|
||||
struct Inst * this = (struct Inst *)opaque;
|
||||
@ -729,6 +734,7 @@ struct LG_Renderer LGR_EGL =
|
||||
.on_frame_format = egl_on_frame_format,
|
||||
.on_frame = egl_on_frame,
|
||||
.on_alert = egl_on_alert,
|
||||
.on_help = egl_on_help,
|
||||
.render_startup = egl_render_startup,
|
||||
.render = egl_render,
|
||||
.update_fps = egl_update_fps
|
||||
|
@ -461,6 +461,11 @@ void opengl_on_alert(void * opaque, const LG_MsgAlert alert, const char * messag
|
||||
ll_push(this->alerts, a);
|
||||
}
|
||||
|
||||
void opengl_on_help(void * opaque, const char * message)
|
||||
{
|
||||
// TODO: Implement this.
|
||||
}
|
||||
|
||||
void bitmap_to_texture(LG_FontBitmap * bitmap, GLuint texture)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D , texture );
|
||||
@ -823,6 +828,7 @@ const LG_Renderer LGR_OpenGL =
|
||||
.on_frame_format = opengl_on_frame_format,
|
||||
.on_frame = opengl_on_frame,
|
||||
.on_alert = opengl_on_alert,
|
||||
.on_help = opengl_on_help,
|
||||
.render_startup = opengl_render_startup,
|
||||
.render = opengl_render,
|
||||
.update_fps = opengl_update_fps
|
||||
|
Loading…
Reference in New Issue
Block a user