Commit a67fd4f9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* ALL: first development version of a GUI for the SubPicture Filters (refs #350)

- the marquee section is already completely usable, more to come
- TODO:
    - fix all FIXMEs
    - implement the logo and time settings completely
    - implement l10n
    - fix 10.3 compatibility (runs under Tiger only atm)
    - save the preferences, if requested
    - close a current vout and re-open it, when a filter is (de-)activated
    - redesign the GUI to a smaller panel
parent cc5e6f6c
...@@ -181,6 +181,9 @@ EXTRA_DIST += \ ...@@ -181,6 +181,9 @@ EXTRA_DIST += \
extras/MacOSX/Resources/English.lproj/Extended.nib/classes.nib \ extras/MacOSX/Resources/English.lproj/Extended.nib/classes.nib \
extras/MacOSX/Resources/English.lproj/Extended.nib/info.nib \ extras/MacOSX/Resources/English.lproj/Extended.nib/info.nib \
extras/MacOSX/Resources/English.lproj/Extended.nib/keyedobjects.nib \ extras/MacOSX/Resources/English.lproj/Extended.nib/keyedobjects.nib \
extras/MacOSX/Resources/English.lproj/SFilters.nib/classes.nib \
extras/MacOSX/Resources/English.lproj/SFilters.nib/info.nib \
extras/MacOSX/Resources/English.lproj/SFilters.nib/keyedobjects.nib \
extras/MacOSX/Resources/English.lproj/InfoPlist.strings \ extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
extras/MacOSX/Resources/a52.icns \ extras/MacOSX/Resources/a52.icns \
extras/MacOSX/Resources/aac.icns \ extras/MacOSX/Resources/aac.icns \
...@@ -609,6 +612,8 @@ VLC-release.app: vlc ...@@ -609,6 +612,8 @@ VLC-release.app: vlc
extended.m \ extended.m \
bookmarks.h \ bookmarks.h \
bookmarks.m \ bookmarks.m \
sfilters.h \
sfilters.m \
vout.m; do \ vout.m; do \
cp "$(srcdir)/modules/gui/macosx/$$i" \ cp "$(srcdir)/modules/gui/macosx/$$i" \
$(top_builddir)/tmp/modules/gui/macosx; \ $(top_builddir)/tmp/modules/gui/macosx; \
...@@ -723,6 +728,8 @@ VLC.app: vlc ...@@ -723,6 +728,8 @@ VLC.app: vlc
extended.m \ extended.m \
bookmarks.h \ bookmarks.h \
bookmarks.m \ bookmarks.m \
sfilters.h \
sfilters.m \
vout.m; do \ vout.m; do \
cp "$(srcdir)/modules/gui/macosx/$$i" \ cp "$(srcdir)/modules/gui/macosx/$$i" \
$(top_builddir)/tmp/modules/gui/macosx; \ $(top_builddir)/tmp/modules/gui/macosx; \
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
reportABug = id; reportABug = id;
showBookmarks = id; showBookmarks = id;
showExtended = id; showExtended = id;
showSFilters = id;
showWizard = id; showWizard = id;
timesliderUpdate = id; timesliderUpdate = id;
togglePlaylist = id; togglePlaylist = id;
......
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<key>2197</key> <key>2197</key>
<string>422 532 596 143 0 0 1440 878 </string> <string>422 532 596 143 0 0 1440 878 </string>
<key>29</key> <key>29</key>
<string>423 907 438 44 0 0 1280 1002 </string> <string>503 790 438 44 0 0 1440 878 </string>
<key>915</key> <key>915</key>
<string>678 573 187 249 0 0 1280 1002 </string> <string>678 573 187 249 0 0 1280 1002 </string>
</dict> </dict>
<key>IBFramework Version</key> <key>IBFramework Version</key>
<string>439.0</string> <string>437.0</string>
<key>IBLockedObjects</key> <key>IBLockedObjects</key>
<array/> <array/>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer>
<integer>2029</integer>
<integer>29</integer> <integer>29</integer>
<integer>2029</integer>
<integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8C46</string> <string>8F46</string>
</dict> </dict>
</plist> </plist>
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {
enableFilter = id;
"logo_selectFile" = id;
otherPositionForLogo = id;
otherPositionForMarq = id;
otherPositionForTime = id;
propertyChanged = id;
};
CLASS = VLCsFilters;
LANGUAGE = ObjC;
OUTLETS = {
"o_logo_enabled_ckb" = id;
"o_logo_image_btn" = id;
"o_logo_image_fld" = id;
"o_logo_image_lbl" = id;
"o_logo_opaque_lbl" = id;
"o_logo_opaque_sld" = id;
"o_logo_pos_fix_X_fld" = id;
"o_logo_pos_fix_X_lbl" = id;
"o_logo_pos_fix_Y_fld" = id;
"o_logo_pos_fix_Y_lbl" = id;
"o_logo_pos_fix_btn" = id;
"o_logo_pos_lbl" = id;
"o_logo_pos_matrix" = id;
"o_logo_pos_rel_btn" = id;
"o_logo_pos_rel_pop" = id;
"o_marq_color_lbl" = id;
"o_marq_color_pop" = id;
"o_marq_enabled_ckb" = id;
"o_marq_marq_fld" = id;
"o_marq_marq_lbl" = id;
"o_marq_opaque_lbl" = id;
"o_marq_opaque_sld" = id;
"o_marq_pos_fix_X_fld" = id;
"o_marq_pos_fix_X_lbl" = id;
"o_marq_pos_fix_Y_fld" = id;
"o_marq_pos_fix_Y_lbl" = id;
"o_marq_pos_fix_btn" = id;
"o_marq_pos_lbl" = id;
"o_marq_pos_matrix" = id;
"o_marq_pos_rel_btn" = id;
"o_marq_pos_rel_pop" = id;
"o_marq_size_inPx_lbl" = id;
"o_marq_size_lbl" = id;
"o_marq_size_pop" = id;
"o_marq_tmOut_fld" = id;
"o_marq_tmOut_lbl" = id;
"o_marq_tmOut_ms_lbl" = id;
"o_sfilter_saveSettings_ckb" = id;
"o_sfilter_tabView" = id;
"o_sfilter_win" = id;
"o_time_color_lbl" = id;
"o_time_color_pop" = id;
"o_time_enabled_ckb" = id;
"o_time_opaque_lbl" = id;
"o_time_opaque_sld" = id;
"o_time_pos_fix_X_fld" = id;
"o_time_pos_fix_X_lbl" = id;
"o_time_pos_fix_Y_fld" = id;
"o_time_pos_fix_Y_lbl" = id;
"o_time_pos_fix_btn" = id;
"o_time_pos_lbl" = id;
"o_time_pos_matrix" = id;
"o_time_pos_rel_btn" = id;
"o_time_pos_rel_pop" = id;
"o_time_size_inPx_lbl" = id;
"o_time_size_lbl" = id;
"o_time_size_pop" = id;
"o_time_stamp_fld" = id;
"o_time_stamp_lbl" = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 67 356 240 0 0 1440 878 </string>
<key>IBFramework Version</key>
<string>437.0</string>
<key>IBOpenObjects</key>
<array>
<integer>5</integer>
</array>
<key>IBSystem Version</key>
<string>8F46</string>
</dict>
</plist>
...@@ -837,6 +837,7 @@ ...@@ -837,6 +837,7 @@
DC7F46ED08A183FC0027DB24, DC7F46ED08A183FC0027DB24,
DCE7BD0508A56C8B007B10AE, DCE7BD0508A56C8B007B10AE,
DCDA5E6508F94518009D93A8, DCDA5E6508F94518009D93A8,
CCF3C64C0923B99D00401862,
); );
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -923,6 +924,8 @@ ...@@ -923,6 +924,8 @@
DC7F46F108A187F60027DB24, DC7F46F108A187F60027DB24,
DCE7BD0708A5724D007B10AE, DCE7BD0708A5724D007B10AE,
DCE7BD0608A5724D007B10AE, DCE7BD0608A5724D007B10AE,
CCF3C6500923B9D100401862,
CCF3C6510923B9D100401862,
); );
isa = PBXGroup; isa = PBXGroup;
name = Classes; name = Classes;
...@@ -2166,6 +2169,58 @@ ...@@ -2166,6 +2169,58 @@
//A02 //A02
//A03 //A03
//A04 //A04
//CC0
//CC1
//CC2
//CC3
//CC4
CCF3C64A0923B99D00401862 = {
children = (
CCF3C64B0923B99D00401862,
);
isa = PBXVariantGroup;
name = SFilters.nib;
path = "";
refType = 4;
sourceTree = "<group>";
};
CCF3C64B0923B99D00401862 = {
isa = PBXFileReference;
lastKnownFileType = wrapper.nib;
name = English;
path = Resources/English.lproj/SFilters.nib;
refType = 4;
sourceTree = "<group>";
};
CCF3C64C0923B99D00401862 = {
fileRef = CCF3C64A0923B99D00401862;
isa = PBXBuildFile;
settings = {
};
};
CCF3C6500923B9D100401862 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = sfilters.h;
path = ../../modules/gui/macosx/sfilters.h;
refType = 2;
sourceTree = SOURCE_ROOT;
};
CCF3C6510923B9D100401862 = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.objc;
name = sfilters.m;
path = ../../modules/gui/macosx/sfilters.m;
refType = 2;
sourceTree = SOURCE_ROOT;
};
//CC0
//CC1
//CC2
//CC3
//CC4
//DC0 //DC0
//DC1 //DC1
//DC2 //DC2
...@@ -2379,6 +2434,7 @@ ...@@ -2379,6 +2434,7 @@
DCFCCDB7085CE18F001E36AF, DCFCCDB7085CE18F001E36AF,
DC7F46EB08A183FC0027DB24, DC7F46EB08A183FC0027DB24,
DCE7BD0308A56C8B007B10AE, DCE7BD0308A56C8B007B10AE,
CCF3C64A0923B99D00401862,
); );
isa = PBXGroup; isa = PBXGroup;
name = nibs; name = nibs;
......
...@@ -34,5 +34,7 @@ SOURCES_macosx = \ ...@@ -34,5 +34,7 @@ SOURCES_macosx = \
extended.m \ extended.m \
bookmarks.h \ bookmarks.h \
bookmarks.m \ bookmarks.m \
sfilters.h \
sfilters.m \
$(NULL) $(NULL)
...@@ -93,6 +93,7 @@ struct intf_sys_t ...@@ -93,6 +93,7 @@ struct intf_sys_t
id o_wizard; /* VLCWizard */ id o_wizard; /* VLCWizard */
id o_extended; /* VLCExtended */ id o_extended; /* VLCExtended */
id o_bookmarks; /* VLCBookmarks */ id o_bookmarks; /* VLCBookmarks */
id o_sfilters; /* VLCsFilters */
/*id o_update; VLCUpdate */ /*id o_update; VLCUpdate */
BOOL nib_main_loaded; /* reference to the main-nib */ BOOL nib_main_loaded; /* reference to the main-nib */
BOOL nib_open_loaded; /* reference to the open-nib */ BOOL nib_open_loaded; /* reference to the open-nib */
...@@ -100,6 +101,7 @@ struct intf_sys_t ...@@ -100,6 +101,7 @@ struct intf_sys_t
BOOL nib_wizard_loaded; /* reference to the wizard-nib */ BOOL nib_wizard_loaded; /* reference to the wizard-nib */
BOOL nib_extended_loaded; /* reference to the extended-nib */ BOOL nib_extended_loaded; /* reference to the extended-nib */
BOOL nib_bookmarks_loaded; /* reference to the bookmarks-nib */ BOOL nib_bookmarks_loaded; /* reference to the bookmarks-nib */
BOOL nib_sfilters_loaded; /* reference to the sfilters-nib */
/*BOOL nib_update_loaded; reference to the update-nib */ /*BOOL nib_update_loaded; reference to the update-nib */
IBOutlet id o_window; /* main window */ IBOutlet id o_window; /* main window */
...@@ -307,6 +309,7 @@ struct intf_sys_t ...@@ -307,6 +309,7 @@ struct intf_sys_t
- (IBAction)showWizard:(id)sender; - (IBAction)showWizard:(id)sender;
- (IBAction)showExtended:(id)sender; - (IBAction)showExtended:(id)sender;
- (IBAction)showBookmarks:(id)sender; - (IBAction)showBookmarks:(id)sender;
- (IBAction)showSFilters:(id)sender;
- (IBAction)viewAbout:(id)sender; - (IBAction)viewAbout:(id)sender;
- (IBAction)viewPreferences:(id)sender; - (IBAction)viewPreferences:(id)sender;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "wizard.h" #include "wizard.h"
#include "extended.h" #include "extended.h"
#include "bookmarks.h" #include "bookmarks.h"
#include "sfilters.h"
/*#include "update.h"*/ /*#include "update.h"*/
/***************************************************************************** /*****************************************************************************
...@@ -303,6 +304,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -303,6 +304,7 @@ static VLCMain *_o_sharedMainInstance = nil;
o_wizard = [[VLCWizard alloc] init]; o_wizard = [[VLCWizard alloc] init];
o_extended = nil; o_extended = nil;
o_bookmarks = [[VLCBookmarks alloc] init]; o_bookmarks = [[VLCBookmarks alloc] init];
o_sfilters = nil;
/*o_update = [[VLCUpdate alloc] init];*/ /*o_update = [[VLCUpdate alloc] init];*/
i_lastShownVolume = -1; i_lastShownVolume = -1;
...@@ -1524,6 +1526,22 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1524,6 +1526,22 @@ static VLCMain *_o_sharedMainInstance = nil;
} }
} }
- (IBAction)showSFilters:(id)sender
{
if ( o_sfilters == nil )
{
o_sfilters = [[VLCsFilters alloc] init];
}
if (!nib_sfilters_loaded)
{
nib_sfilters_loaded = [NSBundle loadNibNamed:@"SFilters" owner:self];
[o_sfilters initStrings];
[o_sfilters showAsPanel];
} else {
[o_sfilters showAsPanel];
}
}
- (IBAction)showBookmarks:(id)sender - (IBAction)showBookmarks:(id)sender
{ {
/* we need the wizard-nib for the bookmarks's extract functionality */ /* we need the wizard-nib for the bookmarks's extract functionality */
......
/*****************************************************************************
* sfilter.h: MacOS X Subpicture filters dialogue
*****************************************************************************
* Copyright (C) 2005 the VideoLAN team
* $Id:$
*
* Authors: Felix Khne <fkuehne@users.sf.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <vlc/intf.h>
@interface VLCsFilters : NSObject
{
/* window stuff */
IBOutlet id o_sfilter_tabView;
IBOutlet id o_sfilter_win;
/* logo section */
IBOutlet id o_logo_enabled_ckb;
IBOutlet id o_logo_image_btn;
IBOutlet id o_logo_image_fld;
IBOutlet id o_logo_image_lbl;
IBOutlet id o_logo_opaque_lbl;
IBOutlet id o_logo_opaque_sld;
IBOutlet id o_logo_pos_fix_btn;
IBOutlet id o_logo_pos_fix_X_fld;
IBOutlet id o_logo_pos_fix_X_lbl;
IBOutlet id o_logo_pos_fix_Y_fld;
IBOutlet id o_logo_pos_fix_Y_lbl;
IBOutlet id o_logo_pos_lbl;
IBOutlet id o_logo_pos_rel_btn;
IBOutlet id o_logo_pos_rel_pop;
IBOutlet id o_logo_pos_matrix;
/* marquee section */
IBOutlet id o_marq_enabled_ckb;
IBOutlet id o_marq_color_lbl;
IBOutlet id o_marq_color_pop;
IBOutlet id o_marq_marq_fld;
IBOutlet id o_marq_marq_lbl;
IBOutlet id o_marq_opaque_lbl;
IBOutlet id o_marq_opaque_sld;
IBOutlet id o_marq_pos_fix_btn;
IBOutlet id o_marq_pos_fix_X_fld;
IBOutlet id o_marq_pos_fix_X_lbl;
IBOutlet id o_marq_pos_fix_Y_fld;
IBOutlet id o_marq_pos_fix_Y_lbl;
IBOutlet id o_marq_pos_lbl;
IBOutlet id o_marq_pos_rel_btn;
IBOutlet id o_marq_pos_rel_pop;
IBOutlet id o_marq_size_inPx_lbl;
IBOutlet id o_marq_size_lbl;
IBOutlet id o_marq_size_pop;
IBOutlet id o_marq_tmOut_fld;
IBOutlet id o_marq_tmOut_lbl;
IBOutlet id o_marq_tmOut_ms_lbl;
IBOutlet id o_marq_pos_matrix;
/* time section */
IBOutlet id o_time_enabled_ckb;
IBOutlet id o_time_color_lbl;
IBOutlet id o_time_color_pop;
IBOutlet id o_time_opaque_lbl;
IBOutlet id o_time_opaque_sld;
IBOutlet id o_time_pos_fix_btn;
IBOutlet id o_time_pos_fix_X_fld;
IBOutlet id o_time_pos_fix_X_lbl;
IBOutlet id o_time_pos_fix_Y_fld;
IBOutlet id o_time_pos_fix_Y_lbl;
IBOutlet id o_time_pos_lbl;
IBOutlet id o_time_pos_rel_btn;
IBOutlet id o_time_pos_rel_pop;
IBOutlet id o_time_size_inPx_lbl;
IBOutlet id o_time_size_lbl;
IBOutlet id o_time_size_pop;
IBOutlet id o_time_stamp_fld;
IBOutlet id o_time_stamp_lbl;
IBOutlet id o_time_pos_matrix;
BOOL o_config_changed;
BOOL o_save_settings;
NSArray * o_colors;
}
+ (VLCsFilters *)sharedInstance;
- (IBAction)logo_selectFile:(id)sender;
- (IBAction)propertyChanged:(id)sender;
- (IBAction)enableFilter:(id)sender;
- (IBAction)otherPositionForLogo:(id)sender;
- (IBAction)otherPositionForMarq:(id)sender;
- (IBAction)otherPositionForTime:(id)sender;
- (void)showAsPanel;
- (void)initStrings;
- (void)changeFiltersString: (char *)psz_name onOrOff: (vlc_bool_t )b_add;
- (void)enableTime;
- (void)enableLogo;
- (void)enableMarq;
@end
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment