]> git.sesse.net Git - vlc/blob - modules/gui/macosx/macosx.m
Merge branch 'master' into lpcm_encoder
[vlc] / modules / gui / macosx / macosx.m
1 /*****************************************************************************
2  * macosx.m: Mac OS X module for vlc
3  *****************************************************************************
4  * Copyright (C) 2001-2009 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  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26  *****************************************************************************/
27
28 /*****************************************************************************
29  * Preamble
30  *****************************************************************************/
31 #include <stdlib.h>                                      /* malloc(), free() */
32 #include <string.h>
33
34 #ifdef HAVE_CONFIG_H
35 # include "config.h"
36 #endif
37
38 #include <vlc_common.h>
39 #include <vlc_plugin.h>
40
41 /*****************************************************************************
42  * External prototypes
43  *****************************************************************************/
44 int  OpenIntf     ( vlc_object_t * );
45 void CloseIntf    ( vlc_object_t * );
46
47 #if 0
48 int  OpenVideoGL  ( vlc_object_t * );
49 void CloseVideoGL ( vlc_object_t * );
50 #endif
51
52 /*****************************************************************************
53  * Module descriptor
54  *****************************************************************************/
55 #define VDEV_TEXT N_("Video device")
56 #define VDEV_LONGTEXT N_("Number of the screen to use by default to display " \
57                          "videos in 'fullscreen'. The screen number correspondance can be found in "\
58                          "the video device selection menu.")
59
60 #define OPAQUENESS_TEXT N_("Opaqueness")
61 #define OPAQUENESS_LONGTEXT N_( "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_("Stretch the video to fill the entire window when "\
66                             "resizing the video instead of keeping the aspect ratio and "\
67                             "displaying black borders.")
68
69 #define BLACK_TEXT N_("Black screens in fullscreen")
70 #define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
71                           "video displayed black" )
72
73 #define BACKGROUND_TEXT N_("Use as Desktop Background")
74 #define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
75                                "Desktop icons cannot be interacted with in this mode." )
76
77 #define FSPANEL_TEXT N_("Show Fullscreen controller")
78 #define FSPANEL_LONGTEXT N_("Shows a lucent controller when moving the mouse " \
79                             "in fullscreen mode.")
80
81 #define AUTOPLAY_OSX_TEST N_("Auto-playback of new items")
82 #define AUTOPLAY_OSX_LONGTEXT N_("Start playback of new items immediately " \
83                                  "once they were added." )
84
85 #define RECENT_ITEMS_TEXT N_("Keep Recent Items")
86 #define RECENT_ITEMS_LONGTEXT N_("By default, VLC keeps a list of the last 10 items. " \
87                                  "This feature can be disabled here.")
88
89 #define EQ_KEEP_TEXT N_("Keep current Equalizer settings")
90 #define EQ_KEEP_LONGTEXT N_("By default, VLC keeps the last equalizer settings before " \
91                             "termination. This feature can be disabled here.")
92
93 #define USE_APPLE_REMOTE_TEXT N_("Control playback with the Apple Remote")
94 #define USE_APPLE_REMOTE_LONGTEXT N_("By default, VLC can be remotely controlled with the Apple Remote.")
95
96 #define USE_MEDIAKEYS_TEXT N_("Control playback with media keys")
97 #define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
98                                   "keyboards.")
99
100 #define USE_MEDIAKEYS_BACKGROUND_TEXT N_("Use media key control when VLC is in background")
101 #define USE_MEDIAKEYS_BACKGROUND_LONGTEXT N_("By default, VLC will accept media key events also when being " \
102                                                                                             "in background.")
103
104 vlc_module_begin ()
105     set_description( N_("Mac OS X interface") )
106     set_capability( "interface", 200 )
107     set_callbacks( OpenIntf, CloseIntf )
108     set_category( CAT_INTERFACE )
109     set_subcategory( SUBCAT_INTERFACE_MAIN )
110     cannot_unload_broken_library( )
111     add_bool( "macosx-autoplay", true, NULL, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
112               false )
113     add_bool( "macosx-recentitems", true, NULL, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT,
114               false )
115     add_bool( "macosx-eq-keep", true, NULL, EQ_KEEP_TEXT, EQ_KEEP_LONGTEXT,
116               false )
117     add_bool( "macosx-fspanel", true, NULL, FSPANEL_TEXT, FSPANEL_LONGTEXT,
118               false )
119     add_bool( "macosx-appleremote", true, NULL, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT,
120              false )
121     add_bool( "macosx-mediakeys", true, NULL, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
122              false )
123     add_bool( "macosx-mediakeys-background", true, NULL, USE_MEDIAKEYS_BACKGROUND_TEXT, USE_MEDIAKEYS_BACKGROUND_LONGTEXT,
124              false )
125
126 #if 0
127     add_submodule ()
128         set_description( "Mac OS X OpenGL" )
129         set_capability( "opengl provider", 100 )
130         set_category( CAT_VIDEO)
131         set_subcategory( SUBCAT_VIDEO_VOUT )
132         set_callbacks( OpenVideoGL, CloseVideoGL )
133
134         add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
135                      false )
136         add_bool( "macosx-stretch", false, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
137                   false )
138         add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
139                               OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
140         add_bool( "macosx-black", true, NULL, BLACK_TEXT, BLACK_LONGTEXT,
141                   false )
142         add_bool( "macosx-background", false, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
143                   false )
144 #endif
145 vlc_module_end ()
146