/* * Copyright (C) 2000-2003 Carsten Haitzler, Geoff Harrison and various contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies of the Software, its documentation and marketing & publicity * materials, and acknowledgment shall be given in the documentation, materials * and software packages that this Software was used. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "E.h" #include "timestamp.h" #include typedef struct _IPCstruct { void (*func) (char *params, Client * c); char *commandname; char *nick; char *help_text; char *extended_help_text; } IPCStruct; /* IPC array member function declarations */ /* this is needed for the IPC array below to not give us any warnings * during compiletime. Since we don't use these anywhere else and I * don't expect us to ever, we're not going to bother putting them in * E.h * --Mandrake */ static void IPC_Help(char *params, Client * c); static void IPC_Version(char *params, Client * c); static void IPC_Copyright(char *params, Client * c); static void IPC_AutoSave(char *params, Client * c); static void IPC_DefaultTheme(char *params, Client * c); static void IPC_Restart(char *params, Client * c); static void IPC_RestartWM(char *params, Client * c); static void IPC_RestartTheme(char *params, Client * c); static void IPC_Exit(char *params, Client * c); static void IPC_ForceSave(char *params, Client * c); static void IPC_SMFile(char *params, Client * c); static void IPC_ListThemes(char *params, Client * c); static void IPC_GotoDesktop(char *params, Client * c); static void IPC_ShowIcons(char *params, Client * c); static void IPC_FocusMode(char *params, Client * c); static void IPC_AdvancedFocus(char *params, Client * c); static void IPC_NumDesks(char *params, Client * c); static void IPC_NumAreas(char *params, Client * c); static void IPC_WinOps(char *params, Client * c); static void IPC_WinList(char *params, Client * c); static void IPC_GotoArea(char *params, Client * c); static void IPC_ButtonShow(char *params, Client * c); static void IPC_ActiveNetwork(char *params, Client * c); static void IPC_FX(char *params, Client * c); static void IPC_MoveMode(char *params, Client * c); static void IPC_ResizeMode(char *params, Client * c); static void IPC_GeomInfoMode(char *params, Client * c); static void IPC_Pager(char *params, Client * c); static void IPC_InternalList(char *params, Client * c); static void IPC_SetFocus(char *params, Client * c); static void IPC_DialogOK(char *params, Client * c); static void IPC_SoundClass(char *params, Client * c); static void IPC_ImageClass(char *params, Client * c); static void IPC_TextClass(char *params, Client * c); static void IPC_ActionClass(char *params, Client * c); static void IPC_ColorModifierClass(char *params, Client * c); static void IPC_Border(char *params, Client * c); static void IPC_Button(char *params, Client * c); static void IPC_Background(char *params, Client * c); static void IPC_Cursor(char *params, Client * c); static void IPC_PlaySoundClass(char *params, Client * c); static void IPC_ListClassMembers(char *params, Client * c); static void IPC_GeneralInfo(char *params, Client * c); static void IPC_Modules(char *params, Client * c); static void IPC_DockConfig(char *params, Client * c); static void IPC_MemDebug(char *params, Client * c); static void IPC_Remember(char *params, Client * c); static void IPC_CurrentTheme(char *params, Client * c); static void IPC_Nop(char *params, Client * c); static void IPC_Xinerama(char *params, Client * c); static void IPC_ConfigPanel(char *params, Client * c); static void IPC_RememberList(char *params, Client * c); /* Changes By Asmodean_ / #E@Efnet * * IPC_ReloadMenus(...) / reload_menus - Reloads menus from menus.cfg */ static void IPC_ReloadMenus(char *params, Client * c); static void IPC_GroupInfo(char *params, Client * c); static void IPC_GroupOps(char *params, Client * c); static void IPC_Group(char *params, Client * c); /* the IPC Array */ /* the format of an IPC member of the IPC array is as follows: * { * NameOfMyFunction, * "command_name", * "quick-help explanation", * "extended help data" * "may go on for several lines, be sure\n" * "to add line feeds when you need them and to \"quote\"\n" * "properly" * } * * when you add a function into this array, make sure you also add it into * the declarations above and also put the function in this file. PLEASE * if you add a new function in, add help to it also. since my end goal * is going to be to have this whole IPC usable by an end-user or to your * scripter, it should be easy to learn to use without having to crack * open the source code. * --Mandrake */ IPCStruct IPCArray[] = { { IPC_Help, "help", "?", "gives you this help screen", "Additional parameters will retrieve help on many topics - " "\"help \".\nuse \"help all\" for a list of commands."}, { IPC_Version, "version", "ver", "displays the current version of Enlightenment running", NULL}, { IPC_Nop, "nop", NULL, "IPC No-operation - returns nop", NULL}, { IPC_Copyright, "copyright", NULL, "displays copyright information for Enlightenment", NULL}, { IPC_AutoSave, "autosave", NULL, "toggle the Automatic Saving Feature", "Use \"autosave ?\" to list the current status\n" "use \"autosave on\" or \"autosave off\" to toggle the status"}, { IPC_DefaultTheme, "default_theme", NULL, "toggle the default theme", "Use \"default_theme ?\" to get the current default theme\n" "use \"default_theme /path/to/theme\"\n" "you can retrieve a list of available themes from the " "\"list_themes\" command"}, { IPC_Restart, "restart", NULL, "Restart Enlightenment", NULL}, { IPC_RestartWM, "restart_wm", NULL, "Restart another window manager", "Use \"restart_wm \" to start another window manager.\n" "Example: \"restart_wm fvwm\""}, { IPC_RestartTheme, "restart_theme", NULL, "Restart with another theme", "Use \"restart_theme \" to restart enlightenment " "with another theme\nExample: \"restart_theme icE\""}, { IPC_Exit, "exit", "q", "Exit Enlightenment", NULL}, { IPC_ForceSave, "save_config", "s", "Force Enlightenment to save settings now", NULL}, { IPC_SMFile, "sm_file", NULL, "Change the default prefix used for session saves", "Average users are encouraged not to touch this setting.\n" "Use \"sm_file ?\" to retrieve the current session management " "file prefix\nUse \"sm_file /path/to/prefix/filenameprefix\" " "to change."}, { IPC_ListThemes, "list_themes", "tl", "List currently available themes", NULL}, { IPC_GotoDesktop, "goto_desktop", "sd", "Change currently active destkop", "Use \"goto_desktop num\" to go to a specific desktop.\n" "Use \"goto_desktop next\" and \"goto_desktop prev\" to go to " "the next and\n previous desktop\n" "Use \"goto_desktop ?\" to find out what desktop you are " "currently on"}, { IPC_GotoArea, "goto_area", "sa", "Change currently active area", "Use \"goto_area \" to go to a specific desktop.\n" "Use \"goto_desktop next \" and \"goto_desktop " "prev \" to go to the next and\n " "previous areas\nUse \"goto_area ?\" to find out what area " "you are currently on"}, { IPC_ShowIcons, "show_icons", NULL, "Obsolete - Toggle the display of icons on the desktop", "Use \"show_icons on\" and \"show_icons off\" to change this setting\n" "Use \"show_icons ?\" to retrieve the current setting"}, { IPC_FocusMode, "focus_mode", "sf", "Change the current focus mode setting", "Use \"focus_mode \" to change the focus mode.\n" "Use \"focus_mode ?\" to retrieve the current setting\n" "Focus Types:\n" "click: This is the traditional click-to-focus mode.\n" "clicknograb: This is a similar focus mode, but without the " "grabbing of the click\n " "(you cannot click anywhere in a window to focus it)\n" "pointer: The focus will follow the mouse pointer\n" "sloppy: in sloppy-focus, the focus follows the mouse, " "but when over\n " "the desktop background the last window does not lose the focus"}, { IPC_AdvancedFocus, "advanced_focus", "sfa", "Toggle Advanced Focus Settings", "use \"advanced_focus