1. compositor module skeletion. have more code elsehwere currently

2. lutin patch for path_max



SVN revision: 44874
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 13 years ago
parent 3ec7e23d3f
commit 5ebb87d158
  1. 5
      configure.ac
  2. 33
      m4/efl_path_max.m4
  3. 7
      src/modules/Makefile.am
  4. 7
      src/modules/comp/.cvsignore
  5. 33
      src/modules/comp/Makefile.am
  6. BIN
      src/modules/comp/e-module-comp.edj
  7. 15
      src/modules/comp/e_mod_comp.c
  8. 8
      src/modules/comp/e_mod_comp.h
  9. 175
      src/modules/comp/e_mod_config.c
  10. 7
      src/modules/comp/e_mod_config.h
  11. 79
      src/modules/comp/e_mod_main.c
  12. 32
      src/modules/comp/e_mod_main.h
  13. 6
      src/modules/comp/module.desktop.in
  14. 4
      x-ui.sh

@ -30,6 +30,8 @@ AC_PROG_LIBTOOL
AC_SUBST(release)
EFL_CHECK_PATH_MAX
AC_CHECK_FUNCS(setenv)
AC_CHECK_FUNCS(unsetenv)
@ -485,6 +487,7 @@ AC_E_OPTIONAL_MODULE([illume2], true)
AC_E_OPTIONAL_MODULE([syscon], true)
AC_E_OPTIONAL_MODULE([everything], true)
AC_E_OPTIONAL_MODULE([systray], true)
AC_E_OPTIONAL_MODULE([comp], true)
AC_OUTPUT([
Makefile
@ -645,6 +648,8 @@ src/modules/everything/module.desktop
src/modules/everything/everything.pc
src/modules/systray/Makefile
src/modules/systray/module.desktop
src/modules/comp/Makefile
src/modules/comp/module.desktop
src/preload/Makefile
data/Makefile
data/images/Makefile

@ -0,0 +1,33 @@
dnl Check for PATH_MAX in limits.h, and define a default value if not found
dnl This is a workaround for systems not providing PATH_MAX, like GNU/Hurd
dnl EFL_CHECK_PATH_MAX([DEFAULT_VALUE_IF_NOT_FOUND])
dnl
dnl If PATH_MAX is not defined in <limits.h>, defines it
dnl to DEFAULT_VALUE_IF_NOT_FOUND if it exists, or fallback
dnl to using 4096
AC_DEFUN([EFL_CHECK_PATH_MAX],
[
default_max=m4_default([$1], "4096")
AC_LANG_PUSH([C])
AC_MSG_CHECKING([for PATH_MAX in limit.h])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <limits.h>]],
[[int i = PATH_MAX]])
],
AC_MSG_RESULT([yes]),
[
AC_DEFINE_UNQUOTED([PATH_MAX],
[${default_max}],
[default value since PATH_MAX is not defined])
AC_MSG_RESULT([no: using ${default_max}])
]
)
AC_LANG_POP([C])
])
dnl end of efl_path_max.m4

@ -258,6 +258,10 @@ if USE_MODULE_SYSTRAY
SUBDIRS += systray
endif
if USE_MODULE_COMP
SUBDIRS += comp
endif
DIST_SUBDIRS = \
ibar \
@ -329,4 +333,5 @@ illume-kbd-toggle \
illume-mode-toggle \
syscon \
everything \
systray
systray \
comp

@ -0,0 +1,7 @@
.deps
.libs
Makefile
Makefile.in
*.lo
module.la
module.desktop

@ -0,0 +1,33 @@
MAINTAINERCLEANFILES = Makefile.in
MODULE = comp
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
e-module-$(MODULE).edj 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_mod_config.c \
e_mod_config.h \
e_mod_comp.c \
e_mod_comp.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,15 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_comp.h"
#include "config.h"
Eina_Bool
e_mod_comp_init(void)
{
return 1;
}
void
e_mod_comp_shutdown(void)
{
}

@ -0,0 +1,8 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_MOD_COMP_H
#define E_MOD_COMP_H
Eina_Bool e_mod_comp_init(void);
void e_mod_comp_shutdown(void);
#endif
#endif

@ -0,0 +1,175 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "config.h"
struct _E_Config_Dialog_Data
{
int x;
};
/* Protos */
static void *_create_data (E_Config_Dialog *cfd);
static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static int _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
E_Config_Dialog *
e_int_config_comp_module(E_Container *con, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
char buf[4096];
Mod *mod = _comp_mod;
if (e_config_dialog_find("E", "appearance/comp")) 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_data;
v->basic.create_widgets = _basic_create_widgets;
snprintf(buf, sizeof(buf), "%s/e-module-comp.edj",
e_module_dir_get(mod->module));
cfd = e_config_dialog_new(con,
_("Composite Settings"),
"E", "appearance/comp",
buf, 0, v, mod);
mod->config_dialog = cfd;
return cfd;
}
static void *
_create_data(E_Config_Dialog *cfd)
{
/*
E_Config_Dialog_Data *cfdata;
Dropshadow *ds;
ds = cfd->data;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(ds, cfdata);
return cfdata;
*/
return NULL;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/*
Dropshadow *ds;
ds = cfd->data;
ds->config_dialog = NULL;
free(cfdata);
*/
}
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *ob, *of, *ot;
E_Radio_Group *rg;
o = e_widget_list_add(evas, 0, 0);
ot = e_widget_table_add(evas, 1);
of = e_widget_framelist_add(evas, _("Quality"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->x));
ob = e_widget_radio_add(evas, _("X"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Y"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Z"), 4, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
/*
of = e_widget_framelist_add(evas, _("Blur Type"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->blur_size));
ob = e_widget_radio_add(evas, _("Very Fuzzy"), 80, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Fuzzy"), 40, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Medium"), 20, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Sharp"), 10, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Sharp"), 5, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Distance"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->shadow_x));
ob = e_widget_radio_add(evas, _("Very Far"), 32, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Far"), 16, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Near"), 8, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Near"), 4, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Extremely Near"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Underneath"), 0, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Shadow Darkness"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->darkness));
ob = e_widget_radio_add(evas, _("Very Dark"), 0, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Dark"), 1, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Light"), 2, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Very Light"), 3, rg);
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.5);
*/
return o;
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/*
Dropshadow *ds;
ds = cfd->data;
e_border_button_bindings_ungrab_all();
ds->conf->quality = cfdata->quality;
ds->conf->blur_size = cfdata->blur_size;
ds->conf->shadow_x = cfdata->shadow_x;
ds->conf->shadow_y = cfdata->shadow_x;
switch (cfdata->darkness)
{
case 0:
ds->conf->shadow_darkness = 1.0;
break;
case 1:
ds->conf->shadow_darkness = 0.75;
break;
case 2:
ds->conf->shadow_darkness = 0.5;
break;
case 3:
ds->conf->shadow_darkness = 0.25;
break;
}
e_config_save_queue();
e_border_button_bindings_grab_all();
_dropshadow_cb_config_updated(ds);
*/
return 1;
}

@ -0,0 +1,7 @@
#ifdef E_TYPEDEFS
#else
#ifndef E_MOD_CONFIG_H
#define E_MOD_CONFIG_H
E_Config_Dialog *e_int_config_comp_module(E_Container *con, const char *params __UNUSED__);
#endif
#endif

@ -0,0 +1,79 @@
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_mod_comp.h"
/* module private routines */
Mod *_comp_mod = NULL;
/* public module routines. all modules must have these */
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION,
"Composite"
};
EAPI void *
e_modapi_init(E_Module *m)
{
Mod *mod;
char buf[4096];
mod = calloc(1, sizeof(Mod));
mod->module = m;
snprintf(buf, sizeof(buf), "%s/e-module-comp.edj", e_module_dir_get(m));
e_configure_registry_category_add("appearance", 10, _("Look"), NULL, "preferences-appearance");
e_configure_registry_item_add("appearance/comp", 120, _("Composite"), NULL, buf, e_int_config_comp_module);
mod->conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
#undef T
#undef D
#define T Config
#define D mod->conf_edd
E_CONFIG_VAL(D, T, x, INT);
mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
if (!mod->conf)
{
mod->conf = E_NEW(Config, 1);
mod->conf->x = 1;
}
E_CONFIG_LIMIT(mod->conf->x, -2, 2);
_comp_mod = mod;
e_mod_comp_init();
return mod;
}
EAPI int
e_modapi_shutdown(E_Module *m)
{
Mod *mod = m->data;
e_mod_comp_shutdown();
e_configure_registry_item_del("appearance/comp");
e_configure_registry_category_del("appearance");
if (mod->config_dialog)
{
e_object_del(E_OBJECT(mod->config_dialog));
mod->config_dialog = NULL;
}
free(mod->conf);
E_CONFIG_DD_FREE(mod->conf_edd);
free(mod);
return 1;
}
EAPI int
e_modapi_save(E_Module *m)
{
Mod *mod = m->data;
e_config_domain_save("module.comp", mod->conf_edd, mod->conf);
return 1;
}

@ -0,0 +1,32 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
typedef struct _Config Config;
typedef struct _Mod Mod;
struct _Config
{
int x;
};
struct _Mod
{
E_Module *module;
E_Config_DD *conf_edd;
Config *conf;
E_Config_Dialog *config_dialog;
};
extern Mod *_comp_mod;
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);
EAPI int e_modapi_info (E_Module *m);
#endif

@ -0,0 +1,6 @@
[Desktop Entry]
Type=Link
Name=Composite
Icon=e-module-comp
Comment=<title>Composite Module</title><br>
X-Enlightenment-ModuleType=appearance

@ -5,8 +5,8 @@
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 272x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 186 -screen 480x272x16 &
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320x16 &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 320x480x16 -host-cursor &
Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x320x16 -host-cursor &
Xephyr :1 -noreset -ac -br -dpi 183 -screen 320x480x16 -host-cursor &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x320x16 -host-cursor &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 480x800x16 &
#Xephyr :1 -noreset -ac -br -dpi 183 -screen 800x480x16 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640x16 &

Loading…
Cancel
Save