📄 events.h
字号:
/* * GPAC - Multimedia Framework C SDK * * Copyright (c) Jean Le Feuvre 2000-2005 * All rights reserved * * This file is part of GPAC / Events management * * GPAC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * GPAC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * */#ifndef _GF_EVENTS_H_#define _GF_EVENTS_H_#ifdef __cplusplusextern "C" {#endif#include <gpac/math.h>#include <gpac/tools.h>/* minimal event system DO NOT CHANGE THEIR POSITION IN THE LIST, USED TO SPEED UP FILTERING OF USER INPUT EVENTS*//*events*/enum { /****************************************************** Events used for both GPAC internals and DOM Events *******************************************************/ /*MouseEvents*/ GF_EVENT_CLICK, GF_EVENT_MOUSEUP, GF_EVENT_MOUSEDOWN, GF_EVENT_MOUSEOVER, GF_EVENT_MOUSEOUT, /*!! ALL MOUSE EVENTS SHALL BE DECLARED BEFORE MOUSEMOVE !! */ GF_EVENT_MOUSEMOVE, /*mouse wheel event - technically not DOM3 but used in SVG*/ GF_EVENT_MOUSEWHEEL, /*Key Events*/ GF_EVENT_KEYUP, GF_EVENT_KEYDOWN, /* covers KeyDown, KeyPress and AccessKey */ GF_EVENT_LONGKEYPRESS, /*character input*/ GF_EVENT_TEXTINPUT, /****************************************************** Events used for DOM Events only *******************************************************/ /*DOM UIEvents*/ GF_EVENT_FOCUSIN, GF_EVENT_FOCUSOUT, GF_EVENT_ACTIVATE, /*SVG (HTML) Events*/ GF_EVENT_LOAD, GF_EVENT_UNLOAD, GF_EVENT_ABORT, GF_EVENT_ERROR, GF_EVENT_RESIZE, GF_EVENT_SCROLL, GF_EVENT_ZOOM, GF_EVENT_BEGIN, /*this is a fake event, it is NEVER fired, only used in SMIL begin*/ GF_EVENT_BEGIN_EVENT, GF_EVENT_END, /*this is a fake event, it is NEVER fired, only used in SMIL end*/ GF_EVENT_END_EVENT, GF_EVENT_REPEAT, /*this is a fake event, it is NEVER fired, only used in SMIL repeat*/ GF_EVENT_REPEAT_EVENT, /*DOM MutationEvents - NOT SUPPORTED YET*/ 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, /*LASeR events*/ 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, /*pseudo-event, only used in LASeR coding*/ GF_EVENT_EXECUTION_TIME, GF_EVENT_BATTERY, GF_EVENT_CPU, GF_EVENT_UNKNOWN, /****************************************************** Events used for GPAC internals only *******************************************************/ /*same as mousedown, generated internally by GPAC*/ GF_EVENT_MOUSEDOUBLECLICK, /*window events*/ /*size has changed - indicate new w & h in .x end .y fields of event. When sent from gpac to a video plugin, indicates the output size should be changed. This is only sent when the plugin manages the output video himself When sent from a video plugin to gpac, indicates the output size has been changed. This is only sent when the plugin manages the output video himself */ GF_EVENT_SIZE, /*signals the scene size (if indicated in scene) upon connection (sent to the user event proc only) if scene size hasn't changed (seeking or other) this event is not sent */ GF_EVENT_SCENE_SIZE, GF_EVENT_SHOWHIDE, /*window show/hide (minimized or other). This is also sent to the user to signal focus switch in fullscreen*/ GF_EVENT_SET_CURSOR, /*set mouse cursor*/ GF_EVENT_SET_CAPTION, /*set window caption*/ GF_EVENT_MOVE, /*move window*/ GF_EVENT_REFRESH, /*window needs repaint (whenever needed, eg restore, hide->show, background refresh, paint)*/ GF_EVENT_QUIT, /*window is being closed*/ /*video hw setup message: - when sent from gpac to plugin, indicates that the plugin should re-setup hardware context due to a window resize: * for 2D output, this means resizing the backbuffer if needed (depending on HW constraints) * for 3D output, this means re-setup of OpenGL context (depending on HW constraints). Depending on windowing systems and implementations, it could be possible to resize a window without destroying the GL context. - when sent from plugin to gpac, indicates that hardware resources must be resetup before next render step (this is mainly due to discard all openGL textures and cached objects) */ GF_EVENT_VIDEO_SETUP, /*terminal events*/ GF_EVENT_CONNECT, /*signal URL is connected*/ GF_EVENT_DURATION, /*signal duration of presentation*/ GF_EVENT_AUTHORIZATION, /*indicates a user and pass is queried*/ GF_EVENT_NAVIGATE, /*indicates the user app should load or jump to the given URL.*/ GF_EVENT_NAVIGATE_INFO, /*indicates the link or its description under the mouse pointer*/ GF_EVENT_MESSAGE, /*message from the MPEG-4 terminal*/ GF_EVENT_PROGRESS, /*progress message from the MPEG-4 terminal*/ GF_EVENT_VIEWPOINTS, /*indicates viewpoint list has changed - no struct associated*/ GF_EVENT_STREAMLIST, /*indicates stream list has changed - no struct associated - only used when no scene info is present*/ GF_EVENT_METADATA, /*indicates a change in associated metadata*/ GF_EVENT_SYS_COLORS, /*queries the list of system colors*/ GF_EVENT_RESET_RTI, /*forces a reset of the runtime info*/ GF_EVENT_UPDATE_RTI, /*updates runtime info*/};/*GPAC/DOM3 key codes*/enum { GF_KEY_UNIDENTIFIED = 0, GF_KEY_ACCEPT = 1, /* "Accept" The Accept (Commit) key.*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -