/usr/include/gpac/events.h is in libgpac-dev 0.5.0+svn4288~dfsg1-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | /*
* GPAC - Multimedia Framework C SDK
*
* Authors: Jean Le Feuvre
* Copyright (c) Telecom ParisTech 2000-2012
* 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 __cplusplus
extern "C" {
#endif
#include <gpac/math.h>
#include <gpac/tools.h>
#include <gpac/events_constants.h>
/*mouse button modifiers*/
enum
{
GF_MOUSE_LEFT = 0,
GF_MOUSE_MIDDLE,
GF_MOUSE_RIGHT
};
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_MOUSEMOVE, GF_EVENT_MOUSEWHEEL, GF_EVENT_MOUSEDOWN, GF_EVENT_MOUSEUP*/
u8 type;
/*mouse location in output window, 2D-like: top-left (0,0), increasing y towards bottom*/
s32 x, y;
/*wheel position (wheel current delta / wheel absolute delta) for GF_EVENT_MouseWheel*/
Fixed wheel_pos;
/*0: left - 1: middle, 2- right*/
u32 button;
/*key modifier*/
u32 key_states;
} GF_EventMouse;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_KEYDOWN and GF_EVENT_KEYUP*/
u8 type;
/*above GPAC/DOM key code*/
u32 key_code;
/* hadrware key value (matching ASCI) */
u32 hw_code;
/*key modifier*/
u32 flags;
} GF_EventKey;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_TEXTINPUT*/
u8 type;
/*above virtual key code*/
u32 unicode_char;
} GF_EventChar;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_SIZE*/
u8 type;
/*width and height*/
u16 width, height;
} GF_EventSize;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_VIDEO_SETUP*/
u8 type;
/*width and height of visual surface to allocate*/
u16 width, height;
/*indicates whether double buffering is desired - when sent from plugin to player, indicates the backbuffer has been destroyed*/
Bool back_buffer;
/*indicates whether system memory for the backbuffer is desired (no video blitting)*/
Bool system_memory;
/*indicates whether opengl context shall be created. Values are:
0: no opengl context shall be created
1: opengl context shall be created for the main window and set as the current one
2: an extra opengl context shall be created for offscreen rendering and set as the current one
if not supported, mix of 2D (raster) and 3D (openGL) will be disabled
*/
u32 opengl_mode;
} GF_EventVideoSetup;
/*event proc return value: ignored
this event may be triggered by the compositor if owning window or if shortcut fullscreen is detected*/
typedef struct
{
/*GF_EVENT_SHOWHIDE*/
u8 type;
/*0: hidden - 1: visible - 2: fullscreen*/
u32 show_type;
} GF_EventShow;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_SET_CURSOR*/
u8 type;
/*set if is visible*/
u32 cursor_type;
} GF_EventCursor;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_SET_CAPTION*/
u8 type;
/*window style flags - NOT USED YET*/
const char *caption;
} GF_EventCaption;
/*event proc: never posted*/
typedef struct
{
/*GF_EVENT_MOVE*/
u8 type;
s32 x, y;
/*0: absolute positionning, 1: relative move, 2: use alignment constraints*/
Bool relative;
/*0: left/top, 1: middle, 2: right/bottom*/
u8 align_x, align_y;
} GF_EventMove;
/*duration may be signaled several times: it may change when setting up streams
event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_DURATION*/
u8 type;
/*duration in seconds*/
Double duration;
/*is seeking supported for service*/
Bool can_seek;
} GF_EventDuration;
/*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
*/
typedef struct
{
/*GF_EVENT_NAVIGATE and GF_EVENT_NAVIGATE_INFO*/
u8 type;
/*new url to open / data to handle*/
const char *to_url;
/*parameters (cf vrml spec) - UNUSED for GF_EVENT_NAVIGATE_INFO*/
u32 param_count;
const char **parameters;
} GF_EventNavigate;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_MESSAGE*/
u8 type;
/*name of service issuing the message*/
const char *service;
/*message*/
const char *message;
/*error if any*/
GF_Err error;
} GF_EventMessage;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_PROGRESS*/
u8 type;
/*name of service issuing the progress notif*/
const char *service;
/*progress type: 0: buffering, 1: downloading, 2: importing (BT/VRML/...)*/
u32 progress_type;
/*amount done and total amount of operation.
For buffer events, expresses current and total desired stream buffer in scene in milliseconds
For download events, expresses current and total size of download in bytes
For import events, no units defined (depends on importers)
*/
u32 done, total;
/* for download events */
u32 bytes_per_seconds;
} GF_EventProgress;
/*event proc return value: ignored*/
typedef struct
{
/*GF_EVENT_CONNECT*/
u8 type;
/*sent upon connection/deconnection completion. if any error, it is signaled through message event*/
Bool is_connected;
} GF_EventConnect;
/*event proc return value: 1 if info has been completed, 0 otherwise (and operation this request was for
will then fail)*/
typedef struct
{
/*GF_EVENT_AUTHORIZATION*/
u8 type;
/*the URL the auth request is for*/
const char *site_url;
/*user name (provided buffer can hold 50 bytes). It may already be formated, or an empty ("") string*/
char *user;
/*password (provided buffer can hold 50 bytes)*/
char *password;
} GF_EventAuthorize;
/*event proc return value: 1 if info has been completed, 0 otherwise */
typedef struct
{
/*GF_EVENT_SYS_COLORS*/
u8 type;
/*ARGB colors, in order:
ActiveBorder, ActiveCaption, AppWorkspace, Background, ButtonFace, ButtonHighlight, ButtonShadow,
ButtonText, CaptionText, GrayText, Highlight, HighlightText, InactiveBorder, InactiveCaption,
InactiveCaptionText, InfoBackground, InfoText, Menu, MenuText, Scrollbar, ThreeDDarkShadow,
ThreeDFace, ThreeDHighlight, ThreeDLightShadow, ThreeDShadow, Window, WindowFrame, WindowText
*/
u32 sys_colors[28];
} GF_EventSysColors;
typedef struct {
/* 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 */
u8 type;
void *relatedNode;
void *prevValue;
void *newValue;
void *attrName;
u8 attrChange;
} GF_EventMutation;
typedef struct {
/* GF_EVENT_OPENFILE*/
u8 type;
u32 nb_files;
char **files;
} GF_EventOpenFile;
typedef struct {
/* GF_EVENT_FORWARDED*/
u8 type;
/*one of te above event*/
u8 forward_type;
/*original type of event as forwarded by the service*/
u32 service_event_type;
/*parameter of event as forwarded by the service - creation/deletion is handled by the service*/
void *param;
} GF_EventForwarded;
typedef union
{
u8 type;
GF_EventMouse mouse;
GF_EventKey key;
GF_EventChar character;
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_EventForwarded forwarded_event;
GF_EventOpenFile open_file;
} GF_Event;
#ifdef __cplusplus
}
#endif
#endif /*_GF_EVENTS_H_*/
|