static void
_actions_register(E_Music_Control_Module_Context *ctxt)
{
   E_Action *action;
   if (ctxt->actions_set) return;

   action = e_action_add(ACTION_NEXT);
   action->func.go = _music_control;
   e_action_predef_name_set(_e_music_control_Name, ACTION_NEXT_NAME,
                            ACTION_NEXT, "next", NULL, 0);

   action = e_action_add(ACTION_PLAY_PAUSE);
   action->func.go = _music_control;
   e_action_predef_name_set(_e_music_control_Name, ACTION_PLAY_PAUSE_NAME,
                            ACTION_PLAY_PAUSE, "play", NULL, 0);

   action = e_action_add(ACTION_PREVIOUS);
   action->func.go = _music_control;
   e_action_predef_name_set(_e_music_control_Name, ACTION_PREVIOUS_NAME,
                            ACTION_PREVIOUS, "previous", NULL, 0);

   ctxt->actions_set = EINA_TRUE;
}
Beispiel #2
0
E_API void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_configure_registry_category_add("windows", 50, _("Windows"), NULL, "preferences-system-windows");
   e_configure_registry_item_add("windows/window_list", 70, _("Window Switcher"), NULL, "preferences-winlist", e_int_config_winlist);
   e_winlist_init();
   _winlist_act = eina_stringshare_add("winlist");
   /* add module supplied action */
   _act_winlist = e_action_add(_winlist_act);
   if (_act_winlist)
     {
        _act_winlist->func.go = _e_mod_action_winlist_cb;
        _act_winlist->func.go_mouse = _e_mod_action_winlist_mouse_cb;
        _act_winlist->func.go_wheel = _e_mod_action_winlist_wheel_cb;
        _act_winlist->func.go_key = _e_mod_action_winlist_key_cb;
        _act_winlist->func.go_edge = _e_mod_action_winlist_edge_cb;
        _act_winlist->func.go_signal = _e_mod_action_winlist_signal_cb;
        _act_winlist->func.go_acpi = _e_mod_action_winlist_acpi_cb;
        e_action_predef_name_set(N_("Window : List"), N_("Next Window"),
                                 "winlist", "next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Previous Window"),
                                 "winlist", "prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window of same class"), "winlist",
                                 "class-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window of same class"),
                                 "winlist", "class-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window class"), "winlist",
                                 "classes-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window class"),
                                 "winlist", "classes-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Left"),
                                 "winlist", "left", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Down"),
                                 "winlist", "down", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Up"),
                                 "winlist", "up", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Right"),
                                 "winlist", "right", NULL, 0);
     }
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #3
0
EAPI void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_exebuf_init();
   /* add module supplied action */
   act = e_action_add("exebuf");
   if (act)
     {
	act->func.go = _e_mod_action_exebuf_cb;
	e_action_predef_name_set(_("Launch"), _("Run Command Dialog"), "exebuf",
				 NULL, NULL, 0);
     }
   maug = e_int_menus_menu_augmentation_add_sorted
     ("main/1", _("Run Command"), _e_mod_menu_add, NULL, NULL, NULL);
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #4
0
E_API void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_syscon_init();
   /* add module supplied action */
   act = e_action_add("syscon");
   if (act)
     {
        act->func.go = _e_mod_action_syscon_cb;
        e_action_predef_name_set(N_("System"), N_("System Controls"), "syscon",
                                 NULL, NULL, 0);
     }
   maug = e_int_menus_menu_augmentation_add_sorted
       ("main/8", _("System"), _e_mod_menu_add, NULL, NULL, NULL);
   e_configure_registry_category_add("advanced", 80, _("Advanced"), NULL, "preferences-advanced");
   e_configure_registry_item_add("advanced/syscon", 10, _("System Controls"), NULL, "system-shutdown", e_int_config_syscon);
   e_syscon_gadget_init(m);
   e_module_delayed_set(m, 1);
   return m;
}
Beispiel #5
0
EAPI void *
e_modapi_init(E_Module *m)
{
   act = e_action_add("egauche");
   if (act)
     {
	act->func.go = _e_mod_action_cb;
	e_action_predef_name_set("EGauche", "Evaluate A Single Scheme Form",
				 "egauche", NULL, NULL, 1);
     }

   e_module_delayed_set(m, 0);
   e_module_priority_set(m, -1000);

   if (e_mod_gauche_init("egauche.scm") < 0)
     {
	printf("***e_mod_gauche_init failure.");
	return NULL;
     }

   return m;
}
EAPI void *
e_modapi_init(E_Module *m)
{
   Eina_List *l;
   Evry_Module *em;
   char buf[4096];

   _e_module_evry_log_dom = eina_log_domain_register
       ("e_module_everything", EINA_LOG_DEFAULT_COLOR);

   if (_e_module_evry_log_dom < 0)
     {
        EINA_LOG_ERR
          ("impossible to create a log domain for everything module");
        return NULL;
     }

   _mod_evry = m;

   /* add module supplied action */
   act = e_action_add("everything");
   if (act)
     {
        act->func.go = _e_mod_action_cb;
        act->func.go_edge = _e_mod_action_cb_edge;
        e_action_predef_name_set
          (_("Everything Launcher"),
          _("Show Everything Launcher"),
          "everything", "", NULL, 0);
     }

   maug = e_int_menus_menu_augmentation_add
       ("main/1", _e_mod_menu_add, NULL, NULL, NULL);

   e_configure_registry_category_add
     ("launcher", 80, _("Launcher"), NULL, "modules-launcher");

   snprintf(buf, sizeof(buf), "%s/e-module-everything.edj", e_module_dir_get(m));
   module_icon = eina_stringshare_add(buf);

   e_configure_registry_item_add
     ("launcher/run_everything", 40, _("Everything Configuration"),
     NULL, module_icon, evry_config_dialog);
   evry_init();

   _evry_type_init("NONE");
   _evry_type_init("FILE");
   _evry_type_init("DIRECTORY");
   _evry_type_init("APPLICATION");
   _evry_type_init("ACTION");
   _evry_type_init("PLUGIN");
   _evry_type_init("BORDER");
   _evry_type_init("TEXT");

   _config_init();

   _evry_events[EVRY_EVENT_ITEMS_UPDATE] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ITEM_SELECTED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ITEM_CHANGED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_ACTION_PERFORMED] = ecore_event_type_new();
   _evry_events[EVRY_EVENT_PLUGIN_SELECTED] = ecore_event_type_new();

   evry = E_NEW(Evry_API, 1);
   evry->log_dom = _e_module_evry_log_dom;
#define SET(func) (evry->func = &evry_##func);
   SET(api_version_check);
   SET(item_new);
   SET(item_free);
   SET(item_ref);
   SET(plugin_new);
   SET(plugin_free);
   SET(plugin_register);
   SET(plugin_unregister);
   SET(plugin_update);
   SET(plugin_find);
   SET(action_new);
   SET(action_free);
   SET(action_register);
   SET(action_unregister);
   SET(action_find);
   SET(api_version_check);
   SET(type_register);
   SET(icon_theme_get);
   SET(fuzzy_match);
   SET(util_exec_app);
   SET(util_url_escape);
   SET(util_url_unescape);
   SET(util_file_detail_set);
   SET(util_plugin_items_add);
   SET(util_md5_sum);
   SET(util_icon_get);
   SET(item_changed);
   SET(file_path_get);
   SET(file_url_get);
   SET(history_item_add);
   SET(history_types_get);
   SET(history_item_usage_set);
   SET(event_handler_add);
#undef SET

   evry_history_init();
   evry_plug_actions_init();
   evry_plug_apps_init(m);
   evry_plug_files_init(m);
   evry_plug_windows_init(m);
   evry_plug_settings_init(m);
   evry_plug_calc_init(m);
   e_datastore_set("evry_api", evry);

   EINA_LIST_FOREACH (e_datastore_get("evry_modules"), l, em)
     em->active = em->init(evry);

   evry_plug_collection_init();
   evry_plug_clipboard_init();
   evry_plug_text_init();
   evry_view_init();
   evry_view_help_init();
   evry_gadget_init();

   e_module_priority_set(m, -1000);
   e_module_delayed_set(m, 1);

   /* cleanup every hour :) */
   cleanup_timer = ecore_timer_add(3600, _cleanup_history, NULL);

   return m;
}
Beispiel #7
0
EAPI void *
e_modapi_init(E_Module *m)
{
   Eina_List *l, *ll, *lll;
   E_Manager *man;
   E_Container *con;
   E_Zone *zone;

   conf_module = m;

   /* Setup Entry in Config Panel */
   e_configure_registry_category_add("fileman", 100, _("Files"),
                                     NULL, "system-file-manager");
   e_configure_registry_item_add("fileman/fileman", 10, _("File Manager"),
                                 NULL, "system-file-manager",
                                 e_int_config_fileman);
   e_configure_registry_item_add("fileman/file_icons", 20, _("File Icons"),
                                 NULL, "preferences-file-icons",
                                 e_int_config_mime);
   /* Setup Config edd */
   _e_mod_fileman_config_load();

   /* add module supplied action */
   act = e_action_add("fileman");
   if (act)
     {
        act->func.go = _e_mod_action_fileman_cb;
        e_action_predef_name_set(N_("Launch"), N_("File Manager"),
                                 "fileman", NULL, "syntax: /path/to/dir or ~/path/to/dir or favorites or desktop, examples: /boot/grub, ~/downloads", 1);
     }
   maug = e_int_menus_menu_augmentation_add_sorted("main/1", _("Navigate"), _e_mod_menu_add, NULL, NULL, NULL);
   e_module_delayed_set(m, 1);

   e_fwin_init();

   /* Hook into zones */
   for (l = e_manager_list(); l; l = l->next)
     {
        man = l->data;
        for (ll = man->containers; ll; ll = ll->next)
          {
             con = ll->data;
             for (lll = con->zones; lll; lll = lll->next)
               {
                  zone = lll->data;
                  if (e_fwin_zone_find(zone)) continue;
                  if (fileman_config->view.show_desktop_icons)
                    e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
               }
          }
     }
   zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD,
                                              _e_mod_zone_add, NULL);

   /* FIXME: add system event for new zone creation, and on creation, add an fwin to the zone */

   e_fileman_dbus_init();

   e_fwin_nav_init();
   
   return m;
}
Beispiel #8
0
EAPI void *
e_modapi_init(E_Module *m)
{
   char buf[4096];

   /* Set up a new configuration panel */
   snprintf(buf, sizeof(buf), "%s/e-module-gadman.edj", m->dir);
   e_configure_registry_category_add("extensions", 90, _("Extensions"), NULL, 
                                     "preferences-extensions");
   e_configure_registry_item_add("extensions/gadman", 150, _("Gadgets"), NULL, 
                                 buf, _config_gadman_module);

   /* Set this module to be loaded after all other modules, or we don't see
    modules loaded after this */
   e_module_priority_set(m, 100);

   gadman_init(m);

   //Settings values
   Man->conf_edd = E_CONFIG_DD_NEW("Gadman_Config", Config);
#undef T
#undef D
#define T Config
#define D Man->conf_edd
   E_CONFIG_VAL(D, T, bg_type, INT);
   E_CONFIG_VAL(D, T, color_r, INT);
   E_CONFIG_VAL(D, T, color_g, INT);
   E_CONFIG_VAL(D, T, color_b, INT);
   E_CONFIG_VAL(D, T, color_a, INT);
   E_CONFIG_VAL(D, T, anim_bg, INT);
   E_CONFIG_VAL(D, T, anim_gad, INT);
   E_CONFIG_VAL(D, T, custom_bg, STR);
   
   Man->conf = e_config_domain_load("module.gadman", Man->conf_edd);
   if (!Man->conf)
     {
	Man->conf = E_NEW(Config, 1);
	Man->conf->bg_type = 0;
	Man->conf->color_r = 255;
	Man->conf->color_g = 255;
	Man->conf->color_b = 255;
	Man->conf->color_a = 255;
	Man->conf->anim_bg = 1;
	Man->conf->anim_gad = 1;
	Man->conf->custom_bg = NULL;
     }
   E_CONFIG_LIMIT(Man->conf->bg_type, 0, 5);
   E_CONFIG_LIMIT(Man->conf->color_r, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_g, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_b, 0, 255);
   E_CONFIG_LIMIT(Man->conf->color_a, 0, 255);
   E_CONFIG_LIMIT(Man->conf->anim_bg, 0, 1);
   E_CONFIG_LIMIT(Man->conf->anim_gad, 0, 1);

   /* Menu augmentation */
   Man->icon_name = eina_stringshare_add(buf);
   Man->maug = NULL;
   Man->maug = 
     e_int_menus_menu_augmentation_add_sorted
     ("config/1", _("Gadgets"), _gadman_maug_add, (void *)Man->icon_name,
      NULL, NULL);
   /* Create toggle action */
   Man->action = e_action_add("gadman_toggle");
   if (Man->action)
     {
	Man->action->func.go = _gadman_action_cb;
	e_action_predef_name_set(_("Gadgets"), _("Show/hide gadgets"),
				 "gadman_toggle", NULL, NULL, 0);
     }

   gadman_update_bg();

   return Man;
}