20#include <core/gp_core.h>
21#include <backends/gp_types.h>
32 NEKO_VIEW_SPLIT_HORIZ,
140 gp_size
x, gp_size
y, gp_size
w, gp_size
h);
162static inline int neko_view_is_shown(
neko_view *self)
186 GP_DEBUG(1,
"Calling slot empty callback view %p", self);
void neko_view_repaint(neko_view *self)
Request a view repaint.
gp_pixmap * neko_view_pixmap(neko_view *self)
Returns a pixmap for the view.
neko_view_split_mode
A split mode.
void neko_view_slot_put(neko_view *self, neko_view_slot *slot)
Fills in a slot in a neko view.
void neko_view_event(neko_view *self, gp_event *ev)
Sends an input event to a view child.
void neko_view_update_rect(neko_view *self, gp_coord x, gp_coord y, gp_size w, gp_size h)
Update rectangle in the view on the screen.
void neko_view_resize(neko_view *self, gp_size w, gp_size h)
Resizes the view recursively along with all slots.
neko_view * neko_view_focused_child(neko_view *self)
Returns view focused child.
int neko_view_is_focused(neko_view *self)
Returns true if view is focused.
static void neko_view_slot_exit(neko_view *self)
Child did exit.
void neko_view_flip(neko_view *self)
Update whole view on the screen.
void(* exit)(struct neko_view_slot *self)
Request child exit.
void(* show)(struct neko_view *self)
Show a view slot.
void(* remove)(struct neko_view *self)
Callback for a slot removal.
void(* event)(struct neko_view *self, gp_event *ev)
A child input event.
void(* hide)(struct neko_view *self)
Hide a view slot.
void(* repaint)(struct neko_view *self)
Request full repaint.
void(* resize)(struct neko_view *self)
Resize the child because the view was resized.
struct neko_view * view
Set to a parent if slot is inserted into a view.
gp_dlist_head list
A list head, used for grouping children into lists.
const neko_view_slot_ops * ops
A neko view child implementation.
gp_size h
A height on the backend pixmap.
void(* slot_exit)(struct neko_view *self)
Called by child when it did exit.
gp_size x
A x offset on the backend pixmap.
unsigned int focused_subview
Currently focused subview.
gp_size w
A width on the backend pixmap.
gp_size y
A y offset on the backend pixmap.
neko_view_slot * slot
What is shown in the view.
enum neko_view_split_mode split_mode
Type of the split.
unsigned int is_shown
Set if view is shown on a screen.
struct neko_view * subviews[2]
A view may be split into two subviews.
struct neko_view * parent
A view parent, NULL for top level view.