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