On Wed, 30 Nov 2011 22:21:33 -0500 Michael Blumenkrantz
<[email protected]> said:
> On Thu, 1 Dec 2011 11:48:33 +0900
> Carsten Haitzler (The Rasterman) <[email protected]> wrote:
>
> > On Wed, 30 Nov 2011 20:37:40 -0500 Michael Blumenkrantz
> > <[email protected]> said:
> >
> > > On Thu, 1 Dec 2011 08:35:40 +0900
> > > Carsten Haitzler (The Rasterman) <[email protected]> wrote:
> > >
> > > > On Wed, 30 Nov 2011 16:57:30 -0500 Michael Blumenkrantz
> > > > <[email protected]> said:
> > > >
> > > > > is there another way to get the pixel data of an image besides
> > > > > evas_object_image_data_get() ? When this is called by enotify, the
> > > > > subsequent call to evas_object_image_data_set() destroys the original
> > > > > image...
> > > >
> > > > destroys? eh? the set with the same pointer going back should not affect
> > > > the image contents at all.
> > > >
> > > it goes from being <the image> to <black box>
> >
> > you are doing something else wrong... this works like a charm (attached
> > sample code).
> >
> look at e_dbus/src/lib/notification/notification.c
yeah - i did. e_notification_image_init() should work just fine. i repeated the
relevant bigs... unless you are doing e_notification_image_evas_object_add(). i
modified the example (attached) to use notify. image comes up just fine. youa
re doing something else wrong.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [email protected]
/*
gcc show.c -o show `pkg-config --cflags --libs elementary`
*/
#include <Elementary.h>
#include <E_Notify.h>
static Evas_Object *win, *img;
static char **files;
static int pos = -1, count;
static void
win_del(void *data, Evas_Object *obj, void *event_info)
{
elm_exit();
}
static void
up(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
pos++;
if (pos >= count) elm_exit();
else
{
int w, h;
evas_object_image_file_set(img, files[pos], NULL);
E_Notification_Image *ni;
ni = e_notification_image_new();
e_notification_image_init(ni, obj);
// void *dat;
// dat = evas_object_image_data_get(obj, EINA_FALSE);
// evas_object_image_data_set(obj, dat);
evas_object_image_size_get(img, &w, &h);
printf("%s: %ix%i | %i\n", files[pos], w, h,
evas_object_image_alpha_get(img));
evas_object_size_hint_weight_set(img, 0, 0);
evas_object_size_hint_min_set(img, w, h);
evas_object_size_hint_max_set(img, w, h);
}
}
int
main(int argc, char **argv)
{
elm_init(argc, argv);
files = &(argv[1]);
count = argc - 1;
win = elm_win_add(NULL, "show", ELM_WIN_BASIC);
elm_win_alpha_set(win, EINA_TRUE);
elm_win_title_set(win, "XXX");
evas_object_smart_callback_add(win, "delete,request", win_del, NULL);
img = evas_object_image_filled_add(evas_object_evas_get(win));
elm_win_resize_object_add(win, img);
evas_object_event_callback_add(img, EVAS_CALLBACK_MOUSE_UP,
up, NULL);
evas_object_show(img);
evas_object_resize(win, 100, 100);
up(NULL, evas_object_evas_get(win), img, NULL);
evas_object_show(win);
elm_run();
elm_shutdown();
return 0;
}
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel