more wip
now with seriously broken motion events (hint: don't forget to fix the events wayland propagates to clients)
This commit is contained in:
parent
9cd40f0605
commit
290098c33e
|
@ -2686,6 +2686,7 @@ E_API void
|
|||
e_client_mouse_wheel(E_Client *ec, Evas_Point *output, E_Binding_Event_Wheel *ev)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(ec);
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &output->x, &output->y);
|
||||
if (action_client) return;
|
||||
ec->mouse.current.mx = output->x;
|
||||
ec->mouse.current.my = output->y;
|
||||
|
@ -2701,6 +2702,7 @@ e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Even
|
|||
int player;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(ec);
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &output->x, &output->y);
|
||||
if (action_client || ec->iconic || e_client_util_ignored_get(ec)) return;
|
||||
if ((button >= 1) && (button <= 3))
|
||||
{
|
||||
|
@ -2773,6 +2775,7 @@ E_API void
|
|||
e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button* ev)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(ec);
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &output->x, &output->y);
|
||||
if (ec->iconic || e_client_util_ignored_get(ec)) return;
|
||||
if ((button >= 1) && (button <= 3))
|
||||
{
|
||||
|
@ -2807,6 +2810,7 @@ E_API void
|
|||
e_client_mouse_move(E_Client *ec, Evas_Point *output)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(ec);
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &output->x, &output->y);
|
||||
if (ec->iconic || e_client_util_ignored_get(ec)) return;
|
||||
ec->mouse.current.mx = output->x;
|
||||
ec->mouse.current.my = output->y;
|
||||
|
|
|
@ -443,6 +443,7 @@ _e_comp_object_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
|
|||
Evas_Event_Mouse_Down *ev = event_info;
|
||||
E_Comp_Object *cw = data;
|
||||
E_Binding_Event_Mouse_Button ev2;
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &ev->canvas.x, &ev->canvas.y);
|
||||
|
||||
if (!cw->ec) return;
|
||||
if (e_client_action_get()) return;
|
||||
|
@ -458,6 +459,7 @@ _e_comp_object_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN
|
|||
E_Comp_Object *cw = data;
|
||||
E_Binding_Event_Mouse_Button ev2;
|
||||
Eina_Bool acting;
|
||||
evas_pointer_canvas_xy_get(e_comp->evas, &ev->canvas.x, &ev->canvas.y);
|
||||
|
||||
if (!cw->ec) return;
|
||||
if (e_client_action_get() && (e_client_action_get() != cw->ec)) return;
|
||||
|
@ -2565,9 +2567,11 @@ e_comp_object_zoomap_set(Evas_Object *obj, Eina_Bool enabled)
|
|||
{
|
||||
cw->zoomobj = e_zoomap_add(e_comp->evas);
|
||||
e_zoomap_smooth_set(cw->zoomobj, e_comp_config_get()->smooth_windows);
|
||||
e_zoomap_child_set(cw->zoomobj, cw->frame_object ? cw->frame_object : cw->obj);
|
||||
// e_zoomap_child_set(cw->zoomobj, cw->frame_object ? cw->frame_object : cw->obj);
|
||||
e_zoomap_child_set(cw->zoomobj, cw->effect_obj);
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->zoomobj);
|
||||
e_zoomap_child_edje_solid_setup(cw->zoomobj);
|
||||
evas_object_clip_set(cw->zoomobj, cw->clip);
|
||||
if (cw->ec->override)
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::WINDOW");
|
||||
else if (!cw->ec->input_only)
|
||||
|
|
|
@ -8,6 +8,7 @@ typedef struct _E_Smart_Data E_Smart_Data;
|
|||
struct _E_Smart_Data
|
||||
{
|
||||
Evas_Object *smart_obj, *child_obj;
|
||||
Evas_Object *clip;
|
||||
Evas_Coord x, y, w, h;
|
||||
Evas_Coord child_w, child_h;
|
||||
int32_t scale;
|
||||
|
@ -93,6 +94,7 @@ e_zoomap_transform_set(Evas_Object *obj, uint32_t transform)
|
|||
API_ENTRY return;
|
||||
|
||||
sd->transform = transform;
|
||||
_e_zoomap_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
E_API Evas_Object *
|
||||
|
@ -148,7 +150,7 @@ e_zoomap_child_resize(Evas_Object *obj, int w, int h)
|
|||
API_ENTRY return;
|
||||
evas_object_resize(sd->child_obj, w, h);
|
||||
fprintf(stderr, "child_resize (%p)'s CHILD (%p) RESIZED... %d %d\n", obj, sd->child_obj, w, h);
|
||||
sd->child_w = w; sd->child_h = h;
|
||||
//sd->child_w = w; sd->child_h = h;
|
||||
}
|
||||
|
||||
E_API Evas_Object *
|
||||
|
@ -318,7 +320,6 @@ _e_zoomap_transform_point(E_Smart_Data *sd, int sx, int sy, int *dx, int *dy)
|
|||
*dx *= sd->scale;
|
||||
*dy *= sd->scale;
|
||||
}
|
||||
|
||||
fprintf(stderr, "TRANSFORM %d %d rot %d scale %d to %d %d\n", sx, sy, sd->transform, sd->scale, *dx, *dy);
|
||||
}
|
||||
|
||||
|
@ -326,7 +327,7 @@ static Eina_Bool
|
|||
_e_zoomap_transformed(E_Smart_Data *sd)
|
||||
{
|
||||
if (sd->scale > 1) return EINA_TRUE;
|
||||
fprintf(stderr, "TRANSFORM: %d\n", sd->transform);
|
||||
fprintf(stderr, "TRANSFORM (%p): %d\n", sd, sd->transform);
|
||||
if (sd->transform != 0) return EINA_TRUE;
|
||||
|
||||
return EINA_FALSE;
|
||||
|
@ -373,7 +374,7 @@ _e_zoomap_smart_reconfigure(E_Smart_Data *sd)
|
|||
evas_object_color_get(sd->child_obj, &r, &g, &b, &a);
|
||||
m = evas_map_new(4);
|
||||
_e_zoomap_size(sd, &width, &height);
|
||||
fprintf(stderr, "PLZ HALP buffer:(%d, %d) surface:(%d, %d)\n", sd->child_w, sd->child_h, width, height);
|
||||
fprintf(stderr, "PLZ HALP surface at: (%d, %d) buffer:(%d, %d) surface:(%d, %d)\n", sd->x, sd->y, sd->child_w, sd->child_h, width, height);
|
||||
evas_map_util_points_populate_from_geometry(m, sd->x, sd->y,
|
||||
width, height, 0);
|
||||
|
||||
|
@ -389,6 +390,12 @@ fprintf(stderr, "PLZ HALP buffer:(%d, %d) surface:(%d, %d)\n", sd->child_w, sd-
|
|||
_e_zoomap_transform_point(sd, 0, height, &x, &y);
|
||||
evas_map_point_image_uv_set(m, 3, x, y);
|
||||
|
||||
/*
|
||||
evas_map_point_image_uv_set(m, 0, 100, 0);
|
||||
evas_map_point_image_uv_set(m, 1, 200, 100);
|
||||
evas_map_point_image_uv_set(m, 2, 100, 200);
|
||||
evas_map_point_image_uv_set(m, 3, 0, 100);
|
||||
*/
|
||||
evas_map_smooth_set(m, sd->smooth);
|
||||
evas_map_point_color_set(m, 0, r, g, b, a);
|
||||
evas_map_point_color_set(m, 1, r, g, b, a);
|
||||
|
|
Loading…
Reference in New Issue