]> git.sesse.net Git - vlc/blob - modules/gui/macosx/macosx.m
* Fix the fourcc of OpenGL on Mac Intel. We should check why it's set wrong on PPC.
[vlc] / modules / gui / macosx / macosx.m
1 /*****************************************************************************
2  * macosx.m: Mac OS X module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Colin Delacroix <colin@zoy.org>
8  *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
9  *          Florian G. Pflug <fgp@phlo.org>
10  *          Jon Lech Johansen <jon-vl@nanocrew.net>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25  *****************************************************************************/
26
27 /*****************************************************************************
28  * Preamble
29  *****************************************************************************/
30 #include <stdlib.h>                                      /* malloc(), free() */
31 #include <string.h>
32
33 #include <vlc/vlc.h>
34
35 /*****************************************************************************
36  * External prototypes
37  *****************************************************************************/
38 int  E_(OpenIntf)     ( vlc_object_t * );
39 void E_(CloseIntf)    ( vlc_object_t * );
40
41 int  E_(OpenVideoQT)  ( vlc_object_t * );
42 void E_(CloseVideoQT) ( vlc_object_t * );
43
44 int  E_(OpenVideoGL)  ( vlc_object_t * );
45 void E_(CloseVideoGL) ( vlc_object_t * );
46
47 /*****************************************************************************
48  * Module descriptor
49  *****************************************************************************/
50 #define EMBEDDED_TEXT N_("Use embedded video output")
51 #define EMBEDDED_LONGTEXT N_("Disable this if you want the video output to " \
52     "be opened in a separate window instead of in the control window.")
53
54 #define VDEV_TEXT N_("Video device")
55 #define VDEV_LONGTEXT N_("Choose a number corresponding to " \
56     "a screen in you video device selection menu and this screen " \
57     "will be used by default as the screen for 'fullscreen'.")
58
59 #define OPAQUENESS_TEXT N_("Opaqueness")
60 #define OPAQUENESS_LONGTEXT N_( \
61     "Set the transparency of the video output. 1 is non-transparent (default) " \
62     "0 is fully transparent.")
63     
64 #define STRETCH_TEXT N_("Stretch video to fill window")
65 #define STRETCH_LONGTEXT N_("Instead of keeping the aspect ratio " \
66         "of the movie when resizing the video, stretch the video " \
67         "to fill the entire window." )
68
69 #define FILL_TEXT N_("Fill fullscreen")
70 #define FILL_LONGTEXT N_("In fullscreen mode, crop the picture if " \
71         "necessary in order to fill the screen without black " \
72         "borders (OpenGL only)." )
73         
74 #define BACKGROUND_TEXT N_("Use as Desktop Background")
75 #define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
76         "of the Finder. Desktop icons cannot be interacted with in this mode." )
77
78 vlc_module_begin();
79     set_description( _("Mac OS X interface") );
80     set_capability( "interface", 100 );
81     set_callbacks( E_(OpenIntf), E_(CloseIntf) );
82     set_category( CAT_INTERFACE );
83     set_subcategory( SUBCAT_INTERFACE_GENERAL );
84     add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
85                      VLC_FALSE );
86
87     add_submodule();
88         set_description( _("Quartz video") );
89         set_capability( "video output", 100 );
90         set_category( CAT_VIDEO);
91         set_subcategory( SUBCAT_VIDEO_VOUT );
92         set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
93
94         add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
95                      VLC_FALSE );
96         add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
97                      VLC_FALSE );
98         add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
99                 OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
100         add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT,
101                   VLC_TRUE );
102         add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
103                      VLC_FALSE );
104     add_submodule();
105         set_description( "Mac OS X OpenGL" );
106         set_capability( "opengl provider", 100 );
107         set_category( CAT_VIDEO);
108         set_subcategory( SUBCAT_VIDEO_VOUT );
109         set_callbacks( E_(OpenVideoGL), E_(CloseVideoGL) );
110 vlc_module_end();
111