Enlightenment CVS committal Author : chaos Project : e17 Module : proto
Dir : e17/proto/entropy/src/include Modified Files: entropy.h entropy_core.h entropy_generic.h entropy_gui_event_handler.h entropy_mime_engine.h gui_component.h notification_engine.h plugin_base.h thumbnail_generic.h Log Message: * Begin migration to more rigid plugin structure, and do away with the dlopen/dlsym nastiness everywhere =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/entropy.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- entropy.h 31 Mar 2006 12:12:26 -0000 1.28 +++ entropy.h 2 Apr 2006 05:47:38 -0000 1.29 @@ -13,8 +13,19 @@ #include <stdlib.h> #include <unistd.h> +typedef struct entropy_gui_component_instance entropy_gui_component_instance; +typedef struct entropy_plugin entropy_plugin; /*deprecated*/ +typedef struct entropy_plugin Entropy_Plugin; /*New*/ +typedef struct Entropy_Plugin_Gui Entropy_Plugin_Gui; +typedef struct Entropy_Plugin_File Entropy_Plugin_File; +typedef struct Entropy_Plugin_Thumbnailer Entropy_Plugin_Thumbnailer; +typedef struct Entropy_Plugin_Thumbnailer_Distribution Entropy_Plugin_Thumbnailer_Distribution; +typedef struct Entropy_Plugin_Thumbnailer_Child Entropy_Plugin_Thumbnailer_Child; +typedef struct Entropy_Plugin_Mime Entropy_Plugin_Mime; + #include "entropy_generic.h" #include "string.h" +#include "entropy_gui.h" #include "plugin_base.h" #include "entropy_mime_engine.h" #include "entropy_thumbnailer_engine.h" @@ -33,6 +44,9 @@ #define ENTROPY_IPC_EVENT_LAYOUT_NEW 2 #define THUMBNAILER_DISTRIBUTION 0 #define THUMBNAILER_CHILD 1 + +/*Function names for dlopen*/ +#define ENTROPY_PLUGIN_INIT_FUNCTION "entropy_plugin_init" /*Plugin related functions*/ =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/entropy_core.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- entropy_core.h 31 Mar 2006 12:12:26 -0000 1.10 +++ entropy_core.h 2 Apr 2006 05:47:38 -0000 1.11 @@ -32,7 +32,7 @@ void* layout_global; /*The global layout context*/ entropy_notification_engine* notify; - entropy_plugin* layout_plugin; /* The main layout plugin that we are relying on */ + struct entropy_plugin* layout_plugin; /* The main layout plugin that we are relying on */ Ecore_List* selected_files; Ecore_Hash* descent_hash; =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/entropy_generic.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- entropy_generic.h 28 Mar 2006 10:31:14 -0000 1.17 +++ entropy_generic.h 2 Apr 2006 05:47:38 -0000 1.18 @@ -1,7 +1,6 @@ #ifndef __ENTROPY_GENERIC_H_ #define __ENTROPY_GENERIC_H_ -#include "plugin_base.h" #include "entropy_core.h" #include "thumbnail_generic.h" #include "limits.h" =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/entropy_gui_event_handler.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- entropy_gui_event_handler.h 1 Apr 2006 10:05:07 -0000 1.6 +++ entropy_gui_event_handler.h 2 Apr 2006 05:47:38 -0000 1.7 @@ -88,4 +88,14 @@ Entropy_Gui_Event_Handler_Instance_Data* entropy_event_handler_metadata_request_instance_data(entropy_gui_event* event, entropy_gui_component_instance* requestor); +/*Metadata available*/ +Entropy_Gui_Event_Handler* entropy_event_handler_metadata_available_handler(); +Entropy_Gui_Event_Handler_Instance_Data* entropy_event_handler_metadata_available_instance_data(entropy_gui_event* event, + entropy_gui_component_instance* requestor); + +/*User interaction*/ +Entropy_Gui_Event_Handler* entropy_event_handler_user_interaction_handler(); +Entropy_Gui_Event_Handler_Instance_Data* entropy_event_handler_user_interaction_instance_data(entropy_gui_event* event, + entropy_gui_component_instance* requestor); + #endif =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/entropy_mime_engine.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- entropy_mime_engine.h 1 Apr 2006 04:35:36 -0000 1.3 +++ entropy_mime_engine.h 2 Apr 2006 05:47:38 -0000 1.4 @@ -1,5 +1,6 @@ #ifndef _ENTROPY_MIME_ENGINE_H_ #define _ENTROPY_MIME_ENGINE_H_ + #include "entropy.h" typedef struct entropy_mime_action { =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/gui_component.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- gui_component.h 8 Dec 2005 09:01:36 -0000 1.2 +++ gui_component.h 2 Apr 2006 05:47:38 -0000 1.3 @@ -6,7 +6,6 @@ #define COMPONENT_ACTIVE 1 #define COMPONENT_INACTIVE 0 -typedef struct entropy_gui_component_instance entropy_gui_component_instance; struct entropy_gui_component_instance { entropy_core* core; /*A reference to the core we came from */ /*TODO when we absract this out, change this to a reference to the layout container*/ =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/notification_engine.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- notification_engine.h 1 Apr 2006 04:35:36 -0000 1.9 +++ notification_engine.h 2 Apr 2006 05:47:38 -0000 1.10 @@ -1,8 +1,6 @@ #ifndef __NOTIFICATION_ENGINE_H_ #define __NOTIFICATION_ENGINE_H_ -//#include <pthread.h> - enum ENTROPY_NOTIFY_TYPES { ENTROPY_NOTIFY_GENERIC = 0, ENTROPY_NOTIFY_THUMBNAIL_REQUEST =1, @@ -45,7 +43,7 @@ int event_type; - entropy_plugin* plugin; + struct entropy_plugin* plugin; char* function; void* data; int key; @@ -74,7 +72,7 @@ void entropy_notify_event_destroy(entropy_notify_event* eevent); void entropy_notify_request_destroy_list(entropy_notification_engine* notify, Ecore_List* list); -entropy_notify_event* entropy_notify_request_register(void* requestor, int event_type, entropy_plugin* request_plugin, char* request_function, void* request_data, Ecore_List* cleanup); +entropy_notify_event* entropy_notify_request_register(void* requestor, int event_type, struct entropy_plugin* request_plugin, char* request_function, void* request_data, Ecore_List* cleanup); void entropy_notify_event_callback_add(entropy_notify_event* event, void* cb, void* data); void entropy_notify_lock_loop(entropy_notification_engine* notify); =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/plugin_base.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- plugin_base.h 28 Mar 2006 10:31:14 -0000 1.5 +++ plugin_base.h 2 Apr 2006 05:47:38 -0000 1.6 @@ -2,6 +2,9 @@ #define __PLUGIN_BASE_H_ #include <limits.h> +#include <Ecore_Data.h> +#include <sys/types.h> +#include "entropy.h" enum ENTROPY_PLUGIN_TYPES { ENTROPY_PLUGIN_BACKEND_FILE , @@ -26,7 +29,6 @@ ENTROPY_MIME_PLUGIN_PRIORITY_HIGH }; -typedef struct entropy_plugin entropy_plugin; struct entropy_plugin { int type; int subtype; @@ -36,6 +38,57 @@ void* data; char* toolkit; + + struct { + Entropy_Plugin* (*entropy_plugin_init)(entropy_core*); + } functions; +}; +#define ENTROPY_PLUGIN(plugin) ((entropy_plugin *) plugin) + +struct Entropy_Plugin_Gui { + entropy_plugin base; + char* toolkit; + + struct { + entropy_gui_component_instance* (*layout_create)(entropy_core * core); + char* (*toolkit_get)(); + void (*layout_main)(); + + } gui_functions; +}; + +struct Entropy_Plugin_File { + entropy_plugin base; + + struct { + Ecore_List* (*structurelist_get)(char*); + struct stat* (*filestat_get)(entropy_file_request*); + Ecore_List* (*filelist_get) (entropy_file_request*); + void (*file_copy)(entropy_generic_file*,char*, entropy_gui_component_instance*); + + void (*file_rename) (entropy_generic_file * file_from, entropy_generic_file * file_to); + void (*operation_respond)(long id, int response); + void (*directory_create) (entropy_generic_file * parent, char* child_name); + void (*file_remove) (entropy_generic_file * file, entropy_gui_component_instance* instance); + + } file_functions; +}; +#define ENTROPY_PLUGIN_FILE(plugin) ((Entropy_Plugin_File *) plugin) + +struct Entropy_Plugin_Thumbnailer { + Entropy_Plugin base; +}; + +struct Entropy_Plugin_Thumbnailer_Distribution { + Entropy_Plugin_Thumbnailer base; +}; + +struct Entropy_Plugin_Thumbnailer_Child { + Entropy_Plugin_Thumbnailer base; +}; + +struct Entropy_Plugin_Mime { + Entropy_Plugin base; }; typedef struct entropy_mime_object entropy_mime_object; =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/include/thumbnail_generic.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- thumbnail_generic.h 19 Mar 2006 05:41:08 -0000 1.2 +++ thumbnail_generic.h 2 Apr 2006 05:47:38 -0000 1.3 @@ -1,7 +1,9 @@ #ifndef __THUMBNAIL_GENERIC_H_ #define __THUMBNAIL_GENERIC_H_ +#include <limits.h> #include "entropy_generic.h" + typedef struct entropy_thumbnail entropy_thumbnail; ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs