Debian Codegraph @

gstreamer/gstreamermm/navigation.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_NAVIGATION_H
3 #define _GSTREAMERMM_NAVIGATION_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28 #include <gst/video/navigation.h>
29 #include <glibmm/interface.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 using GstNavigation = struct _GstNavigation;
34 using GstNavigationClass = struct _GstNavigationClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 namespace Gst
40 { class Navigation_Class; } // namespace Gst
41 #endif // DOXYGEN_SHOULD_SKIP_THIS
42
43 namespace Gst
44 {
45
46 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
47
48 /**
49 * @var NavigationCommand NAVIGATION_COMMAND_INVALID
50 * An invalid command entry.
51 *
52 * @var NavigationCommand NAVIGATION_COMMAND_MENU1
53 * Execute navigation menu command 1. For DVD,
54 * this enters the DVD root menu, or exits back to the title from the menu.
55 *
56 * @var NavigationCommand NAVIGATION_COMMAND_MENU2
57 * Execute navigation menu command 2. For DVD,
58 * this jumps to the DVD title menu.
59 *
60 * @var NavigationCommand NAVIGATION_COMMAND_MENU3
61 * Execute navigation menu command 3. For DVD,
62 * this jumps into the DVD root menu.
63 *
64 * @var NavigationCommand NAVIGATION_COMMAND_MENU4
65 * Execute navigation menu command 4. For DVD,
66 * this jumps to the Subpicture menu.
67 *
68 * @var NavigationCommand NAVIGATION_COMMAND_MENU5
69 * Execute navigation menu command 5. For DVD,
70 * the jumps to the audio menu.
71 *
72 * @var NavigationCommand NAVIGATION_COMMAND_MENU6
73 * Execute navigation menu command 6. For DVD,
74 * this jumps to the angles menu.
75 *
76 * @var NavigationCommand NAVIGATION_COMMAND_MENU7
77 * Execute navigation menu command 7. For DVD,
78 * this jumps to the chapter menu.
79 *
80 * @var NavigationCommand NAVIGATION_COMMAND_LEFT
81 * Select the next button to the left in a menu,
82 * if such a button exists.
83 *
84 * @var NavigationCommand NAVIGATION_COMMAND_RIGHT
85 * Select the next button to the right in a menu,
86 * if such a button exists.
87 *
88 * @var NavigationCommand NAVIGATION_COMMAND_UP
89 * Select the button above the current one in a
90 * menu, if such a button exists.
91 *
92 * @var NavigationCommand NAVIGATION_COMMAND_DOWN
93 * Select the button below the current one in a
94 * menu, if such a button exists.
95 *
96 * @var NavigationCommand NAVIGATION_COMMAND_ACTIVATE
97 * Activate (click) the currently selected
98 * button in a menu, if such a button exists.
99 *
100 * @var NavigationCommand NAVIGATION_COMMAND_PREV_ANGLE
101 * Switch to the previous angle in a
102 * multiangle feature.
103 *
104 * @var NavigationCommand NAVIGATION_COMMAND_NEXT_ANGLE
105 * Switch to the next angle in a multiangle
106 * feature.
107 *
108 * @enum NavigationCommand
109 *
110 * A set of commands that may be issued to an element providing the
111 * Gst::Navigation interface. The available commands can be queried via
112 * the gst_navigation_query_new_commands() query.
113 *
114 * For convenience in handling DVD navigation, the MENU commands are aliased as:
115 * GST_NAVIGATION_COMMAND_DVD_MENU = @a GST_NAVIGATION_COMMAND_MENU1
116 * GST_NAVIGATION_COMMAND_DVD_TITLE_MENU = @a GST_NAVIGATION_COMMAND_MENU2
117 * GST_NAVIGATION_COMMAND_DVD_ROOT_MENU = @a GST_NAVIGATION_COMMAND_MENU3
118 * GST_NAVIGATION_COMMAND_DVD_SUBPICTURE_MENU = @a GST_NAVIGATION_COMMAND_MENU4
119 * GST_NAVIGATION_COMMAND_DVD_AUDIO_MENU = @a GST_NAVIGATION_COMMAND_MENU5
120 * GST_NAVIGATION_COMMAND_DVD_ANGLE_MENU = @a GST_NAVIGATION_COMMAND_MENU6
121 * GST_NAVIGATION_COMMAND_DVD_CHAPTER_MENU = @a GST_NAVIGATION_COMMAND_MENU7
122 *
123 * @ingroup gstreamermmEnums
124 */
125 enum NavigationCommand
126 {
127 NAVIGATION_COMMAND_INVALID = 0,
128 NAVIGATION_COMMAND_MENU1 = 1,
129 NAVIGATION_COMMAND_MENU2 = 2,
130 NAVIGATION_COMMAND_MENU3 = 3,
131 NAVIGATION_COMMAND_MENU4 = 4,
132 NAVIGATION_COMMAND_MENU5 = 5,
133 NAVIGATION_COMMAND_MENU6 = 6,
134 NAVIGATION_COMMAND_MENU7 = 7,
135 NAVIGATION_COMMAND_LEFT = 20,
136 NAVIGATION_COMMAND_RIGHT = 21,
137 NAVIGATION_COMMAND_UP = 22,
138 NAVIGATION_COMMAND_DOWN = 23,
139 NAVIGATION_COMMAND_ACTIVATE = 24,
140 NAVIGATION_COMMAND_PREV_ANGLE = 30,
141 NAVIGATION_COMMAND_NEXT_ANGLE = 31
142 };
143
144 } // namespace Gst
145
146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
147 namespace Glib
148 {
149
150 template <>
151 class Value<Gst::NavigationCommand> : public Glib::Value_Enum<Gst::NavigationCommand>
152 {
153 public:
154 static GType value_type() G_GNUC_CONST;
155 };
156
157 } // namespace Glib
158 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
159
160 namespace Gst
161 {
162
163 /**
164 * @var NavigationEventType NAVIGATION_EVENT_INVALID
165 * Returned from
166 * gst_navigation_event_get_type() when the passed event is not a navigation event.
167 *
168 * @var NavigationEventType NAVIGATION_EVENT_KEY_PRESS
169 * A key press event. Use
170 * gst_navigation_event_parse_key_event() to extract the details from the event.
171 *
172 * @var NavigationEventType NAVIGATION_EVENT_KEY_RELEASE
173 * A key release event. Use
174 * gst_navigation_event_parse_key_event() to extract the details from the event.
175 *
176 * @var NavigationEventType NAVIGATION_EVENT_MOUSE_BUTTON_PRESS
177 * A mouse button press event. Use
178 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
179 * event.
180 *
181 * @var NavigationEventType NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE
182 * A mouse button release event. Use
183 * gst_navigation_event_parse_mouse_button_event() to extract the details from the
184 * event.
185 *
186 * @var NavigationEventType NAVIGATION_EVENT_MOUSE_MOVE
187 * A mouse movement event. Use
188 * gst_navigation_event_parse_mouse_move_event() to extract the details from the
189 * event.
190 *
191 * @var NavigationEventType NAVIGATION_EVENT_COMMAND
192 * A navigation command event. Use
193 * gst_navigation_event_parse_command() to extract the details from the event.
194 *
195 * @enum NavigationEventType
196 *
197 * Enum values for the various events that an element implementing the
198 * GstNavigation interface might send up the pipeline.
199 *
200 * @ingroup gstreamermmEnums
201 */
202 enum NavigationEventType
203 {
204 NAVIGATION_EVENT_INVALID,
205 NAVIGATION_EVENT_KEY_PRESS,
206 NAVIGATION_EVENT_KEY_RELEASE,
207 NAVIGATION_EVENT_MOUSE_BUTTON_PRESS,
208 NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE,
209 NAVIGATION_EVENT_MOUSE_MOVE,
210 NAVIGATION_EVENT_COMMAND
211 };
212
213 } // namespace Gst
214
215 #ifndef DOXYGEN_SHOULD_SKIP_THIS
216 namespace Glib
217 {
218
219 template <>
220 class Value<Gst::NavigationEventType> : public Glib::Value_Enum<Gst::NavigationEventType>
221 {
222 public:
223 static GType value_type() G_GNUC_CONST;
224 };
225
226 } // namespace Glib
227 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
228
229 namespace Gst
230 {
231
232 /**
233 * @var NavigationMessageType NAVIGATION_MESSAGE_INVALID
234 * Returned from
235 * gst_navigation_message_get_type() when the passed message is not a
236 * navigation message.
237 *
238 * @var NavigationMessageType NAVIGATION_MESSAGE_MOUSE_OVER
239 * Sent when the mouse moves over or leaves a
240 * clickable region of the output, such as a DVD menu button.
241 *
242 * @var NavigationMessageType NAVIGATION_MESSAGE_COMMANDS_CHANGED
243 * Sent when the set of available commands
244 * changes and should re-queried by interested applications.
245 *
246 * @var NavigationMessageType NAVIGATION_MESSAGE_ANGLES_CHANGED
247 * Sent when display angles in a multi-angle
248 * feature (such as a multiangle DVD) change - either angles have appeared or
249 * disappeared.
250 *
251 * @var NavigationMessageType NAVIGATION_MESSAGE_EVENT
252 * Sent when a navigation event was not handled
253 * by any element in the pipeline (Since 1.6).
254 *
255 * @enum NavigationMessageType
256 *
257 * A set of notifications that may be received on the bus when navigation
258 * related status changes.
259 *
260 * @ingroup gstreamermmEnums
261 */
262 enum NavigationMessageType
263 {
264 NAVIGATION_MESSAGE_INVALID,
265 NAVIGATION_MESSAGE_MOUSE_OVER,
266 NAVIGATION_MESSAGE_COMMANDS_CHANGED,
267 NAVIGATION_MESSAGE_ANGLES_CHANGED,
268 NAVIGATION_MESSAGE_EVENT
269 };
270
271 } // namespace Gst
272
273 #ifndef DOXYGEN_SHOULD_SKIP_THIS
274 namespace Glib
275 {
276
277 template <>
278 class Value<Gst::NavigationMessageType> : public Glib::Value_Enum<Gst::NavigationMessageType>
279 {
280 public:
281 static GType value_type() G_GNUC_CONST;
282 };
283
284 } // namespace Glib
285 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
286
287 namespace Gst
288 {
289
290 /**
291 * @var NavigationQueryType NAVIGATION_QUERY_INVALID
292 * Invalid query.
293 *
294 * @var NavigationQueryType NAVIGATION_QUERY_COMMANDS
295 * Command query.
296 *
297 * @var NavigationQueryType NAVIGATION_QUERY_ANGLES
298 * Viewing angle query.
299 *
300 * @enum NavigationQueryType
301 *
302 * Tyoes of navigation interface queries.
303 *
304 * @ingroup gstreamermmEnums
305 */
306 enum NavigationQueryType
307 {
308 NAVIGATION_QUERY_INVALID,
309 NAVIGATION_QUERY_COMMANDS,
310 NAVIGATION_QUERY_ANGLES
311 };
312
313 } // namespace Gst
314
315 #ifndef DOXYGEN_SHOULD_SKIP_THIS
316 namespace Glib
317 {
318
319 template <>
320 class Value<Gst::NavigationQueryType> : public Glib::Value_Enum<Gst::NavigationQueryType>
321 {
322 public:
323 static GType value_type() G_GNUC_CONST;
324 };
325
326 } // namespace Glib
327 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
328
329 namespace Gst
330 {
331
332
333 class Structure;
334
335 /** An interface for elements that provide navigation functionality.
336 * @ingroup GstInterfaces
337 *
338 * Last reviewed on 2016-06-06 (1.8.0)
339 */
340
341 class Navigation : public Glib::Interface
342 {
343
344 #ifndef DOXYGEN_SHOULD_SKIP_THIS
345
346 public:
347 using CppObjectType = Navigation;
348 using CppClassType = Navigation_Class;
349 using BaseObjectType = GstNavigation;
350 using BaseClassType = GstNavigationInterface;
351
352 // noncopyable
353 Navigation(const Navigation&) = delete;
354 Navigation& operator=(const Navigation&) = delete;
355
356 private:
357 friend class Navigation_Class;
358 static CppClassType navigation_class_;
359
360 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
361 protected:
362 /**
363 * You should derive from this class to use it.
364 */
365 Navigation();
366
367 #ifndef DOXYGEN_SHOULD_SKIP_THIS
368 /** Called by constructors of derived classes. Provide the result of
369 * the Class init() function to ensure that it is properly
370 * initialized.
371 *
372 * @param interface_class The Class object for the derived type.
373 */
374 explicit Navigation(const Glib::Interface_Class& interface_class);
375
376 public:
377 // This is public so that C++ wrapper instances can be
378 // created for C instances of unwrapped types.
379 // For instance, if an unexpected C type implements the C interface.
380 explicit Navigation(GstNavigation* castitem);
381
382 protected:
383 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
384
385 public:
386
387 Navigation(Navigation&& src) noexcept;
388 Navigation& operator=(Navigation&& src) noexcept;
389
390 ~Navigation() noexcept override;
391
392 static void add_interface(GType gtype_implementer);
393
394 /** Get the GType for this class, for use with the underlying GObject type system.
395 */
396 static GType get_type() G_GNUC_CONST;
397
398 #ifndef DOXYGEN_SHOULD_SKIP_THIS
399 static GType get_base_type() G_GNUC_CONST;
400 #endif
401
402 ///Provides access to the underlying C GObject.
403 GstNavigation* gobj() { return reinterpret_cast<GstNavigation*>(gobject_); }
404
405 ///Provides access to the underlying C GObject.
406 const GstNavigation* gobj() const { return reinterpret_cast<GstNavigation*>(gobject_); }
407
408 private:
409
410
411 public:
412
413 void send_event(Gst::Structure& structure);
414
415 /** @param event The type of the key event. Recognised values are "key-press" and
416 * "key-release".
417 * @param key Character representation of the key. This is typically as produced
418 * by XKeysymToString.
419 */
420 void send_key_event(const Glib::ustring& event, const Glib::ustring& key);
421
422 /** Sends a mouse event to the navigation interface. Mouse event coordinates
423 * are sent relative to the display space of the related output area. This is
424 * usually the size in pixels of the window associated with the element
425 * implementing the Gst::Navigation interface.
426 *
427 * @param event The type of mouse event, as a text string. Recognised values are
428 * "mouse-button-press", "mouse-button-release" and "mouse-move".
429 * @param button The button number of the button being pressed or released. Pass 0
430 * for mouse-move events.
431 * @param x The x coordinate of the mouse event.
432 * @param y The y coordinate of the mouse event.
433 */
434 void send_mouse_event(const Glib::ustring& event, int button, double x, double y);
435
436 /** Sends the indicated command to the navigation interface.
437 *
438 * @param command The command to issue.
439 */
440 void send_command(Gst::NavigationCommand command);
441
442
443 /** Called when an event has been sent to the Gst::Navigation.
444 */
445 virtual void send_event_vfunc(Gst::Structure&& structure);
446
447 protected:
448
449
450 public:
451
452 public:
453 //C++ methods used to invoke GTK+ virtual functions:
454
455 protected:
456 //GTK+ Virtual Functions (override these to change behaviour):
457
458 //Default Signal Handlers::
459
460
461 };
462
463 } // namespace Gst
464
465
466 namespace Glib
467 {
468 /** A Glib::wrap() method for this object.
469 *
470 * @param object The C instance.
471 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
472 * @result A C++ instance that wraps this C instance.
473 *
474 * @relates Gst::Navigation
475 */
476 Glib::RefPtr<Gst::Navigation> wrap(GstNavigation* object, bool take_copy = false);
477
478 } // namespace Glib
479
480
481 #endif /* _GSTREAMERMM_NAVIGATION_H */
482