libgpac
Documentation of the core library of GPAC
Event System

Event system used by GPAC playback. More...

+ Collaboration diagram for Event System:

Data Structures

struct  GF_EventMouse
 
struct  GF_EventMultiTouch
 
struct  GF_EventKey
 
struct  GF_EventChar
 
struct  GF_EventSize
 
struct  GF_EventVideoSetup
 
struct  GF_EventShow
 
struct  GF_EventCursor
 
struct  GF_EventCaption
 
struct  GF_EventMove
 
struct  GF_EventDuration
 
struct  GF_EventNavigate
 
struct  GF_EventMessage
 
struct  GF_EventProgress
 
union  GF_EventProgress.__unnamed__
 
struct  GF_EventConnect
 
struct  GF_EventAddonConnect
 
struct  GF_EventAuthorize
 
struct  GF_EventSysColors
 
struct  GF_EventMutation
 
struct  GF_EventOpenFile
 
struct  GF_EventSensor
 
struct  GF_EventSensorRequest
 
struct  GF_EventClipboard
 
union  GF_Event
 

Enumerations

enum  { GF_MOUSE_LEFT = 0, GF_MOUSE_MIDDLE, GF_MOUSE_RIGHT }
 
enum  GF_EventType {
  GF_EVENT_CLICK, GF_EVENT_MOUSEUP, GF_EVENT_MOUSEDOWN, GF_EVENT_MOUSEOVER,
  GF_EVENT_MOUSEOUT, GF_EVENT_MOUSEMOVE, GF_EVENT_MOUSEWHEEL, GF_EVENT_KEYUP,
  GF_EVENT_KEYDOWN, GF_EVENT_LONGKEYPRESS, GF_EVENT_TEXTINPUT, GF_EVENT_MULTITOUCH,
  GF_EVENT_TEXTSELECT, GF_EVENT_FOCUSIN, GF_EVENT_FOCUSOUT, GF_EVENT_ACTIVATE,
  GF_EVENT_CHANGE, GF_EVENT_FOCUS, GF_EVENT_BLUR, GF_EVENT_LOAD,
  GF_EVENT_UNLOAD, GF_EVENT_ABORT, GF_EVENT_ERROR, GF_EVENT_RESIZE,
  GF_EVENT_SCROLL, GF_EVENT_ZOOM, GF_EVENT_BEGIN, GF_EVENT_BEGIN_EVENT,
  GF_EVENT_END, GF_EVENT_END_EVENT, GF_EVENT_REPEAT, GF_EVENT_REPEAT_EVENT,
  GF_EVENT_TREE_MODIFIED, GF_EVENT_NODE_INSERTED, GF_EVENT_NODE_REMOVED, GF_EVENT_NODE_INSERTED_DOC,
  GF_EVENT_NODE_REMOVED_DOC, GF_EVENT_ATTR_MODIFIED, GF_EVENT_CHAR_DATA_MODIFIED, GF_EVENT_NODE_NAME_CHANGED,
  GF_EVENT_ATTR_NAME_CHANGED, GF_EVENT_DCCI_PROP_CHANGE, GF_EVENT_ACTIVATED, GF_EVENT_DEACTIVATED,
  GF_EVENT_PAUSE, GF_EVENT_PAUSED_EVENT, GF_EVENT_PLAY, GF_EVENT_REPEAT_KEY,
  GF_EVENT_RESUME_EVENT, GF_EVENT_SHORT_ACCESSKEY, GF_EVENT_EXECUTION_TIME, GF_EVENT_MEDIA_SETUP_BEGIN,
  GF_EVENT_MEDIA_SETUP_DONE, GF_EVENT_MEDIA_LOAD_START, GF_EVENT_MEDIA_LOAD_DONE, GF_EVENT_MEDIA_PROGRESS,
  GF_EVENT_MEDIA_SUSPEND, GF_EVENT_MEDIA_EMPTIED, GF_EVENT_MEDIA_STALLED, GF_EVENT_MEDIA_LOADED_METADATA,
  GF_EVENT_MEDIA_LODADED_DATA, GF_EVENT_MEDIA_CANPLAY, GF_EVENT_MEDIA_CANPLAYTHROUGH, GF_EVENT_MEDIA_PLAYING,
  GF_EVENT_MEDIA_WAITING, GF_EVENT_MEDIA_SEEKING, GF_EVENT_MEDIA_SEEKED, GF_EVENT_MEDIA_ENDED,
  GF_EVENT_MEDIA_DURATION_CHANGED, GF_EVENT_MEDIA_TIME_UPDATE, GF_EVENT_MEDIA_RATECHANGE, GF_EVENT_MEDIA_VOLUME_CHANGED,
  GF_EVENT_HTML_MSE_SOURCE_OPEN, GF_EVENT_HTML_MSE_SOURCE_ENDED, GF_EVENT_HTML_MSE_SOURCE_CLOSE, GF_EVENT_HTML_MSE_UPDATE_START,
  GF_EVENT_HTML_MSE_UPDATE, GF_EVENT_HTML_MSE_UPDATE_END, GF_EVENT_HTML_MSE_UPDATE_ERROR, GF_EVENT_HTML_MSE_UPDATE_ABORT,
  GF_EVENT_HTML_MSE_ADD_SOURCE_BUFFER, GF_EVENT_HTML_MSE_REMOVE_SOURCE_BUFFER, GF_EVENT_BATTERY, GF_EVENT_CPU,
  GF_EVENT_UNKNOWN, GF_EVENT_DBLCLICK, GF_EVENT_SCENE_ATTACHED, GF_EVENT_VP_RESIZE,
  GF_EVENT_SIZE, GF_EVENT_SCENE_SIZE, GF_EVENT_SHOWHIDE, GF_EVENT_SET_CURSOR,
  GF_EVENT_SET_CAPTION, GF_EVENT_MOVE, GF_EVENT_REFRESH, GF_EVENT_QUIT,
  GF_EVENT_VIDEO_SETUP, GF_EVENT_SET_GL, GF_EVENT_SYS_COLORS, GF_EVENT_PASTE_TEXT,
  GF_EVENT_COPY_TEXT, GF_EVENT_CONNECT, GF_EVENT_DURATION, GF_EVENT_EOS,
  GF_EVENT_AUTHORIZATION, GF_EVENT_NAVIGATE, GF_EVENT_NAVIGATE_INFO, GF_EVENT_MESSAGE,
  GF_EVENT_PROGRESS, GF_EVENT_VIEWPOINTS, GF_EVENT_STREAMLIST, GF_EVENT_METADATA,
  GF_EVENT_MIGRATE, GF_EVENT_DISCONNECT, GF_EVENT_RESOLUTION, GF_EVENT_DROPFILE,
  GF_EVENT_TEXT_EDITING_START, GF_EVENT_TEXT_EDITING_END, GF_EVENT_QUALITY_SWITCHED, GF_EVENT_TIMESHIFT_DEPTH,
  GF_EVENT_TIMESHIFT_UPDATE, GF_EVENT_TIMESHIFT_OVERFLOW, GF_EVENT_TIMESHIFT_UNDERRUN, GF_EVENT_MAIN_ADDON_STATE,
  GF_EVENT_ADDON_DETECTED, GF_EVENT_SENSOR_ORIENTATION, GF_EVENT_SENSOR_REQUEST
}
 
enum  GF_KeyCode {
  GF_KEY_UNIDENTIFIED = 0, GF_KEY_ACCEPT = 1, GF_KEY_AGAIN, GF_KEY_ALLCANDIDATES,
  GF_KEY_ALPHANUM, GF_KEY_ALT, GF_KEY_ALTGRAPH, GF_KEY_APPS,
  GF_KEY_ATTN, GF_KEY_BROWSERBACK, GF_KEY_BROWSERFAVORITES, GF_KEY_BROWSERFORWARD,
  GF_KEY_BROWSERHOME, GF_KEY_BROWSERREFRESH, GF_KEY_BROWSERSEARCH, GF_KEY_BROWSERSTOP,
  GF_KEY_CAPSLOCK, GF_KEY_CLEAR, GF_KEY_CODEINPUT, GF_KEY_COMPOSE,
  GF_KEY_CONTROL, GF_KEY_CRSEL, GF_KEY_CONVERT, GF_KEY_COPY,
  GF_KEY_CUT, GF_KEY_DOWN, GF_KEY_END, GF_KEY_ENTER,
  GF_KEY_ERASEEOF, GF_KEY_EXECUTE, GF_KEY_EXSEL, GF_KEY_F1,
  GF_KEY_F2, GF_KEY_F3, GF_KEY_F4, GF_KEY_F5,
  GF_KEY_F6, GF_KEY_F7, GF_KEY_F8, GF_KEY_F9,
  GF_KEY_F10, GF_KEY_F11, GF_KEY_F12, GF_KEY_F13,
  GF_KEY_F14, GF_KEY_F15, GF_KEY_F16, GF_KEY_F17,
  GF_KEY_F18, GF_KEY_F19, GF_KEY_F20, GF_KEY_F21,
  GF_KEY_F22, GF_KEY_F23, GF_KEY_F24, GF_KEY_FINALMODE,
  GF_KEY_FIND, GF_KEY_FULLWIDTH, GF_KEY_HALFWIDTH, GF_KEY_HANGULMODE,
  GF_KEY_HANJAMODE, GF_KEY_HELP, GF_KEY_HIRAGANA, GF_KEY_HOME,
  GF_KEY_INSERT, GF_KEY_JAPANESEHIRAGANA, GF_KEY_JAPANESEKATAKANA, GF_KEY_JAPANESEROMAJI,
  GF_KEY_JUNJAMODE, GF_KEY_KANAMODE, GF_KEY_KANJIMODE, GF_KEY_KATAKANA,
  GF_KEY_LAUNCHAPPLICATION1, GF_KEY_LAUNCHAPPLICATION2, GF_KEY_LAUNCHMAIL, GF_KEY_LEFT,
  GF_KEY_META, GF_KEY_MEDIANEXTTRACK, GF_KEY_MEDIAPLAYPAUSE, GF_KEY_MEDIAPREVIOUSTRACK,
  GF_KEY_MEDIASTOP, GF_KEY_MODECHANGE, GF_KEY_NONCONVERT, GF_KEY_NUMLOCK,
  GF_KEY_PAGEDOWN, GF_KEY_PAGEUP, GF_KEY_PASTE, GF_KEY_PAUSE,
  GF_KEY_PLAY, GF_KEY_PREVIOUSCANDIDATE, GF_KEY_PRINTSCREEN, GF_KEY_PROCESS,
  GF_KEY_PROPS, GF_KEY_RIGHT, GF_KEY_ROMANCHARACTERS, GF_KEY_SCROLL,
  GF_KEY_SELECT, GF_KEY_SELECTMEDIA, GF_KEY_SHIFT, GF_KEY_STOP,
  GF_KEY_UP, GF_KEY_UNDO, GF_KEY_VOLUMEDOWN, GF_KEY_VOLUMEMUTE,
  GF_KEY_VOLUMEUP, GF_KEY_WIN, GF_KEY_ZOOM, GF_KEY_BACKSPACE,
  GF_KEY_TAB, GF_KEY_CANCEL, GF_KEY_ESCAPE, GF_KEY_SPACE,
  GF_KEY_EXCLAMATION, GF_KEY_QUOTATION, GF_KEY_NUMBER, GF_KEY_DOLLAR,
  GF_KEY_AMPERSAND, GF_KEY_APOSTROPHE, GF_KEY_LEFTPARENTHESIS, GF_KEY_RIGHTPARENTHESIS,
  GF_KEY_STAR, GF_KEY_PLUS, GF_KEY_COMMA, GF_KEY_HYPHEN,
  GF_KEY_FULLSTOP, GF_KEY_SLASH, GF_KEY_0, GF_KEY_1,
  GF_KEY_2, GF_KEY_3, GF_KEY_4, GF_KEY_5,
  GF_KEY_6, GF_KEY_7, GF_KEY_8, GF_KEY_9,
  GF_KEY_COLON, GF_KEY_SEMICOLON, GF_KEY_LESSTHAN, GF_KEY_EQUALS,
  GF_KEY_GREATERTHAN, GF_KEY_QUESTION, GF_KEY_AT, GF_KEY_A,
  GF_KEY_B, GF_KEY_C, GF_KEY_D, GF_KEY_E,
  GF_KEY_F, GF_KEY_G, GF_KEY_H, GF_KEY_I,
  GF_KEY_J, GF_KEY_K, GF_KEY_L, GF_KEY_M,
  GF_KEY_N, GF_KEY_O, GF_KEY_P, GF_KEY_Q,
  GF_KEY_R, GF_KEY_S, GF_KEY_T, GF_KEY_U,
  GF_KEY_V, GF_KEY_W, GF_KEY_X, GF_KEY_Y,
  GF_KEY_Z, GF_KEY_LEFTSQUAREBRACKET, GF_KEY_BACKSLASH, GF_KEY_RIGHTSQUAREBRACKET,
  GF_KEY_CIRCUM, GF_KEY_UNDERSCORE, GF_KEY_GRAVEACCENT, GF_KEY_LEFTCURLYBRACKET,
  GF_KEY_PIPE, GF_KEY_RIGHTCURLYBRACKET, GF_KEY_DEL, GF_KEY_INVERTEXCLAMATION,
  GF_KEY_DEADGRAVE, GF_KEY_DEADEACUTE, GF_KEY_DEADCIRCUM, GF_KEY_DEADTILDE,
  GF_KEY_DEADMACRON, GF_KEY_DEADBREVE, GF_KEY_DEADABOVEDOT, GF_KEY_DEADDIARESIS,
  GF_KEY_DEADRINGABOVE, GF_KEY_DEADDOUBLEACUTE, GF_KEY_DEADCARON, GF_KEY_DEADCEDILLA,
  GF_KEY_DEADOGONEK, GF_KEY_DEADIOTA, GF_KEY_EURO, GF_KEY_DEADVOICESOUND,
  GF_KEY_DEADSEMIVOICESOUND, GF_KEY_CHANNELUP, GF_KEY_CHANNELDOWN, GF_KEY_TEXT,
  GF_KEY_INFO, GF_KEY_EPG, GF_KEY_RECORD, GF_KEY_BEGINPAGE,
  GF_KEY_CELL_SOFT1, GF_KEY_CELL_SOFT2, GF_KEY_JOYSTICK
}
 
enum  GF_KeyModifier {
  GF_KEY_MOD_SHIFT = (1), GF_KEY_MOD_CTRL = (1<<2), GF_KEY_MOD_ALT = (1<<3), GF_KEY_EXT_NUMPAD = (1<<4),
  GF_KEY_EXT_LEFT = (1<<5), GF_KEY_EXT_RIGHT = (1<<6)
}
 
enum  {
  GF_CURSOR_NORMAL = 0x00, GF_CURSOR_ANCHOR, GF_CURSOR_TOUCH, GF_CURSOR_ROTATE,
  GF_CURSOR_PROXIMITY, GF_CURSOR_PLANE, GF_CURSOR_COLLIDE, GF_CURSOR_HIDE
}
 

Detailed Description

This section documents the event structures used by the terminal, the compositor, input modules and output rendering modules for communication.


Data Structure Documentation

◆ GF_EventMouse

struct GF_EventMouse

Mouse event structure event proc return value: ignored

Data Fields
u8 type
s32 x
s32 y
Fixed wheel_pos
u32 button
u32 key_states

◆ GF_EventMultiTouch

struct GF_EventMultiTouch

Mouse event structure event proc return value: ignored

Data Fields
u8 type
Fixed x
Fixed y
Fixed rotation
Fixed pinch
u32 num_fingers

◆ GF_EventKey

struct GF_EventKey

Keyboard key event event proc return value: ignored

Data Fields
u8 type
u32 key_code
u32 hw_code
u32 flags

◆ GF_EventChar

struct GF_EventChar

Keyboard character event event proc return value: ignored

Data Fields
u8 type
u32 unicode_char

◆ GF_EventSize

struct GF_EventSize

Window resize event event proc return value: ignored

Data Fields
u8 type
u32 width
u32 height

◆ GF_EventVideoSetup

struct GF_EventVideoSetup

Video setup (2D or 3D) event event proc return value: ignored

Data Fields
u8 type
u32 width
u32 height
Bool back_buffer
Bool system_memory
Bool use_opengl
Bool disable_vsync
Bool hw_reset

◆ GF_EventShow

struct GF_EventShow

Windows show event event proc return value: ignored this event may be triggered by the compositor if owning window or if shortcut fullscreen is detected

Data Fields
u8 type
u32 show_type

◆ GF_EventCursor

struct GF_EventCursor

Mouse cursor event event proc return value: ignored

Data Fields
u8 type
u32 cursor_type

◆ GF_EventCaption

struct GF_EventCaption

Window caption event event proc return value: ignored

Data Fields
u8 type
const char * caption

◆ GF_EventMove

struct GF_EventMove

Window move event event proc: never posted

Data Fields
u8 type
s32 x
s32 y
u32 relative
u8 align_x
u8 align_y

◆ GF_EventDuration

struct GF_EventDuration

Media duration event duration may be signaled several times: it may change when setting up streams event proc return value: ignored

Data Fields
u8 type
Double duration
Bool can_seek

◆ GF_EventNavigate

struct GF_EventNavigate

Hyperlink navigation event event proc return value: 0 if URL not supported, 1 if accepted (it is the user responsability to load the url) YOU SHALL NOT DIRECTLY OPEN THE NEW URL IN THE EVENT PROC, THIS WOULD DEADLOCK THE TERMINAL

Data Fields
u8 type
const char * to_url
u32 param_count
const char ** parameters

◆ GF_EventMessage

struct GF_EventMessage

Service message event event proc return value: ignored

Data Fields
u8 type
const char * service
const char * message
GF_Err error

◆ GF_EventProgress

struct GF_EventProgress

Progress event event proc return value: ignored

Data Fields
u8 type
const char * service
u32 progress_type
u32 done
u32 total
union GF_EventProgress __unnamed__

◆ GF_EventProgress.__unnamed__

union GF_EventProgress.__unnamed__
Data Fields
u32 bytes_per_seconds
u32 filter_idx

◆ GF_EventConnect

struct GF_EventConnect

Service connection event event proc return value: ignored

Data Fields
u8 type
Bool is_connected

◆ GF_EventAddonConnect

struct GF_EventAddonConnect

Addon connection notification event event proc return value: 1 to indicate the terminal should attempt a default layout for this addon, 0: nothing will be done

Data Fields
u8 type
const char * addon_url
const char * mime_type

◆ GF_EventAuthorize

struct GF_EventAuthorize

Authentication event event proc return value: 1 if info has been completed, 0 otherwise (and operation this request was for will then fail)

Data Fields
u8 type
const char * site_url
char * user
char * password

◆ GF_EventSysColors

struct GF_EventSysColors

System desktop colors and window decoration event event proc return value: 1 if info has been completed, 0 otherwise

Data Fields
u8 type
u32 sys_colors[28]

◆ GF_EventMutation

struct GF_EventMutation

DOM mutation event

Data Fields
u8 type
void * relatedNode
void * prevValue
void * newValue
void * attrName
u8 attrChange

◆ GF_EventOpenFile

struct GF_EventOpenFile

Open file notification event

Data Fields
u8 type
u32 nb_files
char ** files

◆ GF_EventSensor

struct GF_EventSensor

Orientation sensor change event event proc return value: ignored

Data Fields
u8 type
Float x
Float y
Float z
Float w

◆ GF_EventSensorRequest

struct GF_EventSensorRequest

Orientation sensor activation event event proc return value: ignored

Data Fields
u8 type
u32 sensor_type
Bool activate

◆ GF_EventClipboard

struct GF_EventClipboard

Clipboard event proc return value: true if text has been set for COPY, ignored otherwise

Data Fields
u8 type
char * text

◆ GF_Event

union GF_Event

Event object

+ Collaboration diagram for GF_Event:
Data Fields
u8 type
GF_EventMouse mouse
GF_EventMultiTouch mtouch
GF_EventKey key
GF_EventChar character
GF_EventSensor sensor
GF_EventSize size
GF_EventShow show
GF_EventDuration duration
GF_EventNavigate navigate
GF_EventMessage message
GF_EventProgress progress
GF_EventConnect connect
GF_EventCaption caption
GF_EventCursor cursor
GF_EventAuthorize auth
GF_EventSysColors sys_cols
GF_EventMove move
GF_EventVideoSetup setup
GF_EventMutation mutation
GF_EventOpenFile open_file
GF_EventAddonConnect addon_connect
GF_EventSensorRequest activate_sensor
GF_EventClipboard clipboard

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

mouse button modifiers

◆ GF_EventType

Event types

Enumerator
GF_EVENT_MOUSEMOVE 

! ALL MOUSE EVENTS SHALL BE DECLARED BEFORE MOUSEMOVE !!

◆ GF_KeyCode

enum GF_KeyCode

GPAC/DOM3 key codes

◆ GF_KeyModifier

key modifiers state - set by terminal (not set by video driver)

◆ anonymous enum

anonymous enum

Sensor apperance signaling