[prev in list] [next in list] [prev in thread] [next in thread]
List: xine-cvslog
Subject: [xine-cvs] CVS: xine-ui/src/xitk Makefile.am,1.76,1.77 actions.c,1.255,1.256 event.c,1.272,1.273 kbi
From: Miguel Freitas <miguelfreitas () users ! sourceforge ! net>
Date: 2005-01-31 2:49:51
Message-ID: E1CvRdP-000146-Ay () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/xine/xine-ui/src/xitk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2443/src/xitk
Modified Files:
Makefile.am actions.c event.c kbindings.c kbindings.h main.c
videowin.c
Log Message:
xine-ui meets oxine ;-)
that is, my living room is now powered by xine!
minor xine-ui hooks are needed to get osd menus working, forwarding
navigation and mouse events as needed.
oxine code was greatly simplified since lots of features are already
provided by xine-ui itself with osd feedback (eg. navigation keys,
volume adjust, brightness/contrast...)
not all oxine menu code has been ported, this is still work in progress but
it is already usable (specially by providing a ~/.xine/oxine_mediamarks
file).
Index: Makefile.am
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/Makefile.am,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- Makefile.am 21 Apr 2004 22:35:05 -0000 1.76
+++ Makefile.am 31 Jan 2005 02:49:30 -0000 1.77
@@ -1,4 +1,4 @@
-SUBDIRS = Imlib-light xine-toolkit skins
+SUBDIRS = Imlib-light xine-toolkit skins oxine
AM_CFLAGS = @BUILD_LIB_STATIC@ @X_CFLAGS@ @XINE_CFLAGS@ @CURL_CFLAGS@ \
@NVTVSIMPLE_CFLAGS@ @READLINE_INCLUDES@ -I$(top_srcdir)/src/xitk/xine-toolkit
@@ -15,6 +15,7 @@
kbindings_man_LDADD = @XINE_LIBS@ $(top_builddir)/src/common/libcommon.la \
$(top_builddir)/src/xitk/xine-toolkit/libxitk.la \
+ $(top_builddir)/src/xitk/oxine/liboxine.la \
$(X_PRE_LIBS) @XINE_LIBS@ $(LIRC_LIBS) $(DYNAMIC_LD_LIBS) \
$(X_LIBS) $(XTEST_LIBS) $(CURL_LIBS) $(NVTVSIMPLE_LIBS) \
-lX11 -lm
@@ -54,11 +55,14 @@
videowin.c \
viewlog.c
-xine_DEPENDENCIES = $(top_builddir)/src/common/libcommon.la \
$(top_builddir)/src/xitk/xine-toolkit/libxitk.la +xine_DEPENDENCIES = \
$(top_builddir)/src/common/libcommon.la \ + \
$(top_builddir)/src/xitk/xine-toolkit/libxitk.la \ + \
$(top_builddir)/src/xitk/oxine/liboxine.la
# double @XINE_LIBS@ to ensure correct libpath (libtool may add -L...)
xine_LDADD = @XINE_LIBS@ $(top_builddir)/src/common/libcommon.la \
$(top_builddir)/src/xitk/xine-toolkit/libxitk.la \
+ $(top_builddir)/src/xitk/oxine/liboxine.la \
$(X_PRE_LIBS) @XINE_LIBS@ $(LIRC_LIBS) $(DYNAMIC_LD_LIBS) \
$(X_LIBS) $(XTEST_LIBS) $(CURL_LIBS) $(NVTVSIMPLE_LIBS) \
-lX11 -lm $(DBG_LIBS)
Index: actions.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/actions.c,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -r1.255 -r1.256
--- actions.c 1 Jan 2005 01:26:21 -0000 1.255
+++ actions.c 31 Jan 2005 02:49:45 -0000 1.256
@@ -40,6 +40,7 @@
#include <pthread.h>
#include "common.h"
+#include "oxine/oxine.h"
extern gGui_t *gGui;
extern _panel_t *panel;
@@ -567,6 +568,8 @@
*/
void gui_exit (xitk_widget_t *w, void *data) {
+ oxine_exit();
+
if(xine_get_status(gGui->stream) != XINE_STATUS_STOP) {
gGui->ignore_next = 1;
Index: event.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/event.c,v
retrieving revision 1.272
retrieving revision 1.273
diff -u -r1.272 -r1.273
--- event.c 19 Jan 2005 22:42:37 -0000 1.272
+++ event.c 31 Jan 2005 02:49:45 -0000 1.273
@@ -43,6 +43,7 @@
#include <stdlib.h>
#include "common.h"
+#include "oxine/oxine.h"
#define STEP_SIZE 256
@@ -394,6 +395,10 @@
gGui->numeric.arg = 0;
}
+ /* check if osd menu like this event */
+ if( oxine_action_event(action & ~ACTID_IS_INPUT_EVENT) )
+ return;
+
/* events for advanced input plugins. */
xine_event.type = action & ~ACTID_IS_INPUT_EVENT;
xine_event.data_length = 0;
@@ -851,6 +856,10 @@
case ACTID_OSD_SINFOS:
osd_stream_infos();
break;
+
+ case ACTID_OSD_MENU:
+ oxine_menu();
+ break;
case ACTID_FILESELECTOR:
gui_file_selector();
@@ -1803,6 +1812,8 @@
startup.start = auto_start;
startup.session_opts = session_opts;
+ oxine_init();
+
xitk_run(on_start, (void *)&startup);
/* save playlist */
Index: kbindings.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/kbindings.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- kbindings.c 16 Dec 2004 16:14:08 -0000 1.124
+++ kbindings.c 31 Jan 2005 02:49:45 -0000 1.125
@@ -364,6 +364,8 @@
"StreamInfosShow", ACTID_STREAM_INFOS , "i", \
KEYMOD_META , 0 , 1}, { "display stream information using OSD",
"OSDStreamInfos", ACTID_OSD_SINFOS , "i", \
KEYMOD_CONTROL , 0 , 0}, + { "show OSD menu",
+ "OSDMenu", ACTID_OSD_MENU , "O", \
KEYMOD_NOMOD , 0 , 0}, { "enter key binding editor",
"KeyBindingEditor", ACTID_KBEDIT , "k", KEYMOD_META , 0 , \
1}, { "open file selector",
Index: kbindings.h
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/kbindings.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- kbindings.h 16 Dec 2004 16:14:09 -0000 1.55
+++ kbindings.h 31 Jan 2005 02:49:46 -0000 1.56
@@ -142,6 +142,7 @@
ACTID_VPP_ENABLE,
ACTID_HELP_SHOW,
ACTID_PLAYLIST_STOP,
+ ACTID_OSD_MENU,
/*
* The below events map one-to-one with definitions in xine-lib's events.h
Index: main.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/main.c,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -r1.301 -r1.302
--- main.c 15 Dec 2004 21:10:45 -0000 1.301
+++ main.c 31 Jan 2005 02:49:46 -0000 1.302
@@ -57,7 +57,7 @@
#include <xine.h>
#include <xine/xineutils.h>
-#include "common.h"
+#include "common.h"
#ifdef HAVE_GETOPT_LONG
# include <getopt.h>
@@ -2109,7 +2109,7 @@
video_window_select_visual();
xine_set_param(gGui->stream, XINE_PARAM_VO_ASPECT_RATIO, aspect_ratio);
-
+
/*
* hand control over to gui
*/
Index: videowin.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/videowin.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -r1.211 -r1.212
--- videowin.c 16 Dec 2004 16:37:11 -0000 1.211
+++ videowin.c 31 Jan 2005 02:49:47 -0000 1.212
@@ -47,6 +47,7 @@
#endif
#include "common.h"
+#include "oxine/oxine.h"
#define EST_KEEP_VALID 10 /* #frames to allow for changing fps */
#define EST_MAX_JITTER 0.01 /* maximum jitter to detect valid fps */
@@ -1037,6 +1038,7 @@
XUnlockDisplay (gGui->video_display);
}
+ oxine_adapt();
}
static float get_default_mag(int video_width, int video_height) {
@@ -1132,6 +1134,9 @@
}
#endif
+ if(gVw->video_width != video_width || gVw->video_height != video_height )
+ oxine_adapt();
+
if(!gVw->stream_resize_window) {
gVw->video_width = video_width;
gVw->video_height = video_height;
@@ -1978,6 +1983,8 @@
case MotionNotify: {
XMotionEvent *mevent = (XMotionEvent *) event;
+ xine_event_t event;
+ xine_input_data_t input;
int x, y;
/* printf("Mouse event:mx=%d my=%d\n",mevent->x, mevent->y); */
@@ -1987,19 +1994,19 @@
video_window_set_cursor_visibility(gGui->cursor_visible);
}
- if (video_window_translate_point(mevent->x, mevent->y, &x, &y)) {
- xine_event_t event;
- xine_input_data_t input;
-
- event.type = XINE_EVENT_INPUT_MOUSE_MOVE;
- event.stream = gGui->stream;
- event.data = &input;
- event.data_length = sizeof(input);
- gettimeofday(&event.tv, NULL);
- input.button = 0; /* No buttons, just motion. */
- input.x = x;
- input.y = y;
- xine_event_send(gGui->stream, &event);
+ event.type = XINE_EVENT_INPUT_MOUSE_MOVE;
+ if (!oxine_mouse_event(event.type, mevent->x, mevent->y) ) {
+ if (video_window_translate_point(mevent->x, mevent->y, &x, &y)) {
+ event.stream = gGui->stream;
+ event.data = &input;
+ event.data_length = sizeof(input);
+ gettimeofday(&event.tv, NULL);
+ input.button = 0; /* No buttons, just motion. */
+ input.x = x;
+ input.y = y;
+
+ xine_event_send(gGui->stream, &event);
+ }
}
}
break;
@@ -2039,17 +2046,20 @@
}
- if(video_window_translate_point(bevent->x, bevent->y, &x, &y)) {
- event.type = XINE_EVENT_INPUT_MOUSE_BUTTON;
- event.stream = gGui->stream;
- event.data = &input;
- event.data_length = sizeof(input);
- input.button = bevent->button;
- input.x = x;
- input.y = y;
- xine_event_send(gGui->stream, &event);
- }
+ event.type = XINE_EVENT_INPUT_MOUSE_BUTTON;
+ if( bevent->button != Button1 ||
+ !oxine_mouse_event(event.type, bevent->x, bevent->y) ) {
+ if(video_window_translate_point(bevent->x, bevent->y, &x, &y)) {
+ event.stream = gGui->stream;
+ event.data = &input;
+ event.data_length = sizeof(input);
+ input.button = bevent->button;
+ input.x = x;
+ input.y = y;
+ xine_event_send(gGui->stream, &event);
+ }
+ }
}
break;
@@ -2094,6 +2104,7 @@
if(osd_is_visible() && ((h != gVw->output_height) || (w != \
gVw->output_width))) osd_update_osd();
+ oxine_adapt();
}
break;
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic