summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/Ecore_Wl2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_wl2/Ecore_Wl2.h')
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h165
1 files changed, 104 insertions, 61 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index b706b4c..0631a5f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -714,6 +714,47 @@ EAPI Eina_Bool ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display);
714EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display); 714EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display);
715 715
716/** 716/**
717 * Finds an Ecore_Wl2_Window based on wl_surface
718 *
719 * @param display The display to search for the window
720 * @param surface The wl_surface of the window to find
721 *
722 * @return The Ecore_Wl2_Window if found, or NULL if no such window exists
723 *
724 * @ingroup Ecore_Wl2_Display_Group
725 * @since 1.24
726 */
727EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface);
728
729/**
730 * Gets the connected display object
731 *
732 * @brief This function is typically used by clients to get an
733 * ​existing Wayland display.
734 *
735 * ​@param name The display target name. If @c NULL, the default
736 * display is assumed.
737 *
738 * ​@return The Ecore_Wl2_Display which was connected to
739 *
740 * ​@ingroup Ecore_Wl2_Display_Group
741 * ​@since 1.24
742 */
743EAPI Ecore_Wl2_Display *ecore_wl2_connected_display_get(const char *name);
744
745/**
746 * Gets the wl_compositor which belongs to this display
747 *
748 * @param display The Ecore_Wl2_Display to get the compositor of
749 *
750 * @return The wl_compositor associated with this display
751 *
752 * @ingroup Ecore_Wl2_Display_Group
753 * @since 1.24
754 */
755EAPI struct wl_compositor *ecore_wl2_display_compositor_get(Ecore_Wl2_Display *display);
756
757/**
717 * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions 758 * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions
718 * @ingroup Ecore_Wl2_Group 759 * @ingroup Ecore_Wl2_Group
719 * 760 *
@@ -780,6 +821,13 @@ EAPI int ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window);
780EAPI void ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int aspect); 821EAPI void ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int aspect);
781 822
782/** 823/**
824 * @see evas_object_size_hint_aspect_get
825 * @ingroup Ecore_Wl2_Window_Group
826 * @since 1.24
827 */
828EAPI void ecore_wl2_window_aspect_get(Ecore_Wl2_Window *window, int *w, int *h, unsigned int *aspect);
829
830/**
783 * Show a given Ecore_Wl2_Window 831 * Show a given Ecore_Wl2_Window
784 * 832 *
785 * @param window The Ecore_Wl2_Window to show 833 * @param window The Ecore_Wl2_Window to show
@@ -968,6 +1016,18 @@ EAPI void ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation);
968EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title); 1016EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title);
969 1017
970/** 1018/**
1019 * Get the title of a given window
1020 *
1021 * @param window The window to set the title of
1022 *
1023 * @return A string if found, or NULL otherwise
1024 *
1025 * @ingroup Ecore_Wl2_Window_Group
1026 * @since 1.24
1027 */
1028EAPI const char *ecore_wl2_window_title_get(Ecore_Wl2_Window *window);
1029
1030/**
971 * Set the class of a given window 1031 * Set the class of a given window
972 * 1032 *
973 * @param window The window to set the class of 1033 * @param window The window to set the class of
@@ -978,6 +1038,19 @@ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title
978 */ 1038 */
979EAPI void ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas); 1039EAPI void ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas);
980 1040
1041
1042/**
1043 * Get the class of a given window
1044 *
1045 * @param window The window to set the class of
1046 *
1047 * @return A string if found, or NULL otherwise
1048 *
1049 * @ingroup Ecore_Wl2_Window_Group
1050 * @since 1.24
1051 */
1052EAPI const char *ecore_wl2_window_class_get(Ecore_Wl2_Window *window);
1053
981/** 1054/**
982 * Get the geometry of a given window 1055 * Get the geometry of a given window
983 * 1056 *
@@ -1037,27 +1110,26 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool ico
1037EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, Ecore_Wl2_Window_Type type); 1110EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, Ecore_Wl2_Window_Type type);
1038 1111
1039/** 1112/**
1040 * Find the output that a given window is on 1113 * Get the type of a given window
1041 * 1114 *
1042 * @param window The window to find the output for 1115 * @see Ecore_Wl2_Window_Type
1043 *
1044 * @return An Ecore_Wl2_Output if found, or NULL otherwise
1045 * 1116 *
1046 * @ingroup Ecore_Wl2_Window_Group 1117 * @ingroup Ecore_Wl2_Window_Group
1047 * @since 1.20 1118 * @since 1.24
1048 */ 1119 */
1049EAPI Ecore_Wl2_Output *ecore_wl2_window_output_find(Ecore_Wl2_Window *window); 1120EAPI Ecore_Wl2_Window_Type ecore_wl2_window_type_get(Ecore_Wl2_Window *window);
1050 1121
1051/** 1122/**
1052 * Set a buffer transform on a given window 1123 * Find the output that a given window is on
1124 *
1125 * @param window The window to find the output for
1053 * 1126 *
1054 * @param window The window on which to set the buffer transform 1127 * @return An Ecore_Wl2_Output if found, or NULL otherwise
1055 * @param transform The buffer transform being requested
1056 * 1128 *
1057 * @ingroup Ecore_Wl2_Window_Group 1129 * @ingroup Ecore_Wl2_Window_Group
1058 * @since 1.20 1130 * @since 1.20
1059 */ 1131 */
1060EAPI void ecore_wl2_window_buffer_transform_set(Ecore_Wl2_Window *window, int transform); 1132EAPI Ecore_Wl2_Output *ecore_wl2_window_output_find(Ecore_Wl2_Window *window);
1061 1133
1062/** 1134/**
1063 * Set if window rotation is supported by the window manager 1135 * Set if window rotation is supported by the window manager
@@ -1287,6 +1359,18 @@ EAPI Eina_Bool ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window);
1287EAPI void ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role); 1359EAPI void ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role);
1288 1360
1289/** 1361/**
1362 * Get the role of a given window
1363 *
1364 * @param window The window to set the class role
1365 *
1366 * @return A string if found, or NULL otherwise
1367 *
1368 * @ingroup Ecore_Wl2_Window_Group
1369 * @since 1.24
1370 */
1371EAPI const char *ecore_wl2_window_role_get(Ecore_Wl2_Window *window);
1372
1373/**
1290 * Set if a given window is in floating mode 1374 * Set if a given window is in floating mode
1291 * 1375 *
1292 * @param window The window to set floating mode on 1376 * @param window The window to set floating mode on
@@ -1310,6 +1394,16 @@ EAPI void ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, Eina_Bool
1310EAPI Eina_Bool ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window); 1394EAPI Eina_Bool ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window);
1311 1395
1312/** 1396/**
1397 * Finds a window by surface
1398 *
1399 * @param surface The surface to find the window of
1400 *
1401 * @ingroup Ecore_Wl2_Window_Group
1402 * @since 1.24
1403 */
1404EAPI Ecore_Wl2_Window *ecore_wl2_window_surface_find(struct wl_surface *surface);
1405
1406/**
1313 * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions 1407 * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
1314 * @ingroup Ecore_Wl2_Group 1408 * @ingroup Ecore_Wl2_Group
1315 * 1409 *
@@ -1945,24 +2039,6 @@ EAPI Ecore_Wl2_Frame_Cb_Handle *ecore_wl2_window_frame_callback_add(Ecore_Wl2_Wi
1945EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle); 2039EAPI void ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle);
1946 2040
1947/** 2041/**
1948 * Attach a buffer to a window
1949 *
1950 * Note that the GL stack my attach buffers to a surface - we should call this
1951 * function at that time (with a NULL buffer) to track whether a surface
1952 * has a valid buffer. That is, call with implicit true and buffer NULL at
1953 * the time of glSwapBuffers.
1954 *
1955 * @param window The target window
1956 * @param buffer The buffer to attach
1957 * @param x X offset from corner
1958 * @param y Y offset from corner
1959 * @param implicit True if an external library is doing the actual attaching
1960 *
1961 * @since 1.21
1962 */
1963EAPI void ecore_wl2_window_buffer_attach(Ecore_Wl2_Window *win, void *buffer, int x, int y, Eina_Bool implicit);
1964
1965/**
1966 * Push buffered wayland protocol to compositor 2042 * Push buffered wayland protocol to compositor
1967 * 2043 *
1968 * Wayland protocol is only actually sent when a flush occurs, 2044 * Wayland protocol is only actually sent when a flush occurs,
@@ -2003,39 +2079,6 @@ EAPI Eina_Bool ecore_wl2_window_resizing_get(Ecore_Wl2_Window *window);
2003 */ 2079 */
2004EAPI void ecore_wl2_window_update_begin(Ecore_Wl2_Window *window); 2080EAPI void ecore_wl2_window_update_begin(Ecore_Wl2_Window *window);
2005 2081
2006/* TODO: doxygen if we are keeping any of the below functions public */
2007EAPI void ecore_wl2_window_damage(Ecore_Wl2_Window *window, Eina_Rectangle *rects, unsigned int count);
2008
2009EAPI Eina_Bool ecore_wl2_buffer_init(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer_Type types);
2010EAPI Ecore_Wl2_Buffer *ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha);
2011EAPI void ecore_wl2_buffer_destroy(Ecore_Wl2_Buffer *b);
2012EAPI struct wl_buffer *ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Buffer *buf);
2013EAPI void *ecore_wl2_buffer_map(Ecore_Wl2_Buffer *buf, int *w, int *h, int *stride);
2014EAPI void ecore_wl2_buffer_unmap(Ecore_Wl2_Buffer *buf);
2015EAPI void ecore_wl2_buffer_discard(Ecore_Wl2_Buffer *buf);
2016EAPI void ecore_wl2_buffer_lock(Ecore_Wl2_Buffer *b);
2017EAPI void ecore_wl2_buffer_unlock(Ecore_Wl2_Buffer *b);
2018EAPI void ecore_wl2_buffer_destroy(Ecore_Wl2_Buffer *b);
2019EAPI Eina_Bool ecore_wl2_buffer_busy_get(Ecore_Wl2_Buffer *buffer);
2020EAPI void ecore_wl2_buffer_busy_set(Ecore_Wl2_Buffer *buffer);
2021EAPI int ecore_wl2_buffer_age_get(Ecore_Wl2_Buffer *buffer);
2022EAPI void ecore_wl2_buffer_age_set(Ecore_Wl2_Buffer *buffer, int age);
2023EAPI void ecore_wl2_buffer_age_inc(Ecore_Wl2_Buffer *buffer);
2024
2025EAPI Ecore_Wl2_Surface *ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha);
2026EAPI void ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface);
2027EAPI void ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, uint32_t flags, Eina_Bool alpha);
2028EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h);
2029EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface);
2030EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count);
2031EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface, Eina_Bool purge);
2032EAPI void ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window, Eina_Bool purge);
2033EAPI Ecore_Wl2_Buffer *ecore_wl2_surface_buffer_create(Ecore_Wl2_Surface *surface);
2034EAPI int ecore_wl2_surface_manager_add(Ecore_Wl2_Surface_Interface *intf);
2035EAPI void ecore_wl2_surface_manager_del(Ecore_Wl2_Surface_Interface *intf);
2036EAPI Ecore_Wl2_Window *ecore_wl2_surface_window_get(Ecore_Wl2_Surface *surface);
2037EAPI Eina_Bool ecore_wl2_surface_alpha_get(Ecore_Wl2_Surface *surface);
2038
2039# endif 2082# endif
2040 2083
2041# undef EAPI 2084# undef EAPI