enlightenment/src/modules/quickaccess/e_mod_main.h

106 lines
3.5 KiB
C
Raw Normal View History

super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "e.h"
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
typedef struct E_Quick_Access_Entry
{
const char *id; /* entry identifier (config, actions...), stringshared */
const char *name; /* icccm name, stringshared */
const char *class; /* icccm class, stringshared */
const char *cmd; /* stringshared */
Ecore_X_Window win; /* current window */
compositor rewrite / charlie-foxtrot situation huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once. * compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine. ** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes ** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects ** protocol-specific window management and compositor functionality is now kept exclusively in backend files ** e_pixmap api provides generic client finding and rendering api ** screen/xinerama screens are now provided directly by compositor on startup and re-set on change ** e_comp_render_update finally replaced with eina_tiler ** wayland compositor no longer creates X windows ** compositor e_layout removed entirely * e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra * e_manager is just for screensaver and keybind stuff now, possibly remove later? * e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor ** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed. *** do NOT set interceptors on a client's comp_object. seriously. * startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor * ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get * e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas * deskmirror is (more) broken for now * illume is totally fucked * Ecore_X_Window replaced with Ecore_Window in most cases * edge binding XWindows replaced with regular canvas objects * some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result comp files and descriptions: e_comp.c - overall compositor functions, rendering/update loop, shape cutting e_comp_x.c - X window management and compositor functionality e_comp_wl.c - Wayland surface management and compositor functionality e_comp_canvas.c - general compositor canvas functions and utilities e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems additional authors: ivan.briano@intel.com feature: new compositor removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
E_Client *client; /* associated client, if any */
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
Ecore_Event_Handler *exe_handler; /* for catching exe delete */
Ecore_Exe *exe; /* if executed cmd but still no border associated */
E_Dialog *dia; // used for option handling
void *cfg_entry; // created by config dialog
struct
{
Eina_Bool autohide; // hide when focus lost
Eina_Bool hide_when_behind; // hide when window is not focused instead of raising
Eina_Bool hidden; // FIXME: used for tracking current state to restore on restart
Eina_Bool relaunch; // reopen on exit
Eina_Bool jump; // don't hide window, just jump to it when activated
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
} config;
Eina_Bool transient;
Eina_Bool help_watch; // tutorial is currently watching for this entry
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
} E_Quick_Access_Entry;
typedef struct Config
{
unsigned int config_version;
Eina_List *entries;
Eina_List *transient_entries;
Eina_Bool autohide;
Eina_Bool hide_when_behind;
Eina_Bool skip_window_list;
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
Eina_Bool skip_taskbar;
Eina_Bool skip_pager;
Eina_Bool dont_bug_me;
Eina_Bool first_run; // set to disable help popups
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
} Config;
typedef struct Mod
{
E_Module *module;
E_Config_Dialog *cfd;
E_Object *help_dia;
E_Dialog *demo_dia;
unsigned int demo_state;
Ecore_Timer *help_timer;
Ecore_Timer *help_timeout;
E_Menu *menu;
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
} Mod;
extern Config *qa_config;
extern Mod *qa_mod;
extern int _e_quick_access_log_dom;
extern const char *_act_toggle;
#undef DBG
#undef INF
#undef WRN
#undef ERR
#undef CRIT
#define DBG(...) EINA_LOG_DOM_DBG(_e_quick_access_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_e_quick_access_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_e_quick_access_log_dom, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_e_quick_access_log_dom, __VA_ARGS__)
#define CRIT(...) EINA_LOG_DOM_CRIT(_e_quick_access_log_dom, __VA_ARGS__)
Eina_Bool e_qa_init(void);
void e_qa_shutdown(void);
void e_qa_entry_free(E_Quick_Access_Entry *entry);
E_Quick_Access_Entry *e_qa_entry_new(const char *id, Eina_Bool transient);
void e_qa_entries_update(void);
Eina_Bool e_qa_entry_rename(E_Quick_Access_Entry *entry, const char *name);
E_Config_DD *e_qa_config_dd_new(void);
void e_qa_config_free(Config *conf);
Config *e_qa_config_new(void);
void *e_qa_config_dd_free(void);
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
void e_qa_config_entry_free(E_Quick_Access_Entry *entry);
void e_qa_config_entry_add(E_Quick_Access_Entry *entry);
void e_qa_config_entry_transient_convert(E_Quick_Access_Entry *entry);
E_Config_Dialog *e_int_config_qa_module(Evas_Object *parent, const char *params EINA_UNUSED);
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
char *e_qa_db_class_lookup(const char *class);
void e_qa_entry_bindings_cleanup(E_Quick_Access_Entry *entry);
void e_qa_entry_bindings_rename(E_Quick_Access_Entry *entry, const char *name);
E_API int e_modapi_shutdown(E_Module *m EINA_UNUSED);
super sekrit module mostly complete: introducing the new and rewritten quickaccess module! found in the Launcher category, this module allows for windows to be hidden/shown using bindings, and can be used to turn any window/application into a quake-style drop-down terminal or whatever else you would use triggered window hiding/showing for. config options: * autohide - hides window when focus is lost * hide instead of raise - by default, qa will raise an activated window if it doesn't have focus; use this option to make it hide instead of raising * automatically reopen when closed - this option, when set, causes qa to relaunch the application which created the window if the window is closed. it should (probably) only be used for terminals, and requires some magic for setting window names on terminals which I have created some infra for extending to non-standard terminal types; currently all xterm clones, urxvt, and terminology are supported. note that setting this option will cause the entry to become permanent, as any entry which is set to restart itself when closed cannot be transient * transient - a window added to qa is initially a transient entry, meaning it's temporary: once you close the window, the binding is deleted, though the binding will remain if you restart e17. if you uncheck this option, it will become a permanent entry which can only be deleted either through the quickaccess advanced settings or the keybindings dialog. fun fact: you can get to the quickaccess settings faster by clicking the Quickaccess... border menu item SVN revision: 75550
2012-08-22 06:55:41 -07:00
#endif