rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for xosd_init in -lxosd""... $ac_c" 1>&6
-echo "configure:8288: checking for xosd_init in -lxosd" >&5
-ac_lib_var=`echo xosd'_'xosd_init | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lxosd $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8296 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char xosd_init();
-
-int main() {
-xosd_init()
-; return 0; }
-EOF
-if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
have_xosd="true"
-else
- echo "$ac_t""no" 1>&6
-have_xosd="false"
-fi
-
else
echo "$ac_t""no" 1>&6
have_xosd="false"
then
ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:8350: checking for lirc/lirc_client.h" >&5
+echo "configure:8310: checking for lirc/lirc_client.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8355 "configure"
+#line 8315 "configure"
#include "confdefs.h"
#include <lirc/lirc_client.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:8377: checking for lirc_init in -llirc_client" >&5
+echo "configure:8337: checking for lirc_init in -llirc_client" >&5
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-llirc_client $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8385 "configure"
+#line 8345 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
lirc_init()
; return 0; }
EOF
-if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
;;
*)
echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
-echo "configure:8451: checking whether the byte order is big-endian" >&5
+echo "configure:8411: checking whether the byte order is big-endian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
enableval="$enable_pth"
if test "x$enable_pth" = "xyes"; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:8533: checking for pth_init in -lpth" >&5
+echo "configure:8493: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8541 "configure"
+#line 8501 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pth_init()
; return 0; }
EOF
-if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
cat > conftest.$ac_ext <<EOF
-#line 8580 "configure"
+#line 8540 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
enableval="$enable_st"
if test "x$enable_st" = "xyes"; then
echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
-echo "configure:8606: checking for st_init in -lst" >&5
+echo "configure:8566: checking for st_init in -lst" >&5
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lst $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8614 "configure"
+#line 8574 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
st_init()
; return 0; }
EOF
-if { (eval echo configure:8625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
cat > conftest.$ac_ext <<EOF
-#line 8653 "configure"
+#line 8613 "configure"
#include "confdefs.h"
#include <st.h>
EOF
* xosd.c : X On Screen Display interface
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: xosd.c,v 1.1 2002/06/07 22:41:50 lool Exp $
+ * $Id: xosd.c,v 1.2 2002/06/08 01:41:22 lool Exp $
*
* Authors: Loïc Minier <lool@videolan.org>
*
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
+#define POSITION_TEXT N_("flip vertical position")
+#define POSITION_LONGTEXT N_("Display xosd output on the bottom of the " \
+ "screen instead of the top")
+
+#define OFFSET_TEXT N_("vertical offset")
+#define OFFSET_LONGTEXT N_("Vertical position offset of the text " \
+ "displayed in pixels")
+
+#define FONT_TEXT N_("font")
+#define FONT_LONGTEXT N_("Font used to display text in the xosd output")
+
MODULE_CONFIG_START
+ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
+ADD_BOOL( "xosd-position", 0, NULL, POSITION_TEXT, POSITION_LONGTEXT )
+ADD_INTEGER( "xosd-text-offset", 0, NULL, OFFSET_TEXT, OFFSET_LONGTEXT )
+ADD_STRING( "xosd-font", "fixed", NULL, FONT_TEXT, FONT_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
/*****************************************************************************
* intf_Open: initialize and create stuff
*****************************************************************************/
-static int intf_Open( intf_thread_t *p_intf )
+static int intf_Open( intf_thread_t * p_intf )
{
/* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
/* Initialize library */
p_intf->p_sys->p_osd =
- xosd_init( "-*-lucidatypewriter-medium-r-normal-*-*-250-*-*-*-*-*-*",
- "LawnGreen", 3, XOSD_top, 0, 1 );
+ xosd_init( "fixed", "LawnGreen", 3, XOSD_top, 0, 1 );
/* Initialize to NULL */
p_intf->p_sys->psz_source = NULL;
xosd_display( p_intf->p_sys->p_osd,
- 0, XOSD_string, "xosd interface initialized" );
+ 0,
+ XOSD_string,
+ "xosd interface initialized" );
return( 0 );
}
p_intf->p_sys->psz_source =
strdup( p_intf->p_sys->p_input->psz_source );
- xosd_display( p_intf->p_sys->p_osd, 0, XOSD_string,
+ /* Set user preferences */
+ xosd_set_font( p_intf->p_sys->p_osd,
+ config_GetPsz( p_intf, "xosd-font" ) );
+ xosd_set_offset( p_intf->p_sys->p_osd,
+ config_GetInt( p_intf, "xosd-text-offset" ) );
+ xosd_set_pos( p_intf->p_sys->p_osd, config_GetInt( p_intf, "xosd-position" ) ? XOSD_bottom : XOSD_top );
+
+ /* Display */
+ xosd_display( p_intf->p_sys->p_osd,
+ 0, /* first line */
+ XOSD_string,
p_intf->p_sys->psz_source );
- printf("douze %s\n", p_intf->p_sys->psz_source);
}
}