static void _ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on) { Eina_List *l; Ecore_Fb_Input_Device *dev; Ecore_Evas_Engine_FB_Data *idata = ee->engine.data; int resized = 0; if (((ee->prop.fullscreen) && (on)) || ((!ee->prop.fullscreen) && (!on))) return; if (on) { int w, h; idata->real_w = ee->w; idata->real_h = ee->h; w = ee->w; h = ee->h; ecore_fb_size_get(&w, &h); if ((w == 0) && (h == 0)) { w = ee->w; h = ee->h; } if ((w != ee->w) || (h != ee->h)) resized = 1; ee->w = w; ee->h = h; ee->req.w = ee->w; ee->req.h = ee->h; evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); } else { if ((idata->real_w != ee->w) || (idata->real_h != ee->h)) resized = 1; ee->w = idata->real_w; ee->h = idata->real_h; ee->req.w = ee->w; ee->req.h = ee->h; evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); } ee->prop.fullscreen = on; EINA_LIST_FOREACH(ecore_evas_input_devices, l, dev) ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h); /* rescale the input device area */ if (resized) { if (ee->func.fn_resize) ee->func.fn_resize(ee); } }
static void _ecore_evas_fb_gain(void *data) { Ecore_Evas *ee = data; Eina_List *ll; Ecore_Fb_Input_Device *dev; if (ee) { ee->visible = 1; if (ECORE_EVAS_PORTRAIT(ee)) evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); else evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); } EINA_LIST_FOREACH(ecore_evas_input_devices, ll, dev) ecore_fb_input_device_listen(dev, 1); }
static void _ecore_evas_resize(Ecore_Evas *ee, int w, int h) { Evas_Engine_Info_Buffer *einfo; Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data; int stride = 0; if (w < 1) w = 1; if (h < 1) h = 1; ee->req.w = w; ee->req.h = h; if ((w == ee->w) && (h == ee->h)) return; ee->w = w; ee->h = h; evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); if (bdata->image) { bdata->pixels = evas_object_image_data_get(bdata->image, 1); stride = evas_object_image_stride_get(bdata->image); } else { if (bdata->pixels) bdata->free_func(bdata->data, bdata->pixels); bdata->pixels = bdata->alloc_func(bdata->data, ee->w * ee->h * sizeof(int)); stride = ee->w * sizeof(int); } einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas); if (einfo) { if (ee->alpha) einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; else einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_RGB32; einfo->info.dest_buffer = bdata->pixels; einfo->info.dest_buffer_row_bytes = stride; einfo->info.use_color_key = 0; einfo->info.alpha_threshold = 0; einfo->info.func.new_update_region = NULL; einfo->info.func.free_update_region = NULL; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); } } if (bdata->image) evas_object_image_data_set(bdata->image, bdata->pixels); else bdata->resized = 1; }
static void e_window_expose(Ecore_Event * ev) { Ecore_Event_Window_Expose *e; e = (Ecore_Event_Window_Expose *) ev->event; if ((e->win != e_session->ewin)) return; evas_damage_rectangle_add(evas, e->x, e->y, e->w, e->h); }
static void _ecore_evas_move_resize(Ecore_Evas *ee, int x EINA_UNUSED, int y EINA_UNUSED, int w, int h) { ee->req.w = w; ee->req.h = h; if ((w == ee->w) && (h == ee->h)) return; ee->w = w; ee->h = h; if (ECORE_EVAS_PORTRAIT(ee)) { evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); } else { evas_output_size_set(ee->evas, ee->h, ee->w); evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); } if (ee->func.fn_resize) ee->func.fn_resize(ee); }
static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha) { Evas_Engine_Info_Wayland_Egl *einfo; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!ee) return; if ((ee->alpha == alpha)) return; ee->alpha = alpha; if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) { einfo->info.destination_alpha = alpha; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); } }
EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); enabled = !!enabled; if (obj->cur.usemap == enabled) return; obj->cur.usemap = enabled; if (enabled) { if (!obj->cur.map) obj->cur.map = _evas_map_new(4); evas_object_mapped_clip_across_mark(obj); // obj->cur.map->normal_geometry = obj->cur.geometry; } else { if (obj->cur.map) { _evas_map_calc_geom_change(obj); evas_object_mapped_clip_across_mark(obj); //FIXME: Since the last frame is not updated when map is //disabled, afterimage problem is happened in s/w rendering. //Need to find out the fundamental reason then fix it. evas_damage_rectangle_add(obj->layer->evas, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h); } } _evas_map_calc_map_geometry(obj); /* This is a bit heavy handed, but it fixes the case of same geometry, but * changed colour or UV settings. */ evas_object_change(obj); }
static void compiz_damage(void) { CompDisplay *d; CompScreen *s; CompWindow *w; Eina_Bool thaw = EINA_FALSE; for (d = core.displays; d; d = d->next) for (s = d->screens; s; s = s->next) { if (!s->damageMask) for (w = s->windows; w; w = w->next) { E_Client *ec; ec = compiz_win_to_client(w); if (w->grabbed && ((!ec->moving) && (!e_client_util_resizing_get(ec)))) w->screen->windowUngrabNotify(w); if ((w->attrib.x == ec->client.x) && (w->attrib.y == ec->client.y)) continue; moveWindow(w, ec->client.x - w->attrib.x, ec->client.y - w->attrib.y, TRUE, TRUE); syncWindowPosition(w); compiz_texture_clear(w->texture); } if (s->damageMask) { evas_damage_rectangle_add(e_comp->evas, 0, 0, 1, 1); thaw = EINA_TRUE; } } if (eina_array_count(events) || thaw) ecore_animator_thaw(compiz_anim); else ecore_animator_freeze(compiz_anim); }
void engine_gl_sdl_loop(void) { SDL_Event event; while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_MOUSEMOTION: evas_event_feed_mouse_move(evas, event.motion.x, event.motion.y, 0, NULL); break; case SDL_MOUSEBUTTONDOWN: evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL); evas_event_feed_mouse_down(evas, event.button.state, EVAS_BUTTON_NONE, 0, NULL); break; case SDL_MOUSEBUTTONUP: evas_event_feed_mouse_move(evas, event.button.x, event.button.y, 0, NULL); evas_event_feed_mouse_up(evas, event.button.state, EVAS_BUTTON_NONE, 0, NULL); break; case SDL_VIDEORESIZE: evas_output_viewport_set(evas, 0, 0, event.resize.w, event.resize.w); evas_output_size_set(evas, event.resize.w, event.resize.w); evas_output_size_get(evas, &win_w, &win_h); break; case SDL_VIDEOEXPOSE: evas_output_size_get(evas, &win_w, &win_h); evas_damage_rectangle_add(evas, 0, 0, win_w, win_h); break; case SDL_KEYDOWN: switch (event.key.keysym.sym) { case SDLK_LSHIFT: case SDLK_RSHIFT: evas_key_modifier_on(evas, "Shift"); break; case SDLK_RCTRL: case SDLK_LCTRL: evas_key_modifier_on(evas, "Control"); break; case SDLK_MENU: case SDLK_RALT: case SDLK_LALT: evas_key_modifier_on(evas, "Alt"); break; case SDLK_LSUPER: case SDLK_RSUPER: evas_key_modifier_on(evas, "Super"); break; case SDLK_CAPSLOCK: if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock")) evas_key_lock_off(evas, "Caps_Lock"); else evas_key_lock_on(evas, "Caps_Lock"); break; case SDLK_NUMLOCK: if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock")) evas_key_lock_off(evas, "Num_Lock"); else evas_key_lock_on(evas, "Num_Lock"); break; case SDLK_SCROLLOCK: if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock")) evas_key_lock_off(evas, "Scroll_Lock"); else evas_key_lock_on(evas, "Scroll_Lock"); break; case SDLK_s: case SDLK_ESCAPE: evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL); break; case SDLK_KP_ENTER: case SDLK_RETURN: evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL); break; case SDLK_LEFT: evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL); break; case SDLK_RIGHT: evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL); break; case SDLK_q: if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock")) evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL); else evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL); break; default: break; } break; case SDL_KEYUP: switch (event.key.keysym.sym) { case SDLK_LSHIFT: case SDLK_RSHIFT: evas_key_modifier_off(evas, "Shift"); break; case SDLK_RCTRL: case SDLK_LCTRL: evas_key_modifier_off(evas, "Control"); break; case SDLK_MENU: case SDLK_RALT: case SDLK_LALT: evas_key_modifier_off(evas, "Alt"); break; case SDLK_LSUPER: case SDLK_RSUPER: evas_key_modifier_off(evas, "Super"); break; case SDLK_ESCAPE: evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL); break; case SDLK_RETURN: evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL); break; case SDLK_LEFT: evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL); break; case SDLK_RIGHT: evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL); break; case SDLK_q: if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock")) evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL); else evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL); break; default: break; } break; case SDL_QUIT: case SDL_SYSWMEVENT: case SDL_USEREVENT: case SDL_ACTIVEEVENT: case SDL_JOYAXISMOTION: case SDL_JOYBALLMOTION: case SDL_JOYHATMOTION: case SDL_JOYBUTTONDOWN: case SDL_JOYBUTTONUP: default: break; } } }
void engine_software_16_x11_loop(void) { XEvent ev; KeySym ks; char *kstr; again: if (!XCheckMaskEvent(disp, ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask, &ev)) return; switch (ev.type) { case ButtonPress: evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL); evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL); break; case ButtonRelease: evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL); evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL); break; case MotionNotify: evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL); break; case Expose: first_expose = 1; evas_damage_rectangle_add(evas, ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height); break; case ConfigureNotify: evas_output_viewport_set(evas, 0, 0, ev.xconfigure.width, ev.xconfigure.height); evas_output_size_set(evas, ev.xconfigure.width, ev.xconfigure.height); win_w = ev.xconfigure.width; win_h = ev.xconfigure.height; break; case EnterNotify: evas_event_feed_mouse_in(evas, 0, NULL); break; case LeaveNotify: evas_event_feed_mouse_out(evas, 0, NULL); break; case KeyPress: ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0); kstr = XKeysymToString(ks); if (kstr) { if ((!strcmp(kstr, "Shift_L")) || (!strcmp(kstr, "Shift_R"))) evas_key_modifier_on(evas, "Shift"); if ((!strcmp(kstr, "Control_L")) || (!strcmp(kstr, "Control_R"))) evas_key_modifier_on(evas, "Control"); if ((!strcmp(kstr, "Alt_L")) || (!strcmp(kstr, "Alt_R"))) evas_key_modifier_on(evas, "Alt"); if ((!strcmp(kstr, "Super_L")) || (!strcmp(kstr, "Super_R"))) evas_key_modifier_on(evas, "Super"); if (!strcmp(kstr, "Caps_Lock")) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock")) evas_key_lock_off(evas, "Caps_Lock"); else evas_key_lock_on(evas, "Caps_Lock"); } if (!strcmp(kstr, "Num_Lock")) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock")) evas_key_lock_off(evas, "Num_Lock"); else evas_key_lock_on(evas, "Num_Lock"); } if (!strcmp(kstr, "Scroll_Lock")) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock")) evas_key_lock_off(evas, "Scroll_Lock"); else evas_key_lock_on(evas, "Scroll_Lock"); } if (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL); } break; case KeyRelease: ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0); kstr = XKeysymToString(ks); if (kstr) { if ((!strcmp(kstr, "Shift_L")) || (!strcmp(kstr, "Shift_R"))) evas_key_modifier_off(evas, "Shift"); if ((!strcmp(kstr, "Control_L")) || (!strcmp(kstr, "Control_R"))) evas_key_modifier_off(evas, "Control"); if ((!strcmp(kstr, "Alt_L")) || (!strcmp(kstr, "Alt_R"))) evas_key_modifier_off(evas, "Alt"); if ((!strcmp(kstr, "Super_L")) || (!strcmp(kstr, "Super_R"))) evas_key_modifier_off(evas, "Super"); evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL); } break; default: break; } goto again; }
void EvasTargetWidget::paintEvent(QPaintEvent *e) { QRect r = e->rect(); evas_damage_rectangle_add(evas, r.x(), r.y(), r.width(), r.height()); }
static void _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize EINA_UNUSED) { const Evas_Device *pointer; Ecore_Evas_Cursor *cursor; Evas_Engine_Info_FB *einfo; int rot_dif; pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_MOUSE); pointer = evas_device_parent_get(pointer); cursor = eina_hash_find(ee->prop.cursors, &pointer); EINA_SAFETY_ON_NULL_RETURN(cursor); if (ee->rotation == rotation) return; einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas); if (!einfo) return; rot_dif = ee->rotation - rotation; if (rot_dif < 0) rot_dif = -rot_dif; if (rot_dif != 180) { einfo->info.rotation = rotation; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); } if (!ee->prop.fullscreen) { int tmp; tmp = ee->w; ee->w = ee->h; ee->h = tmp; ee->req.w = ee->w; ee->req.h = ee->h; } else { if (ECORE_EVAS_PORTRAIT(ee)) { evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); } else { evas_output_size_set(ee->evas, ee->h, ee->w); evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); } } ee->rotation = rotation; } else { einfo->info.rotation = rotation; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); } ee->rotation = rotation; } if (ECORE_EVAS_PORTRAIT(ee)) evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); else evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); _ecore_evas_mouse_move_process_fb(ee, cursor->pos_x, cursor->pos_y); if (ee->func.fn_resize) ee->func.fn_resize(ee); }
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CREATE: return 0; case WM_DESTROY: PostQuitMessage(0); return 0; case WM_CLOSE: PostQuitMessage(0); return 0; case WM_WINDOWPOSCHANGED: { PAINTSTRUCT ps; HDC hdc; hdc = BeginPaint (window, &ps); evas_damage_rectangle_add(evas, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top); EndPaint(window, &ps); return 0; } case WM_SIZING: { PRECT rect = (PRECT)lParam; evas_output_viewport_set(evas, 0, 0, rect->right - rect->left, rect->bottom - rect->top); evas_output_size_set(evas, rect->right - rect->left, rect->bottom - rect->top); win_w = rect->right - rect->left; win_h = rect->bottom - rect->top; return 0; } case WM_RBUTTONDOWN: evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL); evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, NULL); return 0; case WM_LBUTTONDOWN: evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL); evas_event_feed_mouse_down(evas, 1, EVAS_BUTTON_NONE, 0, NULL); return 0; case WM_LBUTTONUP: evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL); evas_event_feed_mouse_up(evas, 1, EVAS_BUTTON_NONE, 0, NULL); return 0; case WM_RBUTTONUP: evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL); evas_event_feed_mouse_up(evas, 3, EVAS_BUTTON_NONE, 0, NULL); return 0; case WM_MOUSEMOVE: if (!evas_pointer_inside_get(evas)) evas_event_feed_mouse_in(evas, 0, NULL); evas_event_feed_mouse_move(evas, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), 0, NULL); return 0; case WM_MOUSELEAVE: evas_event_feed_mouse_out(evas, 0, NULL); return 0; /* FIXME : can't find an event when the mouse is entering */ case WM_KEYDOWN: case WM_SYSKEYDOWN: { int key; key = LOWORD(wParam); if ((key == VK_SHIFT) || (key == VK_LSHIFT) || (key == VK_RSHIFT)) evas_key_modifier_on(evas, "Shift"); if ((key == VK_CONTROL) || (key == VK_LCONTROL) || (key == VK_RCONTROL)) evas_key_modifier_on(evas, "Control"); if ((key == VK_MENU) || (key == VK_LMENU) || (key == VK_RMENU)) evas_key_modifier_on(evas, "Alt"); if ((key == VK_LWIN) || (key == VK_RWIN)) evas_key_modifier_on(evas, "Super"); if (key == VK_CAPITAL) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock")) evas_key_lock_off(evas, "Caps_Lock"); else evas_key_lock_on(evas, "Caps_Lock"); } if (key == VK_NUMLOCK) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock")) evas_key_lock_off(evas, "Num_Lock"); else evas_key_lock_on(evas, "Num_Lock"); } if (key == VK_SCROLL) { if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock")) evas_key_lock_off(evas, "Scroll_Lock"); else evas_key_lock_on(evas, "Scroll_Lock"); } if (key == VK_ESCAPE) evas_event_feed_key_down(evas, "Escape", "Escape", NULL, NULL, 0, NULL); if (key == VK_RETURN) evas_event_feed_key_down(evas, "Return", "Return", NULL, NULL, 0, NULL); if (key == VK_LEFT) evas_event_feed_key_down(evas, "Left", "Left", NULL, NULL, 0, NULL); if (key == VK_RIGHT) evas_event_feed_key_down(evas, "Right", "Right", NULL, NULL, 0, NULL); if (key == 81) evas_event_feed_key_down(evas, "Q", "Q", NULL, NULL, 0, NULL); if (key == 113) evas_event_feed_key_down(evas, "q", "q", NULL, NULL, 0, NULL); return 0; } case WM_KEYUP: case WM_SYSKEYUP: { int key; key = LOWORD(wParam); if ((key == VK_SHIFT) || (key == VK_LSHIFT) || (key == VK_RSHIFT)) evas_key_modifier_off(evas, "Shift"); if ((key == VK_CONTROL) || (key == VK_LCONTROL) || (key == VK_RCONTROL)) evas_key_modifier_off(evas, "Control"); if ((key == VK_MENU) || (key == VK_LMENU) || (key == VK_RMENU)) evas_key_modifier_off(evas, "Alt"); if ((key == VK_LWIN) || (key == VK_RWIN)) evas_key_modifier_off(evas, "Super"); if (key == VK_ESCAPE) evas_event_feed_key_up(evas, "Escape", "Escape", NULL, NULL, 0, NULL); if (key == VK_RETURN) evas_event_feed_key_up(evas, "Return", "Return", NULL, NULL, 0, NULL); if (key == VK_LEFT) evas_event_feed_key_up(evas, "Left", "Left", NULL, NULL, 0, NULL); if (key == VK_RIGHT) evas_event_feed_key_up(evas, "Right", "Right", NULL, NULL, 0, NULL); if (key == 81) evas_event_feed_key_up(evas, "Q", "Q", NULL, NULL, 0, NULL); if (key == 113) evas_event_feed_key_up(evas, "q", "q", NULL, NULL, 0, NULL); return 0; } default: return DefWindowProc(hwnd, uMsg, wParam, lParam); } }
EAPI void evas_object_map_set(Evas_Object *obj, const Evas_Map *map) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!map) { if (obj->cur.map) { if (obj->cur.map->surface) { obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, obj->cur.map->surface); obj->cur.map->surface = NULL; } obj->prev.geometry = obj->cur.map->normal_geometry; if (!obj->prev.map) { _evas_map_free(obj, obj->cur.map); obj->cur.map = NULL; evas_object_mapped_clip_across_mark(obj); return; } _evas_map_free(obj, obj->cur.map); obj->cur.map = NULL; if (!obj->cur.usemap) _evas_map_calc_geom_change(obj); else _evas_map_calc_map_geometry(obj); if (obj->cur.usemap) { evas_object_mapped_clip_across_mark(obj); //FIXME: Since the last frame is not updated when map is //disabled, afterimage problem is happened in s/w //rendering. Need to find out the fundamental reason //then fix it. evas_damage_rectangle_add(obj->layer->evas, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h); } } return; } if ((obj->cur.map) && (obj->cur.map->count == map->count)) { Evas_Map *omap = obj->cur.map; obj->cur.map = _evas_map_new(map->count); memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (map->count * sizeof(Evas_Map_Point))); _evas_map_copy(obj->cur.map, map); if (obj->prev.map == omap) obj->prev.map = NULL; free(omap); } else { if (obj->cur.map) evas_map_free(obj->cur.map); obj->cur.map = _evas_map_dup(map); if (obj->cur.usemap) evas_object_mapped_clip_across_mark(obj); } _evas_map_calc_map_geometry(obj); }