~ubuntu-branches/ubuntu/trusty/wayland/trusty

« back to all changes in this revision

Viewing changes to src/wayland-client-protocol.h

  • Committer: Package Import Robot
  • Author(s): Hector Oron, Timo Aaltonen, Hector Oron
  • Date: 2013-10-11 11:23:38 UTC
  • mfrom: (1.1.15) (0.4.2 sid)
  • Revision ID: package-import@ubuntu.com-20131011112338-2jg0z6ncpm9qnots
Tags: 1.3.0-1
[ Timo Aaltonen ]
* control: Bump the libwayland0 C/R to (<< 1.1.0) so that it covers
  the ubuntu version too, and add it to -cursor.

[ Hector Oron ]
* New upstream stable release (1.3.0).
* Add myself to Uploaders.
* Switch to Debian source format 3.0 quilt.
* d/libwayland-dev.install:
  - install wayland documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
         */
125
125
        void (*error)(void *data,
126
126
                      struct wl_display *wl_display,
127
 
                      struct wl_object *object_id,
 
127
                      void *object_id,
128
128
                      uint32_t code,
129
129
                      const char *message);
130
130
        /**
471
471
 * wl_shm_format - pixel formats
472
472
 * @WL_SHM_FORMAT_ARGB8888: 32-bit ARGB format
473
473
 * @WL_SHM_FORMAT_XRGB8888: 32-bit RGB format
 
474
 * @WL_SHM_FORMAT_C8: (none)
 
475
 * @WL_SHM_FORMAT_RGB332: (none)
 
476
 * @WL_SHM_FORMAT_BGR233: (none)
 
477
 * @WL_SHM_FORMAT_XRGB4444: (none)
 
478
 * @WL_SHM_FORMAT_XBGR4444: (none)
 
479
 * @WL_SHM_FORMAT_RGBX4444: (none)
 
480
 * @WL_SHM_FORMAT_BGRX4444: (none)
 
481
 * @WL_SHM_FORMAT_ARGB4444: (none)
 
482
 * @WL_SHM_FORMAT_ABGR4444: (none)
 
483
 * @WL_SHM_FORMAT_RGBA4444: (none)
 
484
 * @WL_SHM_FORMAT_BGRA4444: (none)
 
485
 * @WL_SHM_FORMAT_XRGB1555: (none)
 
486
 * @WL_SHM_FORMAT_XBGR1555: (none)
 
487
 * @WL_SHM_FORMAT_RGBX5551: (none)
 
488
 * @WL_SHM_FORMAT_BGRX5551: (none)
 
489
 * @WL_SHM_FORMAT_ARGB1555: (none)
 
490
 * @WL_SHM_FORMAT_ABGR1555: (none)
 
491
 * @WL_SHM_FORMAT_RGBA5551: (none)
 
492
 * @WL_SHM_FORMAT_BGRA5551: (none)
 
493
 * @WL_SHM_FORMAT_RGB565: (none)
 
494
 * @WL_SHM_FORMAT_BGR565: (none)
 
495
 * @WL_SHM_FORMAT_RGB888: (none)
 
496
 * @WL_SHM_FORMAT_BGR888: (none)
 
497
 * @WL_SHM_FORMAT_XBGR8888: (none)
 
498
 * @WL_SHM_FORMAT_RGBX8888: (none)
 
499
 * @WL_SHM_FORMAT_BGRX8888: (none)
 
500
 * @WL_SHM_FORMAT_ABGR8888: (none)
 
501
 * @WL_SHM_FORMAT_RGBA8888: (none)
 
502
 * @WL_SHM_FORMAT_BGRA8888: (none)
 
503
 * @WL_SHM_FORMAT_XRGB2101010: (none)
 
504
 * @WL_SHM_FORMAT_XBGR2101010: (none)
 
505
 * @WL_SHM_FORMAT_RGBX1010102: (none)
 
506
 * @WL_SHM_FORMAT_BGRX1010102: (none)
 
507
 * @WL_SHM_FORMAT_ARGB2101010: (none)
 
508
 * @WL_SHM_FORMAT_ABGR2101010: (none)
 
509
 * @WL_SHM_FORMAT_RGBA1010102: (none)
 
510
 * @WL_SHM_FORMAT_BGRA1010102: (none)
 
511
 * @WL_SHM_FORMAT_YUYV: (none)
 
512
 * @WL_SHM_FORMAT_YVYU: (none)
 
513
 * @WL_SHM_FORMAT_UYVY: (none)
 
514
 * @WL_SHM_FORMAT_VYUY: (none)
 
515
 * @WL_SHM_FORMAT_AYUV: (none)
 
516
 * @WL_SHM_FORMAT_NV12: (none)
 
517
 * @WL_SHM_FORMAT_NV21: (none)
 
518
 * @WL_SHM_FORMAT_NV16: (none)
 
519
 * @WL_SHM_FORMAT_NV61: (none)
 
520
 * @WL_SHM_FORMAT_YUV410: (none)
 
521
 * @WL_SHM_FORMAT_YVU410: (none)
 
522
 * @WL_SHM_FORMAT_YUV411: (none)
 
523
 * @WL_SHM_FORMAT_YVU411: (none)
 
524
 * @WL_SHM_FORMAT_YUV420: (none)
 
525
 * @WL_SHM_FORMAT_YVU420: (none)
 
526
 * @WL_SHM_FORMAT_YUV422: (none)
 
527
 * @WL_SHM_FORMAT_YVU422: (none)
 
528
 * @WL_SHM_FORMAT_YUV444: (none)
 
529
 * @WL_SHM_FORMAT_YVU444: (none)
474
530
 *
475
531
 * This describes the memory layout of an individual pixel.
 
532
 *
 
533
 * All renderers should support argb8888 and xrgb8888 but any other formats
 
534
 * are optional and may not be supported by the particular renderer in use.
476
535
 */
477
536
enum wl_shm_format {
478
537
        WL_SHM_FORMAT_ARGB8888 = 0,
479
538
        WL_SHM_FORMAT_XRGB8888 = 1,
 
539
        WL_SHM_FORMAT_C8 = 0x20203843,
 
540
        WL_SHM_FORMAT_RGB332 = 0x38424752,
 
541
        WL_SHM_FORMAT_BGR233 = 0x38524742,
 
542
        WL_SHM_FORMAT_XRGB4444 = 0x32315258,
 
543
        WL_SHM_FORMAT_XBGR4444 = 0x32314258,
 
544
        WL_SHM_FORMAT_RGBX4444 = 0x32315852,
 
545
        WL_SHM_FORMAT_BGRX4444 = 0x32315842,
 
546
        WL_SHM_FORMAT_ARGB4444 = 0x32315241,
 
547
        WL_SHM_FORMAT_ABGR4444 = 0x32314241,
 
548
        WL_SHM_FORMAT_RGBA4444 = 0x32314152,
 
549
        WL_SHM_FORMAT_BGRA4444 = 0x32314142,
 
550
        WL_SHM_FORMAT_XRGB1555 = 0x35315258,
 
551
        WL_SHM_FORMAT_XBGR1555 = 0x35314258,
 
552
        WL_SHM_FORMAT_RGBX5551 = 0x35315852,
 
553
        WL_SHM_FORMAT_BGRX5551 = 0x35315842,
 
554
        WL_SHM_FORMAT_ARGB1555 = 0x35315241,
 
555
        WL_SHM_FORMAT_ABGR1555 = 0x35314241,
 
556
        WL_SHM_FORMAT_RGBA5551 = 0x35314152,
 
557
        WL_SHM_FORMAT_BGRA5551 = 0x35314142,
 
558
        WL_SHM_FORMAT_RGB565 = 0x36314752,
 
559
        WL_SHM_FORMAT_BGR565 = 0x36314742,
 
560
        WL_SHM_FORMAT_RGB888 = 0x34324752,
 
561
        WL_SHM_FORMAT_BGR888 = 0x34324742,
 
562
        WL_SHM_FORMAT_XBGR8888 = 0x34324258,
 
563
        WL_SHM_FORMAT_RGBX8888 = 0x34325852,
 
564
        WL_SHM_FORMAT_BGRX8888 = 0x34325842,
 
565
        WL_SHM_FORMAT_ABGR8888 = 0x34324241,
 
566
        WL_SHM_FORMAT_RGBA8888 = 0x34324152,
 
567
        WL_SHM_FORMAT_BGRA8888 = 0x34324142,
 
568
        WL_SHM_FORMAT_XRGB2101010 = 0x30335258,
 
569
        WL_SHM_FORMAT_XBGR2101010 = 0x30334258,
 
570
        WL_SHM_FORMAT_RGBX1010102 = 0x30335852,
 
571
        WL_SHM_FORMAT_BGRX1010102 = 0x30335842,
 
572
        WL_SHM_FORMAT_ARGB2101010 = 0x30335241,
 
573
        WL_SHM_FORMAT_ABGR2101010 = 0x30334241,
 
574
        WL_SHM_FORMAT_RGBA1010102 = 0x30334152,
 
575
        WL_SHM_FORMAT_BGRA1010102 = 0x30334142,
 
576
        WL_SHM_FORMAT_YUYV = 0x56595559,
 
577
        WL_SHM_FORMAT_YVYU = 0x55595659,
 
578
        WL_SHM_FORMAT_UYVY = 0x59565955,
 
579
        WL_SHM_FORMAT_VYUY = 0x59555956,
 
580
        WL_SHM_FORMAT_AYUV = 0x56555941,
 
581
        WL_SHM_FORMAT_NV12 = 0x3231564e,
 
582
        WL_SHM_FORMAT_NV21 = 0x3132564e,
 
583
        WL_SHM_FORMAT_NV16 = 0x3631564e,
 
584
        WL_SHM_FORMAT_NV61 = 0x3136564e,
 
585
        WL_SHM_FORMAT_YUV410 = 0x39565559,
 
586
        WL_SHM_FORMAT_YVU410 = 0x39555659,
 
587
        WL_SHM_FORMAT_YUV411 = 0x31315559,
 
588
        WL_SHM_FORMAT_YVU411 = 0x31315659,
 
589
        WL_SHM_FORMAT_YUV420 = 0x32315559,
 
590
        WL_SHM_FORMAT_YVU420 = 0x32315659,
 
591
        WL_SHM_FORMAT_YUV422 = 0x36315559,
 
592
        WL_SHM_FORMAT_YVU422 = 0x36315659,
 
593
        WL_SHM_FORMAT_YUV444 = 0x34325559,
 
594
        WL_SHM_FORMAT_YVU444 = 0x34325659,
480
595
};
481
596
#endif /* WL_SHM_FORMAT_ENUM */
482
597
 
808
923
         *
809
924
         * This event is sent when an active drag-and-drop pointer enters
810
925
         * a surface owned by the client. The position of the pointer at
811
 
         * enter time is provided by the x an y arguments, in surface local
812
 
         * coordinates.
 
926
         * enter time is provided by the x and y arguments, in surface
 
927
         * local coordinates.
813
928
         */
814
929
        void (*enter)(void *data,
815
930
                      struct wl_data_device *wl_data_device,
835
950
         *
836
951
         * This event is sent when the drag-and-drop pointer moves within
837
952
         * the currently focused surface. The new position of the pointer
838
 
         * is provided by the x an y arguments, in surface local
 
953
         * is provided by the x and y arguments, in surface local
839
954
         * coordinates.
840
955
         */
841
956
        void (*motion)(void *data,
1059
1174
 * @WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER: switch output mode to the
1060
1175
 *      smallest mode that can fit the surface, add black borders to compensate
1061
1176
 *      size mismatch
1062
 
 * @WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL: no scaling, center on output
1063
 
 *      and add black borders to compensate size mismatch
 
1177
 * @WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL: no upscaling, center on
 
1178
 *      output and add black borders to compensate size mismatch
1064
1179
 *
1065
1180
 * Hints to indicate to the compositor how to deal with a conflict
1066
1181
 * between the dimensions of the surface and the dimensions of the output.
1123
1238
         *
1124
1239
         * The client is free to dismiss all but the last configure event
1125
1240
         * it received.
 
1241
         *
 
1242
         * The width and height arguments specify the size of the window in
 
1243
         * surface local coordinates.
1126
1244
         */
1127
1245
        void (*configure)(void *data,
1128
1246
                          struct wl_shell_surface *wl_shell_surface,
1133
1251
         * popup_done - popup interaction is done
1134
1252
         *
1135
1253
         * The popup_done event is sent out when a popup grab is broken,
1136
 
         * that is, when the users clicks a surface that doesn't belong to
 
1254
         * that is, when the user clicks a surface that doesn't belong to
1137
1255
         * the client owning the popup surface.
1138
1256
         */
1139
1257
        void (*popup_done)(void *data,
1255
1373
 * A surface is a rectangular area that is displayed on the screen. It
1256
1374
 * has a location, size and pixel contents.
1257
1375
 *
 
1376
 * The size of a surface (and relative positions on it) is described in
 
1377
 * surface local coordinates, which may differ from the buffer local
 
1378
 * coordinates of the pixel content, in case a buffer_transform or a
 
1379
 * buffer_scale is used.
 
1380
 *
1258
1381
 * Surfaces are also used for some special purposes, e.g. as cursor images
1259
1382
 * for pointers, drag icons, etc.
1260
1383
 */
1302
1425
#define WL_SURFACE_SET_INPUT_REGION     5
1303
1426
#define WL_SURFACE_COMMIT       6
1304
1427
#define WL_SURFACE_SET_BUFFER_TRANSFORM 7
 
1428
#define WL_SURFACE_SET_BUFFER_SCALE     8
1305
1429
 
1306
1430
static inline void
1307
1431
wl_surface_set_user_data(struct wl_surface *wl_surface, void *user_data)
1382
1506
                         WL_SURFACE_SET_BUFFER_TRANSFORM, transform);
1383
1507
}
1384
1508
 
 
1509
static inline void
 
1510
wl_surface_set_buffer_scale(struct wl_surface *wl_surface, int32_t scale)
 
1511
{
 
1512
        wl_proxy_marshal((struct wl_proxy *) wl_surface,
 
1513
                         WL_SURFACE_SET_BUFFER_SCALE, scale);
 
1514
}
 
1515
 
1385
1516
#ifndef WL_SEAT_CAPABILITY_ENUM
1386
1517
#define WL_SEAT_CAPABILITY_ENUM
1387
1518
/**
1403
1534
/**
1404
1535
 * wl_seat - group of input devices
1405
1536
 * @capabilities: seat capabilities changed
 
1537
 * @name: unique identifier for this seat
1406
1538
 *
1407
1539
 * A seat is a group of keyboards, pointer and touch devices. This object
1408
1540
 * is published as a global during start up, or when such a device is hot
1421
1553
        void (*capabilities)(void *data,
1422
1554
                             struct wl_seat *wl_seat,
1423
1555
                             uint32_t capabilities);
 
1556
        /**
 
1557
         * name - unique identifier for this seat
 
1558
         * @name: (none)
 
1559
         *
 
1560
         * In a multiseat configuration this can be used by the client to
 
1561
         * help identify which physical devices the seat represents. Based
 
1562
         * on the seat configuration used by the compositor.
 
1563
         * @since: 2
 
1564
         */
 
1565
        void (*name)(void *data,
 
1566
                     struct wl_seat *wl_seat,
 
1567
                     const char *name);
1424
1568
};
1425
1569
 
1426
1570
static inline int
1561
1705
         * When an seat's focus enters a surface, the pointer image is
1562
1706
         * undefined and a client should respond to this event by setting
1563
1707
         * an appropriate pointer image with the set_cursor request.
 
1708
         * @since: 3
1564
1709
         */
1565
1710
        void (*enter)(void *data,
1566
1711
                      struct wl_pointer *wl_pointer,
1578
1723
         *
1579
1724
         * The leave notification is sent before the enter notification for
1580
1725
         * the new focus.
 
1726
         * @since: 3
1581
1727
         */
1582
1728
        void (*leave)(void *data,
1583
1729
                      struct wl_pointer *wl_pointer,
1592
1738
         * Notification of pointer location change. The arguments
1593
1739
         * surface_x and surface_y are the location relative to the focused
1594
1740
         * surface.
 
1741
         * @since: 3
1595
1742
         */
1596
1743
        void (*motion)(void *data,
1597
1744
                       struct wl_pointer *wl_pointer,
1610
1757
         * The location of the click is given by the last motion or enter
1611
1758
         * event. The time argument is a timestamp with millisecond
1612
1759
         * granularity, with an undefined base.
 
1760
         * @since: 3
1613
1761
         */
1614
1762
        void (*button)(void *data,
1615
1763
                       struct wl_pointer *wl_pointer,
1639
1787
         *
1640
1788
         * When applicable, clients can transform its view relative to the
1641
1789
         * scroll distance.
 
1790
         * @since: 3
1642
1791
         */
1643
1792
        void (*axis)(void *data,
1644
1793
                     struct wl_pointer *wl_pointer,
1656
1805
}
1657
1806
 
1658
1807
#define WL_POINTER_SET_CURSOR   0
 
1808
#define WL_POINTER_RELEASE      1
1659
1809
 
1660
1810
static inline void
1661
1811
wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data)
1676
1826
}
1677
1827
 
1678
1828
static inline void
1679
 
wl_pointer_set_cursor(struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t hotspot_x, wl_fixed_t hotspot_y)
 
1829
wl_pointer_set_cursor(struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, int32_t hotspot_x, int32_t hotspot_y)
1680
1830
{
1681
1831
        wl_proxy_marshal((struct wl_proxy *) wl_pointer,
1682
1832
                         WL_POINTER_SET_CURSOR, serial, surface, hotspot_x, hotspot_y);
1683
1833
}
1684
1834
 
 
1835
static inline void
 
1836
wl_pointer_release(struct wl_pointer *wl_pointer)
 
1837
{
 
1838
        wl_proxy_marshal((struct wl_proxy *) wl_pointer,
 
1839
                         WL_POINTER_RELEASE);
 
1840
 
 
1841
        wl_proxy_destroy((struct wl_proxy *) wl_pointer);
 
1842
}
 
1843
 
1685
1844
#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM
1686
1845
#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM
1687
1846
/**
1688
1847
 * wl_keyboard_keymap_format - keyboard mapping format
 
1848
 * @WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP: no keymap; client must
 
1849
 *      understand how to interpret the raw keycode
1689
1850
 * @WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1: libxkbcommon compatible
1690
1851
 *
1691
1852
 * This specifies the format of the keymap provided to the client with
1692
1853
 * the wl_keyboard.keymap event.
1693
1854
 */
1694
1855
enum wl_keyboard_keymap_format {
 
1856
        WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0,
1695
1857
        WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1,
1696
1858
};
1697
1859
#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */
1731
1893
         *
1732
1894
         * This event provides a file descriptor to the client which can
1733
1895
         * be memory-mapped to provide a keyboard mapping description.
 
1896
         * @since: 3
1734
1897
         */
1735
1898
        void (*keymap)(void *data,
1736
1899
                       struct wl_keyboard *wl_keyboard,
1745
1908
         *
1746
1909
         * Notification that this seat's keyboard focus is on a certain
1747
1910
         * surface.
 
1911
         * @since: 3
1748
1912
         */
1749
1913
        void (*enter)(void *data,
1750
1914
                      struct wl_keyboard *wl_keyboard,
1761
1925
         *
1762
1926
         * The leave notification is sent before the enter notification for
1763
1927
         * the new focus.
 
1928
         * @since: 3
1764
1929
         */
1765
1930
        void (*leave)(void *data,
1766
1931
                      struct wl_keyboard *wl_keyboard,
1775
1940
         *
1776
1941
         * A key was pressed or released. The time argument is a
1777
1942
         * timestamp with millisecond granularity, with an undefined base.
 
1943
         * @since: 3
1778
1944
         */
1779
1945
        void (*key)(void *data,
1780
1946
                    struct wl_keyboard *wl_keyboard,
1792
1958
         *
1793
1959
         * Notifies clients that the modifier and/or group state has
1794
1960
         * changed, and it should update its local state.
 
1961
         * @since: 3
1795
1962
         */
1796
1963
        void (*modifiers)(void *data,
1797
1964
                          struct wl_keyboard *wl_keyboard,
1810
1977
                                     (void (**)(void)) listener, data);
1811
1978
}
1812
1979
 
 
1980
#define WL_KEYBOARD_RELEASE     0
 
1981
 
1813
1982
static inline void
1814
1983
wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard, void *user_data)
1815
1984
{
1828
1997
        wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
1829
1998
}
1830
1999
 
 
2000
static inline void
 
2001
wl_keyboard_release(struct wl_keyboard *wl_keyboard)
 
2002
{
 
2003
        wl_proxy_marshal((struct wl_proxy *) wl_keyboard,
 
2004
                         WL_KEYBOARD_RELEASE);
 
2005
 
 
2006
        wl_proxy_destroy((struct wl_proxy *) wl_keyboard);
 
2007
}
 
2008
 
1831
2009
/**
1832
2010
 * wl_touch - touchscreen input device
1833
2011
 * @down: touch down event and beginning of a touch sequence
1859
2037
         * point is assigned a unique @id. Future events from this
1860
2038
         * touchpoint reference this ID. The ID ceases to be valid after a
1861
2039
         * touch up event and may be re-used in the future.
 
2040
         * @since: 3
1862
2041
         */
1863
2042
        void (*down)(void *data,
1864
2043
                     struct wl_touch *wl_touch,
1877
2056
         * The touch point has disappeared. No further events will be
1878
2057
         * sent for this touchpoint and the touch point's ID is released
1879
2058
         * and may be re-used in a future touch down event.
 
2059
         * @since: 3
1880
2060
         */
1881
2061
        void (*up)(void *data,
1882
2062
                   struct wl_touch *wl_touch,
1891
2071
         * @y: y coordinate in surface-relative coordinates
1892
2072
         *
1893
2073
         * A touchpoint has changed coordinates.
 
2074
         * @since: 3
1894
2075
         */
1895
2076
        void (*motion)(void *data,
1896
2077
                       struct wl_touch *wl_touch,
1902
2083
         * frame - end of touch frame event
1903
2084
         *
1904
2085
         * Indicates the end of a contact point list.
 
2086
         * @since: 3
1905
2087
         */
1906
2088
        void (*frame)(void *data,
1907
2089
                      struct wl_touch *wl_touch);
1914
2096
         * points currently active on this client's surface. The client is
1915
2097
         * responsible for finalizing the touch points, future touch points
1916
2098
         * on this surface may re-use the touch point ID.
 
2099
         * @since: 3
1917
2100
         */
1918
2101
        void (*cancel)(void *data,
1919
2102
                       struct wl_touch *wl_touch);
1927
2110
                                     (void (**)(void)) listener, data);
1928
2111
}
1929
2112
 
 
2113
#define WL_TOUCH_RELEASE        0
 
2114
 
1930
2115
static inline void
1931
2116
wl_touch_set_user_data(struct wl_touch *wl_touch, void *user_data)
1932
2117
{
1945
2130
        wl_proxy_destroy((struct wl_proxy *) wl_touch);
1946
2131
}
1947
2132
 
 
2133
static inline void
 
2134
wl_touch_release(struct wl_touch *wl_touch)
 
2135
{
 
2136
        wl_proxy_marshal((struct wl_proxy *) wl_touch,
 
2137
                         WL_TOUCH_RELEASE);
 
2138
 
 
2139
        wl_proxy_destroy((struct wl_proxy *) wl_touch);
 
2140
}
 
2141
 
1948
2142
#ifndef WL_OUTPUT_SUBPIXEL_ENUM
1949
2143
#define WL_OUTPUT_SUBPIXEL_ENUM
1950
2144
/**
2024
2218
 * wl_output - compositor output region
2025
2219
 * @geometry: properties of the output
2026
2220
 * @mode: advertise available modes for the output
 
2221
 * @done: sent all information about output
 
2222
 * @scale: output scaling properties
2027
2223
 *
2028
2224
 * An output describes part of the compositor geometry. The compositor
2029
2225
 * works in the 'compositor coordinate system' and an output corresponds to
2061
2257
        /**
2062
2258
         * mode - advertise available modes for the output
2063
2259
         * @flags: bitfield of mode flags
2064
 
         * @width: width of the mode in pixels
2065
 
         * @height: height of the mode in pixels
 
2260
         * @width: width of the mode in hardware units
 
2261
         * @height: height of the mode in hardware units
2066
2262
         * @refresh: vertical refresh rate in mHz
2067
2263
         *
2068
2264
         * The mode event describes an available mode for the output.
2072
2268
         * again if an output changes mode, for the mode that is now
2073
2269
         * current. In other words, the current mode is always the last
2074
2270
         * mode that was received with the current flag set.
 
2271
         *
 
2272
         * The size of a mode is given in physical hardware units of the
 
2273
         * output device. This is not necessarily the same as the output
 
2274
         * size in the global compositor space. For instance, the output
 
2275
         * may be scaled, as described in wl_output.scale, or transformed ,
 
2276
         * as described in wl_output.transform.
2075
2277
         */
2076
2278
        void (*mode)(void *data,
2077
2279
                     struct wl_output *wl_output,
2079
2281
                     int32_t width,
2080
2282
                     int32_t height,
2081
2283
                     int32_t refresh);
 
2284
        /**
 
2285
         * done - sent all information about output
 
2286
         *
 
2287
         * This event is sent after all other properties has been sent
 
2288
         * after binding to the output object and after any other property
 
2289
         * changes done after that. This allows changes to the output
 
2290
         * properties to be seen as atomic, even if they happen via
 
2291
         * multiple events.
 
2292
         * @since: 2
 
2293
         */
 
2294
        void (*done)(void *data,
 
2295
                     struct wl_output *wl_output);
 
2296
        /**
 
2297
         * scale - output scaling properties
 
2298
         * @factor: scaling factor of output
 
2299
         *
 
2300
         * This event contains scaling geometry information that is not
 
2301
         * in the geometry event. It may be sent after binding the output
 
2302
         * object or if the output scale changes later. If it is not sent,
 
2303
         * the client should assume a scale of 1.
 
2304
         *
 
2305
         * A scale larger than 1 means that the compositor will
 
2306
         * automatically scale surface buffers by this amount when
 
2307
         * rendering. This is used for very high resolution displays where
 
2308
         * applications rendering at the native resolution would be too
 
2309
         * small to be legible.
 
2310
         *
 
2311
         * It is intended that scaling aware clients track the current
 
2312
         * output of a surface, and if it is on a scaled output it should
 
2313
         * use wl_surface.set_buffer_scale with the scale of the output.
 
2314
         * That way the compositor can avoid scaling the surface, and the
 
2315
         * client can supply a higher detail image.
 
2316
         * @since: 2
 
2317
         */
 
2318
        void (*scale)(void *data,
 
2319
                      struct wl_output *wl_output,
 
2320
                      int32_t factor);
2082
2321
};
2083
2322
 
2084
2323
static inline int