# event.h File Reference

`#include <gwenhywfar/misc.h>`
`#include <gwenhywfar/inherit.h>`
`#include <gwenhywfar/ui/widget.h>`

Go to the source code of this file.

## Typedefs

typedef GWEN_EVENT | GWEN_EVENT

## Enumerations

enum | GWEN_EVENT_CLEAR_MODE { GWEN_EventClearMode_All = 0, GWEN_EventClearMode_ToEOL, GWEN_EventClearMode_ToBottom }
enum | GWEN_EVENT_FOCUS_TYPE { GWEN_EventFocusType_Got = 0, GWEN_EventFocusType_Lost }
enum | GWEN_EVENT_SETTEXT_MODE { GWEN_EventSetTextMode_Replace = 0, GWEN_EventSetTextMode_Append, GWEN_EventSetTextMode_Insert }

enum

GWEN_EVENT_TYPE {
GWEN_EventType_None = 0, GWEN_EventType_Key, GWEN_EventType_SetText, GWEN_EventType_Move,
GWEN_EventType_Draw, GWEN_EventType_SetColour, GWEN_EventType_Focus, GWEN_EventType_Created,
GWEN_EventType_Destroy, GWEN_EventType_Update, GWEN_EventType_Refresh, GWEN_EventType_Scroll,
GWEN_EventType_WriteAt, GWEN_EventType_ChgAtts, GWEN_EventType_Clear, GWEN_EventType_Highlight,
GWEN_EventType_ContentChg, GWEN_EventType_Command, GWEN_EventType_Close, GWEN_EventType_Closed,
GWEN_EventType_LastClosed, GWEN_EventType_Selected, GWEN_EventType_Chosen, GWEN_EventType_Checked,
GWEN_EventType_Changed, GWEN_EventType_Activated
}

## Functions

int | GWEN_Event_DueToSubscription (const GWEN_EVENT *e)
void | GWEN_Event_Dump (const GWEN_EVENT *e)
void | GWEN_Event_free (GWEN_EVENT *e)
const char * | GWEN_Event_GetEventTypeName (const GWEN_EVENT *e)
GWEN_WIDGET * | GWEN_Event_GetRecipient (const GWEN_EVENT *e)
GWEN_WIDGET * | GWEN_Event_GetSender (const GWEN_EVENT *e)
GWEN_EVENT_TYPE | GWEN_Event_GetType (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_Event_new (GWEN_EVENT_TYPE t)
const char * | GWEN_EventActivated_GetText (const GWEN_EVENT *e)
int | GWEN_EventActivated_GetX (const GWEN_EVENT *e)
int | GWEN_EventActivated_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventActivated_new (const char *text, int x, int y)
GWEN_EVENT * | GWEN_EventChanged_new ()
int | GWEN_EventChecked_GetStatus (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventChecked_new (int status)
GWEN_TYPE_UINT32 | GWEN_EventChgAtts_GetAtts (const GWEN_EVENT *e)
int | GWEN_EventChgAtts_GetSet (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventChgAtts_new (GWEN_TYPE_UINT32 atts, int set)
const char * | GWEN_EventChosen_GetText (const GWEN_EVENT *e)
int | GWEN_EventChosen_GetX (const GWEN_EVENT *e)
int | GWEN_EventChosen_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventChosen_new (const char *text, int x, int y)
GWEN_EVENT_CLEAR_MODE | GWEN_EventClear_GetMode (const GWEN_EVENT *e)
int | GWEN_EventClear_GetX (const GWEN_EVENT *e)
int | GWEN_EventClear_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventClear_new (int x, int y, GWEN_EVENT_CLEAR_MODE m)
GWEN_EVENT * | GWEN_EventClose_new ()
GWEN_EVENT * | GWEN_EventClosed_new ()
GWEN_TYPE_UINT32 | GWEN_EventCommand_GetCommandId (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventCommand_new (GWEN_TYPE_UINT32 commandId)
int | GWEN_EventContentChg_GetContentHeight (const GWEN_EVENT *e)
int | GWEN_EventContentChg_GetContentWidth (const GWEN_EVENT *e)
int | GWEN_EventContentChg_GetHeight (const GWEN_EVENT *e)
int | GWEN_EventContentChg_GetWidth (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventContentChg_new (int contentWidth, int contentHeight, int width, int height)
GWEN_EVENT * | GWEN_EventCreated_new ()
GWEN_EVENT * | GWEN_EventDestroy_new ()
GWEN_EVENT * | GWEN_EventDraw_new ()
GWEN_EVENT_FOCUS_TYPE | GWEN_EventFocus_GetFocusEventType (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventFocus_new (GWEN_EVENT_FOCUS_TYPE ft)
GWEN_WIDGET_COLOUR | GWEN_EventHighlight_GetHi (const GWEN_EVENT *e)
int | GWEN_EventHighlight_GetLen (const GWEN_EVENT *e)
const char * | GWEN_EventHighlight_GetText (const GWEN_EVENT *e)
int | GWEN_EventHighlight_GetX (const GWEN_EVENT *e)
int | GWEN_EventHighlight_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventHighlight_new (int x, int y, int len, GWEN_WIDGET_COLOUR hi)
int | GWEN_EventKey_GetKey (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventKey_new (int key)
GWEN_EVENT * | GWEN_EventLastClosed_new ()
int | GWEN_EventMove_GetOldX (const GWEN_EVENT *e)
int | GWEN_EventMove_GetOldY (const GWEN_EVENT *e)
int | GWEN_EventMove_GetX (const GWEN_EVENT *e)
int | GWEN_EventMove_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventMove_new (int x, int y, int oldx, int oldy)
GWEN_EVENT * | GWEN_EventRefresh_new ()
int | GWEN_EventScroll_GetTodo (GWEN_EVENT *e)
int | GWEN_EventScroll_GetXBy (GWEN_EVENT *e)
int | GWEN_EventScroll_GetYBy (GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventScroll_new (int xBy, int yBy, int todo)
const char * | GWEN_EventSelected_GetText (const GWEN_EVENT *e)
int | GWEN_EventSelected_GetX (const GWEN_EVENT *e)
int | GWEN_EventSelected_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventSelected_new (const char *text, int x, int y, int state)
GWEN_WIDGET_COLOUR | GWEN_EventSetColour_GetColour (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventSetColour_new (GWEN_WIDGET_COLOUR c)
GWEN_EVENT_SETTEXT_MODE | GWEN_EventSetText_GetMode (const GWEN_EVENT *e)
const char * | GWEN_EventSetText_GetText (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventSetText_new (const char *text, GWEN_EVENT_SETTEXT_MODE m)
GWEN_EVENT * | GWEN_EventUpdate_new ()
int | GWEN_EventWriteAt_GetLen (const GWEN_EVENT *e)
const char * | GWEN_EventWriteAt_GetText (const GWEN_EVENT *e)
int | GWEN_EventWriteAt_GetX (const GWEN_EVENT *e)
int | GWEN_EventWriteAt_GetY (const GWEN_EVENT *e)
GWEN_EVENT * | GWEN_EventWriteAt_new (int x, int y, const char *text, int len)

## Typedef Documentation

typedef struct GWEN_EVENT GWEN_EVENT

## Enumeration Type Documentation

enum GWEN_EVENT_CLEAR_MODE

Enumerator:

  GWEN_EventClearMode_All |
  GWEN_EventClearMode_ToEOL |
  GWEN_EventClearMode_ToBottom |

enum GWEN_EVENT_FOCUS_TYPE

Enumerator:

  GWEN_EventFocusType_Got |
  GWEN_EventFocusType_Lost |

enum GWEN_EVENT_SETTEXT_MODE

Enumerator:

  GWEN_EventSetTextMode_Replace |
  GWEN_EventSetTextMode_Append |
  GWEN_EventSetTextMode_Insert |

enum GWEN_EVENT_TYPE

Enumerator:

  GWEN_EventType_None |
  GWEN_EventType_Key |
  GWEN_EventType_SetText |
  GWEN_EventType_Move |
  GWEN_EventType_Draw |
  GWEN_EventType_SetColour |
  GWEN_EventType_Focus |
  GWEN_EventType_Created |
  GWEN_EventType_Destroy |
  GWEN_EventType_Update |
  GWEN_EventType_Refresh |
  GWEN_EventType_Scroll |
  GWEN_EventType_WriteAt |
  GWEN_EventType_ChgAtts |
  GWEN_EventType_Clear |
  GWEN_EventType_Highlight |
  GWEN_EventType_ContentChg |
  GWEN_EventType_Command |
  GWEN_EventType_Close |
  GWEN_EventType_Closed |
  GWEN_EventType_LastClosed |
  GWEN_EventType_Selected |
  GWEN_EventType_Chosen |
  GWEN_EventType_Checked |
  GWEN_EventType_Changed |
  GWEN_EventType_Activated |

## Function Documentation

int GWEN_Event_DueToSubscription | ( | const GWEN_EVENT * | e | ) |

void GWEN_Event_Dump | ( | const GWEN_EVENT * | e | ) |

void GWEN_Event_free | ( | GWEN_EVENT * | e | ) |

const char* GWEN_Event_GetEventTypeName | ( | const GWEN_EVENT * | e | ) |

GWEN_WIDGET* GWEN_Event_GetRecipient | ( | const GWEN_EVENT * | e | ) |

GWEN_WIDGET * GWEN_Event_GetSender | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT_TYPE GWEN_Event_GetType | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_Event_new | ( | GWEN_EVENT_TYPE | t | ) |

const char* GWEN_EventActivated_GetText | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventActivated_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventActivated_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventActivated_new | ( | const char * | text,
|  | int | x,
|  | int | y
| ) |

GWEN_EVENT* GWEN_EventChanged_new | ( |  | ) |

int GWEN_EventChecked_GetStatus | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventChecked_new | ( | int | status | ) |

GWEN_TYPE_UINT32 GWEN_EventChgAtts_GetAtts | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventChgAtts_GetSet | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventChgAtts_new | ( | GWEN_TYPE_UINT32 | atts,
|  | int | set
| ) |

const char* GWEN_EventChosen_GetText | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventChosen_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventChosen_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventChosen_new | ( | const char * | text,
|  | int | x,
|  | int | y
| ) |

GWEN_EVENT_CLEAR_MODE GWEN_EventClear_GetMode | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventClear_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventClear_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventClear_new | ( | int | x,
|  | int | y,
|  | GWEN_EVENT_CLEAR_MODE | m
| ) |

GWEN_EVENT* GWEN_EventClose_new | ( |  | ) |

GWEN_EVENT* GWEN_EventClosed_new | ( |  | ) |

GWEN_TYPE_UINT32 GWEN_EventCommand_GetCommandId | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventCommand_new | ( | GWEN_TYPE_UINT32 | commandId | ) |

int GWEN_EventContentChg_GetContentHeight | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventContentChg_GetContentWidth | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventContentChg_GetHeight | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventContentChg_GetWidth | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventContentChg_new | ( | int | contentWidth,
|  | int | contentHeight,
|  | int | width,
|  | int | height
| ) |

GWEN_EVENT* GWEN_EventCreated_new | ( |  | ) |

GWEN_EVENT* GWEN_EventDestroy_new | ( |  | ) |

GWEN_EVENT* GWEN_EventDraw_new | ( |  | ) |

GWEN_EVENT_FOCUS_TYPE GWEN_EventFocus_GetFocusEventType | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventFocus_new | ( | GWEN_EVENT_FOCUS_TYPE | ft | ) |

GWEN_WIDGET_COLOUR GWEN_EventHighlight_GetHi | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventHighlight_GetLen | ( | const GWEN_EVENT * | e | ) |

const char* GWEN_EventHighlight_GetText | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventHighlight_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventHighlight_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventHighlight_new | ( | int | x,
|  | int | y,
|  | int | len,
|  | GWEN_WIDGET_COLOUR | hi
| ) |

int GWEN_EventKey_GetKey | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventKey_new | ( | int | key | ) |

GWEN_EVENT * GWEN_EventLastClosed_new | ( |  | ) |

int GWEN_EventMove_GetOldX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventMove_GetOldY | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventMove_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventMove_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventMove_new | ( | int | x,
|  | int | y,
|  | int | oldx,
|  | int | oldy
| ) |

GWEN_EVENT* GWEN_EventRefresh_new | ( |  | ) |

int GWEN_EventScroll_GetTodo | ( | GWEN_EVENT * | e | ) |

int GWEN_EventScroll_GetXBy | ( | GWEN_EVENT * | e | ) |

int GWEN_EventScroll_GetYBy | ( | GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventScroll_new | ( | int | xBy,
|  | int | yBy,
|  | int | todo
| ) |

const char* GWEN_EventSelected_GetText | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventSelected_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventSelected_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventSelected_new | ( | const char * | text,
|  | int | x,
|  | int | y,
|  | int | state
| ) |

GWEN_WIDGET_COLOUR GWEN_EventSetColour_GetColour | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventSetColour_new | ( | GWEN_WIDGET_COLOUR | c | ) |

GWEN_EVENT_SETTEXT_MODE GWEN_EventSetText_GetMode | ( | const GWEN_EVENT * | e | ) |

const char* GWEN_EventSetText_GetText | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventSetText_new | ( | const char * | text,
|  | GWEN_EVENT_SETTEXT_MODE | m
| ) |

GWEN_EVENT* GWEN_EventUpdate_new | ( |  | ) |

int GWEN_EventWriteAt_GetLen | ( | const GWEN_EVENT * | e | ) |

const char* GWEN_EventWriteAt_GetText | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventWriteAt_GetX | ( | const GWEN_EVENT * | e | ) |

int GWEN_EventWriteAt_GetY | ( | const GWEN_EVENT * | e | ) |

GWEN_EVENT* GWEN_EventWriteAt_new | ( | int | x,
|  | int | y,
|  | const char * | text,
|  | int | len
| ) |