home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / Chip_2002-02_cd1.bin / ctenari / Krutak / univiewi_pdk.exe / plugin.h < prev    next >
C/C++ Source or Header  |  2001-12-16  |  3KB  |  115 lines

  1. /*
  2.     UniView 1.73+ plugin SDK
  3.  
  4.     This file is allows you to create UniView plugins. If you want to use it,
  5.     you must agree following text and you can start programming :-)
  6.  
  7.     Copyright (C)1998-2001 by Andrej Krutak
  8.  
  9.     Permission to use, copy, modify, and distribute this software and its
  10.     documentation for any purpose, without fee, and without written agreement is
  11.     hereby granted, provided that the above copyright notice appear in all copies
  12.     and that both copyright notice and this permission notice appear in supporting
  13.     documentation.  This software is provided "as is" without express or implied
  14.     warranty.
  15. */
  16.  
  17. #ifndef UNIVIEW_PLUGIN_
  18. #define UNIVIEW_PLUGIN
  19.  
  20. //Plugin -> UniView communication
  21.  
  22. #define PLGMSG_GETLANG            0x01 //Go to file's tail to see language codes...
  23. #define PLGMSG_GETUVINST        0x02
  24. #define PLGMSG_GETUVHWND        0x03
  25. #define PLGMSG_GETEWHWND        0x04
  26. #define PLGMSG_GETDOCPATH        0x05
  27. #define PLGMSG_GETIMGCLASS        0x06
  28. #define PLGMSG_DOCUMENTCHANGED    0x07
  29. #define PLGMSG_IMAGEMAKEUNDO    0x08
  30. #define PLGMSG_GETDOCTYPE        0x09
  31.  
  32. //This functions is precessing all relevant plugin requests to UniView. See help for details
  33. extern "C" __declspec(dllexport) DWORD __stdcall UniView_doservice(DWORD message, DWORD wParam, DWORD lParam);
  34.  
  35. //UniView -> plugin communication
  36.  
  37. //Your functions has to be in following form specified and it must be __stdcall.
  38. //int    (*uvplugin_main)(HINSTANCE, DWORD, DWORD, DWORD);
  39.  
  40. #define MENU_FILE 0
  41. #define MENU_EDIT 1
  42. #define MENU_TEXT 2
  43. #define MENU_MULTIMEDIA 3
  44. #define MENU_IMAGE 4
  45. #define MENU_PLUGINS 5
  46. #define MENU_HELP 6
  47. #define MENU_IMAGEEFFECTS 7
  48.  
  49. //Initializing structure, you must fill in: plugin_name, version_1, version_2, items_count and (items_count) count of up_menuitems
  50. typedef struct {
  51.     char plugin_name[64];
  52.     int language;
  53.     int version_1, version_2;
  54.  
  55.     struct _up_menuitems {
  56.         char name[64];
  57.         int place;
  58.     } up_menuitems[64];
  59.     int items_count;
  60. } up_initdata;
  61.  
  62. #define UVMSG_INITPLUGIN            0x01
  63. #define UVMSG_DOCUMENT_NEWOPENED    0x02
  64. #define UVMSG_DOCUMENT_SAVED        0x03
  65. #define UVMSG_SETTINGS_CHANGED        0x04
  66. #define UVMSG_EXIT                    0x05
  67. #define UVMSG_COMMAND                0x06
  68. #define UVMSG_STOPEXIT                0x07
  69.  
  70. #endif
  71.  
  72.  
  73. /*
  74. Additional informations for plugin development:
  75.  
  76. OFFICIAL UniView LANGUAGE CODES (other will be added on demand)
  77. the 'Number' item is passed to plugin to indicate language when sending 'PLGMSG_GETLANG' message
  78. ----------------------------------------------------------------
  79.  
  80. Language        Number        ID        Native name
  81. ---------------------------------------------------
  82. English (US)    0            ENG        English
  83. Slovak            1            SVK        Slovensk²
  84. German            2            GER        Deutsch
  85. Spanish            3            SPA        Espa±ol
  86. French            4            FRN        Franτis
  87. Russian            5            RUS        Russkij
  88. Italian            6            ITA        Italiano
  89. Finnish            7            FIN        
  90. Swedish            8            SWE        
  91. Czech            9            CZE        ╚esk²
  92. Danish            10            DAN        Dansk
  93. Dutch            11            DUT        
  94. Slovenian        12            SLV        Slovenski
  95. Polish            13            POL        Polski
  96. Hungarian        14            HUN        Magyar
  97. Norwegian        15            NOR        Norsk
  98. Japanese        16            JAP        
  99. */
  100.  
  101. /*
  102. Return values for PLGMSG_GETDOCTYPE message:
  103. 0:
  104.     No file's opened
  105. 1:
  106.     Image
  107. 2:
  108.     Raw text file
  109. 3:
  110.     Rich text format file
  111. 4:
  112.     Multimedia file
  113. 5:
  114.     Binary file
  115. */