Compare commits

...
Author SHA1 Message Date
Giacomo Catenazzi a5486422e2 Import Debian changes 1.9.1.0.svn346-1
g15daemon (1.9.1.0.svn346-1) unstable; urgency=low

  * New upstream version (from svn)
2007-12-18 09:15:42 +01:00
Giacomo Catenazzi 9602397440 Import Upstream version 1.9.1.0.svn346 2019-04-29 15:43:02 +02:00
Giacomo Catenazzi 15b2644256 Import Debian changes 1.9.0-wip.20070910-5
g15daemon (1.9.0-wip.20070910-5) unstable; urgency=low

  * change priority to "extra"
  * force libg15render-dev versioned dependencies
2007-10-09 13:28:56 +02:00
Giacomo Catenazzi 8885aae540 Import Debian changes 1.9.0-wip.20070910-4
g15daemon (1.9.0-wip.20070910-4) unstable; urgency=low

  * Correct building errors (closes: #441919, #442995)
2007-09-18 20:29:54 +02:00
Giacomo Catenazzi 2b7a313c05 Import Debian changes 1.9.0-wip.20070910-3
g15daemon (1.9.0-wip.20070910-3) unstable; urgency=low

  * first try to make a debian/rules full working for
    svn and released version
  * fix directory fixes (closes: #442296)
2007-09-14 20:59:27 +02:00
Giacomo Catenazzi 8337c95069 Import Debian changes 1.9.0-wip.20070910-2
g15daemon (1.9.0-wip.20070910-2) unstable; urgency=low

  * pause() instead of busy loop.
2007-09-11 06:12:01 +02:00
Giacomo Catenazzi 0301e1151b Import Debian changes 1.9.0-wip.20070910-1
g15daemon (1.9.0-wip.20070910-1) unstable; urgency=low

  * New upstream release (from svn)
  * Don't install plugin in /usr/share (Closes: #441619)
2007-09-10 23:02:14 +02:00
Giacomo Catenazzi 6c7461ac31 Import Debian changes 1.9.0-2
g15daemon (1.9.0-2) unstable; urgency=low

  * Updates: better init.d scripts (with support for L1 key)
  * install also the sample plugin (clock, net, uinput)
2007-08-30 23:31:18 +02:00
Giacomo Catenazzi 70c4e045b2 Import Debian changes 1.9.0-1
g15daemon (1.9.0-1) unstable; urgency=low

  * New upstream release

g15daemon (1.2.7-1) unstable; urgency=low

  * Initial release
2007-08-28 20:09:54 +02:00
30 changed files with 405 additions and 209 deletions

No files matched your search

+24 -3
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 295 $ - $Date: 2007-09-09 06:37:50 +0200 (Sun, 09 Sep 2007) $ $Author: mlampard $
$Revision: 343 $ - $Date: 2007-12-18 06:26:28 +0100 (Tue, 18 Dec 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -84,7 +84,7 @@ allow clients use of all 'L' keys.
1.2.5svn -> current
- Add compiletime check for uinput version, should resolve compilation problems on some distro's
- Security improved - the daemon now sets its effective uid to nobody as soon as possible.
1.9.0SVN
1.9.0
- Add plugin API
- partially rewritten event core
- updated g15daemon_xmms_spectrum plugin with new features, available in trunk/g15daemon_audio_plugins (SVN)
@@ -93,5 +93,26 @@ allow clients use of all 'L' keys.
- g15daemon is now dependant on libg15render.
- Clock now includes analog clock thanks to Rasta Freak <igor.jusic@zg.t-com.hr>
- Moved g15daemon_xmms_spectrum plugin to separate package
- Plugins are now installed in ${PREFIX}/lib/g15daemon/${VERSION}/plugins
1.9.1
- Plugins are now installed in ${PREFIX}/{${LIBDIR}/g15daemon/${VERSION}/plugins
- OS-X support thanks to Fabrizio Sestito.
- Bugfix: libg15daemon_client: keypresses were being corrupted.
- Bugfix: libg15daemon_client: use g15_recv rather than recv.
- Bugfix: use default scheduling for all threads.
- Optimisation: minor optimisation of lcd_cycle() code.
- Security: repair some potential security holes.
- Bugfix: Backlight status was being mis-applied when cycling screens.
- Bugfix: Language bindings were not being distributed.
1.9.1->SVN
- Add exitfunc to net plugin for exit notification.
- Use pause() instead of sleeping
- create leaving var as volatile.
- Add NAME section to g15daemon_client manpages
- Tweak delay between successive keyboard reads. This reduces cpu load by
50% on my system.
- Bugfix: Ensure that all plugin exit functions are called on leaving.
- Bugfix: if keypress event is received (very early in the startup process,
the daemon would crash. Check that expected pointers are valid.
- Bugfix: Dont attempt compilation of uinput plugin if headers are
unavailable.
- Bugfix: Write a blank buffer to the LCD before exiting.
+1
View File
@@ -1,4 +1,5 @@
.TH "G15daemon Client Development" "" "1.0" "G15Daemon" ""
.SH "NAME" g15daemon_client \- G15Daemon Server / Client communication for g15daemon.
.SH "SYNOPSIS"
#include <libg15.h>
.br
+1 -1
View File
@@ -23,7 +23,7 @@ dist-hook:
rm -rf `find $(distdir)/debian -name .svn`
rm -rf `find $(distdir)/contrib -name .svn`
rm -rf `find $(distdir)/Documentation -name .svn`
rm -rf `find $(distdir)/lang_bindings -name .svn`
rm -rf `find $(distdir)/lang-bindings -name .svn`
rm -rf `find $(distdir)/patches -name .svn`
rm -rf `find $(distdir)/rpm -name .svn`
rm -rf `find $(distdir)/plugins -name .svn`
+6 -2
View File
@@ -1,10 +1,10 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# $Revision: 295 $ - $Date: 2007-09-09 06:37:50 +0200 (Sun, 09 Sep 2007) $ $Author: mlampard $
# $Revision: 334 $ - $Date: 2007-12-07 15:08:03 +0100 (Fri, 07 Dec 2007) $ $Author: mlampard $
AC_PREREQ(2.59)
AC_INIT(g15daemon, [1.9pre], [mlampard@users.sf.net])
AC_INIT(g15daemon, [1.9.1], [mlampard@users.sf.net])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_TARGET()
@@ -32,6 +32,7 @@ AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/sock
#include <linux/input.h>
#endif
])
#if HAVE_LINUX_UINPUT_H
dnl check for uinput.h version 2.4 or 2.6 ?
AC_CHECK_MEMBER([struct uinput_user_dev.id],
@@ -42,9 +43,12 @@ AC_CHECK_HEADERS([ linux/uinput.h arpa/inet.h fcntl.h stdlib.h string.h sys/sock
#include <linux/uinput.h>
]
)
uinput=true
dnl end of uinput version checks
#endif
AM_CONDITIONAL(UINPUT_INTERFACE_PLUGIN, [test x$uinput = xtrue])
case $host_os in
*linux*)
AC_DEFINE([OSTYPE_LINUX], [1],[Target OS is Linux])
+31 -2
View File
@@ -1,6 +1,35 @@
g15daemon for Debian
--------------------
<possible notes regarding this package - if none, delete this file>
-- Anthony J. Mirabella <mirabeaj@gmail.com>, Thu, 28 Sep 2006 04:46:06 -0400
Debian 'xkeyboard-config' package already have support for g15
keyboards, so you don't need to exec 'xmodmap' as described on
original documentations. Anywaym you should configure your
xorg.conf file, so that xorg will understand the extra keys.
To have the full support of the extra keys, you should edit the
xorg configuration file /etc/X11/xorg.conf . The 'XkbModel' should
be "logitech_g15".
I.e. on my machine:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "logitech_g15"
Option "XkbLayout" "us"
EndSection
Also in KDE and gnome you should set the g15daemon keyboard.
In KDE you find the configuration in:
Control Center
Regional & Accessibility
Keyboard Layout
On the right at the top "Keyboard model" select:
"Logitech G15 extra keys via G15daemon"
-- Giacomo Catenazzi <cate@debian.org> Mon, 30 Aug 2007 08:04:22 +0200
+56 -3
View File
@@ -1,6 +1,59 @@
g15daemon (1.2.1-1) breezy; urgency=low
g15daemon (1.9.1.0.svn346-1) unstable; urgency=low
* Initial release
* New upstream version (from svn)
-- Anthony J. Mirabella <mirabeaj@gmail.com> Thu, 28 Sep 2006 04:46:06 -0400
-- Giacomo Catenazzi <cate@debian.org> Tue, 18 Dec 2007 09:15:42 +0100
g15daemon (1.9.0-wip.20070910-5) unstable; urgency=low
* change priority to "extra"
* force libg15render-dev versioned dependencies
-- Giacomo Catenazzi <cate@debian.org> Tue, 09 Oct 2007 13:28:56 +0200
g15daemon (1.9.0-wip.20070910-4) unstable; urgency=low
* Correct building errors (closes: #441919, #442995)
-- Giacomo Catenazzi <cate@debian.org> Tue, 18 Sep 2007 20:29:54 +0200
g15daemon (1.9.0-wip.20070910-3) unstable; urgency=low
* first try to make a debian/rules full working for
svn and released version
* fix directory fixes (closes: #442296)
-- Giacomo Catenazzi <cate@debian.org> Fri, 14 Sep 2007 20:59:27 +0200
g15daemon (1.9.0-wip.20070910-2) unstable; urgency=low
* pause() instead of busy loop.
-- Giacomo Catenazzi <cate@debian.org> Tue, 11 Sep 2007 06:12:01 +0200
g15daemon (1.9.0-wip.20070910-1) unstable; urgency=low
* New upstream release (from svn)
* Don't install plugin in /usr/share (Closes: #441619)
-- Giacomo Catenazzi <cate@debian.org> Mon, 10 Sep 2007 23:02:14 +0200
g15daemon (1.9.0-2) unstable; urgency=low
* Updates: better init.d scripts (with support for L1 key)
* install also the sample plugin (clock, net, uinput)
-- Giacomo Catenazzi <cate@debian.org> Thu, 30 Aug 2007 23:31:18 +0200
g15daemon (1.9.0-1) unstable; urgency=low
* New upstream release
-- Giacomo Catenazzi <cate@debian.org> Tue, 28 Aug 2007 20:09:54 +0200
g15daemon (1.2.7-1) unstable; urgency=low
* Initial release
-- Giacomo Catenazzi <cate@debian.org> Mon, 27 Aug 2007 20:00:20 +0200
+1 -1
View File
@@ -1 +1 @@
4
5
+18 -12
View File
@@ -1,28 +1,34 @@
Source: g15daemon
Section: utils
Priority: optional
Maintainer: Anthony J. Mirabella <mirabeaj@gmail.com>
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libg15-dev, libg15render-dev
Standards-Version: 3.6.2
Priority: extra
Maintainer: Giacomo Catenazzi <cate@debian.org>
Build-Depends: cdbs, debhelper (>= 5), autotools-dev, automake1.9, libtool,
libg15-dev, libg15render-dev (>=1.2.0.svn250-2), libusb-dev, libfreetype6-dev
Standards-Version: 3.7.3
Package: g15daemon
Section: utils
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libg15daemon-client (= ${Source-Version})
Description: Screen multiplexer for Logitech G15 Keyboard
Depends: ${shlibs:Depends}, libg15daemon-client1 (=${binary:Version})
Recommends: xkeyboard-config ( >= 0.9+cvs.20070428-1)
Description: Screen multiplexer for Logitech G15 Keyboard
G15daemon provides multiple virtual screens for the LCD on the Logitech
G15 Keyboard
G11 and G15 keyboards.
.
This package contain the daemon and a generic client to talk to the
daemon.
Package: libg15daemon-client
Package: libg15daemon-client1
Section: libs
Architecture: any
Depends: ${shlibs:Depends}
Description: Client library for communicating with g15daemon
Provides interface functions for clients that wish to communicate with
a running instance of g15daemon
Description: Development packages for libg15daemon-client
Includes the files needed for developing g15daemon clients
Package: libg15daemon-client-dev
Section: libdevel
Architecture: any
Depends: libg15daemon-client (= ${Source-Version})
Depends: libg15daemon-client1 (= ${binary:Version})
Description: Development packages for libg15daemon-client
Includes the files needed for developing g15daemon clients
+23 -5
View File
@@ -1,10 +1,28 @@
This package was debianized by Anthony J. Mirabella <mirabeaj@gmail.com> on
Thu, 28 Sep 2006 04:46:06 -0400.
This package was debianized by Giacomo A. Catenazzi <cate@debian.org> on
Mon, 27 Aug 2007 20:00:20 +0200.
It was downloaded from <fill in ftp site>
It was downloaded from http://g15daemon.sourceforge.net/
Copyright Holder: <put author(s) name and email here>
Upstream Authors:
Mike Lampard <mlampard@users.sf.net>
Sven Ludwig
James Green
Philip Lawatsch <philip@lawatsch.at>
Copyright:
Copyright (c) 2006 Mike Lampard, Philip Lawatsch, and others
License:
<Put the license of the package here>
g15tools is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
License can be found in the file `/usr/share/common-licenses/GPL-2'.
The Debian packaging is (C) 2007, Giacomo Catenazzi <cate@debian.org> and
is licensed under the GPL v2 (or later), see `/usr/share/common-licenses/GPL-2'.
Vendored
+1
View File
@@ -1,3 +1,4 @@
FAQ
NEWS
README
TODO
+12
View File
@@ -0,0 +1,12 @@
# Defaults for g15daemon initscript
# SWITCH_KEY selects the key used to switch between client screens
#
# SWITCH_KEY="MR" to use the MR key (on top left) (default)
# SWITCH_KEY="L1 to use the L1 key: the small round key below the LCD
SWITCH_KEY="MR"
# Additional options that are passed to the Daemon.
DAEMON_OPTS=""
+89
View File
@@ -0,0 +1,89 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: g15daemon
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Should-Start: $remote_fs
# Should-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: load deamon for Logitech G15 keyboard lcd display
# Description: load deamon for Logitech G15 keyboard lcd display
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/g15daemon
NAME=g15daemon
DESC=g15daemon
test -x $DAEMON || exit 0
# Include g15daemon defaults if available
if [ -f /etc/default/g15daemon ] ; then
. /etc/default/g15daemon
fi
if [ "$SWITCH_KEY" = "L1" ]; then
DAEMON_OPTS="-s $DAEMON_OPTS"
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
$DAEMON -k
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;
force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart" except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
start-stop-daemon --stop --test --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON \
&& $0 restart \
|| exit 0
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
+6 -1
View File
@@ -1 +1,6 @@
usr/sbin/*
debian/tmp/usr/sbin/g15daemon usr/sbin
debian/tmp/usr/lib/g15daemon/1.9.1/plugins/g15plugin_uinput.so usr/lib/g15daemon/1.9.1/plugins/
debian/tmp/usr/lib/g15daemon/1.9.1/plugins/g15plugin_tcpserver.so usr/lib/g15daemon/1.9.1/plugins/
debian/tmp/usr/lib/g15daemon/1.9.1/plugins/g15plugin_clock.so usr/lib/g15daemon/1.9.1/plugins/
debian/tmp/usr/share/g15daemon/splash/g15logo2.wbmp usr/share/g15daemon/splash/
+1
View File
@@ -0,0 +1 @@
Documentation/g15daemon.1
+5 -6
View File
@@ -1,6 +1,5 @@
usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
usr/lib/pkgconfig/*
usr/lib/*.la
usr/share/pkgconfig/*
debian/tmp/usr/include/* usr/include/
debian/tmp/usr/lib/lib*.a usr/lib/
debian/tmp/usr/lib/lib*.so usr/lib/
debian/tmp/usr/lib/*.la usr/lib/
-1
View File
@@ -1 +0,0 @@
usr/lib/lib*.so.*
+1
View File
@@ -0,0 +1 @@
debian/tmp/usr/lib/lib*.so.* usr/lib/
+1
View File
@@ -0,0 +1 @@
Documentation/g15daemon_client_devel.3
+19 -100
View File
@@ -1,107 +1,26 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
AUTOMAKE_REMOVE := Makefile Makefile.in */Makefile */Makefile.in configure aclocal.m4
AUTOMAKE_REMOVE += *.lo *.o *.la */*.lo */*.o */*.la
AUTOMAKE_REMOVE += g15daemon/g15daemon g15daemon/g15daemontest
AUTOMAKE_REMOVE += config.status config.log config.h config.h.in config/* libtool stamp-h1
AUTOMAKE_REMOVE += */.libs/
clean::
-rm -Rf $(AUTOMAKE_REMOVE)
makebuilddir:: Makefile
CFLAGS = -Wall -g
Makefile:: Makefile.am autogen.sh
[ -d config ] || mkdir config
aclocal -I config
libtoolize --automake --force --copy
autoheader
automake --add-missing --copy
autoconf
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE)
#docbook-to-man debian/g15daemon.sgml > g15daemon.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/g15daemon.
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs ChangeLog
dh_installdocs
dh_installexamples
dh_install -a --sourcedir=debian/tmp
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman Documentation/g15daemon.1 Documentation/g15daemon_client_devel.3
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
+7
View File
@@ -0,0 +1,7 @@
# See uscan(1) for format
# Compulsory line, this is a version 3 file
version=3
http://sf.net/g15daemon/g15daemon-([1-9].*)\.tar\.bz2
+3 -3
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 179 $ - $Date: 2006-11-19 09:33:12 +0100 (Sun, 19 Nov 2006) $ $Author: mlampard $
$Revision: 333 $ - $Date: 2007-12-02 04:50:57 +0100 (Sun, 02 Dec 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -46,7 +46,7 @@
#include <libg15render.h>
extern int leaving;
extern volatile int leaving;
void * g15daemon_dlopen_plugin(char *name,unsigned int library) {
@@ -129,7 +129,7 @@ void run_advanced_client(plugin_t *plugin_args)
g15daemon_msleep(info->update_msecs);
}
}else{
while(1){
while(!leaving){
g15daemon_msleep(500);
}
}
+12 -12
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 300 $ - $Date: 2007-09-10 09:52:01 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
$Revision: 324 $ - $Date: 2007-11-29 02:45:27 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
// keystate = g15_send_cmd (g15screen_fd, G15DAEMON_GET_KEYSTATE, foo);
//while(1){
//recv(g15screen_fd, &keystate, 4, 0);
recv(g15screen_fd, &keystate, 4, 0);
if(keystate)
printf("keystate = %i\n",keystate);
//}
@@ -79,19 +79,19 @@ int main(int argc, char *argv[])
// break;
/* G2,G3 & G4 change LCD backlight */
// if(keystate & G15_KEY_G2){
// retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_DARK);
// }
// if(keystate & G15_KEY_G3){
// retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_MEDIUM);
if(keystate & G15_KEY_G2){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_DARK);
}
if(keystate & G15_KEY_G3){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_MEDIUM);
unsigned char packet[2];
packet[0] = G15DAEMON_BACKLIGHT|G15_BRIGHTNESS_MEDIUM;
printf("sent %i bytes\n",send(g15screen_fd, packet, 1, MSG_OOB ));
// }
// if(keystate & G15_KEY_G4){
// retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_BRIGHT);
// }
}
if(keystate & G15_KEY_G4){
retval = g15_send_cmd (g15screen_fd, G15DAEMON_BACKLIGHT, G15_BRIGHTNESS_BRIGHT);
}
/*
retval = g15_send_cmd (g15screen_fd, G15DAEMON_IS_FOREGROUND, foo);
@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
// }
*/
sleep(2);
// sleep(2);
#ifdef TEST_KEYHANDLER
/* ok.. request that all G&M keys are passed to us.. */
retval = g15_send_cmd (g15screen_fd, G15DAEMON_KEY_HANDLER, foo);
+6 -6
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 177 $ - $Date: 2006-11-18 14:46:03 +0100 (Sat, 18 Nov 2006) $ $Author: mlampard $
$Revision: 321 $ - $Date: 2007-11-29 01:00:29 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -119,6 +119,7 @@ void g15daemon_lcdnode_cycle(g15daemon_t *masterlist)
lcdnode_t *current_screen = masterlist->current;
g15daemon_send_event(current_screen->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_HIDDEN);
do
{
pthread_mutex_lock(&lcdlist_mutex);
@@ -132,19 +133,18 @@ void g15daemon_lcdnode_cycle(g15daemon_t *masterlist)
pthread_mutex_unlock(&lcdlist_mutex);
}
while (current_screen != masterlist->current);
pthread_mutex_lock(&lcdlist_mutex);
if(masterlist->tail == masterlist->current) {
masterlist->current = masterlist->head;
} else {
masterlist->current = masterlist->current->prev;
}
pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_send_event(masterlist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
pthread_mutex_lock(&lcdlist_mutex);
masterlist->current->lcd->state_changed = 1;
masterlist->current->last_priority = masterlist->current;
pthread_mutex_unlock(&lcdlist_mutex);
g15daemon_send_event(current_screen->lcd, G15_EVENT_USER_FOREGROUND, 1);
g15daemon_send_event(masterlist->current->lcd, G15_EVENT_VISIBILITY_CHANGED, SCR_VISIBLE);
}
void g15daemon_lcdnode_remove (lcdnode_t *oldnode) {
+42 -23
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 302 $ - $Date: 2007-09-10 09:57:53 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
$Revision: 346 $ - $Date: 2007-12-18 06:44:36 +0100 (Tue, 18 Dec 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -49,7 +49,7 @@
#endif
/* all threads will exit if leaving >0 */
int leaving = 0;
volatile int leaving = 0;
int keyboard_backlight_off_onexit = 0;
unsigned int g15daemon_debug = 0;
unsigned int cycle_key;
@@ -64,6 +64,10 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
static unsigned long lastkeys;
if(!(value & cycle_key) && !(lastkeys & cycle_key)){
lcd_t *lcd = (lcd_t*)caller;
if(!lcd->g15plugin->info)
break;
int *(*plugin_listener)(plugin_event_t *newevent) = (void*)lcd->g15plugin->info->event_handler;
plugin_event_t *newevent=g15daemon_xmalloc(sizeof(plugin_event_t));
newevent->event = event;
@@ -82,9 +86,12 @@ int g15daemon_send_event(void *caller, unsigned int event, unsigned long value)
g15daemon_log(LOG_WARNING,"Error in send: %s\n",strerror(errno));
}
if(value & G15_KEY_LIGHT){ // the backlight key was pressed - maintain user-selected state
lcd_t *displaying = lcd->masterlist->tail->lcd;
lcd->masterlist->kb_backlight_state++;
if(lcd->masterlist->kb_backlight_state>2)
lcd->masterlist->kb_backlight_state=0;
displaying->backlight_state++;
displaying->backlight_state %= 3; // limit to 0-2 inclusive
}
free(newevent);
}else{
@@ -168,33 +175,38 @@ static void *keyboard_watch_thread(void *lcdlist){
unsigned int keypresses = 0;
int retval = 0;
static int lastkeys = 0;
while (!leaving) {
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(&keypresses, 40);
retval = getPressedKeys(&keypresses, 2);
pthread_mutex_unlock(&g15lib_mutex);
/* every 2nd packet contains the codes we want.. immediately try again */
while (retval == G15_ERROR_TRY_AGAIN){
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(&keypresses, 40);
retval = getPressedKeys(&keypresses, 2);
pthread_mutex_unlock(&g15lib_mutex);
}
if(retval == G15_NO_ERROR){
if(retval == G15_NO_ERROR && lastkeys != keypresses) {
g15daemon_send_event(masterlist->current->lcd,
G15_EVENT_KEYPRESS, keypresses);
}
if(retval == -ENODEV && LIBG15_VERSION>=1200) {
lastkeys = keypresses;
}else if(retval == -ENODEV && LIBG15_VERSION>=1200) {
pthread_mutex_lock(&g15lib_mutex);
while((retval=re_initLibG15() != G15_NO_ERROR) && !leaving){
sleep(1);
}
if(!leaving) { masterlist->current->lcd->state_changed=1; masterlist->current->lcd->ident=random();}
if(!leaving) {
masterlist->current->lcd->state_changed=1;
masterlist->current->lcd->ident=random();
}
pthread_mutex_unlock(&g15lib_mutex);
}
g15daemon_msleep(10);
g15daemon_msleep(40);
}
return NULL;
@@ -257,6 +269,7 @@ void g15daemon_sighandler(int sig) {
case SIGUSR1:
keyboard_backlight_off_onexit = 1;
case SIGINT:
case SIGTERM:
case SIGQUIT:
leaving = 1;
break;
@@ -275,7 +288,8 @@ int main (int argc, char *argv[])
struct sigaction new_action;
cycle_key = G15_KEY_L1;
unsigned char user[256];
unsigned int lcdlevel = 1;
pthread_t keyboard_thread;
pthread_t lcd_thread;
memset(user,0,256);
@@ -309,13 +323,13 @@ int main (int argc, char *argv[])
if (!strncmp(daemonargs, "-h",2) || !strncmp(daemonargs, "--help",6)) {
printf("G15Daemon version %s - %s\n",VERSION,uf_return_running() >= 0 ?"Loaded & Running":"Not Running");
printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) or -v (--version)\n\n -k will kill a previous incarnation",argv[0]);
printf("%s -h (--help) or -k (--kill) or -s (--switch) or -d (--debug) [level] or -v (--version) or -l (--lcdlevel) [0-2] \n\n -k will kill a previous incarnation",argv[0]);
#ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200
printf(", if uppercase -K or -KILL turn off the keyboard backlight on the way out.");
#endif
#endif
printf("\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n");
printf("\n -h shows this help\n -s changes the screen-switch key from MR to L1\n -d debug mode - stay in foreground and output all debug messages to STDERR\n -v show version\n -l set default LCD backlight level\n");
exit(0);
}
@@ -340,6 +354,13 @@ int main (int argc, char *argv[])
}
}
if (!strncmp(daemonargs, "-l",2) || !strncmp(daemonargs, "--lcdlevel",7)) {
if((argv[i+1])!=NULL)
if(isdigit(argv[i+1][0])){
lcdlevel = atoi(argv[i+1]);
}
}
}
if(uf_return_running()>=0) {
g15daemon_log(LOG_ERR,"G15Daemon already running.. Exiting");
@@ -401,7 +422,8 @@ int main (int argc, char *argv[])
setLCDContrast(1);
setLEDs(0);
lcdlist->kb_backlight_state=1;
setLCDBrightness(lcdlist->kb_backlight_state);
lcdlist->current->lcd->backlight_state=lcdlevel;
setLCDBrightness(lcdlevel);
#ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200
@@ -422,19 +444,12 @@ int main (int argc, char *argv[])
pthread_mutex_init(&g15lib_mutex, NULL);
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr,512*1024); /* set stack to 512k - dont need 8Mb !! */
pthread_attr_setscope(&attr,PTHREAD_SCOPE_SYSTEM);
int thread_policy=SCHED_RR;
pthread_attr_setschedpolicy(&attr,thread_policy);
if (pthread_create(&keyboard_thread, &attr, keyboard_watch_thread, lcdlist) != 0) {
g15daemon_log(LOG_ERR,"Unable to create keyboard listener thread. Exiting");
goto exitnow;
}
pthread_attr_setstacksize(&attr,128*1024);
/* all other threads have a lower priority... maybe */
pthread_attr_setscope(&attr,PTHREAD_SCOPE_PROCESS);
thread_policy=SCHED_OTHER;
pthread_attr_setschedpolicy(&attr,thread_policy);
if (pthread_create(&lcd_thread, &attr, lcd_draw_thread, lcdlist) != 0) {
g15daemon_log(LOG_ERR,"Unable to create display thread. Exiting");
@@ -461,11 +476,11 @@ int main (int argc, char *argv[])
new_action.sa_flags = 0;
sigaction(SIGINT, &new_action, NULL);
sigaction(SIGQUIT, &new_action, NULL);
sigaction(SIGTERM, &new_action, NULL);
sigaction(SIGUSR1, &new_action, NULL);
do {
sleep(1);
pause();
} while( leaving == 0);
g15daemon_log(LOG_INFO,"Leaving by request");
@@ -473,6 +488,10 @@ int main (int argc, char *argv[])
pthread_join(lcd_thread,NULL);
pthread_join(keyboard_thread,NULL);
/* switch off the lcd backlight */
char *blank=malloc(G15_BUFFER_LEN);
memset(blank,0,G15_BUFFER_LEN);
writePixmapToLCD((unsigned char*)blank);
free(blank);
setLCDBrightness(0);
#ifdef LIBG15_VERSION
#if LIBG15_VERSION >= 1200
+15 -10
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 190 $ - $Date: 2006-11-21 17:31:03 +0100 (Tue, 21 Nov 2006) $ $Author: mlampard $
$Revision: 339 $ - $Date: 2007-12-15 07:10:26 +0100 (Sat, 15 Dec 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -195,18 +195,24 @@ void g15daemon_sleep(int seconds) {
pthread_mutex_destroy(&dummy_mutex);
}
/* microsecond sleep routine. */
int g15daemon_usleep(int useconds) {
struct timeval timeout;
if(useconds < 10000)
useconds = 10000;
timeout.tv_sec = useconds / 1000000;
timeout.tv_usec = useconds % 1000000;
return select (0,0,0,0,&timeout);
}
/* millisecond sleep routine. */
int g15daemon_msleep(int milliseconds) {
struct timespec timeout;
if(milliseconds>999)
milliseconds=999;
timeout.tv_sec = 0;
timeout.tv_nsec = milliseconds*1000000;
return nanosleep (&timeout, NULL);
return g15daemon_usleep(milliseconds*1000);
}
unsigned int g15daemon_gettime_ms(){
struct timeval tv;
gettimeofday(&tv,NULL);
@@ -367,7 +373,6 @@ char * uf_remove_whitespace(char *str){
int g15daemon_cfg_write_string(config_section_t *section, char *key, char *val){
config_items_t *new = NULL;
const char empty[]=" ";
if(section==NULL)
return -1;
@@ -519,7 +524,7 @@ int uf_conf_open(g15daemon_t *list, char *filename) {
int config_fd=-1;
char *sect;
char *start;
char *bar;
char *bar = NULL;
int i;
struct stat stats;
+2 -2
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 301 $ - $Date: 2007-09-10 09:55:15 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
$Revision: 322 $ - $Date: 2007-11-29 01:04:29 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -67,7 +67,7 @@ int g15_send(int sock, char *buf, unsigned int len);
int g15_recv(int sock, char *buf, unsigned int len);
/* send a command (defined above) to the daemon. any replies from the daemon are returned */
int g15_send_cmd (int sock, unsigned char command, unsigned char value);
unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value);
/* receive an oob byte from the daemon, used internally by g15_send_cmd, but useful elsewhere */
#define G15_FOREGROUND_SENT_OOB 1
int g15_recv_oob_answer(int sock);
+5 -5
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 301 $ - $Date: 2007-09-10 09:55:15 +0200 (Mon, 10 Sep 2007) $ $Author: mlampard $
$Revision: 322 $ - $Date: 2007-11-29 01:04:29 +0100 (Thu, 29 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -177,7 +177,7 @@ int g15_recv_oob_answer(int sock) {
return packet[0];
}
int g15_send_cmd (int sock, unsigned char command, unsigned char value)
unsigned long g15_send_cmd (int sock, unsigned char command, unsigned char value)
{
int retval;
unsigned char packet[2];
@@ -219,9 +219,9 @@ int g15_send_cmd (int sock, unsigned char command, unsigned char value)
break;
case G15DAEMON_GET_KEYSTATE:{
retval = 0;
packet[0] = (unsigned char)command;
send( sock, packet, 1, MSG_OOB );
g15_recv(sock, (char*)&retval, sizeof(retval));
unsigned long keystate = 0;
g15_recv(sock, (char*)&keystate, sizeof(keystate));
return keystate;
break;
}
case G15DAEMON_IS_FOREGROUND:{
+6 -3
View File
@@ -3,11 +3,14 @@ METASOURCES = AUTO
libdir = @G15DAEMON_PLUGIN_DIR@
AM_CFLAGS = -Wall
lib_LTLIBRARIES =g15plugin_uinput.la g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
if UINPUT_INTERFACE_PLUGIN
g15plugin_uinput_la_SOURCES = g15_plugin_uinput.c
g15plugin_uinput_la_LDFLAGS = -avoid-version -module
input_la = g15plugin_uinput.la
endif
lib_LTLIBRARIES = ${input_la} g15plugin_tcpserver.la g15plugin_clock.la
INCLUDES = -I$(top_builddir)/libg15daemon_client/ -I$(top_builddir)/g15daemon
g15plugin_tcpserver_la_SOURCES = g15_plugin_net.c
g15plugin_tcpserver_la_LDFLAGS = -avoid-version -module
+9 -4
View File
@@ -17,7 +17,7 @@
(c) 2006 Mike Lampard, Philip Lawatsch, and others
$Revision: 299 $ - $Date: 2007-09-09 19:19:52 +0200 (Sun, 09 Sep 2007) $ $Author: mlampard $
$Revision: 329 $ - $Date: 2007-11-30 06:15:06 +0100 (Fri, 30 Nov 2007) $ $Author: mlampard $
This daemon listens on localhost port 15550 for client connections,
and arbitrates LCD display. Allows for multiple simultaneous clients.
@@ -40,7 +40,7 @@
#include <libg15.h>
#include <g15daemon.h>
static int leaving;
static int leaving = 0;
int server_events(plugin_event_t *myevent);
#ifndef SO_PRIORITY
@@ -108,7 +108,8 @@ static void process_client_cmds(lcdnode_t *lcdnode, int sock, unsigned int *msgb
}
else if (msgbuf[0] & CLIENT_CMD_BACKLIGHT)
{
send(sock,&lcdnode->lcd->backlight_state,1,MSG_OOB);
unsigned char retval = lcdnode->lcd->backlight_state;
send(sock,&retval,1,MSG_OOB);
lcdnode->lcd->backlight_state = msgbuf[0]-0x80;
lcdnode->lcd->state_changed = 1;
}
@@ -426,10 +427,14 @@ int server_events(plugin_event_t *event) {
return G15_PLUGIN_OK;
}
static void g15plugin_net_exit() {
leaving = 1;
}
/* if no exitfunc or eventhandler, member should be NULL */
plugin_info_t g15plugin_info[] = {
/* TYPE, name, initfunc, updatefreq, exitfunc, eventhandler, initfunc */
{G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, NULL, (void*)server_events, NULL},
{G15_PLUGIN_LCD_SERVER, "LCDServer" , (void*)lcdserver_thread, 500, g15plugin_net_exit, (void*)server_events, NULL},
{G15_PLUGIN_NONE, "" , NULL, 0, NULL, NULL, NULL}
};
+2 -4
View File
@@ -3,18 +3,16 @@
%define prefix /usr
Summary: Daemon to control logitech G15 keyboards
Name: g15daemon
Version: 1.2.5
Version: 1.9.1
Release: 1
Copyright: GPL
Group: Applications/System
Source: ftp://prdownloads.sf.net/g15daemon-1.2.5.tar.bz2
Source: ftp://prdownloads.sf.net/g15daemon-1.9.1.tar.bz2
URL: http://g15daemon.sf.net
Distribution: Linux
Vendor: NONE
Packager: Mike Lampard <mlampard@users.sourceforge.net>
Buildroot: /var/tmp/g15daemon-%{PACKAGE_VERSION}-root
BuildRequires: daemon-devel
Requires: daemon
Requires: libg15
Provides: g15daemon