1/* GStreamer Navigation
2 * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3 * Copyright (C) 2003 David A. Schleef <ds@schleef.org>
4 *
5 * navigation.h: navigation interface design
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef __GST_NAVIGATION_H__
24#define __GST_NAVIGATION_H__
25
26#include <gst/gst.h>
27#include <gst/video/video-prelude.h>
28
29G_BEGIN_DECLS
30
31#define GST_TYPE_NAVIGATION \
32 (gst_navigation_get_type ())
33#define GST_NAVIGATION(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_NAVIGATION, GstNavigation))
35#define GST_IS_NAVIGATION(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NAVIGATION))
37#define GST_NAVIGATION_GET_INTERFACE(obj) \
38 (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_NAVIGATION, GstNavigationInterface))
39
40typedef struct _GstNavigation GstNavigation;
41typedef struct _GstNavigationInterface GstNavigationInterface;
42
43/**
44 * GstNavigationModifierType:
45 * @GST_NAVIGATION_MODIFIER_SHIFT_MASK: the Shift key.
46 * @GST_NAVIGATION_MODIFIER_CONTROL_MASK: the Control key.
47 * @GST_NAVIGATION_MODIFIER_MOD1_MASK: the third modifier key
48 * @GST_NAVIGATION_MODIFIER_MOD2_MASK: the fourth modifier key
49 * @GST_NAVIGATION_MODIFIER_MOD3_MASK: the fifth modifier key
50 * @GST_NAVIGATION_MODIFIER_MOD4_MASK: the sixth modifier key
51 * @GST_NAVIGATION_MODIFIER_MOD5_MASK: the seventh modifier key
52 * @GST_NAVIGATION_MODIFIER_BUTTON1_MASK: the first mouse button (usually the left button).
53 * @GST_NAVIGATION_MODIFIER_BUTTON2_MASK: the second mouse button (usually the right button).
54 * @GST_NAVIGATION_MODIFIER_BUTTON3_MASK: the third mouse button (usually the mouse wheel button or middle button).
55 * @GST_NAVIGATION_MODIFIER_BUTTON4_MASK: the fourth mouse button (typically the "Back" button).
56 * @GST_NAVIGATION_MODIFIER_BUTTON5_MASK: the fifth mouse button (typically the "forward" button).
57 * @GST_NAVIGATION_MODIFIER_SUPER_MASK: the Super modifier
58 * @GST_NAVIGATION_MODIFIER_HYPER_MASK: the Hyper modifier
59 * @GST_NAVIGATION_MODIFIER_META_MASK: the Meta modifier
60 * @GST_NAVIGATION_MODIFIER_MASK: A mask covering all entries in #GdkModifierType.
61 *
62 * Flags to indicate the state of modifier keys and mouse buttons
63 * in events.
64 *
65 * Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose,
66 * Apple, CapsLock or ShiftLock.
67 *
68 * Since: 1.22
69 */
70typedef enum
71{
72 GST_NAVIGATION_MODIFIER_NONE = 0,
73 GST_NAVIGATION_MODIFIER_SHIFT_MASK = 1 << 0,
74 GST_NAVIGATION_MODIFIER_LOCK_MASK = 1 << 1,
75 GST_NAVIGATION_MODIFIER_CONTROL_MASK = 1 << 2,
76
77 GST_NAVIGATION_MODIFIER_MOD1_MASK = 1 << 3,
78 GST_NAVIGATION_MODIFIER_MOD2_MASK = 1 << 4,
79 GST_NAVIGATION_MODIFIER_MOD3_MASK = 1 << 5,
80 GST_NAVIGATION_MODIFIER_MOD4_MASK = 1 << 6,
81 GST_NAVIGATION_MODIFIER_MOD5_MASK = 1 << 7,
82
83 GST_NAVIGATION_MODIFIER_BUTTON1_MASK = 1 << 8,
84 GST_NAVIGATION_MODIFIER_BUTTON2_MASK = 1 << 9,
85 GST_NAVIGATION_MODIFIER_BUTTON3_MASK = 1 << 10,
86 GST_NAVIGATION_MODIFIER_BUTTON4_MASK = 1 << 11,
87 GST_NAVIGATION_MODIFIER_BUTTON5_MASK = 1 << 12,
88
89 GST_NAVIGATION_MODIFIER_SUPER_MASK = 1 << 26,
90 GST_NAVIGATION_MODIFIER_HYPER_MASK = 1 << 27,
91 GST_NAVIGATION_MODIFIER_META_MASK = 1 << 28,
92
93 GST_NAVIGATION_MODIFIER_MASK = (
94 GST_NAVIGATION_MODIFIER_NONE |
95 GST_NAVIGATION_MODIFIER_SHIFT_MASK |
96 GST_NAVIGATION_MODIFIER_LOCK_MASK |
97 GST_NAVIGATION_MODIFIER_CONTROL_MASK |
98 GST_NAVIGATION_MODIFIER_MOD1_MASK |
99 GST_NAVIGATION_MODIFIER_MOD2_MASK |
100 GST_NAVIGATION_MODIFIER_MOD3_MASK |
101 GST_NAVIGATION_MODIFIER_MOD4_MASK |
102 GST_NAVIGATION_MODIFIER_MOD5_MASK |
103 GST_NAVIGATION_MODIFIER_BUTTON1_MASK |
104 GST_NAVIGATION_MODIFIER_BUTTON2_MASK |
105 GST_NAVIGATION_MODIFIER_BUTTON3_MASK |
106 GST_NAVIGATION_MODIFIER_BUTTON4_MASK |
107 GST_NAVIGATION_MODIFIER_BUTTON5_MASK |
108 GST_NAVIGATION_MODIFIER_SUPER_MASK |
109 GST_NAVIGATION_MODIFIER_HYPER_MASK |
110 GST_NAVIGATION_MODIFIER_META_MASK
111 )
112
113} GstNavigationModifierType;
114
115/**
116 * GstNavigationInterface:
117 * @iface: the parent interface
118 * @send_event: sending a navigation event
119 * @send_event_simple: sending a navigation event (Since: 1.22)
120 *
121 * Navigation interface.
122 */
123struct _GstNavigationInterface {
124 GTypeInterface iface;
125
126 /* virtual functions */
127
128 /**
129 * GstNavigationInterface::send_event:
130 *
131 * sending a navigation event.
132 *
133 * Deprecated: 1.22: Use #GstNavigationInterface.send_event_simple() instead.
134 */
135 void (*send_event) (GstNavigation *navigation, GstStructure *structure);
136
137 /**
138 * GstNavigationInterface::send_event_simple:
139 * @navigation: The navigation interface instance
140 * @event: (transfer full): The event to send
141 *
142 * sending a navigation event.
143 *
144 * Since: 1.22
145 */
146 void (*send_event_simple) (GstNavigation *navigation, GstEvent *event);
147};
148
149GST_VIDEO_API
150GType gst_navigation_get_type (void);
151
152/* Navigation commands */
153
154/**
155 * GstNavigationCommand:
156 * @GST_NAVIGATION_COMMAND_INVALID: An invalid command entry
157 * @GST_NAVIGATION_COMMAND_MENU1: Execute navigation menu command 1. For DVD,
158 * this enters the DVD root menu, or exits back to the title from the menu.
159 * @GST_NAVIGATION_COMMAND_MENU2: Execute navigation menu command 2. For DVD,
160 * this jumps to the DVD title menu.
161 * @GST_NAVIGATION_COMMAND_MENU3: Execute navigation menu command 3. For DVD,
162 * this jumps into the DVD root menu.
163 * @GST_NAVIGATION_COMMAND_MENU4: Execute navigation menu command 4. For DVD,
164 * this jumps to the Subpicture menu.
165 * @GST_NAVIGATION_COMMAND_MENU5: Execute navigation menu command 5. For DVD,
166 * the jumps to the audio menu.
167 * @GST_NAVIGATION_COMMAND_MENU6: Execute navigation menu command 6. For DVD,
168 * this jumps to the angles menu.
169 * @GST_NAVIGATION_COMMAND_MENU7: Execute navigation menu command 7. For DVD,
170 * this jumps to the chapter menu.
171 * @GST_NAVIGATION_COMMAND_LEFT: Select the next button to the left in a menu,
172 * if such a button exists.
173 * @GST_NAVIGATION_COMMAND_RIGHT: Select the next button to the right in a menu,
174 * if such a button exists.
175 * @GST_NAVIGATION_COMMAND_UP: Select the button above the current one in a
176 * menu, if such a button exists.
177 * @GST_NAVIGATION_COMMAND_DOWN: Select the button below the current one in a
178 * menu, if such a button exists.
179 * @GST_NAVIGATION_COMMAND_ACTIVATE: Activate (click) the currently selected
180 * button in a menu, if such a button exists.
181 * @GST_NAVIGATION_COMMAND_PREV_ANGLE: Switch to the previous angle in a
182 * multiangle feature.
183 * @GST_NAVIGATION_COMMAND_NEXT_ANGLE: Switch to the next angle in a multiangle
184 * feature.
185 *
186 * A set of commands that may be issued to an element providing the
187 * #GstNavigation interface. The available commands can be queried via
188 * the gst_navigation_query_new_commands() query.
189 *
190 * For convenience in handling DVD navigation, the MENU commands are aliased as:
191 * GST_NAVIGATION_COMMAND_DVD_MENU = @GST_NAVIGATION_COMMAND_MENU1
192 * GST_NAVIGATION_COMMAND_DVD_TITLE_MENU = @GST_NAVIGATION_COMMAND_MENU2
193 * GST_NAVIGATION_COMMAND_DVD_ROOT_MENU = @GST_NAVIGATION_COMMAND_MENU3
194 * GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU = @GST_NAVIGATION_COMMAND_MENU4
195 * GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU = @GST_NAVIGATION_COMMAND_MENU5
196 * GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU = @GST_NAVIGATION_COMMAND_MENU6
197 * GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU = @GST_NAVIGATION_COMMAND_MENU7
198 */
199typedef enum {
200 GST_NAVIGATION_COMMAND_INVALID = 0,
201
202 GST_NAVIGATION_COMMAND_MENU1 = 1,
203 GST_NAVIGATION_COMMAND_MENU2 = 2,
204 GST_NAVIGATION_COMMAND_MENU3 = 3,
205 GST_NAVIGATION_COMMAND_MENU4 = 4,
206 GST_NAVIGATION_COMMAND_MENU5 = 5,
207 GST_NAVIGATION_COMMAND_MENU6 = 6,
208 GST_NAVIGATION_COMMAND_MENU7 = 7,
209
210 GST_NAVIGATION_COMMAND_LEFT = 20,
211 GST_NAVIGATION_COMMAND_RIGHT = 21,
212 GST_NAVIGATION_COMMAND_UP = 22,
213 GST_NAVIGATION_COMMAND_DOWN = 23,
214 GST_NAVIGATION_COMMAND_ACTIVATE = 24,
215
216 GST_NAVIGATION_COMMAND_PREV_ANGLE = 30,
217 GST_NAVIGATION_COMMAND_NEXT_ANGLE = 31
218} GstNavigationCommand;
219
220/* Some aliases for the menu command types */
221#define GST_NAVIGATION_COMMAND_DVD_MENU GST_NAVIGATION_COMMAND_MENU1
222#define GST_NAVIGATION_COMMAND_DVD_TITLE_MENU GST_NAVIGATION_COMMAND_MENU2
223#define GST_NAVIGATION_COMMAND_DVD_ROOT_MENU GST_NAVIGATION_COMMAND_MENU3
224#define GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU GST_NAVIGATION_COMMAND_MENU4
225#define GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU GST_NAVIGATION_COMMAND_MENU5
226#define GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU GST_NAVIGATION_COMMAND_MENU6
227#define GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU GST_NAVIGATION_COMMAND_MENU7
228
229/* Queries */
230/**
231 * GstNavigationQueryType:
232 * @GST_NAVIGATION_QUERY_INVALID: invalid query
233 * @GST_NAVIGATION_QUERY_COMMANDS: command query
234 * @GST_NAVIGATION_QUERY_ANGLES: viewing angle query
235 *
236 * Types of navigation interface queries.
237 */
238typedef enum
239{
240 GST_NAVIGATION_QUERY_INVALID = 0,
241 GST_NAVIGATION_QUERY_COMMANDS = 1,
242 GST_NAVIGATION_QUERY_ANGLES = 2
243} GstNavigationQueryType;
244
245GST_VIDEO_API
246GstNavigationQueryType gst_navigation_query_get_type (GstQuery *query);
247
248GST_VIDEO_API
249GstQuery * gst_navigation_query_new_commands (void);
250
251GST_VIDEO_API
252void gst_navigation_query_set_commands (GstQuery *query, gint n_cmds, ...);
253
254GST_VIDEO_API
255void gst_navigation_query_set_commandsv (GstQuery *query, gint n_cmds,
256 GstNavigationCommand *cmds);
257
258GST_VIDEO_API
259gboolean gst_navigation_query_parse_commands_length (GstQuery *query,
260 guint *n_cmds);
261
262GST_VIDEO_API
263gboolean gst_navigation_query_parse_commands_nth (GstQuery *query, guint nth,
264 GstNavigationCommand *cmd);
265
266GST_VIDEO_API
267GstQuery * gst_navigation_query_new_angles (void);
268
269GST_VIDEO_API
270void gst_navigation_query_set_angles (GstQuery *query, guint cur_angle,
271 guint n_angles);
272
273GST_VIDEO_API
274gboolean gst_navigation_query_parse_angles (GstQuery *query, guint *cur_angle,
275 guint *n_angles);
276
277/* Element messages */
278/**
279 * GstNavigationMessageType:
280 * @GST_NAVIGATION_MESSAGE_INVALID: Returned from
281 * gst_navigation_message_get_type() when the passed message is not a
282 * navigation message.
283 * @GST_NAVIGATION_MESSAGE_MOUSE_OVER: Sent when the mouse moves over or leaves a
284 * clickable region of the output, such as a DVD menu button.
285 * @GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED: Sent when the set of available commands
286 * changes and should re-queried by interested applications.
287 * @GST_NAVIGATION_MESSAGE_ANGLES_CHANGED: Sent when display angles in a multi-angle
288 * feature (such as a multiangle DVD) change - either angles have appeared or
289 * disappeared.
290 * @GST_NAVIGATION_MESSAGE_EVENT: Sent when a navigation event was not handled
291 * by any element in the pipeline (Since: 1.6)
292 *
293 * A set of notifications that may be received on the bus when navigation
294 * related status changes.
295 */
296typedef enum {
297 GST_NAVIGATION_MESSAGE_INVALID,
298 GST_NAVIGATION_MESSAGE_MOUSE_OVER,
299 GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED,
300 GST_NAVIGATION_MESSAGE_ANGLES_CHANGED,
301 GST_NAVIGATION_MESSAGE_EVENT
302} GstNavigationMessageType;
303
304GST_VIDEO_API
305GstNavigationMessageType gst_navigation_message_get_type (GstMessage *message);
306
307GST_VIDEO_API
308GstMessage * gst_navigation_message_new_mouse_over (GstObject *src,
309 gboolean active);
310
311GST_VIDEO_API
312gboolean gst_navigation_message_parse_mouse_over (GstMessage *message,
313 gboolean *active);
314
315GST_VIDEO_API
316GstMessage * gst_navigation_message_new_commands_changed (GstObject *src);
317
318GST_VIDEO_API
319GstMessage * gst_navigation_message_new_angles_changed (GstObject *src,
320 guint cur_angle,
321 guint n_angles);
322
323GST_VIDEO_API
324gboolean gst_navigation_message_parse_angles_changed (GstMessage *message,
325 guint *cur_angle,
326 guint *n_angles);
327
328GST_VIDEO_API
329GstMessage * gst_navigation_message_new_event (GstObject *src,
330 GstEvent *event);
331
332GST_VIDEO_API
333gboolean gst_navigation_message_parse_event (GstMessage *message,
334 GstEvent ** event);
335/* event parsing functions */
336/**
337 * GstNavigationEventType:
338 * @GST_NAVIGATION_EVENT_INVALID: Returned from
339 * gst_navigation_event_get_type() when the passed event is not a navigation event.
340 * @GST_NAVIGATION_EVENT_KEY_PRESS: A key press event. Use
341 * gst_navigation_event_parse_key_event() to extract the details from the event.
342 * @GST_NAVIGATION_EVENT_KEY_RELEASE: A key release event. Use
343 * gst_navigation_event_parse_key_event() to extract the details from the event.
344 * @GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS: A mouse button press event. Use
345 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
346 * event.
347 * @GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE: A mouse button release event. Use
348 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
349 * event.
350 * @GST_NAVIGATION_EVENT_MOUSE_MOVE: A mouse movement event. Use
351 * gst_navigation_event_parse_mouse_move_event() to extract the details from the
352 * event.
353 * @GST_NAVIGATION_EVENT_COMMAND: A navigation command event. Use
354 * gst_navigation_event_parse_command() to extract the details from the event.
355 * @GST_NAVIGATION_EVENT_MOUSE_SCROLL: A mouse scroll event. Use
356 * gst_navigation_event_parse_mouse_scroll_event() to extract the details from
357 * the event. (Since: 1.18)
358 * @GST_NAVIGATION_EVENT_TOUCH_DOWN: An event describing a new touch point,
359 * which will be assigned an identifier that is unique to it for the duration
360 * of its movement on the screen. Use gst_navigation_event_parse_touch_event()
361 * to extract the details from the event. (Since: 1.22)
362 * @GST_NAVIGATION_EVENT_TOUCH_MOTION: An event describing the movement of an
363 * active touch point across the screen. Use
364 * gst_navigation_event_parse_touch_event() to extract the details from the
365 * event. (Since: 1.22)
366 * @GST_NAVIGATION_EVENT_TOUCH_UP: An event describing a removed touch point.
367 * After this event, its identifier may be reused for any new touch points. Use
368 * gst_navigation_event_parse_touch_up_event() to extract the details from the
369 * event. (Since: 1.22)
370 * @GST_NAVIGATION_EVENT_TOUCH_FRAME: An event signaling the end of a sequence
371 * of simultaneous touch events. (Since: 1.22)
372 * @GST_NAVIGATION_EVENT_TOUCH_CANCEL: An event cancelling all currently active
373 * touch points. (Since: 1.22)
374 *
375 * Enum values for the various events that an element implementing the
376 * GstNavigation interface might send up the pipeline. Touch events have been
377 * inspired by the libinput API, and have the same meaning here.
378 */
379typedef enum {
380 GST_NAVIGATION_EVENT_INVALID = 0,
381 GST_NAVIGATION_EVENT_KEY_PRESS = 1,
382 GST_NAVIGATION_EVENT_KEY_RELEASE = 2,
383 GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS = 3,
384 GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE = 4,
385 GST_NAVIGATION_EVENT_MOUSE_MOVE = 5,
386 GST_NAVIGATION_EVENT_COMMAND = 6,
387
388 /**
389 * GST_NAVIGATION_EVENT_MOUSE_SCROLL:
390 *
391 * A mouse scroll event. Use gst_navigation_event_parse_mouse_scroll_event()
392 * to extract the details from the event.
393 *
394 * Since: 1.18
395 */
396 GST_NAVIGATION_EVENT_MOUSE_SCROLL = 7,
397
398 /**
399 * GST_NAVIGATION_EVENT_TOUCH_DOWN:
400 *
401 * An event describing a new touch point, which will be assigned an identifier
402 * that is unique to it for the duration of its movement on the screen.
403 * Use gst_navigation_event_parse_touch_event() to extract the details
404 * from the event.
405 *
406 * Since: 1.22
407 */
408 GST_NAVIGATION_EVENT_TOUCH_DOWN = 8,
409
410 /**
411 * GST_NAVIGATION_EVENT_TOUCH_MOTION:
412 *
413 * An event describing the movement of an active touch point across
414 * the screen. Use gst_navigation_event_parse_touch_event() to extract
415 * the details from the event.
416 *
417 * Since: 1.22
418 */
419 GST_NAVIGATION_EVENT_TOUCH_MOTION = 9,
420
421 /**
422 * GST_NAVIGATION_EVENT_TOUCH_UP:
423 *
424 * An event describing a removed touch point. After this event,
425 * its identifier may be reused for any new touch points.
426 * Use gst_navigation_event_parse_touch_up_event() to extract the details
427 * from the event.
428 *
429 * Since: 1.22
430 */
431 GST_NAVIGATION_EVENT_TOUCH_UP = 10,
432
433 /**
434 * GST_NAVIGATION_EVENT_TOUCH_FRAME:
435 *
436 * An event signaling the end of a sequence of simultaneous touch events.
437 *
438 * Since: 1.22
439 */
440 GST_NAVIGATION_EVENT_TOUCH_FRAME = 11,
441
442 /**
443 * GST_NAVIGATION_EVENT_TOUCH_CANCEL:
444 *
445 * An event cancelling all currently active touch points.
446 *
447 * Since: 1.22
448 */
449 GST_NAVIGATION_EVENT_TOUCH_CANCEL = 12,
450} GstNavigationEventType;
451
452GST_VIDEO_API
453GstNavigationEventType gst_navigation_event_get_type (GstEvent *event);
454
455GST_VIDEO_API
456GstEvent* gst_navigation_event_new_key_press (const gchar * key,
457 GstNavigationModifierType state) G_GNUC_MALLOC;
458
459GST_VIDEO_API
460GstEvent* gst_navigation_event_new_key_release (const gchar * key,
461 GstNavigationModifierType state) G_GNUC_MALLOC;
462
463GST_VIDEO_API
464GstEvent* gst_navigation_event_new_mouse_button_press (gint button, gdouble x,
465 gdouble y,
466 GstNavigationModifierType state) G_GNUC_MALLOC;
467
468GST_VIDEO_API
469GstEvent* gst_navigation_event_new_mouse_button_release (gint button, gdouble x,
470 gdouble y,
471 GstNavigationModifierType state) G_GNUC_MALLOC;
472
473GST_VIDEO_API
474GstEvent* gst_navigation_event_new_mouse_move (gdouble x,
475 gdouble y,
476 GstNavigationModifierType state) G_GNUC_MALLOC;
477
478GST_VIDEO_API
479GstEvent* gst_navigation_event_new_mouse_scroll (gdouble x, gdouble y,
480 gdouble delta_x, gdouble delta_y,
481 GstNavigationModifierType state) G_GNUC_MALLOC;
482
483GST_VIDEO_API
484GstEvent* gst_navigation_event_new_command (GstNavigationCommand command) G_GNUC_MALLOC;
485
486GST_VIDEO_API
487GstEvent* gst_navigation_event_new_touch_down (guint identifier,
488 gdouble x, gdouble y,
489 gdouble pressure,
490 GstNavigationModifierType state) G_GNUC_MALLOC;
491
492GST_VIDEO_API
493GstEvent* gst_navigation_event_new_touch_motion (guint identifier,
494 gdouble x, gdouble y,
495 gdouble pressure,
496 GstNavigationModifierType state) G_GNUC_MALLOC;
497
498GST_VIDEO_API
499GstEvent* gst_navigation_event_new_touch_up (guint identifier,
500 gdouble x, gdouble y,
501 GstNavigationModifierType state) G_GNUC_MALLOC;
502
503GST_VIDEO_API
504GstEvent* gst_navigation_event_new_touch_frame (GstNavigationModifierType state) G_GNUC_MALLOC;
505
506GST_VIDEO_API
507GstEvent* gst_navigation_event_new_touch_cancel (GstNavigationModifierType state) G_GNUC_MALLOC;
508
509GST_VIDEO_API
510gboolean gst_navigation_event_parse_key_event (GstEvent *event,
511 const gchar **key);
512
513GST_VIDEO_API
514gboolean gst_navigation_event_parse_mouse_button_event (GstEvent *event,
515 gint *button, gdouble *x, gdouble *y);
516
517GST_VIDEO_API
518gboolean gst_navigation_event_parse_mouse_move_event (GstEvent *event,
519 gdouble *x, gdouble *y);
520
521GST_VIDEO_API
522gboolean gst_navigation_event_parse_mouse_scroll_event (GstEvent *event,
523 gdouble *x, gdouble *y,
524 gdouble *delta_x, gdouble *delta_y);
525
526GST_VIDEO_API
527gboolean gst_navigation_event_parse_command (GstEvent *event,
528 GstNavigationCommand *command);
529
530GST_VIDEO_API
531gboolean gst_navigation_event_parse_touch_event (GstEvent * event,
532 guint * identifier,
533 gdouble * x, gdouble * y,
534 gdouble * pressure);
535
536GST_VIDEO_API
537gboolean gst_navigation_event_parse_touch_up_event (GstEvent * event,
538 guint * identifier,
539 gdouble * x, gdouble * y);
540
541GST_VIDEO_API
542gboolean gst_navigation_event_get_coordinates (GstEvent * event,
543 gdouble * x, gdouble * y);
544
545GST_VIDEO_API
546gboolean gst_navigation_event_set_coordinates (GstEvent * event,
547 gdouble x, gdouble y);
548
549/* interface virtual function wrappers */
550
551GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
552void gst_navigation_send_event (GstNavigation *navigation,
553 GstStructure *structure);
554
555GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
556void gst_navigation_send_key_event (GstNavigation *navigation,
557 const char *event, const char *key);
558
559GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
560void gst_navigation_send_mouse_event (GstNavigation *navigation,
561 const char *event, int button, double x, double y);
562
563GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
564void gst_navigation_send_mouse_scroll_event (GstNavigation *navigation,
565 double x, double y, double delta_x, double delta_y);
566
567GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
568void gst_navigation_send_command (GstNavigation *navigation,
569 GstNavigationCommand command);
570
571GST_VIDEO_API
572void gst_navigation_send_event_simple (GstNavigation *navigation,
573 GstEvent *event);
574
575GST_VIDEO_API
576gboolean gst_navigation_event_parse_modifier_state (GstEvent *event,
577 GstNavigationModifierType *state);
578
579G_END_DECLS
580
581#endif /* __GST_NAVIGATION_H__ */
582

source code of include/gstreamer-1.0/gst/video/navigation.h