4 typedef struct _Evry_Plugin Evry_Plugin;
5 typedef struct _Plugin_Config Plugin_Config;
6 typedef struct _Evry_Item Evry_Item;
7 typedef struct _Evry_Item_App Evry_Item_App;
8 typedef struct _Evry_Item_File Evry_Item_File;
9 typedef struct _Evry_Action Evry_Action;
10 typedef struct _History_Item History_Item;
11 typedef struct _History_Entry History_Entry;
12 typedef struct _History_Types History_Types;
13 typedef struct _Evry_State Evry_State;
15 typedef unsigned int Evry_Type;
19 /* label to show for this item (stringshared) */
22 /* optional: (stringshared) more information to be shown */
25 /* optional: (stringshared) fdo icon name, otherwise use _icon_get */
28 /* item can be browsed, e.g. folders */
31 /* optional: for internally use by plugins */
34 /* optional: priority hints for sorting */
37 /* optional: store value of fuzzy match with input */
40 /* optional: plugin can set id to identify
41 * it in history otherwise label is used */
44 /* optional: context provided by item. e.g. to remember which action
45 * was performed on a file with a specific mimetype */
48 /* is set to type of Evry_Plugin by default */
54 Evas_Object *(*icon_get) (Evry_Item *it, Evas *e);
55 void (*free) (Evry_Item *it);
76 /* requested type for action */
79 /* handle multiple items */
80 Eina_Bool accept_list;
83 const Evry_Item *item;
91 Eina_Bool accept_list;
94 const Evry_Item *item;
99 /* optional: this action is specific for a item 'context'.
100 e.g. 'copy' for file mime-type is not, 'image viewer' is.
102 Eina_Bool remember_context;
104 /* required: do something */
105 int (*action) (Evry_Action *act);
107 /* optional: check whether action fits to chosen item */
108 int (*check_item) (Evry_Action *act, const Evry_Item *it);
110 void (*free) (Evry_Action *act);
111 /* optional: must be defined when action is browseable, return
112 list of Evry_Action items */
113 Eina_List *(*fetch) (Evry_Action *act);
116 struct _Evry_Item_App
120 Efreet_Desktop *desktop;
123 struct _Evry_Item_File
126 /* path and url must always be checked with
127 evry_file_path/uri_get before use !!! */
132 unsigned int modified;
142 /* list of items visible for everything after fetch */
145 /* required: get candidates matching string, fill 'items' list */
146 int (*fetch) (Evry_Plugin *p, const char *input);
148 /* required: run when state is removed in which this plugin is
149 active. free 'items' here */
150 void (*finish) (Evry_Plugin *p);
152 /* plugin is added to the list of current plugins and
153 queried for results when not returning NULL. The previous
154 selectors item is passed, i.e. a plugin registered as action
155 receives the subject, a plugin registered as object receives the
156 action item. here you can check wheter the plugin can be queried,
157 for given context (provided by item) */
158 Evry_Plugin *(*begin) (Evry_Plugin *p, const Evry_Item *item);
160 /* optional: provide a list of subitems of 'item'. this function
161 must return a new instance which must be freed in 'finish' */
162 Evry_Plugin *(*browse) (Evry_Plugin *p, const Evry_Item *item);
164 /* optional: try to complete current item:
165 return: EVRY_COMPLETE_INPUT when input was changed
166 return: EVRY_COMPLETE_BROWSE to browse item */
167 int (*complete) (Evry_Plugin *p, const Evry_Item *item, char **input);
169 /* optional: handle key events: return positive when key was
171 int (*cb_key_down) (Evry_Plugin *p, const Ecore_Event_Key *ev);
173 /* optional: use this when begin returned a new instance or you
174 have extended plugin struct */
175 void (*free) (Evry_Plugin *p);
177 /* optiona: actions only used with this plugin, dont require */
180 /* optional: set type which the plugin can handle in begin */
181 Evry_Type input_type;
183 /* optional: whether the plugin uses evry_async_update to add new items */
185 Eina_Bool async_fetch;
187 /* optional: request items to be remembered for usage statistic */
191 /* optional: if transient, item is removed from history on cleanup */
195 /* optional: config path registered for the module, to show
196 'configure' button in everything config */
197 const char *config_path;
199 /* set theme file to fetch icons from */
200 const char *theme_path;
202 /* not to be set by plugin! */
203 Plugin_Config *config;
204 unsigned int request;
208 struct _Plugin_Config
214 /* request initial sort order of this plugin */
217 /* trigger to show plugin exclusively */
220 /* only show plugin when triggered */
223 /* preffered view mode */
226 /* minimum input char to start query items,
227 this must be handled by plugin */
230 /* show items of plugin in aggregator */
233 /* if not top-level the plugin is shown in aggregator
234 instead of the items */
237 /* Eina_Hash *settings; */
257 struct _History_Entry
262 struct _History_Types