[EGIT] [enlightenment] 01/01: Updating french translation

2024-05-16 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enlightenment.


View the commit online.
commit 2e54f9851e94ec9c3cf561b127e815970044df7d
Author: Massimo Maiurana 
AuthorDate: Thu May 16 13:50:47 2024 +0200

Updating french translation
---
 po/fr.po | 39 +++
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index f48d1d4de..896cf7608 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -19,7 +19,7 @@ msgstr ""
 "Project-Id-Version: enlightenment\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2024-01-23 21:51+0100\n"
-"PO-Revision-Date: 2024-01-24 08:37+0100\n"
+"PO-Revision-Date: 2024-05-15 14:34+0200\n"
 "Last-Translator: Philippe Jean Guillaumie \n"
 "Language-Team: French\n"
 "Language: fr\n"
@@ -27,7 +27,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Poedit 3.4.2\n"
+"X-Generator: Poedit 3.4.3\n"
 "X-Poedit-SourceCharset: utf-8\n"
 
 #: src/bin/e_about.c:17
@@ -143,11 +143,11 @@ msgstr "Voulez-vous vraiment fermer la session ?"
 
 #: src/bin/e_actions.c:2401
 msgid "Power off"
-msgstr "Éteindre"
+msgstr "Arrêt"
 
 #: src/bin/e_actions.c:2403
 msgid "Are you sure you want to power off your computer?"
-msgstr "Voulez-vous vraiment éteindre votre ordinateur ?"
+msgstr "Voulez-vous vraiment arrêter votre ordinateur ?"
 
 #: src/bin/e_actions.c:2459 src/bin/e_actions.c:4011
 msgid "Reboot"
@@ -852,11 +852,11 @@ msgstr "Déconnexion"
 
 #: src/bin/e_actions.c:4003
 msgid "Power Off Now"
-msgstr "Éteindre directement"
+msgstr "Arrêt immédiat"
 
 #: src/bin/e_actions.c:4007
 msgid "Power Off"
-msgstr "Éteindre"
+msgstr "Arrêt"
 
 #: src/bin/e_actions.c:4015
 msgid "Suspend Now"
@@ -1471,12 +1471,12 @@ msgstr "%s a été interrompu par un signal d'interruption."
 #: src/bin/e_exec.c:1070
 #, c-format
 msgid "%s was interrupted by a Quit Signal."
-msgstr "%s a été interrompu par un signal de sortie."
+msgstr "%s a été interrompu par un signal de sortie (Quit)."
 
 #: src/bin/e_exec.c:1074
 #, c-format
 msgid "%s was interrupted by an Abort Signal."
-msgstr "%s a été interrompu par un signal d'arrêt."
+msgstr "%s a été interrompu par un signal d'abandon (Abort)."
 
 #: src/bin/e_exec.c:1077
 #, c-format
@@ -1929,8 +1929,8 @@ msgid ""
 "Are you sure you want to deletethe %d selected file in%s?"
 msgid_plural ""
-"Are you sure you want to deletethe %d selected files in-">%s?"
+"Are you sure you want to deletethe %d selected files in"
+"%s?"
 msgstr[0] ""
 "Voulez-vous vraiment supprimer%d fichier sélectionné dans :%s ?"
@@ -4315,8 +4315,8 @@ msgid ""
 "Powering off.You cannot perform any other system actionsonce a "
 "shutdown has been started."
 msgstr ""
-"Extinction en cours.Vous ne pouvez pas effectuer d'autres actions "
-"systèmependant cette phase."
+"Arrêt en cours.Vous ne pouvez pas effectuer d'autres actions système+">pendant cette phase."
 
 #: src/bin/e_sys.c:1058
 msgid ""
@@ -5740,9 +5740,8 @@ msgstr "Erreur de raccourci clavier"
 #: src/modules/conf_bindings/e_int_config_keybindings.c:979
 #, c-format
 msgid ""
-"The binding key combination that you chose is already used by -">%s action.Please choose another binding key "
-"combination."
+"The binding key combination that you chose is already used by "
+"%s action.Please choose another binding key combination."
 msgstr ""
 "La séquence de raccourci que vous avez choisie est déjà utiliséepar "
 "l'action %s.Choisissez une autre séquence de "
@@ -8635,8 +8634,8 @@ msgstr ""
 "Ctrl+Tab détail des entrées (ça dépend du "
 "greffon)Ctrl+« x » va au greffon "
 "commençant par la lettre « x »Ctrl+Flèche gauche / "
-"droite circule parmi les greffons"
-"Ctrl+Flèche haut / bas va au premier / dernier élément"
+"droite circule parmi les greffonsCtrl"
+"+Flèche haut / bas va au premier / dernier élément"
 "Ctrl+1 commute le mode d'affichage (quitte cette "
 "page ;)Ctrl+2 commute le mode "
 "d'affichage en listeCtrl+3 commute le "
@@ -9900,8 +9899,8 @@ msgid ""
 "either the app is unknown to usor it is not intended for use with this "
 "option.Please choose an action to take:"
 msgstr ""
-"La fenêtre sélectionnée créée avec le nom :%set la classe :-">%s est introuvable dans la base de données desapplications pour "
+"La fenêtre sélectionnée créée avec le nom :%set la classe :"
+"%s est introuvable dans la base de données desapplications pour "
 "les accès rapides. Cela signifie que l'application est soit inconnue,"
 "soit inutilisable dans ce cas de figure.Choisissez une action à "
 "appliquer :"
@@ -10894,7 +10893,7 @@ msgstr "Solaris"
 #: src/modules/xkbswitch/e_mod_config.c:811
 #: src/modules/xkbswitch/e_mod_config.c:1229
 msgid "Terminate X"
-msgstr "Arrêter serveur X"
+msgstr "Arrêter le serveur X"
 
 #: src/modules/xkbswitch/e_mod_config.c:1073
 msgid "Switch Layout"


-- 
To stop 

[EGIT] [e16-epplets] 01/01: Spec file: Set high rpm release number for non-release rpms

2024-05-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16-epplets.


View the commit online.
commit da0dbeb68b3a05ec8c671cb9b576aa4de28e893c
Author: Kim Woelders 
AuthorDate: Sat May 11 20:22:06 2024 +0200

Spec file: Set high rpm release number for non-release rpms

Should normally avoid that distro rpms get installed over private build
ones.
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index eeeb172..ad4c836 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ SUBDIRS = api epplets
 
 dist-hook: $(top_builddir)/$(PACKAGE).spec
 
-RPR_DEV = `echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
+RPR_DEV = `echo -n "99.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
 RPR_REL = 1
 SED_DEV = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_DEV)/"
 SED_REL = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_REL)/"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: cleaner code - move file cp to own func etc.

2024-04-30 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 3519ab0f91340d741a033a9c51a86e5138e84d17
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 30 17:07:37 2024 +0100

cleaner code - move file cp to own func etc.
---
 src/backends/default/fs.c | 292 --
 1 file changed, 153 insertions(+), 139 deletions(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index 403704c..06f6216 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -15,22 +15,30 @@
 #include "status.h"
 #include "fs.h"
 
-// generic error handler. special case handling all errnos for everything is
-// pretty insane - so handle non-errors in switches and otherwise pass to
-// this tio handle the reast in a generic way.
-static void
-_error_handle(const char *src, const char *dst, const char *op, int errno_in)
+static Eina_Strbuf *
+error_strbuf_new(const char *op)
 {
   Eina_Strbuf *buf = eina_strbuf_new();
 
   if (!buf) abort();
   eina_strbuf_append(buf, op);
   eina_strbuf_append(buf, ": ");
-#define HNDL(_err, _str) \
-  _err:  \
-eina_strbuf_append(buf, _str);   \
-status_error(src, dst, eina_strbuf_string_get(buf)); \
-break
+  return buf;
+}
+
+// generic error handler. special case handling all errnos for everything is
+// pretty insane - so handle non-errors in switches and otherwise pass to
+// this tio handle the reast in a generic way.
+static void
+_error_handle(const char *src, const char *dst, const char *op, int errno_in)
+{
+  Eina_Strbuf *buf = error_strbuf_new(op);
+
+#define HNDL(_err, _str)   \
+_err:  \
+  eina_strbuf_append(buf, _str);   \
+  status_error(src, dst, eina_strbuf_string_get(buf)); \
+  break
   switch (errno_in)
 {
   HNDL(case EACCES, "Access denied");
@@ -61,6 +69,120 @@ _error_handle(const char *src, const char *dst, const char *op, int errno_in)
   eina_strbuf_free(buf);
 }
 
+static void
+error_ok_pos(const char *src, const char *op, const char *str)
+{
+  Eina_Strbuf *buf = error_strbuf_new(op);
+
+  eina_strbuf_append(buf, str);
+  status_pos(1, eina_strbuf_string_get(buf));
+  eina_strbuf_free(buf);
+}
+
+static Eina_Bool
+fs_cp_file(const char *src, const char *dst, const char *op, struct stat src_st)
+{
+  // copy a normal file from src to dst - use optimized copy range if possible
+  // and fall abck to read + write into userspace buffer otherwise. use the
+  // struct stat mode passed in for created file. return true if fully
+  // successful or false otherwise
+  int   fd_in, fd_ou;
+  void *old_copy_buf = NULL;
+  Eina_Bool res = EINA_TRUE;
+
+  fd_in = open(src, O_RDONLY);
+  fd_ou = open(dst, O_WRONLY | O_CREAT, src_st.st_mode);
+  if ((fd_in >= 0) && (fd_ou >= 0))
+{
+  ssize_t   size = 1 * 1024 * 1024; // 1mb default for copy range
+  ssize_t   ret, ret2;
+  off_t off_in = 0, off_ou = 0;
+  Eina_Bool old_copy = EINA_FALSE;
+
+  for (;;)
+{
+  if (old_copy)
+{
+  if (!old_copy_buf)
+{
+  size = 256 * 1024; // drop to 256k buffer for r+w
+  old_copy_buf = malloc(size);
+  if (!old_copy_buf)
+{
+  res = EINA_FALSE;
+  goto err;
+}
+}
+again_read:
+  ret = read(fd_in, old_copy_buf, size);
+  if (ret < 0)
+{
+  switch (errno)
+{
+case EAGAIN:
+case EINTR:
+  goto again_read;
+default:
+  _error_handle(src, NULL, op, errno);
+  res = EINA_FALSE;
+  goto err;
+}
+}
+  else
+{
+  off_in += ret;
+again_write:
+  ret2 = write(fd_ou, old_copy_buf, ret);
+  if (ret2 < 0)
+{
+  switch (errno)
+{
+case EAGAIN:
+case EINTR:
+  goto again_write;
+default:
+  _error_handle(NULL, dst, op, errno);
+  res = EINA_FALSE;
+  goto err;
+}
+}
+  else if (ret2 == ret)
+{
+  off_ou += ret;
+  if (ret < size) break; // end of file
+}
+}
+}
+  else
+  

[EGIT] [efm2] 01/01: remove command and undef macro in fs.c

2024-04-30 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit f60329683445e71f31f9794b9e5d399dc16ac4e2
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 30 15:03:30 2024 +0100

remove command and undef macro in fs.c
---
 src/backends/default/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index 1cb8db9..403704c 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -21,7 +21,6 @@
 static void
 _error_handle(const char *src, const char *dst, const char *op, int errno_in)
 {
-  // XXX: Fix str to be Move, Copy or Delete as it can handle any
   Eina_Strbuf *buf = eina_strbuf_new();
 
   if (!buf) abort();
@@ -58,6 +57,7 @@ _error_handle(const char *src, const char *dst, const char *op, int errno_in)
   HNDL(case EEXIST, "File exists");
   HNDL(default, "Unknown error");
 }
+#undef HNDL
   eina_strbuf_free(buf);
 }
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: handle errs properly in fs code without logic holes

2024-04-30 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit f4b20c1fd870a032a642e2dbd3194c17b64133b2
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 30 14:46:11 2024 +0100

handle errs properly in fs code without logic holes
---
 src/backends/default/fs.c | 83 +--
 1 file changed, 52 insertions(+), 31 deletions(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index d64fccc..1cb8db9 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -125,6 +125,7 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
   mode_t old_umask;
   struct timeval times[2];
   const char*op = "";
+  Eina_Strbuf   *sbuf = NULL;
 
   if (strlen(src) < 1) return EINA_FALSE;
 
@@ -135,19 +136,25 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
   else if (!rm && cp) op = "Copy";
   else if (rm && !cp) op = "Delete";
 
+  old_umask = umask(0);
   if (lstat(src, ) != 0)
 {
   switch (errno)
 {
 case ENOENT: // ignore this error - file removed during scan ?
-  status_pos(1, "Move - File vanished");
-  break;
+  eina_strbuf_reset(sbuf);
+  eina_strbuf_append(sbuf, op);
+  eina_strbuf_append(sbuf, ": ");
+  eina_strbuf_append(sbuf, "File vanished");
+  status_pos(1, eina_strbuf_string_get(sbuf));
+  goto err;
 default:
   _error_handle(src, dst, op, errno);
-  return EINA_FALSE;
+  res = EINA_FALSE;
+  goto err;
 }
 }
-  old_umask = umask(0);
+  sbuf = eina_strbuf_new();
   if (S_ISDIR(st.st_mode))
 { // it's a dir - scan this recursively
   if (cp)
@@ -180,8 +187,8 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
 eina_strbuf_append(buf, dst);
 eina_strbuf_append(buf, "/");
 eina_strbuf_append(buf, fs);
-if (!fs_cp_rm(s, eina_strbuf_string_get(buf), report_err,
-  cp, rm))
+if (!fs_cp_rm(s, eina_strbuf_string_get(buf),
+  report_err, cp, rm))
   res = EINA_FALSE;
   }
 eina_strbuf_free(buf);
@@ -190,21 +197,6 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
   }
   eina_iterator_free(it);
 }
-  if ((rm) && (res))
-{
-  if (rmdir(src) != 0)
-{
-  switch (errno)
-{
-case ENOENT: // ignore missing
-  break;
-default:
-  _error_handle(src, NULL, op, errno);
-  res = EINA_FALSE;
-  goto err;
-}
-}
-}
 }
   else if (S_ISLNK(st.st_mode))
 {
@@ -217,16 +209,24 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
   if ((lnsz > 0) && (lnsz < (ssize_t)sizeof(link)))
 {
   if (symlink(link, dst) < 0)
-{ // XXX: soft error? e.g. mv on FAT fs?
-  status_pos(1, "Move - Error creating symlink");
+{ // soft error? e.g. mv on FAT fs? report but move on
+  eina_strbuf_reset(sbuf);
+  eina_strbuf_append(sbuf, op);
+  eina_strbuf_append(sbuf, ": ");
+  eina_strbuf_append(sbuf, "Error creating symlink");
+  status_pos(1, eina_strbuf_string_get(sbuf));
 }
 }
   else if (lnsz < 0)
-{ // XXX: handle read link err
+{
   switch (errno)
 {
 case ENOENT: // ignore this error - file removed during scan ?
-  status_pos(1, "Move - File vanished");
+  eina_strbuf_reset(sbuf);
+  eina_strbuf_append(sbuf, op);
+  eina_strbuf_append(sbuf, ": ");
+  eina_strbuf_append(sbuf, "File vanished");
+  status_pos(1, eina_strbuf_string_get(sbuf));
   break;
 default:
   _error_handle(src, dst, op, errno);
@@ -234,7 +234,12 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
 }
 }
   else // 0 sized symlink ... WAT?
-{  // XXX: handle this
+{
+  eina_strbuf_reset(sbuf);
+  eina_strbuf_append(sbuf, op);
+  eina_strbuf_append(sbuf, ": ");
+  eina_strbuf_append(sbuf, "Zero sized symlink");
+  status_error(src, NULL, eina_strbuf_string_get(sbuf));
 }
 }
 }
@@ -243,7 +248,7 @@ 

[EGIT] [www-content] 01/01: Wiki page ubuntu-start.md changed with summary [Bump Ubuntu version in note about libjxl.] by Philippe Jean Guillaumie

2024-04-30 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository www-content.


View the commit online.
commit 0cd2a978cc797a4400746a38b56c9bafd649c716
Author: Philippe Jean Guillaumie 
AuthorDate: Tue Apr 30 04:01:30 2024 -0700

Wiki page ubuntu-start.md changed with summary [Bump Ubuntu version in note about libjxl.] by Philippe Jean Guillaumie
---
 pages/docs/distros/ubuntu-start.md.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/docs/distros/ubuntu-start.md.txt b/pages/docs/distros/ubuntu-start.md.txt
index 147795e95..f9799f1f2 100644
--- a/pages/docs/distros/ubuntu-start.md.txt
+++ b/pages/docs/distros/ubuntu-start.md.txt
@@ -151,7 +151,7 @@ As well as the dependencies specific for EFL:
 sudo apt install libssl-dev libsystemd-dev libjpeg-dev libglib2.0-dev libgstreamer1.0-dev liblua5.2-dev libfreetype-dev libfontconfig-dev libfribidi-dev libavahi-client-dev libharfbuzz-dev libibus-1.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libgif-dev libtiff5-dev libpoppler-dev libpoppler-cpp-dev libspectre-dev libraw-dev librsvg2-dev libudev-dev libmount-dev libdbus-1-dev libpulse-dev libsndfile1-dev libxcursor-dev libxcomposite-dev libxinerama-dev libxrandr-dev libxt [...]
 ```
 > **NOTE:**
-> Unless you are already running Ubuntu 23.04 or a higher version (simply install libjxl-dev), JPEG XL has to be compiled from source. If you need jxl support in efl,
+> Unless you are running Ubuntu 24.04 or a higher version (simply install libjxl-dev), JPEG XL has to be compiled from source. If you need jxl support in efl,
 > please visit their [GitHub repository](https://github.com/libjxl/libjxl/) for more information.
 
 ### Step 3: Configuring the Software ###


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: fix err handling to contain correct operation

2024-04-30 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 9413ca2e62c1495e3c95b269fd4520c77eb2617b
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 30 09:55:30 2024 +0100

fix err handling to contain correct operation
---
 src/backends/default/fs.c | 135 ++
 src/efm/efm_dnd.h |   1 +
 2 files changed, 54 insertions(+), 82 deletions(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index 53d19d0..d64fccc 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -19,80 +19,46 @@
 // pretty insane - so handle non-errors in switches and otherwise pass to
 // this tio handle the reast in a generic way.
 static void
-_error_handle(const char *src, const char *dst, int errno_in)
+_error_handle(const char *src, const char *dst, const char *op, int errno_in)
 {
+  // XXX: Fix str to be Move, Copy or Delete as it can handle any
+  Eina_Strbuf *buf = eina_strbuf_new();
+
+  if (!buf) abort();
+  eina_strbuf_append(buf, op);
+  eina_strbuf_append(buf, ": ");
+#define HNDL(_err, _str) \
+  _err:  \
+eina_strbuf_append(buf, _str);   \
+status_error(src, dst, eina_strbuf_string_get(buf)); \
+break
   switch (errno_in)
 {
-case EACCES:
-  status_error(src, dst, "Move - Access denied");
-  return;
-case EFAULT:
-  status_error(src, dst, "Move - Memory Fault");
-  return;
-case ELOOP:
-  status_error(src, dst, "Move - Too many symlinks");
-  return;
-case ENAMETOOLONG:
-  status_error(src, dst, "Move - Name too long");
-  return;
-case ENOMEM:
-  status_error(src, dst, "Move - Out of memory");
-  return;
-case ENOTDIR:
-  status_error(src, dst, "Move - Path component is not a directory");
-  return;
-case EOVERFLOW:
-  status_error(src, dst, "Move - Overflow");
-  return;
-case EDQUOT:
-  status_error(src, dst, "Move - Over quota");
-  return;
-case EINVAL:
-  status_error(src, dst, "Move - Inmvalid value");
-  return;
-case EMLINK:
-  status_error(src, dst, "Move - Too many source links");
-  return;
-case ENOENT:
-  status_error(src, dst, "Move - File does not exist");
-  return;
-case ENOSPC:
-  status_error(src, dst, "Move - Disk full");
-  return;
-case EPERM:
-  status_error(src, dst, "Move - Permission denied");
-  return;
-case EROFS:
-  status_error(src, dst, "Move - Read only filesystem");
-  return;
-case EBADF:
-  status_error(src, dst, "Move - Bad file descriptor");
-  return;
-case EIO:
-  status_error(src, dst, "Move - I/O error");
-  return;
-case EISDIR:
-  status_error(src, dst, "Move - Destination is dir");
-  return;
-case EFBIG:
-  status_error(src, dst, "Move - File too big");
-  return;
-case ETXTBSY:
-  status_error(src, dst, "Move - Text file busy");
-  return;
-case EBUSY:
-  status_error(src, dst, "Move - File busy");
-  return;
-case ENOTEMPTY:
-  status_error(src, dst, "Move - Destination not empty");
-  return;
-case EEXIST:
-  status_error(src, dst, "Move - File exists");
-  return;
-default: // WAT? we should not get here - we handled everything...
-  status_error(src, dst, "Move - Unknown error");
-  break;
+  HNDL(case EACCES, "Access denied");
+  HNDL(case EFAULT, "Memory Fault");
+  HNDL(case ELOOP, "Too many symlinks");
+  HNDL(case ENAMETOOLONG, "Name too long");
+  HNDL(case ENOMEM, "Out of memory");
+  HNDL(case ENOTDIR, "Path component is not a directory");
+  HNDL(case EOVERFLOW, "Overflow");
+  HNDL(case EDQUOT, "Over quota");
+  HNDL(case EINVAL, "Invalid value");
+  HNDL(case EMLINK, "Too many links");
+  HNDL(case ENOENT, "Does not exist");
+  HNDL(case ENOSPC, "Disk full");
+  HNDL(case EPERM, "Permission denied");
+  HNDL(case EROFS, "Read only filesystem");
+  HNDL(case EBADF, "Bad file descriptor");
+  HNDL(case EIO, "I/O error");
+  HNDL(case EISDIR, "Destination is a directory");
+  HNDL(case EFBIG, "File too big");
+  HNDL(case ETXTBSY, "Text file busy");
+  HNDL(case EBUSY, "File busy");
+  HNDL(case ENOTEMPTY, "Destination is not empty");
+  HNDL(case EEXIST, "File exists");
+  HNDL(default, "Unknown error");
 }
+  eina_strbuf_free(buf);
 }
 
 // this scans a tree to build a potential operation progress count. it may
@@ -106,6 +72,7 @@ fs_scan(const char *src)
   Eina_Iterator *it;
   const char*s;
   struct statst;
+  const char*op = "Scan";
 
   if (strlen(src) < 1) return EINA_FALSE;
 
@@ -116,7 +83,7 @@ fs_scan(const char *src)
 case ENOENT: // ignore this error - 

[EGIT] [efm2] 01/01: remove some more debug printfs

2024-04-29 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 887f89748c37833ff614475f8a961371b0cd4868
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Mon Apr 29 19:24:30 2024 +0100

remove some more debug printfs
---
 src/backends/default/fs.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index 5902111..53d19d0 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -431,11 +431,6 @@ err_unlink:
   utimes(dst, times);
 err:
   umask(old_umask);
-  if (!res)
-{
-  fprintf(stderr, "MV: ERROR!\n");
-  fflush(stderr);
-}
   return res;
 }
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: remove some more comments

2024-04-29 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 90f0005bcdef85ecd8952fcb5bfc83d1a59d5ed9
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Mon Apr 29 19:23:42 2024 +0100

remove some more comments
---
 src/backends/default/fs.c | 37 -
 1 file changed, 37 deletions(-)

diff --git a/src/backends/default/fs.c b/src/backends/default/fs.c
index 593fef3..5902111 100644
--- a/src/backends/default/fs.c
+++ b/src/backends/default/fs.c
@@ -151,43 +151,6 @@ Eina_Bool
 fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
  Eina_Bool rm)
 { // cp_rm /path/to/src/filename /path/to/dst/filename
-  // XXX: ecore_file_mv() ? <- look at it
-  // XXX: utime()/utimes() -> utimensat()
-  //
-  // if src is dir
-  //   fs_mkdir(dst)
-  //   for all files in src
-  // fs_cp_rm(src/file, dst/file, report_err)
-  // fs_utimes(src, dst)
-  // fs_chmod(src, dst)
-  // fs_chown(src, dst)
-  //   fs_utimes(src, dst)
-  //   fs_chmod(src, dst)
-  //   fs_chown(src, dst)
-  //   fs_rmdir(src)
-  // else
-  //   if (src is file)
-  // fs_cp(src, dst, report_err)
-  // fs_cp_xattr(src, dst)
-  //   else if (src is symlink)
-  // fs_ln(src, dst)
-  //   else if (src is fifo)
-  // fs_mkfifo(dst)
-  //   else if (src is socket)
-  // fs_touch(dst)
-  //   else if (src is chrdev)
-  // fs_chrdevdup(src, dst)
-  //   else if (src is blkdev)
-  // fs_blkdevdup(src, dst)
-  //   fs_utimes(src, dst)
-  //   fs_chmod(src, dst)
-  //   fs_chown(src, dst)
-  //   fs_rm(src)
-  //   fs_cp(src_meta, dst_meta)
-  //   fs_utimes(src_meta, dst_meta)
-  //   fs_chmod(src_meta, dst_meta)
-  //   fs_chown(src_meta, dst_meta)
-  //   fs_rm(src_meta)
   Eina_Bool  res = EINA_TRUE;
   Eina_Iterator *it;
   const char*s;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: remove debug/comments not needed

2024-04-29 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit cfac7a7e4bc355595aaffc4713a2429832d2ef62
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Mon Apr 29 19:22:25 2024 +0100

remove debug/comments not needed
---
 src/backends/default/mv.c | 21 ++---
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index 08004a3..3cfe971 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -31,9 +31,6 @@ main(int argc, char **argv)
   ecore_init();
   efreet_init();
 
-  fprintf(stderr, "MV: [%s] -> [%s]\n", src, dst);
-  fflush(stderr);
-
   config_dir = getenv("E_HOME_DIR");
   home_dir   = getenv("HOME");
   if (!home_dir) return 77; // no $HOME? definitely an error!
@@ -46,18 +43,6 @@ main(int argc, char **argv)
 }
   meta_init(config_dir);
 
-  // src = ""
-  // dst = DDIR/
-  //
-  // mv  SDIR/SFILE DDIR/SFILE
-  // if errno == EXDEV
-  //   cpSDIR/SFILE DDIR/SFILE
-  //   rmSDIR/SFILE
-  // else if errno == 0
-  //   if exists SDIR/.efm/SFILE.efm
-  // mkdir   DDIR/.efm
-  // mv  SDIR/.efm/SFILE.efm DDIR/.efm/SFILE.efm
-
   fname = ecore_file_file_get(src);
   if (!fname) goto err;
   buf = eina_strbuf_new();
@@ -94,10 +79,8 @@ main(int argc, char **argv)
   free(src_meta);
   free(dst_meta);
 }
-  else
-{
-  status_end();
-}
+  else status_end();
+
 err:
   if (buf) eina_strbuf_free(buf);
   status_end();


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: move fs working code into fs.c and make it also do rm and cp

2024-04-29 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 575fbfa026df5575e0d68132c3f92450c49c7bdf
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Mon Apr 29 19:14:25 2024 +0100

move fs working code into fs.c and make it also do rm and cp
---
 src/backends/default/{mv.c => fs.c} | 379 +-
 src/backends/default/fs.h   |  10 +
 src/backends/default/meson.build|   1 +
 src/backends/default/mv.c   | 447 +---
 4 files changed, 175 insertions(+), 662 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/fs.c
similarity index 57%
copy from src/backends/default/mv.c
copy to src/backends/default/fs.c
index 740357e..593fef3 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/fs.c
@@ -1,16 +1,10 @@
 // for copy_file_range()
-#include 
 #define _GNU_SOURCE
 #define _FILE_OFFSET_BITS 64
 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
 
-#include 
 #include 
 #include 
 #include 
@@ -18,10 +12,8 @@
 #include 
 #include 
 
-#include "meta.h"
 #include "status.h"
-
-static const char *config_dir = NULL;
+#include "fs.h"
 
 // generic error handler. special case handling all errnos for everything is
 // pretty insane - so handle non-errors in switches and otherwise pass to
@@ -107,7 +99,7 @@ _error_handle(const char *src, const char *dst, int errno_in)
 // not be 100% right as the fs can change while the scan happens and after
 // so any move that devolves into a cp + rm isn't going to be atomic and
 // handle a changing fs while it works anyway
-static Eina_Bool
+Eina_Bool
 fs_scan(const char *src)
 {
   Eina_Bool  res = EINA_TRUE;
@@ -150,14 +142,14 @@ fs_scan(const char *src)
   // or a char or block device etc.
   status_count(1, ecore_file_file_get(src));
   // in addition each byte in the file count as a progress item too
-  if (st.st_size > 0)
-status_count(st.st_size, ecore_file_file_get(src));
+  if (st.st_size > 0) status_count(st.st_size, ecore_file_file_get(src));
 }
   return res;
 }
 
-static Eina_Bool
-fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
+Eina_Bool
+fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err, Eina_Bool cp,
+ Eina_Bool rm)
 { // cp_rm /path/to/src/filename /path/to/dst/filename
   // XXX: ecore_file_mv() ? <- look at it
   // XXX: utime()/utimes() -> utimensat()
@@ -196,7 +188,7 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   //   fs_chmod(src_meta, dst_meta)
   //   fs_chown(src_meta, dst_meta)
   //   fs_rm(src_meta)
-  Eina_Bool res = EINA_TRUE;
+  Eina_Bool  res = EINA_TRUE;
   Eina_Iterator *it;
   const char*s;
   struct statst;
@@ -225,16 +217,19 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   old_umask = umask(0);
   if (S_ISDIR(st.st_mode))
 { // it's a dir - scan this recursively
-  if (mkdir(dst, st.st_mode) != 0)
+  if (cp)
 {
-  switch (errno)
+  if (mkdir(dst, st.st_mode) != 0)
 {
-case EEXIST: // ignore - mv would mv over this anyway
-  break;
-default: // WAT
-  _error_handle(NULL, dst, errno);
-  res = EINA_FALSE;
-  goto err;
+  switch (errno)
+{
+case EEXIST: // ignore - mv would mv over this anyway
+  break;
+default: // WAT
+  _error_handle(NULL, dst, errno);
+  res = EINA_FALSE;
+  goto err;
+}
 }
 }
   it = eina_file_ls(src);
@@ -243,7 +238,7 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   EINA_ITERATOR_FOREACH(it, s)
   {
 Eina_Strbuf *buf = eina_strbuf_new();
-const char *fs = ecore_file_file_get(s);
+const char  *fs  = ecore_file_file_get(s);
 
 if (buf)
   {
@@ -252,7 +247,8 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
 eina_strbuf_append(buf, dst);
 eina_strbuf_append(buf, "/");
 eina_strbuf_append(buf, fs);
-if (!fs_cp_rm(s, eina_strbuf_string_get(buf), report_err))
+if (!fs_cp_rm(s, eina_strbuf_string_get(buf), report_err,
+  cp, rm))
   res = EINA_FALSE;
   }
 eina_strbuf_free(buf);
@@ -261,149 +257,194 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   }
   eina_iterator_free(it);
 }
-  if (res) rmdir(src);
+  if ((rm) && (res))
+{
+  if (rmdir(src) != 0)
+{
+  switch (errno)
+{
+case 

[EGIT] [efm2] 01/01: actually make mv work fully

2024-04-28 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 9489a8b691cd280b21b67e08f2bef62be58e473e
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Sun Apr 28 20:03:19 2024 +0100

actually make mv work fully
---
 src/backends/default/mv.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index c964ba0..740357e 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -18,9 +18,6 @@
 #include 
 #include 
 
-#include "eina_strbuf.h"
-#include "eina_thread.h"
-#include "eina_types.h"
 #include "meta.h"
 #include "status.h"
 
@@ -264,7 +261,7 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   }
   eina_iterator_free(it);
 }
-  // if (res) rmdir(src);
+  if (res) rmdir(src);
 }
   else if (S_ISLNK(st.st_mode))
 {
@@ -405,7 +402,7 @@ err_copy:
   if (old_copy_buf) free(old_copy_buf);
   if (fd_in >= 0) close(fd_in);
   if (fd_ou >= 0) close(fd_ou);
-  // if (res) unlink(src);
+  if (res) unlink(src);
 }
   chown(dst, st.st_uid, st.st_gid);
 #ifdef STAT_NSEC


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/01: Y4M loader: Fix frame size calculation for 10-bit 4:2:0 format

2024-04-27 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit d4648ae5275e4484a1964b1dfa98a9227fb50a79
Author: Kim Woelders 
AuthorDate: Sat Apr 27 09:45:57 2024 +0200

Y4M loader: Fix frame size calculation for 10-bit 4:2:0 format

Seems to fix multiframe images (animation) for this format.
---
 src/modules/loaders/loader_y4m.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index 9b7873a..22740b8 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -338,11 +338,15 @@ y4m_parse_frame(Y4mParse *res)
 case Y4M_PARSE_CS_420MPEG2:
 case Y4M_PARSE_CS_420PALDV:
 case Y4M_PARSE_CS_420:
-case Y4M_PARSE_CS_420P10:
 res->frame_data_len = npixels * 3 / 2;
 sdiv = 2;
 voff = (npixels * 5) / 4;
 break;
+case Y4M_PARSE_CS_420P10:
+res->frame_data_len = npixels * 3;
+sdiv = 2;
+voff = (npixels * 5) / 4;
+break;
 case Y4M_PARSE_CS_422:
 res->frame_data_len = npixels * 2;
 sdiv = 2;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: share error handling in central func

2024-04-25 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit b876965918f2e67b3ca34ffedc3a8aa61fbd69da
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Thu Apr 25 07:44:27 2024 +0100

share error handling in central func

so - too much error handling all over the place - massive switch/cse
blocks. not sustainable. handle all errors in one place. less code. yay!
---
 src/backends/default/mv.c | 338 ++
 1 file changed, 105 insertions(+), 233 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index 430576d..c964ba0 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -26,6 +26,86 @@
 
 static const char *config_dir = NULL;
 
+// generic error handler. special case handling all errnos for everything is
+// pretty insane - so handle non-errors in switches and otherwise pass to
+// this tio handle the reast in a generic way.
+static void
+_error_handle(const char *src, const char *dst, int errno_in)
+{
+  switch (errno_in)
+{
+case EACCES:
+  status_error(src, dst, "Move - Access denied");
+  return;
+case EFAULT:
+  status_error(src, dst, "Move - Memory Fault");
+  return;
+case ELOOP:
+  status_error(src, dst, "Move - Too many symlinks");
+  return;
+case ENAMETOOLONG:
+  status_error(src, dst, "Move - Name too long");
+  return;
+case ENOMEM:
+  status_error(src, dst, "Move - Out of memory");
+  return;
+case ENOTDIR:
+  status_error(src, dst, "Move - Path component is not a directory");
+  return;
+case EOVERFLOW:
+  status_error(src, dst, "Move - Overflow");
+  return;
+case EDQUOT:
+  status_error(src, dst, "Move - Over quota");
+  return;
+case EINVAL:
+  status_error(src, dst, "Move - Inmvalid value");
+  return;
+case EMLINK:
+  status_error(src, dst, "Move - Too many source links");
+  return;
+case ENOENT:
+  status_error(src, dst, "Move - File does not exist");
+  return;
+case ENOSPC:
+  status_error(src, dst, "Move - Disk full");
+  return;
+case EPERM:
+  status_error(src, dst, "Move - Permission denied");
+  return;
+case EROFS:
+  status_error(src, dst, "Move - Read only filesystem");
+  return;
+case EBADF:
+  status_error(src, dst, "Move - Bad file descriptor");
+  return;
+case EIO:
+  status_error(src, dst, "Move - I/O error");
+  return;
+case EISDIR:
+  status_error(src, dst, "Move - Destination is dir");
+  return;
+case EFBIG:
+  status_error(src, dst, "Move - File too big");
+  return;
+case ETXTBSY:
+  status_error(src, dst, "Move - Text file busy");
+  return;
+case EBUSY:
+  status_error(src, dst, "Move - File busy");
+  return;
+case ENOTEMPTY:
+  status_error(src, dst, "Move - Destination not empty");
+  return;
+case EEXIST:
+  status_error(src, dst, "Move - File exists");
+  return;
+default: // WAT? we should not get here - we handled everything...
+  status_error(src, dst, "Move - Unknown error");
+  break;
+}
+}
+
 // this scans a tree to build a potential operation progress count. it may
 // not be 100% right as the fs can change while the scan happens and after
 // so any move that devolves into a cp + rm isn't going to be atomic and
@@ -44,39 +124,11 @@ fs_scan(const char *src)
 {
   switch (errno)
 {
-case EACCES:
-  status_error(src, NULL, "Move - Permission denied for source");
-  return EINA_FALSE;
-  break;
-case EFAULT:
-  status_error(src, NULL, "Move - Memory Fault");
-  return EINA_FALSE;
-  break;
-case ELOOP:
-  status_error(src, NULL, "Move - Too many symlinks");
-  return EINA_FALSE;
-  break;
-case ENAMETOOLONG:
-  status_error(src, NULL, "Move - Name too long");
-  return EINA_FALSE;
-  break;
 case ENOENT: // ignore this error - file removed during scan ?
   return EINA_TRUE;
-  break;
-case ENOMEM:
-  status_error(src, NULL, "Move - Out of memory");
-  return EINA_FALSE;
-  break;
-case ENOTDIR:
-  status_error(src, NULL, "Move - Source path component is not a directory");
-  return EINA_FALSE;
-  break;
-case EOVERFLOW:
-  status_error(src, NULL, "Move - Overflow");
-  return EINA_FALSE;
-  break;
 default:
-  break;
+  _error_handle(src, NULL, errno);
+  return EINA_FALSE;
 }
 }
   if (S_ISDIR(st.st_mode))
@@ -168,28 +220,8 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
 case ENOENT: // ignore this error - file removed during scan ?

[EGIT] [efm2] 01/01: more work on mv impl

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit f918c86d251299bb837cd6e0e7d4b053bb62e3e3
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 23 19:44:43 2024 +0100

more work on mv impl
---
 src/backends/default/mv.c | 393 --
 1 file changed, 380 insertions(+), 13 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index e39bf1c..430576d 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -1,3 +1,8 @@
+// for copy_file_range()
+#include 
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
 #include 
 #include 
 #include 
@@ -11,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "eina_strbuf.h"
 #include "eina_thread.h"
@@ -27,11 +33,12 @@ static const char *config_dir = NULL;
 static Eina_Bool
 fs_scan(const char *src)
 {
+  Eina_Bool  res = EINA_TRUE;
   Eina_Iterator *it;
-  const char *s;
+  const char*s;
+  struct statst;
 
   if (strlen(src) < 1) return EINA_FALSE;
-  struct stat st;
 
   if (lstat(src, ) != 0)
 {
@@ -79,8 +86,13 @@ fs_scan(const char *src)
 {
   EINA_ITERATOR_FOREACH(it, s)
   {
-if (!fs_scan(s)) return EINA_FALSE;
+if (res)
+  {
+if (!fs_scan(s)) res = EINA_FALSE;
+  }
+eina_stringshare_del(s);
   }
+  eina_iterator_free(it);
 }
 }
   else
@@ -92,16 +104,15 @@ fs_scan(const char *src)
   if (st.st_size > 0)
 status_count(st.st_size, ecore_file_file_get(src));
 }
-  return EINA_TRUE;  
+  return res;
 }
 
 static Eina_Bool
 fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
-{
-  Eina_Bool res = EINA_TRUE;
-
-  if (!fs_scan(src)) return EINA_FALSE;
-
+{ // cp_rm /path/to/src/filename /path/to/dst/filename
+  // XXX: ecore_file_mv() ? <- look at it
+  // XXX: utime()/utimes() -> utimensat()
+  //
   // if src is dir
   //   fs_mkdir(dst)
   //   for all files in src
@@ -136,17 +147,370 @@ fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
   //   fs_chmod(src_meta, dst_meta)
   //   fs_chown(src_meta, dst_meta)
   //   fs_rm(src_meta)
+  Eina_Bool res = EINA_TRUE;
+  Eina_Iterator *it;
+  const char*s;
+  struct statst;
+  mode_t old_umask;
+  struct timeval times[2];
+
+  if (strlen(src) < 1) return EINA_FALSE;
+
+  // first count how much work needs doing
+  if (!fs_scan(src)) return EINA_FALSE;
+
+  fprintf(stderr, "cp_rm [%s] -> [%s]\n", src, dst);
+  fflush(stderr);
+  if (lstat(src, ) != 0)
+{
+  switch (errno)
+{
+case ENOENT: // ignore this error - file removed during scan ?
+  status_pos(1, "Move - File vanished");
+  break;
+case EACCES:
+  status_error(src, dst, "Move - Permission denied for source");
+  return EINA_FALSE;
+case EFAULT:
+  status_error(src, dst, "Move - Memory Fault");
+  return EINA_FALSE;
+case ELOOP:
+  status_error(src, dst, "Move - Too many symlinks");
+  return EINA_FALSE;
+case ENAMETOOLONG:
+  status_error(src, dst, "Move - Name too long");
+  return EINA_FALSE;
+case ENOMEM:
+  status_error(src, dst, "Move - Out of memory");
+  return EINA_FALSE;
+case ENOTDIR:
+  status_error(src, dst, "Move - Source path component is not a directory");
+  return EINA_FALSE;
+case EOVERFLOW:
+  status_error(src, dst, "Move - Overflow");
+  return EINA_FALSE;
+default: // WAT?
+  return EINA_FALSE;
+}
+}
+  old_umask = umask(0);
+  if (S_ISDIR(st.st_mode))
+{ // it's a dir - scan this recursively
+  if (mkdir(dst, st.st_mode) != 0)
+{
+  switch (errno)
+{
+case EEXIST: // ignore - mv would mv over this anyway
+  break;
+case EACCES:
+  res = EINA_FALSE;
+  goto err;
+case EDQUOT:
+  res = EINA_FALSE;
+  goto err;
+case EFAULT:
+  res = EINA_FALSE;
+  goto err;
+case EINVAL:
+  res = EINA_FALSE;
+  goto err;
+case ELOOP:
+  res = EINA_FALSE;
+  goto err;
+case EMLINK:
+  res = EINA_FALSE;
+  goto err;
+case ENAMETOOLONG:
+  res = EINA_FALSE;
+  goto err;
+case ENOENT:
+  res = EINA_FALSE;
+  goto err;
+case ENOMEM:
+  res = EINA_FALSE;
+  goto err;
+case ENOSPC:
+  res = EINA_FALSE;
+  goto err;
+case ENOTDIR:
+  res = EINA_FALSE;
+  goto err;
+

[EGIT] [legacy-imlib2] 02/07: imlib2_view: Minor cleanup

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit f0a81d9d59b9fbd646d3ea81972ec95a5f817266
Author: Kim Woelders 
AuthorDate: Sun Jan 21 13:09:19 2024 +0100

imlib2_view: Minor cleanup
---
 src/bin/imlib2_view.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 35fd677..902a2b2 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -95,6 +95,8 @@ bg_im_init(int w, int h)
 bg_im = imlib_create_image(w, h);
 
 imlib_context_set_image(bg_im);
+imlib_context_set_blend(0);
+
 for (y = 0; y < h; y += opt_cbfs)
 {
 _onoff_ = (y / opt_cbfs) & 0x1;
@@ -104,11 +106,8 @@ bg_im_init(int w, int h)
 imlib_context_set_color(144, 144, 144, 255);
 else
 imlib_context_set_color(100, 100, 100, 255);
-imlib_context_set_blend(0);
 imlib_image_fill_rectangle(x, y, opt_cbfs, opt_cbfs);
-onoff++;
-if (_onoff_ == 2)
-_onoff_ = 0;
+onoff ^= 0x1;
 }
 }
 }


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 05/07: imlib2_view: Rename scaling variables

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit cd4ba13545b4574f0092deb89a9f72c92dcb9adf
Author: Kim Woelders 
AuthorDate: Mon Jan 22 14:05:40 2024 +0100

imlib2_view: Rename scaling variables

Should make naming a bit more logical.
---
 src/bin/imlib2_view.c | 62 ++-
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 82f66ef..c4a1916 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -37,10 +37,10 @@ static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
 static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
 static bool opt_aa_final = true;/* Do final anti-aliased rendering */
-static double   opt_scale_x = 1.;
-static double   opt_scale_y = 1.;
-static double   opt_sgrab_x = 1.;
-static double   opt_sgrab_y = 1.;
+static double   opt_sc_inp_x = 1.;
+static double   opt_sc_inp_y = 1.;
+static double   opt_sc_out_x = 1.;
+static double   opt_sc_out_y = 1.;
 static int  opt_cbfs = 8;   /* Background checkerboard field size */
 static char opt_progress_granularity = 10;
 static char opt_progress_print = 0;
@@ -59,8 +59,10 @@ static int  animloop = 0;   /* Animation loop count  */
 
 #define MAX_DIM 32767
 
-#define SCALE_X(x) (int)(scale_x * (x) + .5)
-#define SCALE_Y(x) (int)(scale_y * (x) + .5)
+#define SC_INP_X(x) (int)(opt_sc_inp_x * (x) + .5)
+#define SC_INP_Y(x) (int)(opt_sc_inp_y * (x) + .5)
+#define SC_OUT_X(x) (int)(scale_x * (x) + .5)
+#define SC_OUT_Y(x) (int)(scale_y * (x) + .5)
 
 #define HELP \
"Usage:\n" \
@@ -73,8 +75,8 @@ static int  animloop = 0;   /* Animation loop count  */
"  -g N   : Set progress granularity to N%% (default 10(%%))\n" \
"  -l N   : Introduce N ms delay in progress callback (default 0)\n" \
"  -p : Print info in progress callback (default no)\n" \
-   "  -s Sx[,Sy] : Set render x/y scaling factors to Sx,Sy (default 1.0)\n" \
-   "  -S Sx[,Sy] : Set grab x/y scaling factors to Sx,Sy (default 1.0)\n" \
+   "  -s Sx[,Sy] : Set output x/y scaling factors to Sx,Sy (default 1.0)\n" \
+   "  -S Sx[,Sy] : Set input x/y scaling factors to Sx,Sy (default 1.0)\n" \
"  -t N   : Set background checkerboard field size (default 8)\n" \
"  -v : Increase verbosity\n"
 
@@ -361,8 +363,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 /* first time it's called */
 if (image_width == 0)
 {
-scale_x = opt_scale_x;
-scale_y = opt_scale_y;
+scale_x = opt_sc_out_x;
+scale_y = opt_sc_out_y;
 
 window_width = DisplayWidth(disp, DefaultScreen(disp));
 window_height = DisplayHeight(disp, DefaultScreen(disp));
@@ -377,8 +379,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 (image_width > window_width || image_height > window_height))
 {
 scale_x = scale_y = 1.;
-while (window_width < SCALE_X(image_width) ||
-   window_height < SCALE_Y(image_height))
+while (window_width < SC_OUT_X(image_width) ||
+   window_height < SC_OUT_Y(image_height))
 {
 scale_x *= .5;
 scale_y = scale_x;
@@ -386,8 +388,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 }
 }
 
-window_width = SCALE_X(image_width);
-window_height = SCALE_Y(image_height);
+window_width = SC_OUT_X(image_width);
+window_height = SC_OUT_Y(image_height);
 if (window_width > MAX_DIM)
 {
 window_width = MAX_DIM;
@@ -457,10 +459,10 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
  r_out.x, r_out.y, r_out.w, r_out.h);
 
 /* Render image (part) (or updated canvas) on window background pixmap */
-up_wx = SCALE_X(r_out.x);
-up_wy = SCALE_Y(r_out.y);
-up_ww = SCALE_X(r_out.w);
-up_wh = SCALE_Y(r_out.h);
+up_wx = SC_OUT_X(r_out.x);
+up_wy = SC_OUT_Y(r_out.y);
+up_ww = SC_OUT_X(r_out.w);
+up_wh = SC_OUT_Y(r_out.h);
 Dprintf(" Paint  %d,%d %dx%d\n", up_wx, up_wy, up_ww, up_wh);
 imlib_context_set_blend(0);
 imlib_context_set_drawable(bg_pm);
@@ -552,8 +554,8 @@ load_image(int no, const char *name)
 Vprintf("Drawable: %#lx: x,y: %d,%d  wxh=%ux%u  bw=%u  depth=%u\n",
 draw, x, y, w, h, bw, depth);
 
-wo = w * opt_sgrab_x;
-ho = h * opt_sgrab_y;
+wo = SC_INP_X(w);
+ho = SC_INP_Y(h);
 im = imlib_create_scaled_image_from_drawable(None, 0, 0, w, h, wo, ho,
  1, (get_alpha) 

[EGIT] [legacy-imlib2] 03/07: imlib2_view: Enable an alternate background color set (red/green)

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit f922904687567c6d58daa9299a7f5267623972c4
Author: Kim Woelders 
AuthorDate: Sun Jan 21 16:02:32 2024 +0100

imlib2_view: Enable an alternate background color set (red/green)
---
 src/bin/imlib2_view.c | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 902a2b2..2899242 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -35,6 +35,7 @@ static Imlib_Image im_curr = NULL;  /* The current image */
 static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
+static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
 static double   opt_scale_x = 1.;
 static double   opt_scale_y = 1.;
 static double   opt_sgrab_x = 1.;
@@ -102,10 +103,20 @@ bg_im_init(int w, int h)
 _onoff_ = (y / opt_cbfs) & 0x1;
 for (x = 0; x < w; x += opt_cbfs)
 {
-if (onoff)
-imlib_context_set_color(144, 144, 144, 255);
+if (opt_cbalt)
+{
+if (onoff)
+imlib_context_set_color(255, 0, 0, 255);
+else
+imlib_context_set_color(0, 255, 0, 255);
+}
 else
-imlib_context_set_color(100, 100, 100, 255);
+{
+if (onoff)
+imlib_context_set_color(144, 144, 144, 255);
+else
+imlib_context_set_color(100, 100, 100, 255);
+}
 imlib_image_fill_rectangle(x, y, opt_cbfs, opt_cbfs);
 onoff ^= 0x1;
 }
@@ -637,6 +648,11 @@ main(int argc, char **argv)
 opt_sgrab_y = opt_sgrab_x;
 break;
 case 't':
+if (*optarg == 'a')
+{
+optarg++;
+opt_cbalt = true;
+}
 no = atoi(optarg);
 if (no > 0)
 opt_cbfs = no;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 06/07: imlib2_view: Optionally scale on input

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 6cef7ca822e1da0416c84c0a19a90be7281c108c
Author: Kim Woelders 
AuthorDate: Mon Jan 22 16:09:20 2024 +0100

imlib2_view: Optionally scale on input

For testing.
---
 src/bin/imlib2_view.c | 35 +--
 1 file changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index c4a1916..1e9b0ec 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -321,6 +321,7 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 {
 static double   scale_x = 0., scale_y = 0.;
 int up_wx, up_wy, up_ww, up_wh;
+int up2_wx, up2_wy, up2_ww, up2_wh;
 rect_t  r_up, r_out;
 
 if (opt_progress_print)
@@ -372,8 +373,10 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 window_height -= 32;
 Dprintf(" Screen WxH=%dx%d\n", window_width, window_height);
 
-image_width = fixedframe ? finfo.frame_w : finfo.canvas_w;
-image_height = fixedframe ? finfo.frame_h : finfo.canvas_h;
+up_ww = fixedframe ? finfo.frame_w : finfo.canvas_w;
+up_wh = fixedframe ? finfo.frame_h : finfo.canvas_h;
+image_width = SC_INP_X(up_ww);
+image_height = SC_INP_X(up_wh);
 
 if (!opt_scale &&
 (image_width > window_width || image_height > window_height))
@@ -403,7 +406,7 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 Dprintf(" Window WxH=%dx%d\n", window_width, window_height);
 
 V2printf(" Image  WxH=%dx%d fmt='%s'\n",
- image_width, image_height, imlib_image_format());
+ up_ww, up_wh, imlib_image_format());
 
 /* Initialize checkered background image */
 bg_im_init(image_width, image_height);
@@ -451,27 +454,31 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 }
 
 /* Render image on background image */
-Dprintf(" Update %d,%d %dx%d\n", r_out.x, r_out.y, r_out.w, r_out.h);
 imlib_context_set_image(bg_im);
 imlib_context_set_blend(1);
+up_wx = SC_INP_X(r_out.x);
+up_wy = SC_INP_Y(r_out.y);
+up_ww = SC_INP_X(r_out.w);
+up_wh = SC_INP_Y(r_out.h);
+Dprintf(" Update  %d,%d %dx%d -> %d,%d %dx%d \n",
+r_out.x, r_out.y, r_out.w, r_out.h, up_wx, up_wy, up_ww, up_wh);
 imlib_blend_image_onto_image(im, 1,
  r_out.x, r_out.y, r_out.w, r_out.h,
- r_out.x, r_out.y, r_out.w, r_out.h);
+ up_wx, up_wy, up_ww, up_wh);
 
 /* Render image (part) (or updated canvas) on window background pixmap */
-up_wx = SC_OUT_X(r_out.x);
-up_wy = SC_OUT_Y(r_out.y);
-up_ww = SC_OUT_X(r_out.w);
-up_wh = SC_OUT_Y(r_out.h);
-Dprintf(" Paint  %d,%d %dx%d\n", up_wx, up_wy, up_ww, up_wh);
+up2_wx = SC_OUT_X(up_wx);
+up2_wy = SC_OUT_Y(up_wy);
+up2_ww = SC_OUT_X(up_ww);
+up2_wh = SC_OUT_Y(up_wh);
+Dprintf(" Paint  %d,%d %dx%d\n", up2_wx, up2_wy, up2_ww, up2_wh);
 imlib_context_set_blend(0);
 imlib_context_set_drawable(bg_pm);
-imlib_render_image_part_on_drawable_at_size(r_out.x, r_out.y, r_out.w,
-r_out.h, up_wx, up_wy, up_ww,
-up_wh);
+imlib_render_image_part_on_drawable_at_size(up_wx, up_wy, up_ww, up_wh,
+up2_wx, up2_wy, up2_ww, up2_wh);
 
 /* Update window */
-XClearArea(disp, win, up_wx, up_wy, up_ww, up_wh, False);
+XClearArea(disp, win, up2_wx, up2_wy, up2_ww, up2_wh, False);
 XFlush(disp);
 
 if (opt_progress_delay > 0)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 07/07: imlib2_view: Enable specifying border

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit cf926c746cd3dfe4bfa5ad8fd5bff075d2efce84
Author: Kim Woelders 
AuthorDate: Tue Aug 8 20:08:09 2023 +0200

imlib2_view: Enable specifying border

The border is applied during input scaling.
The output scaling scales the whole image as rendered by the input
scaling.
---
 src/bin/imlib2_view.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 1e9b0ec..17ca47d 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -31,6 +31,7 @@ static Imlib_Image bg_im = NULL;
 static Imlib_Image bg_im_clean = NULL;
 static Imlib_Image fg_im = NULL;/* The animated image */
 static Imlib_Image im_curr = NULL;  /* The current image */
+static Imlib_Border border;
 
 static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
@@ -69,6 +70,7 @@ static int  animloop = 0;   /* Animation loop count  */
"  imlib2_view [OPTIONS] {FILE | XID}...\n" \
"OPTIONS:\n" \
"  -a : Disable final anti-aliased rendering\n" \
+   "  -b L,R,T,B : Set border\n" \
"  -c : Enable image caching (implies -e)\n" \
"  -d : Enable debug\n" \
"  -e : Do rendering explicitly (not via progress callback)\n" \
@@ -364,6 +366,8 @@ progress(Imlib_Image im, char percent, int update_x, int update_y,
 /* first time it's called */
 if (image_width == 0)
 {
+imlib_image_set_border();
+
 scale_x = opt_sc_out_x;
 scale_y = opt_sc_out_y;
 
@@ -622,13 +626,18 @@ main(int argc, char **argv)
 
 verbose = 0;
 
-while ((opt = getopt(argc, argv, "acdeg:l:ps:S:t:v")) != -1)
+while ((opt = getopt(argc, argv, "ab:cdeg:l:ps:S:t:v")) != -1)
 {
 switch (opt)
 {
 case 'a':
 opt_aa_final = false;
 break;
+case 'b':
+border.left = border.right = border.top = border.bottom = 0;
+sscanf(optarg, "%d,%d,%d,%d",
+   , , , );
+break;
 case 'c':
 opt_cache = true;
 opt_progr = false;  /* Cached images won't give progress callbacks */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/07: imlib2_view: Use poll(), not select()

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 73513f89d57f5ba4e3094958c8427c3434aed86b
Author: Kim Woelders 
AuthorDate: Sun Apr 14 19:35:47 2024 +0200

imlib2_view: Use poll(), not select()
---
 src/bin/imlib2_view.c | 26 --
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index e221089..35fd677 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -3,6 +3,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -595,6 +596,8 @@ main(int argc, char **argv)
 {
 int opt, err;
 int no, inc;
+static int  nfds;
+static struct pollfd afds[1];
 
 verbose = 0;
 
@@ -684,14 +687,15 @@ main(int argc, char **argv)
 exit(0);
 }
 
+nfds = 0;
+afds[nfds++].fd = ConnectionNumber(disp);
+
 for (;;)
 {
-int x, y, b, count, fdsize, xfd, timeout;
+int x, y, b, count, timeout;
 XEvent  ev;
 static int  zoom_mode = 0, zx, zy;
 static double   zoom = 1.0;
-struct timeval  tval;
-fd_set  fdset;
 KeySym  key;
 int no2;
 
@@ -848,21 +852,7 @@ main(int argc, char **argv)
 if (multiframe)
 continue;
 
-xfd = ConnectionNumber(disp);
-fdsize = xfd + 1;
-FD_ZERO();
-FD_SET(xfd, );
-
-if (timeout > 0)
-{
-tval.tv_sec = timeout / 100;
-tval.tv_usec = timeout - tval.tv_sec * 100;
-count = select(fdsize, , NULL, NULL, );
-}
-else
-{
-count = select(fdsize, , NULL, NULL, NULL);
-}
+count = poll(afds, nfds, timeout);
 
 if (count < 0)
 {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 04/07: imlib2_view: Optionally disable final anti-aliased rendering

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit faf0f175a51dcb0007cd14ec5bde27ba0ab25e9d
Author: Kim Woelders 
AuthorDate: Fri Apr 19 16:54:27 2024 +0200

imlib2_view: Optionally disable final anti-aliased rendering
---
 src/bin/imlib2_view.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 2899242..82f66ef 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -36,6 +36,7 @@ static bool opt_cache = false;
 static bool opt_progr = true;   /* Render through progress callback */
 static bool opt_scale = false;
 static bool opt_cbalt = false;  /* Alternate checkerboard colors (red/green) */
+static bool opt_aa_final = true;/* Do final anti-aliased rendering */
 static double   opt_scale_x = 1.;
 static double   opt_scale_y = 1.;
 static double   opt_sgrab_x = 1.;
@@ -65,6 +66,7 @@ static int  animloop = 0;   /* Animation loop count  */
"Usage:\n" \
"  imlib2_view [OPTIONS] {FILE | XID}...\n" \
"OPTIONS:\n" \
+   "  -a : Disable final anti-aliased rendering\n" \
"  -c : Enable image caching (implies -e)\n" \
"  -d : Enable debug\n" \
"  -e : Do rendering explicitly (not via progress callback)\n" \
@@ -611,10 +613,13 @@ main(int argc, char **argv)
 
 verbose = 0;
 
-while ((opt = getopt(argc, argv, "cdeg:l:ps:S:t:v")) != -1)
+while ((opt = getopt(argc, argv, "acdeg:l:ps:S:t:v")) != -1)
 {
 switch (opt)
 {
+case 'a':
+opt_aa_final = false;
+break;
 case 'c':
 opt_cache = true;
 opt_progr = false;  /* Cached images won't give progress callbacks */
@@ -876,8 +881,11 @@ main(int argc, char **argv)
 }
 else if (count == 0)
 {
-/* "Final" (delayed) re-rendering with AA */
-bg_pm_redraw(zx, zy, zoom, 1);
+if (opt_aa_final)
+{
+/* "Final" (delayed) re-rendering with AA */
+bg_pm_redraw(zx, zy, zoom, 1);
+}
 }
 }
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 01/01: e sys main - fix minor leaking iterator - unused code now

2024-04-23 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository enlightenment.


View the commit online.
commit 8b06ca97a6df8cdef7a67c82429b15b71791f3e3
Author: Carsten Haitzler 
AuthorDate: Tue Apr 23 09:39:01 2024 +0100

e sys main - fix minor leaking iterator - unused code now
---
 src/bin/e_sys_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/e_sys_main.c b/src/bin/e_sys_main.c
index 3758af1c7..02c78aee1 100644
--- a/src/bin/e_sys_main.c
+++ b/src/bin/e_sys_main.c
@@ -342,6 +342,7 @@ main(int argc,
   rm = EINA_FALSE;
   eina_stringshare_del(s);
}
+ eina_iterator_free(it);
  if (rm)
{
   if (rmdir(path))


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [terminology] 02/02: Merge branch 'osc-10-query'

2024-04-20 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository terminology.


View the commit online.
commit 87c0538aafce43482c7b8f7911496e952ba851a1
Merge: 865cf123 e1ebc207
Author: Boris Faure 
AuthorDate: Sat Apr 20 14:38:27 2024 +0200

Merge branch 'osc-10-query'

 src/bin/termptyesc.c | 20 ++--
 tests/tests.results  |  2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [terminology] 01/02: tests: output of xterm-osc-10.sh has changed

2024-04-20 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository terminology.


View the commit online.
commit e1ebc207c545240567885fbb5a1de8bec41239c4
Author: Boris Faure 
AuthorDate: Sat Apr 20 14:37:32 2024 +0200

tests: output of xterm-osc-10.sh has changed
---
 tests/tests.results | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tests.results b/tests/tests.results
index 26d0e2a5..2b740ec5 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -145,7 +145,7 @@ color_link_edc.sh 06155942ad90e408ed11225b1e84b6a4
 color_link_css_rgb.sh d465a1d5095e550b73e73266452068d9
 color_link_css_hsl.sh 3a3dc638c80d5a2a9d5c804a778c09fb
 crash_empty_osc.sh 3675247f0d0c1aa439bb5075237e3fe5
-xterm-osc-10.sh 3782074fb92672b55351cc11f253b418
+xterm-osc-10.sh e96950ab6c1e2df17dca8b55e34a5540
 xterm-osc-11.sh 1039019667ac61b387f1436e7eff2398
 xterm-osc-12.sh 9237a291abf73341d4e6a9cf94592c6d
 xterm-colors-sharp.sh f034efaac9b49ea97e46e9ec4b139c23


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [terminology] 01/01: Translated using Weblate (Chinese (Simplified))

2024-04-20 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository terminology.


View the commit online.
commit 865cf123b2f887ec6eab3c8c349a3545319e71bb
Author: 复予 
AuthorDate: Fri Apr 19 03:15:57 2024 +0200

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (234 of 234 strings)

Co-authored-by: 复予 
Translate-URL: https://hosted.weblate.org/projects/terminology/terminology/zh_Hans/
Translation: Terminology/Terminology
---
 po/zh_Hans.po | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/po/zh_Hans.po b/po/zh_Hans.po
index c19c3ec0..a49969a6 100644
--- a/po/zh_Hans.po
+++ b/po/zh_Hans.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: terminology\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2023-08-17 12:36+0200\n"
-"PO-Revision-Date: 2024-03-24 08:01+\n"
+"PO-Revision-Date: 2024-04-19 01:15+\n"
 "Last-Translator: 复予 \n"
 "Language-Team: Chinese (Simplified) \n"
@@ -392,7 +392,7 @@ msgstr "无边框启动"
 
 #: src/bin/main.c:507
 msgid "Start as a override-redirect window"
-msgstr ""
+msgstr "作为 override-redirect 窗口启动"
 
 #: src/bin/main.c:509
 msgid "Start maximized"
@@ -630,7 +630,7 @@ msgstr "启用专用术语转义码"
 
 #: src/bin/options_behavior.c:418
 msgid "Enable escape codes manipulating selections"
-msgstr ""
+msgstr "启用处理选区的转义代码"
 
 #: src/bin/options_behavior.c:419
 msgid "Always treat Emojis as double-width characters"
@@ -661,7 +661,7 @@ msgstr "高:"
 msgid ""
 "Set the time of the animation thattakes places during tab switches,"
 "be those done due to key bindings or mouse wheel over the tabs panel"
-msgstr ""
+msgstr "设置切换标签页时的动画时长,通过按键绑定或在标签页面板上滚动鼠标滚轮"
 
 #: src/bin/options_behavior.c:534
 msgid "Tab zoom/switch animation time:"
@@ -724,7 +724,7 @@ msgid "Using theme %s"
 msgstr "使用主题 %s"
 
 #: src/bin/options_elm.c:122
-#, c-format, fuzzy
+#, c-format
 msgid ""
 "Terminology uses the elementary toolkit.The "
 "toolkit configuration settings can be accessed by running %s@@ -750,7 +750,7 @@ msgstr "选择首选大小,以便此文本可读"
 msgid ""
 "The scale configuration can also be changed through elementary's configuration panel"
-msgstr ""
+msgstr "缩放配置也可通过 elementary 的配置面板更改"
 
 #: src/bin/options_font.c:550
 msgid "Search font"
@@ -950,7 +950,7 @@ msgid "memerr: %s"
 msgstr "memerr: %s"
 
 #: src/bin/termpty.c:225
-#, c-format, fuzzy
+#, c-format
 msgid "Size set ioctl failed: %s"
 msgstr "大小设置 ioctl 失败: %s"
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [evisum] 01/01: Adding portuguese translation

2024-04-18 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.


View the commit online.
commit 2d0697c7ab157afb102f465f02133b3690069920
Author: maxerba 
AuthorDate: Thu Apr 18 22:12:14 2024 +0200

Adding portuguese translation
---
 po/LINGUAS |   2 +-
 po/pt.po   | 631 +
 2 files changed, 632 insertions(+), 1 deletion(-)

diff --git a/po/LINGUAS b/po/LINGUAS
index 11d4c21..098799c 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1 @@
-es fr it ka
+es fr it ka pt
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 000..46b627d
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,631 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the evisum package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: evisum\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-04-12 09:44+0200\n"
+"PO-Revision-Date: 2024-04-17 22:10+0100\n"
+"Last-Translator: Hugo Carvalho \n"
+"Language-Team: \n"
+"Language: pt_PT\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.4.2\n"
+
+#: src/bin/next/process.c:76 src/bin/system/process.c:76
+#: src/bin/ui/ui_process_list.c:1039
+msgid "dsleep"
+msgstr "adormecido"
+
+#: src/bin/next/process.c:77 src/bin/next/process.c:84
+#: src/bin/system/process.c:77 src/bin/system/process.c:84
+#: src/bin/ui/ui_process_list.c:1033
+msgid "idle"
+msgstr "inativo"
+
+#: src/bin/next/process.c:78 src/bin/next/process.c:85
+#: src/bin/next/process.c:96 src/bin/system/process.c:78
+#: src/bin/system/process.c:85 src/bin/system/process.c:96
+#: src/bin/ui/ui_process_list.c:1027
+msgid "running"
+msgstr "em execução"
+
+#: src/bin/next/process.c:79 src/bin/next/process.c:86
+#: src/bin/system/process.c:79 src/bin/system/process.c:86
+#: src/bin/ui/ui_process_list.c:1029
+msgid "sleeping"
+msgstr "a dormir"
+
+#: src/bin/next/process.c:80 src/bin/next/process.c:87
+#: src/bin/system/process.c:80 src/bin/system/process.c:87
+#: src/bin/ui/ui_process_list.c:1031 src/bin/ui/ui_process_view.c:923
+msgid "stopped"
+msgstr "parado"
+
+#: src/bin/next/process.c:81 src/bin/system/process.c:81
+#: src/bin/ui/ui_process_list.c:1037
+msgid "dead"
+msgstr "morto"
+
+#: src/bin/next/process.c:82 src/bin/next/process.c:92
+#: src/bin/next/process.c:95 src/bin/system/process.c:82
+#: src/bin/system/process.c:92 src/bin/system/process.c:95
+#: src/bin/ui/ui_process_list.c:1035
+msgid "zombie"
+msgstr "zombie"
+
+# em espera
+#: src/bin/next/process.c:90 src/bin/system/process.c:90
+msgid "wait"
+msgstr "espera"
+
+#: src/bin/next/process.c:91 src/bin/system/process.c:91
+msgid "lock"
+msgstr "bloquear"
+
+#: src/bin/ui/evisum_ui.c:310 src/bin/ui/evisum_ui.c:603
+#, c-format
+msgid "%1.0f secs"
+msgstr "%1.0f segs"
+
+#: src/bin/ui/evisum_ui.c:312
+#, c-format
+msgid "%1.0f sec"
+msgstr "%1.0f seg"
+
+#: src/bin/ui/evisum_ui.c:448 src/bin/ui/ui_process_list.c:1567
+msgid "Actions"
+msgstr "Ações"
+
+#: src/bin/ui/evisum_ui.c:465
+msgid "Processes"
+msgstr "Processos"
+
+#: src/bin/ui/evisum_ui.c:472
+msgid "CPU"
+msgstr "CPU"
+
+#: src/bin/ui/evisum_ui.c:479
+msgid "Memory"
+msgstr "Memória"
+
+#: src/bin/ui/evisum_ui.c:486 src/bin/ui/ui_disk.c:566
+msgid "Storage"
+msgstr "Armazenamento"
+
+#: src/bin/ui/evisum_ui.c:493 src/bin/ui/ui_sensors.c:270
+msgid "Sensors"
+msgstr "Sensores"
+
+#: src/bin/ui/evisum_ui.c:500 src/bin/ui/ui_network.c:351
+msgid "Network"
+msgstr "Rede"
+
+#: src/bin/ui/evisum_ui.c:514
+msgid "Effects"
+msgstr "Efeitos"
+
+#: src/bin/ui/evisum_ui.c:528 src/bin/ui/ui_util.c:422
+msgid "About"
+msgstr "Acerca"
+
+#: src/bin/ui/evisum_ui.c:556
+msgid "Visuals"
+msgstr "Visuais"
+
+#: src/bin/ui/evisum_ui.c:587 src/bin/ui/visuals/cpu_default.c:540
+msgid "Options"
+msgstr "Opções"
+
+#: src/bin/ui/evisum_ui.c:606
+msgid "Poll delay"
+msgstr "Atraso na sondagem"
+
+#: src/bin/ui/evisum_ui.c:627
+msgid "Show kernel threads?"
+msgstr "Mostrar threads do kernel?"
+
+#: src/bin/ui/evisum_ui.c:638
+msgid "User only?"
+msgstr "Apenas utilizador?"
+
+#: src/bin/ui/evisum_ui.c:649
+msgid "Display"
+msgstr "Visualização"
+
+#: src/bin/ui/evisum_ui.c:662
+msgid "Display scroll bar?"
+msgstr "Ver barra de deslocamento?"
+
+#: src/bin/ui/evisum_ui.c:672
+msgid "Display status bar?"
+msgstr "Ver barra de estado?"
+
+#: src/bin/ui/evisum_ui.c:689
+msgid "Alpha"
+msgstr "Alfa"
+
+#: src/bin/ui/evisum_ui.c:701
+#, c-format
+msgid "%1.0f %%"
+msgstr "%1.0f %%"
+
+#: src/bin/ui/ui_cpu.c:234
+msgid "CPU Activity"
+msgstr "Atividade de CPU"
+
+#: src/bin/ui/ui_disk.c:588
+msgid "device"
+msgstr "dispositivo"
+
+#: src/bin/ui/ui_disk.c:597
+msgid "mount"
+msgstr "montar"
+
+#: src/bin/ui/ui_disk.c:606
+msgid "type"
+msgstr "tipo"
+
+#: src/bin/ui/ui_disk.c:615
+msgid "total"
+msgstr "total"
+
+#: 

[EGIT] [efm2] 01/01: fix fs scan

2024-04-16 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit 0b9c076b6bbfdf250c7a09a70c1515d9f9687cc1
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Tue Apr 16 20:41:22 2024 +0100

fix fs scan
---
 src/backends/default/mv.c | 21 +
 src/backends/default/status.c |  1 +
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index bda92dd..e39bf1c 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -77,24 +77,10 @@ fs_scan(const char *src)
   it = eina_file_ls(src);
   if (it)
 {
-  Eina_Strbuf *buf;
-
-  buf = eina_strbuf_new();
   EINA_ITERATOR_FOREACH(it, s)
   {
-// build new path "src/s"
-eina_strbuf_reset(buf);
-eina_strbuf_append(buf, src);
-// add / if src doesn't end in /
-if (src[strlen(src) - 1] != '/') eina_strbuf_append(buf, "/");
-eina_strbuf_append(buf, s);
-eina_stringshare_del(s);
-// fs_scan this file (or dir)
-// yes - this returns. we make leak our eina_file_ls data, strbuf etc.
-// dont care - we're going to exit the whole process in a bit
-if (!fs_scan(eina_strbuf_string_get(buf))) return EINA_FALSE;
+if (!fs_scan(s)) return EINA_FALSE;
   }
-  eina_strbuf_free(buf);
 }
 }
   else
@@ -317,7 +303,10 @@ main(int argc, char **argv)
   free(src_meta);
   free(dst_meta);
 }
-  else pause(); // wait here - status thread will exit for us
+  else
+{
+  status_end();
+}
 err:
   if (buf) eina_strbuf_free(buf);
   status_end();
diff --git a/src/backends/default/status.c b/src/backends/default/status.c
index aff152e..973e275 100644
--- a/src/backends/default/status.c
+++ b/src/backends/default/status.c
@@ -159,6 +159,7 @@ _cb_status_thread(void *data EINA_UNUSED, Eina_Thread t EINA_UNUSED)
   break;
 case MSG_END:
   {
+_status_flush();
 if (status_fd >= 0)
   {
 close(status_fd);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/01: Add missing CET (Control-flow Enforcement Technology) bits in asm code

2024-04-16 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 699fc2b8b5ad6728dc2b863734262a1204abb932
Author: Kim Woelders 
AuthorDate: Tue Apr 16 08:08:04 2024 +0200

Add missing CET (Control-flow Enforcement Technology) bits in asm code

Adding .note.gnu.property section data.

https://git.enlightenment.org/old/legacy-imlib2/issues/23
---
 src/lib/asm.h | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/lib/asm.h b/src/lib/asm.h
index 773cd8d..ea96d57 100644
--- a/src/lib/asm.h
+++ b/src/lib/asm.h
@@ -17,14 +17,15 @@
 .size PR_(sym),.-PR_(sym); \
 .align 8;
 
-#ifdef __CET__
-#if defined(DO_MMX_ASM)
-#define ENDBR_ endbr32
-#elif defined(DO_AMD64_ASM)
-#define ENDBR_ endbr64
-#endif
-#else
 #define ENDBR_
+#ifdef __CET__
+#ifdef __has_include
+#if __has_include()
+#include 
+#undef  ENDBR_
+#define ENDBR_ _CET_ENDBR
+#endif
+#endif
 #endif
 
 #endif  /* __ASM_H */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 01/01: add script to compile everything, modify object_free() declaration

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit c4884fe7ec350971d4e6b0a93aab3bde501c85d0
Author: Vincent Torri 
AuthorDate: Tue Apr 16 07:39:07 2024 +0200

add script to compile everything, modify object_free() declaration
---
 configure.sh | 12 
 src/d3d_0.c  | 34 ++
 src/d3d_1.c  |  2 +-
 src/d3d_2.c  |  6 +++---
 src/d3d_3.c  |  6 +++---
 src/d3d_4.c  |  6 +++---
 src/d3d_5.c  |  6 +++---
 src/d3d_6.c  |  6 +++---
 8 files changed, 46 insertions(+), 32 deletions(-)

diff --git a/configure.sh b/configure.sh
new file mode 100644
index 000..659a8db
--- /dev/null
+++ b/configure.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cd src
+
+gcc -g -O2 -Wall -Wextra -o d3d_0 d3d_0.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_2 d3d_2.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_3 d3d_3.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_4 d3d_4.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_5 d3d_5.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_6 d3d_6.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+gcc -g -O2 -Wall -Wextra -o d3d_7 d3d_7.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
diff --git a/src/d3d_0.c b/src/d3d_0.c
index 42bcaf4..be3069c 100644
--- a/src/d3d_0.c
+++ b/src/d3d_0.c
@@ -5,11 +5,12 @@
  *
  * Compilation:
  *
- * gcc -g -O2 -Wall -Wextra -o d3d_0 d3d_0.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ * gcc -g -O2 -Wall -Wextra -o d3d_0 d3d_0.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
  */
 
-#include  /* calloc() free() */
-#include   /* printf() fflush() */
+#include   /* calloc() free() */
+#include/* printf() fflush() */
+#include   /* strlen() */
 
 #define _DEBUG
 
@@ -19,14 +20,15 @@
 #include  /* DXGI interface */
 #include/* D3D11 interface */
 #include  /* compilation of shader */
+#include/* IDXGIDebug interface */
 
 #include "win.h"
 
 #ifdef _DEBUG
-# define FCT \
+# define DBG_FCT \
 do { printf(" * %s\n", __FUNCTION__); fflush(stdout); } while (0)
 #else
-# define FCT \
+# define DBG_FCT \
 do { } while (0)
 #endif
 
@@ -45,10 +47,10 @@ D3d *d3d_init(Window *win, int vsync)
 if (!d3d)
 return NULL;
 
-return d3d;
+d3d->vsync = vsync;
+win->d3d = d3d;
 
-(void)win;
-(void)vsync;
+return d3d;
 }
 
 void d3d_shutdown(D3d *d3d)
@@ -59,6 +61,14 @@ void d3d_shutdown(D3d *d3d)
 free(d3d);
 }
 
+void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
+{
+(void)d3d;
+(void)rot;
+(void)width;
+(void) height;
+}
+
 void d3d_scene_begin(D3d *d3d)
 {
 (void)d3d;
@@ -68,14 +78,6 @@ void d3d_scene_end(void)
 {
 }
 
-void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
-{
-(void)d3d;
-(void)rot;
-(void)width;
-(void) height;
-}
-
 void d3d_render(D3d *d3d)
 {
 (void)d3d;
diff --git a/src/d3d_1.c b/src/d3d_1.c
index 56d1af6..1e895cf 100644
--- a/src/d3d_1.c
+++ b/src/d3d_1.c
@@ -7,7 +7,7 @@
  *
  * Compilation:
  *
- * gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
+ * gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
  */
 
 #include   /* calloc() free() malloc() */
diff --git a/src/d3d_2.c b/src/d3d_2.c
index 1e2dfbe..ed4aadd 100644
--- a/src/d3d_2.c
+++ b/src/d3d_2.c
@@ -625,13 +625,13 @@ Object *triangle_new(D3d *d3d,
 return o;
 }
 
-void object_free(void *o)
+void object_free(Object *o)
 {
 if (!o)
 return ;
 
-ID3D11Buffer_Release(((Object *)o)->index_buffer);
-ID3D11Buffer_Release(((Object *)o)->vertex_buffer);
+ID3D11Buffer_Release(o->index_buffer);
+ID3D11Buffer_Release(o->vertex_buffer);
 free(o);
 }
 
diff --git a/src/d3d_3.c b/src/d3d_3.c
index 1223633..486a376 100644
--- a/src/d3d_3.c
+++ b/src/d3d_3.c
@@ -670,13 +670,13 @@ Object *triangle_new(D3d *d3d,
 return o;
 }
 
-void object_free(void *o)
+void object_free(Object *o)
 {
 if (!o)
 return ;
 
-ID3D11Buffer_Release(((Object 

[EGIT] [direct3d] 03/03: add debug in all files

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit b1205690cb516307f0360bd5511d4557c29808c8
Author: Vincent Torri 
AuthorDate: Tue Apr 16 07:23:32 2024 +0200

add debug in all files
---
 src/d3d_2.c | 63 +--
 src/d3d_3.c | 65 ++--
 src/d3d_4.c | 67 --
 src/d3d_5.c | 73 --
 src/d3d_6.c | 70 +---
 src/d3d_7.c | 82 +++--
 6 files changed, 351 insertions(+), 69 deletions(-)

diff --git a/src/d3d_2.c b/src/d3d_2.c
index 48d8aee..1e2dfbe 100644
--- a/src/d3d_2.c
+++ b/src/d3d_2.c
@@ -7,11 +7,12 @@
  *
  * Compilation:
  *
- * gcc -g -O2 -Wall -Wextra -o d3d_2 d3d_2.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ * gcc -g -O2 -Wall -Wextra -o d3d_2 d3d_2.c win.c -ld3d11 -ld3dcompiler -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
  */
 
-#include  /* calloc() free() malloc() */
-#include   /* printf() fflush() */
+#include   /* calloc() free() malloc() */
+#include/* printf() fflush() */
+#include   /* strlen() */
 
 #define _DEBUG
 
@@ -21,14 +22,18 @@
 #include  /* DXGI interface */
 #include/* D3D11 interface */
 #include  /* compilation of shader */
+#include/* IDXGIDebug interface */
 
 #include "win.h"
 
 #ifdef _DEBUG
-# define FCT \
+# define DBG_FCT \
 do { printf(" * %s\n", __FUNCTION__); fflush(stdout); } while (0)
+# define DBG_NAME(interface_, child_, name_) interface_ ## _SetPrivateData(child_, _D3DDebugObjectName, strlen(name_), name_)
 #else
-# define FCT \
+# define DBG_FCT \
+do { } while (0)
+# define DBG_NAME(interface_, child_, name_) \
 do { } while (0)
 #endif
 
@@ -38,6 +43,9 @@ do { } while (0)
 struct D3d
 {
 /* DXGI */
+#ifdef _DEBUG
+IDXGIDebug *dxgi_debug;
+#endif
 IDXGIFactory2 *dxgi_factory;
 IDXGISwapChain1 *dxgi_swapchain;
 /* D3D11 */
@@ -89,6 +97,8 @@ static void d3d_refresh_rate_get(D3d *d3d, UINT *num, UINT *den)
 if (!d3d->vsync)
 return;
 
+DBG_FCT;
+
 /* adapter of primary desktop : pass 0U */
 res = IDXGIFactory_EnumAdapters(d3d->dxgi_factory, 0U, _adapter);
 if (FAILED(res))
@@ -190,6 +200,16 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto free_d3d;
 
+#ifdef _DEBUG
+IDXGIFactory2_SetPrivateData(d3d->dxgi_factory,
+ _D3DDebugObjectName,
+ strlen("Factory2"), "Factory2");
+res = DXGIGetDebugInterface(_IDXGIDebug,
+(void **)>dxgi_debug);
+if (FAILED(res))
+goto release_dxgi_factory2;
+#endif
+
 /* software engine functions are called from the main loop */
 flags = D3D11_CREATE_DEVICE_SINGLETHREADED |
 D3D11_CREATE_DEVICE_BGRA_SUPPORT;
@@ -217,12 +237,17 @@ D3d *d3d_init(Window *win, int vsync)
 goto release_dxgi_factory2;
 
 #ifdef _DEBUG
+ID3D11Device_SetPrivateData(d3d->d3d_device,
+_D3DDebugObjectName,
+strlen("Device"), "Device");
 res = ID3D11Debug_QueryInterface(d3d->d3d_device, _ID3D11Debug,
  (void **)>d3d_debug);
 if (FAILED(res))
 goto release_d3d_device;
 #endif
 
+DBG_NAME(ID3D11DeviceContext, d3d->d3d_device_ctx, "Device Context");
+
 if (!GetClientRect(win->win, ))
 goto release_d3d_device;
 
@@ -265,6 +290,8 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto release_d3d_device;
 
+DBG_NAME(IDXGIFactory, d3d->dxgi_swapchain, "Swap Chain");
+
 /* rasterizer */
 desc_rs.FillMode = D3D11_FILL_SOLID;
 desc_rs.CullMode = D3D11_CULL_NONE;
@@ -283,6 +310,8 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto release_dxgi_swapchain;
 
+DBG_NAME(ID3D11Device, d3d->d3d_rasterizer_state, "Rasterizer State");
+
 /* Vertex shader */
 flags = D3DCOMPILE_ENABLE_STRICTNESS;
 #ifdef _DEBUG
@@ -318,6 +347,8 @@ D3d *d3d_init(Window *win, int vsync)
 goto release_d3D_rasterizer;
 }
 
+DBG_NAME(ID3D11Device, d3d->d3d_vertex_shader, "Vertex Shader");
+
 /* create the input layout */
 res = ID3D11Device_CreateInputLayout(d3d->d3d_device,
  desc_ie,
@@ -332,6 +363,8 @@ D3d *d3d_init(Window *win, int vsync)
 goto release_vertex_shader;
 }
 
+DBG_NAME(ID3D11Device, d3d->d3d_input_layout, "Input Layout");
+
 /* Pixel shader */
 ps_blob = NULL;
 res = D3DCompileFromFile(L"shader_2.hlsl",
@@ -362,6 +395,8 @@ D3d *d3d_init(Window *win, int vsync)
 goto release_input_layout;
 }
 
+

[EGIT] [direct3d] 01/03: d3d_1.c: add debug support

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit e9dd42690ca332d9bf08c990da285ea9dde116f8
Author: Vincent Torri 
AuthorDate: Mon Apr 15 11:02:03 2024 +0200

d3d_1.c: add debug support
---
 src/d3d_1.c | 50 +++---
 1 file changed, 43 insertions(+), 7 deletions(-)

diff --git a/src/d3d_1.c b/src/d3d_1.c
index 7800079..f596c28 100644
--- a/src/d3d_1.c
+++ b/src/d3d_1.c
@@ -7,11 +7,12 @@
  *
  * Compilation:
  *
- * gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ * gcc -g -O2 -Wall -Wextra -o d3d_1 d3d_1.c win.c -ld3d11 -ldxgi /c/Windows/system32/DXGIDebug.dll -ldxguid -luuid -D_WIN32_WINNT=0x0A00
  */
 
-#include  /* calloc() free() malloc() */
-#include   /* printf() fflush() */
+#include   /* calloc() free() malloc() */
+#include/* printf() fflush() */
+#include   /* strlen() */
 
 #define _DEBUG
 
@@ -21,20 +22,26 @@
 #include  /* DXGI interface */
 #include/* D3D11 interface */
 #include  /* compilation of shader */
+#include/* IDXGIDebug interface */
 
 #include "win.h"
 
 #ifdef _DEBUG
-# define FCT \
+# define DBG_FCT \
 do { printf(" * %s\n", __FUNCTION__); fflush(stdout); } while (0)
+# define DBG_NAME(interface_, child_, name_) interface_ ## _SetPrivateData(child_, _D3DDebugObjectName, strlen(name_), name_)
 #else
-# define FCT \
+# define DBG_FCT \
 do { } while (0)
+# define DBG_NAME(interface_, child_, name_)
 #endif
 
 struct D3d
 {
 /* DXGI */
+#ifdef _DEBUG
+IDXGIDebug *dxgi_debug;
+#endif
 IDXGIFactory2 *dxgi_factory;
 IDXGISwapChain1 *dxgi_swapchain;
 /* D3D11 */
@@ -69,6 +76,8 @@ static void d3d_refresh_rate_get(D3d *d3d, UINT *num, UINT *den)
 if (!d3d->vsync)
 return;
 
+DBG_FCT;
+
 /* adapter of primary desktop : pass 0U */
 res = IDXGIFactory_EnumAdapters(d3d->dxgi_factory, 0U, _adapter);
 if (FAILED(res))
@@ -163,6 +172,16 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto free_d3d;
 
+#ifdef _DEBUG
+IDXGIFactory2_SetPrivateData(d3d->dxgi_factory,
+ _D3DDebugObjectName,
+ strlen("Factory2"), "Factory2");
+res = DXGIGetDebugInterface(_IDXGIDebug,
+(void **)>dxgi_debug);
+if (FAILED(res))
+goto release_dxgi_factory2;
+#endif
+
 /* software engine functions are called from the main loop */
 flags = D3D11_CREATE_DEVICE_SINGLETHREADED |
 D3D11_CREATE_DEVICE_BGRA_SUPPORT;
@@ -190,12 +209,17 @@ D3d *d3d_init(Window *win, int vsync)
 goto release_dxgi_factory2;
 
 #ifdef _DEBUG
+ID3D11Device_SetPrivateData(d3d->d3d_device,
+_D3DDebugObjectName,
+strlen("Device"), "Device");
 res = ID3D11Debug_QueryInterface(d3d->d3d_device, _ID3D11Debug,
  (void **)>d3d_debug);
 if (FAILED(res))
 goto release_d3d_device;
 #endif
 
+DBG_NAME(ID3D11DeviceContext, d3d->d3d_device_ctx, "Device Context");
+
 if (!GetClientRect(win->win, ))
 goto release_d3d_device;
 
@@ -238,6 +262,8 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto release_d3d_device;
 
+DBG_NAME(IDXGIFactory, d3d->dxgi_swapchain, "Swap Chain");
+
 /* rasterizer */
 desc_rs.FillMode = D3D11_FILL_SOLID;
 desc_rs.CullMode = D3D11_CULL_NONE;
@@ -256,6 +282,8 @@ D3d *d3d_init(Window *win, int vsync)
 if (FAILED(res))
 goto release_dxgi_swapchain;
 
+DBG_NAME(ID3D11Device, d3d->d3d_rasterizer_state, "Rasterizer State");
+
 return d3d;
 
   release_dxgi_swapchain:
@@ -279,6 +307,7 @@ D3d *d3d_init(Window *win, int vsync)
 void d3d_shutdown(D3d *d3d)
 {
 #ifdef _DEBUG
+IDXGIDebug *dxgi_debug;
 ID3D11Debug *d3d_debug;
 #endif
 
@@ -286,6 +315,7 @@ void d3d_shutdown(D3d *d3d)
 return;
 
 #ifdef _DEBUG
+dxgi_debug = d3d->dxgi_debug;
 d3d_debug = d3d->d3d_debug;
 #endif
 
@@ -300,7 +330,9 @@ void d3d_shutdown(D3d *d3d)
 
 #ifdef _DEBUG
 ID3D11Debug_ReportLiveDeviceObjects(d3d_debug, D3D11_RLDO_DETAIL);
+IDXGIDebug_ReportLiveObjects(dxgi_debug, DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_ALL);
 ID3D11Debug_Release(d3d_debug);
+IDXGIDebug_Release(dxgi_debug);
 #endif
 }
 
@@ -310,7 +342,7 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 ID3D11Texture2D *back_buffer;
 HRESULT res;
 
-FCT;
+DBG_FCT;
 
 /* unset the render target view in the output merger */
 ID3D11DeviceContext_OMSetRenderTargets(d3d->d3d_device_ctx,
@@ -351,6 +383,8 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 return;
 }
 
+DBG_NAME(ID3D11Device, back_buffer, "Texture2D buffer resized");
+
 ZeroMemory(_rtv, sizeof(D3D11_RENDER_TARGET_VIEW_DESC));
 

[EGIT] [direct3d] 02/03: d3d_1.c: fix warning when _DEBUG is not defined

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 2183c63c9c100d412ecbfb90ae1ab091cd1402d4
Author: Vincent Torri 
AuthorDate: Mon Apr 15 11:38:33 2024 +0200

d3d_1.c: fix warning when _DEBUG is not defined
---
 src/d3d_1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/d3d_1.c b/src/d3d_1.c
index f596c28..56d1af6 100644
--- a/src/d3d_1.c
+++ b/src/d3d_1.c
@@ -33,7 +33,8 @@ do { printf(" * %s\n", __FUNCTION__); fflush(stdout); } while (0)
 #else
 # define DBG_FCT \
 do { } while (0)
-# define DBG_NAME(interface_, child_, name_)
+# define DBG_NAME(interface_, child_, name_) \
+do { } while (0)
 #endif
 
 struct D3d


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [evisum] 01/01: Updating spanish translation

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.


View the commit online.
commit 966f27272adfb69d11ac893e49b9178f0940bf9b
Author: maxerba 
AuthorDate: Mon Apr 15 17:13:26 2024 +0200

Updating spanish translation
---
 po/es.po | 21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/po/es.po b/po/es.po
index e694986..c996c86 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: Evisum\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2024-04-12 09:44+0200\n"
-"PO-Revision-Date: 2024-04-01 14:14+0200\n"
+"PO-Revision-Date: 2024-04-15 16:05+0200\n"
 "Last-Translator: RWR\n"
 "Language-Team: General\n"
 "Language: es\n"
@@ -117,7 +117,7 @@ msgstr "Sobre"
 
 #: src/bin/ui/evisum_ui.c:556
 msgid "Visuals"
-msgstr ""
+msgstr "Visuales"
 
 #: src/bin/ui/evisum_ui.c:587 src/bin/ui/visuals/cpu_default.c:540
 msgid "Options"
@@ -147,9 +147,8 @@ msgid "Display scroll bar?"
 msgstr "¿Ver barra de desplazamiento?"
 
 #: src/bin/ui/evisum_ui.c:672
-#, fuzzy
 msgid "Display status bar?"
-msgstr "¿Ver barra de desplazamiento?"
+msgstr "¿Ver barra de estado?"
 
 #: src/bin/ui/evisum_ui.c:689
 msgid "Alpha"
@@ -597,31 +596,31 @@ msgstr "B"
 
 #: src/bin/ui/ui_util.c:109
 msgid "KiB"
-msgstr ""
+msgstr "KiB"
 
 #: src/bin/ui/ui_util.c:109
 msgid "MiB"
-msgstr ""
+msgstr "MiB"
 
 #: src/bin/ui/ui_util.c:109
 msgid "GiB"
-msgstr ""
+msgstr "GiB"
 
 #: src/bin/ui/ui_util.c:110
 msgid "TiB"
-msgstr ""
+msgstr "TiB"
 
 #: src/bin/ui/ui_util.c:110
 msgid "PiB"
-msgstr ""
+msgstr "PiB"
 
 #: src/bin/ui/ui_util.c:110
 msgid "EiB"
-msgstr ""
+msgstr "EiB"
 
 #: src/bin/ui/ui_util.c:110
 msgid "ZiB"
-msgstr ""
+msgstr "ZiB"
 
 #: src/bin/ui/ui_util.c:512
 msgid "Close"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 01/01: Portuguese translation update

2024-04-15 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.


View the commit online.
commit ac70f1cb4b7d8300876fd526114481c6f5eacec9
Author: hugok 
AuthorDate: Sun Apr 14 15:57:10 2024 -0700

Portuguese translation update
---
 po/pt.po | 44 +---
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/po/pt.po b/po/pt.po
index 87f417ab..1232b663 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -3,14 +3,14 @@
 # Pedro Alexandre , 1999, 2000.
 # Daniel Vieira Pereira , 1999, 2000.
 # Sérgio Marques , 2010, 2011.
-# Hugo Carvalho , 2020, 2021, 2022, 2023.
+# Hugo Carvalho , 2020, 2021, 2022, 2023, 2024.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: e16\n"
 "Report-Msgid-Bugs-To: enlightenment-i...@lists.sourceforge.net\n"
 "POT-Creation-Date: 2024-04-03 18:58+0200\n"
-"PO-Revision-Date: 2023-10-19 11:49+0100\n"
+"PO-Revision-Date: 2024-04-14 23:53+0100\n"
 "Last-Translator: Hugo Carvalho \n"
 "Language-Team: Hugo Carvalho \n"
 "Language: pt\n"
@@ -19,12 +19,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Launchpad-Export-Date: 2010-05-09 01:32+\n"
-"X-Generator: Poedit 3.4\n"
+"X-Generator: Poedit 3.4.2\n"
 
 #: src/about.c:35
 #, c-format
 msgid "About Enlightenment e16 version %s"
-msgstr "Sobre a versão %s do Enlightenment e16"
+msgstr "Acerca da versão %s do Enlightenment e16"
 
 #: src/about.c:46
 #, c-format
@@ -39,11 +39,11 @@ msgid ""
 "Mandrake - mandr...@mandrake.net\n"
 "Kim Woelders - k...@woelders.dk\n"
 msgstr ""
-"Bem vindo ao Enlightenment e16\n"
+"Bem-vindo ao Enlightenment e16\n"
 "versão %s.\n"
-"Se encontrar erros, não hesite\n"
-"em nos enviar um relatório de erros.\n"
-"Esperamos que aprecie o software.\n"
+"Se encontrar um erro, não hesite\n"
+"em enviar um relatório de erro.\n"
+"Esperamos que goste do software.\n"
 "\n"
 "The Rasterman - ras...@rasterman.com\n"
 "Mandrake - mandr...@mandrake.net\n"
@@ -73,7 +73,7 @@ msgstr "Erro no Enlightenment"
 
 #: src/alert.c:586
 msgid "Enlightenment Message Dialog"
-msgstr "Caixa de diálogo do Enlightement"
+msgstr "Janela de mensagem do Enlightement"
 
 #: src/alert.c:586
 msgid "Ignore this"
@@ -192,7 +192,7 @@ msgstr "Ordenar por ficheiro"
 
 #: src/backgrounds.c:2169
 msgid "Sort by attr."
-msgstr "Ordenar por atributos"
+msgstr "Ordenar por atributo"
 
 #: src/backgrounds.c:2175
 msgid "Sort by image"
@@ -884,7 +884,7 @@ msgstr "Minimizar"
 
 #: src/groups.c:969 src/groups.c:1060
 msgid "Killing"
-msgstr "Matar"
+msgstr "Aniquilar"
 
 #: src/groups.c:974 src/groups.c:1065
 msgid "Moving"
@@ -892,7 +892,7 @@ msgstr "Mover"
 
 #: src/groups.c:979 src/groups.c:1070
 msgid "Raising/lowering"
-msgstr "Elevar/Baixar"
+msgstr "Elevar/baixar"
 
 #: src/groups.c:984 src/groups.c:1075
 msgid "Sticking"
@@ -1006,7 +1006,7 @@ msgstr ""
 "que reinicie agora. Se deseja ajudar a corrigir isto, por favor compile\n"
 "o Enlightenment com símbolos de depuração e funcionamento Enlightenment\n"
 "sob gdb para que possa retroceder para onde falhou e enviar um\n"
-"relatório de erros útil com informação e variável de rasto\n"
+"relatório de erro útil com informação e variável de rasto\n"
 "dumps, etc.\n"
 
 #: src/handlers.c:102
@@ -1019,9 +1019,9 @@ msgid ""
 msgstr ""
 "O Enlightenment causou um erro no Bus.\n"
 "\n"
-"Sugere-se que verifique o seu equipamento e instalação do.\n"
-"sistemas operativo. É altamente invulgar causar erros de Bus\n"
-"em hardware funcional.\n"
+"Sugerimos que verifique o seu hardware e a instalação do\n"
+"sistema operativo. É muito invulgar causar erros de Bus\n"
+"em hardware operacional.\n"
 
 #: src/hints.c:588
 msgid "Selection Error!"
@@ -1047,7 +1047,7 @@ msgstr "Mensagem"
 #: src/ipc.c:1620 src/ipc.c:1627
 #, c-format
 msgid "e16 was built without %s support"
-msgstr "e16 foi compilado sem suporte a %s"
+msgstr "O e16 foi compilado sem suporte a %s"
 
 #: src/ipc.c:1621
 msgid "composite"
@@ -2341,7 +2341,7 @@ msgstr "Verificar o tamanho de todas as caches"
 
 #: config/strings.c:96
 msgid "Regenerate menus"
-msgstr "Regenerar os menus"
+msgstr "Regenerar menus"
 
 #: config/strings.c:98 config/strings.c:99
 msgid "Settings"
@@ -2349,7 +2349,7 @@ msgstr "Definições"
 
 #: config/strings.c:103
 msgid "About Enlightenment"
-msgstr "Sobre o Enlightenment"
+msgstr "Acerca do Enlightenment"
 
 #: config/strings.c:104
 msgid "About this theme"
@@ -2365,13 +2365,11 @@ msgstr "Reiniciar"
 
 #: config/strings.c:107 config/strings.c:185
 msgid "Log out"
-msgstr "Sair"
+msgstr "Terminar sessão"
 
 #: config/strings.c:108
-#, fuzzy
-#| msgid "Yes, Shut Down"
 msgid "Shut down"
-msgstr "Sim, desligar"
+msgstr "Encerrar"
 
 #: config/strings.c:114
 msgid "Leave alone"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [evisum] 01/01: Updating italian and spanish translations

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.


View the commit online.
commit 5a32a98cf4dd7cd23a2d7008f02873ca0a219fa6
Author: maxerba 
AuthorDate: Sun Apr 14 22:55:04 2024 +0200

Updating italian and spanish translations
---
 po/es.po | 573 -
 po/it.po | 584 ---
 2 files changed, 563 insertions(+), 594 deletions(-)

diff --git a/po/es.po b/po/es.po
index ce44cda..e694986 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,13 +1,13 @@
 # Spanish translation for Evisum.
 # This file is distributed under the same license as the evisum package.
-# Roy W. Reese , 2020.
+# Roy W. Reese , 2020, 2024.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: Evisum\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-04-02 13:16+0200\n"
-"PO-Revision-Date: 2020-07-15 22:07+0200\n"
+"POT-Creation-Date: 2024-04-12 09:44+0200\n"
+"PO-Revision-Date: 2024-04-01 14:14+0200\n"
 "Last-Translator: RWR\n"
 "Language-Team: General\n"
 "Language: es\n"
@@ -15,190 +15,196 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.3.1\n"
+"X-Generator: Poedit 3.4.2\n"
 
-#: src/bin/system/process.c:76 src/bin/ui/ui_process_list.c:927
+# = sueño profundo
+#: src/bin/next/process.c:76 src/bin/system/process.c:76
+#: src/bin/ui/ui_process_list.c:1039
 msgid "dsleep"
-msgstr ""
+msgstr "muy dormido"
 
+#: src/bin/next/process.c:77 src/bin/next/process.c:84
 #: src/bin/system/process.c:77 src/bin/system/process.c:84
-#: src/bin/ui/ui_process_list.c:921
+#: src/bin/ui/ui_process_list.c:1033
 msgid "idle"
-msgstr ""
+msgstr "inactivo"
 
-#: src/bin/system/process.c:78 src/bin/system/process.c:85
-#: src/bin/system/process.c:96 src/bin/ui/ui_process_list.c:915
+#: src/bin/next/process.c:78 src/bin/next/process.c:85
+#: src/bin/next/process.c:96 src/bin/system/process.c:78
+#: src/bin/system/process.c:85 src/bin/system/process.c:96
+#: src/bin/ui/ui_process_list.c:1027
 msgid "running"
-msgstr ""
+msgstr "ejecusandose"
 
+#: src/bin/next/process.c:79 src/bin/next/process.c:86
 #: src/bin/system/process.c:79 src/bin/system/process.c:86
-#: src/bin/ui/ui_process_list.c:917
+#: src/bin/ui/ui_process_list.c:1029
 msgid "sleeping"
-msgstr ""
+msgstr "dormido"
 
+#: src/bin/next/process.c:80 src/bin/next/process.c:87
 #: src/bin/system/process.c:80 src/bin/system/process.c:87
-#: src/bin/ui/ui_process_list.c:919
+#: src/bin/ui/ui_process_list.c:1031 src/bin/ui/ui_process_view.c:923
 msgid "stopped"
-msgstr ""
+msgstr "parado"
 
-#: src/bin/system/process.c:81 src/bin/ui/ui_process_list.c:925
+#: src/bin/next/process.c:81 src/bin/system/process.c:81
+#: src/bin/ui/ui_process_list.c:1037
 msgid "dead"
-msgstr ""
+msgstr "muerto"
 
-#: src/bin/system/process.c:82 src/bin/system/process.c:92
-#: src/bin/system/process.c:95 src/bin/ui/ui_process_list.c:923
+#: src/bin/next/process.c:82 src/bin/next/process.c:92
+#: src/bin/next/process.c:95 src/bin/system/process.c:82
+#: src/bin/system/process.c:92 src/bin/system/process.c:95
+#: src/bin/ui/ui_process_list.c:1035
 msgid "zombie"
-msgstr ""
+msgstr "zombi"
 
-#: src/bin/system/process.c:90
+# ~en espera
+#: src/bin/next/process.c:90 src/bin/system/process.c:90
 msgid "wait"
-msgstr ""
+msgstr "espera"
 
-#: src/bin/system/process.c:91
+#: src/bin/next/process.c:91 src/bin/system/process.c:91
 msgid "lock"
-msgstr ""
+msgstr "blockeado"
 
-#: src/bin/ui/evisum_ui.c:308 src/bin/ui/evisum_ui.c:541
+#: src/bin/ui/evisum_ui.c:310 src/bin/ui/evisum_ui.c:603
 #, c-format
 msgid "%1.0f secs"
-msgstr ""
+msgstr "%1.0f segundos"
 
-#: src/bin/ui/evisum_ui.c:310
+#: src/bin/ui/evisum_ui.c:312
 #, c-format
 msgid "%1.0f sec"
-msgstr ""
+msgstr "%1.0f segundo"
 
-#: src/bin/ui/evisum_ui.c:420 src/bin/ui/ui_process_list.c:1384
+#: src/bin/ui/evisum_ui.c:448 src/bin/ui/ui_process_list.c:1567
 msgid "Actions"
 msgstr "Acciones"
 
-#: src/bin/ui/evisum_ui.c:437
-#, fuzzy
+#: src/bin/ui/evisum_ui.c:465
 msgid "Processes"
-msgstr "Proceso"
+msgstr "Procesos"
 
-#: src/bin/ui/evisum_ui.c:444
+#: src/bin/ui/evisum_ui.c:472
 msgid "CPU"
 msgstr "CPU"
 
-#: src/bin/ui/evisum_ui.c:451
+#: src/bin/ui/evisum_ui.c:479
 msgid "Memory"
 msgstr "Memoria"
 
-#: src/bin/ui/evisum_ui.c:458 src/bin/ui/ui_disk.c:566
+#: src/bin/ui/evisum_ui.c:486 src/bin/ui/ui_disk.c:566
 msgid "Storage"
 msgstr "Almacenamiento"
 
-#: src/bin/ui/evisum_ui.c:465 src/bin/ui/ui_sensors.c:270
+#: src/bin/ui/evisum_ui.c:493 src/bin/ui/ui_sensors.c:270
 msgid "Sensors"
-msgstr ""
+msgstr "Sensores"
 
-#: src/bin/ui/evisum_ui.c:472 src/bin/ui/ui_network.c:351
-#, fuzzy
+#: src/bin/ui/evisum_ui.c:500 src/bin/ui/ui_network.c:351
 msgid "Network"
-msgstr "Red: Entrante"
+msgstr "Red"
 
-#: src/bin/ui/evisum_ui.c:486
+#: src/bin/ui/evisum_ui.c:514
 msgid "Effects"

[EGIT] [evisum] 01/01: Adding potfiles.in, so meson targets evisum-pot and evisum-update-po can work, and updating evisum.pot

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository evisum.


View the commit online.
commit 2bd6ba2d47a2cd4792a2b6413c4308fec653205f
Author: maxerba 
AuthorDate: Fri Apr 12 17:54:39 2024 +0200

Adding potfiles.in, so meson targets evisum-pot and evisum-update-po can work, and updating evisum.pot
---
 po/POTFILES.in |  50 ++
 po/evisum.pot  | 307 ++---
 2 files changed, 212 insertions(+), 145 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 000..1dd206b
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,50 @@
+src/bin/background/evisum_background.c
+src/bin/background/evisum_background.h
+src/bin/evisum_actions.h
+src/bin/evisum_config.c
+src/bin/evisum_config.h
+src/bin/evisum_server.c
+src/bin/evisum_server.h
+src/bin/main.c
+src/bin/next/file_systems.c
+src/bin/next/file_systems.h
+src/bin/next/machine.c
+src/bin/next/machine.h
+src/bin/next/macros.h
+src/bin/next/process.c
+src/bin/next/process.h
+src/bin/system/filesystems.c
+src/bin/system/filesystems.h
+src/bin/system/machine.c
+src/bin/system/machine.h
+src/bin/system/macros.h
+src/bin/system/process.c
+src/bin/system/process.h
+src/bin/ui/evisum_ui.c
+src/bin/ui/evisum_ui.h
+src/bin/ui/gettext.h
+src/bin/ui/ui_cache.c
+src/bin/ui/ui_cache.h
+src/bin/ui/ui_cpu.c
+src/bin/ui/ui_cpu.h
+src/bin/ui/ui_disk.c
+src/bin/ui/ui_disk.h
+src/bin/ui/ui_memory.c
+src/bin/ui/ui_memory.h
+src/bin/ui/ui_network.c
+src/bin/ui/ui_network.h
+src/bin/ui/ui_process_list.c
+src/bin/ui/ui_process_list.h
+src/bin/ui/ui_process_view.c
+src/bin/ui/ui_process_view.h
+src/bin/ui/ui_sensors.c
+src/bin/ui/ui_sensors.h
+src/bin/ui/ui_util.c
+src/bin/ui/ui_util.h
+src/bin/ui/util.c
+src/bin/ui/visuals/cpu_bars.c
+src/bin/ui/visuals/cpu_bars.h
+src/bin/ui/visuals/cpu_basic.c
+src/bin/ui/visuals/cpu_basic.h
+src/bin/ui/visuals/cpu_default.c
+src/bin/ui/visuals/cpu_default.h
diff --git a/po/evisum.pot b/po/evisum.pot
index fabf220..1a3c1ab 100644
--- a/po/evisum.pot
+++ b/po/evisum.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: evisum\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-04-02 13:16+0200\n"
+"POT-Creation-Date: 2024-04-12 09:44+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -17,143 +17,144 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/bin/system/process.c:76 src/bin/ui/ui_process_list.c:927
+#: src/bin/next/process.c:76 src/bin/system/process.c:76
+#: src/bin/ui/ui_process_list.c:1039
 msgid "dsleep"
 msgstr ""
 
+#: src/bin/next/process.c:77 src/bin/next/process.c:84
 #: src/bin/system/process.c:77 src/bin/system/process.c:84
-#: src/bin/ui/ui_process_list.c:921
+#: src/bin/ui/ui_process_list.c:1033
 msgid "idle"
 msgstr ""
 
-#: src/bin/system/process.c:78 src/bin/system/process.c:85
-#: src/bin/system/process.c:96 src/bin/ui/ui_process_list.c:915
+#: src/bin/next/process.c:78 src/bin/next/process.c:85
+#: src/bin/next/process.c:96 src/bin/system/process.c:78
+#: src/bin/system/process.c:85 src/bin/system/process.c:96
+#: src/bin/ui/ui_process_list.c:1027
 msgid "running"
 msgstr ""
 
+#: src/bin/next/process.c:79 src/bin/next/process.c:86
 #: src/bin/system/process.c:79 src/bin/system/process.c:86
-#: src/bin/ui/ui_process_list.c:917
+#: src/bin/ui/ui_process_list.c:1029
 msgid "sleeping"
 msgstr ""
 
+#: src/bin/next/process.c:80 src/bin/next/process.c:87
 #: src/bin/system/process.c:80 src/bin/system/process.c:87
-#: src/bin/ui/ui_process_list.c:919
+#: src/bin/ui/ui_process_list.c:1031 src/bin/ui/ui_process_view.c:923
 msgid "stopped"
 msgstr ""
 
-#: src/bin/system/process.c:81 src/bin/ui/ui_process_list.c:925
+#: src/bin/next/process.c:81 src/bin/system/process.c:81
+#: src/bin/ui/ui_process_list.c:1037
 msgid "dead"
 msgstr ""
 
-#: src/bin/system/process.c:82 src/bin/system/process.c:92
-#: src/bin/system/process.c:95 src/bin/ui/ui_process_list.c:923
+#: src/bin/next/process.c:82 src/bin/next/process.c:92
+#: src/bin/next/process.c:95 src/bin/system/process.c:82
+#: src/bin/system/process.c:92 src/bin/system/process.c:95
+#: src/bin/ui/ui_process_list.c:1035
 msgid "zombie"
 msgstr ""
 
-#: src/bin/system/process.c:90
+#: src/bin/next/process.c:90 src/bin/system/process.c:90
 msgid "wait"
 msgstr ""
 
-#: src/bin/system/process.c:91
+#: src/bin/next/process.c:91 src/bin/system/process.c:91
 msgid "lock"
 msgstr ""
 
-#: src/bin/ui/evisum_ui.c:308 src/bin/ui/evisum_ui.c:541
+#: src/bin/ui/evisum_ui.c:310 src/bin/ui/evisum_ui.c:603
 #, c-format
 msgid "%1.0f secs"
 msgstr ""
 
-#: src/bin/ui/evisum_ui.c:310
+#: src/bin/ui/evisum_ui.c:312
 #, c-format
 msgid "%1.0f sec"
 msgstr ""
 
-#: src/bin/ui/evisum_ui.c:420 src/bin/ui/ui_process_list.c:1384
+#: src/bin/ui/evisum_ui.c:448 src/bin/ui/ui_process_list.c:1567
 msgid "Actions"
 msgstr ""
 
-#: 

[EGIT] [direct3d] 01/01: WIP: code for textures

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 87907282864570e795acaf9e3e1da779b22ebfe7
Author: Vincent Torri 
AuthorDate: Sun Apr 14 18:34:36 2024 +0200

WIP: code for textures
---
 src/d3d_7.c   | 1145 +
 src/shader_7.hlsl |   41 ++
 2 files changed, 1186 insertions(+)

diff --git a/src/d3d_7.c b/src/d3d_7.c
new file mode 100644
index 000..3faedee
--- /dev/null
+++ b/src/d3d_7.c
@@ -0,0 +1,1145 @@
+/*
+ * Tutorial part 7
+ *
+ * Manage texture
+ *
+ * Compilation:
+ *
+ * gcc -g -O2 -Wall -Wextra -o d3d_7 d3d_7.c win.c -ld3d11 -ld3dcompiler -ldxgi -luuid -D_WIN32_WINNT=0x0A00
+ */
+
+#include  /* calloc() free() malloc() */
+#include   /* printf() fflush() */
+
+#define _DEBUG
+
+/* C API for d3d11 */
+#define COBJMACROS
+
+#include  /* DXGI interface */
+#include/* D3D11 interface */
+#include  /* compilation of shader */
+#include/* IDXGIDebug interface */
+
+#include "win.h"
+
+#ifdef _DEBUG
+# define FCT \
+do { printf(" * %s\n", __FUNCTION__); fflush(stdout); } while (0)
+# define DBG_NAME(interface_, child_, name_) interface_ ## _SetPrivateData(child_, _D3DDebugObjectName, strlen(name_), name_)
+#else
+# define FCT \
+do { } while (0)
+# define DBG_NAME(interface_, child_, name_)
+#endif
+
+typedef enum
+{
+OBJECT_TYPE_RECTANGLE,
+OBJECT_TYPE_TEXTURE
+} Object_Type;
+
+struct D3d
+{
+/* DXGI */
+#ifdef _DEBUG
+IDXGIDebug *dxgi_debug;
+#endif
+IDXGIFactory2 *dxgi_factory;
+IDXGISwapChain1 *dxgi_swapchain;
+/* D3D11 */
+ID3D11Device *d3d_device;
+#ifdef _DEBUG
+ID3D11Debug *d3d_debug;
+#endif
+ID3D11DeviceContext *d3d_device_ctx;
+ID3D11RenderTargetView *d3d_render_target_view;
+ID3D11InputLayout *d3d_input_layout;
+ID3D11VertexShader *d3d_vertex_shader;
+ID3D11Buffer *d3d_const_buffer;
+ID3D11SamplerState *d3d_sampler_state;
+ID3D11RasterizerState *d3d_rasterizer_state;
+ID3D11PixelShader *d3d_pixel_shader;
+D3D11_VIEWPORT viewport;
+unsigned int vsync : 1;
+};
+
+typedef struct
+{
+UINT x;
+UINT y;
+BYTE r;
+BYTE g;
+BYTE b;
+BYTE a;
+FLOAT u;
+FLOAT v;
+} Vertex;
+
+typedef struct
+{
+int rotation[2][4];
+float ivps[2];
+float dummy[2];
+} Const_Buffer;
+
+typedef struct
+{
+Object_Type type;
+ID3D11Buffer *vertex_buffer;
+ID3D11Buffer *index_buffer;
+ID3D11Texture2D *texture;
+ID3D11ShaderResourceView *texture_view;
+UINT stride;
+UINT offset;
+UINT index_count;
+} Object;
+
+static Object *objects[1];
+
+/** D3D11 **/
+
+static void d3d_refresh_rate_get(D3d *d3d, UINT *num, UINT *den)
+{
+DXGI_MODE_DESC *display_mode_list = NULL; /* 28 bytes */
+IDXGIAdapter *dxgi_adapter;
+IDXGIOutput *dxgi_output;
+UINT nbr_modes;
+UINT i;
+HRESULT res;
+
+*num = 0U;
+*den = 1U;
+
+if (!d3d->vsync)
+return;
+
+/* adapter of primary desktop : pass 0U */
+res = IDXGIFactory_EnumAdapters(d3d->dxgi_factory, 0U, _adapter);
+if (FAILED(res))
+return;
+
+/* output of primary desktop : pass 0U */
+res = IDXGIAdapter_EnumOutputs(dxgi_adapter, 0U, _output);
+if (FAILED(res))
+goto release_dxgi_adapter;
+
+/* number of mode that fit the format */
+ res = IDXGIOutput_GetDisplayModeList(dxgi_output,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ DXGI_ENUM_MODES_INTERLACED,
+ _modes, NULL);
+if (FAILED(res))
+goto release_dxgi_output;
+
+printf("display mode list : %d\n", nbr_modes);
+fflush(stdout);
+display_mode_list = (DXGI_MODE_DESC *)malloc(nbr_modes * sizeof(DXGI_MODE_DESC));
+if (!display_mode_list)
+goto release_dxgi_output;
+
+/* fill the mode list */
+res = IDXGIOutput_GetDisplayModeList(dxgi_output,
+ DXGI_FORMAT_B8G8R8A8_UNORM,
+ DXGI_ENUM_MODES_INTERLACED,
+ _modes, display_mode_list);
+if (FAILED(res))
+goto free_mode_list;
+
+for (i = 0; i < nbr_modes; i++)
+{
+if ((display_mode_list[i].Width == (UINT)GetSystemMetrics(SM_CXSCREEN)) &&
+(display_mode_list[i].Height == (UINT)GetSystemMetrics(SM_CYSCREEN)))
+{
+*num = display_mode_list[i].RefreshRate.Numerator;
+*den = display_mode_list[i].RefreshRate.Denominator;
+break;
+}
+}
+
+#ifdef _DEBUG
+{
+DXGI_ADAPTER_DESC adapter_desc;
+
+IDXGIAdapter_GetDesc(dxgi_adapter, _desc);
+printf(" * video mem: %llu B, %llu MB\n",
+   adapter_desc.DedicatedVideoMemory,
+   

[EGIT] [efl] 02/02: eo: make eo ptr indirection caches flexible

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.


View the commit online.
commit cdd3c35bb30ffbeb7fb6543ad6e7b45d6a5cccd5
Author: Carsten Haitzler 
AuthorDate: Tue Apr 9 10:30:47 2024 +0100

eo: make eo ptr indirection caches flexible
---
 src/lib/eo/eo_ptr_indirection.c |  29 +-
 src/lib/eo/eo_ptr_indirection.x | 116 +++-
 2 files changed, 119 insertions(+), 26 deletions(-)

diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index cd578a5a2a..e3d6f62b6f 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -94,19 +94,20 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
EINA_PREFETCH(&(data->tables[0]));
domain = (obj_id >> SHIFT_DOMAIN) & MASK_DOMAIN;
tdata = _eo_table_data_table_get(data, domain);
-   EINA_PREFETCH(&(tdata->cache.id));
if (EINA_UNLIKELY(!tdata)) goto err;
-
+   _eo_cache_prefetch(tdata);
 
if (EINA_LIKELY(domain != EFL_ID_DOMAIN_SHARED))
  {
-if (obj_id == tdata->cache.id)
-  return tdata->cache.object;
+_Eo_Object *obj;
+
+obj = _eo_cache_find(tdata, obj_id);
+if (obj) return obj;
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID;
-EINA_PREFETCH_NOCACHE(&(tdata->eo_ids_tables[mid_table_id])); //prefetch for line 119
+EINA_PREFETCH(&(tdata->eo_ids_tables[mid_table_id])); //prefetch for line 119
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID;
-EINA_PREFETCH_NOCACHE((tdata->eo_ids_tables[mid_table_id] + table_id)); //prefetch for line 121
+EINA_PREFETCH((tdata->eo_ids_tables[mid_table_id] + table_id)); //prefetch for line 121
 entry_id = (obj_id >> SHIFT_ENTRY_ID) & MASK_ENTRY_ID;
 generation = obj_id & MASK_GENERATIONS;
 
@@ -126,8 +127,7 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
   if (entry->active && (entry->generation == generation))
 {
// Cache the result of that lookup
-   tdata->cache.object = entry->ptr;
-   tdata->cache.id = obj_id;
+   _eo_cache_store(tdata, obj_id, entry->ptr);
return entry->ptr;
 }
}
@@ -136,17 +136,19 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
  }
else
  {
+_Eo_Object *obj;
+
 eina_lock_take(&(_eo_table_data_shared_data->obj_lock));
-if (obj_id == tdata->cache.id)
 // yes we return keeping the lock locked. that's why
 // you must call _eo_obj_pointer_done() wrapped
 // by EO_OBJ_DONE() to release
-  return tdata->cache.object;
+obj = _eo_cache_find(tdata, obj_id);
+if (obj) return obj;
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID;
-EINA_PREFETCH_NOCACHE(&(tdata->eo_ids_tables[mid_table_id]));
+EINA_PREFETCH(&(tdata->eo_ids_tables[mid_table_id]));
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID;
-EINA_PREFETCH_NOCACHE((tdata->eo_ids_tables[mid_table_id] + table_id));
+EINA_PREFETCH((tdata->eo_ids_tables[mid_table_id] + table_id));
 entry_id = (obj_id >> SHIFT_ENTRY_ID) & MASK_ENTRY_ID;
 generation = obj_id & MASK_GENERATIONS;
 
@@ -167,8 +169,7 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
   if (entry->active && (entry->generation == generation))
 {
// Cache the result of that lookup
-   tdata->cache.object = entry->ptr;
-   tdata->cache.id = obj_id;
+   _eo_cache_store(tdata, obj_id, entry->ptr);
// yes we return keeping the lock locked. that's why
// you must call _eo_obj_pointer_done() wrapped
// by EO_OBJ_DONE() to release
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 64bad07a06..33043b36e6 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -305,13 +305,19 @@ typedef struct
 typedef struct _Eo_Id_Data   Eo_Id_Data;
 typedef struct _Eo_Id_Table_Data Eo_Id_Table_Data;
 
+#define CACHENUM 2
+#define CACHELINE 64
+#define CACHELRU 1
+
 struct _Eo_Id_Table_Data
 {
/* Cached eoid lookups */
+#if CACHENUM > 0
+   Eo_Id cache_id[CACHENUM];
+   _Eo_Object   *cache_object[CACHENUM];
+#endif
struct
  {
-Eo_Id id;
-_Eo_Object   *object;
 const Eo *isa_id;
 const Efl_Class  *klass;
 Eina_Bool isa;
@@ -343,6 +349,100 @@ extern Eina_TLS  _eo_table_data;
 extern 

[EGIT] [efl] 01/02: use eina_file_access() instead of access() if possible

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.


View the commit online.
commit 49976ca388dfb66cce600e0b2169cae0c675f0e7
Author: Vincent Torri 
AuthorDate: Fri Mar 29 05:41:17 2024 +0100

use eina_file_access() instead of access() if possible
---
 src/lib/ecore_evas/ecore_evas_module.c | 11 +---
 src/lib/ecore_file/ecore_file.c| 98 ++
 src/lib/eet/eet_lib.c  |  2 +
 src/lib/eeze/eeze_disk.c   | 18 +++
 src/lib/eeze/eeze_disk_libmount.c  |  2 +-
 src/lib/eina/eina_prefix.c |  6 +--
 src/lib/elementary/elm_main.c  |  4 +-
 src/lib/ethumb/ethumb.c|  2 +-
 8 files changed, 22 insertions(+), 121 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 4fdd8f70b0..0a4c6de997 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -22,15 +22,6 @@ static Eina_Module *_ecore_evas_vnc = NULL;
 # define ECORE_EVAS_ENGINE_NAME "module.so"
 #endif
 
-static inline Eina_Bool
-_file_exists(const char *file)
-{
-   if (!file) return EINA_FALSE;
-
-   if (access(file, F_OK) == -1) return EINA_FALSE;
-   return EINA_TRUE;
-}
-
 
 static Eina_Module *
 _ecore_evas_vnc_server_module_try_load(const char *prefix,
@@ -219,7 +210,7 @@ _ecore_evas_available_engines_get(void)
  eina_strbuf_append_printf(buf, "%s/%s/" ECORE_EVAS_ENGINE_NAME,
info->path, MODULE_ARCH);
 
- if (_file_exists(eina_strbuf_string_get(buf)))
+ if (eina_file_access(eina_strbuf_string_get(buf), EINA_FILE_ACCESS_MODE_EXIST))
{
   const char *name;
 
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 66bdfe542e..a1a0a27874 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -606,111 +606,19 @@ ecore_file_dir_get(const char *file)
 EAPI Eina_Bool
 ecore_file_can_read(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, R_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_READ);
 }
 
 EAPI Eina_Bool
 ecore_file_can_write(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, W_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_WRITE);
 }
 
 EAPI Eina_Bool
 ecore_file_can_exec(const char *file)
 {
-#ifdef _WIN32
-   HANDLE h;
-   HANDLE fm;
-   char *base;
-   char *base_nt;
-   LARGE_INTEGER sz;
-   WORD characteristics;
-#endif
-
-   if (!file || !*file) return EINA_FALSE;
-
-#ifdef _WIN32
-   /*
-* we parse the file to check if it is a PE file (EXE or DLL)
-* and we finally check whether it's a DLL or not.
-* Reference :
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
-*/
-   h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL,
-  OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-   if (h == INVALID_HANDLE_VALUE)
- goto test_bat;
-
-   if (!GetFileSizeEx(h, ))
- goto close_h;
-
-   /* a PE file must have at least the DOS and NT headers */
-   if (sz.QuadPart < (LONGLONG)(sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS)))
- goto close_h;
-
-   fm = CreateFileMapping(h, NULL, PAGE_READONLY, 0, 0, NULL);
-   if (fm == NULL)
- goto close_h;
-
-   base = (char *)MapViewOfFile(fm, FILE_MAP_READ, 0, 0, 0);
-   CloseHandle(fm);
-   if (base == NULL)
- goto close_h;
-
-   /*
-* the PE file begins with the DOS header.
-* First magic number : the DOS header must begin with a DOS magic number,
-* that is "MZ", that is 0x5a4d, stored in a WORD.
-*/
-   if (*((WORD *)base) != 0x5a4d)
- goto unmap_view;
-
-   /*
-* The position of the NT header is located at the offset 0x3c.
-*/
-   base_nt = base + *((DWORD *)(base + 0x3c));
-   /*
-* The NT header begins with the magic number "PE\0\0", that is
-* 0x4550, stored in a DWORD.
-*/
-   if (*((DWORD *)base_nt) != 0x4550)
- goto unmap_view;
-
-   /*
-* to get informations about executable (EXE or DLL), we look at
-* the 'Characteristics' member of the NT header, located at the offset
-* 22 (4 for the magic number, 18 for the offset) from base_nt.
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics
-*/
-   characteristics = *((WORD *)(base_nt + 4 + 18));
-
-   UnmapViewOfFile(base);
-   CloseHandle(h);
-
-   /*
-* 0x0002 : if set, EXE or DLL
-* 0x2000 : if set, DLL
-*/
-   if ((characteristics & 0x0002) && !(characteristics & 0x2000))
- return EINA_TRUE;
- unmap_view:
-   UnmapViewOfFile(base);
- close_h:
-   CloseHandle(h);
- test_bat:
-   /*
-* a .bat file, considered as an executable, is only a text file,
-* so we rely on 

[EGIT] [direct3d] 01/01: add 2 reference links

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 71cdf0aaeea851275dd2414360cff036154746f2
Author: Vincent Torri 
AuthorDate: Sun Apr 14 10:28:45 2024 +0200

add 2 reference links
---
 Direct3D-11-for-2D.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Direct3D-11-for-2D.md b/Direct3D-11-for-2D.md
index 18274d3..783d4bd 100644
--- a/Direct3D-11-for-2D.md
+++ b/Direct3D-11-for-2D.md
@@ -19,6 +19,8 @@ References:
 * [Braynzar Soft Tutorials](https://www.braynzarsoft.net/viewtutorial/q16390-braynzar-soft-directx-11-tutorials)
 * [tutorials points](https://www.tutorialspoint.com/directx/directx_overview.htm)
 * [Direct3D 11.3 Functional Specification](https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm)
+* [graphicsprogramming tutorial](https://graphicsprogramming.github.io/learnd3d11/1-introduction/1-1-getting-started/1-1-0-overview/)
+* [Debug API tricks](https://seanmiddleditch.github.io/direct3d-11-debug-api-tricks/)
 * and of course MSDN !
 
 # Table of contents


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 01/01: add TOC to wiki - try #1

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 6638d501d9576e94f2339121e5115e76a2c30057
Author: Vincent Torri 
AuthorDate: Sun Apr 14 10:24:41 2024 +0200

add TOC to wiki - try #1
---
 Direct3D-11-for-2D.md | 5 +
 1 file changed, 5 insertions(+)

diff --git a/Direct3D-11-for-2D.md b/Direct3D-11-for-2D.md
index 914a7e4..18274d3 100644
--- a/Direct3D-11-for-2D.md
+++ b/Direct3D-11-for-2D.md
@@ -1,3 +1,8 @@
+---
+gitea: none
+include_toc: true
+---
+
 # Introduction
 This tutorial aims at presenting the usage of Direct3D 11 in 2D, without any help of Direct2D, SpriteBatch or any other library. Each part of this tutorial will add some Direct3D 11 features, to obtain finally the display of a rectangle. Then, writing a software Direct3D engine for Evas will be easy.
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 01/01: rename file

2024-04-14 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 85d756c112d28a13aa09ab747d5200cf8218243a
Author: Vincent Torri 
AuthorDate: Sun Apr 14 10:21:36 2024 +0200

rename file
---
 ...glle.md => Direct3D-11-for-2D%3A-Display-a-triangle-and-a-rectangle.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Direct3D-11-for-2D%3A-Display-a-triangle-and-a-rectanglle.md b/Direct3D-11-for-2D%3A-Display-a-triangle-and-a-rectangle.md
similarity index 100%
rename from Direct3D-11-for-2D%3A-Display-a-triangle-and-a-rectanglle.md
rename to Direct3D-11-for-2D%3A-Display-a-triangle-and-a-rectangle.md


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 02/02: Add endbr32/64 instruction at the start of asm functions

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 0f378ef87f8c6b0e7fbd4c8e65bf5ba60356e353
Author: Kim Woelders 
AuthorDate: Sat Apr 13 09:36:22 2024 +0200

Add endbr32/64 instruction at the start of asm functions

Only do so when compiling with -fcf-protection (=> __CET__ is defined).

Inspired by:
https://github.com/openbsd/ports/commit/004ff08738baa98bea634e8b6b49dfd246dd0644

Comment:
  Fixes SIGILL in tests on 11th gen intel (IBT)

https://git.enlightenment.org/old/legacy-imlib2/issues/23
---
 src/lib/amd64_blend.S  |  1 +
 src/lib/amd64_blend_cmod.S |  1 +
 src/lib/asm.h  | 10 ++
 src/lib/asm_blend.S|  1 +
 src/lib/asm_blend_cmod.S   |  1 +
 src/lib/asm_rgba.S |  1 +
 6 files changed, 15 insertions(+)

diff --git a/src/lib/amd64_blend.S b/src/lib/amd64_blend.S
index 5721913..a5b6862 100644
--- a/src/lib/amd64_blend.S
+++ b/src/lib/amd64_blend.S
@@ -97,6 +97,7 @@ FN_(imlib_amd64_reshade_copy_rgb_to_rgba)
 
 
 #define ENTER		\
+	ENDBR_		; \
 	pushq %rbp	; \
 	movq %rsp, %rbp	; \
 	pushq %rbx	; \
diff --git a/src/lib/amd64_blend_cmod.S b/src/lib/amd64_blend_cmod.S
index e75b868..8395077 100644
--- a/src/lib/amd64_blend_cmod.S
+++ b/src/lib/amd64_blend_cmod.S
@@ -105,6 +105,7 @@ FN_(imlib_amd64_reshade_copy_rgb_to_rgba_cmod)
 
 
 #define ENTER		\
+	ENDBR_		; \
 	pushq %rbp	; \
 	movq %rsp, %rbp	; \
 	pushq %rbx	; \
diff --git a/src/lib/asm.h b/src/lib/asm.h
index 59cc7c4..773cd8d 100644
--- a/src/lib/asm.h
+++ b/src/lib/asm.h
@@ -17,4 +17,14 @@
 .size PR_(sym),.-PR_(sym); \
 .align 8;
 
+#ifdef __CET__
+#if defined(DO_MMX_ASM)
+#define ENDBR_ endbr32
+#elif defined(DO_AMD64_ASM)
+#define ENDBR_ endbr64
+#endif
+#else
+#define ENDBR_
+#endif
+
 #endif  /* __ASM_H */
diff --git a/src/lib/asm_blend.S b/src/lib/asm_blend.S
index e598fde..6890948 100644
--- a/src/lib/asm_blend.S
+++ b/src/lib/asm_blend.S
@@ -61,6 +61,7 @@ FN_(imlib_mmx_reshade_copy_rgb_to_rgba)
 /*\ Common code \*/
 /*\ Set MMX mode, save registers, load common parameters \*/
 #define ENTER\
+	ENDBR_;\
 	pushl %ebp			;\
 	movl  %esp, %ebp		;\
 	pushl %ebx			;\
diff --git a/src/lib/asm_blend_cmod.S b/src/lib/asm_blend_cmod.S
index 9fedb79..73fa9c4 100644
--- a/src/lib/asm_blend_cmod.S
+++ b/src/lib/asm_blend_cmod.S
@@ -79,6 +79,7 @@ FN_(imlib_mmx_reshade_copy_rgb_to_rgba_cmod)
 /*\ Common code \*/
 /*\ Set MMX mode, save registers, load common parameters \*/
 #define ENTER\
+	ENDBR_;\
 	pushl %ebp			;\
 	movl  %esp, %ebp		;\
 	pushl %ebx			;\
diff --git a/src/lib/asm_rgba.S b/src/lib/asm_rgba.S
index 552756d..fd2a44e 100644
--- a/src/lib/asm_rgba.S
+++ b/src/lib/asm_rgba.S
@@ -36,6 +36,7 @@ FN_(imlib_get_cpuid)
 /*\ Common code \*/
 /*\ Save registers, load common parameters \*/
 #define ENTER			\
+	ENDBR_;			\
 	pushl %ebp;		\
 	movl  %esp, %ebp;	\
 	pushl %ebx;		\


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [www-content] 01/01: Wiki page archlinux-start.md changed with summary ['Check' package already mentioned on step 2] by Dmitri Chudinov

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository www-content.


View the commit online.
commit b87bea3ed42d3da4641992c9743776154b857a90
Author: Dmitri Chudinov 
AuthorDate: Sat Apr 13 00:55:24 2024 -0700

Wiki page archlinux-start.md changed with summary ['Check' package already mentioned on step 2] by Dmitri Chudinov
---
 pages/docs/distros/archlinux-start.md.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/docs/distros/archlinux-start.md.txt b/pages/docs/distros/archlinux-start.md.txt
index 7c80a7164..335f5f421 100644
--- a/pages/docs/distros/archlinux-start.md.txt
+++ b/pages/docs/distros/archlinux-start.md.txt
@@ -188,7 +188,7 @@ pacman -S meson ninja pkgconf gcc binutils check python2
 You also must install the dependencies specific to EFL:
 
 ```bash
-pacman -S avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice check
+pacman -S avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice
 ```
 
 ### Step 3: Configuring the Software ###


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [www-content] 01/01: Wiki page archlinux-start.md changed with summary [] by Dmitri Chudinov

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository www-content.


View the commit online.
commit 25242bd30d15f639dc2e00f2f7fbf06af7b495c3
Author: Dmitri Chudinov 
AuthorDate: Sat Apr 13 00:53:15 2024 -0700

Wiki page archlinux-start.md changed with summary [] by Dmitri Chudinov
---
 pages/docs/distros/archlinux-start.md.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/docs/distros/archlinux-start.md.txt b/pages/docs/distros/archlinux-start.md.txt
index 335f5f421..7c80a7164 100644
--- a/pages/docs/distros/archlinux-start.md.txt
+++ b/pages/docs/distros/archlinux-start.md.txt
@@ -188,7 +188,7 @@ pacman -S meson ninja pkgconf gcc binutils check python2
 You also must install the dependencies specific to EFL:
 
 ```bash
-pacman -S avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice
+pacman -S avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice check
 ```
 
 ### Step 3: Configuring the Software ###


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [www-content] 01/01: Wiki page archlinux-start.md changed with summary [] by Dmitri Chudinov

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository www-content.


View the commit online.
commit f7e6f1320a0d0a1de83f8594cb8820f3d64fd4a0
Author: Dmitri Chudinov 
AuthorDate: Fri Apr 12 23:58:27 2024 -0700

Wiki page archlinux-start.md changed with summary [] by Dmitri Chudinov
---
 pages/docs/distros/archlinux-start.md.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/docs/distros/archlinux-start.md.txt b/pages/docs/distros/archlinux-start.md.txt
index 8c8995812..335f5f421 100644
--- a/pages/docs/distros/archlinux-start.md.txt
+++ b/pages/docs/distros/archlinux-start.md.txt
@@ -128,7 +128,7 @@ This will produce a folder named ``efl-X.XX.X``.
 Before you can compile and install EFL you need to install the required software packages and tools:
 
 ```bash 
-pacman -S meson ninja pkgconf gcc binutils python2 avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice
+pacman -S meson ninja pkgconf gcc binutils python2 avahi bullet curl fontconfig harfbuzz fribidi gst-plugins-base-libs luajit libexif libgl libinput libpulse libspectre libraw librsvg libwebp libxcomposite libxcursor libxinerama libxkbcommon libxp libxrandr libxss libunwind mesa openjpeg2 poppler shared-mime-info ttf-font scim libibus glib2 pulseaudio gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav libreoffice check
 ```
 
 ### Step 4: Building and Installing ###


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 04/05: use same filename number for .c and .hlsl

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 2ebac2c99f4fc84aac5e0e6de9c2c600b4c1374b
Author: Vincent Torri 
AuthorDate: Sat Apr 13 08:10:02 2024 +0200

use same filename number for .c and .hlsl
---
 src/d3d_3.c   |  4 ++--
 src/shader_3.hlsl | 10 +++---
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/d3d_3.c b/src/d3d_3.c
index d9d8bf4..65bba77 100644
--- a/src/d3d_3.c
+++ b/src/d3d_3.c
@@ -294,7 +294,7 @@ D3d *d3d_init(Window *win, int vsync)
 flags |= D3DCOMPILE_DEBUG;
 #endif
 vs_blob = NULL;
-res = D3DCompileFromFile(L"shader_2.hlsl",
+res = D3DCompileFromFile(L"shader_3.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_vs",
@@ -339,7 +339,7 @@ D3d *d3d_init(Window *win, int vsync)
 
 /* Pixel shader */
 ps_blob = NULL;
-res = D3DCompileFromFile(L"shader_2.hlsl",
+res = D3DCompileFromFile(L"shader_3.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_ps",
diff --git a/src/shader_3.hlsl b/src/shader_3.hlsl
index 336ffb5..f085621 100644
--- a/src/shader_3.hlsl
+++ b/src/shader_3.hlsl
@@ -7,13 +7,11 @@ cbuffer cv_viewport : register(b0)
 struct vs_input
 {
 uint2 position : POSITION;
-float4 color : COLOR;
 };
 
 struct ps_input
 {
 float4 position : SV_POSITION;
-float4 color : COLOR;
 };
 
 /*
@@ -21,7 +19,6 @@ struct ps_input
  *
  * @param input the 2 coordinates of a pixel, got from CPU
  * @return the 4D position of the normalized coordinates of the vertex in GPU
- * as well as the color
  */
 ps_input main_vs(vs_input input)
 {
@@ -32,17 +29,16 @@ ps_input main_vs(vs_input input)
 p -= 1.0f;
 p.y *= -1.0f;
 output.position = float4(p, 0.0f, 1.0f);
-output.color = input.color;
 return output;
 }
 
 /*
  * pixel shater program
  *
- * @param input the 4D coordinates of a pixel and the color
- * @return the color of the pixel in RGBA colorspace passed as input
+ * @param input the 4D coordinates of a pixel
+ * @return the color of the pixel in RGBA colorspace, here pink
  */
 float4 main_ps(ps_input input) : SV_TARGET
 {
-return input.color;
+return float4(1.0f, 0.0f, 1.0f, 1.0f);
 }


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 02/05: use same filename number for .c and .hlsl

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 8ead3e3d57737cd57e117b5ff63705c145e5f98e
Author: Vincent Torri 
AuthorDate: Sat Apr 13 08:04:29 2024 +0200

use same filename number for .c and .hlsl
---
 src/d3d_5.c   |  4 ++--
 src/shader_5.hlsl | 30 ++
 2 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/d3d_5.c b/src/d3d_5.c
index 71651e6..94338af 100644
--- a/src/d3d_5.c
+++ b/src/d3d_5.c
@@ -297,7 +297,7 @@ D3d *d3d_init(Window *win, int vsync)
 flags |= D3DCOMPILE_DEBUG;
 #endif
 vs_blob = NULL;
-res = D3DCompileFromFile(L"shader_3.hlsl",
+res = D3DCompileFromFile(L"shader_5.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_vs",
@@ -342,7 +342,7 @@ D3d *d3d_init(Window *win, int vsync)
 
 /* Pixel shader */
 ps_blob = NULL;
-res = D3DCompileFromFile(L"shader_3.hlsl",
+res = D3DCompileFromFile(L"shader_5.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_ps",
diff --git a/src/shader_5.hlsl b/src/shader_5.hlsl
index 66b17d5..336ffb5 100644
--- a/src/shader_5.hlsl
+++ b/src/shader_5.hlsl
@@ -1,7 +1,7 @@
 cbuffer cv_viewport : register(b0)
 {
-row_major int2x3 rotation_matrix;
-float2 ivps;
+float2 viewport_inv_size;
+float2 dummy; /* unused, to have a multiple of 16 bytes */
 }
 
 struct vs_input
@@ -16,18 +16,32 @@ struct ps_input
 float4 color : COLOR;
 };
 
-ps_input main_vs(vs_input input )
+/*
+ * vertex shater program
+ *
+ * @param input the 2 coordinates of a pixel, got from CPU
+ * @return the 4D position of the normalized coordinates of the vertex in GPU
+ * as well as the color
+ */
+ps_input main_vs(vs_input input)
 {
 ps_input output;
-float2 o = float2(mul(rotation_matrix, int3(input.position, 1))) * ivps;
-o *= 2.0f;
-o -= 1.0f;
-o.y *= -1.0f;
-output.position = float4(o, 0.0f, 1.0f);
+float2 p = input.position;
+p *= viewport_inv_size;
+p *= 2.0f;
+p -= 1.0f;
+p.y *= -1.0f;
+output.position = float4(p, 0.0f, 1.0f);
 output.color = input.color;
 return output;
 }
 
+/*
+ * pixel shater program
+ *
+ * @param input the 4D coordinates of a pixel and the color
+ * @return the color of the pixel in RGBA colorspace passed as input
+ */
 float4 main_ps(ps_input input) : SV_TARGET
 {
 return input.color;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 03/05: use same filename number for .c and .hlsl

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 95e9d85e41e84f24bfbabde3fcde9095b1ba153d
Author: Vincent Torri 
AuthorDate: Sat Apr 13 08:08:28 2024 +0200

use same filename number for .c and .hlsl
---
 src/d3d_4.c   |  4 ++--
 src/shader_4.hlsl | 48 
 2 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/src/d3d_4.c b/src/d3d_4.c
index b4dd011..3e7a6fd 100644
--- a/src/d3d_4.c
+++ b/src/d3d_4.c
@@ -297,7 +297,7 @@ D3d *d3d_init(Window *win, int vsync)
 flags |= D3DCOMPILE_DEBUG;
 #endif
 vs_blob = NULL;
-res = D3DCompileFromFile(L"shader_3.hlsl",
+res = D3DCompileFromFile(L"shader_4.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_vs",
@@ -342,7 +342,7 @@ D3d *d3d_init(Window *win, int vsync)
 
 /* Pixel shader */
 ps_blob = NULL;
-res = D3DCompileFromFile(L"shader_3.hlsl",
+res = D3DCompileFromFile(L"shader_4.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_ps",
diff --git a/src/shader_4.hlsl b/src/shader_4.hlsl
new file mode 100644
index 000..336ffb5
--- /dev/null
+++ b/src/shader_4.hlsl
@@ -0,0 +1,48 @@
+cbuffer cv_viewport : register(b0)
+{
+float2 viewport_inv_size;
+float2 dummy; /* unused, to have a multiple of 16 bytes */
+}
+
+struct vs_input
+{
+uint2 position : POSITION;
+float4 color : COLOR;
+};
+
+struct ps_input
+{
+float4 position : SV_POSITION;
+float4 color : COLOR;
+};
+
+/*
+ * vertex shater program
+ *
+ * @param input the 2 coordinates of a pixel, got from CPU
+ * @return the 4D position of the normalized coordinates of the vertex in GPU
+ * as well as the color
+ */
+ps_input main_vs(vs_input input)
+{
+ps_input output;
+float2 p = input.position;
+p *= viewport_inv_size;
+p *= 2.0f;
+p -= 1.0f;
+p.y *= -1.0f;
+output.position = float4(p, 0.0f, 1.0f);
+output.color = input.color;
+return output;
+}
+
+/*
+ * pixel shater program
+ *
+ * @param input the 4D coordinates of a pixel and the color
+ * @return the color of the pixel in RGBA colorspace passed as input
+ */
+float4 main_ps(ps_input input) : SV_TARGET
+{
+return input.color;
+}


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 05/05: use same filename number for .c and .hlsl

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 3d111809dba4ec9ea0a9232c2e6914fa289610fc
Author: Vincent Torri 
AuthorDate: Sat Apr 13 08:11:47 2024 +0200

use same filename number for .c and .hlsl
---
 src/d3d_2.c   |  4 ++--
 src/shader_1.hlsl | 33 -
 src/shader_2.hlsl | 19 ---
 3 files changed, 6 insertions(+), 50 deletions(-)

diff --git a/src/d3d_2.c b/src/d3d_2.c
index 8e85352..48d8aee 100644
--- a/src/d3d_2.c
+++ b/src/d3d_2.c
@@ -289,7 +289,7 @@ D3d *d3d_init(Window *win, int vsync)
 flags |= D3DCOMPILE_DEBUG;
 #endif
 vs_blob = NULL;
-res = D3DCompileFromFile(L"shader_1.hlsl",
+res = D3DCompileFromFile(L"shader_2.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_vs",
@@ -334,7 +334,7 @@ D3d *d3d_init(Window *win, int vsync)
 
 /* Pixel shader */
 ps_blob = NULL;
-res = D3DCompileFromFile(L"shader_1.hlsl",
+res = D3DCompileFromFile(L"shader_2.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_ps",
diff --git a/src/shader_1.hlsl b/src/shader_1.hlsl
deleted file mode 100644
index acaed0f..000
--- a/src/shader_1.hlsl
+++ /dev/null
@@ -1,33 +0,0 @@
-struct vs_input
-{
-float2 position : POSITION;
-};
-
-struct ps_input
-{
-float4 position : SV_POSITION;
-};
-
-/*
- * vertex shater program
- *
- * @param input the 2 coordinates of a vertex, got from CPU
- * @return the 4D position of the pixel corresponding to the vertex in GPU
- */
-ps_input main_vs(vs_input input)
-{
-ps_input output;
-output.position = float4(input.position, 0.0f, 1.0f);
-return output;
-}
-
-/*
- * pixel shater program
- *
- * @param input the 4D coordinates of a pixel
- * @return the color of the pixel in RGBA colorspace, here pink
- */
-float4 main_ps(ps_input input) : SV_TARGET
-{
-return float4(1.0f, 0.0f, 1.0f, 1.0f);
-}
diff --git a/src/shader_2.hlsl b/src/shader_2.hlsl
index f085621..acaed0f 100644
--- a/src/shader_2.hlsl
+++ b/src/shader_2.hlsl
@@ -1,12 +1,6 @@
-cbuffer cv_viewport : register(b0)
-{
-float2 viewport_inv_size;
-float2 dummy; /* unused, to have a multiple of 16 bytes */
-}
-
 struct vs_input
 {
-uint2 position : POSITION;
+float2 position : POSITION;
 };
 
 struct ps_input
@@ -17,18 +11,13 @@ struct ps_input
 /*
  * vertex shater program
  *
- * @param input the 2 coordinates of a pixel, got from CPU
- * @return the 4D position of the normalized coordinates of the vertex in GPU
+ * @param input the 2 coordinates of a vertex, got from CPU
+ * @return the 4D position of the pixel corresponding to the vertex in GPU
  */
 ps_input main_vs(vs_input input)
 {
 ps_input output;
-float2 p = input.position;
-p *= viewport_inv_size;
-p *= 2.0f;
-p -= 1.0f;
-p.y *= -1.0f;
-output.position = float4(p, 0.0f, 1.0f);
+output.position = float4(input.position, 0.0f, 1.0f);
 return output;
 }
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [direct3d] 01/05: use same filename number for .c and .hlsl, change color of the rectangle, add some comments

2024-04-13 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository direct3d.


View the commit online.
commit 91a0373d8623902efcb873cb2dcf7fbdec32f870
Author: Vincent Torri 
AuthorDate: Sat Apr 13 08:00:08 2024 +0200

use same filename number for .c and .hlsl, change color of the rectangle, add some comments
---
 src/d3d_6.c   | 32 
 src/shader_6.hlsl | 34 ++
 2 files changed, 62 insertions(+), 4 deletions(-)

diff --git a/src/d3d_6.c b/src/d3d_6.c
index 4a35576..01844e6 100644
--- a/src/d3d_6.c
+++ b/src/d3d_6.c
@@ -166,7 +166,7 @@ D3d *d3d_init(Window *win, int vsync)
 D3D11_INPUT_ELEMENT_DESC desc_ie[] =
 {
 { "POSITION", 0, DXGI_FORMAT_R32G32_UINT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
-{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 2 * sizeof(UINT), D3D11_INPUT_PER_VERTEX_DATA, 0 }
+{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }
 };
 DXGI_SWAP_CHAIN_DESC1 desc_sw;
 DXGI_SWAP_CHAIN_FULLSCREEN_DESC desc_fs;
@@ -298,7 +298,7 @@ D3d *d3d_init(Window *win, int vsync)
 flags |= D3DCOMPILE_DEBUG;
 #endif
 vs_blob = NULL;
-res = D3DCompileFromFile(L"shader_5.hlsl",
+res = D3DCompileFromFile(L"shader_6.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_vs",
@@ -343,7 +343,7 @@ D3d *d3d_init(Window *win, int vsync)
 
 /* Pixel shader */
 ps_blob = NULL;
-res = D3DCompileFromFile(L"shader_5.hlsl",
+res = D3DCompileFromFile(L"shader_6.hlsl",
  NULL,
  D3D_COMPILE_STANDARD_FILE_INCLUDE,
  "main_ps",
@@ -470,6 +470,12 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 
 switch (rot)
 {
+/*
+ * no rotation
+ *
+ * 1 0 0
+ * 0 1 0
+ */
 case 0:
 ((Const_Buffer *)mapped.pData)->rotation[0][0] = 1;
 ((Const_Buffer *)mapped.pData)->rotation[0][1] = 0;
@@ -478,6 +484,12 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 ((Const_Buffer *)mapped.pData)->rotation[1][1] = 1;
 ((Const_Buffer *)mapped.pData)->rotation[1][2] = 0;
 break;
+/*
+ * rotation 90° clock-wise
+ *
+ * 0 -1 w-1
+ * 1  0 0
+ */
 case 1:
 ((Const_Buffer *)mapped.pData)->rotation[0][0] = 0;
 ((Const_Buffer *)mapped.pData)->rotation[0][1] = -1;
@@ -486,6 +498,12 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 ((Const_Buffer *)mapped.pData)->rotation[1][1] = 0;
 ((Const_Buffer *)mapped.pData)->rotation[1][2] = 0;
 break;
+/*
+ * rotation 180° clock-wise
+ *
+ * -1  0 w-1
+ *  0 -1 h-1
+ */
 case 2:
 ((Const_Buffer *)mapped.pData)->rotation[0][0] = -1;
 ((Const_Buffer *)mapped.pData)->rotation[0][1] = 0;
@@ -494,6 +512,12 @@ void d3d_resize(D3d *d3d, int rot, UINT width, UINT height)
 ((Const_Buffer *)mapped.pData)->rotation[1][1] = -1;
 ((Const_Buffer *)mapped.pData)->rotation[1][2] = height - 1;
 break;
+/*
+ * rotation 270° clock-wise
+ *
+ *  0 1 0
+ * -1 0 h-1
+ */
 case 3:
 ((Const_Buffer *)mapped.pData)->rotation[0][0] = 0;
 ((Const_Buffer *)mapped.pData)->rotation[0][1] = 1;
@@ -705,7 +729,7 @@ void d3d_scene_begin(D3d *d3d)
 o = rectangle_new(d3d,
   220, 20,
   203, 101,
-  0, 0, 255, 255); /* r, g, b, a */
+  255, 255, 255, 255); /* r, g, b, a */
 objects[0] = o;
 
 o = rectangle_new(d3d,
diff --git a/src/shader_6.hlsl b/src/shader_6.hlsl
new file mode 100644
index 000..66b17d5
--- /dev/null
+++ b/src/shader_6.hlsl
@@ -0,0 +1,34 @@
+cbuffer cv_viewport : register(b0)
+{
+row_major int2x3 rotation_matrix;
+float2 ivps;
+}
+
+struct vs_input
+{
+uint2 position : POSITION;
+float4 color : COLOR;
+};
+
+struct ps_input
+{
+float4 position : SV_POSITION;
+float4 color : COLOR;
+};
+
+ps_input main_vs(vs_input input )
+{
+ps_input output;
+float2 o = float2(mul(rotation_matrix, int3(input.position, 1))) * ivps;
+o *= 2.0f;
+o -= 1.0f;
+o.y *= -1.0f;
+output.position = float4(o, 0.0f, 1.0f);
+output.color = input.color;
+return output;
+}
+
+float4 main_ps(ps_input input) : SV_TARGET
+{
+return input.color;
+}


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 02/02: test_load_2: Add some more y4m test images

2024-04-12 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit af97c7c08e674e7ceabb0b81514919a995770365
Author: Kim Woelders 
AuthorDate: Fri Apr 12 16:44:10 2024 +0200

test_load_2: Add some more y4m test images

The ones from previous commit.
---
 test/test_load_2.cpp | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/test_load_2.cpp b/test/test_load_2.cpp
index 7a65e9d..333a480 100644
--- a/test/test_load_2.cpp
+++ b/test/test_load_2.cpp
@@ -106,7 +106,10 @@ static tii_ttii[] = {
{ "icon-64.yuv420paldv.y4m", 3810593176 },
{ "icon-64.aspect_unsupported.y4m",  2400380696 },
{ "icon-64.framerate_1_1.y4m",   2400380696 },
-   { "img-17x14.full_range.y4m", 839224907 },
+   { "img-17x14.full_range.y4m",839224907 },
+   { "img-17x14.yuv420p10.full_range.y4m",  839224907 },
+   { "img-8x8.full_range.y4m", 1737487406 },
+   { "img-8x8.yuv420p10.full_range.y4m",   1737487406 },
 #endif
 
{ "icon-128.ico", 218415319 },


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/02: Y4M loader: add support for 10-bit 4:2:0

2024-04-12 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit e4644560f9c9d8d12e32d5ca647acfa540e5089b
Author: Chema Gonzalez 
AuthorDate: Thu Apr 11 17:52:14 2024 -0700

Y4M loader: add support for 10-bit 4:2:0

Current implementation just discards the last 2 bits.

Images generated using ffmpeg:
```
$ ffmpeg -i test/images/img-17x14.full_range.y4m -strict -1 -pix_fmt yuv420p10 -color_range full test/images/img-17x14.yuv420p10.full_range.y4m
$ ffmpeg -i test/images/img-8x8.full_range.y4m -strict -1 -pix_fmt yuv420p10 -color_range full test/images/img-8x8.yuv420p10.full_range.y4m
```

Tested:
```
$ src/bin/.libs/imlib2_view test/images/img-8x8.yuv420p10.full_range.y4m
$ feh test/images/img-8x8.yuv420p10.full_range.y4m
```
---
 src/modules/loaders/loader_y4m.c   |  85 +++--
 test/images/img-17x14.yuv420p10.full_range.y4m | Bin 0 -> 811 bytes
 test/images/img-8x8.full_range.y4m | Bin 0 -> 251 bytes
 test/images/img-8x8.yuv420p10.full_range.y4m   | Bin 0 -> 273 bytes
 4 files changed, 81 insertions(+), 4 deletions(-)

diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index 89040cd..9b7873a 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -46,6 +46,7 @@ typedef struct {
 Y4M_PARSE_CS_422,
 Y4M_PARSE_CS_444,
 Y4M_PARSE_CS_MONO,
+Y4M_PARSE_CS_420P10,
 } colour_space;
 enum {
 Y4M_PARSE_IL_PROGRESSIVE,
@@ -67,6 +68,7 @@ typedef struct {
 Y4M_PARSE_RANGE_LIMITED,
 Y4M_PARSE_RANGE_FULL,
 } range;
+uint8_t depth;  // Bit depth  (8, 10, 12, 14, 16)
 
 const void *frame_data;
 ptrdiff_t   frame_data_len;
@@ -121,6 +123,10 @@ y4m__parse_params(Y4mParse *res, const uint8_t **start, const uint8_t *end)
 const uint8_t  *p = *start;
 const uint8_t  *peek;
 
+// default values
+res->range = Y4M_PARSE_RANGE_UNSPECIFIED;
+res->depth = 8;
+
 for (;;)
 {
 #if IMLIB2_DEBUG
@@ -183,19 +189,45 @@ y4m__parse_params(Y4mParse *res, const uint8_t **start, const uint8_t *end)
 case 'C':
 res->colour_space = Y4M_PARSE_CS_UNSUPPORTED;
 if (y4m__match("mono", 4, , end))
+{
 res->colour_space = Y4M_PARSE_CS_MONO;
+res->depth = 8;
+}
 else if (y4m__match("420jpeg", 7, , end))
+{
 res->colour_space = Y4M_PARSE_CS_420JPEG;
+res->depth = 8;
+}
 else if (y4m__match("420mpeg2", 8, , end))
+{
 res->colour_space = Y4M_PARSE_CS_420MPEG2;
+res->depth = 8;
+}
 else if (y4m__match("420paldv", 8, , end))
+{
 res->colour_space = Y4M_PARSE_CS_420PALDV;
+res->depth = 8;
+}
+else if (y4m__match("420p10", 6, , end))
+{
+res->colour_space = Y4M_PARSE_CS_420P10;
+res->depth = 10;
+}
 else if (y4m__match("420", 3, , end))
+{
 res->colour_space = Y4M_PARSE_CS_420;
+res->depth = 8;
+}
 else if (y4m__match("422", 3, , end))
+{
 res->colour_space = Y4M_PARSE_CS_422;
+res->depth = 8;
+}
 else if (y4m__match("444", 3, , end))
+{
 res->colour_space = Y4M_PARSE_CS_444;
+res->depth = 8;
+}
 
 peek = p;   /* peek to avoid falsly matching things like "420p16" */
 if (res->colour_space == Y4M_PARSE_CS_UNSUPPORTED ||
@@ -306,6 +338,7 @@ y4m_parse_frame(Y4mParse *res)
 case Y4M_PARSE_CS_420MPEG2:
 case Y4M_PARSE_CS_420PALDV:
 case Y4M_PARSE_CS_420:
+case Y4M_PARSE_CS_420P10:
 res->frame_data_len = npixels * 3 / 2;
 sdiv = 2;
 voff = (npixels * 5) / 4;
@@ -342,8 +375,16 @@ y4m_parse_frame(Y4mParse *res)
 }
 else
 {
-res->u = p + npixels;
-res->v = p + voff;
+if (res->depth == 10)
+{
+res->u = p + npixels * 2;
+res->v = p + voff * 2;
+}
+else
+{
+res->u = p + npixels;
+res->v = p + voff;
+}
 res->u_stride = res->v_stride = res->w / sdiv;
 }
 
@@ -439,6 +480,7 @@ _load(ImlibImage *im, int load_data)
 case Y4M_PARSE_CS_420MPEG2:
 case Y4M_PARSE_CS_420PALDV:
 case Y4M_PARSE_CS_420:
+case Y4M_PARSE_CS_420P10:
 if (y4m.range == Y4M_PARSE_RANGE_FULL)
 conv = J420ToARGB;
 else
@@ -463,8 +505,43 @@ _load(ImlibImage *im, int load_data)
 if (!__imlib_AllocateData(im))
 

[EGIT] [legacy-imlib2] 02/02: test_load_2: Add full range color y4m image

2024-04-11 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit a2e6beb37c92697a2dd06ad4e4e93bdc3e6b196b
Author: Kim Woelders 
AuthorDate: Thu Apr 11 20:35:33 2024 +0200

test_load_2: Add full range color y4m image

Renamed the image as it isn't the usual 64x64 one.
---
 .../{icon-64.full_range.y4m => img-17x14.full_range.y4m}| Bin
 test/test_load_2.cpp|   1 +
 2 files changed, 1 insertion(+)

diff --git a/test/images/icon-64.full_range.y4m b/test/images/img-17x14.full_range.y4m
similarity index 100%
rename from test/images/icon-64.full_range.y4m
rename to test/images/img-17x14.full_range.y4m
diff --git a/test/test_load_2.cpp b/test/test_load_2.cpp
index 5a73a76..7a65e9d 100644
--- a/test/test_load_2.cpp
+++ b/test/test_load_2.cpp
@@ -106,6 +106,7 @@ static tii_ttii[] = {
{ "icon-64.yuv420paldv.y4m", 3810593176 },
{ "icon-64.aspect_unsupported.y4m",  2400380696 },
{ "icon-64.framerate_1_1.y4m",   2400380696 },
+   { "img-17x14.full_range.y4m", 839224907 },
 #endif
 
{ "icon-128.ico", 218415319 },


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [legacy-imlib2] 01/02: Y4M loader: add support for full range color

2024-04-11 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.


View the commit online.
commit 98339a570865857ef31c7ec2c193491768e6bfb4
Author: Chema Gonzalez 
AuthorDate: Thu Apr 11 09:32:51 2024 -0700

Y4M loader: add support for full range color
---
 src/modules/loaders/loader_y4m.c   |  43 +++--
 test/images/icon-64.full_range.y4m | Bin 0 -> 775 bytes
 2 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index 3ec517c..89040cd 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -62,6 +62,11 @@ typedef struct {
 Y4M_PARSE_ASPECT_32_27,
 Y4M_PARSE_ASPECT_OTHER,
 } aspect;
+enum {
+Y4M_PARSE_RANGE_UNSPECIFIED,
+Y4M_PARSE_RANGE_LIMITED,
+Y4M_PARSE_RANGE_FULL,
+} range;
 
 const void *frame_data;
 ptrdiff_t   frame_data_len;
@@ -224,9 +229,26 @@ y4m__parse_params(Y4mParse *res, const uint8_t **start, const uint8_t *end)
 ;
 }
 break;
-case 'X':  /* comments ignored */
-for (; p < end && *p != ' ' && *p != '\n'; ++p)
-;
+case 'X':
+if (y4m__match("COLORRANGE=LIMITED", 18, , end))
+res->range = Y4M_PARSE_RANGE_LIMITED;
+else if (y4m__match("COLORRANGE=FULL", 15, , end))
+res->range = Y4M_PARSE_RANGE_FULL;
+else if (y4m__match("COLORRANGE=", 11, , end))
+{
+#if IMLIB2_DEBUG
+charstr[1024];
+sscanf(pp, "%s", str);
+D("%s: unknown color range: '%s'\n", __func__, str);
+#endif
+return Y4M_PARSE_UNSUPPORTED;
+}
+else
+{
+/* other comments ignored */
+for (; p < end && *p != ' ' && *p != '\n'; ++p)
+;
+}
 break;
 default:
 return Y4M_PARSE_CORRUPTED;
@@ -402,16 +424,25 @@ _load(ImlibImage *im, int load_data)
 conv = conv_mono;
 break;
 case Y4M_PARSE_CS_422:
-conv = I422ToARGB;
+if (y4m.range == Y4M_PARSE_RANGE_FULL)
+conv = J422ToARGB;
+else
+conv = I422ToARGB;
 break;
 case Y4M_PARSE_CS_444:
-conv = I444ToARGB;
+if (y4m.range == Y4M_PARSE_RANGE_FULL)
+conv = J444ToARGB;
+else
+conv = I444ToARGB;
 break;
 case Y4M_PARSE_CS_420JPEG:
 case Y4M_PARSE_CS_420MPEG2:
 case Y4M_PARSE_CS_420PALDV:
 case Y4M_PARSE_CS_420:
-conv = I420ToARGB;
+if (y4m.range == Y4M_PARSE_RANGE_FULL)
+conv = J420ToARGB;
+else
+conv = I420ToARGB;
 break;
 default:
 DL("colour_space: %d\n", y4m.colour_space);
diff --git a/test/images/icon-64.full_range.y4m b/test/images/icon-64.full_range.y4m
new file mode 100644
index 000..5f548bf
Binary files /dev/null and b/test/images/icon-64.full_range.y4m differ


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efm2] 01/01: more work on mv - file count scan, status infra etc

2024-04-11 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.


View the commit online.
commit de7f9a21a3bb96f61ec0787f919d3b24a59e668f
Author: Carsten Haitzler (Rasterman) 
AuthorDate: Thu Apr 11 10:01:45 2024 +0100

more work on mv - file count scan, status infra etc

also clean up some #includes we dont need... get this into git so it
isnt lost
---
 src/backends/default/meta.c   |   1 -
 src/backends/default/mv.c | 183 ++---
 src/backends/default/open.c   |   1 -
 src/backends/default/status.c | 266 ++
 src/backends/default/status.h |  32 +
 src/efm/efm_graph.c   |   1 -
 6 files changed, 440 insertions(+), 44 deletions(-)

diff --git a/src/backends/default/meta.c b/src/backends/default/meta.c
index 6ac8ce8..46fddb9 100644
--- a/src/backends/default/meta.c
+++ b/src/backends/default/meta.c
@@ -4,7 +4,6 @@
 #include 
 #include 
 #include 
-#include "eina_types.h"
 #include "sha.h"
 #include "meta.h"
 
diff --git a/src/backends/default/mv.c b/src/backends/default/mv.c
index abc9873..bda92dd 100644
--- a/src/backends/default/mv.c
+++ b/src/backends/default/mv.c
@@ -5,35 +5,163 @@
 #include 
 #include 
 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
-#include "cmd.h"
 #include "eina_strbuf.h"
+#include "eina_thread.h"
 #include "eina_types.h"
-#include "sha.h"
 #include "meta.h"
 #include "status.h"
 
 static const char *config_dir = NULL;
 
+// this scans a tree to build a potential operation progress count. it may
+// not be 100% right as the fs can change while the scan happens and after
+// so any move that devolves into a cp + rm isn't going to be atomic and
+// handle a changing fs while it works anyway
+static Eina_Bool
+fs_scan(const char *src)
+{
+  Eina_Iterator *it;
+  const char *s;
+
+  if (strlen(src) < 1) return EINA_FALSE;
+  struct stat st;
+
+  if (lstat(src, ) != 0)
+{
+  switch (errno)
+{
+case EACCES:
+  status_error(src, NULL, "Move - Permission denied for source");
+  return EINA_FALSE;
+  break;
+case EFAULT:
+  status_error(src, NULL, "Move - Memory Fault");
+  return EINA_FALSE;
+  break;
+case ELOOP:
+  status_error(src, NULL, "Move - Too many symlinks");
+  return EINA_FALSE;
+  break;
+case ENAMETOOLONG:
+  status_error(src, NULL, "Move - Name too long");
+  return EINA_FALSE;
+  break;
+case ENOENT: // ignore this error - file removed during scan ?
+  return EINA_TRUE;
+  break;
+case ENOMEM:
+  status_error(src, NULL, "Move - Out of memory");
+  return EINA_FALSE;
+  break;
+case ENOTDIR:
+  status_error(src, NULL, "Move - Source path component is not a directory");
+  return EINA_FALSE;
+  break;
+case EOVERFLOW:
+  status_error(src, NULL, "Move - Overflow");
+  return EINA_FALSE;
+  break;
+default:
+  break;
+}
+}
+  if (S_ISDIR(st.st_mode))
+{ // it's a dir - scan this recursively
+  it = eina_file_ls(src);
+  if (it)
+{
+  Eina_Strbuf *buf;
+
+  buf = eina_strbuf_new();
+  EINA_ITERATOR_FOREACH(it, s)
+  {
+// build new path "src/s"
+eina_strbuf_reset(buf);
+eina_strbuf_append(buf, src);
+// add / if src doesn't end in /
+if (src[strlen(src) - 1] != '/') eina_strbuf_append(buf, "/");
+eina_strbuf_append(buf, s);
+eina_stringshare_del(s);
+// fs_scan this file (or dir)
+// yes - this returns. we make leak our eina_file_ls data, strbuf etc.
+// dont care - we're going to exit the whole process in a bit
+if (!fs_scan(eina_strbuf_string_get(buf))) return EINA_FALSE;
+  }
+  eina_strbuf_free(buf);
+}
+}
+  else
+{
+  // the file itself count as 1 progress item - useful if it's a symlink
+  // or a char or block device etc.
+  status_count(1, ecore_file_file_get(src));
+  // in addition each byte in the file count as a progress item too
+  if (st.st_size > 0)
+status_count(st.st_size, ecore_file_file_get(src));
+}
+  return EINA_TRUE;  
+}
+
+static Eina_Bool
+fs_cp_rm(const char *src, const char *dst, Eina_Bool report_err)
+{
+  Eina_Bool res = EINA_TRUE;
+
+  if (!fs_scan(src)) return EINA_FALSE;
+
+  // if src is dir
+  //   fs_mkdir(dst)
+  //   for all files in src
+  // fs_cp_rm(src/file, dst/file, report_err)
+  // fs_utimes(src, dst)
+  // fs_chmod(src, dst)
+  // fs_chown(src, dst)
+  //   fs_utimes(src, dst)
+  //   fs_chmod(src, dst)
+  //   fs_chown(src, dst)
+  //   fs_rmdir(src)
+  // else
+  //   if (src is file)
+  // 

[EGIT] [terminology] 01/01: Unify format of responses to OSC 10 and OSC 11 / 12 queries

2024-04-09 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/15/head
in repository terminology.


View the commit online.
commit 881999fe2cf5e2eda6f77d09334065da91a193ef
Author: Tau 
AuthorDate: Tue Apr 9 20:45:05 2024 +0200

Unify format of responses to OSC 10 and OSC 11 / 12 queries
---
 src/bin/termptyesc.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index def66b6d..4874ab8b 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -4221,6 +4221,14 @@ _handle_xterm_777_command(Termpty *ty,
*title_end = ';';
 }
 
+static void
+_write_xterm_color_response(Termpty *ty, uint8_t number, int r, int g, int b)
+{
+   char buf[64];
+   int l = snprintf(buf, sizeof(buf), "\033]%d;rgb:%.2x%.2x/%.2x%.2x/%.2x%.2x\033\\", number, r, r, g, g, b, b);
+   termpty_write(ty, buf, l);
+}
+
 static void
 _handle_xterm_10_command(Termpty *ty, Eina_Unicode *p, int len)
 {
@@ -4229,8 +4237,6 @@ _handle_xterm_10_command(Termpty *ty, Eina_Unicode *p, int len)
if (*p == '?')
  {
 int r, g, b;
-char bf[32];
-int l;
 #if !defined(BINARY_TYFUZZ) && !defined(BINARY_TYTEST)
 evas_object_textgrid_palette_get(
termio_textgrid_get(ty->obj),
@@ -4242,8 +4248,7 @@ _handle_xterm_10_command(Termpty *ty, Eina_Unicode *p, int len)
 g = config->colors[0].g;
 b = config->colors[0].b;
 #endif
-l = snprintf(bf, sizeof(bf), "\033]10;#%.2X%.2X%.2X\007", r, g, b);
-termpty_write(ty, bf, l);
+_write_xterm_color_response(ty, 10, r, g, b);
  }
else
  {
@@ -4278,8 +4283,6 @@ _handle_xterm_set_color_class(Termpty *ty, Eina_Unicode *p, int len,
if (*p == '?')
  {
 int r = 0, g = 0, b = 0;
-char buf[64];
-int l;
 
 if (edje_object_color_class_get(obj, color_class, , , , NULL,
 NULL, NULL, NULL, NULL,
@@ -4287,10 +4290,7 @@ _handle_xterm_set_color_class(Termpty *ty, Eina_Unicode *p, int len,
   {
  ERR("error getting color class '%s' on obj %p", color_class, obj);
   }
-l = snprintf(buf, sizeof(buf),
- "\033]%d;rgb:%.2x%.2x/%.2x%.2x/%.2x%.2x\033\\",
- number, r, r, g, g, b, b);
-termpty_write(ty, buf, l);
+_write_xterm_color_response(ty, number, r, g, b);
  }
else
  {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [efl] 01/01: eo: make eo ptr indirection caches flexible

2024-04-09 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.


View the commit online.
commit cdd3c35bb30ffbeb7fb6543ad6e7b45d6a5cccd5
Author: Carsten Haitzler 
AuthorDate: Tue Apr 9 10:30:47 2024 +0100

eo: make eo ptr indirection caches flexible
---
 src/lib/eo/eo_ptr_indirection.c |  29 +-
 src/lib/eo/eo_ptr_indirection.x | 116 +++-
 2 files changed, 119 insertions(+), 26 deletions(-)

diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index cd578a5a2a..e3d6f62b6f 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -94,19 +94,20 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
EINA_PREFETCH(&(data->tables[0]));
domain = (obj_id >> SHIFT_DOMAIN) & MASK_DOMAIN;
tdata = _eo_table_data_table_get(data, domain);
-   EINA_PREFETCH(&(tdata->cache.id));
if (EINA_UNLIKELY(!tdata)) goto err;
-
+   _eo_cache_prefetch(tdata);
 
if (EINA_LIKELY(domain != EFL_ID_DOMAIN_SHARED))
  {
-if (obj_id == tdata->cache.id)
-  return tdata->cache.object;
+_Eo_Object *obj;
+
+obj = _eo_cache_find(tdata, obj_id);
+if (obj) return obj;
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID;
-EINA_PREFETCH_NOCACHE(&(tdata->eo_ids_tables[mid_table_id])); //prefetch for line 119
+EINA_PREFETCH(&(tdata->eo_ids_tables[mid_table_id])); //prefetch for line 119
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID;
-EINA_PREFETCH_NOCACHE((tdata->eo_ids_tables[mid_table_id] + table_id)); //prefetch for line 121
+EINA_PREFETCH((tdata->eo_ids_tables[mid_table_id] + table_id)); //prefetch for line 121
 entry_id = (obj_id >> SHIFT_ENTRY_ID) & MASK_ENTRY_ID;
 generation = obj_id & MASK_GENERATIONS;
 
@@ -126,8 +127,7 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
   if (entry->active && (entry->generation == generation))
 {
// Cache the result of that lookup
-   tdata->cache.object = entry->ptr;
-   tdata->cache.id = obj_id;
+   _eo_cache_store(tdata, obj_id, entry->ptr);
return entry->ptr;
 }
}
@@ -136,17 +136,19 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
  }
else
  {
+_Eo_Object *obj;
+
 eina_lock_take(&(_eo_table_data_shared_data->obj_lock));
-if (obj_id == tdata->cache.id)
 // yes we return keeping the lock locked. that's why
 // you must call _eo_obj_pointer_done() wrapped
 // by EO_OBJ_DONE() to release
-  return tdata->cache.object;
+obj = _eo_cache_find(tdata, obj_id);
+if (obj) return obj;
 
 mid_table_id = (obj_id >> SHIFT_MID_TABLE_ID) & MASK_MID_TABLE_ID;
-EINA_PREFETCH_NOCACHE(&(tdata->eo_ids_tables[mid_table_id]));
+EINA_PREFETCH(&(tdata->eo_ids_tables[mid_table_id]));
 table_id = (obj_id >> SHIFT_TABLE_ID) & MASK_TABLE_ID;
-EINA_PREFETCH_NOCACHE((tdata->eo_ids_tables[mid_table_id] + table_id));
+EINA_PREFETCH((tdata->eo_ids_tables[mid_table_id] + table_id));
 entry_id = (obj_id >> SHIFT_ENTRY_ID) & MASK_ENTRY_ID;
 generation = obj_id & MASK_GENERATIONS;
 
@@ -167,8 +169,7 @@ _eo_obj_pointer_get(const Eo_Id obj_id, const char *func_name, const char *file,
   if (entry->active && (entry->generation == generation))
 {
// Cache the result of that lookup
-   tdata->cache.object = entry->ptr;
-   tdata->cache.id = obj_id;
+   _eo_cache_store(tdata, obj_id, entry->ptr);
// yes we return keeping the lock locked. that's why
// you must call _eo_obj_pointer_done() wrapped
// by EO_OBJ_DONE() to release
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 64bad07a06..33043b36e6 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -305,13 +305,19 @@ typedef struct
 typedef struct _Eo_Id_Data   Eo_Id_Data;
 typedef struct _Eo_Id_Table_Data Eo_Id_Table_Data;
 
+#define CACHENUM 2
+#define CACHELINE 64
+#define CACHELRU 1
+
 struct _Eo_Id_Table_Data
 {
/* Cached eoid lookups */
+#if CACHENUM > 0
+   Eo_Id cache_id[CACHENUM];
+   _Eo_Object   *cache_object[CACHENUM];
+#endif
struct
  {
-Eo_Id id;
-_Eo_Object   *object;
 const Eo *isa_id;
 const Efl_Class  *klass;
 Eina_Bool isa;
@@ -343,6 +349,100 @@ extern Eina_TLS  _eo_table_data;
 extern 

[EGIT] [efl] 01/01: use eina_file_access() instead of access() if possible

2024-04-09 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.


View the commit online.
commit 49976ca388dfb66cce600e0b2169cae0c675f0e7
Author: Vincent Torri 
AuthorDate: Fri Mar 29 05:41:17 2024 +0100

use eina_file_access() instead of access() if possible
---
 src/lib/ecore_evas/ecore_evas_module.c | 11 +---
 src/lib/ecore_file/ecore_file.c| 98 ++
 src/lib/eet/eet_lib.c  |  2 +
 src/lib/eeze/eeze_disk.c   | 18 +++
 src/lib/eeze/eeze_disk_libmount.c  |  2 +-
 src/lib/eina/eina_prefix.c |  6 +--
 src/lib/elementary/elm_main.c  |  4 +-
 src/lib/ethumb/ethumb.c|  2 +-
 8 files changed, 22 insertions(+), 121 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 4fdd8f70b0..0a4c6de997 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -22,15 +22,6 @@ static Eina_Module *_ecore_evas_vnc = NULL;
 # define ECORE_EVAS_ENGINE_NAME "module.so"
 #endif
 
-static inline Eina_Bool
-_file_exists(const char *file)
-{
-   if (!file) return EINA_FALSE;
-
-   if (access(file, F_OK) == -1) return EINA_FALSE;
-   return EINA_TRUE;
-}
-
 
 static Eina_Module *
 _ecore_evas_vnc_server_module_try_load(const char *prefix,
@@ -219,7 +210,7 @@ _ecore_evas_available_engines_get(void)
  eina_strbuf_append_printf(buf, "%s/%s/" ECORE_EVAS_ENGINE_NAME,
info->path, MODULE_ARCH);
 
- if (_file_exists(eina_strbuf_string_get(buf)))
+ if (eina_file_access(eina_strbuf_string_get(buf), EINA_FILE_ACCESS_MODE_EXIST))
{
   const char *name;
 
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 66bdfe542e..a1a0a27874 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -606,111 +606,19 @@ ecore_file_dir_get(const char *file)
 EAPI Eina_Bool
 ecore_file_can_read(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, R_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_READ);
 }
 
 EAPI Eina_Bool
 ecore_file_can_write(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, W_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_WRITE);
 }
 
 EAPI Eina_Bool
 ecore_file_can_exec(const char *file)
 {
-#ifdef _WIN32
-   HANDLE h;
-   HANDLE fm;
-   char *base;
-   char *base_nt;
-   LARGE_INTEGER sz;
-   WORD characteristics;
-#endif
-
-   if (!file || !*file) return EINA_FALSE;
-
-#ifdef _WIN32
-   /*
-* we parse the file to check if it is a PE file (EXE or DLL)
-* and we finally check whether it's a DLL or not.
-* Reference :
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
-*/
-   h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL,
-  OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-   if (h == INVALID_HANDLE_VALUE)
- goto test_bat;
-
-   if (!GetFileSizeEx(h, ))
- goto close_h;
-
-   /* a PE file must have at least the DOS and NT headers */
-   if (sz.QuadPart < (LONGLONG)(sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS)))
- goto close_h;
-
-   fm = CreateFileMapping(h, NULL, PAGE_READONLY, 0, 0, NULL);
-   if (fm == NULL)
- goto close_h;
-
-   base = (char *)MapViewOfFile(fm, FILE_MAP_READ, 0, 0, 0);
-   CloseHandle(fm);
-   if (base == NULL)
- goto close_h;
-
-   /*
-* the PE file begins with the DOS header.
-* First magic number : the DOS header must begin with a DOS magic number,
-* that is "MZ", that is 0x5a4d, stored in a WORD.
-*/
-   if (*((WORD *)base) != 0x5a4d)
- goto unmap_view;
-
-   /*
-* The position of the NT header is located at the offset 0x3c.
-*/
-   base_nt = base + *((DWORD *)(base + 0x3c));
-   /*
-* The NT header begins with the magic number "PE\0\0", that is
-* 0x4550, stored in a DWORD.
-*/
-   if (*((DWORD *)base_nt) != 0x4550)
- goto unmap_view;
-
-   /*
-* to get informations about executable (EXE or DLL), we look at
-* the 'Characteristics' member of the NT header, located at the offset
-* 22 (4 for the magic number, 18 for the offset) from base_nt.
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics
-*/
-   characteristics = *((WORD *)(base_nt + 4 + 18));
-
-   UnmapViewOfFile(base);
-   CloseHandle(h);
-
-   /*
-* 0x0002 : if set, EXE or DLL
-* 0x2000 : if set, DLL
-*/
-   if ((characteristics & 0x0002) && !(characteristics & 0x2000))
- return EINA_TRUE;
- unmap_view:
-   UnmapViewOfFile(base);
- close_h:
-   CloseHandle(h);
- test_bat:
-   /*
-* a .bat file, considered as an executable, is only a text file,
-* so we rely on 

[EGIT] [efl] 01/01: ecore_drm2: Add start of work on Ecore_Drm2_Fb support

2024-04-08 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch devs/devilhorns/apos
in repository efl.


View the commit online.
commit 47da9c29f5f76df8c372d5153ea01dcc95cd8b93
Author: Christopher Michael 
AuthorDate: Thu Jan 18 07:30:37 2024 -0500

ecore_drm2: Add start of work on Ecore_Drm2_Fb support

NB: Nothing functional here, just adding the structure and file to
build order
---
 src/lib/ecore_drm2/Ecore_Drm2.h | 3 +++
 src/lib/ecore_drm2/ecore_drm2_fb.c  | 1 +
 src/lib/ecore_drm2/ecore_drm2_private.h | 7 +++
 src/lib/ecore_drm2/meson.build  | 1 +
 4 files changed, 12 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index b2e2c3a137..c77b9716d6 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -40,6 +40,9 @@ typedef enum _Ecore_Drm2_Relative_Mode
ECORE_DRM2_RELATIVE_MODE_TO_BELOW
 } Ecore_Drm2_Relative_Mode;
 
+/* opaque structure to represent a drm framebuffer */
+typedef struct _Ecore_Drm2_Fb Ecore_Drm2_Fb;
+
 /* opaque structure to represent a drm crtc */
 typedef struct _Ecore_Drm2_Crtc Ecore_Drm2_Crtc;
 
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
new file mode 100644
index 00..b875d99ba3
--- /dev/null
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -0,0 +1 @@
+#include "ecore_drm2_private.h"
diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h
index 7b55dea3e1..df644a8c63 100644
--- a/src/lib/ecore_drm2/ecore_drm2_private.h
+++ b/src/lib/ecore_drm2/ecore_drm2_private.h
@@ -214,6 +214,13 @@ typedef struct _Ecore_Drm2_Display_State
 } Ecore_Drm2_Display_State;
 
 /* opaque API structures */
+struct _Ecore_Drm2_Fb
+{
+   int w, h;
+   int depth, bpp;
+   uint32_t format;
+};
+
 struct _Ecore_Drm2_Plane
 {
int fd;
diff --git a/src/lib/ecore_drm2/meson.build b/src/lib/ecore_drm2/meson.build
index 71b0bce3c9..eecd058d08 100644
--- a/src/lib/ecore_drm2/meson.build
+++ b/src/lib/ecore_drm2/meson.build
@@ -7,6 +7,7 @@ ecore_drm2_header_src = [
 ]
 
 ecore_drm2_src = files([
+  'ecore_drm2_fb.c',
   'ecore_drm2_displays.c',
   'ecore_drm2_connectors.c',
   'ecore_drm2_planes.c',


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 02/02: session: Try dbus before SM/ICE on logout/shutdown

2024-04-07 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.


View the commit online.
commit 29b1cfbaada3aeacdfdc16affba901081b625c8e
Author: Kim Woelders 
AuthorDate: Sat Apr 6 13:07:40 2024 +0200

session: Try dbus before SM/ICE on logout/shutdown

Otherwise we will not get the Shutdown/Reboot dialog but always the
Logout one (with dbus and SM both enabled).
---
 src/session.c | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/session.c b/src/session.c
index 7a379b9b..a4a96fd2 100644
--- a/src/session.c
+++ b/src/session.c
@@ -564,25 +564,26 @@ _SessionExitDbus(int how)
 static void
 _SessionLogout(int how)
 {
-#if USE_SM
+#ifdef USE_SM
 if (EDebug(EDBUG_TYPE_SESSION))
 Eprintf("%s: how=%d smc=%p\n", __func__, how, sm_conn);
+#else
+if (EDebug(EDBUG_TYPE_SESSION))
+Eprintf("%s: how=%d\n", __func__, how);
+#endif
 
+#if USE_DBUS
+if (_SessionExitDbus(how) == 0)
+return;
+#endif
+
+#if USE_SM
 if (sm_conn)
 {
 SmcRequestSaveYourself(sm_conn, SmSaveBoth, True, SmInteractStyleAny,
False, True);
 return;
 }
-#else
-if (EDebug(EDBUG_TYPE_SESSION))
-Eprintf("%s: how=%d\n", __func__, how);
-
-#endif  /* USE_SM */
-
-#if USE_DBUS
-if (_SessionExitDbus(how) == 0)
-return;
 #endif
 
 switch (how)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 01/02: dbus: Only install e16-dbus-cmd if dbus support is enabled

2024-04-07 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.


View the commit online.
commit 355663252dd4eb6564b14108a0d5520c784e1893
Author: Kim Woelders 
AuthorDate: Wed Apr 3 18:57:44 2024 +0200

dbus: Only install e16-dbus-cmd if dbus support is enabled
---
 misc/Makefile.am | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/misc/Makefile.am b/misc/Makefile.am
index 14f09cbb..d8e4b986 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -17,7 +17,10 @@ XSESSION_DESKTOPS = $(XSESSION_MISC) $(XSESSION_GNOME2) $(XSESSION_GNOME3)
 DESKTOPS = $(DESKTOPS_APP) $(XSESSION_DESKTOPS)
 
 miscdir = $(pkgdatadir)/misc
-misc_SCRIPTS = $(XCLIENTS) starte16 e16-dbus-cmd
+misc_SCRIPTS = $(XCLIENTS) starte16
+if ENABLE_DBUS
+misc_SCRIPTS += e16-dbus-cmd
+endif
 
 applicationdir = $(datadir)/applications
 application_DATA = $(DESKTOPS_APP)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 02/02: Danish translation update

2024-04-06 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16.


View the commit online.
commit d1bd7a6100650adb5ed0c1cf80d6d8891fac4c24
Author: Kim Woelders 
AuthorDate: Sat Apr 6 08:13:12 2024 +0200

Danish translation update
---
 po/da.po | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/po/da.po b/po/da.po
index 5ed16916..fb710443 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: e16\n"
 "Report-Msgid-Bugs-To: enlightenment-i...@lists.sourceforge.net\n"
 "POT-Creation-Date: 2024-04-03 18:58+0200\n"
-"PO-Revision-Date: 2023-10-20 17:16+0200\n"
+"PO-Revision-Date: 2024-04-06 08:12+0200\n"
 "Last-Translator: scootergrisen\n"
 "Language-Team: Danish\n"
 "Language: da\n"
@@ -16,7 +16,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 3.4\n"
+"X-Generator: Poedit 3.4.2\n"
 
 #: src/about.c:35
 #, c-format
@@ -2313,10 +2313,8 @@ msgid "Log out"
 msgstr "Log ud"
 
 #: config/strings.c:108
-#, fuzzy
-#| msgid "Yes, Shut Down"
 msgid "Shut down"
-msgstr "Ja, luk ned"
+msgstr "Luk ned"
 
 #: config/strings.c:114
 msgid "Leave alone"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 47/48: Updating spanish translation

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 4e32c90b7d9a93f2c9239846e23b04c4cf527ffc
Author: Massimo Maiurana 
AuthorDate: Mon Apr 1 18:35:16 2024 +0200

Updating spanish translation
---
 po/es.po | 381 +++
 1 file changed, 186 insertions(+), 195 deletions(-)

diff --git a/po/es.po b/po/es.po
index 4788eccce..3491b1f5b 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,14 +6,14 @@
 # DiegoJ , 2009.
 # Aníbal Garrido , 2012.
 # Adrián Arévalo , 2012, 2013, 2016.
-# Roy W. Reese , 2019
+# Roy W. Reese , 2024
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: Enlightenment 0.22\n"
+"Project-Id-Version: Enlightenment 0.26\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2024-01-23 21:51+0100\n"
-"PO-Revision-Date: 2020-05-06 21:58+0200\n"
+"PO-Revision-Date: 2024-04-01 14:03+0200\n"
 "Last-Translator: RWR\n"
 "Language-Team: Español; Castellano <>\n"
 "Language: es\n"
@@ -21,7 +21,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.3\n"
+"X-Generator: Poedit 3.4.2\n"
 "X-Poedit-Basepath: /home/adrian/trunk/e\n"
 
 #: src/bin/e_about.c:17
@@ -48,14 +48,13 @@ msgid "Enlightenment"
 msgstr "Enlightenment"
 
 #: src/bin/e_about.c:26
-#, fuzzy
 msgid ""
 "Copyright  2000-2024, by the Enlightenment Development TeamWe hope you enjoy using this software as much as we enjoyed "
 "writing it.To contact us please visit:http://www."
 "enlightenment.org"
 msgstr ""
-"Copyright  2000-2020, por el Equipo de Desarrollo de "
+"Copyright  2000-2024, por el Equipo de Desarrollo de "
 "EnlightenmentEsperamos que disfrute usando este software tanto "
 "como nosotros disfrutamos escribiéndolo.Para contactar con "
 "nosotros visite:http://www.enlightenment.org"
@@ -199,9 +198,8 @@ msgid "Mouse to key"
 msgstr "De ratón a tecla"
 
 #: src/bin/e_actions.c:3472
-#, fuzzy
 msgid "Profile: Switch"
-msgstr "Selector de perfiles"
+msgstr "Perfil: Cambiar"
 
 #: src/bin/e_actions.c:3491 src/bin/e_actions.c:3502 src/bin/e_actions.c:3521
 #: src/bin/e_actions.c:3526 src/bin/e_actions.c:3531 src/bin/e_actions.c:3536
@@ -625,30 +623,30 @@ msgstr "Enviar ratón una pantalla detrás"
 msgid "Send Mouse Forward/Back Screens..."
 msgstr "Enviar ratón adelante/atrás pantallas..."
 
-# oscurecer
+# oscurecer, atenuar
 #: src/bin/e_actions.c:3800
 msgid "Dim"
-msgstr "Disminuir brillo"
+msgstr "Atenuar"
 
 #: src/bin/e_actions.c:3803
 msgid "Undim"
-msgstr "Aumentar brillo"
+msgstr "Restaurar"
 
 #: src/bin/e_actions.c:3806
 msgid "Backlight Set"
-msgstr "Retroiluminación"
+msgstr "Configurar retroiluminación"
 
 #: src/bin/e_actions.c:3808
 msgid "Backlight Min"
-msgstr "Retroiluminación al mínimo"
+msgstr "Retroiluminación mín"
 
 #: src/bin/e_actions.c:3810
 msgid "Backlight Mid"
-msgstr "Retroiluminación a la mitad"
+msgstr "Retroiluminación 50%"
 
 #: src/bin/e_actions.c:3812
 msgid "Backlight Max"
-msgstr "Retroiluminación al máximo"
+msgstr "Retroiluminación max"
 
 #: src/bin/e_actions.c:3815
 msgid "Backlight Adjust"
@@ -662,20 +660,18 @@ msgstr "Aumentar retroiluminación"
 msgid "Backlight Down"
 msgstr "Disminuir retroiluminación"
 
+# Blanking: "apagar" en Windows, Plasma; "en negro" en ajustes de XFCE.
 #: src/bin/e_actions.c:3824
-#, fuzzy
 msgid "Blanking Off"
-msgstr "Apagado de pantalla"
+msgstr "Deshabilitar apagado de pantalla"
 
 #: src/bin/e_actions.c:3826
-#, fuzzy
 msgid "Blanking On"
-msgstr "Apagado de pantalla"
+msgstr "Habilitar apagado de pantalla"
 
 #: src/bin/e_actions.c:3828
-#, fuzzy
 msgid "Blanking Toggle"
-msgstr "Apagado de pantalla"
+msgstr "Alternar apagado de pantalla"
 
 #: src/bin/e_actions.c:3833
 msgid "Update and re-apply screen setup"
@@ -728,9 +724,8 @@ msgid "Push in Direction..."
 msgstr "Empujar hacia..."
 
 #: src/bin/e_actions.c:3886
-#, fuzzy
 msgid "Grow in Direction..."
-msgstr "Empujar hacia..."
+msgstr "Expandir hacia..."
 
 #: src/bin/e_actions.c:3892
 msgid "Drag Icon..."
@@ -1123,9 +1118,8 @@ msgid "Enlightenment cannot initialize the XSettings system.\n"
 msgstr "Enlightenment no puede iniciar el sistema XSettings.\n"
 
 #: src/bin/e_comp_x_randr.c:453
-#, fuzzy
 msgid "Screen setup Error"
-msgstr "Error en la captura de pantalla"
+msgstr "Error: configuración de pantalla"
 
 #: src/bin/e_comp_x_randr.c:454
 msgid ""
@@ -1133,6 +1127,10 @@ msgid ""
 "have. This shouldbe fixed by going to:Settings -> Screen -> "
 "Screen SetupAnd configure at least one screen to be on."
 msgstr ""
+"Parece que no tiene ninguna pantallaconfigurada para recibir los datos "
+"de salida. Se debe arreglar yendo a:Preferencias -> Pantalla -"
+"> Configuración de pantallaY configurar al menos una pantalla a "
+"estar encendida."
 
 #: src/bin/e_comp_x_randr.c:462 src/bin/e_config_dialog.c:274
 #: 

[EGIT] [enlightenment] 30/48: Prefix local static functions with underscore.

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 1f36cc158bf30383dc1ca56df65c074b8dcb24ee
Author: rafspiny 
AuthorDate: Sat Aug 19 19:46:50 2023 +0200

Prefix local static functions with underscore.
---
 src/modules/convertible/dbus_acceleration.c | 88 ++---
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 3a75a742e..9db1de15a 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -11,6 +11,49 @@
 static DbusAccelerometer* accelerometer_dbus;
 
 
+/**
+ * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
+ * interface net.hadess.SensorProxy
+ * @param data not used
+ * @param msg The message
+ * @param pending
+ */
+static void
+_on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
+{
+const char *errname, *errmsg;
+
+INF("Going to release the accelerometer_dbus");
+if (eldbus_message_error_get(msg, , ))
+{
+ERR("Error: %s %s", errname, errmsg);
+return;
+}
+INF("Accelerometer released");
+}
+
+
+/**
+ * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS
+ * interface net.hadess.SensorProxy
+ * @param data not used
+ * @param msg The message
+ * @param pending
+ */
+static void
+_on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
+{
+const char *errname, *errmsg;
+
+INF("Going to claim the accelerometer_dbus");
+if (eldbus_message_error_get(msg, , ))
+{
+ERR("Error: %s %s", errname, errmsg);
+return;
+}
+INF("Accelerometer claimed");
+}
+
 /**
  * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
  * @param data DbusAccelerometer
@@ -88,7 +131,7 @@ sensor_proxy_shutdown(void)
 
// TODO Should to this and wait for the release before continuing
INF("Freeing convertible resources");
-   accelerometer_dbus->pending_acc_crelease = eldbus_proxy_call(accelerometer_dbus->sensor_proxy, "ReleaseAccelerometer", on_accelerometer_released, accelerometer_dbus, -1, "");
+   accelerometer_dbus->pending_acc_crelease = eldbus_proxy_call(accelerometer_dbus->sensor_proxy, "ReleaseAccelerometer", _on_accelerometer_released, accelerometer_dbus, -1, "");
if (accelerometer_dbus)
{
   e_object_del(E_OBJECT(accelerometer_dbus));
@@ -435,46 +478,3 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
   free(matrix);
}
 }
-
-/**
- * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS
- * interface net.hadess.SensorProxy
- * @param data not used
- * @param msg The message
- * @param pending
- */
- static void
-_on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
-{
-   const char *errname, *errmsg;
-
-   INF("Going to claim the accelerometer_dbus");
-   if (eldbus_message_error_get(msg, , ))
-   {
-  ERR("Error: %s %s", errname, errmsg);
-  return;
-   }
-   INF("Accelerometer claimed");
-}
-
-
-/**
- * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
- * interface net.hadess.SensorProxy
- * @param data not used
- * @param msg The message
- * @param pending
- */
-static void
-on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
-{
-   const char *errname, *errmsg;
-
-   INF("Going to release the accelerometer_dbus");
-   if (eldbus_message_error_get(msg, , ))
-   {
-  ERR("Error: %s %s", errname, errmsg);
-  return;
-   }
-   INF("Accelerometer released");
-}


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 14/48: Address calloc failure

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 608e2fcebfe8df0085d77a483d8b3402ef64ccb1
Author: rafspiny 
AuthorDate: Wed Aug 2 21:53:59 2023 +0200

Address calloc failure
---
 src/modules/convertible/dbus_acceleration.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index d7041951e..9d98ff1ce 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -20,6 +20,7 @@ sensor_proxy_init()
   return accelerometer_dbus;
}
accelerometer_dbus  = calloc(1, sizeof(DbusAccelerometer));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(accelerometer_dbus, NULL);
 
// The next line is probably redundant
accelerometer_dbus->orientation = undefined;
@@ -147,6 +148,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
   *result = EINA_FALSE;
}
const char **string_property_value = calloc(PATH_MAX, sizeof(char));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(string_property_value, EINA_FALSE);
if (!eldbus_message_iter_arguments_get((*variant), "s", string_property_value))
{
   WARN("error in eldbus_message_iter_arguments_get()");
@@ -241,6 +243,7 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
enum screen_rotation orientation;
Eldbus_Message_Iter *variant = NULL;
Eina_Bool* result = calloc(1, sizeof(Eina_Bool));
+   EINA_SAFETY_ON_NULL_RETURN_VAL(result, NULL);
 
if (eldbus_message_error_get(msg, , ))
{
@@ -401,6 +404,7 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
   Ecore_X_Atom format_ret;
   char *result = NULL;
   TransformationMatrix *matrix = calloc(1, sizeof(TransformationMatrix));
+  EINA_SAFETY_ON_NULL_RETURN_VAL(matrix, NULL);
   result = ecore_x_input_device_property_get(x_dev_num, CTM_name, _ret, _ret, _size_ret);
   if (result != NULL)
   {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 01/01: attempt to dlopen libddcutil.so.5 first

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/68/head
in repository enlightenment.


View the commit online.
commit 9c4b44233555a6506b0a78e3b7274291da5fbb9b
Author: Ross Vandegrift 
AuthorDate: Sun Mar 24 21:21:15 2024 -0700

attempt to dlopen libddcutil.so.5 first

The backwards-incompatible changes in libddcutil.so.5 are documented at
https://www.ddcutil.com/c_api_200/ - a quick grep says that the only affected
symbol appearing in E is ddca_set_global_sleep_multiplier (which is already
optional).

This change does not make any of the changes suggested in the "Library
Initialization" section of the above doc.
---
 src/bin/system/e_system_ddc.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/bin/system/e_system_ddc.c b/src/bin/system/e_system_ddc.c
index 7b12fc5f4..f06ea2c93 100644
--- a/src/bin/system/e_system_ddc.c
+++ b/src/bin/system/e_system_ddc.c
@@ -304,9 +304,14 @@ err:
 static Eina_Bool
 _ddc_init(void)
 {
-   // .so.3 is ABI compatible twith .so.2 for out uses - see
-   // https://www.ddcutil.com/c_api_99/ for changes between them
-   ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
+   // .so.[345] are ABI compatible with .so.2 for our uses - see
+   // the changes listed at:
+   // - https://www.ddcutil.com/c_api_99/
+   // - https://www.ddcutil.com/c_api_120/
+   // - https://www.ddcutil.com/c_api_200/
+   ddc_lib = dlopen("libddcutil.so.5", RTLD_NOW | RTLD_LOCAL);
+   if (!ddc_lib)
+ ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
  ddc_lib = dlopen("libddcutil.so.3", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 38/48: Rebase

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit dcf621326b80280e7994bdafc157322f071b944e
Author: rafspiny 
AuthorDate: Sun Dec 31 14:03:56 2023 +0100

Rebase
---
 src/modules/convertible/dbus_acceleration.c| 64 +++---
 src/modules/convertible/dbus_acceleration.h|  6 ++-
 src/modules/convertible/e-gadget-convertible.c |  2 +-
 src/modules/convertible/e_mod_main.c   | 53 -
 4 files changed, 63 insertions(+), 62 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 2be8ea95f..1483d984d 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -65,6 +65,7 @@ _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
 }
 DBG("Looks like I found a device with calibration capabilities");
 is_correct_device = EINA_TRUE;
+free(result);
 }
 iterator++;
 }
@@ -101,6 +102,7 @@ _fetch_X_device_input_number(void)
 {
 dev_number = dev_counter;
 DBG("Setting device: %d", dev_number);
+break;
 }
 iterator++;
 }
@@ -120,7 +122,18 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
 {
 DBG("Working on screen %s", randr_id);
 E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
+if (rotatable_screen == NULL)
+{
+DBG("Failed to load screen for id %s", randr_id);
+return;
+}
+
 E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
+if (screen_randr_cfg == NULL)
+{
+DBG("Failed to load screen configuration for id %s", randr_id);
+return;
+}
 int rotation = _convertible_rotation_get(orientation);
 DBG("Screen %s is going to be rotated to %d", randr_id, rotation);
 
@@ -165,6 +178,7 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
 } else {
 ERR("Unable to fetch coordinates transformation matrix for device %d", x_dev_num);
 }
+free(result);
 free(matrix);
 }
 }
@@ -173,7 +187,7 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
  * Helper to get the interface
  * */
 static Eldbus_Proxy *
-get_dbus_interface(const char *IFACE)
+_get_dbus_interface(const char *IFACE)
 {
 DBG("Working on interface: %s", IFACE);
 Eldbus_Connection *conn;
@@ -228,16 +242,19 @@ _access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
 return res;
 }
 
+if (type[0] != 'b')
+{
+WARN("Expected type is int.");
+res = EINA_FALSE;
+free(type);
+return res;
+}
 if (type[1])
 {
 WARN("It is a complex type, not handle yet.");
 res = EINA_FALSE;
 }
-if (type[0] != 'b')
-{
-WARN("Expected type is int.");
-res = EINA_FALSE;
-}
+
 if (!eldbus_message_iter_arguments_get((*variant), "b", boolean_property_value))
 {
 WARN("error in eldbus_message_iter_arguments_get()");
@@ -379,16 +396,13 @@ sensor_proxy_shutdown(void)
eldbus_shutdown();
 }
 
-int
-_convertible_rotation_get(const enum screen_rotation orientation);
-
 /**
  * Helper function to extract ta string property from the message
  * @param msg The message coming from the get property invocation
  * @param variant
  * @return Enum specifying the orientation. UNDEFINED by default
  */
-enum screen_rotation
+static enum screen_rotation
 _access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant)
 {
enum screen_rotation rotation = UNDEFINED;
@@ -404,34 +418,33 @@ _access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant
   WARN("Unable to get the type.");
   return rotation;
}
-
-   type = eldbus_message_iter_signature_get((*variant));
+   if (type[0] != 's')
+   {
+  WARN("Expected type is string(s).");
+  free(type);
+  return rotation;
+   }
if (type[1])
{
   WARN("It is a complex type, not handle yet.");
}
-   if (type[0] != 's')
-   {
-  WARN("Expected type is string(s).");
-   }
-   const char **string_property_value = calloc(PATH_MAX, sizeof(char));
-   EINA_SAFETY_ON_NULL_RETURN_VAL(string_property_value, EINA_FALSE);
-   if (!eldbus_message_iter_arguments_get((*variant), "s", string_property_value))
+
+   const char *string_property_value;
+   if (!eldbus_message_iter_arguments_get(variant, "s", _property_value))
{
   WARN("error in eldbus_message_iter_arguments_get()");
}
 
-   if (!strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value))
+   if 

[EGIT] [enlightenment] 42/48: Introduce version for config

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit f34460bf9679c6f5121c15962a0f3cc7e1000386
Author: rafspiny 
AuthorDate: Tue Jan 23 22:11:24 2024 +0100

Introduce version for config
---
 src/modules/convertible/e_mod_config.c | 35 +++---
 src/modules/convertible/e_mod_config.h |  7 +++
 2 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/src/modules/convertible/e_mod_config.c b/src/modules/convertible/e_mod_config.c
index 8b18a2122..4e3b868ef 100644
--- a/src/modules/convertible/e_mod_config.c
+++ b/src/modules/convertible/e_mod_config.c
@@ -5,7 +5,7 @@
 #include "e.h"
 #include "e_mod_config.h"
 
-static Convertible_Config *_config = NULL;
+static Convertible_Config *conv_config = NULL;
 E_Config_DD *config_edd = NULL;
 EINTERN Convertible_Config *convertible_config;
 
@@ -22,19 +22,20 @@ _econvertible_config_dd_new(void)
// TODO Not sure what his line does. Apparently, it is needed to specify the type of the configuration data structure
config_edd = E_CONFIG_DD_NEW("Convertible_Config", Convertible_Config);
 
+   E_CONFIG_VAL(config_edd, Convertible_Config, version, INT);
E_CONFIG_VAL(config_edd, Convertible_Config, disable_keyboard_on_rotation, INT);
 //   E_CONFIG_LIST(config_edd, Convertible_Config, rotatable_screen_configuration, c_zone);
 }
 
 /**
- * Update the *_config data structure based on the settings coming from the dialog panel
+ * Update the *conv_config data structure based on the settings coming from the dialog panel
  * @param config The config coming from the Dialog Panel (E_Config_Dialog_data)
  */
 static void
 _config_set(Convertible_Config *config)
 {
DBG("config_set disable_keyboard_on_rotation %d", config->disable_keyboard_on_rotation);
-   _config->disable_keyboard_on_rotation = config->disable_keyboard_on_rotation;
+   conv_config->disable_keyboard_on_rotation = config->disable_keyboard_on_rotation;
e_config_domain_save("module.convertible", config_edd, config);
 }
 
@@ -51,8 +52,8 @@ _create_data(E_Config_Dialog *cfg EINA_UNUSED)
 
dialog_data = E_NEW(E_Config_Dialog_Data, 1);
dialog_data->config = malloc(sizeof(Convertible_Config));
-   dialog_data->config->disable_keyboard_on_rotation = _config->disable_keyboard_on_rotation;
-//   dialog_data->config->rotatable_screen_configuration = _config->rotatable_screen_configuration;
+   dialog_data->config->disable_keyboard_on_rotation = conv_config->disable_keyboard_on_rotation;
+//   dialog_data->config->rotatable_screen_configuration = conv_config->rotatable_screen_configuration;
 
DBG("disable_keyboard_on_rotation %d", dialog_data->config->disable_keyboard_on_rotation);
return dialog_data;
@@ -72,7 +73,7 @@ _free_data(E_Config_Dialog *c EINA_UNUSED, E_Config_Dialog_Data *dialog_data)
 }
 
 /**
- * This function should store the modified settings into the data structure referred by the pointer _config
+ * This function should store the modified settings into the data structure referred by the pointer conv_config
  * @param cfd
  * @param cfdata
  * @return
@@ -142,14 +143,26 @@ void
 econvertible_config_init(void)
 {
_econvertible_config_dd_new();
-   _config = e_config_domain_load("module.econvertible", config_edd);
-   if (!_config)
+   conv_config = e_config_domain_load("module.econvertible", config_edd);
+
+   //   Check version
+   if (conv_config && !e_util_module_config_check(_("Convertible Module"),
+conv_config->version,
+MOD_CONFIG_FILE_VERSION))
{
-  _config = E_NEW(Convertible_Config, 1);
-  _config->disable_keyboard_on_rotation = 1;
-//  _config->rotatable_screen_configuration = NULL;
+  free(conv_config);
+  return;
}
 
+
+   if (!conv_config)
+   {
+  conv_config = E_NEW(Convertible_Config, 1);
+  conv_config->disable_keyboard_on_rotation = 1;
+//  conv_config->rotatable_screen_configuration = NULL;
+   }
+
+   conv_config->version = MOD_CONFIG_FILE_VERSION;
DBG("Config loaded");
 }
 
diff --git a/src/modules/convertible/e_mod_config.h b/src/modules/convertible/e_mod_config.h
index 0af443795..2e0b98ea9 100644
--- a/src/modules/convertible/e_mod_config.h
+++ b/src/modules/convertible/e_mod_config.h
@@ -7,10 +7,17 @@
 #ifndef E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H
 #define E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H
 
+/* Increment for Major Changes */
+#define MOD_CONFIG_FILE_EPOCH  1
+/* 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 * 100) + MOD_CONFIG_FILE_GENERATION)
+
 // Definition of the data structure to hold the gadget configuration
 typedef struct _Convertible_Config Convertible_Config;
 struct _Convertible_Config
 {
+   int version;

[EGIT] [enlightenment] 31/48: Prefix local functions static.

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 6939a34c1d8cbc362531b73b72b85957b192ded0
Author: rafspiny 
AuthorDate: Sat Aug 19 19:53:58 2023 +0200

Prefix local functions static.
---
 src/modules/convertible/dbus_acceleration.c | 92 ++---
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 9db1de15a..e5fc6f602 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -11,6 +11,51 @@
 static DbusAccelerometer* accelerometer_dbus;
 
 
+/**
+ * Helper function to extract ta boolean property from the message
+ * @param msg The message coming from the get property invocation
+ * @param variant
+ * @param boolean_property_value The boolean property pointer where the value should be stored, if read
+ * @return
+ */
+static Eina_Bool
+_access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
+{
+char *type;
+Eina_Bool res = EINA_TRUE;
+
+if (!eldbus_message_arguments_get(msg, "v", variant))
+{
+WARN("Error getting arguments.");
+res = EINA_FALSE;
+}
+type = eldbus_message_iter_signature_get((*variant));
+if (type == NULL)
+{
+WARN("Unable to get the type.");
+res = EINA_FALSE;
+return res;
+}
+
+if (type[1])
+{
+WARN("It is a complex type, not handle yet.");
+res = EINA_FALSE;
+}
+if (type[0] != 'b')
+{
+WARN("Expected type is int.");
+res = EINA_FALSE;
+}
+if (!eldbus_message_iter_arguments_get((*variant), "b", boolean_property_value))
+{
+WARN("error in eldbus_message_iter_arguments_get()");
+res = EINA_FALSE;
+}
+free(type);
+return res;
+}
+
 /**
  * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
  * interface net.hadess.SensorProxy
@@ -152,7 +197,7 @@ _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
 /**
  * Helper to get the interface
  * */
-statis Eldbus_Proxy *
+static Eldbus_Proxy *
 get_dbus_interface(const char *IFACE)
 {
DBG("Working on interface: %s", IFACE);
@@ -235,51 +280,6 @@ _access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant
return rotation;
 }
 
-/**
- * Helper function to extract ta boolean property from the message
- * @param msg The message coming from the get property invocation
- * @param variant
- * @param boolean_property_value The boolean property pointer where the value should be stored, if read
- * @return
- */
-Eina_Bool
-_access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
-{
-   char *type;
-   Eina_Bool res = EINA_TRUE;
-
-   if (!eldbus_message_arguments_get(msg, "v", variant))
-   {
-  WARN("Error getting arguments.");
-  res = EINA_FALSE;
-   }
-   type = eldbus_message_iter_signature_get((*variant));
-   if (type == NULL)
-   {
-  WARN("Unable to get the type.");
-  res = EINA_FALSE;
-  return res;
-   }
-
-   if (type[1])
-   {
-  WARN("It is a complex type, not handle yet.");
-  res = EINA_FALSE;
-   }
-   if (type[0] != 'b')
-   {
-  WARN("Expected type is int.");
-  res = EINA_FALSE;
-   }
-   if (!eldbus_message_iter_arguments_get((*variant), "b", boolean_property_value))
-   {
-  WARN("error in eldbus_message_iter_arguments_get()");
-  res = EINA_FALSE;
-   }
-   free(type);
-   return res;
-}
-
 void
 on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 13/48: Address linting comments.

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit ff71a650c289133039805fb43cda3efb0c3d3ad8
Author: rafspiny 
AuthorDate: Wed Aug 2 21:43:51 2023 +0200

Address linting comments.
---
 src/modules/convertible/dbus_acceleration.c| 35 ++
 src/modules/convertible/dbus_acceleration.h|  9 ---
 src/modules/convertible/e-gadget-convertible.c | 12 ++---
 src/modules/convertible/e-gadget-convertible.h |  3 ++-
 src/modules/convertible/e_mod_config.c |  4 +--
 src/modules/convertible/e_mod_config.h | 15 +++
 6 files changed, 52 insertions(+), 26 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 6111c69ed..d7041951e 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -10,7 +10,9 @@
 
 DbusAccelerometer* accelerometer_dbus;
 
-DbusAccelerometer* sensor_proxy_init() {
+DbusAccelerometer*
+sensor_proxy_init()
+{
// Initialise DBUS component
if (accelerometer_dbus != NULL)
{
@@ -58,7 +60,8 @@ DbusAccelerometer* sensor_proxy_init() {
return accelerometer_dbus;
 }
 
-void sensor_proxy_shutdown()
+void
+sensor_proxy_shutdown(void)
 {
INF("Removing signal handler dbus_property_changed_sh");
eldbus_signal_handler_del(accelerometer_dbus->dbus_property_changed_sh);
@@ -77,11 +80,14 @@ void sensor_proxy_shutdown()
eldbus_shutdown();
 }
 
-int _convertible_rotation_get(const enum screen_rotation orientation);
+int
+_convertible_rotation_get(const enum screen_rotation orientation);
 
-int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator);
+int
+_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator);
 
-Eldbus_Proxy *get_dbus_interface(const char *IFACE)
+Eldbus_Proxy *
+get_dbus_interface(const char *IFACE)
 {
DBG("Working on interface: %s", IFACE);
Eldbus_Connection *conn;
@@ -110,7 +116,8 @@ Eldbus_Proxy *get_dbus_interface(const char *IFACE)
return sensor_proxy;
 }
 
-enum screen_rotation access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
+enum screen_rotation
+access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
 {
const char *type = NULL;
*result = EINA_TRUE;
@@ -267,7 +274,8 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
}
 }
 
-int _convertible_rotation_get(const enum screen_rotation orientation)
+int
+_convertible_rotation_get(const enum screen_rotation orientation)
 {
switch (orientation)
{
@@ -280,7 +288,8 @@ int _convertible_rotation_get(const enum screen_rotation orientation)
}
 }
 
-const float * _get_matrix_rotation_transformation(int rotation)
+const float *
+_get_matrix_rotation_transformation(int rotation)
 {
const float *transformation;
switch (rotation) {
@@ -299,7 +308,8 @@ const float * _get_matrix_rotation_transformation(int rotation)
return transformation;
 }
 
-int _fetch_X_device_input_number()
+int
+_fetch_X_device_input_number(void)
 {
// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
@@ -335,7 +345,8 @@ int _fetch_X_device_input_number()
return dev_number;
 }
 
-int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
+int
+_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
 {
// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
int is_correct_device = EINA_FALSE;
@@ -360,7 +371,9 @@ int _is_device_a_touch_pointer(int dev_counter, int num_properties, char **itera
return is_correct_device;
 }
 
-void _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation) {
+void
+_fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
+{
DBG("Working on screen %s", randr_id);
E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index b194ff08d..0276f5e4b 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -29,12 +29,14 @@ struct _DbusAccelerometer
 DbusAccelerometer* sensor_proxy_init();
 
 
-void sensor_proxy_shutdown();
+void
+sensor_proxy_shutdown(void);
 
 /**
  * Helper to get the interface
  * */
-Eldbus_Proxy *get_dbus_interface(const char *IFACE);
+Eldbus_Proxy *

[EGIT] [enlightenment] 33/48: Address shadowing warnings

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 8c184e7ef0bdcebe4b775577d590a3837b0c1248
Author: rafspiny 
AuthorDate: Sat Aug 19 20:28:51 2023 +0200

Address shadowing warnings
---
 src/modules/convertible/dbus_acceleration.c| 313 +
 src/modules/convertible/e-gadget-convertible.c |  13 -
 src/modules/convertible/e_mod_main.c   |  17 +-
 3 files changed, 166 insertions(+), 177 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 4d41d0d04..2be8ea95f 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -11,6 +11,164 @@
 static DbusAccelerometer* accelerometer_dbus;
 
 
+static int
+_convertible_rotation_get(const enum screen_rotation orientation)
+{
+switch (orientation)
+{
+case NORMAL: return 0;
+case LEFT_UP: return 90;
+case FLIPPED: return 180;
+case RIGHT_UP: return 270;
+
+default: return 0;
+}
+}
+
+static const float *
+_get_matrix_rotation_transformation(int rotation)
+{
+const float *transformation;
+switch (rotation) {
+case 90:
+transformation = MATRIX_ROTATION_90;
+break;
+case 180:
+transformation = MATRIX_ROTATION_180;
+break;
+case 270:
+transformation = MATRIX_ROTATION_270;
+break;
+default:
+transformation = MATRIX_ROTATION_IDENTITY;
+}
+return transformation;
+}
+
+
+static int
+_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
+{
+// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
+int is_correct_device = EINA_FALSE;
+for (int i = 0; i < num_properties; i++)
+{
+if (strstr(*iterator, "libinput Calibration Matrix"))
+is_correct_device = EINA_TRUE;
+if (strstr(*iterator, "Axis Labels"))
+{
+int num_ret, unit_size_ret;
+Ecore_X_Atom format_ret;
+char *result = ecore_x_input_device_property_get(dev_counter, *iterator, _ret, _ret, _size_ret);
+if (result) {
+// TODO Shall check for the value "Abs MT Position"
+}
+DBG("Looks like I found a device with calibration capabilities");
+is_correct_device = EINA_TRUE;
+}
+iterator++;
+}
+return is_correct_device;
+}
+
+
+static int
+_fetch_X_device_input_number(void)
+{
+// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
+// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
+const char *dev_name;
+char **property_name;
+int dev_num = ecore_x_input_device_num_get();
+int dev_number = -1;
+
+for (int dev_counter = 0; dev_counter < dev_num; dev_counter++)
+{
+dev_name = ecore_x_input_device_name_get(dev_counter);
+// Less horrible hack that relies on the presence of a property containing the work Calibration
+DBG("Found device with name %s", dev_name);
+int num_properties;
+property_name = ecore_x_input_device_properties_list(dev_counter, _properties);
+DBG("Found %d properties", num_properties);
+char **iterator = property_name;
+int is_correct_device = _is_device_a_touch_pointer(dev_counter, num_properties, iterator);
+if (is_correct_device == EINA_FALSE)
+continue;
+iterator = property_name;
+for (int i = 0; i < num_properties; i++)
+{
+if (!strcmp(*iterator, CTM_name))
+{
+dev_number = dev_counter;
+DBG("Setting device: %d", dev_number);
+}
+iterator++;
+}
+}
+
+return dev_number;
+}
+
+
+/**
+ * Fetch a screen from its ID and rotate it according to the rotation parameter
+ * @param randr_id The randr2 id
+ * @param rotation The expected rotation
+ */
+static void
+_fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
+{
+DBG("Working on screen %s", randr_id);
+E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
+E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
+int rotation = _convertible_rotation_get(orientation);
+DBG("Screen %s is going to be rotated to %d", randr_id, rotation);
+
+if (rotation == screen_randr_cfg->rotation)
+{
+WARN("Screen %s is already rotated to %d degrees", randr_id, rotation);
+} else {
+screen_randr_cfg->rotation = rotation;
+e_randr2_config_apply();
+DBG("Screen %s 

[EGIT] [enlightenment] 01/48: copying - update dates

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit a6d7a2235ac2390848ec739f4c2bb7afbd6ea8bc
Author: Carsten Haitzler 
AuthorDate: Mon Jan 22 10:53:02 2024 +

copying - update dates
---
 COPYING | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/COPYING b/COPYING
index b114711cb..9ed53aa1b 100644
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 Copyright notice for Enlightenment:
 
-Copyright (C) 2000-2020 Carsten Haitzler and various contributors (see AUTHORS)
+Copyright (C) 2000-2024 Carsten Haitzler and various contributors (see AUTHORS)
 
 All rights reserved.
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 35/48: Move icon for convertible configuration to screen section

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit a2bdd3c3ff4fa92eb1f36adde641798cc3caae71
Author: rafspiny 
AuthorDate: Thu Aug 24 08:24:11 2023 +0200

Move icon for convertible configuration to screen section
---
 src/modules/convertible/e_mod_main.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 5e69941e4..62df5f20e 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -322,10 +322,12 @@ e_modapi_init(E_Module *m)
e_gadcon_provider_register(&_gadcon_class);
 
INF("Creating menu entries for settings");
-   e_configure_registry_category_add("extensions", 90, "Extensions", NULL,
- "preferences-extensions");
-   e_configure_registry_item_add("extensions/convertible", 30, "convertible", NULL,
- "preferences-desktop-convertible", e_int_config_convertible_module);
+   /* create Screen configuration category
+*
+* NB: If the category already exists, this function just returns */
+   e_configure_registry_category_add("screen", 30, _("Screen"), NULL, "preferences-desktop-display");
+   e_configure_registry_item_add("screen/convertible", 30, "convertible", NULL,
+ "object-rotate-right", e_int_config_convertible_module);
 
instances = eina_list_append(instances, inst);
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 17/48: Other minor changes

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 479b83eb81ea0debce917149197989d88613f822
Author: rafspiny 
AuthorDate: Thu Aug 3 11:57:26 2023 +0200

Other minor changes
---
 src/modules/convertible/dbus_acceleration.c | 15 +++
 src/modules/convertible/e_mod_main.c|  4 ++--
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index badee37a3..c15ba3933 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -14,7 +14,7 @@ DbusAccelerometer*
 sensor_proxy_init()
 {
// Initialise DBUS component
-   if (accelerometer_dbus != NULL)
+   if (accelerometer_dbus)
{
   INF("We already have a struct filled");
   return accelerometer_dbus;
@@ -24,7 +24,7 @@ sensor_proxy_init()
 
// The next line is probably redundant
accelerometer_dbus->orientation = undefined;
-   
+
INF("Getting dbus interfaces");
accelerometer_dbus->sensor_proxy = get_dbus_interface(EFL_DBUS_ACC_IFACE);
accelerometer_dbus->sensor_proxy_properties = get_dbus_interface(ELDBUS_FDO_INTERFACE_PROPERTIES);
@@ -348,15 +348,14 @@ _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
int is_correct_device = EINA_FALSE;
for (int i=0; i-  if (strstr(*iterator, "libinput Calibration Matrix") != NULL)
+  if (strstr(*iterator, "libinput Calibration Matrix"))
  is_correct_device = EINA_TRUE;
-  if (strstr(*iterator, "Axis Labels") != NULL)
+  if (strstr(*iterator, "Axis Labels"))
   {
  int num_ret, unit_size_ret;
  Ecore_X_Atom format_ret;
- char *result = NULL;
- result = ecore_x_input_device_property_get(dev_counter, *iterator, _ret, _ret, _size_ret);
- if (result != NULL) {
+ char *result = ecore_x_input_device_property_get(dev_counter, *iterator, _ret, _ret, _size_ret);
+ if (result) {
 // TODO Shall check for the value "Abs MT Position"
  }
  DBG("Looks like I found a device with calibration capabilities");
@@ -399,7 +398,7 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
   TransformationMatrix *matrix = calloc(1, sizeof(TransformationMatrix));
   EINA_SAFETY_ON_NULL_RETURN_VAL(matrix, NULL);
   result = ecore_x_input_device_property_get(x_dev_num, CTM_name, _ret, _ret, _size_ret);
-  if (result != NULL)
+  if (result)
   {
 
  DBG("Device with coordinates transformation matrix");
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 306655a91..892a7b3eb 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -264,7 +264,7 @@ e_modapi_init(E_Module *m)
snprintf(theme_overlay_path, sizeof(theme_overlay_path), "%s/e-module-convertible.edj", convertible_module->dir);
elm_theme_extension_add(NULL, theme_overlay_path);
 
-   econvertible_config_init(NULL);
+   econvertible_config_init();
 
// Config DBus
DbusAccelerometer *accelerometer = sensor_proxy_init();
@@ -290,7 +290,7 @@ e_modapi_init(E_Module *m)
   ERR("Error: could not add the signal handler for PropertiesChanged");
 
// Screen related part
-   E_Zone *zone = NULL;
+   E_Zone *zone;
 
// Initialise screen part
DBG("Looking for the main screen");


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 23/48: Functions renaming

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit faa5c6ae84648de8557c18c395ec0bba3393e03d
Author: rafspiny 
AuthorDate: Thu Aug 3 17:44:23 2023 +0200

Functions renaming
---
 src/modules/convertible/dbus_acceleration.c | 42 +
 src/modules/convertible/dbus_acceleration.h | 29 
 2 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 0ffbc0441..23318d324 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -110,45 +110,45 @@ get_dbus_interface(const char *IFACE)
return sensor_proxy;
 }
 
+/**
+ * Helper function to extract ta string property from the message
+ * @param msg The message coming from the get property invocation
+ * @param variant
+ * @return Enum specifying the orientation. UNDEFINED by default
+ */
 enum screen_rotation
-access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
+_access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant)
 {
+   enum screen_rotation rotation = UNDEFINED;
char *type = NULL;
-   *result = EINA_TRUE;
 
if (!eldbus_message_arguments_get(msg, "v", variant))
{
   WARN("Error getting arguments.");
-  *result = EINA_FALSE;
}
type = eldbus_message_iter_signature_get((*variant));
if (type == NULL)
{
   WARN("Unable to get the type.");
-  *result = EINA_FALSE;
-  return UNDEFINED;
+  return rotation;
}
 
type = eldbus_message_iter_signature_get((*variant));
if (type[1])
{
   WARN("It is a complex type, not handle yet.");
-  *result = EINA_FALSE;
}
if (type[0] != 's')
{
   WARN("Expected type is string(s).");
-  *result = EINA_FALSE;
}
const char **string_property_value = calloc(PATH_MAX, sizeof(char));
EINA_SAFETY_ON_NULL_RETURN_VAL(string_property_value, EINA_FALSE);
if (!eldbus_message_iter_arguments_get((*variant), "s", string_property_value))
{
   WARN("error in eldbus_message_iter_arguments_get()");
-  *result = EINA_FALSE;
}
 
-   enum screen_rotation rotation = UNDEFINED;
if (!strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value))
   rotation = RIGHT_UP;
if (!strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value))
@@ -163,8 +163,15 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
return rotation;
 }
 
+/**
+ * Helper function to extract ta boolean property from the message
+ * @param msg The message coming from the get property invocation
+ * @param variant
+ * @param boolean_property_value The boolean property pointer where the value should be stored, if read
+ * @return
+ */
 Eina_Bool
-access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
+_access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
 {
char *type;
Eina_Bool res = EINA_TRUE;
@@ -213,7 +220,7 @@ on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pend
   ERR("Error: %s %s", errname, errmsg);
}
 
-   access_bool_property(msg, , _accelerometer);
+   _access_bool_property(msg, , _accelerometer);
DbusAccelerometer *accelerometer = data;
accelerometer->has_accelerometer = has_accelerometer;
DBG("Has Accelerometer: %d", accelerometer->has_accelerometer);
@@ -235,8 +242,6 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
const char *errname, *errmsg;
enum screen_rotation orientation;
Eldbus_Message_Iter *variant = NULL;
-   Eina_Bool* result = calloc(1, sizeof(Eina_Bool));
-   EINA_SAFETY_ON_NULL_RETURN_VAL(result, NULL);
 
if (eldbus_message_error_get(msg, , ))
{
@@ -244,14 +249,12 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
   return;
}
 
-   orientation = access_string_property(msg, , result);
-   if (*result == EINA_FALSE)
+   orientation = _access_string_property(msg, );
+   if (*orientation == UNDEFINED)
{
   INF("Failed to retrieve the orientation from dbus message");
-  free(result);
   return;
}
-   free(result);
 
inst->accelerometer->orientation = orientation;
DBG("Current Orientation: %d", inst->accelerometer->orientation);
@@ -366,6 +369,11 @@ _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
return is_correct_device;
 }
 
+/**
+ * Fetch a screen from its ID and rotate it according to the rotation parameter
+ * @param randr_id The randr2 id
+ * @param rotation The expected rotation
+ */
 void
 _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation 

[EGIT] [enlightenment] 18/48: Correctly defien function with no params

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 4ea8172e51254178ad9a3e039782f525b232b9e4
Author: rafspiny 
AuthorDate: Thu Aug 3 12:11:54 2023 +0200

Correctly defien function with no params
---
 src/modules/convertible/dbus_acceleration.c | 2 +-
 src/modules/convertible/dbus_acceleration.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index c15ba3933..20c2f0c40 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -11,7 +11,7 @@
 DbusAccelerometer* accelerometer_dbus;
 
 DbusAccelerometer*
-sensor_proxy_init()
+sensor_proxy_init(void)
 {
// Initialise DBUS component
if (accelerometer_dbus)
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index 0276f5e4b..cd473449f 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -26,7 +26,7 @@ struct _DbusAccelerometer
 /**
  * Fetch the DBUS interfaces and fill the DbusAccelerometer struct
  * */
-DbusAccelerometer* sensor_proxy_init();
+DbusAccelerometer* sensor_proxy_init(void);
 
 
 void


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 10/48: clock module - fix - free handlers on mod shudtown

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit e10a0d2be18662c12f91887ef4fcde0665232752
Author: Carsten Haitzler 
AuthorDate: Wed Mar 6 18:57:11 2024 +

clock module - fix - free handlers on mod shudtown

@fix
---
 src/modules/clock/e_mod_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c
index a6a6bcc36..d9906dde1 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -947,6 +947,7 @@ e_modapi_init(E_Module *m)
 E_API int
 e_modapi_shutdown(E_Module *m EINA_UNUSED)
 {
+   E_FREE_LIST(handlers, ecore_event_handler_del);
if (act)
  {
 e_action_predef_name_del("Clock", "Toggle calendar");


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 20/48: Enum with all caps values.

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit a139e88811bceb16d45b08be5cf357947d8af5f1
Author: rafspiny 
AuthorDate: Thu Aug 3 12:27:04 2023 +0200

Enum with all caps values.
---
 src/modules/convertible/accelerometer-orientation.h |  2 +-
 src/modules/convertible/dbus_acceleration.c | 12 ++--
 src/modules/convertible/dbus_acceleration.h |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/modules/convertible/accelerometer-orientation.h b/src/modules/convertible/accelerometer-orientation.h
index f1f92d08e..d2bc856c1 100755
--- a/src/modules/convertible/accelerometer-orientation.h
+++ b/src/modules/convertible/accelerometer-orientation.h
@@ -5,7 +5,7 @@
 #ifndef E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
 #define E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
 
-// Those costants are the possible states for the orientation of the acceleromenter.
+// Those costants are the possible states for the orientation of the accelerometer.
 
 #define ACCELEROMETER_ORIENTATION_UNDEFINED "undefined"
 #define ACCELEROMETER_ORIENTATION_NORMAL "normal"
diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index b2ea5a333..e2be711a8 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -126,7 +126,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
{
   WARN("Unable to get the type.");
   *result = EINA_FALSE;
-  return undefined;
+  return UNDEFINED;
}
 
type = eldbus_message_iter_signature_get((*variant));
@@ -148,15 +148,15 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
   *result = EINA_FALSE;
}
 
-   enum screen_rotation rotation = undefined;
+   enum screen_rotation rotation = UNDEFINED;
if (strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value) == 0)
-  rotation = right_up;
+  rotation = RIGHT_UP;
if (strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value) == 0)
-  rotation = left_up;
+  rotation = LEFT_UP;
if (strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value) == 0)
-  rotation = flipped;
+  rotation = FLIPPED;
if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value) == 0)
-  rotation = normal;
+  rotation = NORMAL;
 
free(type);
free(string_property_value);
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index cd473449f..614bdc7d3 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -10,7 +10,7 @@
 #define EFL_DBUS_ACC_IFACE "net.hadess.SensorProxy"
 
 // This enum represents the 4 states of screen rotation plus undefined
-enum screen_rotation {undefined, normal, right_up, flipped, left_up};
+enum screen_rotation {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP};
 
 typedef struct _DbusAccelerometer DbusAccelerometer;
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 27/48: Make some functions static

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 5e7fa42b8c418d6c46b9518e9444ab1d31d7e7e2
Author: rafspiny 
AuthorDate: Thu Aug 10 11:37:27 2023 +0200

Make some functions static
---
 src/modules/convertible/dbus_acceleration.c | 34 +++-
 src/modules/convertible/dbus_acceleration.h | 35 -
 src/modules/convertible/e_mod_config.h  |  5 -
 3 files changed, 29 insertions(+), 45 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 3325d50af..2a33c25c1 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -8,7 +8,7 @@
 #include "e_mod_main.h"
 #include "input_rotation.h"
 
-DbusAccelerometer* accelerometer_dbus;
+static DbusAccelerometer* accelerometer_dbus;
 
 DbusAccelerometer*
 sensor_proxy_init(void)
@@ -80,7 +80,10 @@ _convertible_rotation_get(const enum screen_rotation orientation);
 int
 _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator);
 
-Eldbus_Proxy *
+/**
+ * Helper to get the interface
+ * */
+statis Eldbus_Proxy *
 get_dbus_interface(const char *IFACE)
 {
DBG("Working on interface: %s", IFACE);
@@ -208,7 +211,13 @@ _access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
return res;
 }
 
-void
+/**
+ * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
+ * @param data DbusAccelerometer
+ * @param msg The message
+ * @param pending
+ */
+static void
 on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {
const char *errname, *errmsg;
@@ -425,7 +434,14 @@ _fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
}
 }
 
-void
+/**
+ * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS
+ * interface net.hadess.SensorProxy
+ * @param data not used
+ * @param msg The message
+ * @param pending
+ */
+ static void
 on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {
const char *errname, *errmsg;
@@ -439,7 +455,15 @@ on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldb
INF("Accelerometer claimed");
 }
 
-void
+
+/**
+ * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
+ * interface net.hadess.SensorProxy
+ * @param data not used
+ * @param msg The message
+ * @param pending
+ */
+static void
 on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {
const char *errname, *errmsg;
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index db2fe5a18..2724c1914 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -32,21 +32,6 @@ DbusAccelerometer* sensor_proxy_init(void);
 void
 sensor_proxy_shutdown(void);
 
-/**
- * Helper to get the interface
- * */
-Eldbus_Proxy *
-get_dbus_interface(const char *IFACE);
-
-/**
- * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
- * @param data DbusAccelerometer
- * @param msg The message
- * @param pending
- */
-void
-on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
-
 /**
  * Callback definition to handle the request of the accelerometer property of DBUS interface net.hadess.SensorProxy
  * @param data DbusAccelerometer
@@ -55,24 +40,4 @@ on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_P
  */
 void
 on_accelerometer_orientation(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
-
-/**
- * Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS
- * interface net.hadess.SensorProxy
- * @param data not used
- * @param msg The message
- * @param pending
- */
-void
-on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
-
-/**
- * Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
- * interface net.hadess.SensorProxy
- * @param data not used
- * @param msg The message
- * @param pending
- */
-void
-on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
 #endif
diff --git a/src/modules/convertible/e_mod_config.h b/src/modules/convertible/e_mod_config.h
index 7e65bc7ac..ebd8d937a 100644
--- a/src/modules/convertible/e_mod_config.h
+++ b/src/modules/convertible/e_mod_config.h
@@ -40,10 +40,5 @@ void
 econvertible_config_init(void);
 void
 

[EGIT] [enlightenment] 04/48: Updating french and portuguese translations

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit c9bf720f9e26ecdc52e0384d036ce4e73324c2b3
Author: Massimo Maiurana 
AuthorDate: Wed Jan 24 11:05:21 2024 +0100

Updating french and portuguese translations
---
 po/fr.po |  9 -
 po/pt.po | 31 +++
 2 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index 3c8a3efeb..f48d1d4de 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -12,14 +12,14 @@
 # rustyBSD , 2012.
 # Raoul Hecky , 2012.
 # Eliovir , 2013.
-# similar , 2019, 2020, 2021, 2022, 2023.
+# similar , 2019, 2020, 2021, 2022, 2023, 2024.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: enlightenment\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2024-01-23 21:51+0100\n"
-"PO-Revision-Date: 2023-12-26 17:27+0100\n"
+"PO-Revision-Date: 2024-01-24 08:37+0100\n"
 "Last-Translator: Philippe Jean Guillaumie \n"
 "Language-Team: French\n"
 "Language: fr\n"
@@ -54,17 +54,16 @@ msgid "Enlightenment"
 msgstr "Enlightenment"
 
 #: src/bin/e_about.c:26
-#, fuzzy
 msgid ""
 "Copyright  2000-2024, by the Enlightenment Development TeamWe hope you enjoy using this software as much as we enjoyed "
 "writing it.To contact us please visit:http://www."
 "enlightenment.org"
 msgstr ""
-"Copyright  2000-2022, par l'équipe de développement "
+"Copyright  2000-2024, par l'équipe de développement "
 "d'EnlightenmentNous espérons que vous aurez autant de plaisir à "
 "utiliser ce logiciel que nous en avons eu à l'écrire.Pour nous "
-"contacter, visitez :http://www.enlightenment.org"
+"contacter, visitez :https://www.enlightenment.org"
 
 #: src/bin/e_about.c:69
 msgid "The Team"
diff --git a/po/pt.po b/po/pt.po
index f9a0fe6bc..07ee8e974 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -9,7 +9,7 @@ msgstr ""
 "Project-Id-Version: enlightenment\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2024-01-23 21:51+0100\n"
-"PO-Revision-Date: 2023-12-26 23:01+\n"
+"PO-Revision-Date: 2024-01-24 00:12+\n"
 "Last-Translator: Hugo Carvalho \n"
 "Language-Team: Portuguese\n"
 "Language: pt\n"
@@ -44,16 +44,15 @@ msgid "Enlightenment"
 msgstr "Enlightenment"
 
 #: src/bin/e_about.c:26
-#, fuzzy
 msgid ""
 "Copyright  2000-2024, by the Enlightenment Development TeamWe hope you enjoy using this software as much as we enjoyed "
 "writing it.To contact us please visit:http://www."
 "enlightenment.org"
 msgstr ""
-"Direitos de autor  2000-2022, pela equipa de desenvolvimento do "
+"Direitos de autor  2000-2024, pela equipa de desenvolvimento do "
 "EnlightenmentEsperamos que goste de utilizar este software, "
-"tanto como nós gostamos de a desenvolver.Para nos contactar, "
+"tanto como nós gostamos de o desenvolver.Para nos contactar, "
 "visite:http://www.enlightenment.org"
 
 #: src/bin/e_about.c:69
@@ -4855,7 +4854,7 @@ msgstr "Ignorar automaticamente em..."
 #: src/modules/conf_window_manipulation/e_int_config_window_process.c:101
 #, c-format
 msgid "%1.0f s"
-msgstr "%1.0f seg."
+msgstr "%1.0f s"
 
 #: src/modules/battery/e_mod_config.c:274
 msgid "Alert"
@@ -6356,7 +6355,7 @@ msgstr "Limite para aplicar o impulso do arrastamento"
 #: src/modules/conf_interaction/e_int_config_interaction.c:113
 #, c-format
 msgid "%1.0f pixels/s"
-msgstr "%1.0f pixéis/seg."
+msgstr "%1.0f pixéis/s"
 
 #: src/modules/conf_interaction/e_int_config_interaction.c:119
 msgid "Friction slowdown"
@@ -6366,7 +6365,7 @@ msgstr "Atraso da fricção"
 #: src/modules/conf_performance/e_int_config_powermanagement.c:247
 #, c-format
 msgid "%1.2f s"
-msgstr "%1.2f seg."
+msgstr "%1.2f s"
 
 #: src/modules/conf_interaction/e_int_config_mouse.c:62
 msgid "Mouse Settings"
@@ -6680,7 +6679,7 @@ msgstr "Velocidade da deslocação do menu"
 #: src/modules/conf_menus/e_int_config_menus.c:304
 #, c-format
 msgid "%5.0f pixels/s"
-msgstr "%5.0f pixéis/seg."
+msgstr "%5.0f pixéis/s"
 
 #: src/modules/conf_menus/e_int_config_menus.c:307
 msgid "Fast Mouse Move Threshold"
@@ -6690,7 +6689,7 @@ msgstr "Limite para a deslocação rápida do rato"
 #: src/modules/conf_window_manipulation/e_int_config_window_display.c:207
 #, c-format
 msgid "%4.0f pixels/s"
-msgstr "%4.0f pixéis/seg."
+msgstr "%4.0f pixéis/s"
 
 #: src/modules/conf_menus/e_int_config_menus.c:312
 msgid "Click Drag Timeout"
@@ -6699,7 +6698,7 @@ msgstr "Intervalo para clique e arrastamento"
 #: src/modules/conf_menus/e_int_config_menus.c:314
 #, c-format
 msgid "%2.2f s"
-msgstr "%2.2f seg."
+msgstr "%2.2f s"
 
 #: src/modules/conf_menus/e_int_config_menus.c:317
 #: src/modules/conf_window_manipulation/e_int_config_focus.c:377
@@ -6809,7 +6808,7 @@ msgstr "exemplo: Gravar no disco"
 #: src/modules/syscon/e_int_config_syscon.c:176
 #, c-format
 msgid "%1.1f s"
-msgstr "%1.1f seg."
+msgstr "%1.1f s"
 
 #: src/modules/conf_performance/e_int_config_powermanagement.c:239
 #: src/modules/notification/e_mod_config.c:102
@@ -6825,7 +6824,7 

[EGIT] [enlightenment] 07/48: notification - timeout - handling was jut broken - fix

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 5a5059b058ec0a64ea8c691c5364c3d3388bcd8c
Author: Carsten Haitzler 
AuthorDate: Fri Feb 9 18:09:59 2024 +

notification - timeout - handling was jut broken - fix

this totally didnt' get timeout was in ms - it mis-handled setting the
value thinking it was  double or float - it wasn't.. this fixes it.

Fixes #63

@fix
---
 src/modules/notification/e_mod_popup.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/modules/notification/e_mod_popup.c b/src/modules/notification/e_mod_popup.c
index 967c6b167..17e6f6b09 100644
--- a/src/modules/notification/e_mod_popup.c
+++ b/src/modules/notification/e_mod_popup.c
@@ -160,12 +160,13 @@ notification_popup_notify(E_Notification_Notify *n,
E_FREE_FUNC(popup->timer, ecore_timer_del);
 
if (n->timeout < 0 || notification_cfg->force_timeout)
-  n->timeout = notification_cfg->timeout;
-   else n->timeout = n->timeout / 1000.0;
+  n->timeout = notification_cfg->timeout * 1000.0;
 
 
if (n->timeout > 0)
- popup->timer = ecore_timer_loop_add(n->timeout, (Ecore_Task_Cb)_notification_timer_cb, popup);
+ popup->timer = ecore_timer_loop_add((double)n->timeout / 1000.0,
+ (Ecore_Task_Cb)_notification_timer_cb,
+ popup);
 }
 
 void


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 09/48: wl - put in hardcoded 16x16 image for wl logo if file not found

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit efe2f7b267bef5619bca6bd59f86c5aa41721f49
Author: Carsten Haitzler 
AuthorDate: Mon Mar 4 20:18:37 2024 +

wl - put in hardcoded 16x16 image for wl logo if file not found

if someone has removed the wl logo png file or it fails to load - use
a hardcoded low res 16x16 image data set instead of the wl logo. this
way we have a watermark that works so we know it's wayland or not.
---
 src/modules/wl_drm/e_mod_main.c | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index 060fa702e..8b5419089 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -1019,11 +1019,49 @@ e_modapi_init(E_Module *m)
  {
 Evas_Object *o;
 char buf[PATH_MAX];
+int iw = 0, ih = 0;
+#define ARGB(a, r, g, b) ((a << 24) | (r << 16) | (g << 8) | b)
+#define B ARGB(  0,   0,   0,   0),
+#define W ARGB(255, 255, 255, 255),
+#define O ARGB(255, 255, 188,   0),
+unsigned int *idata;
+static const unsigned int wllogo[16 * 16] =
+  {
+ B B B B B B B B B B B B B B B B
+ B B B B B B O O O O B B B B B B
+ B B B W O O O O O O O O B B B B
+ B B B W W O O O O O O O W B B B
+ B B O W W O O O O O O O W W B B
+ B B O W W O O W W O O O W W B B
+ B O O W W W O W W O O W W O O B
+ B O O W W W W W W W O W W O O B
+ B O O W W W W W W W O W W O O B
+ B O O W W W W O W W W W W O O B
+ B B O W W W W O O W W W W O B B
+ B B O W W W W O O W W W O O B B
+ B B B O W W W O O W W W O B B B
+ B B B B O W O O O W W O B B B B
+ B B B B B B O O O O B B B B B B
+ B B B B B B B B B B B B B B B B
+  };
 
 o = evas_object_image_filled_add(ecore_evas_get(e_comp->ee));
 evas_object_name_set(o, "__e_wl_watermark");
 e_prefix_data_concat_static(buf, "data/images/wayland.png");
 evas_object_image_file_set(o, buf, NULL);
+evas_object_image_size_get(o, , );
+if ((iw <= 1) && (ih <= 1))
+  { // someonme removed the watermark - use low res hardcoded logo
+ evas_object_image_alpha_set(o, EINA_TRUE);
+ evas_object_image_size_set(o, 16, 16);
+ idata = evas_object_image_data_get(o, EINA_TRUE);
+ if (idata)
+   {
+  memcpy(idata, wllogo, 16 * 16 * sizeof(unsigned int));
+  evas_object_image_data_set(o, idata);
+  evas_object_image_data_update_add(o, 0, 0, 16, 16);
+  }
+  }
 evas_object_move(o, w - 40 - 16, 16);
 evas_object_resize(o, 40, 40);
 evas_object_pass_events_set(o, EINA_TRUE);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 21/48: More readable strcmp in ifs

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit fc30c75946b5b15226e394b8c40eb702ff56fd59
Author: rafspiny 
AuthorDate: Thu Aug 3 12:29:00 2023 +0200

More readable strcmp in ifs
---
 src/modules/convertible/dbus_acceleration.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index e2be711a8..660f886d1 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -149,13 +149,13 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
}
 
enum screen_rotation rotation = UNDEFINED;
-   if (strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_RIGHT, *string_property_value))
   rotation = RIGHT_UP;
-   if (strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_LEFT, *string_property_value))
   rotation = LEFT_UP;
-   if (strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, *string_property_value))
   rotation = FLIPPED;
-   if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value) == 0)
+   if (!strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value))
   rotation = NORMAL;
 
free(type);
@@ -329,7 +329,7 @@ _fetch_X_device_input_number(void)
iterator = property_name;
for (int i=0; i-  if (strcmp(*iterator, CTM_name) == 0)
+  if (!strcmp(*iterator, CTM_name))
   {
 	 dev_number = dev_counter;
  DBG("Setting device: %d", dev_number);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 48/48: attempt to dlopen libddcutil.so.5 first

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 9c4b44233555a6506b0a78e3b7274291da5fbb9b
Author: Ross Vandegrift 
AuthorDate: Sun Mar 24 21:21:15 2024 -0700

attempt to dlopen libddcutil.so.5 first

The backwards-incompatible changes in libddcutil.so.5 are documented at
https://www.ddcutil.com/c_api_200/ - a quick grep says that the only affected
symbol appearing in E is ddca_set_global_sleep_multiplier (which is already
optional).

This change does not make any of the changes suggested in the "Library
Initialization" section of the above doc.
---
 src/bin/system/e_system_ddc.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/bin/system/e_system_ddc.c b/src/bin/system/e_system_ddc.c
index 7b12fc5f4..f06ea2c93 100644
--- a/src/bin/system/e_system_ddc.c
+++ b/src/bin/system/e_system_ddc.c
@@ -304,9 +304,14 @@ err:
 static Eina_Bool
 _ddc_init(void)
 {
-   // .so.3 is ABI compatible twith .so.2 for out uses - see
-   // https://www.ddcutil.com/c_api_99/ for changes between them
-   ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
+   // .so.[345] are ABI compatible with .so.2 for our uses - see
+   // the changes listed at:
+   // - https://www.ddcutil.com/c_api_99/
+   // - https://www.ddcutil.com/c_api_120/
+   // - https://www.ddcutil.com/c_api_200/
+   ddc_lib = dlopen("libddcutil.so.5", RTLD_NOW | RTLD_LOCAL);
+   if (!ddc_lib)
+ ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
  ddc_lib = dlopen("libddcutil.so.3", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 15/48: Removed dbus initialization

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 3c3a1ac60387a33e34ca41766d5cf89008e53841
Author: rafspiny 
AuthorDate: Wed Aug 2 21:56:51 2023 +0200

Removed dbus initialization
---
 src/modules/convertible/dbus_acceleration.c | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 9d98ff1ce..badee37a3 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -24,14 +24,7 @@ sensor_proxy_init()
 
// The next line is probably redundant
accelerometer_dbus->orientation = undefined;
-
-   DBG("Before eldbus initialization");
-   int initialization = eldbus_init();
-   if (initialization == EXIT_FAILURE)
-   {
-  ERR("Unable to initialise ELDBUS");
-   }
-
+   
INF("Getting dbus interfaces");
accelerometer_dbus->sensor_proxy = get_dbus_interface(EFL_DBUS_ACC_IFACE);
accelerometer_dbus->sensor_proxy_properties = get_dbus_interface(ELDBUS_FDO_INTERFACE_PROPERTIES);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 46/48: Adding french comment and updating italian

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 5e25ae24f825c8884a0686a7bf975e62b3c3c422
Author: Massimo Maiurana 
AuthorDate: Thu Mar 14 18:49:10 2024 +0100

Adding french comment and updating italian
---
 src/modules/convertible/module.desktop | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/convertible/module.desktop b/src/modules/convertible/module.desktop
index a86d3199a..30b860fee 100644
--- a/src/modules/convertible/module.desktop
+++ b/src/modules/convertible/module.desktop
@@ -3,6 +3,7 @@ Type=Link
 Name=E-convertible
 GenericName=E-convertible
 Comment=Helps to manage screen rotation based on accelerometer
-Comment[it]=Aiuta a gestire la rotazione dello schermo basandosi sui dati dell'accelerometro
+Comment[fr]=Permet de gérer la rotation de l'écran en fonction de l'accéléromètre.
+Comment[it]=Consente di gestire la rotazione dello schermo usando l'accelerometro
 Icon=e-module-convertible
 X-Enlightenment-ModuleType=system


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 08/48: desklock - fix kbd layout set for desklock so it works

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit ed64f9e0b8cb9d9c33f79d0be873e40b20a965ce
Author: Carsten Haitzler 
AuthorDate: Sat Feb 24 20:43:03 2024 +

desklock - fix kbd layout set for desklock so it works

e just didn't store the kbd layout - set it up if it is not on desklock
based on layout name stored.

@fix
---
 src/bin/e_desklock.c | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index be68f8290..a80854559 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -278,6 +278,28 @@ _desklock_show_internal(Eina_Bool suspend)
if (e_config->desklock_language)
  e_intl_language_set(e_config->desklock_language);
 
+   if ((e_config->xkb.lock_layout) && (e_config->xkb.desklock_layout))
+ {
+if ((!e_config->xkb.lock_layout->name) ||
+(!!strcmp(e_config->xkb.lock_layout->name, e_config->xkb.desklock_layout)))
+  {
+ e_config_xkb_layout_free(e_config->xkb.lock_layout);
+ e_config->xkb.lock_layout = NULL;
+  }
+ }
+   if ((e_config->xkb.desklock_layout) && (!e_config->xkb.lock_layout))
+ {
+E_Config_XKB_Layout *cl;
+
+EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl)
+  {
+if ((cl->name) && (!strcmp(cl->name, e_config->xkb.desklock_layout)))
+  {
+ e_config->xkb.lock_layout = e_config_xkb_layout_dup(cl);
+ break;
+  }
+  }
+ }
if (e_config->xkb.lock_layout)
  e_xkb_layout_set(e_config->xkb.lock_layout);
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 43/48: Remove unused code

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 5efba6f8a32ef290edcbc88f3f0fa4a8564c0518
Author: rafspiny 
AuthorDate: Tue Jan 23 22:21:21 2024 +0100

Remove unused code
---
 src/modules/convertible/e-gadget-convertible.c | 8 
 src/modules/convertible/e-gadget-convertible.h | 5 +++--
 src/modules/convertible/e_mod_config.h | 1 -
 src/modules/convertible/e_mod_main.c   | 1 -
 4 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/modules/convertible/e-gadget-convertible.c b/src/modules/convertible/e-gadget-convertible.c
index a00edefef..3dc83f028 100644
--- a/src/modules/convertible/e-gadget-convertible.c
+++ b/src/modules/convertible/e-gadget-convertible.c
@@ -5,9 +5,6 @@
 #include "e-gadget-convertible.h"
 #include "e_mod_main.h"
 
-/* LIST OF INSTANCES */
-static Eina_List *instances = NULL;
-
 static void
 _update_instances(const Instance *current_instance)
 {
@@ -45,8 +42,3 @@ _keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const
 {
DBG("Keyboard: Signal %s received from %s", sig, src);
 }
-
-void
-update_instances(Eina_List *new_instances) {
-   instances = new_instances;
-}
diff --git a/src/modules/convertible/e-gadget-convertible.h b/src/modules/convertible/e-gadget-convertible.h
index 02f911d7e..ba0976f9c 100644
--- a/src/modules/convertible/e-gadget-convertible.h
+++ b/src/modules/convertible/e-gadget-convertible.h
@@ -8,6 +8,9 @@
 #ifndef E_GADGET_CONVERTIBLE_E_GADGET_CONVERTIBLE_H
 #define E_GADGET_CONVERTIBLE_E_GADGET_CONVERTIBLE_H
 
+/* LIST OF INSTANCES */
+Eina_List *instances = NULL;
+
 /* gadcon callback for actions */
 void
 _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
@@ -15,8 +18,6 @@ _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EI
 void
 _keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
 
-void
-update_instances(Eina_List *instances);
 /* end gadcon callback for actions */
 
 
diff --git a/src/modules/convertible/e_mod_config.h b/src/modules/convertible/e_mod_config.h
index 2e0b98ea9..9f424ab19 100644
--- a/src/modules/convertible/e_mod_config.h
+++ b/src/modules/convertible/e_mod_config.h
@@ -18,7 +18,6 @@ typedef struct _Convertible_Config Convertible_Config;
 struct _Convertible_Config
 {
int version;
-   E_Module *module;
int disable_keyboard_on_rotation;
 };
 
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 9660c057e..03a3c1920 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -74,7 +74,6 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
instance->o_button = evas_object;
 
instances = eina_list_append(instances, instance);
-   update_instances(instances);
 
gcc = e_gadcon_client_new(gc, name, id, style, evas_object);
gcc->data = ""


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 25/48: Forgot to update reference to renamed enum values

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 5b042e08e23880e75c4f1257193c60caa67a0364
Author: rafspiny 
AuthorDate: Thu Aug 3 21:56:29 2023 +0200

Forgot to update reference to renamed enum values
---
 src/modules/convertible/dbus_acceleration.c| 2 +-
 src/modules/convertible/dbus_acceleration.h| 2 +-
 src/modules/convertible/e-gadget-convertible.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 62232aa62..98d671a62 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -23,7 +23,7 @@ sensor_proxy_init(void)
EINA_SAFETY_ON_NULL_RETURN_VAL(accelerometer_dbus, NULL);
 
// The next line is probably redundant
-   accelerometer_dbus->orientation = undefined;
+   accelerometer_dbus->orientation = UNDEFINED;
 
INF("Getting dbus interfaces");
accelerometer_dbus->sensor_proxy = get_dbus_interface(EFL_DBUS_ACC_IFACE);
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index 62c1d72b8..db2fe5a18 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -9,7 +9,7 @@
 #define EFL_DBUS_ACC_PATH "/net/hadess/SensorProxy"
 #define EFL_DBUS_ACC_IFACE "net.hadess.SensorProxy"
 
-// This enum represents the 4 states of screen rotation plus undefined
+// This enum represents the 4 states of screen rotation plus UNDEFINED
 enum screen_rotation {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP};
 
 typedef struct _DbusAccelerometer DbusAccelerometer;
diff --git a/src/modules/convertible/e-gadget-convertible.c b/src/modules/convertible/e-gadget-convertible.c
index c2dcd03a4..03e5f4572 100644
--- a/src/modules/convertible/e-gadget-convertible.c
+++ b/src/modules/convertible/e-gadget-convertible.c
@@ -8,7 +8,7 @@
 /* LIST OF INSTANCES */
 static Eina_List *instances = NULL;
 
-void
+static void
 _update_instances(const Instance *current_instance)
 {
 Eina_List *l;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 37/48: Fix icon

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit bb379144924ae04aca59c10039a1e7a4d3c01c77
Author: rafspiny 
AuthorDate: Fri Aug 25 19:43:37 2023 +0200

Fix icon
---
 src/modules/convertible/e_mod_config.c | 16 
 src/modules/convertible/e_mod_config.h | 12 +---
 src/modules/convertible/e_mod_main.c   | 26 +++---
 3 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/src/modules/convertible/e_mod_config.c b/src/modules/convertible/e_mod_config.c
index b93cc9fba..d0ae47d59 100644
--- a/src/modules/convertible/e_mod_config.c
+++ b/src/modules/convertible/e_mod_config.c
@@ -6,8 +6,8 @@
 #include "e_mod_config.h"
 
 static Convertible_Config *_config = NULL;
-E_Config_DD *edd = NULL;
-EINTERN Convertible_Config *convertible_config;
+E_Config_DD *config_edd = NULL;
+extern Convertible_Config *convertible_config;
 
 /**
  * Create the config structure
@@ -20,10 +20,10 @@ _econvertible_config_dd_new(void)
 //   E_CONFIG_VAL(c_zone, Convertible_Zone_Config, follow_rotation, INT);
 
// TODO Not sure what his line does. Apparently, it is needed to specify the type of the configuration data structure
-   edd = E_CONFIG_DD_NEW("Convertible_Config", Convertible_Config);
+   config_edd = E_CONFIG_DD_NEW("Convertible_Config", Convertible_Config);
 
-   E_CONFIG_VAL(edd, Convertible_Config, disable_keyboard_on_rotation, INT);
-//   E_CONFIG_LIST(edd, Convertible_Config, rotatable_screen_configuration, c_zone);
+   E_CONFIG_VAL(config_edd, Convertible_Config, disable_keyboard_on_rotation, INT);
+//   E_CONFIG_LIST(config_edd, Convertible_Config, rotatable_screen_configuration, c_zone);
 }
 
 /**
@@ -35,7 +35,7 @@ _config_set(Convertible_Config *config)
 {
DBG("config_set disable_keyboard_on_rotation %d", config->disable_keyboard_on_rotation);
_config->disable_keyboard_on_rotation = config->disable_keyboard_on_rotation;
-   e_config_domain_save("module.convertible", edd, config);
+   e_config_domain_save("module.convertible", config_edd, config);
 }
 
 /**
@@ -142,7 +142,7 @@ void
 econvertible_config_init(void)
 {
_econvertible_config_dd_new();
-   _config = e_config_domain_load("module.econvertible", edd);
+   _config = e_config_domain_load("module.econvertible", config_edd);
if (!_config)
{
   _config = E_NEW(Convertible_Config, 1);
@@ -155,6 +155,6 @@ econvertible_config_init(void)
 
 void econvertible_config_shutdown(void)
 {
-   E_CONFIG_DD_FREE(edd);
+   E_CONFIG_DD_FREE(config_edd);
E_FREE(convertible_config);
 }
\ No newline at end of file
diff --git a/src/modules/convertible/e_mod_config.h b/src/modules/convertible/e_mod_config.h
index ebd8d937a..0af443795 100644
--- a/src/modules/convertible/e_mod_config.h
+++ b/src/modules/convertible/e_mod_config.h
@@ -7,22 +7,12 @@
 #ifndef E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H
 #define E_GADGET_CONVERTIBLE_E_MOD_CONFIG_H
 
-// Definition for a zone configuration
-typedef struct _Convertible_Zone_Config Convertible_Zone_Config;
-
-struct _Convertible_Zone_Config
-{
-   char *name;
-   int follow_rotation;
-};
-
 // Definition of the data structure to hold the gadget configuration
 typedef struct _Convertible_Config Convertible_Config;
-
 struct _Convertible_Config
 {
+   E_Module *module;
int disable_keyboard_on_rotation;
-//   Eina_List *rotatable_screen_configuration;
 };
 
 // As far as I understand, this structure should hold data useful for the configuration and a pointer to
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index ee87184b4..d8126c7f5 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -17,8 +17,9 @@ E_Module *convertible_module;
 Instance *inst;
 
 // Configuration
-extern Convertible_Config *convertible_config;
-extern E_Config_DD *edd;
+extern Convertible_Config *convertible_config = NULL;
+static E_Config_DD *conf_edd = NULL;
+Convertible_Config *conf = NULL;
 
 // Logger
 int _convertible_log_dom;
@@ -34,6 +35,9 @@ E_API E_Module_Api e_modapi =
 /* LIST OF INSTANCES */
 static Eina_List *instances = NULL;
 
+/* Other functions for configuration */
+static void _conf_new(void);
+static void _conf_free(void);
 
 /* gadcon requirements */
 static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
@@ -217,7 +221,7 @@ _gc_icon(const E_Gadcon_Client_Class *client_class EINA_UNUSED, Evas *evas)
 
o = edje_object_add(evas);
snprintf(buf, sizeof(buf), "%s/e-module-convertible.edj", convertible_module->dir);
-   edje_object_file_set(o, buf, "main");
+   edje_object_file_set(o, buf, "icon");
return o;
 }
 
@@ -257,8 +261,8 @@ e_modapi_init(E_Module *m)
 {
// Initialise the logger
_convertible_log_dom = eina_log_domain_register("convertible", EINA_COLOR_LIGHTBLUE);
-

[EGIT] [enlightenment] 45/48: Use proper icon

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 3def50bd6a2e172ec18ad0569ad812d8e948ebc8
Author: rafspiny 
AuthorDate: Sun Feb 4 13:02:05 2024 +0100

Use proper icon

Add icon to edj file

Correct icon

Enable sync for edje keyboard lock/unlock
Fix keyboard signals in icon
Using the correct part from the edje
---
 src/modules/convertible/e-gadget-convertible.c   |  23 +--
 src/modules/convertible/e-module-convertible.edj | Bin 11127 -> 15359 bytes
 src/modules/convertible/e_mod_main.c |   4 ++--
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/modules/convertible/e-gadget-convertible.c b/src/modules/convertible/e-gadget-convertible.c
index 83ae074e7..14ba9db80 100644
--- a/src/modules/convertible/e-gadget-convertible.c
+++ b/src/modules/convertible/e-gadget-convertible.c
@@ -17,9 +17,15 @@ _update_instances(const Instance *current_instance)
 {
 instance->locked_position = current_instance->locked_position;
 if (instance->locked_position == EINA_TRUE)
-edje_object_signal_emit(instance->o_button, "lock,rotation,icon", "convertible/tablet");
+edje_object_signal_emit(instance->o_button, "e,lock,rotation,icon", "convertible/tablet");
 else
-edje_object_signal_emit(instance->o_button, "unlock,rotation,icon", "convertible/tablet");
+edje_object_signal_emit(instance->o_button, "e,unlock,rotation,icon", "convertible/tablet");
+
+	instance->disabled_keyboard = current_instance->disabled_keyboard;
+if (instance->disabled_keyboard == EINA_TRUE)
+edje_object_signal_emit(instance->o_button, "e,disable,keyboard,icon", "convertible/input");
+else
+edje_object_signal_emit(instance->o_button, "e,enable,keyboard,icon", "convertible/input");
 }
 }
 }
@@ -28,11 +34,10 @@ void
 _rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
  const char *src EINA_UNUSED)
 {
-   DBG("Rotation: Signal %s received from %s", sig, src);
Instance *inst = data;
-   if (eina_str_has_prefix(sig, "unlock"))
+   if (eina_str_has_prefix(sig, "e,unlock"))
   inst->locked_position = EINA_FALSE;
-   if (eina_str_has_prefix(sig, "lock"))
+   if (eina_str_has_prefix(sig, "e,lock"))
   inst->locked_position = EINA_TRUE;
_update_instances(inst);
 }
@@ -41,5 +46,11 @@ void
 _keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
  const char *src EINA_UNUSED)
 {
-   DBG("Keyboard: Signal %s received from %s", sig, src);
+   Instance *inst = data;
+   if (eina_str_has_prefix(sig, "e,enable,keyboard"))
+  inst->disabled_keyboard = EINA_FALSE;
+   if (eina_str_has_prefix(sig, "e,disable,keyboard"))
+  inst->disabled_keyboard = EINA_TRUE;
+   _update_instances(inst);
+
 }
diff --git a/src/modules/convertible/e-module-convertible.edj b/src/modules/convertible/e-module-convertible.edj
old mode 100755
new mode 100644
index 0fb2f9b06..74f653d31
Binary files a/src/modules/convertible/e-module-convertible.edj and b/src/modules/convertible/e-module-convertible.edj differ
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index d4a347d89..cedcf400d 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -85,8 +85,8 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
 INF("Adding callback for creation and other events from EDJE");
 edje_object_signal_callback_add(evas_object, "e,lock,rotation", "tablet", _rotation_signal_cb, instance);
 edje_object_signal_callback_add(evas_object, "e,unlock,rotation", "tablet", _rotation_signal_cb, instance);
-edje_object_signal_callback_add(evas_object, "e,enable,keyboard", "keyboard", _keyboard_signal_cb, instance);
-edje_object_signal_callback_add(evas_object, "e,disable,keyboard", "keyboard", _keyboard_signal_cb, instance);
+edje_object_signal_callback_add(evas_object, "e,enable,keyboard", "input", _keyboard_signal_cb, instance);
+edje_object_signal_callback_add(evas_object, "e,disable,keyboard", "input", _keyboard_signal_cb, instance);
 
 inst->o_button = evas_object;
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 39/48: Fix icon and translate strign

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 16bf105f3408ea6d48c90f338e6a4e50eb6181f3
Author: rafspiny 
AuthorDate: Sun Dec 31 15:01:18 2023 +0100

Fix icon and translate strign
---
 src/modules/convertible/dbus_acceleration.c |  6 +++---
 src/modules/convertible/e_mod_config.c  |  2 +-
 src/modules/convertible/e_mod_main.c| 10 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 1483d984d..9ab21b771 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -348,8 +348,8 @@ sensor_proxy_init(void)
accelerometer_dbus->orientation = UNDEFINED;
 
INF("Getting dbus interfaces");
-   accelerometer_dbus->sensor_proxy = get_dbus_interface(EFL_DBUS_ACC_IFACE);
-   accelerometer_dbus->sensor_proxy_properties = get_dbus_interface(ELDBUS_FDO_INTERFACE_PROPERTIES);
+   accelerometer_dbus->sensor_proxy = _get_dbus_interface(EFL_DBUS_ACC_IFACE);
+   accelerometer_dbus->sensor_proxy_properties = _get_dbus_interface(ELDBUS_FDO_INTERFACE_PROPERTIES);
if (accelerometer_dbus->sensor_proxy == NULL)
{
   ERR("Unable to get the proxy for interface %s", EFL_DBUS_ACC_IFACE);
@@ -430,7 +430,7 @@ _access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant
}
 
const char *string_property_value;
-   if (!eldbus_message_iter_arguments_get(variant, "s", _property_value))
+   if (!eldbus_message_iter_arguments_get(*variant, "s", _property_value))
{
   WARN("error in eldbus_message_iter_arguments_get()");
}
diff --git a/src/modules/convertible/e_mod_config.c b/src/modules/convertible/e_mod_config.c
index d0ae47d59..8b18a2122 100644
--- a/src/modules/convertible/e_mod_config.c
+++ b/src/modules/convertible/e_mod_config.c
@@ -7,7 +7,7 @@
 
 static Convertible_Config *_config = NULL;
 E_Config_DD *config_edd = NULL;
-extern Convertible_Config *convertible_config;
+EINTERN Convertible_Config *convertible_config;
 
 /**
  * Create the config structure
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index c1d13abac..8b4a30d08 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -18,7 +18,7 @@ Instance *inst;
 
 // Configuration
 extern Convertible_Config *convertible_config;
-extern E_Config_DD *edd;
+static E_Config_DD *config_edd;
 
 // Logger
 int _convertible_log_dom;
@@ -323,10 +323,10 @@ e_modapi_init(E_Module *m)
e_gadcon_provider_register(&_gadcon_class);
 
INF("Creating menu entries for settings");
-   e_configure_registry_category_add("extensions", 90, "Extensions", NULL,
+   e_configure_registry_category_add("extensions", 90, _("Extensions"), NULL,
  "preferences-extensions");
-   e_configure_registry_item_add("extensions/convertible", 30, "convertible", NULL,
- "preferences-desktop-convertible", e_int_config_convertible_module);
+   e_configure_registry_item_add("extensions/convertible", 30, _("Convertible"), NULL,
+ "preferences-desktop-edge-bindings", e_int_config_convertible_module);
 
instances = eina_list_append(instances, inst);
 
@@ -368,7 +368,7 @@ e_modapi_save(E_Module *m EINA_UNUSED)
 {
if (convertible_config)
{
-  e_config_domain_save("module.convertible", edd, convertible_config);
+  e_config_domain_save("module.convertible", config_edd, convertible_config);
}
return 1;
 }


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 24/48: Forgot to update reference to renamed enum values

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit fbfd52f679af59f7e4a403fddff5dfae0ee9c064
Author: rafspiny 
AuthorDate: Thu Aug 3 17:59:43 2023 +0200

Forgot to update reference to renamed enum values
---
 src/modules/convertible/dbus_acceleration.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 23318d324..62232aa62 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -264,12 +264,11 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
else
{
   Eina_List *l;
-  const char *randr_id = NULL;
+  char *randr_id = NULL;
   EINA_LIST_FOREACH(inst->randr2_ids, l, randr_id)
   {
  _fetch_and_rotate_screen(randr_id, orientation);
   }
-  free(randr_id);
}
 }
 
@@ -278,10 +277,10 @@ _convertible_rotation_get(const enum screen_rotation orientation)
 {
switch (orientation)
{
-  case normal: return 0;
-  case left_up: return 90;
-  case flipped: return 180;
-  case right_up: return 270;
+  case NORMAL: return 0;
+  case LEFT_UP: return 90;
+  case FLIPPED: return 180;
+  case RIGHT_UP: return 270;
 
   default: return 0;
}


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 16/48: Use strdup

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit d2ccd898f9e854da671401b08264dd266027d9d0
Author: rafspiny 
AuthorDate: Wed Aug 2 22:23:31 2023 +0200

Use strdup
---
 src/modules/convertible/e_mod_main.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 1d080e8d0..306655a91 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -305,12 +305,8 @@ e_modapi_init(E_Module *m)
   // Arbitrarily chosen a condition to check that rotation is enabled
   if (screen->info.can_rot_90 == EINA_TRUE)
  {
- int max_screen_length = 300;
- char *randr2_id =  malloc(sizeof(char) * max_screen_length);
- int copied_chars = eina_strlcpy(randr2_id, zone->randr2_id, max_screen_length);
- if (copied_chars > max_screen_length)
-ERR("Screen name %s has been truncated. Cannot handle screens.", randr2_id);
- if (copied_chars < 0)
+ char *randr2_id = strdup(zone->randr2_id);
+ if (randr2_id == NULL)
 ERR("Can't copy the screen name");
 
  inst->randr2_ids = eina_list_append(inst->randr2_ids, randr2_id);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 44/48: Make instances extern

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 318de512f21eaeee1e3a514f5dfe06a8d0277a37
Author: rafspiny 
AuthorDate: Sat Feb 3 16:37:56 2024 +0100

Make instances extern

WIP
---
 src/modules/convertible/e-gadget-convertible.c | 1 +
 src/modules/convertible/e-gadget-convertible.h | 2 +-
 src/modules/convertible/e_mod_main.c   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/convertible/e-gadget-convertible.c b/src/modules/convertible/e-gadget-convertible.c
index 3dc83f028..83ae074e7 100644
--- a/src/modules/convertible/e-gadget-convertible.c
+++ b/src/modules/convertible/e-gadget-convertible.c
@@ -5,6 +5,7 @@
 #include "e-gadget-convertible.h"
 #include "e_mod_main.h"
 
+
 static void
 _update_instances(const Instance *current_instance)
 {
diff --git a/src/modules/convertible/e-gadget-convertible.h b/src/modules/convertible/e-gadget-convertible.h
index ba0976f9c..fe006a3f2 100644
--- a/src/modules/convertible/e-gadget-convertible.h
+++ b/src/modules/convertible/e-gadget-convertible.h
@@ -9,7 +9,7 @@
 #define E_GADGET_CONVERTIBLE_E_GADGET_CONVERTIBLE_H
 
 /* LIST OF INSTANCES */
-Eina_List *instances = NULL;
+extern Eina_List *instances;
 
 /* gadcon callback for actions */
 void
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 03a3c1920..d4a347d89 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -32,7 +32,7 @@ E_API E_Module_Api e_modapi =
 
 
 /* LIST OF INSTANCES */
-static Eina_List *instances = NULL;
+Eina_List *instances = NULL;
 
 
 /* gadcon requirements */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 40/48: Add typedef enum

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 74cd743aa09378fd553c4dd0b891be63adcbe02f
Author: rafspiny 
AuthorDate: Sun Jan 21 19:40:25 2024 +0100

Add typedef enum

Specify no parameters on some functions
---
 src/modules/convertible/dbus_acceleration.c | 10 +-
 src/modules/convertible/dbus_acceleration.h |  8 
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 9ab21b771..d665b7421 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -12,7 +12,7 @@ static DbusAccelerometer* accelerometer_dbus;
 
 
 static int
-_convertible_rotation_get(const enum screen_rotation orientation)
+_convertible_rotation_get(const screen_rotation orientation)
 {
 switch (orientation)
 {
@@ -118,7 +118,7 @@ _fetch_X_device_input_number(void)
  * @param rotation The expected rotation
  */
 static void
-_fetch_and_rotate_screen(const char* randr_id, enum screen_rotation orientation)
+_fetch_and_rotate_screen(const char* randr_id, screen_rotation orientation)
 {
 DBG("Working on screen %s", randr_id);
 E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
@@ -402,10 +402,10 @@ sensor_proxy_shutdown(void)
  * @param variant
  * @return Enum specifying the orientation. UNDEFINED by default
  */
-static enum screen_rotation
+static screen_rotation
 _access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant)
 {
-   enum screen_rotation rotation = UNDEFINED;
+   screen_rotation rotation = UNDEFINED;
char *type = NULL;
 
if (!eldbus_message_arguments_get(msg, "v", variant))
@@ -461,7 +461,7 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
}
 
const char *errname, *errmsg;
-   enum screen_rotation orientation;
+   screen_rotation orientation;
Eldbus_Message_Iter *variant = NULL;
 
if (eldbus_message_error_get(msg, , ))
diff --git a/src/modules/convertible/dbus_acceleration.h b/src/modules/convertible/dbus_acceleration.h
index c2f864702..fcd4d2f81 100644
--- a/src/modules/convertible/dbus_acceleration.h
+++ b/src/modules/convertible/dbus_acceleration.h
@@ -10,14 +10,14 @@
 #define EFL_DBUS_ACC_IFACE "net.hadess.SensorProxy"
 
 // This enum represents the 4 states of screen rotation plus UNDEFINED
-enum screen_rotation {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP};
+typedef enum {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP} screen_rotation;
 
 typedef struct _DbusAccelerometer DbusAccelerometer;
 
 struct _DbusAccelerometer
 {
Eina_Bool has_accelerometer;
-   enum screen_rotation orientation;
+   screen_rotation orientation;
Eldbus_Proxy *sensor_proxy, *sensor_proxy_properties;
Eldbus_Pending *pending_has_orientation, *pending_orientation, *pending_acc_claim, *pending_acc_crelease;
Eldbus_Signal_Handler *dbus_property_changed_sh;
@@ -26,10 +26,10 @@ struct _DbusAccelerometer
 /**
  * Fetch the DBUS interfaces and fill the DbusAccelerometer struct
  * */
-DbusAccelerometer* sensor_proxy_init();
+DbusAccelerometer* sensor_proxy_init(void);
 
 
-void sensor_proxy_shutdown();
+void sensor_proxy_shutdown(void);
 
 void
 on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 19/48: Other minor changes

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 43b233348a7918778e597a7aca8c556ac0fe497f
Author: rafspiny 
AuthorDate: Thu Aug 3 12:22:23 2023 +0200

Other minor changes
---
 src/modules/convertible/dbus_acceleration.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 20c2f0c40..b2ea5a333 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -113,7 +113,7 @@ get_dbus_interface(const char *IFACE)
 enum screen_rotation
 access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool* result)
 {
-   const char *type = NULL;
+   char *type = NULL;
*result = EINA_TRUE;
 
if (!eldbus_message_arguments_get(msg, "v", variant))
@@ -158,7 +158,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, *string_property_value) == 0)
   rotation = normal;
 
-   free((void *) type);
+   free(type);
free(string_property_value);
return rotation;
 }
@@ -166,7 +166,7 @@ access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
 Eina_Bool
 access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
 {
-   const char *type;
+   char *type;
Eina_Bool res = EINA_TRUE;
 
if (!eldbus_message_arguments_get(msg, "v", variant))
@@ -197,7 +197,7 @@ access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, E
   WARN("error in eldbus_message_iter_arguments_get()");
   res = EINA_FALSE;
}
-   free((void *) type);
+   free(type);
return res;
 }
 
@@ -214,7 +214,7 @@ on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pend
}
 
access_bool_property(msg, , _accelerometer);
-   DbusAccelerometer *accelerometer = (DbusAccelerometer *) data;
+   DbusAccelerometer *accelerometer = data;
accelerometer->has_accelerometer = has_accelerometer;
DBG("Has Accelerometer: %d", accelerometer->has_accelerometer);
 }
@@ -266,7 +266,7 @@ on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pendi
   {
  _fetch_and_rotate_screen(randr_id, orientation);
   }
-  free((void *)randr_id);
+  free(randr_id);
}
 }
 
@@ -309,8 +309,8 @@ _fetch_X_device_input_number(void)
 {
// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
-   const char *dev_name = NULL;
-   char **property_name = NULL;
+   const char *dev_name;
+   char **property_name;
int dev_num = ecore_x_input_device_num_get();
int dev_number = -1;
 


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [enlightenment] 22/48: Syntax sugar in for loops

2024-04-03 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.


View the commit online.
commit 095e14f4390996307a29f7948faea63ee58fbfbd
Author: rafspiny 
AuthorDate: Thu Aug 3 12:31:01 2023 +0200

Syntax sugar in for loops
---
 src/modules/convertible/dbus_acceleration.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 660f886d1..0ffbc0441 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -314,7 +314,7 @@ _fetch_X_device_input_number(void)
int dev_num = ecore_x_input_device_num_get();
int dev_number = -1;
 
-   for (int dev_counter=0; dev_counter+   for (int dev_counter = 0; dev_counter < dev_num; dev_counter++)
{
   dev_name = ecore_x_input_device_name_get(dev_counter);
   // Less horrible hack that relies on the presence of a property containing the work Calibration
@@ -327,7 +327,7 @@ _fetch_X_device_input_number(void)
if (is_correct_device == EINA_FALSE)
   continue;
iterator = property_name;
-   for (int i=0; i+   for (int i = 0; i < num_properties; i++)
{
   if (!strcmp(*iterator, CTM_name))
   {
@@ -346,7 +346,7 @@ _is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
 {
// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
int is_correct_device = EINA_FALSE;
-   for (int i=0; i+   for (int i = 0; i < num_properties; i++)
{
   if (strstr(*iterator, "libinput Calibration Matrix"))
  is_correct_device = EINA_TRUE;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





  1   2   3   4   5   6   7   8   9   10   >