forked from enlightenment/enlightenment
Add skeleton acpi_bindings dialog (not complete yet and not
useful...just blank). SVN revision: 49114
This commit is contained in:
parent
6336dcebbf
commit
cd205d95d1
|
@ -162,6 +162,10 @@ if USE_MODULE_CONF_EDGEBINDINGS
|
||||||
SUBDIRS += conf_edgebindings
|
SUBDIRS += conf_edgebindings
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_MODULE_CONF_ACPIBINDINGS
|
||||||
|
SUBDIRS += conf_acpibindings
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_MODULE_CONF_MOUSE
|
if USE_MODULE_CONF_MOUSE
|
||||||
SUBDIRS += conf_mouse
|
SUBDIRS += conf_mouse
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
MODULE = conf_acpibindings
|
||||||
|
|
||||||
|
# data files for the module
|
||||||
|
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
|
||||||
|
files_DATA = \
|
||||||
|
module.desktop
|
||||||
|
|
||||||
|
EXTRA_DIST = $(files_DATA)
|
||||||
|
|
||||||
|
# the module .so file
|
||||||
|
INCLUDES = -I. \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_srcdir)/src/modules/$(MODULE) \
|
||||||
|
-I$(top_srcdir)/src/bin \
|
||||||
|
-I$(top_srcdir)/src/lib \
|
||||||
|
-I$(top_srcdir)/src/modules \
|
||||||
|
@e_cflags@
|
||||||
|
pkgdir = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH)
|
||||||
|
pkg_LTLIBRARIES = module.la
|
||||||
|
module_la_SOURCES = e_mod_main.c \
|
||||||
|
e_mod_main.h \
|
||||||
|
e_int_config_acpibindings.c \
|
||||||
|
e_int_config_acpibindings.h
|
||||||
|
|
||||||
|
module_la_LIBADD = @e_libs@ @dlopen_libs@
|
||||||
|
module_la_LDFLAGS = -module -avoid-version
|
||||||
|
module_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
|
|
@ -0,0 +1,80 @@
|
||||||
|
#include "e.h"
|
||||||
|
|
||||||
|
/* local config structure */
|
||||||
|
struct _E_Config_Dialog_Data
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/* local function prototypes */
|
||||||
|
static void *_create_data(E_Config_Dialog *cfd);
|
||||||
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||||
|
|
||||||
|
E_Config_Dialog *
|
||||||
|
e_int_config_acpibindings(E_Container *con, const char *params __UNUSED__)
|
||||||
|
{
|
||||||
|
E_Config_Dialog *cfd;
|
||||||
|
E_Config_Dialog_View *v;
|
||||||
|
|
||||||
|
if (e_config_dialog_find("E", "keyboard_and_mouse/acpi_bindings"))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
v = E_NEW(E_Config_Dialog_View, 1);
|
||||||
|
v->create_cfdata = _create_data;
|
||||||
|
v->free_cfdata = _free_data;
|
||||||
|
v->basic.apply_cfdata = _basic_apply;
|
||||||
|
v->basic.create_widgets = _basic_create;
|
||||||
|
|
||||||
|
cfd = e_config_dialog_new(con, _("ACPI Bindings"), "E",
|
||||||
|
"keyboard_and_mouse/acpi_bindings",
|
||||||
|
"preferences-desktop-keyboard-shortcuts",
|
||||||
|
0, v, NULL);
|
||||||
|
|
||||||
|
return cfd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* local functions */
|
||||||
|
static void *
|
||||||
|
_create_data(E_Config_Dialog *cfd)
|
||||||
|
{
|
||||||
|
E_Config_Dialog_Data *cfdata;
|
||||||
|
|
||||||
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||||
|
return cfdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
|
{
|
||||||
|
E_FREE(cfdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Evas_Object *
|
||||||
|
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
{
|
||||||
|
Evas_Object *ol, *of, *ow;
|
||||||
|
|
||||||
|
ol = e_widget_list_add(evas, 0, 1);
|
||||||
|
|
||||||
|
of = e_widget_frametable_add(evas, _("ACPI Bindings"), 0);
|
||||||
|
ow = e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), NULL);
|
||||||
|
e_widget_size_min_set(ow, 200, 200);
|
||||||
|
e_widget_frametable_object_append(of, ow, 0, 0, 2, 1, 1, 1, 1, 1);
|
||||||
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
||||||
|
|
||||||
|
of = e_widget_framelist_add(evas, _("Action"), 0);
|
||||||
|
ow = e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), NULL);
|
||||||
|
e_widget_size_min_set(ow, 200, 200);
|
||||||
|
e_widget_framelist_object_append(of, ow);
|
||||||
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
||||||
|
|
||||||
|
return ol;
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
#else
|
||||||
|
#ifndef E_INT_CONFIG_ACPIBINDINGS_H
|
||||||
|
#define E_INT_CONFIG_ACPIBINDINGS_H
|
||||||
|
|
||||||
|
E_Config_Dialog *e_int_config_acpibindings(E_Container *con, const char *params __UNUSED__);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
|
#include "e.h"
|
||||||
|
#include "e_mod_main.h"
|
||||||
|
|
||||||
|
/* actual module specifics */
|
||||||
|
static E_Module *conf_module = NULL;
|
||||||
|
|
||||||
|
/* module setup */
|
||||||
|
EAPI E_Module_Api e_modapi =
|
||||||
|
{
|
||||||
|
E_MODULE_API_VERSION, "Settings - ACPI Bindings"
|
||||||
|
};
|
||||||
|
|
||||||
|
EAPI void *
|
||||||
|
e_modapi_init(E_Module *m)
|
||||||
|
{
|
||||||
|
e_configure_registry_category_add("keyboard_and_mouse", 40,
|
||||||
|
_("Input"), NULL, "preferences-behavior");
|
||||||
|
e_configure_registry_item_add("keyboard_and_mouse/acpi_bindings", 10,
|
||||||
|
_("ACPI Bindings"), NULL,
|
||||||
|
"preferences-desktop-keyboard-shortcuts",
|
||||||
|
e_int_config_acpibindings);
|
||||||
|
conf_module = m;
|
||||||
|
e_module_delayed_set(m, 1);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
e_modapi_shutdown(E_Module *m)
|
||||||
|
{
|
||||||
|
E_Config_Dialog *cfd;
|
||||||
|
|
||||||
|
if (cfd = e_config_dialog_get("E", "keyboard_and_mouse/acpi_bindings"))
|
||||||
|
e_object_del(E_OBJECT(cfd));
|
||||||
|
e_configure_registry_item_del("keyboard_and_mouse/acpi_bindings");
|
||||||
|
e_configure_registry_category_del("keyboard_and_mouse");
|
||||||
|
conf_module = NULL;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
e_modapi_save(E_Module *m)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
|
#ifndef E_MOD_MAIN_H
|
||||||
|
#define E_MOD_MAIN_H
|
||||||
|
|
||||||
|
#define E_TYPEDEFS 1
|
||||||
|
#include "e_int_config_acpibindings.h"
|
||||||
|
|
||||||
|
#undef E_TYPEDEFS
|
||||||
|
#include "e_int_config_acpibindings.h"
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Link
|
||||||
|
Name=Settings - ACPI Bindings
|
||||||
|
Icon=preferences-desktop-keyboard-shortcuts
|
||||||
|
Comment=Configure your ACPI bindings here.
|
||||||
|
X-Enlightenment-ModuleType=config
|
Loading…
Reference in New Issue