1 /* 2 * Copyright (c) 2007, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org> 7 */ 8 #ifndef PACKAGEIMAGEVIEWER_H 9 #define PACKAGEIMAGEVIEWER_H 10 11 #include <Window.h> 12 #include <View.h> 13 #include <Bitmap.h> 14 #include <DataIO.h> 15 16 17 18 class ImageView : public BView { 19 public: 20 ImageView(BPositionIO *image); 21 ~ImageView(); 22 23 void AttachedToWindow(); 24 void Draw(BRect updateRect); 25 void MouseUp(BPoint point); 26 27 private: 28 BBitmap *fImage; 29 bool fSuccess; 30 }; 31 32 33 class PackageImageViewer : public BWindow { 34 public: 35 PackageImageViewer(BPositionIO *image); 36 ~PackageImageViewer(); 37 38 void Go(); 39 40 void MessageReceived(BMessage *msg); 41 42 private: 43 ImageView *fBackground; 44 45 sem_id fSemaphore; 46 }; 47 48 49 #endif 50 51