ecore/wayland: Hide Ecore_Wl_Display.

This struct is only used inside ecore_wayland itself, so there's no real
reason to expose it. Apparently, hiding it doesn't break anything,
except for the ecore_imf wayland module, which was easily fixed.

If anyone notices a breakage, please let me know.
This commit is contained in:
Rafael Antognolli 2013-10-31 18:02:04 -02:00
parent 20f6676eb6
commit 35d2f195de
3 changed files with 51 additions and 44 deletions

View File

@ -31,7 +31,8 @@
extern "C" {
#endif
typedef struct _Ecore_Wl_Display Ecore_Wl_Display;
typedef struct _Ecore_Wl_Display Ecore_Wl_Display; /** FIXME: move to private */
typedef struct _Ecore_Wl_Output Ecore_Wl_Output;
typedef struct _Ecore_Wl_Input Ecore_Wl_Input;
typedef struct _Ecore_Wl_Global Ecore_Wl_Global; /** @since 1.7.6 */
@ -95,47 +96,6 @@ struct _Ecore_Wl_Global
struct wl_list link;
};
struct _Ecore_Wl_Display
{
struct
{
struct wl_display *display;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
struct wl_shell *shell;
struct wl_shell *desktop_shell;
struct wl_shm *shm;
struct wl_data_device_manager *data_device_manager;
} wl;
int fd;
unsigned int mask;
unsigned int serial;
int sync_ref_count;
Ecore_Fd_Handler *fd_hdl;
Ecore_Idle_Enterer *idle_enterer;
struct wl_list inputs;
struct wl_list outputs;
struct wl_list globals; /** @since 1.7.6 */
Eina_Bool init_done;
struct
{
struct xkb_context *context;
} xkb;
struct wl_cursor_theme *cursor_theme;
Ecore_Wl_Output *output;
Ecore_Wl_Input *input;
void (*output_configure)(Ecore_Wl_Output *output, void *data);
void *data;
};
struct _Ecore_Wl_Output
{
Ecore_Wl_Display *display;

View File

@ -50,6 +50,48 @@ extern Ecore_Wl_Display *_ecore_wl_disp;
# endif
# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_wl_log_dom, __VA_ARGS__)
struct _Ecore_Wl_Display
{
struct
{
struct wl_display *display;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
struct wl_shell *shell;
struct wl_shell *desktop_shell;
struct wl_shm *shm;
struct wl_data_device_manager *data_device_manager;
} wl;
int fd;
unsigned int mask;
unsigned int serial;
int sync_ref_count;
Ecore_Fd_Handler *fd_hdl;
Ecore_Idle_Enterer *idle_enterer;
struct wl_list inputs;
struct wl_list outputs;
struct wl_list globals; /** @since 1.7.6 */
Eina_Bool init_done;
struct
{
struct xkb_context *context;
} xkb;
struct wl_cursor_theme *cursor_theme;
Ecore_Wl_Output *output;
Ecore_Wl_Input *input;
void (*output_configure)(Ecore_Wl_Output *output, void *data);
void *data;
};
struct _Ecore_Wl_Dnd
{
Ecore_Wl_Display *ewd;

View File

@ -39,6 +39,7 @@ struct _WaylandIMContext
struct wl_text_input *text_input;
Ecore_Wl_Window *window;
Ecore_Wl_Input *input;
Evas *canvas;
char *preedit_text;
@ -627,6 +628,8 @@ wayland_im_context_focus_in(Ecore_IMF_Context *ctx)
if (!input || !input->seat)
return;
imcontext->input = input;
if (imcontext->text_input)
{
wl_text_input_show_input_panel(imcontext->text_input);
@ -643,11 +646,13 @@ wayland_im_context_focus_out(Ecore_IMF_Context *ctx)
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "focus-out");
if (!imcontext->window) return;
if (!imcontext->input) return;
if (imcontext->text_input)
wl_text_input_deactivate(imcontext->text_input,
imcontext->window->display->input->seat);
imcontext->input->seat);
imcontext->input = NULL;
}
EAPI void