ObjectivelyMVC 0.1.0
Object oriented MVC framework for OpenGL, SDL2 and GNU C
|
JSON data binding for Views. More...
#include <ObjectivelyMVC/Types.h>
Go to the source code of this file.
Data Structures | |
struct | Inlet |
Inlets enable inbound data binding of View attributes through JSON. More... | |
struct | Outlet |
Outlets enable outbound data binding of Views through JSON. More... | |
Macros | |
#define | BindInlet(inlet, obj) (inletBindings[(inlet)->type])(inlet, (ident) obj) |
Binds the Inlet to obj by invoking the appropriate InletBinding function. More... | |
#define | MakeInlet(name, type, dest, data) (Inlet) { (name), (type), (dest), (ident) (data) } |
Creates an Inlet with the specified parameters. More... | |
#define | MakeInlets(...) |
Creates a null-termianted array of Inlets. More... | |
#define | MakeOutlet(identifier, view) (Outlet) { (identifier), (View **) (view) } |
Creates an Outlet with the specified parameters. More... | |
#define | MakeOutlets(...) |
Creates a NULL -termianted array of Outlets. More... | |
Typedefs | |
typedef void(* | InletBinding) (const Inlet *inlet, ident obj) |
A function pointer for Inlet binding. More... | |
Enumerations | |
enum | InletType { InitTypeEnd = -1 , InletTypeBool , InletTypeCharacters , InletTypeClassNames , InletTypeColor , InletTypeDouble , InletTypeEnum , InletTypeFloat , InletTypeFont , InletTypeImage , InletTypeInteger , InletTypePoint , InletTypeRectangle , InletTypeSize , InletTypeStyle , InletTypeSubviews , InletTypeView , InletTypeApplicationDefined } |
Inlet type constants. More... | |
Functions | |
OBJECTIVELYMVC_EXPORT _Bool | bindInlets (const Inlet *inlets, const Dictionary *dictionary) |
Binds each Inlet specified in inlets to the data provided in dictionary . More... | |
Variables | |
OBJECTIVELYMVC_EXPORT const InletBinding | inletBindings [] |
The Array of InletBindings, indexed by InletType. More... | |
JSON data binding for Views.
Definition in file View+JSON.h.
#define BindInlet | ( | inlet, | |
obj | |||
) | (inletBindings[(inlet)->type])(inlet, (ident) obj) |
Binds the Inlet to obj
by invoking the appropriate InletBinding function.
Definition at line 244 of file View+JSON.h.
#define MakeInlet | ( | name, | |
type, | |||
dest, | |||
data | |||
) | (Inlet) { (name), (type), (dest), (ident) (data) } |
Creates an Inlet with the specified parameters.
Definition at line 216 of file View+JSON.h.
#define MakeInlets | ( | ... | ) |
Creates a null-termianted array of Inlets.
Definition at line 221 of file View+JSON.h.
Creates an Outlet with the specified parameters.
Definition at line 230 of file View+JSON.h.
#define MakeOutlets | ( | ... | ) |
Creates a NULL
-termianted array of Outlets.
Definition at line 235 of file View+JSON.h.
typedef void(* InletBinding) (const Inlet *inlet, ident obj) |
A function pointer for Inlet binding.
inlet | The Inlet. |
obj | The Object resolved from the JSON Dictionary. |
Definition at line 186 of file View+JSON.h.
enum InletType |
Inlet type constants.
Enumerator | |
---|---|
InitTypeEnd |
|
InletTypeBool |
|
InletTypeCharacters |
|
InletTypeClassNames | |
InletTypeColor |
|
InletTypeDouble |
|
InletTypeEnum |
|
InletTypeFloat |
|
InletTypeFont | |
InletTypeImage | |
InletTypeInteger |
|
InletTypePoint |
|
InletTypeRectangle |
|
InletTypeSize | |
InletTypeStyle | |
InletTypeSubviews | |
InletTypeView |
|
InletTypeApplicationDefined |
Definition at line 36 of file View+JSON.h.
OBJECTIVELYMVC_EXPORT _Bool bindInlets | ( | const Inlet * | inlets, |
const Dictionary * | dictionary | ||
) |
Binds each Inlet specified in inlets
to the data provided in dictionary
.
inlets | The Inlets to bind. |
dictionary | The Dictionary from which to bind. |
Definition at line 326 of file View+JSON.c.
OBJECTIVELYMVC_EXPORT const InletBinding inletBindings[] |
The Array of InletBindings, indexed by InletType.
Definition at line 191 of file View+JSON.h.