2 #ifndef __FAR2SDK_FARPLUG_MB_H__
3 #define __FAR2SDK_FARPLUG_MB_H__
14 #include "farcommon.h"
15 const int NM
= MAX_PATH
;
19 FMSG_WARNING
= 0x00000001,
20 FMSG_ERRORTYPE
= 0x00000002,
21 FMSG_KEEPBACKGROUND
= 0x00000004,
22 FMSG_DOWN
= 0x00000008,
23 FMSG_LEFTALIGN
= 0x00000010,
25 FMSG_ALLINONE
= 0x00000020,
26 FMSG_COLOURS
= 0x00000040,
28 FMSG_DISPLAYNOTIFY
= 0x00000080,
30 FMSG_MB_OK
= 0x00010000,
31 FMSG_MB_OKCANCEL
= 0x00020000,
32 FMSG_MB_ABORTRETRYIGNORE
= 0x00030000,
33 FMSG_MB_YESNO
= 0x00040000,
34 FMSG_MB_YESNOCANCEL
= 0x00050000,
35 FMSG_MB_RETRYCANCEL
= 0x00060000,
38 typedef int (WINAPI
*FARAPIMESSAGE
)(
41 const char *HelpTopic
,
42 const char * const *Items
,
67 enum FarDialogItemFlags
69 DIF_COLORMASK
= 0x000000ffUL
,
70 DIF_SETCOLOR
= 0x00000100UL
,
71 DIF_BOXCOLOR
= 0x00000200UL
,
72 DIF_GROUP
= 0x00000400UL
,
73 DIF_LEFTTEXT
= 0x00000800UL
,
74 DIF_MOVESELECT
= 0x00001000UL
,
75 DIF_SHOWAMPERSAND
= 0x00002000UL
,
76 DIF_CENTERGROUP
= 0x00004000UL
,
77 DIF_NOBRACKETS
= 0x00008000UL
,
78 DIF_MANUALADDHISTORY
= 0x00008000UL
,
79 DIF_SEPARATOR
= 0x00010000UL
,
80 DIF_VAREDIT
= 0x00010000UL
,
81 DIF_SEPARATOR2
= 0x00020000UL
,
82 DIF_EDITOR
= 0x00020000UL
,
83 DIF_LISTNOAMPERSAND
= 0x00020000UL
,
84 DIF_LISTNOBOX
= 0x00040000UL
,
85 DIF_HISTORY
= 0x00040000UL
,
86 DIF_BTNNOCLOSE
= 0x00040000UL
,
87 DIF_CENTERTEXT
= 0x00040000UL
,
88 DIF_NOTCVTUSERCONTROL
= 0x00040000UL
,
89 DIF_SEPARATORUSER
= 0x00080000UL
,
90 DIF_EDITEXPAND
= 0x00080000UL
,
91 DIF_DROPDOWNLIST
= 0x00100000UL
,
92 DIF_USELASTHISTORY
= 0x00200000UL
,
93 DIF_MASKEDIT
= 0x00400000UL
,
94 DIF_SELECTONENTRY
= 0x00800000UL
,
95 DIF_3STATE
= 0x00800000UL
,
96 DIF_EDITPATH
= 0x01000000UL
,
97 DIF_LISTWRAPMODE
= 0x01000000UL
,
98 DIF_LISTAUTOHIGHLIGHT
= 0x02000000UL
,
99 DIF_LISTNOCLOSE
= 0x04000000UL
,
100 DIF_AUTOMATION
= 0x08000000UL
,
101 DIF_HIDDEN
= 0x10000000UL
,
102 DIF_READONLY
= 0x20000000UL
,
103 DIF_NOFOCUS
= 0x40000000UL
,
104 DIF_DISABLE
= 0x80000000UL
,
124 DM_SETREDRAW
=DM_REDRAW
,
127 DM_SETTEXTLENGTH
=DM_SETMAXTEXTLENGTH
,
160 DM_GETDROPDOWNOPENED
,
161 DM_SETDROPDOWNOPENED
,
166 DM_SETMOUSEEVENTNOTIFY
,
168 DM_EDITUNCHANGEDFLAG
,
174 DM_LISTSETMOUSEREACTION
,
218 DM_KILLSAVESCREEN
=DN_FIRST
-1,
219 DM_ALLKEYMODE
=DN_FIRST
-2,
220 DN_ACTIVATEAPP
=DM_USER
-1,
225 BSTATE_UNCHECKED
= 0,
231 enum FARLISTMOUSEREACTIONTYPE
240 LIF_SELECTED
= 0x00010000UL
,
241 LIF_CHECKED
= 0x00020000UL
,
242 LIF_SEPARATOR
= 0x00040000UL
,
243 LIF_DISABLE
= 0x00080000UL
,
244 LIF_GRAYED
= 0x00100000UL
,
245 LIF_HIDDEN
= 0x00200000UL
,
246 LIF_USETEXTPTR
= 0x40000000UL
,
247 LIF_DELETEUSERDATA
= 0x80000000UL
,
260 struct FarListItem Item
;
266 struct FarListItem Item
;
269 struct FarListGetItem
272 struct FarListItem Item
;
281 enum FARLISTFINDFLAGS
283 LIFIND_EXACTMATCH
= 0x00000001,
300 enum FARLISTINFOFLAGS
302 LINFO_SHOWNOBOX
= 0x00000400,
303 LINFO_AUTOHIGHLIGHT
= 0x00000800,
304 LINFO_REVERSEHIGHLIGHT
= 0x00001000,
305 LINFO_WRAPMODE
= 0x00008000,
306 LINFO_SHOWAMPERSAND
= 0x00010000,
320 struct FarListItemData
331 struct FarListItem
*Items
;
361 struct FarList
*ListItems
;
365 #ifdef _FAR_NO_NAMELESS_UNIONS
382 #ifdef _FAR_NO_NAMELESS_UNIONS
388 struct FarDialogItemData
394 struct FarDialogEvent
403 struct OpenDlgPluginData
411 FDLG_WARNING
= 0x00000001,
412 FDLG_SMALLDIALOG
= 0x00000002,
413 FDLG_NODRAWSHADOW
= 0x00000004,
414 FDLG_NODRAWPANEL
= 0x00000008,
415 FDLG_NONMODAL
= 0x00000010,
416 FDLG_KEEPCONSOLETITLE
= 0x00000020,
417 FDLG_REGULARIDLE
= 0x00000040 // causes dialog to receive DN_ENTERIDLE at least once per second
420 typedef LONG_PTR(WINAPI
*FARWINDOWPROC
)(
427 typedef LONG_PTR(WINAPI
*FARAPISENDDLGMESSAGE
)(
434 typedef LONG_PTR(WINAPI
*FARAPIDEFDLGPROC
)(
441 typedef int (WINAPI
*FARAPIDIALOG
)(
442 INT_PTR PluginNumber
,
447 const char *HelpTopic
,
448 struct FarDialogItem
*Item
,
452 typedef int (WINAPI
*FARAPIDIALOGEX
)(
453 INT_PTR PluginNumber
,
458 const char *HelpTopic
,
459 struct FarDialogItem
*Item
,
463 FARWINDOWPROC DlgProc
,
478 MIF_SELECTED
= 0x00010000UL
,
479 MIF_CHECKED
= 0x00020000UL
,
480 MIF_SEPARATOR
= 0x00040000UL
,
481 MIF_DISABLE
= 0x00080000UL
,
482 MIF_GRAYED
= 0x00100000UL
,
483 MIF_HIDDEN
= 0x00200000UL
,
484 MIF_USETEXTPTR
= 0x80000000UL
,
502 FMENU_SHOWAMPERSAND
= 0x00000001,
503 FMENU_WRAPMODE
= 0x00000002,
504 FMENU_AUTOHIGHLIGHT
= 0x00000004,
505 FMENU_REVERSEAUTOHIGHLIGHT
= 0x00000008,
506 FMENU_SHOWNOBOX
= 0x00000010,
507 FMENU_USEEXT
= 0x00000020,
508 FMENU_CHANGECONSOLETITLE
= 0x00000040,
511 typedef int (WINAPI
*FARAPIMENU
)(
512 INT_PTR PluginNumber
,
519 const char *HelpTopic
,
520 const int *BreakKeys
,
522 const struct FarMenuItem
*Item
,
527 enum PLUGINPANELITEMFLAGS
529 PPIF_PROCESSDESCR
= 0x80000000,
530 PPIF_SELECTED
= 0x40000000,
531 PPIF_USERDATA
= 0x20000000,
536 FILETIME ftCreationTime
;
537 FILETIME ftLastAccessTime
;
538 FILETIME ftLastWriteTime
;
539 DWORD64 nPhysicalSize
;
541 DWORD dwFileAttributes
;
543 CHAR cFileName
[MAX_NAME
];
546 struct PluginPanelItem
548 FAR_FIND_DATA FindData
;
555 char **CustomColumnData
;
556 int CustomColumnNumber
;
558 DWORD_PTR Reserved
[2];
563 PFLAGS_SHOWHIDDEN
= 0x00000001,
564 PFLAGS_HIGHLIGHT
= 0x00000002,
565 PFLAGS_REVERSESORTORDER
= 0x00000004,
566 PFLAGS_USESORTGROUPS
= 0x00000008,
567 PFLAGS_SELECTEDFIRST
= 0x00000010,
568 PFLAGS_REALNAMES
= 0x00000020,
569 PFLAGS_NUMERICSORT
= 0x00000040,
570 PFLAGS_PANELLEFT
= 0x00000080,
586 struct PluginPanelItem
*PanelItems
;
588 struct PluginPanelItem
*SelectedItems
;
589 int SelectedItemsNumber
;
595 char ColumnTypes
[80];
596 char ColumnWidths
[80];
604 struct PanelRedrawInfo
616 enum FILE_CONTROL_COMMANDS
620 FCTL_GETANOTHERPANELINFO
,
622 FCTL_UPDATEANOTHERPANEL
,
624 FCTL_REDRAWANOTHERPANEL
,
625 FCTL_SETANOTHERPANELDIR
,
629 FCTL_SETANOTHERSELECTION
,
631 FCTL_SETANOTHERVIEWMODE
,
638 FCTL_SETANOTHERSORTMODE
,
640 FCTL_SETANOTHERSORTORDER
,
641 FCTL_GETCMDLINESELECTEDTEXT
,
642 FCTL_SETCMDLINESELECTION
,
643 FCTL_GETCMDLINESELECTION
,
644 FCTL_GETPANELSHORTINFO
,
645 FCTL_GETANOTHERPANELSHORTINFO
,
646 FCTL_CHECKPANELSEXIST
,
648 FCTL_SETANOTHERNUMERICSORT
,
652 typedef int (WINAPI
*FARAPICONTROL
)(
658 typedef void (WINAPI
*FARAPITEXT
)(
665 typedef HANDLE(WINAPI
*FARAPISAVESCREEN
)(int X1
, int Y1
, int X2
, int Y2
);
667 typedef void (WINAPI
*FARAPIRESTORESCREEN
)(HANDLE hScreen
);
670 typedef int (WINAPI
*FARAPIGETDIRLIST
)(
672 struct PluginPanelItem
**pPanelItem
,
676 typedef int (WINAPI
*FARAPIGETPLUGINDIRLIST
)(
677 INT_PTR PluginNumber
,
680 struct PluginPanelItem
**pPanelItem
,
684 typedef void (WINAPI
*FARAPIFREEDIRLIST
)(const struct PluginPanelItem
*PanelItem
);
688 VF_NONMODAL
= 0x00000001,
689 VF_DELETEONCLOSE
= 0x00000002,
690 VF_ENABLE_F6
= 0x00000004,
691 VF_DISABLEHISTORY
= 0x00000008,
692 VF_IMMEDIATERETURN
= 0x00000100,
693 VF_DELETEONLYFILEONCLOSE
= 0x00000200,
696 typedef int (WINAPI
*FARAPIVIEWER
)(
697 const char *FileName
,
708 EF_NONMODAL
= 0x00000001,
709 EF_CREATENEW
= 0x00000002,
710 EF_ENABLE_F6
= 0x00000004,
711 EF_DISABLEHISTORY
= 0x00000008,
712 EF_DELETEONCLOSE
= 0x00000010,
713 EF_USEEXISTING
= 0x00000020,
714 EF_BREAKIFOPEN
= 0x00000040,
715 EF_NEWIFOPEN
= 0x00000080,
716 EF_IMMEDIATERETURN
= 0x00000100,
717 EF_DELETEONLYFILEONCLOSE
= 0x00000200,
718 EF_SERVICEREGION
= 0x00001000,
725 EEC_NOT_MODIFIED
= 2,
726 EEC_LOADING_INTERRUPTED
= 3,
727 EEC_OPENED_EXISTING
= 4,
728 EEC_ALREADY_EXISTS
= 5,
729 EEC_OPEN_NEWINSTANCE
= 6,
733 typedef int (WINAPI
*FARAPIEDITOR
)(
734 const char *FileName
,
745 typedef int (WINAPI
*FARAPICMPNAME
)(
752 enum FARCHARTABLE_COMMAND
754 FCT_DETECT
=0x40000000,
759 unsigned char DecodeTable
[256];
760 unsigned char EncodeTable
[256];
761 unsigned char UpperTable
[256];
762 unsigned char LowerTable
[256];
766 typedef int (WINAPI
*FARAPICHARTABLE
)(
772 typedef const char*(WINAPI
*FARAPIGETMSG
)(
773 INT_PTR PluginNumber
,
780 FHELP_NOSHOWERROR
= 0x80000000,
781 FHELP_SELFHELP
= 0x00000000,
782 FHELP_FARHELP
= 0x00000001,
783 FHELP_CUSTOMFILE
= 0x00000002,
784 FHELP_CUSTOMPATH
= 0x00000004,
785 FHELP_USECONTENTS
= 0x40000000,
788 typedef BOOL (WINAPI
*FARAPISHOWHELP
)(
789 const char *ModuleName
,
794 enum ADVANCED_CONTROL_COMMANDS
796 ACTL_GETFARVERSION
= 0,
797 ACTL_CONSOLEMODE
= 1,
798 ACTL_GETSYSWORDDIV
= 2,
801 ACTL_GETARRAYCOLOR
= 5,
804 ACTL_POSTKEYSEQUENCE
= 8,
805 ACTL_GETWINDOWINFO
= 9,
806 ACTL_GETWINDOWCOUNT
= 10,
807 ACTL_SETCURRENTWINDOW
= 11,
809 ACTL_GETFARHWND
= 13,
810 ACTL_GETSYSTEMSETTINGS
= 14,
811 ACTL_GETPANELSETTINGS
= 15,
812 ACTL_GETINTERFACESETTINGS
= 16,
813 ACTL_GETCONFIRMATIONS
= 17,
814 ACTL_GETDESCSETTINGS
= 18,
815 ACTL_SETARRAYCOLOR
= 19,
816 ACTL_GETWCHARMODE
= 20,
817 ACTL_GETPLUGINMAXREADDATA
= 21,
818 ACTL_GETDIALOGSETTINGS
= 22,
819 ACTL_GETSHORTWINDOWINFO
= 23,
820 ACTL_REMOVEMEDIA
= 24,
821 ACTL_GETMEDIATYPE
= 25,
822 ACTL_GETPOLICIES
= 26,
826 enum FarPoliciesFlags
828 FFPOL_MAINMENUSYSTEM
= 0x00000001,
829 FFPOL_MAINMENUPANEL
= 0x00000002,
830 FFPOL_MAINMENUINTERFACE
= 0x00000004,
831 FFPOL_MAINMENULANGUAGE
= 0x00000008,
832 FFPOL_MAINMENUPLUGINS
= 0x00000010,
833 FFPOL_MAINMENUDIALOGS
= 0x00000020,
834 FFPOL_MAINMENUCONFIRMATIONS
= 0x00000040,
835 FFPOL_MAINMENUPANELMODE
= 0x00000080,
836 FFPOL_MAINMENUFILEDESCR
= 0x00000100,
837 FFPOL_MAINMENUFOLDERDESCR
= 0x00000200,
838 FFPOL_MAINMENUVIEWER
= 0x00000800,
839 FFPOL_MAINMENUEDITOR
= 0x00001000,
840 FFPOL_MAINMENUCOLORS
= 0x00004000,
841 FFPOL_MAINMENUHILIGHT
= 0x00008000,
842 FFPOL_MAINMENUSAVEPARAMS
= 0x00020000,
844 FFPOL_CREATEMACRO
= 0x00040000,
845 FFPOL_USEPSWITCH
= 0x00080000,
846 FFPOL_PERSONALPATH
= 0x00100000,
847 FFPOL_KILLTASK
= 0x00200000,
848 FFPOL_SHOWHIDDENDRIVES
= 0x80000000,
851 enum FarSystemSettings
853 FSS_DELETETORECYCLEBIN
= 0x00000002,
854 FSS_WRITETHROUGH
= 0x00000004,
855 FSS_RESERVED
= 0x00000008,
856 FSS_SAVECOMMANDSHISTORY
= 0x00000020,
857 FSS_SAVEFOLDERSHISTORY
= 0x00000040,
858 FSS_SAVEVIEWANDEDITHISTORY
= 0x00000080,
859 FSS_USEWINDOWSREGISTEREDTYPES
= 0x00000100,
860 FSS_AUTOSAVESETUP
= 0x00000200,
861 FSS_SCANSYMLINK
= 0x00000400,
864 enum FarPanelSettings
866 FPS_SHOWHIDDENANDSYSTEMFILES
= 0x00000001,
867 FPS_HIGHLIGHTFILES
= 0x00000002,
868 FPS_AUTOCHANGEFOLDER
= 0x00000004,
869 FPS_SELECTFOLDERS
= 0x00000008,
870 FPS_ALLOWREVERSESORTMODES
= 0x00000010,
871 FPS_SHOWCOLUMNTITLES
= 0x00000020,
872 FPS_SHOWSTATUSLINE
= 0x00000040,
873 FPS_SHOWFILESTOTALINFORMATION
= 0x00000080,
874 FPS_SHOWFREESIZE
= 0x00000100,
875 FPS_SHOWSCROLLBAR
= 0x00000200,
876 FPS_SHOWBACKGROUNDSCREENSNUMBER
= 0x00000400,
877 FPS_SHOWSORTMODELETTER
= 0x00000800,
880 enum FarDialogSettings
882 FDIS_HISTORYINDIALOGEDITCONTROLS
= 0x00000001,
883 FDIS_PERSISTENTBLOCKSINEDITCONTROLS
= 0x00000002,
884 FDIS_AUTOCOMPLETEININPUTLINES
= 0x00000004,
885 FDIS_BSDELETEUNCHANGEDTEXT
= 0x00000008,
888 enum FarInterfaceSettings
890 FIS_CLOCKINPANELS
= 0x00000001,
891 FIS_CLOCKINVIEWERANDEDITOR
= 0x00000002,
892 FIS_MOUSE
= 0x00000004,
893 FIS_SHOWKEYBAR
= 0x00000008,
894 FIS_ALWAYSSHOWMENUBAR
= 0x00000010,
895 FIS_USERIGHTALTASALTGR
= 0x00000080,
896 FIS_SHOWTOTALCOPYPROGRESSINDICATOR
= 0x00000100,
897 FIS_SHOWCOPYINGTIMEINFO
= 0x00000200,
898 FIS_USECTRLPGUPTOCHANGEDRIVE
= 0x00000800,
901 enum FarConfirmationsSettings
903 FCS_COPYOVERWRITE
= 0x00000001,
904 FCS_MOVEOVERWRITE
= 0x00000002,
905 FCS_DRAGANDDROP
= 0x00000004,
906 FCS_DELETE
= 0x00000008,
907 FCS_DELETENONEMPTYFOLDERS
= 0x00000010,
908 FCS_INTERRUPTOPERATION
= 0x00000020,
909 FCS_DISCONNECTNETWORKDRIVE
= 0x00000040,
910 FCS_RELOADEDITEDFILE
= 0x00000080,
911 FCS_CLEARHISTORYLIST
= 0x00000100,
912 FCS_EXIT
= 0x00000200,
915 enum FarDescriptionSettings
917 FDS_UPDATEALWAYS
= 0x00000001,
918 FDS_UPDATEIFDISPLAYED
= 0x00000002,
919 FDS_SETHIDDEN
= 0x00000004,
920 FDS_UPDATEREADONLY
= 0x00000008,
923 enum FAREJECTMEDIAFLAGS
925 EJECT_NO_MESSAGE
= 0x00000001,
926 EJECT_LOAD_MEDIA
= 0x00000002,
927 EJECT_NOTIFY_AFTERREMOVE
= 0x00000004,
928 EJECT_READY
= 0x80000000,
931 struct ActlEjectMedia
939 FMT_DRIVE_ERROR
= -1,
940 FMT_DRIVE_UNKNOWN
= DRIVE_UNKNOWN
,
941 FMT_DRIVE_NO_ROOT_DIR
= DRIVE_NO_ROOT_DIR
,
942 FMT_DRIVE_REMOVABLE
= DRIVE_REMOVABLE
,
943 FMT_DRIVE_FIXED
= DRIVE_FIXED
,
944 FMT_DRIVE_REMOTE
= DRIVE_REMOTE
,
945 FMT_DRIVE_CDROM
= DRIVE_CDROM
,
946 FMT_DRIVE_RAMDISK
= DRIVE_RAMDISK
,
947 FMT_DRIVE_SUBSTITUTE
= 15,
948 FMT_DRIVE_REMOTE_NOT_CONNECTED
= 16,
949 FMT_DRIVE_CD_RW
= 18,
950 FMT_DRIVE_CD_RWDVD
= 19,
951 FMT_DRIVE_DVD_ROM
= 20,
952 FMT_DRIVE_DVD_RW
= 21,
953 FMT_DRIVE_DVD_RAM
= 22,
954 FMT_DRIVE_USBDRIVE
= 40,
955 FMT_DRIVE_NOT_INIT
= 255,
958 enum FARMEDIATYPEFLAGS
960 MEDIATYPE_NODETECTCDROM
= 0x80000000,
970 enum FARKEYSEQUENCEFLAGS
972 KSFLAGS_DISABLEOUTPUT
= 0x00000001,
973 KSFLAGS_NOSENDKEYSTOPLUGINS
= 0x00000002
987 MCMD_POSTMACROSTRING
= 2,
988 MCMD_COMPILEMACRO
= 3,
995 MACROSTATE_NOMACRO
=0,
996 MACROSTATE_EXECUTING
=1,
997 MACROSTATE_EXECUTING_COMMON
=2,
998 MACROSTATE_RECORDING
=3,
999 MACROSTATE_RECORDING_COMMON
=4,
1012 struct KeySequence Compile
;
1015 const char *ErrMsg1
;
1016 const char *ErrMsg2
;
1017 const char *ErrMsg3
;
1019 DWORD_PTR Reserved
[3];
1025 FCLR_REDRAW
= 0x00000001,
1036 enum WINDOWINFO_TYPE
1039 // ПРОСЬБА НЕ ЗАБЫВАТЬ СИНХРОНИЗИРОВАТЬ ИЗМЕНЕНИЯ
1040 // WTYPE_* и MODALTYPE_* (frame.hpp)!!!
1041 // (и не надо убирать этот комментарий, пока ситуация не изменится ;)
1063 typedef INT_PTR(WINAPI
*FARAPIADVCONTROL
)(
1064 INT_PTR ModuleNumber
,
1070 enum VIEWER_CONTROL_COMMANDS
1083 VOPT_SAVEFILEPOSITION
=1,
1084 VOPT_AUTODETECTTABLE
=2,
1087 enum VIEWER_SETMODE_TYPES
1094 enum VIEWER_SETMODEFLAGS_TYPES
1096 VSMFL_REDRAW
= 0x00000001,
1099 struct ViewerSetMode
1113 INT64 BlockStartPos
;
1117 enum VIEWER_SETPOS_FLAGS
1119 VSP_NOREDRAW
= 0x0001,
1120 VSP_PERCENT
= 0x0002,
1121 VSP_RELATIVE
= 0x0004,
1122 VSP_NORETNEWPOS
= 0x0008,
1125 struct ViewerSetPosition
1149 const char *FileName
;
1156 struct ViewerMode CurMode
;
1161 typedef int (WINAPI
*FARAPIVIEWERCONTROL
)(
1190 DE_DEFDLGPROCINIT
=1,
1194 //#define EEREDRAW_ALL (void*)0
1195 //#define EEREDRAW_CHANGE (void*)1
1196 //#define EEREDRAW_LINE (void*)2
1198 enum EDITOR_CONTROL_COMMANDS
1226 ECTL_TURNOFFMARKINGBLOCK
,
1228 ECTL_ADDSTACKBOOKMARK
,
1229 ECTL_PREVSTACKBOOKMARK
,
1230 ECTL_NEXTSTACKBOOKMARK
,
1231 ECTL_CLEARSTACKBOOKMARKS
,
1232 ECTL_DELETESTACKBOOKMARK
,
1233 ECTL_GETSTACKBOOKMARKS
,
1239 enum EDITOR_SETPARAMETER_TYPES
1244 ESPT_CURSORBEYONDEOL
,
1247 ESPT_SAVEFILEPOSITION
,
1253 struct EditorServiceRegion
1260 struct EditorSetParameter
1273 struct EditorGetString
1284 struct EditorSetString
1287 const char *StringText
;
1288 const char *StringEOL
;
1302 EOPT_EXPANDALLTABS
= 0x00000001,
1303 EOPT_PERSISTENTBLOCKS
= 0x00000002,
1304 EOPT_DELREMOVESBLOCKS
= 0x00000004,
1305 EOPT_AUTOINDENT
= 0x00000008,
1306 EOPT_SAVEFILEPOSITION
= 0x00000010,
1307 EOPT_AUTODETECTTABLE
= 0x00000020,
1308 EOPT_CURSORBEYONDEOL
= 0x00000040,
1309 EOPT_EXPANDONLYNEWTABS
= 0x00000080,
1313 enum EDITOR_BLOCK_TYPES
1320 enum EDITOR_CURRENTSTATE
1322 ECSTATE_MODIFIED
= 0x00000001,
1323 ECSTATE_SAVED
= 0x00000002,
1324 ECSTATE_LOCKED
= 0x00000004,
1331 const char *FileName
;
1352 struct EditorBookMarks
1361 struct EditorSetPosition
1382 struct EditorConvertText
1389 struct EditorConvertPos
1397 enum EDITORCOLORFLAGS
1416 unsigned char Flags
; // bit one - 'active' flag, others - ignored and must be set to zero
1419 struct EditorTrueColor
1421 struct EditorColor Base
;
1422 struct FarTrueColor TrueFore
;
1423 struct FarTrueColor TrueBack
;
1426 struct EditorSaveFile
1432 typedef int (WINAPI
*FARAPIEDITORCONTROL
)(
1439 FIB_ENABLEEMPTY
= 0x00000001,
1440 FIB_PASSWORD
= 0x00000002,
1441 FIB_EXPANDENV
= 0x00000004,
1442 FIB_NOUSELASTHISTORY
= 0x00000008,
1443 FIB_BUTTONS
= 0x00000010,
1444 FIB_NOAMPERSAND
= 0x00000020,
1445 FIB_CHECKBOX
= 0x00010000,
1446 FIB_EDITPATH
= 0x01000000,
1449 typedef int (WINAPI
*FARAPIINPUTBOX
)(
1451 const char *SubTitle
,
1452 const char *HistoryName
,
1453 const char *SrcText
,
1456 const char *HelpTopic
,
1461 typedef int (WINAPIV
*FARSTDSPRINTF
)(char *Buffer
,const char *Format
,...);
1462 typedef int (WINAPIV
*FARSTDSNPRINTF
)(char *Buffer
,size_t Sizebuf
,const char *Format
,...);
1463 typedef int (WINAPIV
*FARSTDSSCANF
)(const char *Buffer
, const char *Format
,...);
1465 typedef void (WINAPI
*FARSTDQSORT
)(void *base
, size_t nelem
, size_t width
, int (__cdecl
*fcmp
)(const void *, const void *));
1466 typedef void (WINAPI
*FARSTDQSORTEX
)(void *base
, size_t nelem
, size_t width
, int (__cdecl
*fcmp
)(const void *, const void *,void *userparam
),void *userparam
);
1467 typedef void *(WINAPI
*FARSTDBSEARCH
)(const void *key
, const void *base
, size_t nelem
, size_t width
, int (__cdecl
*fcmp
)(const void *, const void *));
1468 typedef int (WINAPI
*FARSTDGETFILEOWNER
)(const char *Computer
,const char *Name
,char *Owner
);
1469 typedef int (WINAPI
*FARSTDGETNUMBEROFLINKS
)(const char *Name
);
1470 typedef int (WINAPI
*FARSTDATOI
)(const char *s
);
1471 typedef int64_t(WINAPI
*FARSTDATOI64
)(const char *s
);
1472 typedef char *(WINAPI
*FARSTDITOA64
)(int64_t value
, char *string
, int radix
);
1473 typedef char *(WINAPI
*FARSTDITOA
)(int value
, char *string
, int radix
);
1474 typedef char *(WINAPI
*FARSTDLTRIM
)(char *Str
);
1475 typedef char *(WINAPI
*FARSTDRTRIM
)(char *Str
);
1476 typedef char *(WINAPI
*FARSTDTRIM
)(char *Str
);
1477 // truncation functions below uses console cells count as limiting unit
1478 typedef char *(WINAPI
*FARSTDTRUNCSTR
)(char *Str
,int MaxCells
);
1479 typedef char *(WINAPI
*FARSTDTRUNCPATHSTR
)(char *Str
,int MaxCells
);
1480 typedef char *(WINAPI
*FARSTDQUOTESPACEONLY
)(char *Str
);
1481 typedef char*(WINAPI
*FARSTDPOINTTONAME
)(char *Path
);
1482 typedef void (WINAPI
*FARSTDGETPATHROOT
)(const char *Path
,char *Root
);
1483 typedef BOOL (WINAPI
*FARSTDADDENDSLASH
)(char *Path
);
1484 typedef int (WINAPI
*FARSTDCOPYTOCLIPBOARD
)(const char *Data
);
1485 typedef char *(WINAPI
*FARSTDPASTEFROMCLIPBOARD
)(void);
1486 typedef FarKey (WINAPI
*FARSTDINPUTRECORDTOKEY
)(const INPUT_RECORD
*r
);
1487 typedef int (WINAPI
*FARSTDLOCALISLOWER
)(unsigned Ch
);
1488 typedef int (WINAPI
*FARSTDLOCALISUPPER
)(unsigned Ch
);
1489 typedef int (WINAPI
*FARSTDLOCALISALPHA
)(unsigned Ch
);
1490 typedef int (WINAPI
*FARSTDLOCALISALPHANUM
)(unsigned Ch
);
1491 typedef unsigned(WINAPI
*FARSTDLOCALUPPER
)(unsigned LowerChar
);
1492 typedef unsigned(WINAPI
*FARSTDLOCALLOWER
)(unsigned UpperChar
);
1493 typedef void (WINAPI
*FARSTDLOCALUPPERBUF
)(char *Buf
,int Length
);
1494 typedef void (WINAPI
*FARSTDLOCALLOWERBUF
)(char *Buf
,int Length
);
1495 typedef void (WINAPI
*FARSTDLOCALSTRUPR
)(char *s1
);
1496 typedef void (WINAPI
*FARSTDLOCALSTRLWR
)(char *s1
);
1497 typedef int (WINAPI
*FARSTDLOCALSTRICMP
)(const char *s1
,const char *s2
);
1498 typedef int (WINAPI
*FARSTDLOCALSTRNICMP
)(const char *s1
,const char *s2
,int n
);
1500 enum PROCESSNAME_FLAGS
1502 PN_CMPNAME
= 0x00000000UL
,
1503 PN_CMPNAMELIST
= 0x00001000UL
,
1504 PN_GENERATENAME
= 0x00002000UL
,
1505 PN_SKIPPATH
= 0x00100000UL
,
1508 typedef int (WINAPI
*FARSTDPROCESSNAME
)(const char *param1
, char *param2
, DWORD flags
);
1510 typedef void (WINAPI
*FARSTDUNQUOTE
)(char *Str
);
1512 typedef DWORD (WINAPI
*FARSTDEXPANDENVIRONMENTSTR
)(
1520 XLAT_SWITCHKEYBLAYOUT
= 0x00000001UL
, // unsupported
1521 XLAT_SWITCHKEYBBEEP
= 0x00000002UL
, // unsupported
1522 XLAT_USEKEYBLAYOUTNAME
= 0x00000004UL
, // unsupported
1523 XLAT_CONVERTALLCMDLINE
= 0x00010000UL
, // deprecated
1526 typedef char*(WINAPI
*FARSTDXLAT
)(char *Line
,int StartPos
,int EndPos
,const struct CharTableSet
*TableSet
,DWORD Flags
);
1527 typedef BOOL (WINAPI
*FARSTDKEYTOKEYNAME
)(FarKey Key
,char *KeyText
,int Size
);
1528 typedef FarKey (WINAPI
*FARSTDKEYNAMETOKEY
)(const char *Name
);
1530 typedef int (WINAPI
*FRSUSERFUNC
)(
1531 const WIN32_FIND_DATAA
*FData
,
1532 const char *FullName
,
1538 FRS_RETUPDIR
= 0x01,
1540 FRS_SCANSYMLINK
= 0x04,
1543 typedef void (WINAPI
*FARSTDRECURSIVESEARCH
)(const char *InitDir
,const char *Mask
,FRSUSERFUNC Func
,DWORD Flags
,void *Param
);
1544 typedef char*(WINAPI
*FARSTDMKTEMP
)(char *Dest
,const char *Prefix
);
1545 typedef void (WINAPI
*FARSTDDELETEBUFFER
)(void *Buffer
);
1551 FLINK_SYMLINK
= FLINK_JUNCTION
,
1553 FLINK_SYMLINKFILE
= 4,
1554 FLINK_SYMLINKDIR
= 5,
1556 FLINK_SHOWERRMSG
= 0x10000,
1557 FLINK_DONOTUPDATEPANEL
= 0x20000,
1559 typedef int (WINAPI
*FARSTDMKLINK
)(const char *Src
,const char *Dest
,DWORD Flags
);
1560 typedef int (WINAPI
*FARCONVERTNAMETOREAL
)(const char *Src
,char *Dest
, int DestSize
);
1561 typedef int (WINAPI
*FARGETREPARSEPOINTINFO
)(const char *Src
,char *Dest
,int DestSize
);
1565 EF_HIDEOUT
= 0x01, // dont display output of the command
1566 EF_NOWAIT
= 0x02, // dont wait for command completion
1567 EF_SUDO
= 0x04, // command must be run with root privileges
1568 EF_NOTIFY
= 0x08, // notify when command completed (if such notifications enabled in settings)
1569 EF_NOCMDPRINT
= 0x10, // dont print command in command line nor include it to history
1570 EF_OPEN
= 0x20 // use desktop shell (if present) to open command (e.g. URLs, documents..)
1573 typedef int (WINAPI
*FAREXECUTE
)(const char *CmdStr
, unsigned int ExecFlags
);
1574 typedef int (WINAPI
*FAREXECUTE_LIBRARY
)(const char *Library
, const char *Symbol
, const char *CmdStr
, unsigned int ExecFlags
);
1575 typedef void (WINAPI
*FARDISPLAYNOTIFICATION
)(const char *action
, const char *object
);
1576 typedef int (WINAPI
*FARDISPATCHNTRTHRDCALLS
)();
1577 // If plugin implements tasks running in background it may invoke this function to indicate about
1578 // pending task in left-top corner. Info is a short description of task or just its owner and must
1579 // be same string when invoked with Started TRUE or FALSE.
1580 typedef void (WINAPI
*FARBACKGROUNDTASK
)(const char *Info
, BOOL Started
);
1581 // Returns count of console cells which will be used to display given string of CharsCount characters.
1582 typedef size_t (WINAPI
*FARSTRCELLSCOUNT
)(const char *Str
, size_t CharsCount
);
1583 // Returns count of characters which will be used for fill up to *CellsCount cells from given string
1584 // of CharsCount characters.
1585 // RoundUp argument tells what to do with full-width characters that crossed by *CellsCount.
1586 // On return *CellsCount contains cells count that will be filled by returned characters count, that:
1587 // Can be smaller than initial value if string has too few characters to fill all *CellsCount cells
1588 // or if RoundUp was set to FALSE and last character would then overflow wanted amount.
1589 // Can be larger by one than initial value if RoundUp was set to TRUE and last full-width character
1590 // crossed initial value specified in *CellsCount.
1591 typedef size_t (WINAPI
*FARSTRSIZEOFCELLS
)(const char *Str
, size_t CharsCount
, size_t *CellsCount
, BOOL RoundUp
);
1593 typedef struct FarStandardFunctions
1598 FARSTDATOI64 atoi64
;
1600 FARSTDITOA64 itoa64
;
1602 FARSTDSPRINTF sprintf
;
1603 FARSTDSSCANF sscanf
;
1606 FARSTDBSEARCH bsearch
;
1607 FARSTDQSORTEX qsortex
;
1610 FARSTDSNPRINTF snprintf
;
1613 DWORD_PTR Reserved
[20];
1615 FARSTDUNQUOTE Unquote
;
1616 FARSTDEXPANDENVIRONMENTSTR ExpandEnvironmentStr
;
1620 FARSTDTRUNCSTR TruncStr
;
1621 FARSTDTRUNCPATHSTR TruncPathStr
;
1622 FARSTDQUOTESPACEONLY QuoteSpaceOnly
;
1623 FARSTDPOINTTONAME PointToName
;
1624 FARSTDGETPATHROOT GetPathRoot
;
1625 FARSTDADDENDSLASH AddEndSlash
;
1626 FARSTDCOPYTOCLIPBOARD CopyToClipboard
;
1627 FARSTDPASTEFROMCLIPBOARD PasteFromClipboard
;
1628 FARSTDKEYTOKEYNAME FarKeyToName
;
1629 FARSTDKEYNAMETOKEY FarNameToKey
;
1630 FARSTDINPUTRECORDTOKEY FarInputRecordToKey
;
1632 FARSTDGETFILEOWNER GetFileOwner
;
1633 FARSTDGETNUMBEROFLINKS GetNumberOfLinks
;
1634 FARSTDRECURSIVESEARCH FarRecursiveSearch
;
1635 FARSTDMKTEMP MkTemp
;
1636 FARSTDDELETEBUFFER DeleteBuffer
;
1637 FARSTDPROCESSNAME ProcessName
;
1638 FARSTDMKLINK MkLink
;
1639 FARCONVERTNAMETOREAL ConvertNameToReal
;
1640 FARGETREPARSEPOINTINFO GetReparsePointInfo
;
1642 FAREXECUTE_LIBRARY ExecuteLibrary
;
1643 FARDISPLAYNOTIFICATION DisplayNotification
;
1644 FARDISPATCHNTRTHRDCALLS DispatchInterThreadCalls
;
1645 FARBACKGROUNDTASK BackgroundTask
;
1646 FARSTRCELLSCOUNT StrCellsCount
;
1647 FARSTRSIZEOFCELLS StrSizeOfCells
;
1648 } FARSTANDARDFUNCTIONS
;
1650 struct PluginStartupInfo
1653 char ModuleName
[NM
];
1654 INT_PTR ModuleNumber
;
1655 const char *RootKey
;
1658 FARAPIDIALOG Dialog
;
1659 FARAPIMESSAGE Message
;
1660 FARAPIGETMSG GetMsg
;
1661 FARAPICONTROL Control
;
1662 FARAPISAVESCREEN SaveScreen
;
1663 FARAPIRESTORESCREEN RestoreScreen
;
1664 FARAPIGETDIRLIST GetDirList
;
1665 FARAPIGETPLUGINDIRLIST GetPluginDirList
;
1666 FARAPIFREEDIRLIST FreeDirList
;
1667 FARAPIVIEWER Viewer
;
1668 FARAPIEDITOR Editor
;
1669 FARAPICMPNAME CmpName
;
1670 FARAPICHARTABLE CharTable
;
1672 FARAPIEDITORCONTROL EditorControl
;
1674 FARSTANDARDFUNCTIONS
*FSF
;
1676 FARAPISHOWHELP ShowHelp
;
1677 FARAPIADVCONTROL AdvControl
;
1678 FARAPIINPUTBOX InputBox
;
1679 FARAPIDIALOGEX DialogEx
;
1680 FARAPISENDDLGMESSAGE SendDlgMessage
;
1681 FARAPIDEFDLGPROC DefDlgProc
;
1683 FARAPIVIEWERCONTROL ViewerControl
;
1689 PF_PRELOAD
= 0x0001, // early dlopen and initialize plugin
1690 PF_DISABLEPANELS
= 0x0002,
1693 PF_FULLCMDLINE
= 0x0010,
1695 PF_PREOPEN
= 0x8000 // early dlopen plugin but initialize it later, when it will be really needed
1703 const char * const *DiskMenuStrings
;
1704 int *DiskMenuNumbers
;
1705 int DiskMenuStringsNumber
;
1706 const char * const *PluginMenuStrings
;
1707 int PluginMenuStringsNumber
;
1708 const char * const *PluginConfigStrings
;
1709 int PluginConfigStringsNumber
;
1710 const char *CommandPrefix
;
1715 struct InfoPanelLine
1726 char **ColumnTitles
;
1729 int AlignExtensions
;
1731 char *StatusColumnTypes
;
1732 char *StatusColumnWidths
;
1737 enum OPENPLUGININFO_FLAGS
1739 OPIF_USEFILTER
= 0x00000001,
1740 OPIF_USESORTGROUPS
= 0x00000002,
1741 OPIF_USEHIGHLIGHTING
= 0x00000004,
1742 OPIF_ADDDOTS
= 0x00000008,
1743 OPIF_RAWSELECTION
= 0x00000010,
1744 OPIF_REALNAMES
= 0x00000020,
1745 OPIF_SHOWNAMESONLY
= 0x00000040,
1746 OPIF_SHOWRIGHTALIGNNAMES
= 0x00000080,
1747 OPIF_SHOWPRESERVECASE
= 0x00000100,
1748 OPIF_COMPAREFATTIME
= 0x00000400,
1749 OPIF_EXTERNALGET
= 0x00000800,
1750 OPIF_EXTERNALPUT
= 0x00001000,
1751 OPIF_EXTERNALDELETE
= 0x00002000,
1752 OPIF_EXTERNALMKDIR
= 0x00004000,
1753 OPIF_USEATTRHIGHLIGHTING
= 0x00008000,
1757 enum OPENPLUGININFO_SORTMODES
1777 char *CtrlTitles
[12];
1778 char *AltTitles
[12];
1779 char *ShiftTitles
[12];
1781 char *CtrlShiftTitles
[12];
1782 char *AltShiftTitles
[12];
1783 char *CtrlAltTitles
[12];
1787 enum OPERATION_MODES
1793 OPM_TOPLEVEL
=0x0010,
1795 OPM_QUICKVIEW
=0x0040,
1797 OPM_COMMANDS
=0x0100,
1800 struct OpenPluginInfo
1804 const char *HostFile
;
1807 const char *PanelTitle
;
1808 const struct InfoPanelLine
*InfoLines
;
1809 int InfoLinesNumber
;
1810 const char * const *DescrFiles
;
1811 int DescrFilesNumber
;
1812 const struct PanelMode
*PanelModesArray
;
1813 int PanelModesNumber
;
1817 const struct KeyBarTitles
*KeyBar
;
1818 const char *ShortcutData
;
1822 enum OPENPLUGIN_OPENFROM
1825 OPEN_PLUGINSMENU
= 1,
1828 OPEN_COMMANDLINE
= 4,
1833 OPEN_FROMMACRO
= 0x10000,
1838 PKF_CONTROL
= 0x00000001,
1839 PKF_ALT
= 0x00000002,
1840 PKF_SHIFT
= 0x00000004,
1841 PKF_PREPROCESS
= 0x00080000, // for "Key", function ProcessKey()
1846 FE_CHANGEVIEWMODE
=0,
1866 #endif // __FAR2SDK_FARPLUG_MB_H__