forked from enlightenment/enlightenment
Add new module files with e_modapi functions needed for module creation.
Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 81072
This commit is contained in:
parent
3b74f38de2
commit
da45a71d87
|
@ -0,0 +1,51 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
#include "e_int_config_randr.h"
|
||||
|
||||
/* external variables */
|
||||
const char *mod_dir = NULL;
|
||||
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION, "Settings - Screen Setup"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
e_configure_registry_category_add("screen", 30, _("Screen"),
|
||||
NULL, "preferences-desktop-display");
|
||||
e_configure_registry_item_add("screen/randr", 20, _("Screen Setup"), NULL,
|
||||
"preferences-system-screen-resolution",
|
||||
e_int_config_randr);
|
||||
|
||||
/* store the modules working directory for use later */
|
||||
mod_dir = eina_stringshare_add(m->dir);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
|
||||
/* destroy existing dialogs */
|
||||
while ((cfd = e_config_dialog_get("E", "screen/randr")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
|
||||
/* free module working directory */
|
||||
if (mod_dir) eina_stringshare_del(mod_dir);
|
||||
mod_dir = NULL;
|
||||
|
||||
e_configure_registry_item_del("screen/randr");
|
||||
e_configure_registry_category_del("screen");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_save(E_Module *m __UNUSED__)
|
||||
{
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef E_MOD_MAIN_H
|
||||
# define E_MOD_MAIN_H
|
||||
|
||||
# ifndef ECORE_X_RANDR_1_2
|
||||
# define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
|
||||
# endif
|
||||
|
||||
# ifndef ECORE_X_RANDR_1_3
|
||||
# define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
|
||||
# endif
|
||||
|
||||
# ifndef E_RANDR_12
|
||||
# define E_RANDR_12 (e_randr_screen_info.rrvd_info.randr_info_12)
|
||||
# endif
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init(E_Module *m);
|
||||
EAPI int e_modapi_shutdown(E_Module *m);
|
||||
EAPI int e_modapi_save(E_Module *m);
|
||||
|
||||
extern const char *mod_dir;
|
||||
|
||||
/**
|
||||
* @addtogroup Optional_Conf
|
||||
* @{
|
||||
*
|
||||
* @defgroup Module_Conf_RandR RandR (Screen Resize, Rotate and Mirror)
|
||||
*
|
||||
* Configures size, rotation and mirroring of screen. Uses the X11
|
||||
* RandR protocol (does not work with NVidia proprietary drivers).
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue