- display window coords while moving

SVN revision: 14128
devs/princeamd/enlightenment-0.17-elive
Dan Sinclair 19 years ago committed by Dan Sinclair
parent df5b523477
commit a1ea5be1f4
  1. 1
      TODO
  2. 1
      data/themes/Makefile.am
  3. 1
      data/themes/default.edc
  4. 99
      data/themes/default_move.edc
  5. 67
      src/bin/e_border.c

@ -110,7 +110,6 @@ These are in no particular order:
* maybe add systray module/support?
* allow object paranoia to be a runtime option too
* add sliders, radio and check buttons for clientinfo pane
* display coords while moving
* add separate app menu bars at top of screen support
* add "osd" subsystem for things like volume controls on keybboards, etc. that overlay the screen
* add really nice "about" box with theme, authors credits list etc etc.

@ -23,6 +23,7 @@ default_ibar.edc \
default_menu.edc \
default_pager.edc \
default_resize.edc \
default_move.edc \
default_temperature.edc \
default_error.edc

@ -32,6 +32,7 @@ collections {
#include "default_menu.edc"
#include "default_pager.edc"
#include "default_resize.edc"
#include "default_move.edc"
#include "default_temperature.edc"
#include "default_error.edc"
}

@ -0,0 +1,99 @@
images {
image: "e17_menu_bg.png" COMP;
}
group {
name: "widgets/border/default/move";
parts {
part {
name: "base";
mouse_events: 0;
type: RECT;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 1.0;
offset: 1 0;
to_y: "base2";
}
rel2 {
relative: 1.0 1.0;
offset: -2 -2;
}
color: 221 221 221 255;
}
}
part {
name: "base2";
mouse_events: 0;
description {
state: "default" 0.0;
max: 99999 48;
align: 0.5 0.0;
rel1 {
relative: 0.0 0.0;
offset: 1 1;
}
rel2 {
relative: 1.0 1.0;
offset: -2 -2;
}
image {
normal: "e17_menu_bg.png";
}
fill {
smooth: 0;
}
}
}
part {
name: "base3";
mouse_events: 0;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
image {
normal: "e17_menu_bg_border.png";
border: 1 1 1 1;
middle: 0;
}
fill {
smooth: 0;
}
}
}
part {
name: "text";
type: TEXT;
effect: SHADOW;
description {
state: "default" 0.0;
color: 0 0 0 255;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
}
color: 0 0 0 255;
color3: 255 255 255 128;
text {
text: "WIDTHxHEIGHT";
font: "Edje Vera";
size: 10;
align: 0.5 0.5;
min: 1 1;
text_class: "move_text";
}
}
}
}
}

@ -95,6 +95,10 @@ static void _e_border_resize_begin(E_Border *bd);
static void _e_border_resize_end(E_Border *bd);
static void _e_border_resize_update(E_Border *bd);
static void _e_border_move_begin(E_Border *bd);
static void _e_border_move_end(E_Border *bd);
static void _e_border_move_update(E_Border *bd);
static void _e_border_reorder_after(E_Border *bd, E_Border *after);
static void _e_border_reorder_before(E_Border *bd, E_Border *before);
@ -107,6 +111,9 @@ static E_Border *resize = NULL;
static Ecore_Evas *resize_ee = NULL;
static Evas_Object *resize_obj = NULL;
static Ecore_Evas *move_ee = NULL;
static Evas_Object *move_obj = NULL;
int E_EVENT_BORDER_ADD = 0;
int E_EVENT_BORDER_REMOVE = 0;
int E_EVENT_BORDER_ZONE_SET = 0;
@ -479,6 +486,7 @@ e_border_move(E_Border *bd, int x, int y)
bd->y + bd->client_inset.t,
bd->client.w,
bd->client.h);
_e_border_move_update(bd);
_e_border_zone_update(bd);
ev = calloc(1, sizeof(E_Event_Border_Move));
ev->border = bd;
@ -599,6 +607,7 @@ e_border_raise(E_Border *bd)
ev->above = NULL;
ecore_event_add(E_EVENT_BORDER_RAISE, ev, _e_border_event_border_raise_free, NULL);
}
if (move_ee) ecore_evas_raise(move_ee);
}
void
@ -1666,6 +1675,7 @@ _e_border_cb_signal_move_start(void *data, Evas_Object *obj, const char *emissio
bd = data;
bd->moving = 1;
_e_border_moveinfo_gather(bd, source);
_e_border_move_begin(bd);
e_border_raise(bd);
}
@ -1676,6 +1686,7 @@ _e_border_cb_signal_move_stop(void *data, Evas_Object *obj, const char *emission
bd = data;
bd->moving = 0;
_e_border_move_end(bd);
}
static void
@ -3591,6 +3602,62 @@ _e_border_resize_update(E_Border *bd)
edje_object_part_text_set(resize_obj, "text", buf);
}
static void
_e_border_move_begin(E_Border *bd)
{
Evas_Coord w, h;
char buf[40];
if (move_ee) ecore_evas_free(move_ee);
move_ee = ecore_evas_software_x11_new(NULL, bd->zone->container->manager->win,
0, 0, 10, 10);
ecore_evas_override_set(move_ee, 1);
ecore_evas_software_x11_direct_resize_set(move_ee, 1);
e_canvas_add(move_ee);
ecore_evas_borderless_set(move_ee, 1);
ecore_evas_layer_set(move_ee, 999);
ecore_evas_show(move_ee);
move_obj = edje_object_add(ecore_evas_get(move_ee));
edje_object_file_set(move_obj, e_path_find(path_themes, "default.edj"),
"widgets/border/default/move");
snprintf(buf, sizeof(buf), "9999x9999");
edje_object_part_text_set(move_obj, "text", buf);
edje_object_size_min_calc(move_obj, &w, &h);
evas_object_move(move_obj, 0, 0);
evas_object_resize(move_obj, w, h);
evas_object_show(move_obj);
snprintf(buf, sizeof(buf), "%ix%i", bd->x, bd->y);
edje_object_part_text_set(move_obj, "text", buf);
ecore_evas_move(move_ee, (bd->zone->w - w) / 2, (bd->zone->h - h) / 2);
ecore_evas_resize(move_ee, w, h);
ecore_evas_show(move_ee);
}
static void
_e_border_move_end(E_Border *bd)
{
evas_object_del(move_obj);
if (move_ee)
{
ecore_evas_free(move_ee);
move_ee = NULL;
}
}
static void
_e_border_move_update(E_Border *bd)
{
char buf[40];
snprintf(buf, sizeof(buf) - 1, "%ix%i", bd->x, bd->y);
edje_object_part_text_set(move_obj, "text", buf);
}
static void
_e_border_reorder_after(E_Border *bd, E_Border *after)
{

Loading…
Cancel
Save