ObjectivelyMVC
Object oriented MVC framework for SDL3 and GNU C
Loading...
Searching...
No Matches
Types.h File Reference

ObjectivelyMVC base types. More...

#include <SDL3/SDL_assert.h>
#include <SDL3/SDL_events.h>
#include <SDL3/SDL_pixels.h>
#include <Objectively/Types.h>
#include <ObjectivelyGPU/Types.h>

Go to the source code of this file.

Macros

#define OBJECTIVELYMVC_EXPORT   extern
 

Typedefs

typedef void(* ViewEnumerator) (View *view, ident data)
 A function type for View enumeration.
 

Enumerations

enum  ViewEvent {
  ViewEventNone , ViewEventKeyDown , ViewEventKeyUp , ViewEventMouseButtonDown ,
  ViewEventMouseButtonUp , ViewEventMouseEnter , ViewEventMouseLeave , ViewEventMouseMotion ,
  ViewEventBlur , ViewEventChange , ViewEventClick , ViewEventFocus ,
  ViewEventUserDefined
}
 View event relay codes. More...
 

Variables

OBJECTIVELYMVC_EXPORT Uint32 MVC_NOTIFICATION_EVENT
 The custom SDL_event type for notifications.
 
OBJECTIVELYMVC_EXPORT Uint32 MVC_VIEW_EVENT
 The custom SDL_event type for View event relaying.
 

Detailed Description

ObjectivelyMVC base types.

Definition in file Types.h.

Macro Definition Documentation

◆ OBJECTIVELYMVC_EXPORT

#define OBJECTIVELYMVC_EXPORT   extern

Definition at line 40 of file Types.h.

Typedef Documentation

◆ ViewEnumerator

typedef void(* ViewEnumerator) (View *view, ident data)

A function type for View enumeration.

Parameters
viewThe View.
dataUser data.

Definition at line 56 of file Types.h.

Enumeration Type Documentation

◆ ViewEvent

enum ViewEvent

View event relay codes.

Enumerator
ViewEventNone 

No event.

ViewEventKeyDown 

A View has received a key down event.

ViewEventKeyUp 

A View has received a key up event.

ViewEventMouseButtonDown 

A View has received a mouse button down event.

ViewEventMouseButtonUp 

A View has received a mouse button up event.

ViewEventMouseEnter 

The mouse has entered a View's frame.

ViewEventMouseLeave 

The mouse has left a View's frame.

ViewEventMouseMotion 

The mouse has moved within a View's frame.

ViewEventBlur 

A Control has lost focus.

ViewEventChange 

A Control's input value has changed.

ViewEventClick 

A Control received one or more click events.

ViewEventFocus 

A Control's state has focus.

ViewEventUserDefined 

User-defined ViewEvents.

Definition at line 61 of file Types.h.

61 {
66
71
76
81
86
91
96
101
106
111
116
121
126} ViewEvent;
ViewEvent
View event relay codes.
Definition Types.h:61
@ ViewEventChange
A Control's input value has changed.
Definition Types.h:110
@ ViewEventMouseMotion
The mouse has moved within a View's frame.
Definition Types.h:100
@ ViewEventMouseEnter
The mouse has entered a View's frame.
Definition Types.h:90
@ ViewEventMouseButtonUp
A View has received a mouse button up event.
Definition Types.h:85
@ ViewEventMouseButtonDown
A View has received a mouse button down event.
Definition Types.h:80
@ ViewEventFocus
A Control's state has focus.
Definition Types.h:120
@ ViewEventMouseLeave
The mouse has left a View's frame.
Definition Types.h:95
@ ViewEventBlur
A Control has lost focus.
Definition Types.h:105
@ ViewEventNone
No event.
Definition Types.h:65
@ ViewEventKeyUp
A View has received a key up event.
Definition Types.h:75
@ ViewEventClick
A Control received one or more click events.
Definition Types.h:115
@ ViewEventKeyDown
A View has received a key down event.
Definition Types.h:70
@ ViewEventUserDefined
User-defined ViewEvents.
Definition Types.h:125

Variable Documentation

◆ MVC_NOTIFICATION_EVENT

OBJECTIVELYMVC_EXPORT Uint32 MVC_NOTIFICATION_EVENT

The custom SDL_event type for notifications.

Definition at line 138 of file Types.h.

◆ MVC_VIEW_EVENT

OBJECTIVELYMVC_EXPORT Uint32 MVC_VIEW_EVENT

The custom SDL_event type for View event relaying.

When a View responds to an input event, it may emit an output event. The application may handle these events to e.g. play sound effects.

Definition at line 133 of file Types.h.