home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / VLC Media Player / vlc-1.0.3-win32.exe / sdk / include / vlc / plugins / vlc_window.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-10-30  |  2.5 KB  |  74 lines

  1. /*****************************************************************************
  2.  * vlc_window.h: Embedded video output window
  3.  *****************************************************************************
  4.  * Copyright (C) 2008 R├⌐mi Denis-Courmont
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  19.  *****************************************************************************/
  20.  
  21. #ifndef LIBVLCCORE_WINDOW_H
  22. # define LIBVLCCORE_WINDOW_H 1
  23.  
  24. /**
  25.  * \file
  26.  * This file defines functions and structures for output windows
  27.  */
  28.  
  29. # include <stdarg.h>
  30.  
  31. typedef struct vout_window_t vout_window_t;
  32. typedef struct vout_window_sys_t vout_window_sys_t;
  33.  
  34. struct vout_window_t
  35. {
  36.     VLC_COMMON_MEMBERS
  37.  
  38.     module_t      *module;
  39.     vout_thread_t *vout;
  40.     union
  41.     {
  42.         void      *hwnd; /* Win32 window handle */
  43.         uint32_t   xid;  /* X11 window ID */
  44.     } handle;
  45.     vout_window_sys_t *p_sys;  /* window provider private data */
  46.  
  47.     unsigned       width;  /* pixels width */
  48.     unsigned       height; /* pixels height */
  49.     int            pos_x;  /* horizontal position hint */
  50.     int            pos_y;  /* vertical position hint */
  51.  
  52.     int (*control) (struct vout_window_t *, int, va_list);
  53. };
  54.  
  55. VLC_EXPORT( vout_window_t *, vout_RequestWindow, ( vout_thread_t *, const char *, int *, int *, unsigned int *, unsigned int * ) );
  56. VLC_EXPORT( void,   vout_ReleaseWindow, ( vout_window_t * ) );
  57. VLC_EXPORT( int, vout_ControlWindow, ( vout_window_t *, int, va_list ) );
  58.  
  59. static inline vout_window_t *
  60. vout_RequestXWindow (vout_thread_t *vout,
  61.                      int *x, int *y, unsigned *w, unsigned *h)
  62. {
  63.     return vout_RequestWindow (vout, "xwindow", x, y, w, h);
  64. }
  65.  
  66. static inline vout_window_t *
  67. vout_RequestHWND (vout_thread_t *vout,
  68.                   int *x, int *y, unsigned *w, unsigned *h)
  69. {
  70.     return vout_RequestWindow (vout, "hwnd", x, y, w, h);
  71. }
  72.  
  73. #endif /* !LIBVLCCORE_WINDOW_H */
  74.