evas_object_free? what posessed you to use that? it isnt in Evas' header
(api) at all (it HAPPENS by LUCK to be an internal call) also fix shudwon/startup order SVN revision: 12975
This commit is contained in:
parent
be8d8e19aa
commit
6405b22494
|
@ -39,7 +39,8 @@ e_place.h \
|
|||
e_resist.h \
|
||||
e_startup.h \
|
||||
e_iconify.h \
|
||||
e_hints.h
|
||||
e_hints.h \
|
||||
e_gadman.h
|
||||
|
||||
|
||||
enlightenment_SOURCES = \
|
||||
|
@ -73,6 +74,7 @@ e_resist.c \
|
|||
e_startup.c \
|
||||
e_iconify.c \
|
||||
e_hints.c \
|
||||
e_gadman.c \
|
||||
$(ENLIGHTENMENTHEADERS)
|
||||
|
||||
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
|
||||
|
|
|
@ -95,6 +95,9 @@ e_container_new(E_Manager *man)
|
|||
zone = e_zone_new(con, zx, zy, zw, zh);
|
||||
}
|
||||
}
|
||||
|
||||
con->gadman = e_gadman_new(con);
|
||||
|
||||
return con;
|
||||
}
|
||||
|
||||
|
@ -320,6 +323,7 @@ e_container_shape_rects_get(E_Container_Shape *es)
|
|||
static void
|
||||
_e_container_free(E_Container *con)
|
||||
{
|
||||
if (con->gadman) e_object_del(E_OBJECT(con->gadman));
|
||||
while (con->clients) e_object_free(E_OBJECT(con->clients->data));
|
||||
while (con->zones) e_object_free(E_OBJECT(con->zones->data));
|
||||
con->manager->containers = evas_list_remove(con->manager->containers, con);
|
||||
|
|
|
@ -28,6 +28,7 @@ struct _E_Container
|
|||
int x, y, w, h;
|
||||
char visible : 1;
|
||||
E_Manager *manager;
|
||||
E_Gadman *gadman;
|
||||
|
||||
int num;
|
||||
char *name;
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
#include "e.h"
|
||||
|
||||
/* local subsystem functions */
|
||||
static void _e_gadman_free(E_Gadman *gm);
|
||||
|
||||
/* externally accessible functions */
|
||||
int
|
||||
e_gadman_init(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
e_gadman_shutdown(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
E_Gadman *
|
||||
e_gadman_new(E_Container *con)
|
||||
{
|
||||
E_Gadman *gm;
|
||||
|
||||
gm = E_OBJECT_ALLOC(E_Gadman, _e_gadman_free);
|
||||
if (!gm) return NULL;
|
||||
gm->container = con;
|
||||
return gm;
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_gadman_free(E_Gadman *gm)
|
||||
{
|
||||
free(gm);
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
#ifdef E_TYPEDEFS
|
||||
|
||||
typedef enum _E_Gadman_Policy
|
||||
{
|
||||
/* type */
|
||||
E_GADMAN_ANYWHERE = 0,
|
||||
E_GADMAN_EDGES = 1,
|
||||
E_GADMAN_LEFT_EDGE = 2,
|
||||
E_GADMAN_RIGHT_EDGE = 3,
|
||||
E_GADMAN_TOP_EDGE = 4,
|
||||
E_GADMAN_BOTTOM_EDGE = 5,
|
||||
/* extra flags */
|
||||
E_GADMAN_FIXED_ZONE = 1 << 8,
|
||||
E_GADMAN_HSIZE = 1 << 9,
|
||||
E_GADMAN_VSIZE = 1 << 10,
|
||||
E_GADMAN_HMOVE = 1 << 11,
|
||||
E_GADMAN_VMOVE = 1 << 12
|
||||
} E_Gadman_Policy;
|
||||
|
||||
typedef struct _E_Gadman E_Gadman;
|
||||
typedef struct _E_Gadman_Client E_Gadman_Client;
|
||||
|
||||
#else
|
||||
#ifndef E_GADMAN_H
|
||||
#define E_GADMAN_H
|
||||
|
||||
struct _E_Gadman
|
||||
{
|
||||
E_Object e_obj_inherit;
|
||||
|
||||
E_Container *container;
|
||||
Evas_List *clients;
|
||||
};
|
||||
|
||||
struct _E_Gadman_Client
|
||||
{
|
||||
E_Object e_obj_inherit;
|
||||
|
||||
E_Gadman *gadman;
|
||||
};
|
||||
|
||||
EAPI int e_gadman_init(void);
|
||||
EAPI int e_gadman_shutdown(void);
|
||||
EAPI E_Gadman *e_gadman_new(E_Container *con);
|
||||
EAPI E_Gadman_Client *e_gadman_client_new(E_Gadman *gm);
|
||||
EAPI void e_gadman_client_policy_set(E_Gadman_Client *gmc, E_Gadman_Policy pol);
|
||||
EAPI void e_gadman_client_min_size_set(E_Gadman_Client *gmc, Evas_Coord minw, Evas_Coord minh);
|
||||
EAPI void e_gadman_client_max_size_set(E_Gadman_Client *gmc, Evas_Coord minw, Evas_Coord minh);
|
||||
EAPI void e_gadman_client_default_align_set(E_Gadman_Client *gmc, double xalign, double yalign);
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -27,3 +27,4 @@
|
|||
#include "e_startup.h"
|
||||
#include "e_iconify.h"
|
||||
#include "e_hints.h"
|
||||
#include "e_gadman.h"
|
||||
|
|
|
@ -148,14 +148,6 @@ main(int argc, char **argv)
|
|||
/* Init window manager hints */
|
||||
e_hints_init();
|
||||
|
||||
/* setup menu handlers etc. */
|
||||
if (!e_menu_init())
|
||||
{
|
||||
e_error_message_show("Enlightenment cannot initialize the menu system.\n"
|
||||
"Perhaps you are out of memory?");
|
||||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_menu_shutdown);
|
||||
/* init generic communications */
|
||||
if (!ecore_con_init())
|
||||
{
|
||||
|
@ -480,6 +472,8 @@ _e_main_screens_init(void)
|
|||
if (!e_container_init()) return 0;
|
||||
if (!e_zone_init()) return 0;
|
||||
if (!e_desk_init()) return 0;
|
||||
if (!e_gadman_init()) return 0;
|
||||
if (!e_menu_init()) return 0;
|
||||
|
||||
num = 0;
|
||||
roots = ecore_x_window_root_list(&num);
|
||||
|
@ -551,6 +545,8 @@ _e_main_screens_shutdown(void)
|
|||
{
|
||||
e_border_shutdown();
|
||||
e_focus_shutdown();
|
||||
e_menu_shutdown();
|
||||
e_gadman_shutdown();
|
||||
e_desk_shutdown();
|
||||
e_zone_shutdown();
|
||||
e_container_shutdown();
|
||||
|
|
|
@ -231,16 +231,8 @@ _pager_shutdown(Pager *e)
|
|||
free(e->conf);
|
||||
E_CONFIG_DD_FREE(e->conf_edd);
|
||||
|
||||
if (e->base)
|
||||
{
|
||||
evas_object_del(e->base);
|
||||
evas_object_free(e->base);
|
||||
}
|
||||
if (e->screen)
|
||||
{
|
||||
evas_object_del(e->screen);
|
||||
evas_object_free(e->screen);
|
||||
}
|
||||
if (e->base) evas_object_del(e->base);
|
||||
if (e->screen) evas_object_del(e->screen);
|
||||
|
||||
_pager_zone_leave(e);
|
||||
ecore_event_handler_del(e->ev_handler_container_resize);
|
||||
|
@ -325,12 +317,7 @@ _pager_desk_create(Pager *e, E_Desk *desk)
|
|||
static void
|
||||
_pager_desk_destroy(Pager_Desk *d)
|
||||
{
|
||||
if (d->obj)
|
||||
{
|
||||
evas_object_del(d->obj);
|
||||
evas_object_free(d->obj);
|
||||
}
|
||||
|
||||
if (d->obj) evas_object_del(d->obj);
|
||||
e_object_unref(E_OBJECT(d->desk));
|
||||
|
||||
while (d->wins)
|
||||
|
@ -405,16 +392,8 @@ _pager_window_create(Pager *e, E_Border *border, Pager_Desk *owner)
|
|||
static void
|
||||
_pager_window_destroy(Pager_Win *w)
|
||||
{
|
||||
if (w->obj)
|
||||
{
|
||||
evas_object_del(w->obj);
|
||||
evas_object_free(w->obj);
|
||||
}
|
||||
if (w->icon)
|
||||
{
|
||||
evas_object_del(w->icon);
|
||||
evas_object_free(w->icon);
|
||||
}
|
||||
if (w->obj) evas_object_del(w->obj);
|
||||
if (w->icon) evas_object_del(w->icon);
|
||||
|
||||
e_object_unref(E_OBJECT(w->border));
|
||||
E_FREE(w);
|
||||
|
|
Loading…
Reference in New Issue