home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 June
/
Chip_2002-06_cd1.bin
/
ctenari
/
Krutak
/
univiewi_pdk.exe
/
plugin.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-03-19
|
3KB
|
120 lines
/*
UniView 1.8+ plugin SDK
This file is allows you to create UniView plugins. If you want to use it,
you must agree following text and you can start programming :-)
Copyright (C)1998-2002 by Andrej Krutak
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without written agreement is
hereby granted, provided that the above copyright notice appear in all copies
and that both copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or implied
warranty.
*/
#ifndef UNIVIEW_PLUGIN_
#define UNIVIEW_PLUGIN_
//Plugin -> UniView communication
#define PLGMSG_GETLANG 0x01 //Go to file's tail to see language codes...
#define PLGMSG_GETUVINST 0x02
#define PLGMSG_GETUVHWND 0x03
#define PLGMSG_GETEWHWND 0x04
#define PLGMSG_GETDOCPATH 0x05
#define PLGMSG_GETIMGCLASS 0x06
#define PLGMSG_DOCUMENTCHANGED 0x07
#define PLGMSG_IMAGEMAKEUNDO 0x08
#define PLGMSG_GETDOCTYPE 0x09
#define PLGMSG_OVERRIDERTFEDIT 0x10
//This functions is precessing all relevant plugin requests to UniView. See help for details
#ifdef __cplusplus
extern "C"
#endif
__declspec(dllexport) DWORD __stdcall UniView_doservice(DWORD message, DWORD wParam, DWORD lParam);
//UniView -> plugin communication
//Your functions has to be in following form specified and it must be __stdcall.
//int (*uvplugin_main)(HINSTANCE, DWORD, DWORD, DWORD);
#define MENU_FILE 0
#define MENU_EDIT 1
#define MENU_TEXT 2
#define MENU_MULTIMEDIA 3
#define MENU_IMAGE 4
#define MENU_PLUGINS 5 //This is obsolete, it's here just for backward compatibility
#define MENU_START 5
#define MENU_HELP 6
#define MENU_IMAGEEFFECTS 7
//Initializing structure, you must fill in: plugin_name, version_1, version_2, items_count and (items_count) count of up_menuitems
typedef struct {
char plugin_name[64];
int language;
int version_1, version_2;
struct _up_menuitems {
char name[64];
int place;
} up_menuitems[64];
int items_count;
} up_initdata;
#define UVMSG_INITPLUGIN 0x01
#define UVMSG_DOCUMENT_NEWOPENED 0x02
#define UVMSG_DOCUMENT_SAVED 0x03
#define UVMSG_SETTINGS_CHANGED 0x04
#define UVMSG_EXIT 0x05
#define UVMSG_COMMAND 0x06
#define UVMSG_STOPEXIT 0x07
#endif //UNIVIEW_PLUGIN_
/*
Additional informations for plugin development:
OFFICIAL UniView LANGUAGE CODES (other will be added on demand)
the 'Number' item is passed to plugin to indicate language when sending 'PLGMSG_GETLANG' message
----------------------------------------------------------------
Language Number ID Native name
---------------------------------------------------
English (US) 0 ENG English
Slovak 1 SVK Slovensk²
German 2 GER Deutsch
Spanish 3 SPA Espa±ol
French 4 FRN Franτis
Russian 5 RUS Russkij
Italian 6 ITA Italiano
Finnish 7 FIN
Swedish 8 SWE
Czech 9 CZE ╚esk²
Danish 10 DAN Dansk
Dutch 11 DUT
Slovenian 12 SLV Slovenski
Polish 13 POL Polski
Hungarian 14 HUN Magyar
Norwegian 15 NOR Norsk
Japanese 16 JAP
*/
/*
Return values for PLGMSG_GETDOCTYPE message:
0:
No file's opened
1:
Image
2:
Raw text file
3:
Rich text format file
4:
Multimedia file
5:
Binary file
*/