]> git.sesse.net Git - vlc/blob - modules/gui/macosx/macosx.m
Make the playlist info window a new object
[vlc] / modules / gui / macosx / macosx.m
1 /*****************************************************************************
2  * macosx.m: MacOS X module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001-2003 VideoLAN
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., 59 Temple Place - Suite 330, Boston, MA  02111, 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_(OpenVideo)    ( vlc_object_t * );
42 void E_(CloseVideo)   ( vlc_object_t * );
43
44 /*****************************************************************************
45  * Module descriptor
46  *****************************************************************************/
47 #define VDEV_TEXT N_("Video device")
48 #define VDEV_LONGTEXT N_("Choose a number corresponding to " \
49     "a screen in you video device selection menu and this screen " \
50     "will be used by default as the screen for 'fullscreen'.")
51
52 #define OPAQUENESS_TEXT N_("Opaqueness")
53 #define OPAQUENESS_LONGTEXT N_( \
54     "Set the transparency of the video output. 1 is non-transparent (default) " \
55     "0 is fully transparent.")
56     
57 #define STRETCH_TEXT N_("Stretch Aspect Ratio")
58 #define STRETCH_LONGTEXT N_("Instead of keeping the aspect ratio " \
59         "of the movie when resizing the video, stretch the video " \
60         "to fill the entire window." )
61
62 #define OPENGL_TEXT N_("Use OpenGL")
63 #define OPENGL_LONGTEXT N_("Use OpenGL instead of QuickTime to " \
64         "render the video on the screen.")
65
66 #define OPENGL_EFFECT_TEXT N_("OpenGL effect")
67 #define OPENGL_EFFECT_LONGTEXT N_("Use 'None' to display the video " \
68         "without any fantasy, 'Cube' to let the video play on " \
69         "the faces of a rotating cube, 'Transparent cube' do make this " \
70         "cube transparent." )
71
72 #define FILL_TEXT N_("Fill fullscreen")
73 #define FILL_LONGTEXT N_("In fullscreen mode, crop the picture if " \
74         "necessary in order to fill the screen without black" \
75         "borders (OpenGL only)." )
76
77 static char * effect_list[] = { "none", "cube", "transparent-cube" };
78 static char * effect_list_text[] = { N_("None"), N_("Cube"),
79                                      N_("Transparent cube") };
80     
81 vlc_module_begin();
82     set_description( _("MacOS X interface, sound and video") );
83     set_capability( "interface", 100 );
84     set_callbacks( E_(OpenIntf), E_(CloseIntf) );
85     add_submodule();
86         set_capability( "video output", 200 );
87         set_callbacks( E_(OpenVideo), E_(CloseVideo) );
88         add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
89                      VLC_FALSE );
90         add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
91                      VLC_FALSE );
92         add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
93                 OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
94         add_bool( "macosx-opengl", 0, NULL, OPENGL_TEXT,
95                   OPENGL_LONGTEXT, VLC_TRUE );
96         add_string( "macosx-opengl-effect", "none", NULL,
97                     OPENGL_EFFECT_TEXT, OPENGL_EFFECT_LONGTEXT,
98                     VLC_TRUE );
99         add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT,
100                   VLC_TRUE );
101         change_string_list( effect_list, effect_list_text, 0 );
102 vlc_module_end();
103