Moving back to trunk!

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-01-24 19:24:36 +00:00
commit 8d458998a1
332 changed files with 17647 additions and 9466 deletions

View file

@ -21,71 +21,13 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Greenshot.Plugin {
/// <summary>
/// The capture mode for Greenshot
/// </summary>
public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE };
/// <summary>
/// The destinations for the capture, these will be set during capture and can be modified by plugins
/// </summary>
public enum CaptureDestination {File, FileWithDialog, Clipboard, Printer, Editor, EMail};
public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE, Video, Import };
/// <summary>
/// Handler for the MakeCapture in ICaptureHost
/// </summary>
public delegate void CaptureHandler(object sender, CaptureTakenEventArgs e);
/// <summary>
/// The ICaptureHost is more or less the Interface that "Greenshot" itself implements (the MainForm)
/// over this Interface it is possible to register to the main ContextMenu or pass a Bitmap for processing
/// </summary>
public interface ICaptureHost {
/// <summary>
/// Process a bitmap like it was captured
/// </summary>
void HandleCapture(Bitmap bitmap);
/// <summary>
/// Make Capture with default destinations
/// </summary>
/// <param name="mode">CaptureMode</param>
/// <param name="captureMouseCursor">bool false if the mouse should not be captured, true if the configuration should be checked</param>
void MakeCapture(CaptureMode mode, bool captureMouseCursor);
/// <summary>
/// Make Capture with specified destinations
/// </summary>
/// <param name="mode">CaptureMode</param>
/// <param name="captureMouseCursor">bool false if the mouse should not be captured, true if the configuration should be checked</param>
/// <param name="captureDestinations">List<CaptureDestination> with destinations</param>
void MakeCapture(CaptureMode mode, bool captureMouseCursor, List<CaptureDestination> captureDestinations);
/// <summary>
/// Make Capture with specified Handler
/// </summary>
/// <param name="mode"></param>
/// <param name="captureMouseCursor">bool false if the mouse should not be captured, true if the configuration should be checked</param>
/// <param name="captureHandler">CaptureHandler delegate</param>
void MakeCapture(CaptureMode mode, bool captureMouseCursor, CaptureHandler captureHandler);
/// <summary>
/// Make capture of window
/// </summary>
/// <param name="window">WindowDetails of the window to capture</param>
//void MakeCapture(WindowDetails window);
/// <summary>
/// Make capture of window
/// </summary>
/// <param name="window">WindowDetails of the window to capture</param>
/// <param name="captureMouseCursor">bool false if the mouse should not be captured, true if the configuration should be checked</param>
//void MakeCapture(WindowDetails window, CaptureHandler captureHandler);
}
/// <summary>
/// Details for the capture, like the window title and date/time etc.
/// </summary>
@ -104,7 +46,7 @@ namespace Greenshot.Plugin {
set;
}
List<CaptureDestination> CaptureDestinations {
List<IDestination> CaptureDestinations {
get;
set;
}
@ -121,13 +63,9 @@ namespace Greenshot.Plugin {
void AddMetaData(string key, string value);
void ClearDestinations();
void RemoveDestination(CaptureDestination captureDestination);
void AddDestination(CaptureDestination captureDestination);
CaptureHandler CaptureHandler {
get;
set;
}
void RemoveDestination(IDestination captureDestination);
void AddDestination(IDestination captureDestination);
bool HasDestination(string designation);
CaptureMode CaptureMode {
get;
@ -144,6 +82,23 @@ namespace Greenshot.Plugin {
}
}
public interface ICaptureElement {
List<ICaptureElement> Children {
get;
set;
}
Rectangle Bounds {
get;
set;
}
string Name {
get;
set;
}
ICaptureElement FindElementUnderPoint(Point p);
}
/// <summary>
/// The interface to the Capture object, so Plugins can use it.
/// </summary>
@ -193,12 +148,32 @@ namespace Greenshot.Plugin {
bool Crop(Rectangle cropRectangle);
/// <summary>
/// Apply a translate to the mouse location.
/// e.g. needed for crop
/// Apply a translate to the mouse location. e.g. needed for crop
/// </summary>
/// <param name="x">x coordinates to move the mouse</param>
/// <param name="y">y coordinates to move the mouse</param>
void MoveMouseLocation(int x, int y);
/// <summary>
/// Apply a translate to the elements e.g. needed for crop
/// </summary>
/// <param name="x">x coordinates to move the elements</param>
/// <param name="y">y coordinates to move the elements</param>
void MoveElements(int x, int y);
/// <summary>
/// Add a new element to the capture
/// </summary>
/// <param name="element">Rectangle</param>
void AddElement(ICaptureElement element);
/// <summary>
/// Returns a list of rectangles which represent objects that are "on" the capture
/// </summary>
List<ICaptureElement> Elements {
get;
set;
}
}
}