ClipX – Software Development Kit

ClipXHost API



const char *getVersion();

Returns the ClipX version string.

int isBeta();

Returns 1 if a beta version.

const char *getPlatformId();

Returns the platform id.

Returned value (const char *):

"Win32": for 32 bits operating systems.
"Win64": for 64 bits operating systems.

const char *getArchitectureId();

Returns the architecture id.

Returned value (const char *):

"x86": for 32 bits builds.
"x64": for 64 bits builds.

void exit();

Exit ClipX (deferred)

const char *getInstallPath();

Returns the path in which ClipX is installed.

int history_getNumItems();

Returns the number of items in the clipboard history

int history_getItemType(int idx);

Get an item's type.

int idx

The index of the item of which to get the type.

Returned value (int):

-1: Invalid index
0: Text item's
1: Bitmap item

const char *history_getItemText(int idx);

Get an item's text.

int idx

The index of the item of which to get the text.

Returned value (const char *):

The text of the clipboard item or NULL if idx is an invalid index.
Bitmaps return "Bitmap WxH".
Encoding is UTF8.

int history_getItemBitmapWidth(int idx);

Get a bitmap item's width.

int idx

The index of the item of which to get the width.

Returned value (int):

The width of the bitmap item, or -1 if idx is either an invalid index or not a bitmap item.

int history_getItemBitmapHeight(int idx);

Get a bitmap item's height.

int idx

The index of the item of which to get the height.

Returned value (int):

The height of the bitmap item, or -1 if idx is either an invalid index or not a bitmap item.

COLORREF *history_getItemBitmapBits(int idx);

Get a pointer to a bitmap item's bits.

int idx

The index of the item of which to get the bits.

Returned value (COLORREF *):

A pointer to a bitmap bits array, or NULL if idx is either an invalid index or not a bitmap item.

int history_getFileListCount(int idx);

Get the number of files in a file list entry.

int idx

The index of the item of which to get the number of files.

Returned value (int):

The number of files in the file list, or -1 if idx is not a filelist item.

const char *history_getFileListFile(int idx, int fileidx);

Enumerate the files in a filelist item.

int idx

The index of the item of which to enumerate the files.

int fileidx

The index of the file to retrieve.

Returned value (const char *):

The name of the file, or NULL if fileidx is an invalid index, or if idx is an invalid item or not a filelist.
Encoding is UTF8.

void history_deleteItem(int idx);

Delete an item from the history

int idx

The index of the item to delete

void history_moveItem(int idx, int newidx);

Move an item to another location

int oldidx

The index of the item to move

int newidx

The new location for the item (0 = first, 1 = second, -1 = last)

void config_allowApply();

Enables the Apply button in the configuration.

Void misc_navigate(const char *url);

Navigate to the provided URL, using the user selected method.

const char *url

The URL to navigate to.

void misc_formatLine(const char *dest, int destlen, const char *source, int doubleands)

Format a block of text into a one line suitable for single line display.

const chat *dest

The destination buffer

int destlen

The size of the destination buffer

const char *source

The source text to format

int doubleands

Whether to turn “&” characters into “&&”, for win32 draw text purposes.

void misc_paste(const char *text)

Paste arbitrary text in the currently active application.

const char *text

The arbitrary text to paste in the application

void misc_pasteHistoryItem(int idx)

Paste a clipboard history item in the currently active application

int idx

The index of the item to paste.

void hotkey_subclassEditBox(HWND editBoxWnd)

Subclass an edit control and turns it into an extended hotkey control.

HWND editBoxWnd

The HWND of the editbox control you wish to turn into an extended hotkey control.

void hotkey_decode(int *keyCode, int *modifiers, WORD controlHotkeyCode)

Decode a control hotkey code into its RegisterHotkey components.

int *keyCode

A pointer to integer that will receive the value to use as the vk parameter in a RegisterHotkey call.

int *modifiers

A pointer to integer that will receive the value to use as the fsModifiers parameter in a RegisterHotkey call.

WORD controlHotkeyCode

The value received from a WM_GETHOTKEY message to the control.

WORD hotkey_encode(int keyCode, int modifiers)

Encode a control hotkey code from its RegisterHotkey components.

int keyCode

The value used as the vk parameter in a RegisterHotkey call for the corresponding hotkey.

int modifiers

The value used as the fsModifiers in a RegisterHotkey call for the corresponding hotkey.

Returned value (WORD):

The code to send to the control in a WM_SETHOTKEY message.



Back to documentation index