1 /*****************************************************************************
2 * macosx.m: Mac OS X module for vlc
3 *****************************************************************************
4 * Copyright (C) 2001-2006 the VideoLAN team
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>
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.
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.
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 *****************************************************************************/
27 /*****************************************************************************
29 *****************************************************************************/
30 #include <stdlib.h> /* malloc(), free() */
37 #include <vlc_common.h>
38 #include <vlc_plugin.h>
40 /*****************************************************************************
42 *****************************************************************************/
43 int OpenIntf ( vlc_object_t * );
44 void CloseIntf ( vlc_object_t * );
46 int OpenVideoGL ( vlc_object_t * );
47 void CloseVideoGL ( vlc_object_t * );
49 /*****************************************************************************
51 *****************************************************************************/
52 #define VDEV_TEXT N_("Video device")
53 #define VDEV_LONGTEXT N_("Number of the screen to use by default to display " \
54 "videos in 'fullscreen'. The screen number correspondance can be found in "\
55 "the video device selection menu.")
57 #define OPAQUENESS_TEXT N_("Opaqueness")
58 #define OPAQUENESS_LONGTEXT N_( "Set the transparency of the video output. 1 is non-transparent (default) " \
59 "0 is fully transparent.")
61 #define STRETCH_TEXT N_("Stretch video to fill window")
62 #define STRETCH_LONGTEXT N_("Stretch the video to fill the entire window when "\
63 "resizing the video instead of keeping the aspect ratio and "\
64 "displaying black borders.")
66 #define BLACK_TEXT N_("Black screens in fullscreen")
67 #define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
68 "video displayed black" )
70 #define BACKGROUND_TEXT N_("Use as Desktop Background")
71 #define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
72 "Desktop icons cannot be interacted with in this mode." )
74 #define FSPANEL_TEXT N_("Show Fullscreen controller")
75 #define FSPANEL_LONGTEXT N_("Shows a lucent controller when moving the mouse " \
76 "in fullscreen mode.")
78 #define AUTOPLAY_OSX_TEST N_("Auto-playback of new items")
79 #define AUTOPLAY_OSX_LONGTEXT N_("Start playback of new items immediately " \
80 "once they were added." )
82 #define RECENT_ITEMS_TEXT N_("Keep Recent Items")
83 #define RECENT_ITEMS_LONGTEXT N_("By default, VLC keeps a list of the last 10 items. " \
84 "This feature can be disabled here.")
86 #define EQ_KEEP_TEXT N_("Keep current Equalizer settings")
87 #define EQ_KEEP_LONGTEXT N_("By default, VLC keeps the last equalizer settings before " \
88 "termination. This feature can be disabled here.")
91 set_description( N_("Mac OS X interface") )
92 set_capability( "interface", 200 )
93 set_callbacks( OpenIntf, CloseIntf )
94 set_category( CAT_INTERFACE )
95 set_subcategory( SUBCAT_INTERFACE_MAIN )
96 add_bool( "macosx-autoplay", 1, NULL, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
98 add_bool( "macosx-recentitems", 1, NULL, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT,
100 add_bool( "macosx-eq-keep", 1, NULL, EQ_KEEP_TEXT, EQ_KEEP_LONGTEXT,
102 add_bool( "macosx-fspanel", 1, NULL, FSPANEL_TEXT, FSPANEL_LONGTEXT,
106 set_description( "Mac OS X OpenGL" )
107 set_capability( "opengl provider", 100 )
108 set_category( CAT_VIDEO)
109 set_subcategory( SUBCAT_VIDEO_VOUT )
110 set_callbacks( OpenVideoGL, CloseVideoGL )
112 add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
114 add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
116 add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
117 OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
118 add_bool( "macosx-black", 1, NULL, BLACK_TEXT, BLACK_LONGTEXT,
120 add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,