summaryrefslogtreecommitdiffstats
path: root/macosx/PictureController.h
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-01-12 22:45:15 +0000
committerdynaflash <[email protected]>2008-01-12 22:45:15 +0000
commitadf21e86d7831dfc99cbb8248f3a9b6e8c08d83d (patch)
tree1ca117033ba43f1b9278cb735b54fcf7471ad7cb /macosx/PictureController.h
parent0577ab41b7759e760df1058ed87a75605fcb1d85 (diff)
MacGui: Switch PicturePreview to use NSImageView instead of the openGL view.
- thanks travistex - uses a new method makeImageForPicture which gets the previews into an NS image. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1189 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/PictureController.h')
-rw-r--r--macosx/PictureController.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/macosx/PictureController.h b/macosx/PictureController.h
index a418ba40c..c9d5d500e 100644
--- a/macosx/PictureController.h
+++ b/macosx/PictureController.h
@@ -7,24 +7,21 @@
#include <Cocoa/Cocoa.h>
#include "hb.h"
-#include "PictureGLView.h"
+
+#define HB_NUM_HBLIB_PICTURES 10 // hbilb generates 10 preview pictures
@interface PictureController : NSObject
{
hb_handle_t * fHandle;
hb_title_t * fTitle;
- bool fHasQE;
- uint8_t * fBuffer;
- int fBufferSize;
- uint8_t * fTexBuf[2];
- int fTexBufSize;
+ NSMutableDictionary * fPicturePreviews; // NSImages, one for each preview libhb creates, created lazily
int fPicture;
IBOutlet NSPanel * fPicturePanel;
- IBOutlet HBPictureGLView * fPictureGLView;
- IBOutlet NSBox * fPictureGLViewArea;
+ IBOutlet NSImageView * fPictureView;
+ IBOutlet NSBox * fPictureViewArea;
IBOutlet NSTextField * fWidthField;
IBOutlet NSStepper * fWidthStepper;
IBOutlet NSTextField * fHeightField;
@@ -45,7 +42,6 @@
IBOutlet NSButton * fDeblockCheck;
IBOutlet NSPopUpButton * fDenoisePopUp;
IBOutlet NSPopUpButton * fAnamorphicPopUp;
- IBOutlet NSButton * fEffectsCheck;
IBOutlet NSButton * fPrevButton;
IBOutlet NSButton * fNextButton;
IBOutlet NSTextField * fInfoField;
@@ -77,7 +73,7 @@
- (void) SetHandle: (hb_handle_t *) handle;
- (void) SetTitle: (hb_title_t *) title;
- (void) setInitialPictureFilters;
-- (void) Display: (int) anim;
+- (void) displayPreview;
- (IBAction) SettingsChanged: (id) sender;
- (IBAction) PreviousPicture: (id) sender;
@@ -103,6 +99,13 @@
- (void)showPanelInWindow: (NSWindow *)fWindow forTitle: (hb_title_t *)title;
- (BOOL) loadMyNibFile;
+
++ (NSImage *) makeImageForPicture: (int)pictureIndex
+ libhb:(hb_handle_t*)handle
+ title:(hb_title_t*)title
+ removeBorders:(BOOL)removeBorders;
+- (NSImage *) imageForPicture: (int) pictureIndex;
+- (void) purgeImageCache;
@end
@interface NSObject (PictureControllertDelegateMethod)