Loading...
Searching...
No Matches
view_holder.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <gui/view.h>
13#include <gui/gui.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct ViewHolder ViewHolder;
20
24typedef void (*FreeCallback)(void* free_context);
25
31typedef void (*BackCallback)(void* back_context);
32
38
46void view_holder_free(ViewHolder* view_holder);
47
56void view_holder_set_view(ViewHolder* view_holder, View* view);
57
66 ViewHolder* view_holder,
67 FreeCallback free_callback,
68 void* free_context);
69
79
91 ViewHolder* view_holder,
92 BackCallback back_callback,
93 void* back_context);
94
101void view_holder_attach_to_gui(ViewHolder* view_holder, Gui* gui);
102
109void view_holder_update(View* view, void* context);
110
116void view_holder_send_to_front(ViewHolder* view_holder);
117
123void view_holder_send_to_back(ViewHolder* view_holder);
124
125#ifdef __cplusplus
126}
127#endif
GUI: main API.
Gui structure.
Definition gui_i.h:47
Definition view_holder.c:6
Definition view_i.h:16
GUI: View API.
void view_holder_free(ViewHolder *view_holder)
Free ViewHolder and call Free callback.
Definition view_holder.c:34
void view_holder_set_back_callback(ViewHolder *view_holder, BackCallback back_callback, void *back_context)
Set the back key callback.
Definition view_holder.c:100
void view_holder_update(View *view, void *context)
View Update Handler.
Definition view_holder.c:117
void(* BackCallback)(void *back_context)
Back callback type.
Definition view_holder.h:31
void(* FreeCallback)(void *free_context)
Free callback type.
Definition view_holder.h:24
void * view_holder_get_free_context(ViewHolder *view_holder)
Free callback context getter.
Definition view_holder.c:96
void view_holder_send_to_front(ViewHolder *view_holder)
Send ViewPort of this ViewHolder instance to front.
Definition view_holder.c:127
ViewHolder * view_holder_alloc(void)
Allocate ViewHolder.
Definition view_holder.c:23
void view_holder_set_view(ViewHolder *view_holder, View *view)
Set view for ViewHolder.
Definition view_holder.c:51
void view_holder_send_to_back(ViewHolder *view_holder)
Send ViewPort of this ViewHolder instance to back.
Definition view_holder.c:133
void view_holder_set_free_callback(ViewHolder *view_holder, FreeCallback free_callback, void *free_context)
Set Free callback.
Definition view_holder.c:87
void view_holder_attach_to_gui(ViewHolder *view_holder, Gui *gui)
Attach ViewHolder to GUI.
Definition view_holder.c:109