[vlc-devel] commit: Split out event functions in its own header (msw). (Laurent Aimar )

git version control git at videolan.org
Mon Sep 28 20:56:57 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Sep 28 20:51:51 2009 +0200| [fce7510daaedacfed6a303333bcf44fbfa13b1c8] | committer: Laurent Aimar 

Split out event functions in its own header (msw).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fce7510daaedacfed6a303333bcf44fbfa13b1c8
---

 modules/video_output/msw/Modules.am |    5 ++++
 modules/video_output/msw/events.c   |   26 +++++++++++++++++++++++-
 modules/video_output/msw/events.h   |   38 +++++++++++++++++++++++++++++++++++
 modules/video_output/msw/vout.h     |   37 +---------------------------------
 4 files changed, 69 insertions(+), 37 deletions(-)

diff --git a/modules/video_output/msw/Modules.am b/modules/video_output/msw/Modules.am
index 0ce4942..39c3861 100644
--- a/modules/video_output/msw/Modules.am
+++ b/modules/video_output/msw/Modules.am
@@ -1,6 +1,7 @@
 SOURCES_directx = \
 	directx.c \
 	vout.h \
+	events.h \
 	events.c \
 	common.c \
 	$(NULL)
@@ -8,6 +9,7 @@ SOURCES_directx = \
 SOURCES_direct3d = \
 	direct3d.c \
 	vout.h \
+	events.h \
 	events.c \
 	common.c \
 	$(NULL)
@@ -15,6 +17,7 @@ SOURCES_direct3d = \
 SOURCES_glwin32 = \
 	glwin32.c \
 	vout.h \
+	events.h \
 	events.c \
 	common.c \
 	$(NULL)
@@ -22,6 +25,7 @@ SOURCES_glwin32 = \
 SOURCES_wingdi = \
 	wingdi.c \
 	vout.h \
+	events.h \
 	events.c \
 	common.c \
 	$(NULL)
@@ -29,6 +33,7 @@ SOURCES_wingdi = \
 SOURCES_wingapi = \
 	wingdi.c \
 	vout.h \
+	events.h \
 	events.c \
 	common.c \
 	$(NULL)
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index 7698376..0122a52 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -73,10 +73,34 @@
     BOOL SHFullScreen(HWND hwndRequester, DWORD dwState);
 #endif*/
 
-
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
+struct event_thread_t
+{
+    vout_thread_t *p_vout;
+
+    /* */
+    vlc_thread_t thread;
+    vlc_mutex_t  lock;
+    vlc_cond_t   wait;
+    bool         b_ready;
+    bool         b_done;
+    bool         b_error;
+
+    /* Mouse */
+    volatile bool    b_cursor_hidden;
+    volatile mtime_t i_lastmoved;
+    mtime_t          i_mouse_hide_timeout;
+
+    /* Title */
+    char *psz_title;
+
+    /* */
+    unsigned i_changes;
+
+};
+
 static int  DirectXCreateWindow( vout_thread_t *p_vout );
 static void DirectXCloseWindow ( vout_thread_t *p_vout );
 static long FAR PASCAL DirectXEventProc( HWND, UINT, WPARAM, LPARAM );
diff --git a/modules/video_output/msw/events.h b/modules/video_output/msw/events.h
new file mode 100644
index 0000000..0b2679f
--- /dev/null
+++ b/modules/video_output/msw/events.h
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * event.h: Windows video output header file
+ *****************************************************************************
+ * Copyright (C) 2001-2009 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Gildas Bazin <gbazin at videolan.org>
+ *          Damien Fouilleul <damienf at videolan.org>
+ *
+ * This program 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/**
+ * HWNDs manager.
+ */
+typedef struct event_thread_t event_thread_t;
+
+event_thread_t *EventThreadCreate( vout_thread_t * );
+void            EventThreadDestroy( event_thread_t * );
+int             EventThreadStart( event_thread_t * );
+void            EventThreadStop( event_thread_t * );
+
+void            EventThreadMouseAutoHide( event_thread_t * );
+void            EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
+unsigned        EventThreadRetreiveChanges( event_thread_t * );
+
diff --git a/modules/video_output/msw/vout.h b/modules/video_output/msw/vout.h
index e4e29b1..381f780 100644
--- a/modules/video_output/msw/vout.h
+++ b/modules/video_output/msw/vout.h
@@ -25,30 +25,7 @@
 /*****************************************************************************
  * event_thread_t: event thread
  *****************************************************************************/
-typedef struct
-{
-    vout_thread_t *p_vout;
-
-    /* */
-    vlc_thread_t thread;
-    vlc_mutex_t  lock;
-    vlc_cond_t   wait;
-    bool         b_ready;
-    bool         b_done;
-    bool         b_error;
-
-    /* Mouse */
-    volatile bool    b_cursor_hidden;
-    volatile mtime_t i_lastmoved;
-    mtime_t          i_mouse_hide_timeout;
-
-    /* Title */
-    char *psz_title;
-
-    /* */
-    unsigned i_changes;
-
-} event_thread_t;
+#include "events.h"
 
 #ifdef MODULE_NAME_IS_wingapi
     typedef struct GXDisplayProperties {
@@ -261,18 +238,6 @@ struct vout_sys_t
 int DirectDrawUpdateOverlay( vout_thread_t *p_vout );
 
 /*****************************************************************************
- * Prototypes from events.c
- *****************************************************************************/
-event_thread_t *EventThreadCreate( vout_thread_t * );
-void            EventThreadDestroy( event_thread_t * );
-int             EventThreadStart( event_thread_t * );
-void            EventThreadStop( event_thread_t * );
-
-void            EventThreadMouseAutoHide( event_thread_t * );
-void            EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
-unsigned        EventThreadRetreiveChanges( event_thread_t * );
-
-/*****************************************************************************
  * Prototypes from common.c
  *****************************************************************************/
 int  CommonInit( vout_thread_t * );




More information about the vlc-devel mailing list