prop->pixelformat);
}
#endif
-#ifdef SUPPORT_INPUT_FOCUS
if (mask & IVI_NOTIFICATION_KEYBOARD_FOCUS) {
ivi_controller_surface_send_input_focus(resource,
IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD,
prop->has_keyboard_focus);
}
-#endif
if (mask & IVI_NOTIFICATION_REMOVE) {
send_surface_add_event(ivisurf, resource, IVI_NOTIFICATION_REMOVE);
}
static void send_all_keyboard_focus(struct ivishell *shell)
{
-#ifdef SUPPORT_INPUT_FOCUS
const struct ivi_layout_surface_properties *props;
struct ivicontroller_surface *ctrlsurf;
struct ivisurface *current_surf;
props->has_keyboard_focus);
}
}
-#endif
}
static void
uint32_t device,
int32_t enabled)
{
-#ifdef SUPPORT_INPUT_FOCUS
(void)client;
struct ivisurface *ivisurf = wl_resource_get_user_data(resource);
if (device & IVI_CONTROLLER_SURFACE_INPUT_DEVICE_KEYBOARD) {
if (enabled) {
- uint32_t id = ivi_layout_get_id_of_surface(ivisurf->layout_surface);
- ivi_layout_set_keyboard_focus_on(&id, 1);
+ ivi_layout_set_keyboard_focus_on(ivisurf->layout_surface);
send_all_keyboard_focus(ivisurf->shell);
}
}
-#endif
}
static const
struct wl_resource *resource,
struct wl_array *surfaces)
{
-#ifdef SUPPORT_INPUT_FOCUS
+#if 0
+ /* this supposed to go away in later rteleases as
+ ivi_layout_set_keyboard_focus_on() nowadays takes a single surface
+ as opposed to an array */
struct ivicontroller *ctrl = wl_resource_get_user_data(resource);
ivi_layout_set_keyboard_focus_on(surfaces->data, surfaces->size);
send_all_keyboard_focus(ctrl->shell);
extern "C" {
#endif /* __cplusplus */
-#include <stdbool.h>
-#include <weston/compositor.h>
+#include "stdbool.h"
+#include "compositor.h"
#define IVI_SUCCEEDED (0)
#define IVI_FAILED (-1)
bool visibility;
int32_t transition_type;
uint32_t transition_duration;
+ uint32_t has_keyboard_focus;
};
struct ivi_layout_layer_properties
};
enum ivi_layout_notification_mask {
- IVI_NOTIFICATION_NONE = 0,
- IVI_NOTIFICATION_OPACITY = (1 << 1),
- IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
- IVI_NOTIFICATION_DEST_RECT = (1 << 3),
- IVI_NOTIFICATION_DIMENSION = (1 << 4),
- IVI_NOTIFICATION_POSITION = (1 << 5),
- IVI_NOTIFICATION_ORIENTATION = (1 << 6),
- IVI_NOTIFICATION_VISIBILITY = (1 << 7),
- IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
- IVI_NOTIFICATION_ADD = (1 << 9),
- IVI_NOTIFICATION_REMOVE = (1 << 10),
- IVI_NOTIFICATION_CONFIGURE = (1 << 11),
+ IVI_NOTIFICATION_NONE = 0,
+ IVI_NOTIFICATION_OPACITY = (1 << 1),
+ IVI_NOTIFICATION_SOURCE_RECT = (1 << 2),
+ IVI_NOTIFICATION_DEST_RECT = (1 << 3),
+ IVI_NOTIFICATION_DIMENSION = (1 << 4),
+ IVI_NOTIFICATION_POSITION = (1 << 5),
+ IVI_NOTIFICATION_ORIENTATION = (1 << 6),
+ IVI_NOTIFICATION_VISIBILITY = (1 << 7),
+ IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
+ IVI_NOTIFICATION_ADD = (1 << 9),
+ IVI_NOTIFICATION_REMOVE = (1 << 10),
+ IVI_NOTIFICATION_CONFIGURE = (1 << 11),
IVI_NOTIFICATION_KEYBOARD_FOCUS = (1 << 12),
- IVI_NOTIFICATION_ALL = 0xFFFF
+ IVI_NOTIFICATION_ALL = 0xFFFF
};
enum ivi_layout_transition_type{
wl_fixed_t
ivi_layout_surface_get_opacity(struct ivi_layout_surface *ivisurf);
+
+/**
+ * \brief Set the keyboard focus on a certain surface
+ * To receive keyboard events, 2 conditions must be fulfilled:
+ * 1- The surface must accept events from keyboard. See ilm_UpdateInputEventAcc eptanceOn
+ * 2- The keyboard focus must be set on that surface
+ *
+ * \return 0 if the method call was successful
+ * \return -1 if the method call was failed
+ */
+int32_t
+ivi_layout_set_keyboard_focus_on(struct ivi_layout_surface *ivisurf);
+
+
+/**
+ * \brief Get the indentifier of the surface which hold the keyboard focus
+ *
+ * \return 0 if the method call was successful
+ * \return -1 if the method call was failed
+ */
+int32_t
+ivi_layout_get_keyboard_focus_surface_id(struct ivi_layout_surface **pSurfaceId);
+
/**
* \brief Set the destination area of a surface within a layer for rendering.
*
struct weston_surface *
ivi_layout_surface_get_weston_surface(struct ivi_layout_surface *ivisurf);
+/**
+ * \brief Get size; width, height, and stride.
+ *
+ * \return IVI_SUCCEEDED if the method call was successful
+ * \return IVI_FAILED if the method call was failed
+ */
+int32_t
+ivi_layout_surface_get_size(struct ivi_layout_surface *ivisurf,
+ int32_t *width,
+ int32_t *height,
+ int32_t *stride);
+
int32_t
ivi_layout_layer_set_transition(struct ivi_layout_layer *ivilayer,
enum ivi_layout_transition_type type,