Export API to C++, add wl_registry and global accessors
Add #ifdef __cpluscplus to Ecore_Wayland.h so the API can be used by C++ programs. Add accessors for the wl_registry and the globals list. Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com> Patch by: "U. Artie Eoff" <ullysses.a.eoff@intel.com> SVN revision: 83642
This commit is contained in:
parent
0f3d5509bc
commit
a2197ce503
|
@ -1,3 +1,10 @@
|
|||
2013-02-04 U. Artie Eoff (uartie)
|
||||
|
||||
* ecore_wayland: Add #ifdef __cplusplus to Ecore_Wayland.h so the
|
||||
API can be used by C++ programs.
|
||||
* ecore_wayland: Add ecore_wl_registry_get
|
||||
* ecore_wayland: Add ecore_wl_globals_get
|
||||
|
||||
2013-02-04 Raphael Kubo da Costa <<raphael.kubo.da.costa@intel.com>
|
||||
|
||||
* evas: Stop initializing and shutting Fontconfig down
|
||||
|
|
7
NEWS
7
NEWS
|
@ -28,6 +28,13 @@ Additions:
|
|||
ecore_x_e_window_profile_change_send()
|
||||
ecore_x_e_window_profile_change_request_send()
|
||||
ecore_x_e_window_profile_change_done_send()
|
||||
* ecore_wayland:
|
||||
- Store global wayland interfaces in a globals list so wayland programs
|
||||
can bind to other non-standard wayland protocol extensions.
|
||||
- ecore_wl_globals_get()
|
||||
- ecore_wl_registry_get()
|
||||
- Add #ifdef __cplusplus to Ecore_Wayland.h so C++ programs can link to
|
||||
and use the API.
|
||||
* ecore_evas:
|
||||
- ecore_evas_window_profile_supported_get()
|
||||
- ecore_evas_window_profile_set()
|
||||
|
|
|
@ -26,10 +26,14 @@
|
|||
# define EAPI
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _Ecore_Wl_Display Ecore_Wl_Display;
|
||||
typedef struct _Ecore_Wl_Output Ecore_Wl_Output;
|
||||
typedef struct _Ecore_Wl_Input Ecore_Wl_Input;
|
||||
typedef struct _Ecore_Wl_Global Ecore_Wl_Global;
|
||||
typedef struct _Ecore_Wl_Global Ecore_Wl_Global; /** @since 1.8 */
|
||||
|
||||
# ifndef _ECORE_WAYLAND_WINDOW_PREDEF
|
||||
typedef struct _Ecore_Wl_Window Ecore_Wl_Window;
|
||||
|
@ -72,6 +76,7 @@ enum _Ecore_Wl_Window_Buffer_Type
|
|||
typedef enum _Ecore_Wl_Window_Type Ecore_Wl_Window_Type;
|
||||
typedef enum _Ecore_Wl_Window_Buffer_Type Ecore_Wl_Window_Buffer_Type;
|
||||
|
||||
/** @since 1.8 */
|
||||
struct _Ecore_Wl_Global
|
||||
{
|
||||
unsigned int id;
|
||||
|
@ -101,7 +106,7 @@ struct _Ecore_Wl_Display
|
|||
|
||||
struct wl_list inputs;
|
||||
struct wl_list outputs;
|
||||
struct wl_list globals;
|
||||
struct wl_list globals; /** @since 1.8 */
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -486,6 +491,26 @@ EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input);
|
|||
|
||||
EAPI struct wl_list ecore_wl_outputs_get(void);
|
||||
|
||||
/**
|
||||
* Retrieves the Wayland Globals Interface list used for the current Wayland connection.
|
||||
*
|
||||
* @return The current wayland globals interface list
|
||||
*
|
||||
* @ingroup Ecore_Wl_Display_Group
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI struct wl_list *ecore_wl_globals_get(void);
|
||||
|
||||
/**
|
||||
* Retrieves the Wayland Registry used for the current Wayland connection.
|
||||
*
|
||||
* @return The current wayland registry
|
||||
*
|
||||
* @ingroup Ecore_Wl_Display_Group
|
||||
* @since 1.8
|
||||
*/
|
||||
EAPI struct wl_registry *ecore_wl_registry_get(void);
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_Wl_Window_Group Wayland Window functions.
|
||||
* @ingroup Ecore_Wl_Group
|
||||
|
@ -609,4 +634,8 @@ EAPI Ecore_Wl_Dnd *ecore_wl_dnd_get();
|
|||
EAPI Eina_Bool ecore_wl_dnd_start_drag();
|
||||
EAPI Eina_Bool ecore_wl_dnd_selection_has_owner(Ecore_Wl_Dnd *dnd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -194,6 +194,18 @@ ecore_wl_display_get(void)
|
|||
return _ecore_wl_disp->wl.display;
|
||||
}
|
||||
|
||||
EAPI struct wl_list *
|
||||
ecore_wl_globals_get(void)
|
||||
{
|
||||
return &(_ecore_wl_disp->globals);
|
||||
}
|
||||
|
||||
EAPI struct wl_registry *
|
||||
ecore_wl_registry_get(void)
|
||||
{
|
||||
return _ecore_wl_disp->wl.registry;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl_screen_size_get(int *w, int *h)
|
||||
{
|
||||
|
@ -377,6 +389,9 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
|
|||
ewd = data;
|
||||
|
||||
global = malloc(sizeof(Ecore_Wl_Global));
|
||||
|
||||
memset(global, 0, sizeof(Ecore_Wl_Global));
|
||||
|
||||
global->id = id;
|
||||
global->interface = strdup(interface);
|
||||
global->version = version;
|
||||
|
|
Loading…
Reference in New Issue