Bienvenue sur le site de la LibLapin.
Jetez un coup d'oeil en bas de la page pour choisir votre niveau de documentation en fonction de votre niveau avec la LibLapin.
Pour l'instant, c'est réglé sur 'Manuel complet'. Si c'est votre première fois avec la LibLapin, il vaudrait mieux choisir 'Débutant'.
De même, n'oubliez pas de préciser une version de la bibliothèque.

LibLapin's logo

LibLapin

Context





The context module header is lapin/context.h.
typedef struct s_bunny_context_runtime_info
{
     void *main_structure;
     t‌_‌b‌u‌n‌n‌y‌_‌c‌o‌n‌t‌e‌x‌t subcontext;
     t‌_‌b‌u‌n‌n‌y‌_‌b‌u‌f‌f‌e‌r *screen;
     size_t next_context;

} t‌_‌b‌u‌n‌n‌y‌_‌s‌t‌a‌c‌k‌_‌n‌o‌d‌e;

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



INDEX


Description

     The real type of the third parameter is t‌_‌b‌u‌n‌n‌y‌_‌c‌o‌n‌t‌e‌x‌t‌_‌r‌u‌n‌t‌i‌m‌e‌_‌i‌n‌f‌o. 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‌_‌b‌u‌n‌n‌y‌_‌c‌o‌n‌t‌e‌x‌t‌_‌r‌u‌n‌t‌i‌m‌e‌_‌i‌n‌f‌o. 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);

Description

     Set the sent Bunny::Content as context.
A C version, b‌u‌n‌n‌y‌_‌s‌e‌t‌_‌c‌o‌n‌t‌e‌x‌t is available in the event module.

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



INDEX