enlightenment/src/bin/e_gadcon.h

380 lines
17 KiB
C
Raw Normal View History

#ifdef E_TYPEDEFS
#define E_GADCON_CLIENT(x) ((E_Gadcon_Client *)(x))
/* different layout policies - only 1 supported for now */
typedef enum _E_Gadcon_Layout_Policy
{
E_GADCON_LAYOUT_POLICY_PANEL
} E_Gadcon_Layout_Policy;
typedef enum _E_Gadcon_Orient
{
/* generic orientations */
E_GADCON_ORIENT_FLOAT,
2012-06-20 06:21:57 -07:00
E_GADCON_ORIENT_HORIZ,
E_GADCON_ORIENT_VERT,
E_GADCON_ORIENT_LEFT,
E_GADCON_ORIENT_RIGHT,
E_GADCON_ORIENT_TOP,
E_GADCON_ORIENT_BOTTOM,
E_GADCON_ORIENT_CORNER_TL,
E_GADCON_ORIENT_CORNER_TR,
E_GADCON_ORIENT_CORNER_BL,
E_GADCON_ORIENT_CORNER_BR,
E_GADCON_ORIENT_CORNER_LT,
E_GADCON_ORIENT_CORNER_RT,
E_GADCON_ORIENT_CORNER_LB,
E_GADCON_ORIENT_CORNER_RB
} E_Gadcon_Orient;
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
typedef enum _E_Gadcon_Site
{
2012-06-20 06:21:57 -07:00
E_GADCON_SITE_UNKNOWN = 0, // when target site is unknown
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
/* generic sities */
E_GADCON_SITE_SHELF,
E_GADCON_SITE_DESKTOP,
2012-06-20 06:21:57 -07:00
E_GADCON_SITE_TOOLBAR, // generic toolbar
E_GADCON_SITE_EFM_TOOLBAR // filemanager window toolbar
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
} E_Gadcon_Site;
#define E_GADCON_CLIENT_STYLE_PLAIN "plain"
#define E_GADCON_CLIENT_STYLE_INSET "inset"
2012-06-20 06:21:57 -07:00
typedef struct _E_Gadcon E_Gadcon;
typedef struct _E_Gadcon_Client E_Gadcon_Client;
typedef struct _E_Event_Gadcon_Client E_Event_Gadcon_Client_Add;
typedef struct _E_Event_Gadcon_Client E_Event_Gadcon_Client_Del;
typedef struct _E_Gadcon_Client_Class E_Gadcon_Client_Class;
typedef struct _E_Event_Gadcon_Client_Class E_Event_Gadcon_Client_Class_Add;
typedef struct _E_Event_Gadcon_Client_Class E_Event_Gadcon_Client_Class_Del;
2012-06-20 06:21:57 -07:00
typedef struct _E_Gadcon_Location E_Gadcon_Location;
#else
#ifndef E_GADCON_H
#define E_GADCON_H
2012-06-20 06:21:57 -07:00
#define E_GADCON_TYPE 0xE0b01006
#define E_GADCON_DUMMY_TYPE 0xE0b01016
#define E_GADCON_CLIENT_TYPE 0xE0b01007
EAPI extern int E_EVENT_GADCON_CLIENT_ADD;
EAPI extern int E_EVENT_GADCON_CLIENT_DEL;
EAPI extern int E_EVENT_GADCON_CLIENT_CLASS_ADD;
EAPI extern int E_EVENT_GADCON_CLIENT_CLASS_DEL;
struct _E_Gadcon
{
2012-06-20 06:21:57 -07:00
E_Object e_obj_inherit;
2009-11-24 11:00:52 -08:00
2012-06-20 06:21:57 -07:00
const char *name;
int id;
E_Gadcon_Layout_Policy layout_policy;
2009-11-24 11:00:52 -08:00
2012-06-20 06:21:57 -07:00
struct
{
Evas_Object *o_parent;
const char *swallow_name;
} edje;
Ecore_Evas *ecore_evas;
E_Zone *zone;
E_Gadcon_Orient orient;
Evas *evas;
Evas_Object *o_container;
Eina_List *clients;
Eina_List *populate_requests;
Eina_List *populated_classes;
Eina_Hash *awaiting_classes; /* E_Config_Gadcon_Client */
2012-06-20 06:21:57 -07:00
struct
{
void (*func)(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
void *data;
} resize_request, min_size_request;
struct
{
Evas_Object *(*func)(void *data, E_Gadcon_Client * gcc, const char *style);
void *data;
} frame_request;
struct
{
void (*func)(void *data, E_Gadcon_Client *gcc, E_Menu *menu);
void *data;
} menu_attach;
struct
{
void (*func)(void *data, E_Gadcon *gc, const E_Gadcon_Client_Class *cc);
void *data;
} populate_class;
struct
{
void (*func)(void *data, int lock);
void *data;
} locked_set;
struct
{
void (*func)(void *data);
void *data;
} urgent_show;
E_Config_Dialog *config_dialog;
unsigned char editing : 1;
Ecore_X_Window dnd_win, xdnd_win;
E_Shelf *shelf;
E_Toolbar *toolbar;
2009-11-24 11:00:52 -08:00
E_Gadcon_Location *location;
2012-06-20 06:21:57 -07:00
E_Drop_Handler *drop_handler;
2012-06-20 06:21:57 -07:00
E_Config_Gadcon *cf;
2012-06-20 06:21:57 -07:00
unsigned char instant_edit : 1;
unsigned char dummy : 1;
Eina_Bool custom : 1;
Eina_Bool cfg_delete : 1;
};
#define GADCON_CLIENT_CLASS_VERSION 3
/* Version 3 add the *client_class param to icon(),label(),id_new(), id_del() */
/* and the *orient param to orient() */
struct _E_Gadcon_Client_Class
{
2012-06-20 06:21:57 -07:00
int version;
/* All members below are part of version 1 */
2008-02-12 20:51:01 -08:00
const char *name;
2012-06-20 06:21:57 -07:00
struct
{
E_Gadcon_Client *(*init)(E_Gadcon * gc, const char *name, const char *id, const char *style);
void (*shutdown)(E_Gadcon_Client *gcc);
void (*orient)(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
const char *(*label)(const E_Gadcon_Client_Class *client_class);
Evas_Object *(*icon)(const E_Gadcon_Client_Class *client_class, Evas * evas);
2012-06-20 06:21:57 -07:00
/* All members below are part of version 2 */
/* Create new id, so that the gadcon client can refer to a config set inside the module */
const char *(*id_new)(const E_Gadcon_Client_Class *client_class);
2012-06-20 06:21:57 -07:00
/* Del an id when a gadcon client is removed from the system */
void (*id_del)(const E_Gadcon_Client_Class *client_class, const char *id);
2012-06-20 06:21:57 -07:00
/* All members below are part of version 3 */
Eina_Bool (*is_site)(E_Gadcon_Site site);
} func;
const char *default_style;
};
struct _E_Gadcon_Client
{
2012-06-20 06:21:57 -07:00
E_Object e_obj_inherit;
E_Gadcon *gadcon;
const char *name;
int id;
Evas_Object *o_base;
Evas_Object *o_box;
Evas_Object *o_frame;
Evas_Object *o_control;
Evas_Object *o_event;
const E_Gadcon_Client_Class *client_class;
2012-06-20 06:21:57 -07:00
void *data;
struct
{
int pos, size, res; //gadcon
double pos_x, pos_y, size_w, size_h; //gadman
} config;
struct
{
int seq, flags; /* goes to save */
int state, resist;
int prev_pos, prev_size;
int want_save : 1;
} state_info;
struct
{
Evas_Coord w, h;
} pad, min, aspect;
Ecore_Timer *scroll_timer;
Ecore_Timer *instant_edit_timer;
Ecore_Animator *scroll_animator;
double scroll_pos, scroll_wanted;
struct
{
void *data;
void (*func)(void *data);
} scroll_cb;
E_Menu *menu;
const char *style;
unsigned char autoscroll : 1;
unsigned char resizable : 1;
unsigned char moving : 1;
unsigned char resizing : 1;
unsigned char autoscroll_set : 1;
unsigned char autoscroll_disabled : 1;
2012-06-20 06:21:57 -07:00
Evas_Coord dx, dy;
struct
{
int x, y;
} drag;
unsigned char hidden : 1;
E_Config_Gadcon_Client *cf;
};
struct _E_Event_Gadcon_Client_Class
{
const E_Gadcon_Client_Class *cc;
};
struct _E_Event_Gadcon_Client
{
E_Gadcon_Client *gcc;
};
2009-08-31 04:23:03 -07:00
/* defines usable gadget placements such as Desktop, Shelf #, etc */
/* next fields are mandatory (not NULL): name, add_gadget.func, remove_gadget.func */
struct _E_Gadcon_Location
{
/* location name */
2012-06-20 06:21:57 -07:00
const char *name;
2009-08-31 04:23:03 -07:00
/* icon related to location, such as "preferences-desktop-shelf" for shelves, "preferences-desktop" for menus */
2012-06-20 06:21:57 -07:00
const char *icon_name;
2009-08-31 04:23:03 -07:00
E_Gadcon_Site site;
/* adds gadcon client to location. Returns nonzero on success */
2012-06-20 06:21:57 -07:00
struct
{
int (*func)(void *data, const E_Gadcon_Client_Class *cc);
void *data;
} gadget_add;
2009-08-31 04:23:03 -07:00
/* removes existing gadcon client from location */
2012-06-20 06:21:57 -07:00
struct
{
void (*func)(void *data, E_Gadcon_Client *gcc);
void *data;
} gadget_remove;
2009-08-31 04:23:03 -07:00
};
2012-06-20 06:21:57 -07:00
EINTERN int e_gadcon_init(void);
EINTERN int e_gadcon_shutdown(void);
EAPI void e_gadcon_provider_register(const E_Gadcon_Client_Class *cc);
EAPI void e_gadcon_provider_unregister(const E_Gadcon_Client_Class *cc);
EAPI Eina_List *e_gadcon_provider_list(void);
EAPI E_Gadcon *e_gadcon_dummy_new(int id);
EAPI void e_gadcon_config_del(E_Gadcon *gc);
2012-06-20 06:21:57 -07:00
EAPI E_Gadcon *e_gadcon_swallowed_new(const char *name, int id, Evas_Object *obj, const char *swallow_name);
EAPI void e_gadcon_custom_new(E_Gadcon *gc);
EAPI void e_gadcon_custom_del(E_Gadcon *gc);
EAPI void e_gadcon_custom_populate_request(E_Gadcon *gc);
2012-06-20 06:21:57 -07:00
EAPI void e_gadcon_swallowed_min_size_set(E_Gadcon *gc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_min_size_request_callback_set(E_Gadcon *gc, void (*func)(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data);
EAPI void e_gadcon_size_request_callback_set(E_Gadcon *gc, void (*func)(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h), void *data);
EAPI void e_gadcon_frame_request_callback_set(E_Gadcon * gc, Evas_Object * (*func)(void *data, E_Gadcon_Client * gcc, const char *style), void *data);
EAPI void e_gadcon_populate_callback_set(E_Gadcon *gc, void (*func)(void *data, E_Gadcon *gc, const E_Gadcon_Client_Class *cc), void *data);
EAPI void e_gadcon_layout_policy_set(E_Gadcon *gc, E_Gadcon_Layout_Policy layout_policy);
EAPI Eina_Bool e_gadcon_populate(E_Gadcon *gc);
2012-06-20 06:21:57 -07:00
EAPI void e_gadcon_unpopulate(E_Gadcon *gc);
EAPI void e_gadcon_populate_class(E_Gadcon *gc, const E_Gadcon_Client_Class *cc);
EAPI void e_gadcon_orient(E_Gadcon *gc, E_Gadcon_Orient orient);
EAPI void e_gadcon_edit_begin(E_Gadcon *gc);
EAPI void e_gadcon_edit_end(E_Gadcon *gc);
EAPI void e_gadcon_all_edit_begin(void);
EAPI void e_gadcon_all_edit_end(void);
EAPI void e_gadcon_zone_set(E_Gadcon *gc, E_Zone *zone);
EAPI E_Zone *e_gadcon_zone_get(E_Gadcon *gc);
EAPI void e_gadcon_ecore_evas_set(E_Gadcon *gc, Ecore_Evas *ee);
EAPI int e_gadcon_canvas_zone_geometry_get(E_Gadcon *gc, int *x, int *y, int *w, int *h);
EAPI void e_gadcon_util_menu_attach_func_set(E_Gadcon *gc, void (*func)(void *data, E_Gadcon_Client *gcc, E_Menu *menu), void *data);
EAPI void e_gadcon_util_lock_func_set(E_Gadcon *gc, void (*func)(void *data, int lock), void *data);
EAPI void e_gadcon_util_urgent_show_func_set(E_Gadcon *gc, void (*func)(void *data), void *data);
EAPI void e_gadcon_dnd_window_set(E_Gadcon *gc, Ecore_X_Window win);
EAPI Ecore_X_Window e_gadcon_dnd_window_get(E_Gadcon *gc);
EAPI void e_gadcon_xdnd_window_set(E_Gadcon *gc, Ecore_X_Window win);
EAPI Ecore_X_Window e_gadcon_xdnd_window_get(E_Gadcon *gc);
EAPI void e_gadcon_shelf_set(E_Gadcon *gc, E_Shelf *shelf);
EAPI E_Shelf *e_gadcon_shelf_get(E_Gadcon *gc);
EAPI void e_gadcon_toolbar_set(E_Gadcon *gc, E_Toolbar *toolbar);
EAPI E_Toolbar *e_gadcon_toolbar_get(E_Gadcon *gc);
EAPI E_Gadcon_Client *e_gadcon_client_find(E_Gadcon *gc, E_Config_Gadcon_Client *cf_gcc);
EAPI E_Config_Gadcon_Client *e_gadcon_client_config_new(E_Gadcon *gc, const char *name);
2012-06-20 06:21:57 -07:00
EAPI void e_gadcon_client_config_del(E_Config_Gadcon *cf_gc, E_Config_Gadcon_Client *cf_gcc);
EAPI E_Gadcon_Client *e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id, const char *style, Evas_Object *base_obj);
EAPI void e_gadcon_client_edit_begin(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_edit_end(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_queue(E_Gadcon *gc, E_Config_Gadcon_Client *cf_gcc);
2012-06-20 06:21:57 -07:00
EAPI void e_gadcon_client_show(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_hide(E_Gadcon_Client *gcc);
EAPI void e_gadcon_client_size_request(E_Gadcon_Client *gcc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_client_min_size_set(E_Gadcon_Client *gcc, Evas_Coord w, Evas_Coord h);
EAPI void e_gadcon_client_aspect_set(E_Gadcon_Client *gcc, int w, int h);
EAPI void e_gadcon_client_autoscroll_toggle_disabled_set(E_Gadcon_Client *gcc, Eina_Bool disable);
2012-06-20 06:21:57 -07:00
EAPI void e_gadcon_client_autoscroll_set(E_Gadcon_Client *gcc, int autoscroll);
EAPI void e_gadcon_client_autoscroll_update(E_Gadcon_Client *gcc, int mx, int my);
EAPI void e_gadcon_client_autoscroll_cb_set(E_Gadcon_Client *gcc, void (*func)(void *data), void *data);
EAPI void e_gadcon_client_resizable_set(E_Gadcon_Client *gcc, int resizable);
EAPI int e_gadcon_client_geometry_get(E_Gadcon_Client *gcc, int *x, int *y, int *w, int *h);
EAPI int e_gadcon_client_viewport_geometry_get(E_Gadcon_Client *gcc, int *x, int *y, int *w, int *h);
EAPI E_Zone *e_gadcon_client_zone_get(E_Gadcon_Client *gcc);
EAPI E_Menu *e_gadcon_client_menu_set(E_Gadcon_Client *gcc, E_Menu *m);
2012-06-20 06:21:57 -07:00
EAPI E_Menu *e_gadcon_client_util_menu_items_append(E_Gadcon_Client *gcc, E_Menu *menu_gadget, int flags);
EAPI void e_gadcon_client_util_menu_attach(E_Gadcon_Client *gcc);
EAPI void e_gadcon_locked_set(E_Gadcon *gc, int lock);
EAPI void e_gadcon_urgent_show(E_Gadcon *gc);
EAPI void e_gadcon_name_set(E_Gadcon *gc, const char *name);
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
/* site helpers */
2012-06-20 06:21:57 -07:00
EAPI Eina_Bool e_gadcon_site_is_shelf(E_Gadcon_Site site);
EAPI Eina_Bool e_gadcon_site_is_desktop(E_Gadcon_Site site);
EAPI Eina_Bool e_gadcon_site_is_efm_toolbar(E_Gadcon_Site site);
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
2012-06-20 06:21:57 -07:00
EAPI Eina_Bool e_gadcon_site_is_any_toolbar(E_Gadcon_Site site); // all toolbar sities
EAPI Eina_Bool e_gadcon_site_is_not_toolbar(E_Gadcon_Site site); // all non-toolbar sities
List of changes: 1. Gadcon sities: -- 'E_Gadcon_Site' enum to list all available sities, -- added 'is_site' callback for distinguish gadcon sities, -- 'e_gadcon_site_is_*' helpers written to use in gadget modules, -- gadcon config dialogs modified to show only gadgets that appropriate to selected gadcon site, -- all gadget modules updated for using new callback. When callback is not provided in module, then gadget can be used in any gadcon site. 2. Filemanager: -- added error icon to unexisting path dialog, -- added callback 'func.abort' to 'E_Fm2_Op_Registry_Entry' to specify abort operation sequence (if not provided, then operation is not cancelable), -- added parameter to 'e_fm2_op_registry_entry_add' to specify abort method on construct 'E_Fm2_Op_Registry_Entry' or make non-cancelable operation if this function is not provided, -- added 'e_fm2_operation_abort' call to cancel efm2 operation, -- added method '_e_fm2_operation_abort_internal' that represent efm2 default handler of operation cancelling, -- 'done' and 'total' fields of 'E_Fm2_Op_Registry_Entry' changed to off_t type, also all message handlers modified to work with it (to show progress for large files correctly), -- improved file operation progress processing, -- added cancel button to operation progress gadget in filemanager window, -- added delete file glyph to operation progress gadget, -- improved status message for efm2 operation progress. 3. Filemanager slave: -- fixed critical bug in message handling via stdin/stdout, -- fixed critical bug in removing task from list, -- improved 'E_FM_OP_ABORT' handling, -- fix rollback counting on moving files. 4. Fileman_opinfo module: -- a new theme writed: status string and gadget for view operation status in summary and detail modes, -- summary mode: operation glyph, state message, progressbar, abort button, -- detail mode: all for summary + from filename, to filename, -- summary/detailed button works as trigger, -- added source of module theme and used images. 4. Pathbar module: -- non-critical fix, just for safety. Also patch contains several minor updates to serve main task. SVN revision: 41224
2009-06-29 07:38:03 -07:00
2009-08-31 04:23:03 -07:00
/* location helpers */
EAPI E_Gadcon_Location *
2012-06-20 06:21:57 -07:00
e_gadcon_location_new(const char *name, E_Gadcon_Site site,
int (*add_func)(void *data, const E_Gadcon_Client_Class *cc),
void *add_data,
void (*remove_func)(void *data, E_Gadcon_Client *cc),
void *remove_data);
EAPI void e_gadcon_location_free(E_Gadcon_Location *loc);
EAPI void e_gadcon_location_register(E_Gadcon_Location *loc);
EAPI void e_gadcon_location_unregister(E_Gadcon_Location *loc);
EAPI void e_gadcon_location_set_icon_name(E_Gadcon_Location *loc, const char *name);
EAPI void e_gadcon_client_add_location_menu(E_Gadcon_Client *gcc, E_Menu *menu);
#define GADCON_CLIENT_CONFIG_GET(_type, _items, _gc_class, _id) \
if (!_id) \
{ \
char *_buf; \
int _num = 0; \
_type *_ci; \
if (_items) \
{ \
const char *_p; \
_ci = eina_list_last(_items)->data; \
_p = strrchr(_ci->id, '.'); \
if (_p) _num = atoi(_p + 1) + 1; \
} \
_buf = alloca(sizeof (char) * ((_gc_class.name ? strlen(_gc_class.name) : 6) + 11)); \
sprintf(_buf, "%s.%d", _gc_class.name, _num); \
_id = _buf; \
} \
else \
{ \
Eina_List *l; \
_type *_ci; \
EINA_LIST_FOREACH(_items, l, _ci) \
if ((_ci->id) && (!strcmp(_ci->id, _id))) return _ci; \
}
#endif
#endif