Description
  This structure is a base structure useful for any context library.
All context defined in bunny library will lay on it.
Some fields are required and should be field by you before.
Attributes
-
void *main_structure:
  The main_structure pointer is present to be set to your own
data address. It is mainly present to be passed to callbacks that may
be additionnally provided by the context. It is also present in case
you wish to create your own context.
-
t_bunny_context subcontext:
  The subcontext will allow you to set callbacks that will be
called by the foreground context. Note that those calls
entirely depends of the context. About the return value, the
behaviour should be to always return the first not t_bunny_response GO_ON
value to bunny_loop.
This is specifically useful when you are writing a context library:
it allows you to create your library whithout preventing any user of your
library to insert events as he or she needs.
-
t_bunny_buffer *screen:
  The screen pointer is the area where pixels are drawn. It may be the window
or something else compatible with t_bunny_buffer.
  An interesting example mixing the usage of a t_bunny_picture for
screen and an additionnal display function in subcontext would be to
resize the graphic output from the original one to the real window size.
-
size_t next_context:
  The next_context field is the id of the context that should be used
after leaving the current one.
INDEX
Description
  The real type of the third parameter is
t_bunny_context_runtime_info.
This function does nothing except calling
subcontext.key if not
NULL,
and returning its value.
This is useful to create a bridge from the current context to the
subcontext.
INDEX
Description
  The real type of the third parameter is
t_bunny_context_runtime_info.
This function does nothing except calling
subcontext.click if not
NULL,
and returning its value.
This is useful to create a bridge from the current context to the
subcontext.
INDEX
void Bunny::SetContext(const Bunny::Context_derivate &context);
Parameters
-
const Bunny::Context &context:
  The context to set to the bunny loop
INDEX
class Bunny::Context<T>;
Description
  A class from which you can inherit. Overload the function you want
to set inside the context and call Bunny::SetContext. The function
will be called automatically.
Member functions that can be overloaded
-
t_bunny_response Key(t_bunny_event_state state, t_bunny_keysym sym);
-
t_bunny_response Text(t_bunny_type type);
-
t_bunny_response Click(t_bunny_event_state state,
t_bunny_mouse_button button);
-
t_bunny_response Move(const t_bunny_position *relative);
-
t_bunny_response Wheel(int wheelid,
int delta);
-
t_bunny_response JoyConnect(t_bunny_event_state state,
int joyid,
const t_bunny_joystick *info);
-
t_bunny_response JoyAxis(int id,
t_bunny_axis axis,
float value);
-
t_bunny_response JoyButton(t_bunny_event_state state,
int joyid,
int button);
-
t_bunny_response GetFocus(const t_bunny_window *win);
-
t_bunny_response LostFocus(const t_bunny_window *win);
-
t_bunny_response Resize(const t_bunny_window *win,
const t_bunny_position *size);
-
t_bunny_response Close(const t_bunny_window *win);
-
t_bunny_response Loop(void);
-
t_bunny_response Display(void);
-
virtual t_bunny_network *Netcom(void);
-
t_bunny_response NetMessage(int fd,
const void *buffer,
size_t bufsize);
-
t_bunny_response NetConnect(int fd,
t_bunny_event_state state);
-
t_bunny_response Entering(void);
-
void Leaving(t_bunny_response return_value);
-
t_bunny_response AsyncComputation(void *computed_val);
INDEX