Compare commits

...

61 Commits

Author SHA1 Message Date
Daniel Zaoui eb3ddfea13 Adapt code to latest EFL changes 7 years ago
Daniel Zaoui d78598d7cd Normalize opcodes strings 7 years ago
Daniel Zaoui 3bf1b09eea Use int instead of uint32_t 7 years ago
Avi Levin 6635243951 Renaming elementary debug module to eo debug 7 years ago
Daniel Zaoui eddd35e669 Remove Debug Client 7 years ago
Daniel Zaoui ea503ffbad Fix script formatting when extracted from entry 7 years ago
Daniel Zaoui f178802f0b Revert "Adding screenshot support" 7 years ago
Daniel Zaoui 8cabd2b4fd Remote shell: add support to scripts 7 years ago
Avi Levin a517c9a522 Adding screenshot support 7 years ago
Daniel Zaoui eb055acb19 Use Base16 codec on shell remote 7 years ago
Daniel Zaoui 6908cd0f20 Support shell remote 7 years ago
Daniel Zaoui 6abb5cab36 Rewrite screenshot icon creation by using Erigo 7 years ago
Daniel Zaoui f1963435ba Profiles: add a new profile window 7 years ago
Daniel Zaoui 1b6255b4a2 Revert "TEMP: add ability to make screenshot" 7 years ago
Avi Levin 98487b5019 TEMP: add ability to make screenshot 7 years ago
Avi Levin 6aa70bfb1d Add new button in obj gen list for taking screenshot 7 years ago
Avi Levin 4436a1350b Show tooltip over func item in obj info genlist 7 years ago
Avi Levin 6535ef4cd8 Print full class name in eo info genlist 7 years ago
Avi Levin 0ab0160f34 Print params values in obj info genlist by their real type 7 years ago
Avi Levin 62d1fa87d9 Remove unnecassary operation 7 years ago
Avi Levin 2d23cb3c3b Dont show funcs items in obj info genlist as ITEM_TREE 7 years ago
Daniel Zaoui 8f0c6d63d0 Refactor GUI for profiles 7 years ago
Avi Levin d0128f01b3 Fixes 7 years ago
Avi Levin d9ffab2699 Print params in same line with func in obj info genlist 7 years ago
Daniel Zaoui 9f43b8c2d2 Revert "Printing values using new function from eolian debug" 7 years ago
Avi Levin 398d9facb6 Printing values using new function from eolian debug 7 years ago
Avi Levin 2cb62129fe Improving finding type of params 7 years ago
Daniel Zaoui 444b8401f4 Modify widgets names for a better readability 7 years ago
Daniel Zaoui 74a7e6af2a Connection profiles: modify GUI 7 years ago
Daniel Zaoui ed6163eace Connection profiles: create local profile if missing 7 years ago
Daniel Zaoui abf6c901d8 Connection profiles: read profiles from local directory 7 years ago
Daniel Zaoui 918c7c21c4 Support highlight for Evas objects 7 years ago
Daniel Zaoui 9ba927933a Clear object info genlist on app and object update 7 years ago
Daniel Zaoui dfe69a8010 Prettify GUI 7 years ago
Daniel Zaoui d64e4669d1 Fix Valgrind issue where memory was not freed 7 years ago
Avi Levin ceb5ec1c79 Improving Eolian param handling 7 years ago
Daniel Zaoui 3c912d4d52 Mode code cleaning 7 years ago
Daniel Zaoui a77bd649da Rename static member 7 years ago
Daniel Zaoui 4c2f99b572 Clean code 7 years ago
Daniel Zaoui fec134acba Remove unused code 7 years ago
Daniel Zaoui 4d76b6954c Clean label get function 7 years ago
Avi Levin 2af058297d TEMP: support Debug Eolian values in clouseau gui 7 years ago
Daniel Zaoui 481bdef39c Add command to install Clouseau 7 years ago
Daniel Zaoui 6bd8897feb Support Elementary module 7 years ago
Daniel Zaoui 4b628f199e Fix GUI layout 7 years ago
Daniel Zaoui 2f0627d912 Use only one debug client 7 years ago
Daniel Zaoui 34def6c0cb Fix indentation 7 years ago
Daniel Zaoui 53bee0201b Eolian: support request sending and decoding 7 years ago
Daniel Zaoui ff86dd67de Cmake: support edebug 7 years ago
Daniel Zaoui a934706910 Fix warnings 7 years ago
Avi Levin 748c228a4e TEMP: adding supportt in Eolian get object info 7 years ago
Avi Levin 0e46a2e7f3 Expand object genlist hierarchically - by obj parent 7 years ago
Daniel Zaoui 937b22b0e1 Ignore build directory 7 years ago
Daniel Zaoui 840b73a3d9 Remove useless folder 7 years ago
Avi Levin e181565eb6 Clean up 7 years ago
Avi Levin 1432e60e67 Expand object genlist hierarchically - by obj parent 7 years ago
Avi Levin e10deb0479 Fill objects genlist when selecting app 7 years ago
Avi Levin 99d3ca6b25 Save selected app from hoversel 7 years ago
Avi Levin 183599f90b Add support in elm list opcode 7 years ago
Avi Levin 1e22bc3d67 Init files structures 7 years ago
Avi Levin f1ca530cc0 Clean old clouseau files 7 years ago
  1. 1
      .gitignore
  2. 1
      AUTHORS
  3. 18
      CMakeLists.txt
  4. 25
      COPYING
  5. 1
      COPYING.icons
  6. 0
      ChangeLog
  7. 13
      Makefile.am
  8. 0
      NEWS
  9. 19
      README
  10. 18
      TODO
  11. 14
      autogen.sh
  12. 10
      clouseau.pc.in
  13. 40
      cmake/Modules/FindFfi.cmake
  14. 120
      configure.ac
  15. 2
      data/Makefile.am
  16. 12
      data/images/Makefile.am
  17. BIN
      data/images/background.png
  18. BIN
      data/images/clipper.png
  19. BIN
      data/images/hidden.png
  20. BIN
      data/images/screenshot-missing.png
  21. BIN
      data/images/take-screenshot.png
  22. 11
      data/units/Makefile.am
  23. 10
      data/units/clouseaud.service
  24. 8
      data/units/clouseaud.socket
  25. 0
      m4/A
  26. 56
      m4/efl_attribute.m4
  27. 5
      m4/efl_beta.m4
  28. 14
      m4/pkg_var.m4
  29. 4
      make.sh
  30. 20
      src/CMakeLists.txt
  31. 4
      src/Makefile.am
  32. 43
      src/bin/CMakeLists.txt
  33. 21
      src/bin/Makefile.am
  34. 147
      src/bin/client/cfg.c
  35. 25
      src/bin/client/cfg.h
  36. 93
      src/bin/client/config_dialog.c
  37. 8
      src/bin/client/config_dialog.h
  38. 2910
      src/bin/clouseau_client.c
  39. 450
      src/bin/clouseaud.c
  40. 595
      src/bin/gui
  41. 410
      src/bin/gui.c
  42. 56
      src/bin/gui.h
  43. 56
      src/lib/Clouseau.h
  44. 42
      src/lib/Makefile.am
  45. 56
      src/lib/clouseau.c
  46. 552
      src/lib/clouseau_app.c
  47. 792
      src/lib/clouseau_data.c
  48. 295
      src/lib/clouseau_data_legacy.c
  49. 10
      src/lib/clouseau_data_legacy.h
  50. 373
      src/lib/clouseau_object_information.c
  51. 104
      src/lib/clouseau_preload.c
  52. 239
      src/lib/clouseau_private.h
  53. 133
      src/lib/clouseau_private2.h
  54. 20
      src/modules/Makefile.am
  55. 156
      src/modules/client/canvas_checker.c
  56. 11
      src/scripts/Makefile.am
  57. 8
      src/scripts/clouseau
  58. 7
      src/scripts/clouseau_start.in

1
.gitignore vendored

@ -45,3 +45,4 @@ INSTALL
src/bin/clouseaud
src/bin/clouseau_client
src/scripts/clouseau_start
build/

@ -1 +0,0 @@
Tom Hacohen <tom@stosb.com>

@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 2.8.1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
project(CLOUSEAU)
find_package(Efl REQUIRED)
find_package(Eina REQUIRED)
find_package(Eet REQUIRED)
find_package(Efreet REQUIRED)
find_package(Eolian REQUIRED)
find_package(Eo REQUIRED)
find_package(Elementary REQUIRED)
find_package(Ecore REQUIRED)
find_package(Evas REQUIRED)
find_package(Edebug REQUIRED)
add_subdirectory(src/bin)

@ -1,25 +0,0 @@
Copyright notice for Clouseau:
Copyright (C) 2000-2011 Tom Hacohen and various contributors (see AUTHORS)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -1 +0,0 @@
The icons in this repository are herefore released into the Public Domain.

@ -1,13 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
config.h.in config.sub configure install-sh \
depcomp libtool missing
EXTRA_DIST = README AUTHORS COPYING autogen.sh
SUBDIRS = src data
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = clouseau.pc

@ -1,19 +0,0 @@
An UI inspection tool for the EFL. This tool lets you inspect UI elements and get a lot of their properties, e.g position, size and weight.
Clouseau consists of a client (clouseau_client) and launcher (clouseau_server). This design means we can:
1. Run the application we are debugging on one device and the clouseau_client itself on another.
2. Run the application we are debugging with a different environment/theme/etc compared to the clouseau client.
Clouseau provides a wrapper script that automatically launches the application with clouseau support, and launches the client, the script is called "clouseau".
Usage:
1. Using the wrapper script:
"clouseau elementary_test" or "clouseau elementary_test Entry".
2. Using the split client/server approach (different machines/environments/setups):
"clouseau_start elementary_test" and then "clouseau_client"
As mentioned above, this is done over the network, so it can be run from different machines
Using the clouseau client:
When the client opens you'll be asked to enter the server's IP address. That's the IP address of where you ran clouseau_start from. When in doubt, just use the default, 127.0.0.1.
Then press "Ok" to connect to the server, and the rest should be fairly straightforward.
TBD

18
TODO

@ -1,18 +0,0 @@
* Make it possible to hide rects? or show only elm-widgets? or something similar? too much clutter atm.
* Add filter?
* Make it an elm module (or setting an env var without a module?) so I'll be able to remotely connect to elm apps.
* Split UI and actual program code (better to do the previous bullet first).
* Add "grab screenshot" button.
* Add a clipping range rectangle.
* Add special per object info, for example edje part names?
* When items are coloured, show the exact colour using a rect?
* Handle map/proxy
* add a way to filter object with some regexp on the name and also finding a specific object according to name.
* Add general info like hinting/whole interface scale/finger size and etc.
* Things to show per-object
* clipping info.
* callback list?
* Fix has_focus.
* Hook on feed events or something and let us see who gets what?

@ -1,14 +0,0 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1
echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
if [ -z "$NOCONFIGURE" ]; then
./configure "$@"
fi

@ -1,10 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: clouseau
Description: Clouseau lib for elm debug
Version: @VERSION@
Libs: -L${libdir} -llibclouseau
Cflags: -I${includedir}/clouseau-@VMAJ@

@ -0,0 +1,40 @@
# - Try to find ffi
# Once done this will define
# FFI_FOUND - System has ffi
# FFI_INCLUDE_DIRS - The ffi include directories
# FFI_LIBRARIES - The libraries needed to use ffi
# FFI_LDFLAGS_OTHER - Other LDFLAGS needed te use ffi.
# FFI_DEFINITIONS - Compiler switches required for using ffi
find_package(PkgConfig)
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
# "QUIET" was introduced in 2.8.2
set(_QUIET QUIET)
endif ()
pkg_check_modules(PC_LIBFFI ${_QUIET} libffi)
#set(FFI_DEFINITIONS ${PC_LIBFFI_CFLAGS_OTHER})
#set(FFI_LDFLAGS_OTHER ${PC_LIBFFI_LDFLAGS_OTHER})
# before verison 2.8.11 variable CMAKE_LIBRARY_ARCHITECTURE wasn't automatically added to search path
if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.11")
set(FIND_PATH_HINTS ${PC_LIBFFI_INCLUDEDIR}/${CMAKE_LIBRARY_ARCHITECTURE})
endif ()
find_path(FFI_INCLUDE_DIR ffi.h
HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS}
${FIND_PATH_HINTS}
)
find_library(FFI_LIBRARY NAMES ffi libffi
HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS})
set(FFI_INCLUDE_DIRS ${FFI_INCLUDE_DIR})
set(FFI_LIBRARIES ${FFI_LIBRARY})
#include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(ffi DEFAULT_MSG
FFI_LIBRARY)
mark_as_advanced(FFI_INCLUDE_DIRS FFI_LIBRARY)

@ -1,120 +0,0 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [0])
m4_define([v_min], [2])
m4_define([v_mic], [0])
m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl
##-- When released, remove the dnl on the below line
dnl m4_undefine([v_rev])
##-- When doing snapshots - change soname. remove dnl on below line
dnl m4_define([relname], [ver-pre-svn-07])
dnl m4_define([v_rel], [-release relname])
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
m4_define([lt_cur], m4_eval(v_maj + v_min))
m4_define([lt_rev], v_mic)
m4_define([lt_age], v_min)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
AC_INIT(clouseau, [v_ver], tom@stosb.com)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(config.h)
AC_GNU_SOURCE
AC_PROG_LIBTOOL
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
m4_ifdef([v_rel], , [m4_define([v_rel], [])])
AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
version_info="lt_cur:lt_rev:lt_age"
release_info="v_rel"
AC_SUBST(version_info)
AC_SUBST(release_info)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
VMAJ=v_maj
AC_SUBST(VMAJ)
PKG_CHECK_MODULES([EFL],
[
eina >= 1.7.99
eet >= 1.7.99
elementary >= 1.7.99
evas >= 1.7.99
ecore >= 1.7.99
ecore-ipc >= 1.7.99
edje >= 1.7.99
eo >= 1.7.99
]
)
want_systemd="yes"
EFL_ENABLE_BETA_API_SUPPORT
AC_DEFINE([EFL_EO_API_SUPPORT], [1], [Enable access to unstable EFL EO API.])
AC_ARG_ENABLE([systemd],
[AC_HELP_STRING([--disable-systemd],
[disable systemd integration. @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_systemd="yes"
else
want_systemd="no"
fi
])
if test "x${want_systemd}" = "xyes"; then
# Detect systemd user session directory properly
EFL_PKG_CHECK_VAR([USER_SESSION_DIR], [systemd], [systemduserunitdir],
[have_systemd_user_session="yes"], [have_systemd_user_session="no"])
AC_SUBST([USER_SESSION_DIR])
fi
AM_CONDITIONAL([HAVE_SYSTEMD_USER_SESSION], [test "x${have_systemd_user_session}" = "xyes"])
### Checks for linker characteristics
lt_enable_auto_import=""
case "${host_os}" in
mingw*)
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
case "$host_vendor" in
ps3*)
# Escape had already been checked to exist
;;
esac
AC_SUBST([lt_enable_auto_import])
EFL_ATTRIBUTE_UNUSED
AC_CHECK_LIB(dl,dlopen)
AC_CHECK_FUNCS(dlopen dlerror)
AC_CONFIG_FILES([
clouseau.pc
Makefile
src/Makefile
src/lib/Makefile
src/bin/Makefile
src/scripts/Makefile
src/modules/Makefile
data/Makefile
data/images/Makefile
data/units/Makefile
])
AC_OUTPUT

@ -1,2 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = images units

@ -1,12 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
filesdir = $(datadir)/clouseau/images
files_DATA = \
clipper.png \
hidden.png \
background.png \
screenshot-missing.png \
show-screenshot.png \
take-screenshot.png
EXTRA_DIST = $(files_DATA)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

@ -1,11 +0,0 @@
AUTOMAKE_OPTIONS = 1.4 foreign
MAINTAINERCLEANFILES = Makefile.in
UNITS_FILES=clouseaud.service clouseaud.socket
if HAVE_SYSTEMD_USER_SESSION
unitsdir = $(USER_SESSION_DIR)
units_DATA = $(UNITS_FILES)
endif
EXTRA_DIST = $(UNITS_FILES)

@ -1,10 +0,0 @@
[Unit]
Description=Clouseau system service
Requires=xorg.target
After=xorg.target
[Service]
ExecStart=/usr/bin/clouseaud
[Install]
Also=clouseaud.socket

@ -1,8 +0,0 @@
[Unit]
Description=Clouseau Service Sockets
[Socket]
ListenStream=22522
[Install]
WantedBy=sockets.target

@ -1,56 +0,0 @@
dnl Copyright (C) 2011 Vincent Torri <vtorri at univ-evry dot fr>
dnl That code is public domain and can be freely used or copied.
dnl Macros for checking if the compiler supports some __attribute__ uses
dnl Usage: EFL_ATTRIBUTE_UNUSED
dnl call AC_DEFINE for __UNUSED__ if __attribute__((unused)) is available
AC_DEFUN([EFL_ATTRIBUTE_UNUSED],
[
AC_MSG_CHECKING([for __attribute__ ((unused))])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
void foo(int x __attribute__ ((unused))) {}
]],
[[
]])],
[have_attribute_unused="yes"],
[have_attribute_unused="no"])
AC_MSG_RESULT([${have_attribute_unused}])
if test "x${have_attribute_unused}" = "xyes" ; then
AC_DEFINE([__UNUSED__], [__attribute__ ((unused))], [Macro declaring a function argument to be unused.])
else
AC_DEFINE([__UNUSED__], [], [__attribute__ ((unused)) is not supported.])
fi
])
dnl Usage: EFL_ATTRIBUTE_VECTOR
dnl call AC_DEFINE for HAVE_GCC_ATTRIBUTE_VECTOR if __attribute__((vector)) is available
AC_DEFUN([EFL_ATTRIBUTE_VECTOR],
[
AC_MSG_CHECKING([for __attribute__ ((vector))])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
typedef int v4si __attribute__ ((vector_size (16)));
]],
[[
if (sizeof(v4si) == 16)
return 0;
else
return -1;
]])],
[have_attribute_vector="yes"],
[have_attribute_vector="no"])
AC_MSG_RESULT([${have_attribute_vector}])
if test "x${have_attribute_vector}" = "xyes" ; then
AC_DEFINE([HAVE_GCC_ATTRIBUTE_VECTOR], [1], [Define to 1 if your compiler supports __attribute__ ((vector)).])
fi
])
dnl End of efl_attribute.m4

@ -1,5 +0,0 @@
dnl use: EFL_ENABLE_BETA_API_SUPPORT
AC_DEFUN([EFL_ENABLE_BETA_API_SUPPORT],
[
AC_DEFINE([EFL_BETA_API_SUPPORT], [1], [Enable access to unstable EFL API that are still in beta])
])

@ -1,14 +0,0 @@
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([EFL_PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR

@ -1,4 +0,0 @@
#!/bin/sh
gcc -Wall -Wextra -fPIC -rdynamic -g3 -O0 -c libclouseau.c `pkg-config --libs --cflags elementary ecore evas`
gcc -g3 -O0 -shared -Wl,-soname,libclouseau.so.1 -o libclouseau.so.1.0.1 libclouseau.o -lc -ldl `pkg-config --libs --cflags elementary`

@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8.1)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
project(CLOUSEAU)
#set(EA_GEN_COMMON_DEFINITIONS -DEFL_EO_API_SUPPORT -DEFL_BETA_API_SUPPORT)
#add_definitions(${EA_GEN_COMMON_DEFINITIONS})
find_package(Efl REQUIRED)
find_package(Ffi REQUIRED)
find_package(Eina REQUIRED)
find_package(Eet REQUIRED)
find_package(Eolian REQUIRED)
find_package(Eo REQUIRED)
find_package(Elementary REQUIRED)
find_package(Ecore REQUIRED)
find_package(Evas REQUIRED)
add_subdirectory(src/bin)

@ -1,4 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = lib bin scripts modules

@ -0,0 +1,43 @@
set(CMAKE_BUILD_TYPE Debug)
LIST(APPEND SOURCES clouseau_client.c gui.c)
STRING(REGEX REPLACE "\n" "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
STRING(REGEX REPLACE " " "" EOLIAN_EO_DIR ${EOLIAN_EO_DIR})
add_definitions(${CLI_COMMON_DEFINITIONS} -DEFL_EO_API_SUPPORT
-DEOLIAN_EO_DIR="${EOLIAN_EO_DIR}" -DGUI_IMAGES_PATH="${CMAKE_HOME_DIRECTORY}/data/images")
link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS})
include_directories(
${ELEMENTARY_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
${EET_INCLUDE_DIRS}
${EFREET_INCLUDE_DIRS}
${EO_INCLUDE_DIRS}
${EOLIAN_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${EDEBUG_INCLUDE_DIRS}
)
set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR})
add_executable(clouseau_client ${SOURCES})
target_link_libraries(clouseau_client
pthread
${EFL_LIBRARIES}
${ELEMENTARY_LIBRARIES}
${EINA_LIBRARIES}
${EET_LIBRARIES}
${EFREET_LIBRARIES}
${EO_LIBRARIES}
${EOLIAN_LIBRARIES}
${ECORE_LIBRARIES}
${EVAS_LIBRARIES}
${EDEBUG_LIBRARIES}
ecore_file
)
install(TARGETS clouseau_client DESTINATION bin)

@ -1,21 +0,0 @@
MAINTAINERCLEANFILES = Makefile.in
bin_PROGRAMS = clouseaud clouseau_client
clouseaud_SOURCES = clouseaud.c
clouseau_client_SOURCES = \
clouseau_client.c \
client/cfg.c \
client/config_dialog.c
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/include \
-I$(top_builddir)/src/include \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EFL_CFLAGS@
clouseaud_LDADD = $(top_builddir)/src/lib/libclouseau.la @EFL_LIBS@
clouseau_client_LDADD = $(top_builddir)/src/lib/libclouseau.la @EFL_LIBS@

@ -1,147 +0,0 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Eet.h>
#include <Efreet.h>
#include "cfg.h"
#include "Clouseau.h"
Clouseau_Cfg *_clouseau_cfg = NULL;
static Eet_Data_Descriptor * _clouseau_cfg_descriptor;
#define _CONFIG_ENTRY "config"
static char *config_file = NULL;
static void
_clouseau_cfg_descriptor_init(void)
{
Eet_Data_Descriptor_Class eddc;
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Clouseau_Cfg);
_clouseau_cfg_descriptor = eet_data_descriptor_stream_new(&eddc);
#define CFG_ADD_BASIC(member, eet_type)\
EET_DATA_DESCRIPTOR_ADD_BASIC\
(_clouseau_cfg_descriptor, Clouseau_Cfg, # member, member, eet_type)
CFG_ADD_BASIC(version, EET_T_UINT);
CFG_ADD_BASIC(show_hidden, EET_T_UCHAR);
CFG_ADD_BASIC(show_clippers, EET_T_UCHAR);
CFG_ADD_BASIC(show_elm_only, EET_T_UCHAR);
#undef CFG_ADD_BASIC
}
static void
_clouseau_cfg_descriptor_shutdown(void)
{
eet_data_descriptor_free(_clouseau_cfg_descriptor);
}
void
clouseau_cfg_shutdown(void)
{
if (config_file)
free(config_file);
_clouseau_cfg_descriptor_shutdown();
eet_shutdown();
efreet_shutdown();
}
void
clouseau_cfg_init(const char *file)
{
const char *ext = ".cfg";
const char *path;
size_t len;
efreet_init();
eet_init();
path = efreet_config_home_get();
if (!path || !file)
return;
if (config_file)
free(config_file);
len = strlen(path) + strlen(file) + strlen(ext) + 1; /* +1 for '/' */
config_file = malloc(len + 1);
snprintf(config_file, len + 1, "%s/%s%s", path, file, ext);
_clouseau_cfg_descriptor_init();
}
static Clouseau_Cfg *
_clouseau_cfg_new(void)
{
Clouseau_Cfg *ret;
ret = calloc(1, sizeof(*ret));
ret->version = _CLOUSEAU_CFG_VERSION;
/* Default values */
ret->show_elm_only = EINA_TRUE;
ret->show_clippers = EINA_TRUE;
ret->show_hidden = EINA_TRUE;
return ret;
}
/* Return false on error. */
Eina_Bool
clouseau_cfg_load(void)
{
Eet_File *ef;
if (!config_file)
goto end;
ef = eet_open(config_file, EET_FILE_MODE_READ);
if (!ef)
{
/* FIXME Info message? create new config? */
goto end;
}
_clouseau_cfg = eet_data_read(ef, _clouseau_cfg_descriptor, _CONFIG_ENTRY);
end:
if (!_clouseau_cfg)
{
_clouseau_cfg = _clouseau_cfg_new();
}
eet_close(ef);
return EINA_TRUE;
}
/* Return false on error. */
Eina_Bool
clouseau_cfg_save(void)
{
Eet_File *ef;
Eina_Bool ret;
if (!config_file)
return EINA_FALSE;
ef = eet_open(config_file, EET_FILE_MODE_WRITE);
if (!ef)
{
EINA_LOG_ERR("could not open '%s' for writing.", config_file);
return EINA_FALSE;
}
ret = eet_data_write
(ef, _clouseau_cfg_descriptor, _CONFIG_ENTRY, _clouseau_cfg, EINA_TRUE);
eet_close(ef);
return ret;
}

@ -1,25 +0,0 @@
#ifndef _CFG_H
#define _CFG_H
#include <Elementary.h>
#define _CLOUSEAU_CFG_VERSION 1
void clouseau_cfg_init(const char *file);
void clouseau_cfg_shutdown(void);
Eina_Bool clouseau_cfg_save(void);
Eina_Bool clouseau_cfg_load(void);
typedef struct
{
unsigned int version;
Eina_Bool show_hidden;
Eina_Bool show_clippers;
Eina_Bool show_elm_only;
} Clouseau_Cfg;
extern Clouseau_Cfg *_clouseau_cfg;
#endif

@ -1,93 +0,0 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Elementary.h>
#include "Clouseau.h"
#include "client/cfg.h"
#include "client/config_dialog.h"
static Clouseau_Config_Changed_Cb _conf_changed_cb = NULL;
static void *_conf_changed_cb_data = NULL;
static Eina_Bool _cfg_changed;
static void
_close_btn_clicked(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Evas_Object *popup = data;
if (_cfg_changed)
_conf_changed_cb(_conf_changed_cb_data);
_conf_changed_cb = NULL;
_conf_changed_cb_data = NULL;
evas_object_del(popup);
}
static void
_config_check_changed(void *data, Evas_Object *obj,
void *event_info EINA_UNUSED)
{
Eina_Bool *setting = data;
*setting = elm_check_state_get(obj);
_cfg_changed = EINA_TRUE;
}
void
clouseau_settings_dialog_open(Evas_Object *parent, Clouseau_Config_Changed_Cb callback, const void *callback_data)
{
Evas_Object *popup, *bx, *check, *btn;
_cfg_changed = EINA_FALSE;
_conf_changed_cb = callback;
_conf_changed_cb_data = (void *) callback_data;
popup = elm_popup_add(parent);
elm_object_part_text_set(popup, "title,text", "Clouseau Settings");
evas_object_show(popup);
bx = elm_box_add(popup);
elm_object_content_set(popup, bx);
evas_object_show(bx);
check = elm_check_add(bx);
elm_object_text_set(check, "Show Hidden");
elm_check_state_set(check, _clouseau_cfg->show_hidden);
evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(check, 0.0, 0.5);
elm_box_pack_end(bx, check);
evas_object_show(check);
evas_object_smart_callback_add(check, "changed",
_config_check_changed, &(_clouseau_cfg->show_hidden));
check = elm_check_add(bx);
elm_object_text_set(check, "Show Clippers");
elm_check_state_set(check, _clouseau_cfg->show_clippers);
evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(check, 0.0, 0.5);
elm_box_pack_end(bx, check);
evas_object_show(check);
evas_object_smart_callback_add(check, "changed",
_config_check_changed, &(_clouseau_cfg->show_clippers));
check = elm_check_add(bx);
elm_object_text_set(check, "Only show Elementary widgets");
elm_check_state_set(check, _clouseau_cfg->show_elm_only);
evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(check, 0.0, 0.5);
elm_box_pack_end(bx, check);
evas_object_show(check);
evas_object_smart_callback_add(check, "changed",
_config_check_changed, &(_clouseau_cfg->show_elm_only));
btn = elm_button_add(bx);
elm_object_text_set(btn, "Close");
elm_object_part_content_set(popup, "button1", btn);
evas_object_show(btn);
evas_object_smart_callback_add(btn, "clicked",
_close_btn_clicked, popup);
}

@ -1,8 +0,0 @@
#ifndef _CONFIG_DIALOG_H
#define _CONFIG_DIALOG_H
typedef void (*Clouseau_Config_Changed_Cb)(void *data);
void clouseau_settings_dialog_open(Evas_Object *parent, Clouseau_Config_Changed_Cb callback, const void *callback_data);
#endif

File diff suppressed because it is too large Load Diff

@ -1,450 +0,0 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <fcntl.h>
#include <unistd.h>
#include <Ecore_Con_Eet.h>
#include "Clouseau.h"
#define LOCK_FILE "/tmp/clouseaud.pid"
static Eina_List *gui = NULL; /* List of app_info_st for gui clients */
static Eina_List *app = NULL; /* List of app_info_st for app clients */
static Ecore_Con_Eet *eet_svr = NULL;
static int _clouseaud_log_dom = -1;
#ifdef CRITICAL
#undef CRITICAL
#endif
#define CRITICAL(...) EINA_LOG_DOM_CRIT(_clouseaud_log_dom, __VA_ARGS__)
#ifdef ERR
#undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_clouseaud_log_dom, __VA_ARGS__)
#ifdef WRN
#undef WRN
#endif
#define WRN(...) EINA_LOG_DOM_WARN(_clouseaud_log_dom, __VA_ARGS__)
#ifdef INF
#undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_clouseaud_log_dom, __VA_ARGS__)
#ifdef DBG
#undef DBG
#endif
#define DBG(...) EINA_LOG_DOM_DBG(_clouseaud_log_dom, __VA_ARGS__)
static void
_daemon_cleanup(void)
{ /* Free strings */
app_info_st *p;
DBG("Clients connected to this server when exiting: %d",
eina_list_count(app) + eina_list_count(gui));
EINA_LIST_FREE(gui, p)
{
if(p->file)
free(p->file);
if (p->ptr)
free((void *) (uintptr_t) p->ptr);
free(p->name);
free(p);
}
EINA_LIST_FREE(app, p)
{
if(p->file)
free(p->file);
if (p->ptr)
free((void *) (uintptr_t) p->ptr);
free(p->name);
free(p);
}
gui = app = NULL;
eet_svr = NULL;
}
/* START - Ecore communication callbacks */
static int
_client_ptr_cmp(const void *d1, const void *d2)
{
return (((app_info_st *) d1)->ptr - ((unsigned long long) (uintptr_t) d2));
}
static Eina_List *
_add_client(Eina_List *clients, connect_st *t, void *client, const char *type)
{
DBG("msg from <%p>", client);
if(!eina_list_search_unsorted(clients, _client_ptr_cmp, client))
{
app_info_st *st = calloc(1, sizeof(app_info_st));
st->name = strdup(t->name);
st->pid = t->pid;
st->ptr = (unsigned long long) (uintptr_t) client;
DBG("Added %s client <%p>", type, client);
return eina_list_append(clients, st);
}
return clients;
}
static Eina_List *
_remove_client(Eina_List *clients, void *client, const char *type)
{
app_info_st *p = eina_list_search_unsorted(clients, _client_ptr_cmp, client);
DBG("Msg from <%p>", client);
if (p)
{
free(p->name);
free(p);
DBG("Removed %s client <%p>", type, client);
return eina_list_remove(clients, p);
}
return clients;
}
Eina_Bool
_add(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED Ecore_Con_Client *conn)
{
/* TODO: ecore_ipc_client_data_size_max_set(ev->client, -1); */
DBG("msg from <%p>", reply);
return ECORE_CALLBACK_RENEW;
}
Eina_Bool
_del(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED Ecore_Con_Client *conn)
{
DBG("msg from <%p>", reply);
/* Now we need to find if its an APP or GUI client */
app_info_st *i = eina_list_search_unsorted(gui, _client_ptr_cmp, reply);
if (i) /* Only need to remove GUI client from list */
gui = _remove_client(gui, reply, "GUI");
i = eina_list_search_unsorted(app, _client_ptr_cmp, reply);
if (i)
{ /* Notify all GUI clients to remove this APP */
app_closed_st t = { (unsigned long long) (uintptr_t) reply };
Eina_List *l;
EINA_LIST_FOREACH(gui, l, i)
{
DBG("<%p> Sending APP_CLOSED to <%p>", reply,
(void *) (uintptr_t) i->ptr);
ecore_con_eet_send((void *) (uintptr_t) i->ptr,
CLOUSEAU_APP_CLOSED_STR, &t);
}
app = _remove_client(app, reply, "APP");
}
if (!(gui || app))
{ /* Trigger cleanup and exit when all clients disconneced */
/* ecore_con_eet_server_free(eet_svr); why this causes Segfault? */
ecore_con_server_del(data);
ecore_main_loop_quit();
}
return ECORE_CALLBACK_RENEW;
}
void
_gui_client_connect_cb(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* Register GUI, then notify about all APP */
app_info_st *st;
Eina_List *l;
connect_st *t = value;
DBG("msg from <%p>", reply);
gui = _add_client(gui, t, reply, "GUI");
/* Add all registered apps to newly open GUI */
EINA_LIST_FOREACH(app, l, st)
{
DBG("<%p> Sending APP_ADD to <%p>",
(void *) (uintptr_t) st->ptr, reply);
ecore_con_eet_send(reply, CLOUSEAU_APP_ADD_STR, st);
}
}
void
_app_client_connect_cb(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* Register APP then notify GUI about it */
app_info_st *st;
Eina_List *l;
connect_st *t = value;
app_info_st m = { t->pid, (char *) t->name, NULL,
(unsigned long long) (uintptr_t) reply, NULL, 0 };
DBG("msg from <%p>", reply);
app = _add_client(app, t, reply, "APP");
/* Notify all GUI clients to add APP */
EINA_LIST_FOREACH(gui, l, st)
{
DBG("<%p> Sending APP_ADD to <%p>",
reply, (void *) (uintptr_t) st->ptr);
ecore_con_eet_send((void *) (uintptr_t) st->ptr,
CLOUSEAU_APP_ADD_STR, &m);
}
}
void
_data_req_cb(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* msg coming from GUI, FWD this to APP specified in REQ */
data_req_st *req = value;
DBG("msg from <%p>", reply);
if (req->app)
{ /* Requesting specific app data */
if(eina_list_search_unsorted(app,
_client_ptr_cmp,
(void *) (uintptr_t) req->app))
{ /* Do the req only of APP connected to daemon */
data_req_st t = {
(unsigned long long) (uintptr_t) reply,
(unsigned long long) (uintptr_t) req->app };
DBG("<%p> Sending DATA_REQ to <%p>",
reply, (void *) (uintptr_t) req->app);
ecore_con_eet_send((void *) (uintptr_t) req->app,
CLOUSEAU_DATA_REQ_STR, &t);
}
}
else
{ /* requesting ALL apps data */
Eina_List *l;
app_info_st *st;
data_req_st t = {
(unsigned long long) (uintptr_t) reply,
(unsigned long long) (uintptr_t) NULL };
EINA_LIST_FOREACH(app, l, st)
{
t.app = (unsigned long long) (uintptr_t) st->ptr;
DBG("<%p> Sending DATA_REQ to <%p>",
reply, (void *) (uintptr_t) st->ptr);
ecore_con_eet_send((void *) (uintptr_t) st->ptr, CLOUSEAU_DATA_REQ_STR, &t);
}
}
}
void
_tree_data_cb(EINA_UNUSED void *data, EINA_UNUSED Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* Tree Data comes from APP, GUI client specified in msg */
tree_data_st *td = value;
DBG("msg from <%p>", reply);
if (td->gui)
{ /* Sending tree data to specific GUI client */
if(eina_list_search_unsorted(gui,
_client_ptr_cmp,
(void *) (uintptr_t) td->gui))
{ /* Do the req only of GUI connected to daemon */
DBG("<%p> Sending TREE_DATA to <%p>",
reply, (void *) (uintptr_t) td->gui);
ecore_con_eet_send((void *) (uintptr_t) td->gui,
CLOUSEAU_TREE_DATA_STR, value);
}
}
else
{ /* Sending tree data to all GUI clients */
Eina_List *l;
app_info_st *info;
EINA_LIST_FOREACH(gui, l, info)
{
DBG("<%p> Sending TREE_DATA to <%p>",
reply, (void *) (uintptr_t) info->ptr);
ecore_con_eet_send((void *) (uintptr_t) info->ptr,
CLOUSEAU_TREE_DATA_STR, value);
}
}
clouseau_data_tree_free(td->tree);
}
void
_highlight_cb(EINA_UNUSED void *data, EINA_UNUSED Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* FWD this message to APP */
highlight_st *ht = value;
DBG("msg from <%p>", reply);
if(eina_list_search_unsorted(app,
_client_ptr_cmp, (void *) (uintptr_t) ht->app))
{ /* Do the REQ only of APP connected to daemon */
DBG("<%p> Sending HIGHLIGHT to <%p>",
reply, (void *) (uintptr_t) ht->app);
ecore_con_eet_send((void *) (uintptr_t) ht->app,
CLOUSEAU_HIGHLIGHT_STR, value);
}
}
void
_bmp_req_cb(EINA_UNUSED void *data, Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, void *value)
{ /* BMP data request coming from GUI to APP client */
bmp_req_st *req = value;
DBG("msg from <%p>", reply);
if(eina_list_search_unsorted(app,
_client_ptr_cmp, (void *) (uintptr_t) req->app))
{ /* Do the req only if APP connected to daemon */
bmp_req_st t = {
(unsigned long long) (uintptr_t) reply,
req->app, req->object, req->ctr };
DBG("<%p> Sending BMP_REQ to <%p>",
reply, (void *) (uintptr_t) req->app);
ecore_con_eet_send((void *) (uintptr_t) req->app,
CLOUSEAU_BMP_REQ_STR, &t);
}
}
void
_bmp_data_cb(EINA_UNUSED void *data, EINA_UNUSED Ecore_Con_Reply *reply,
EINA_UNUSED const char *protocol_name, EINA_UNUSED const char *section,
void *value, EINA_UNUSED size_t length)
{ /* BMP Data comes from APP, GUI client specified in msg */
bmp_info_st *st = clouseau_data_packet_info_get(protocol_name,
value, length);
DBG("msg from <%p>", reply);
if (st->gui)
{ /* Sending BMP data to specific GUI client */
if(eina_list_search_unsorted(gui,
_client_ptr_cmp,
(void *) (uintptr_t) st->gui))
{ /* Do the req only of GUI connected to daemon */
DBG("<%p> Sending BMP_DATA to <%p>",
reply, (void *) (uintptr_t) st->gui);
ecore_con_eet_raw_send((void *) (uintptr_t) st->gui,
CLOUSEAU_BMP_DATA_STR, "BMP", value, length);
}
}
else
{ /* Sending BMP data to all GUI clients */
Eina_List *l;
app_info_st *info;
EINA_LIST_FOREACH(gui, l, info)<