summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-09 10:17:32 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-09 10:20:53 -0500
commiteafed87ffd70c0a1da1893bd05d076fb6078bf3f (patch)
tree6445916f3cf0bf22ee2c5ecf859c4d05ed9dedbf
parente3a28ecd1e74465f96185e38dc447d9edc6aaa98 (diff)
ecore-wl2: Move ecore_wl2_subsurface functions to be internal
These functions are not used outside of EFL so there is no need for them to be public. ref T8013
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h158
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_internal.h157
2 files changed, 157 insertions, 158 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 7806f5d167..6be9c8c4a9 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -453,7 +453,6 @@ typedef struct _Ecore_Wl2_Surface_Interface
453 * @li @ref Ecore_Wl2_Window_Group 453 * @li @ref Ecore_Wl2_Window_Group
454 * @li @ref Ecore_Wl2_Output_Group 454 * @li @ref Ecore_Wl2_Output_Group
455 * @li @ref Ecore_Wl2_Input_Group 455 * @li @ref Ecore_Wl2_Input_Group
456 * @li @ref Ecore_Wl2_Subsurface_Group
457 */ 456 */
458 457
459/** 458/**
@@ -1565,163 +1564,6 @@ EAPI void ecore_wl2_input_pointer_set(Ecore_Wl2_Input *input, struct wl_surface
1565EAPI void ecore_wl2_input_cursor_from_name_set(Ecore_Wl2_Input *input, const char *cursor); 1564EAPI void ecore_wl2_input_cursor_from_name_set(Ecore_Wl2_Input *input, const char *cursor);
1566 1565
1567/** 1566/**
1568 * @defgroup Ecore_Wl2_Subsurface_Group Functions to manipulate subsurfaces.
1569 * @ingroup Ecore_Wl2_Group
1570 *
1571 * Functions to manipulate wayland subsurfaces, using Ecore_Wl2_Subsurface.
1572 *
1573 * This API is intended to expose Wayland subsurface functionality, although it
1574 * should not be necessary for most applications to use it, as soon as we have
1575 * means to make Evas automatically switch Evas images to use subsurfaces.
1576 *
1577 * It can/should be used, for instance, when subsurfaces are needed to be not
1578 * in sync with the main window surface.
1579 */
1580
1581/**
1582 * Create and return a new subsurface.
1583 *
1584 * Create a new surface (and subsurface interface), with the parent surface
1585 * being the one associated with the given @param win.
1586 *
1587 * The @param win must be visible, otherwise there will be no surface created
1588 * for it yet.
1589 *
1590 * @return the allocated and initialized Ecore_Wl2_Subsurface object, or
1591 * NULL on failure
1592 *
1593 * @ingroup Ecore_Wl2_Subsurface_Group
1594 * @since 1.17
1595 */
1596EAPI Ecore_Wl2_Subsurface *ecore_wl2_subsurface_new(Ecore_Wl2_Window *window);
1597
1598/**
1599 * Destroy the given subsurface, as well as the surface associated with it.
1600 *
1601 * @param subsurface the subsurface
1602 *
1603 * @ingroup Ecore_Wl2_Subsurface_Group
1604 * @since 1.17
1605 */
1606EAPI void ecore_wl2_subsurface_del(Ecore_Wl2_Subsurface *subsurface);
1607
1608/**
1609 * Get the wl_surface for this subsurface
1610 *
1611 * @param subsurface the subsurface
1612 *
1613 * @return the wl_surface associated with this subsurface, or NULL on failure
1614 *
1615 * @ingroup Ecore_Wl2_Subsurface_Group
1616 * @since 1.17
1617 */
1618EAPI struct wl_surface *ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *subsurface);
1619
1620/**
1621 * Set the position of this subsurface, relative to its parent surface.
1622 * If subsurface is defined and the x, y coordinates differ from the currently
1623 * tracked position, this also schedules a sub-surface position change.
1624 *
1625 * @param subsurface the subsurface
1626 * @param x coordinate in the parent surface
1627 * @param y coordinate in the parent surface
1628 *
1629 * @ingroup Ecore_Wl2_Subsurface_Group
1630 * @since 1.17
1631 */
1632EAPI void ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface *subsurface, int x, int y);
1633
1634/**
1635 * Get the position of this subsurface, relative to its parent surface.
1636 * Coordinates will be returned in x and y if non-NULL.
1637 *
1638 * @param subsurface the subsurface
1639 * @param x coordinate in the parent surface, or NULL to ignore
1640 * @param y coordinate in the parent surface, or NULL to ignore
1641 *
1642 * @ingroup Ecore_Wl2_Subsurface_Group
1643 * @since 1.17
1644 */
1645EAPI void ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, int *x, int *y);
1646
1647/**
1648 * Place subsurface on layer above a reference surface
1649 *
1650 * Moves the @param subsurface to just above the reference @param
1651 * surface, changing the z-order. The reference @param surface must
1652 * be either a sibling or parent surface, else a protocol error will
1653 * be generated.
1654 *
1655 * @param subsurface the subsurface
1656 * @param surface the sibling reference surface
1657 *
1658 * @ingroup Ecore_Wl2_Subsurface_Group
1659 * @since 1.17
1660 */
1661EAPI void ecore_wl2_subsurface_place_above(Ecore_Wl2_Subsurface *subsurface, struct wl_surface *surface);
1662
1663/**
1664 * Place subsurface on layer below a reference surface
1665 *
1666 * See ecore_wl2_subsurface_place_above.
1667 *
1668 * @param subsurface the subsurface
1669 * @param surface the sibling reference surface
1670 *
1671 * @ingroup Ecore_Wl2_Subsurface_Group
1672 * @since 1.17
1673 */
1674EAPI void ecore_wl2_subsurface_place_below(Ecore_Wl2_Subsurface *subsurface, struct wl_surface *surface);
1675
1676/**
1677 * Enables or disables sub-surface synchronization
1678 *
1679 * When synchronization is enabled, surface commits on the subsurface
1680 * will be cached and only applied when the parent surface's state is
1681 * applied. This ensures atomic updates of the parent and all of its
1682 * synchronized sub-surfaces.
1683 *
1684 * When synchronization is disabled, commits will apply to the pending
1685 * state directly without caching, just like a normal wl_surface. If
1686 * there are already cached events when this is set, those events are
1687 * applied simultaneously with the desync event.
1688 *
1689 * Attempting to enable synchronization when the subsurface already
1690 * thinks it's sync'd, or desync when it believes its desync'd, will
1691 * be trivially ignored and will not generate a Wayland event.
1692 *
1693 * See Wayland's set_desync documentation for further details and
1694 * exceptional cases.
1695 *
1696 * @param subsurface the subsurface
1697 * @param sync true to enable synchronization, false to desynchronize
1698 *
1699 * @ingroup Ecore_Wl2_Subsurface_Group
1700 * @since 1.17
1701 */
1702EAPI void ecore_wl2_subsurface_sync_set(Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync);
1703
1704/**
1705 * Set an opaque region for the given subsurface.
1706 *
1707 * This is an optimization hint to the compositor to allow it avoid
1708 * redrawing content unnecessarily. Note that marking transparent
1709 * content as opaque will cause repaint artifacts.
1710 *
1711 * Use a 0x0 region size to unset the opaque region.
1712 *
1713 * @param subsurface the subsurface
1714 * @param x coordinate in the parent surface
1715 * @param y coordinate in the parent surface
1716 * @param w width to set as opaque
1717 * @param h height to set as opaque
1718 *
1719 * @ingroup Ecore_Wl2_Subsurface_Group
1720 * @since 1.17
1721 */
1722EAPI void ecore_wl2_subsurface_opaque_region_set(Ecore_Wl2_Subsurface *subsurface, int x, int y, int w, int h);
1723
1724/**
1725 * @defgroup Ecore_Wl2_Output_Group Wayland Library Output Functions 1567 * @defgroup Ecore_Wl2_Output_Group Wayland Library Output Functions
1726 * @ingroup Ecore_Wl2_Group 1568 * @ingroup Ecore_Wl2_Group
1727 * 1569 *
diff --git a/src/lib/ecore_wl2/ecore_wl2_internal.h b/src/lib/ecore_wl2/ecore_wl2_internal.h
index cbe1e13ef3..4edcec3cd4 100644
--- a/src/lib/ecore_wl2/ecore_wl2_internal.h
+++ b/src/lib/ecore_wl2/ecore_wl2_internal.h
@@ -348,6 +348,163 @@ EAPI Eina_Bool ecore_wl2_offer_supports_mime(Ecore_Wl2_Offer *offer, const char
348 */ 348 */
349EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer); 349EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer);
350 350
351/**
352 * @defgroup Ecore_Wl2_Subsurface_Group Functions to manipulate subsurfaces.
353 * @ingroup Ecore_Wl2_Group
354 *
355 * Functions to manipulate wayland subsurfaces, using Ecore_Wl2_Subsurface.
356 *
357 * This API is intended to expose Wayland subsurface functionality, although it
358 * should not be necessary for most applications to use it, as soon as we have
359 * means to make Evas automatically switch Evas images to use subsurfaces.
360 *
361 * It can/should be used, for instance, when subsurfaces are needed to be not
362 * in sync with the main window surface.
363 */
364
365/**
366 * Create and return a new subsurface.
367 *
368 * Create a new surface (and subsurface interface), with the parent surface
369 * being the one associated with the given @param win.
370 *
371 * The @param win must be visible, otherwise there will be no surface created
372 * for it yet.
373 *
374 * @return the allocated and initialized Ecore_Wl2_Subsurface object, or
375 * NULL on failure
376 *
377 * @ingroup Ecore_Wl2_Subsurface_Group
378 * @since 1.17
379 */
380EAPI Ecore_Wl2_Subsurface *ecore_wl2_subsurface_new(Ecore_Wl2_Window *window);
381
382/**
383 * Destroy the given subsurface, as well as the surface associated with it.
384 *
385 * @param subsurface the subsurface
386 *
387 * @ingroup Ecore_Wl2_Subsurface_Group
388 * @since 1.17
389 */
390EAPI void ecore_wl2_subsurface_del(Ecore_Wl2_Subsurface *subsurface);
391
392/**
393 * Get the wl_surface for this subsurface
394 *
395 * @param subsurface the subsurface
396 *
397 * @return the wl_surface associated with this subsurface, or NULL on failure
398 *
399 * @ingroup Ecore_Wl2_Subsurface_Group
400 * @since 1.17
401 */
402EAPI struct wl_surface *ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *subsurface);
403
404/**
405 * Set the position of this subsurface, relative to its parent surface.
406 * If subsurface is defined and the x, y coordinates differ from the currently
407 * tracked position, this also schedules a sub-surface position change.
408 *
409 * @param subsurface the subsurface
410 * @param x coordinate in the parent surface
411 * @param y coordinate in the parent surface
412 *
413 * @ingroup Ecore_Wl2_Subsurface_Group
414 * @since 1.17
415 */
416EAPI void ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface *subsurface, int x, int y);
417
418/**
419 * Get the position of this subsurface, relative to its parent surface.
420 * Coordinates will be returned in x and y if non-NULL.
421 *
422 * @param subsurface the subsurface
423 * @param x coordinate in the parent surface, or NULL to ignore
424 * @param y coordinate in the parent surface, or NULL to ignore
425 *
426 * @ingroup Ecore_Wl2_Subsurface_Group
427 * @since 1.17
428 */
429EAPI void ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, int *x, int *y);
430
431/**
432 * Place subsurface on layer above a reference surface
433 *
434 * Moves the @param subsurface to just above the reference @param
435 * surface, changing the z-order. The reference @param surface must
436 * be either a sibling or parent surface, else a protocol error will
437 * be generated.
438 *
439 * @param subsurface the subsurface
440 * @param surface the sibling reference surface
441 *
442 * @ingroup Ecore_Wl2_Subsurface_Group
443 * @since 1.17
444 */
445EAPI void ecore_wl2_subsurface_place_above(Ecore_Wl2_Subsurface *subsurface, struct wl_surface *surface);
446
447/**
448 * Place subsurface on layer below a reference surface
449 *
450 * See ecore_wl2_subsurface_place_above.
451 *
452 * @param subsurface the subsurface
453 * @param surface the sibling reference surface
454 *
455 * @ingroup Ecore_Wl2_Subsurface_Group
456 * @since 1.17
457 */
458EAPI void ecore_wl2_subsurface_place_below(Ecore_Wl2_Subsurface *subsurface, struct wl_surface *surface);
459
460/**
461 * Enables or disables sub-surface synchronization
462 *
463 * When synchronization is enabled, surface commits on the subsurface
464 * will be cached and only applied when the parent surface's state is
465 * applied. This ensures atomic updates of the parent and all of its
466 * synchronized sub-surfaces.
467 *
468 * When synchronization is disabled, commits will apply to the pending
469 * state directly without caching, just like a normal wl_surface. If
470 * there are already cached events when this is set, those events are
471 * applied simultaneously with the desync event.
472 *
473 * Attempting to enable synchronization when the subsurface already
474 * thinks it's sync'd, or desync when it believes its desync'd, will
475 * be trivially ignored and will not generate a Wayland event.
476 *
477 * See Wayland's set_desync documentation for further details and
478 * exceptional cases.
479 *
480 * @param subsurface the subsurface
481 * @param sync true to enable synchronization, false to desynchronize
482 *
483 * @ingroup Ecore_Wl2_Subsurface_Group
484 * @since 1.17
485 */
486EAPI void ecore_wl2_subsurface_sync_set(Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync);
487
488/**
489 * Set an opaque region for the given subsurface.
490 *
491 * This is an optimization hint to the compositor to allow it avoid
492 * redrawing content unnecessarily. Note that marking transparent
493 * content as opaque will cause repaint artifacts.
494 *
495 * Use a 0x0 region size to unset the opaque region.
496 *
497 * @param subsurface the subsurface
498 * @param x coordinate in the parent surface
499 * @param y coordinate in the parent surface
500 * @param w width to set as opaque
501 * @param h height to set as opaque
502 *
503 * @ingroup Ecore_Wl2_Subsurface_Group
504 * @since 1.17
505 */
506EAPI void ecore_wl2_subsurface_opaque_region_set(Ecore_Wl2_Subsurface *subsurface, int x, int y, int w, int h);
507
351# undef EAPI 508# undef EAPI
352# define EAPI 509# define EAPI
353 510