I'm begining developing the Quicklook for windows. Here it's my ideas for design, for available controls for plugins' developers.
On the picture (attach was painted by me
1. Image control - you will be able to add any picture from file's path/HICON/memory/may something else.
2. Text control - just setup text's size, style, color, alignments and etc.
3. The client area, where your (plugin's) controls will have a place.
4. Command button - just a button, I think it will be enough (for the first time) only change its text.
5. Radio/Check boxes - they are the same, but only one thing, radio controls that only one button can be checked.
6. Track bar - may create only two styles (large/small) or may make possible to control height, color of the background, size, gradient colors of the track button.
7. There are buttons you will be able to add your own buttons (but it would be another API, not like for client area, I will think about later).
Plugin - it's a simple .dll file (may rename extension). You write a plugin using Quicklook's API.
I'm going to implement following:
1. Controls, also create Video Player, Coverflow, Text viewer/editor...
2. You won't have to know anything about DirectShow, Gdiplus and so on, you will just set your properties for controls and simply run them.
3. Every control has its own ID (DWORD). Using this ID, you can get/set all properties using the same API. You just prepare a special structure and install neccessery flags (for properties) and call API.
After all, when the base will be written, I think only then we can create a new type of control - container. What does it mean ? You can create container (on client area), then receive its handle (HWND), and place your child windows there.
Here it's only what I know/think about for now.
If somebody wants to join me, just send me a private message or write to ICQ 240605815.
Thanks. Vladimir.
Quicklook API
Support Controls:
- Picture
- Button
- Text
Implementation of API:
/*
Quicklook API for Windows.
*/
#ifndef QUICKLOOKAPI_H
#define QUICKLOOKAPI_H
// version
#define QLVersion 0x0001 // 0.0.0.1
// defenitions
#define QLCallType __stdcall
#define QLVoid void
#define QLNull 0
#define QLUInt8 unsigned char
#define QLUInt16 unsigned short
#define QLUInt32 unsigned int
#define QLSInt8 signed char
#define QLSInt16 signed short
#define QLSInt32 signed int
#define QLBool QLUInt8
#define QLTrue 1
#define QLFalse 0
#define QLId QLUInt32
#define QLChar wchar_t
#define QLString QLChar*
#define QLCharLen 256
#define QLImage QLVoid*
// IMPORTANT: when you call a function which has argument QLString (QLChar*), you should allocate memory for it.
// Example: QLChar buffer[QLCharLen];
struct QLURect
{
QLUInt32 x;
QLUInt32 y;
QLUInt32 width;
QLUInt32 height;
};
typedef struct QLURect QLURect;
// supported controls
enum QLControl
{
QLControlNone = 0,
QLControlButton,
QLControlPicture,
QLControlText
};
typedef enum QLControl QLControl;
// controls' properties
enum QLControlPropery
{
QLPropertyNone = 0,
QLPropertyRect,
QLPropertyEnabled,
QLPropertyVisible,
QLPropertyText,
QLPropertyImage,
QLPropertyTextAlignment,
QLPropertyTextVAlignment,
QLPropertyFontSize,
QLPropertyFontColor,
QLPropertyFontStyle
};
typedef enum QLControlPropery QLControlPropery;
// text alignments
enum QLTextAlignment
{
QLTextAlignmentCenter = 0,
QLTextAlignmentNear,
QLTextAlignmentFar
};
typedef enum QLTextAlignment QLTextAlignment;
// font style
enum QLFontStyle
{
QLFontStyleNone = 0,
QLFontStyleBold,
QLFontStyleItalic,
QLFontStyleBoldItalic,
QLFontStyleStrikeout,
QLFontStyleUnderline
};
typedef enum QLFontStyle QLFontStyle;
// Plugin API
enum QLQueryInformationFlags
{
QLQueryPluginInfo = 1 << 0
};
struct QLQueryInformation
{
QLUInt32 flags;
// QLQueryPluginInfo
QLUInt16 version;
QLString description;
QLString extensions;
};
typedef struct QLQueryInformation QLQueryInformation;
enum QLContainerEvent
{
QLContainerEventNone = 0,
QLContainerEventCreate,
QLContainerEventDestroy,
QLContainerEventChangeArea,
QLContainerEventFullScreenOn,
QLContainerEventFullScreenOff,
};
typedef enum QLContainerEvent QLContainerEvent;
enum QLControlEvent
{
QLControlEventNone = 0,
QLControlEventLeftClick
};
typedef enum QLControlEvent QLControlEvent;
// processing errors
enum QLError
{
QLOkay = 0,
QLInternalError,
QLIncorrectParameters,
QLPropertyNotFound,
QLNotEnoughMemory,
QLNotSupportedImageFormat,
QLUnknown
};
typedef enum QLError QLError;
QLError QLCallType QLGetLastError();
// API Functions
// Quicklook Core
QLBool QLCallType QLImageCreate(QLImage *image); // create instance
QLVoid QLCallType QLImageDelete(QLImage image); // delete instance
QLBool QLCallType QLImageResize(QLImage image, QLUInt16 width, QLUInt16 height); // new size of the image
QLVoid QLCallType QLImageFree(QLImage image); // free data of image, but image's instance won't be deleted.
// get data
QLUInt16 QLCallType QLImageWidth(QLImage image); // width is in pixels
QLUInt16 QLCallType QLImageHeight(QLImage image); // height is in pixels
QLVoid* QLCallType QLImagePixels(QLImage image, QLUInt16 x, QLUInt16 y); // pointer to ARGB array
QLUInt32 QLCallType QLImageDC(QLImage image); // HDC
QLVoid* QLCallType QLImageBitmap(QLImage image); // Gdiplus::Bitmap
// functions
QLVoid QLCallType QLImageRotate180(QLImage image);
QLVoid QLCallType QLImageBlur(QLImage image, QLUInt16 destX, QLUInt16 destY, QLUInt16 destWidth, QLUInt16 destHeight,
QLUInt16 missX, QLUInt16 missY, QLUInt16 missWidth, QLUInt16 missHeight,
QLUInt16 alpha);
// load image
QLBool QLCallType QLImageSetImage(QLImage image, QLImage originalImage);
QLBool QLCallType QLImageSetBits(QLImage image, QLVoid *scan0, QLUInt8 bits, QLUInt16 width, QLUInt16 height);
QLBool QLCallType QLImageSetIcon(QLImage image, QLUInt32 icon); // HICON
QLBool QLCallType QLImageSetBitmap(QLImage image, QLVoid *bitmap); // Gdiplus::Bitmap
QLBool QLCallType QLImageSetFileName(QLImage image, QLString fileName);
QLBool QLCallType QLImageSetResourceFileName(QLImage image, QLString fileName, QLString resName); // load any image from resources
QLBool QLCallType QLImageSetResource(QLImage image, QLUInt32 module, QLString resName); // HMODULE
// Quicklook plugin's area
QLBool QLCallType QLGetArea(QLURect *rect);
QLBool QLCallType QLGetApplicationPath(QLString path);
QLBool QLCallType QLGetApplicationDataPath(QLString path);
QLBool QLCallType QLGetPluginPath(QLString path);
QLBool QLCallType QLGetFileName(QLString path);
QLBool QLCallType QLGetPIDL(QLVoid **pIdl);
// Quicklook Controls
QLId QLCallType QLControlCreate(QLControl control);
QLBool QLCallType QLControlDelete(QLId id);
QLBool QLCallType QLControlMove(QLId id, QLUInt32 x, QLUInt32 y);
QLBool QLCallType QLControlSize(QLId id, QLUInt32 width, QLUInt32 height);
QLBool QLCallType QLControlSetProperty(QLId id, QLControlPropery prop, QLVoid *value);
QLBool QLCallType QLControlGetProperty(QLId id, QLControlPropery prop, QLVoid *value);
#endif /* QUICKLOOKAPI_H */
Attached File(s)
-
bckg.png (128.68K)
Number of downloads: 310








Sign In »
Register Now!
Help

MultiQuote
