PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Platters/extensibility/IImageFormat.cs

http://skimpt.googlecode.com/
C# | 92 lines | 27 code | 20 blank | 45 comment | 0 complexity | 4beb3b49d53f87d41d440a252aff9acf MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Windows.Forms;
 4using System.Drawing;
 5using System.Drawing.Imaging;
 6using System.Globalization;
 7using System.IO;
 8
 9
10public delegate void ImageCapturedEventHandler(object sender, ImageEventArgs e);
11public delegate void StreamHandler(Stream stream, Image image);
12public delegate void ImageCaptureInitializedEventHandler(object sender, EventArgs e);
13public delegate void ImageCapturingEventHandler(object sender, ImageEventArgs e);
14
15/// <summary>
16/// All new imageformats implement this interface to expose the methods
17/// </summary>
18public interface IImageFormat
19{
20
21
22
23    /// <summary>
24    /// This gets the "class" name through reflection 
25    /// to give us the format. 
26    /// EX: public class PNG : IImageFormat
27    /// Return: PNG
28    /// </summary>
29    IImageFormat Format { get; }
30
31
32    /// <summary>
33    /// Connects the specified persistable output.
34    /// </summary>
35    /// <param name="persistableOutput">The persistable output.</param>
36    void Connect(IImageOutput persistableOutput);
37
38    /// <summary>
39    /// Disconnects this instance.
40    /// </summary>
41    void Disconnect();
42
43      /// <summary>
44    /// Gets the extension.
45    /// </summary>
46    /// <value>The extension.</value>
47    string Extension { get; }
48
49    /// <summary>
50    /// Gets the description.
51    /// </summary>
52    /// <value>The description.</value>
53    string Description { get; }
54
55    /// <summary>
56    /// Gets the menu.
57    /// </summary>
58    /// <value>The menu.</value>
59    MenuItem Menu { get; }
60
61
62    void SaveImage(ImageEventArgs e);
63    
64
65}
66
67public interface IImageOutput
68{
69    /// <summary>
70    /// Occurs once a screen capture is complete.
71    /// </summary>
72    /// <remarks>
73    /// <para>
74    /// The full size image capture is available at this point as well 
75    /// as the thumbnail if enabled.</para>
76    /// <para>
77    /// Information about the capture as well as the images is available via the 
78    /// <see cref="ImageEventArgs"/> object.</para>
79    /// </remarks>
80    event ImageCapturedEventHandler ImageCaptured;
81
82    /// <summary>
83    /// Occurs when a plug-in is loaded but before any screen captures take place.
84    /// </summary>
85    event ImageCaptureInitializedEventHandler ImageCaptureInitialized;
86
87    /// <summary>
88    /// Occurs when a screen capture has started but before the image is available.
89    /// </summary>
90    event ImageCapturingEventHandler ImageCapturing;
91}
92