NekoWM
A gfxprim proxy backend tiling window manager
|
View is an abstraction for a piece of a screen. More...
#include <core/gp_core.h>
#include <backends/gp_types.h>
Go to the source code of this file.
Data Structures | |
struct | neko_view_slot_ops |
A view slot ops. More... | |
struct | neko_view_slot |
A view slot content. More... | |
struct | neko_view |
View a part of a screen. More... | |
Typedefs | |
typedef struct neko_view_slot_ops | neko_view_slot_ops |
A view slot ops. | |
typedef struct neko_view_slot | neko_view_slot |
A view slot content. | |
typedef struct neko_view | neko_view |
View a part of a screen. | |
Enumerations | |
enum | neko_view_split_mode |
A split mode. More... | |
Functions | |
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_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_flip (neko_view *self) |
Update whole view on the screen. | |
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. | |
gp_pixmap * | neko_view_pixmap (neko_view *self) |
Returns a pixmap for the view. | |
void | neko_view_resize (neko_view *self, gp_size w, gp_size h) |
Resizes the view recursively along with all slots. | |
void | neko_view_repaint (neko_view *self) |
Request a view repaint. | |
View is an abstraction for a piece of a screen.
View can be divided into subviews recursively.
Each view has a slot, if slot is not empty the screen is taken over by the slot content.
Definition in file neko_view.h.
typedef struct neko_view_slot neko_view_slot |
A view slot content.
Something to be shown in the view on the screen.
typedef struct neko_view_slot_ops neko_view_slot_ops |
A view slot ops.
Callback to render a slot content.
enum neko_view_split_mode |
A split mode.
If view is split it can be split either horizontally or vertically.
Definition at line 31 of file neko_view.h.
void neko_view_event | ( | neko_view * | self, |
gp_event * | ev | ||
) |
Sends an input event to a view child.
self | A neko view. |
ev | An input event. |
void neko_view_flip | ( | neko_view * | self | ) |
Update whole view on the screen.
This is called by the child when content needs to be updated from the view pixmap and painted on the screen.
self | A neko view. |
Returns view focused child.
self | A neko view. |
int neko_view_is_focused | ( | neko_view * | self | ) |
Returns true if view is focused.
self | A neko view. |
gp_pixmap * neko_view_pixmap | ( | neko_view * | self | ) |
Returns a pixmap for the view.
self | A neko view. |
void neko_view_repaint | ( | neko_view * | self | ) |
Request a view repaint.
Needs to be called after resize on view(s) shown on the screen(s).
self | A view to be repainted. |
void neko_view_resize | ( | neko_view * | self, |
gp_size | w, | ||
gp_size | h | ||
) |
Resizes the view recursively along with all slots.
self | A neko view. |
w | New width. |
h | New height. |
|
inlinestatic |
Child did exit.
This is called by a child when it did exit. The view should replace the child with a different one (if possible) in the handler.
self | A neko view. |
Definition at line 178 of file neko_view.h.
References neko_view::slot, and neko_view::slot_exit.
void neko_view_slot_put | ( | neko_view * | self, |
neko_view_slot * | slot | ||
) |
Fills in a slot in a neko view.
Sets a new view slot content, possibly replaces currently shown content. If slot is NULL the view becomes empty.
self | A neko view. |
slot | A new neko view slot content to be shonw in the view. |
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.
This is called by the child when content needs to be updated from the view pixmap and painted on the screen.
self | A neko view. |