summaryrefslogtreecommitdiff
path: root/delphi/Awkward
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-05-15 15:36:29 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-05-15 15:36:29 +0000
commit9e0ca10baba2700d19bd3a3b81500b73bd4013d0 (patch)
tree50ed9f5aee315b18f713eaa578fd4873e753e659 /delphi/Awkward
parent6f8f9d1405f64ca8218a6b83b83e01e3ece3c9ea (diff)
unneeded delphi folder removed
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@107 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'delphi/Awkward')
-rw-r--r--delphi/Awkward/DynBass/dynamic_bass.pas1260
-rw-r--r--delphi/Awkward/DynBass/dynbasswma.pas228
-rw-r--r--delphi/Awkward/include/FreeImage.pas738
-rw-r--r--delphi/Awkward/include/interfaces.inc66
-rw-r--r--delphi/Awkward/include/m_acc.inc136
-rw-r--r--delphi/Awkward/include/m_addcontact.inc49
-rw-r--r--delphi/Awkward/include/m_anismiley.inc116
-rw-r--r--delphi/Awkward/include/m_api.pas353
-rw-r--r--delphi/Awkward/include/m_avatars.inc381
-rw-r--r--delphi/Awkward/include/m_awaymsg.inc46
-rw-r--r--delphi/Awkward/include/m_button.inc69
-rw-r--r--delphi/Awkward/include/m_chat.inc640
-rw-r--r--delphi/Awkward/include/m_clc.inc306
-rw-r--r--delphi/Awkward/include/m_clist.inc702
-rw-r--r--delphi/Awkward/include/m_clistint.inc518
-rw-r--r--delphi/Awkward/include/m_clui.inc243
-rw-r--r--delphi/Awkward/include/m_cluiframes.inc324
-rw-r--r--delphi/Awkward/include/m_contacts.inc112
-rw-r--r--delphi/Awkward/include/m_database.inc711
-rw-r--r--delphi/Awkward/include/m_dbeditor.inc33
-rw-r--r--delphi/Awkward/include/m_descbutton.inc51
-rw-r--r--delphi/Awkward/include/m_email.inc37
-rw-r--r--delphi/Awkward/include/m_errors.inc123
-rw-r--r--delphi/Awkward/include/m_extraicons.inc87
-rw-r--r--delphi/Awkward/include/m_file.inc71
-rw-r--r--delphi/Awkward/include/m_findadd.inc36
-rw-r--r--delphi/Awkward/include/m_fingerprint.inc61
-rw-r--r--delphi/Awkward/include/m_fontservice.inc245
-rw-r--r--delphi/Awkward/include/m_genmenu.inc467
-rw-r--r--delphi/Awkward/include/m_help.inc35
-rw-r--r--delphi/Awkward/include/m_helpers.inc576
-rw-r--r--delphi/Awkward/include/m_history.inc35
-rw-r--r--delphi/Awkward/include/m_historyevents.inc201
-rw-r--r--delphi/Awkward/include/m_hotkeys.inc93
-rw-r--r--delphi/Awkward/include/m_icolib.inc112
-rw-r--r--delphi/Awkward/include/m_iconheader.inc74
-rw-r--r--delphi/Awkward/include/m_icq.inc374
-rw-r--r--delphi/Awkward/include/m_ignore.inc73
-rw-r--r--delphi/Awkward/include/m_imgsrvc.inc557
-rw-r--r--delphi/Awkward/include/m_keybindings.inc58
-rw-r--r--delphi/Awkward/include/m_langpack.inc100
-rw-r--r--delphi/Awkward/include/m_message.inc200
-rw-r--r--delphi/Awkward/include/m_metacontacts.inc168
-rw-r--r--delphi/Awkward/include/m_modernopt.inc110
-rw-r--r--delphi/Awkward/include/m_netlib.inc841
-rw-r--r--delphi/Awkward/include/m_newawaysys.inc108
-rw-r--r--delphi/Awkward/include/m_options.inc124
-rw-r--r--delphi/Awkward/include/m_plugins.inc92
-rw-r--r--delphi/Awkward/include/m_png.inc67
-rw-r--r--delphi/Awkward/include/m_popup.inc484
-rw-r--r--delphi/Awkward/include/m_proto_listeningto.inc117
-rw-r--r--delphi/Awkward/include/m_protocols.inc434
-rw-r--r--delphi/Awkward/include/m_protoint.inc102
-rw-r--r--delphi/Awkward/include/m_protomod.inc117
-rw-r--r--delphi/Awkward/include/m_protosvc.inc968
-rw-r--r--delphi/Awkward/include/m_skin.inc190
-rw-r--r--delphi/Awkward/include/m_smileyadd.inc249
-rw-r--r--delphi/Awkward/include/m_ssl.inc54
-rw-r--r--delphi/Awkward/include/m_system.inc515
-rw-r--r--delphi/Awkward/include/m_tipper.inc51
-rw-r--r--delphi/Awkward/include/m_toolbar.inc96
-rw-r--r--delphi/Awkward/include/m_toptoolbar.inc128
-rw-r--r--delphi/Awkward/include/m_updater.inc122
-rw-r--r--delphi/Awkward/include/m_url.inc36
-rw-r--r--delphi/Awkward/include/m_userinfo.inc78
-rw-r--r--delphi/Awkward/include/m_userinfoex.inc295
-rw-r--r--delphi/Awkward/include/m_utils.inc442
-rw-r--r--delphi/Awkward/include/m_variables.inc480
-rw-r--r--delphi/Awkward/include/m_xml.inc220
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_DataAsMessage.inc155
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_contactdir.inc164
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_folders.inc272
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_hotkeysservice.inc218
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_magneticWindows.inc72
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_notify.inc266
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_snapping_windows.inc35
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_statusplugins.inc181
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_trigger.inc986
-rw-r--r--delphi/Awkward/include/reserve/helpers/m_webcam.inc142
-rw-r--r--delphi/Awkward/include/reserve/imgdecoder.pas114
-rw-r--r--delphi/Awkward/include/reserve/m_alocale.inc23
-rw-r--r--delphi/Awkward/include/reserve/m_assocmgr.inc172
-rw-r--r--delphi/Awkward/include/reserve/m_autoreplacer.inc39
-rw-r--r--delphi/Awkward/include/reserve/m_changekeyboardlayout.inc10
-rw-r--r--delphi/Awkward/include/reserve/m_contactsex.inc86
-rw-r--r--delphi/Awkward/include/reserve/m_db3xsa.inc84
-rw-r--r--delphi/Awkward/include/reserve/m_ersatz.inc41
-rw-r--r--delphi/Awkward/include/reserve/m_flags.inc74
-rw-r--r--delphi/Awkward/include/reserve/m_flash.inc76
-rw-r--r--delphi/Awkward/include/reserve/m_fortunemsg.inc69
-rw-r--r--delphi/Awkward/include/reserve/m_fuse.inc28
-rw-r--r--delphi/Awkward/include/reserve/m_help(plugin).inc76
-rw-r--r--delphi/Awkward/include/reserve/m_historypp.inc191
-rw-r--r--delphi/Awkward/include/reserve/m_historystats.inc41
-rw-r--r--delphi/Awkward/include/reserve/m_hotkeysplus.inc24
-rw-r--r--delphi/Awkward/include/reserve/m_httpserver.inc103
-rw-r--r--delphi/Awkward/include/reserve/m_idle.inc74
-rw-r--r--delphi/Awkward/include/reserve/m_ieview.inc184
-rw-r--r--delphi/Awkward/include/reserve/m_ircscript.inc125
-rw-r--r--delphi/Awkward/include/reserve/m_kbdnotify.inc59
-rw-r--r--delphi/Awkward/include/reserve/m_langman.inc46
-rw-r--r--delphi/Awkward/include/reserve/m_listeningto.inc63
-rw-r--r--delphi/Awkward/include/reserve/m_mathmodule.inc199
-rw-r--r--delphi/Awkward/include/reserve/m_motd.inc75
-rw-r--r--delphi/Awkward/include/reserve/m_msg_buttonsbar.inc116
-rw-r--r--delphi/Awkward/include/reserve/m_mwclc.inc45
-rw-r--r--delphi/Awkward/include/reserve/m_mydetails.inc174
-rw-r--r--delphi/Awkward/include/reserve/m_nat.inc30
-rw-r--r--delphi/Awkward/include/reserve/m_nconvers.inc23
-rw-r--r--delphi/Awkward/include/reserve/m_nickhistory.inc50
-rw-r--r--delphi/Awkward/include/reserve/m_nudge.inc9
-rw-r--r--delphi/Awkward/include/reserve/m_quickcontacts.inc31
-rw-r--r--delphi/Awkward/include/reserve/m_rssnews.inc51
-rw-r--r--delphi/Awkward/include/reserve/m_sessions.inc347
-rw-r--r--delphi/Awkward/include/reserve/m_simpleaway.inc26
-rw-r--r--delphi/Awkward/include/reserve/m_smh.inc50
-rw-r--r--delphi/Awkward/include/reserve/m_smr.inc59
-rw-r--r--delphi/Awkward/include/reserve/m_spamfilter.inc751
-rw-r--r--delphi/Awkward/include/reserve/m_spellchecker.inc68
-rw-r--r--delphi/Awkward/include/reserve/m_uninstaller.inc619
-rw-r--r--delphi/Awkward/include/reserve/m_versioninfo.inc49
-rw-r--r--delphi/Awkward/include/reserve/m_voice.inc156
-rw-r--r--delphi/Awkward/include/reserve/m_voiceservice.inc87
-rw-r--r--delphi/Awkward/include/reserve/m_yamn.inc156
-rw-r--r--delphi/Awkward/include/reserve/m_yapp.inc88
-rw-r--r--delphi/Awkward/include/statusmodes.inc52
-rw-r--r--delphi/Awkward/include/testdll.dpr94
-rw-r--r--delphi/Awkward/utils/appcmdapi.pas97
-rw-r--r--delphi/Awkward/utils/base64.pas108
-rw-r--r--delphi/Awkward/utils/cbex.pas79
-rw-r--r--delphi/Awkward/utils/common.pas2116
-rw-r--r--delphi/Awkward/utils/compilers.inc735
-rw-r--r--delphi/Awkward/utils/dbsettings.pas421
-rw-r--r--delphi/Awkward/utils/hotkeys.pas571
-rw-r--r--delphi/Awkward/utils/ini.pas857
-rw-r--r--delphi/Awkward/utils/io.pas249
-rw-r--r--delphi/Awkward/utils/mirutils.pas1026
-rw-r--r--delphi/Awkward/utils/playlist.pas431
-rw-r--r--delphi/Awkward/utils/protocols.pas573
-rw-r--r--delphi/Awkward/utils/syswin.pas734
-rw-r--r--delphi/Awkward/utils/utils.pas44
-rw-r--r--delphi/Awkward/utils/wrapper.pas450
142 files changed, 0 insertions, 33574 deletions
diff --git a/delphi/Awkward/DynBass/dynamic_bass.pas b/delphi/Awkward/DynBass/dynamic_bass.pas
deleted file mode 100644
index b31c9f0..0000000
--- a/delphi/Awkward/DynBass/dynamic_bass.pas
+++ /dev/null
@@ -1,1260 +0,0 @@
-{.$DEFINE CHECK_PROC}
-{
- BASS 2.4 Delphi unit (dynamic)
- Copyright (c) 1999-2008 Un4seen Developments Ltd.
-
- See the BASS.CHM file for more detailed documentation
-
- How to install
- ----------------
- Copy DYNAMIC_BASS.PAS to the \LIB subdirectory of your Delphi path or your project dir
-
- Call Load_BASSDLL (eg. in FormCreate) to load BASS before using any functions, and
- Unload_BASSDLL (eg. in FormDestory) to unload it when you're done.
-}
-
-unit Dynamic_Bass;
-
-interface
-
-uses
- Windows;
-
-const
- BASSVERSION = $204; // API version
- BASSVERSIONTEXT = '2.4';
-
- // Use these to test for error from functions that return a DWORD or QWORD
- DW_ERROR = Cardinal(-1); // -1 (DWORD)
- QW_ERROR = Int64(-1); // -1 (QWORD)
-
- // Error codes returned by BASS_ErrorGetCode()
- BASS_OK = 0; // all is OK
- BASS_ERROR_MEM = 1; // memory error
- BASS_ERROR_FILEOPEN = 2; // can't open the file
- BASS_ERROR_DRIVER = 3; // can't find a free sound driver
- BASS_ERROR_BUFLOST = 4; // the sample buffer was lost
- BASS_ERROR_HANDLE = 5; // invalid handle
- BASS_ERROR_FORMAT = 6; // unsupported sample format
- BASS_ERROR_POSITION = 7; // invalid position
- BASS_ERROR_INIT = 8; // BASS_Init has not been successfully called
- BASS_ERROR_START = 9; // BASS_Start has not been successfully called
-
- BASS_ERROR_ALREADY = 14; // already initialized/paused/whatever
-
- BASS_ERROR_NOCHAN = 18; // can't get a free channel
- BASS_ERROR_ILLTYPE = 19; // an illegal type was specified
- BASS_ERROR_ILLPARAM = 20; // an illegal parameter was specified
- BASS_ERROR_NO3D = 21; // no 3D support
- BASS_ERROR_NOEAX = 22; // no EAX support
- BASS_ERROR_DEVICE = 23; // illegal device number
- BASS_ERROR_NOPLAY = 24; // not playing
- BASS_ERROR_FREQ = 25; // illegal sample rate
-
- BASS_ERROR_NOTFILE = 27; // the stream is not a file stream
-
- BASS_ERROR_NOHW = 29; // no hardware voices available
-
- BASS_ERROR_EMPTY = 31; // the MOD music has no sequence data
- BASS_ERROR_NONET = 32; // no internet connection could be opened
- BASS_ERROR_CREATE = 33; // couldn't create the file
- BASS_ERROR_NOFX = 34; // effects are not enabled
-
- BASS_ERROR_NOTAVAIL = 37; // requested data is not available
- BASS_ERROR_DECODE = 38; // the channel is a "decoding channel"
- BASS_ERROR_DX = 39; // a sufficient DirectX version is not installed
- BASS_ERROR_TIMEOUT = 40; // connection timedout
- BASS_ERROR_FILEFORM = 41; // unsupported file format
- BASS_ERROR_SPEAKER = 42; // unavailable speaker
- BASS_ERROR_VERSION = 43; // invalid BASS version (used by add-ons)
- BASS_ERROR_CODEC = 44; // codec is not available/supported
- BASS_ERROR_ENDED = 45; // the channel/file has ended
- BASS_ERROR_BUSY = 46; // the device is busy
- BASS_ERROR_UNKNOWN = -1; // some other mystery problem
-
-const
- BASS_ERRORS: array [0..46] of pAnsiChar = (
- {BASS_OK } 'all is OK',
- {BASS_ERROR_MEM } 'memory error',
- {BASS_ERROR_FILEOPEN} 'can''t open the file',
- {BASS_ERROR_DRIVER } 'can''t find a free sound driver',
- {BASS_ERROR_BUFLOST } 'the sample buffer was lost',
- {BASS_ERROR_HANDLE } 'invalid handle',
- {BASS_ERROR_FORMAT } 'unsupported sample format',
- {BASS_ERROR_POSITION} 'invalid position',
- {BASS_ERROR_INIT } 'BASS_Init has not been successfully called',
- {BASS_ERROR_START } 'BASS_Start has not been successfully called',
- nil,
- nil,
- nil,
- nil,
- {BASS_ERROR_ALREADY } 'already initialized/paused/whatever',
- nil,
- nil,
- nil,
- {BASS_ERROR_NOCHAN } 'can''t get a free channel',
- {BASS_ERROR_ILLTYPE } 'an illegal type was specified',
- {BASS_ERROR_ILLPARAM} 'an illegal parameter was specified',
- {BASS_ERROR_NO3D } 'no 3D support',
- {BASS_ERROR_NOEAX } 'no EAX support',
- {BASS_ERROR_DEVICE } 'illegal device number',
- {BASS_ERROR_NOPLAY } 'not playing',
- {BASS_ERROR_FREQ } 'illegal sample rate',
- nil,
- {BASS_ERROR_NOTFILE } 'the stream is not a file stream',
- nil,
- {BASS_ERROR_NOHW } 'no hardware voices available',
- nil,
- {BASS_ERROR_EMPTY } 'the MOD music has no sequence data',
- {BASS_ERROR_NONET } 'no internet connection could be opened',
- {BASS_ERROR_CREATE } 'couldn''t create the file',
- {BASS_ERROR_NOFX } 'effects are not enabled',
- nil,
- nil,
- {BASS_ERROR_NOTAVAIL} 'requested data is not available',
- {BASS_ERROR_DECODE } 'the channel is a "decoding channel"',
- {BASS_ERROR_DX } 'a sufficient DirectX version is not installed',
- {BASS_ERROR_TIMEOUT } 'connection timedout',
- {BASS_ERROR_FILEFORM} 'unsupported file format',
- {BASS_ERROR_SPEAKER } 'unavailable speaker',
- {BASS_ERROR_VERSION } 'invalid BASS version (used by add-ons)',
- {BASS_ERROR_CODEC } 'codec is not available/supported',
- {BASS_ERROR_ENDED } 'the channel/file has ended',
- {BASS_ERROR_BUSY } 'the device is busy');
-
- // BASS_SetConfig options
- BASS_CONFIG_BUFFER = 0;
- BASS_CONFIG_UPDATEPERIOD = 1;
- BASS_CONFIG_GVOL_SAMPLE = 4;
- BASS_CONFIG_GVOL_STREAM = 5;
- BASS_CONFIG_GVOL_MUSIC = 6;
- BASS_CONFIG_CURVE_VOL = 7;
- BASS_CONFIG_CURVE_PAN = 8;
- BASS_CONFIG_FLOATDSP = 9;
- BASS_CONFIG_3DALGORITHM = 10;
- BASS_CONFIG_NET_TIMEOUT = 11;
- BASS_CONFIG_NET_BUFFER = 12;
- BASS_CONFIG_PAUSE_NOPLAY = 13;
- BASS_CONFIG_NET_PREBUF = 15;
- BASS_CONFIG_NET_PASSIVE = 18;
- BASS_CONFIG_REC_BUFFER = 19;
- BASS_CONFIG_NET_PLAYLIST = 21;
- BASS_CONFIG_MUSIC_VIRTUAL = 22;
- BASS_CONFIG_VERIFY = 23;
- BASS_CONFIG_UPDATETHREADS = 24;
-
- // BASS_SetConfigPtr options
- BASS_CONFIG_NET_AGENT = 16;
- BASS_CONFIG_NET_PROXY = 17;
-
- // Initialization flags
- BASS_DEVICE_8BITS = 1; // use 8 bit resolution, else 16 bit
- BASS_DEVICE_MONO = 2; // use mono, else stereo
- BASS_DEVICE_3D = 4; // enable 3D functionality
- BASS_DEVICE_LATENCY = 256; // calculate device latency (BASS_INFO struct)
- BASS_DEVICE_CPSPEAKERS = 1024; // detect speakers via Windows control panel
- BASS_DEVICE_SPEAKERS = 2048; // force enabling of speaker assignment
- BASS_DEVICE_NOSPEAKER = 4096; // ignore speaker arrangement
-
- // DirectSound interfaces (for use with BASS_GetDSoundObject)
- BASS_OBJECT_DS = 1; // IDirectSound
- BASS_OBJECT_DS3DL = 2; // IDirectSound3DListener
-
- // BASS_DEVICEINFO flags
- BASS_DEVICE_ENABLED = 1;
- BASS_DEVICE_DEFAULT = 2;
- BASS_DEVICE_INIT = 4;
-
- // BASS_INFO flags (from DSOUND.H)
- DSCAPS_CONTINUOUSRATE = $00000010; // supports all sample rates between min/maxrate
- DSCAPS_EMULDRIVER = $00000020; // device does NOT have hardware DirectSound support
- DSCAPS_CERTIFIED = $00000040; // device driver has been certified by Microsoft
- DSCAPS_SECONDARYMONO = $00000100; // mono
- DSCAPS_SECONDARYSTEREO = $00000200; // stereo
- DSCAPS_SECONDARY8BIT = $00000400; // 8 bit
- DSCAPS_SECONDARY16BIT = $00000800; // 16 bit
-
- // BASS_RECORDINFO flags (from DSOUND.H)
- DSCCAPS_EMULDRIVER = DSCAPS_EMULDRIVER; // device does NOT have hardware DirectSound recording support
- DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED; // device driver has been certified by Microsoft
-
- // defines for formats field of BASS_RECORDINFO (from MMSYSTEM.H)
- WAVE_FORMAT_1M08 = $00000001; // 11.025 kHz, Mono, 8-bit
- WAVE_FORMAT_1S08 = $00000002; // 11.025 kHz, Stereo, 8-bit
- WAVE_FORMAT_1M16 = $00000004; // 11.025 kHz, Mono, 16-bit
- WAVE_FORMAT_1S16 = $00000008; // 11.025 kHz, Stereo, 16-bit
- WAVE_FORMAT_2M08 = $00000010; // 22.05 kHz, Mono, 8-bit
- WAVE_FORMAT_2S08 = $00000020; // 22.05 kHz, Stereo, 8-bit
- WAVE_FORMAT_2M16 = $00000040; // 22.05 kHz, Mono, 16-bit
- WAVE_FORMAT_2S16 = $00000080; // 22.05 kHz, Stereo, 16-bit
- WAVE_FORMAT_4M08 = $00000100; // 44.1 kHz, Mono, 8-bit
- WAVE_FORMAT_4S08 = $00000200; // 44.1 kHz, Stereo, 8-bit
- WAVE_FORMAT_4M16 = $00000400; // 44.1 kHz, Mono, 16-bit
- WAVE_FORMAT_4S16 = $00000800; // 44.1 kHz, Stereo, 16-bit
-
- BASS_SAMPLE_8BITS = 1; // 8 bit
- BASS_SAMPLE_FLOAT = 256; // 32-bit floating-point
- BASS_SAMPLE_MONO = 2; // mono
- BASS_SAMPLE_LOOP = 4; // looped
- BASS_SAMPLE_3D = 8; // 3D functionality
- BASS_SAMPLE_SOFTWARE = 16; // not using hardware mixing
- BASS_SAMPLE_MUTEMAX = 32; // mute at max distance (3D only)
- BASS_SAMPLE_VAM = 64; // DX7 voice allocation & management
- BASS_SAMPLE_FX = 128; // old implementation of DX8 effects
- BASS_SAMPLE_OVER_VOL = $10000; // override lowest volume
- BASS_SAMPLE_OVER_POS = $20000; // override longest playing
- BASS_SAMPLE_OVER_DIST = $30000; // override furthest from listener (3D only)
-
- BASS_STREAM_PRESCAN = $20000; // enable pin-point seeking/length (MP3/MP2/MP1)
- BASS_MP3_SETPOS = BASS_STREAM_PRESCAN;
- BASS_STREAM_AUTOFREE = $40000; // automatically free the stream when it stop/ends
- BASS_STREAM_RESTRATE = $80000; // restrict the download rate of internet file streams
- BASS_STREAM_BLOCK = $100000;// download/play internet file stream in small blocks
- BASS_STREAM_DECODE = $200000;// don't play the stream, only decode (BASS_ChannelGetData)
- BASS_STREAM_STATUS = $800000;// give server status info (HTTP/ICY tags) in DOWNLOADPROC
-
- BASS_MUSIC_FLOAT = BASS_SAMPLE_FLOAT;
- BASS_MUSIC_MONO = BASS_SAMPLE_MONO;
- BASS_MUSIC_LOOP = BASS_SAMPLE_LOOP;
- BASS_MUSIC_3D = BASS_SAMPLE_3D;
- BASS_MUSIC_FX = BASS_SAMPLE_FX;
- BASS_MUSIC_AUTOFREE = BASS_STREAM_AUTOFREE;
- BASS_MUSIC_DECODE = BASS_STREAM_DECODE;
- BASS_MUSIC_PRESCAN = BASS_STREAM_PRESCAN; // calculate playback length
- BASS_MUSIC_CALCLEN = BASS_MUSIC_PRESCAN;
- BASS_MUSIC_RAMP = $200; // normal ramping
- BASS_MUSIC_RAMPS = $400; // sensitive ramping
- BASS_MUSIC_SURROUND = $800; // surround sound
- BASS_MUSIC_SURROUND2 = $1000; // surround sound (mode 2)
- BASS_MUSIC_FT2MOD = $2000; // play .MOD as FastTracker 2 does
- BASS_MUSIC_PT1MOD = $4000; // play .MOD as ProTracker 1 does
- BASS_MUSIC_NONINTER = $10000; // non-interpolated sample mixing
- BASS_MUSIC_SINCINTER = $800000; // sinc interpolated sample mixing
- BASS_MUSIC_POSRESET = $8000; // stop all notes when moving position
- BASS_MUSIC_POSRESETEX = $400000; // stop all notes and reset bmp/etc when moving position
- BASS_MUSIC_STOPBACK = $80000; // stop the music on a backwards jump effect
- BASS_MUSIC_NOSAMPLE = $100000; // don't load the samples
-
- // Speaker assignment flags
- BASS_SPEAKER_FRONT = $1000000; // front speakers
- BASS_SPEAKER_REAR = $2000000; // rear/side speakers
- BASS_SPEAKER_CENLFE = $3000000; // center & LFE speakers (5.1)
- BASS_SPEAKER_REAR2 = $4000000; // rear center speakers (7.1)
- BASS_SPEAKER_LEFT = $10000000; // modifier: left
- BASS_SPEAKER_RIGHT = $20000000; // modifier: right
- BASS_SPEAKER_FRONTLEFT = BASS_SPEAKER_FRONT or BASS_SPEAKER_LEFT;
- BASS_SPEAKER_FRONTRIGHT = BASS_SPEAKER_FRONT or BASS_SPEAKER_RIGHT;
- BASS_SPEAKER_REARLEFT = BASS_SPEAKER_REAR or BASS_SPEAKER_LEFT;
- BASS_SPEAKER_REARRIGHT = BASS_SPEAKER_REAR or BASS_SPEAKER_RIGHT;
- BASS_SPEAKER_CENTER = BASS_SPEAKER_CENLFE or BASS_SPEAKER_LEFT;
- BASS_SPEAKER_LFE = BASS_SPEAKER_CENLFE or BASS_SPEAKER_RIGHT;
- BASS_SPEAKER_REAR2LEFT = BASS_SPEAKER_REAR2 or BASS_SPEAKER_LEFT;
- BASS_SPEAKER_REAR2RIGHT = BASS_SPEAKER_REAR2 or BASS_SPEAKER_RIGHT;
-
- BASS_UNICODE = $80000000;
-
- BASS_RECORD_PAUSE = $8000; // start recording paused
-
- // DX7 voice allocation & management flags
- BASS_VAM_HARDWARE = 1;
- BASS_VAM_SOFTWARE = 2;
- BASS_VAM_TERM_TIME = 4;
- BASS_VAM_TERM_DIST = 8;
- BASS_VAM_TERM_PRIO = 16;
-
- // BASS_CHANNELINFO types
- BASS_CTYPE_SAMPLE = 1;
- BASS_CTYPE_RECORD = 2;
- BASS_CTYPE_STREAM = $10000;
- BASS_CTYPE_STREAM_OGG = $10002;
- BASS_CTYPE_STREAM_MP1 = $10003;
- BASS_CTYPE_STREAM_MP2 = $10004;
- BASS_CTYPE_STREAM_MP3 = $10005;
- BASS_CTYPE_STREAM_AIFF = $10006;
- BASS_CTYPE_STREAM_WAV = $40000; // WAVE flag, LOWORD=codec
- BASS_CTYPE_STREAM_WAV_PCM = $50001;
- BASS_CTYPE_STREAM_WAV_FLOAT = $50003;
- BASS_CTYPE_MUSIC_MOD = $20000;
- BASS_CTYPE_MUSIC_MTM = $20001;
- BASS_CTYPE_MUSIC_S3M = $20002;
- BASS_CTYPE_MUSIC_XM = $20003;
- BASS_CTYPE_MUSIC_IT = $20004;
- BASS_CTYPE_MUSIC_MO3 = $00100; // MO3 flag
-
- // 3D channel modes
- BASS_3DMODE_NORMAL = 0; // normal 3D processing
- BASS_3DMODE_RELATIVE = 1; // position is relative to the listener
- BASS_3DMODE_OFF = 2; // no 3D processing
-
- // software 3D mixing algorithms (used with BASS_CONFIG_3DALGORITHM)
- BASS_3DALG_DEFAULT = 0;
- BASS_3DALG_OFF = 1;
- BASS_3DALG_FULL = 2;
- BASS_3DALG_LIGHT = 3;
-
- // EAX environments, use with BASS_SetEAXParameters
- EAX_ENVIRONMENT_GENERIC = 0;
- EAX_ENVIRONMENT_PADDEDCELL = 1;
- EAX_ENVIRONMENT_ROOM = 2;
- EAX_ENVIRONMENT_BATHROOM = 3;
- EAX_ENVIRONMENT_LIVINGROOM = 4;
- EAX_ENVIRONMENT_STONEROOM = 5;
- EAX_ENVIRONMENT_AUDITORIUM = 6;
- EAX_ENVIRONMENT_CONCERTHALL = 7;
- EAX_ENVIRONMENT_CAVE = 8;
- EAX_ENVIRONMENT_ARENA = 9;
- EAX_ENVIRONMENT_HANGAR = 10;
- EAX_ENVIRONMENT_CARPETEDHALLWAY = 11;
- EAX_ENVIRONMENT_HALLWAY = 12;
- EAX_ENVIRONMENT_STONECORRIDOR = 13;
- EAX_ENVIRONMENT_ALLEY = 14;
- EAX_ENVIRONMENT_FOREST = 15;
- EAX_ENVIRONMENT_CITY = 16;
- EAX_ENVIRONMENT_MOUNTAINS = 17;
- EAX_ENVIRONMENT_QUARRY = 18;
- EAX_ENVIRONMENT_PLAIN = 19;
- EAX_ENVIRONMENT_PARKINGLOT = 20;
- EAX_ENVIRONMENT_SEWERPIPE = 21;
- EAX_ENVIRONMENT_UNDERWATER = 22;
- EAX_ENVIRONMENT_DRUGGED = 23;
- EAX_ENVIRONMENT_DIZZY = 24;
- EAX_ENVIRONMENT_PSYCHOTIC = 25;
- // total number of environments
- EAX_ENVIRONMENT_COUNT = 26;
-
- BASS_STREAMPROC_END = $80000000; // end of user stream flag
-
-
- // BASS_StreamCreateFileUser file systems
- STREAMFILE_NOBUFFER = 0;
- STREAMFILE_BUFFER = 1;
- STREAMFILE_BUFFERPUSH = 2;
-
- // BASS_StreamPutFileData options
- BASS_FILEDATA_END = 0; // end & close the file
-
- // BASS_StreamGetFilePosition modes
- BASS_FILEPOS_CURRENT = 0;
- BASS_FILEPOS_DECODE = BASS_FILEPOS_CURRENT;
- BASS_FILEPOS_DOWNLOAD = 1;
- BASS_FILEPOS_END = 2;
- BASS_FILEPOS_START = 3;
- BASS_FILEPOS_CONNECTED = 4;
- BASS_FILEPOS_BUFFER = 5;
-
- // BASS_ChannelSetSync types
- BASS_SYNC_POS = 0;
- BASS_SYNC_END = 2;
- BASS_SYNC_META = 4;
- BASS_SYNC_SLIDE = 5;
- BASS_SYNC_STALL = 6;
- BASS_SYNC_DOWNLOAD = 7;
- BASS_SYNC_FREE = 8;
- BASS_SYNC_SETPOS = 11;
- BASS_SYNC_MUSICPOS = 10;
- BASS_SYNC_MUSICINST = 1;
- BASS_SYNC_MUSICFX = 3;
- BASS_SYNC_OGG_CHANGE = 12;
- BASS_SYNC_MIXTIME = $40000000; // FLAG: sync at mixtime, else at playtime
- BASS_SYNC_ONETIME = $80000000; // FLAG: sync only once, else continuously
-
- // BASS_ChannelIsActive return values
- BASS_ACTIVE_STOPPED = 0;
- BASS_ACTIVE_PLAYING = 1;
- BASS_ACTIVE_STALLED = 2;
- BASS_ACTIVE_PAUSED = 3;
-
- // Channel attributes
- BASS_ATTRIB_FREQ = 1;
- BASS_ATTRIB_VOL = 2;
- BASS_ATTRIB_PAN = 3;
- BASS_ATTRIB_EAXMIX = 4;
- BASS_ATTRIB_MUSIC_AMPLIFY = $100;
- BASS_ATTRIB_MUSIC_PANSEP = $101;
- BASS_ATTRIB_MUSIC_PSCALER = $102;
- BASS_ATTRIB_MUSIC_BPM = $103;
- BASS_ATTRIB_MUSIC_SPEED = $104;
- BASS_ATTRIB_MUSIC_VOL_GLOBAL = $105;
- BASS_ATTRIB_MUSIC_VOL_CHAN = $200; // + channel #
- BASS_ATTRIB_MUSIC_VOL_INST = $300; // + instrument #
-
- // BASS_ChannelGetData flags
- BASS_DATA_AVAILABLE = 0; // query how much data is buffered
- BASS_DATA_FLOAT = $40000000; // flag: return floating-point sample data
- BASS_DATA_FFT256 = $80000000; // 256 sample FFT
- BASS_DATA_FFT512 = $80000001; // 512 FFT
- BASS_DATA_FFT1024 = $80000002; // 1024 FFT
- BASS_DATA_FFT2048 = $80000003; // 2048 FFT
- BASS_DATA_FFT4096 = $80000004; // 4096 FFT
- BASS_DATA_FFT8192 = $80000005; // 8192 FFT
- BASS_DATA_FFT_INDIVIDUAL = $10; // FFT flag: FFT for each channel, else all combined
- BASS_DATA_FFT_NOWINDOW = $20; // FFT flag: no Hanning window
- BASS_DATA_FFT_REMOVEDC = $40; // FFT flag: pre-remove DC bias
-
-
- // BASS_ChannelGetTags types : what's returned
- BASS_TAG_ID3 = 0; // ID3v1 tags : TAG_ID3 structure
- BASS_TAG_ID3V2 = 1; // ID3v2 tags : variable length block
- BASS_TAG_OGG = 2; // OGG comments : series of null-terminated UTF-8 strings
- BASS_TAG_HTTP = 3; // HTTP headers : series of null-terminated ANSI strings
- BASS_TAG_ICY = 4; // ICY headers : series of null-terminated ANSI strings
- BASS_TAG_META = 5; // ICY metadata : ANSI string
- BASS_TAG_APE = 6; // APEv2 tags : series of null-terminated UTF-8 strings
- BASS_TAG_VENDOR = 9; // OGG encoder : UTF-8 string
- BASS_TAG_LYRICS3 = 10; // Lyric3v2 tag : ASCII string
- BASS_TAG_RIFF_INFO = $100; // RIFF "INFO" tags : series of null-terminated ANSI strings
- BASS_TAG_RIFF_BEXT = $101; // RIFF/BWF "bext" tags : TAG_BEXT structure
- BASS_TAG_RIFF_CART = $102; // RIFF/BWF "cart" tags : TAG_CART structure
- BASS_TAG_APE_BINARY = $1000; // + index #, binary APEv2 tag : TAG_APE_BINARY structure
- BASS_TAG_MUSIC_NAME = $10000; // MOD music name : ANSI string
- BASS_TAG_MUSIC_MESSAGE = $10001; // MOD message : ANSI string
- BASS_TAG_MUSIC_INST = $10100; // + instrument #, MOD instrument name : ANSI string
- BASS_TAG_MUSIC_SAMPLE = $10300; // + sample #, MOD sample name : ANSI string
-
- // BASS_ChannelGetLength/GetPosition/SetPosition modes
- BASS_POS_BYTE = 0; // byte position
- BASS_POS_MUSIC_ORDER = 1; // order.row position, MAKELONG(order,row)
- BASS_POS_DECODE = $10000000; // flag: get the decoding (not playing) position
-
- // BASS_RecordSetInput flags
- BASS_INPUT_OFF = $10000;
- BASS_INPUT_ON = $20000;
-
- BASS_INPUT_TYPE_MASK = $FF000000;
- BASS_INPUT_TYPE_UNDEF = $00000000;
- BASS_INPUT_TYPE_DIGITAL = $01000000;
- BASS_INPUT_TYPE_LINE = $02000000;
- BASS_INPUT_TYPE_MIC = $03000000;
- BASS_INPUT_TYPE_SYNTH = $04000000;
- BASS_INPUT_TYPE_CD = $05000000;
- BASS_INPUT_TYPE_PHONE = $06000000;
- BASS_INPUT_TYPE_SPEAKER = $07000000;
- BASS_INPUT_TYPE_WAVE = $08000000;
- BASS_INPUT_TYPE_AUX = $09000000;
- BASS_INPUT_TYPE_ANALOG = $0A000000;
-
- BASS_FX_DX8_CHORUS = 0;
- BASS_FX_DX8_COMPRESSOR = 1;
- BASS_FX_DX8_DISTORTION = 2;
- BASS_FX_DX8_ECHO = 3;
- BASS_FX_DX8_FLANGER = 4;
- BASS_FX_DX8_GARGLE = 5;
- BASS_FX_DX8_I3DL2REVERB = 6;
- BASS_FX_DX8_PARAMEQ = 7;
- BASS_FX_DX8_REVERB = 8;
-
- BASS_DX8_PHASE_NEG_180 = 0;
- BASS_DX8_PHASE_NEG_90 = 1;
- BASS_DX8_PHASE_ZERO = 2;
- BASS_DX8_PHASE_90 = 3;
- BASS_DX8_PHASE_180 = 4;
-
-type
- DWORD = cardinal;
- BOOL = LongBool;
- FLOAT = Single;
- QWORD = int64; // 64-bit (replace "int64" with "comp" if using Delphi 3)
-
- HMUSIC = DWORD; // MOD music handle
- HSAMPLE = DWORD; // sample handle
- HCHANNEL = DWORD; // playing sample's channel handle
- HSTREAM = DWORD; // sample stream handle
- HRECORD = DWORD; // recording handle
- HSYNC = DWORD; // synchronizer handle
- HDSP = DWORD; // DSP handle
- HFX = DWORD; // DX8 effect handle
- HPLUGIN = DWORD; // Plugin handle
-
- // Device info structure
- BASS_DEVICEINFO = record
- name : PAnsiChar; // description
- driver: PAnsiChar; // driver
- flags : DWORD;
- end;
-
- BASS_INFO = record
- flags : DWORD; // device capabilities (DSCAPS_xxx flags)
- hwsize : DWORD; // size of total device hardware memory
- hwfree : DWORD; // size of free device hardware memory
- freesam : DWORD; // number of free sample slots in the hardware
- free3d : DWORD; // number of free 3D sample slots in the hardware
- minrate : DWORD; // min sample rate supported by the hardware
- maxrate : DWORD; // max sample rate supported by the hardware
- eax : BOOL; // device supports EAX? (always FALSE if BASS_DEVICE_3D was not used)
- minbuf : DWORD; // recommended minimum buffer length in ms (requires BASS_DEVICE_LATENCY)
- dsver : DWORD; // DirectSound version
- latency : DWORD; // delay (in ms) before start of playback (requires BASS_DEVICE_LATENCY)
- initflags: DWORD; // BASS_Init "flags" parameter
- speakers : DWORD; // number of speakers available
- freq : DWORD; // current output rate (OSX only)
- end;
-
- // Recording device info structure
- BASS_RECORDINFO = record
- flags : DWORD; // device capabilities (DSCCAPS_xxx flags)
- formats : DWORD; // supported standard formats (WAVE_FORMAT_xxx flags)
- inputs : DWORD; // number of inputs
- singlein: BOOL; // only 1 input can be set at a time
- freq : DWORD; // current input rate (OSX only)
- end;
-
- // Sample info structure
- BASS_SAMPLE = record
- freq : DWORD; // default playback rate
- volume : FLOAT; // default volume (0-100)
- pan : FLOAT; // default pan (-100=left, 0=middle, 100=right)
- flags : DWORD; // BASS_SAMPLE_xxx flags
- length : DWORD; // length (in samples, not bytes)
- max : DWORD; // maximum simultaneous playbacks
- origres : DWORD; // original resolution
- chans : DWORD; // number of channels
- mingap : DWORD; // minimum gap (ms) between creating channels
- mode3d : DWORD; // BASS_3DMODE_xxx mode
- mindist : FLOAT; // minimum distance
- maxdist : FLOAT; // maximum distance
- iangle : DWORD; // angle of inside projection cone
- oangle : DWORD; // angle of outside projection cone
- outvol : FLOAT; // delta-volume outside the projection cone
- vam : DWORD; // voice allocation/management flags (BASS_VAM_xxx)
- priority: DWORD; // priority (0=lowest, $ffffffff=highest)
- end;
-
- // Channel info structure
- BASS_CHANNELINFO = record
- freq : DWORD; // default playback rate
- chans : DWORD; // channels
- flags : DWORD; // BASS_SAMPLE/STREAM/MUSIC/SPEAKER flags
- ctype : DWORD; // type of channel
- origres : DWORD; // original resolution
- plugin : HPLUGIN; // plugin
- sample : HSAMPLE; // sample
- filename: PAnsiChar; // filename
- end;
-
- BASS_PLUGINFORM = record
- ctype: DWORD; // channel type
- name : PAnsiChar; // format description
- exts : PAnsiChar; // file extension filter (*.ext1;*.ext2;etc...)
- end;
- PBASS_PLUGINFORMS = ^TBASS_PLUGINFORMS;
- TBASS_PLUGINFORMS = array[0..maxInt div sizeOf(BASS_PLUGINFORM) - 1] of BASS_PLUGINFORM;
-
- BASS_PLUGININFO = record
- version: DWORD; // version (same form as BASS_GetVersion)
- formatc: DWORD; // number of formats
- formats: PBASS_PLUGINFORMS; // the array of formats
- end;
- PBASS_PLUGININFO = ^BASS_PLUGININFO;
-
- // 3D vector (for 3D positions/velocities/orientations)
- BASS_3DVECTOR = record
- x: FLOAT; // +=right, -=left
- y: FLOAT; // +=up , -=down
- z: FLOAT; // +=front, -=behind
- end;
-
- // User file stream callback functions
- FILECLOSEPROC = procedure(user: Pointer); stdcall;
- FILELENPROC = function(user: Pointer): QWORD; stdcall;
- FILEREADPROC = function(buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
- FILESEEKPROC = function(offset: QWORD; user: Pointer): BOOL; stdcall;
-
- BASS_FILEPROCS = record
- close : FILECLOSEPROC;
- length: FILELENPROC;
- read : FILEREADPROC;
- seek : FILESEEKPROC;
- end;
-
- // ID3v1 tag structure
- TAG_ID3 = record
- id : Array[0.. 2] of AnsiChar;
- title : Array[0..29] of AnsiChar;
- artist : Array[0..29] of AnsiChar;
- album : Array[0..29] of AnsiChar;
- year : Array[0.. 3] of AnsiChar;
- comment: Array[0..29] of AnsiChar;
- genre : Byte;
- end;
-
- // Binary APEv2 tag structure
- TAG_APE_BINARY = record
- key : PAnsiChar;
- data : PAnsiChar;
- length: DWORD;
- end;
-
- // BWF "bext" tag structure
- TAG_BEXT = packed record
- Description : Array[0..255] of AnsiChar; // description
- Originator : Array[0.. 31] of AnsiChar; // name of the originator
- OriginatorReference: Array[0.. 31] of AnsiChar; // reference of the originator
- OriginationDate : Array[0.. 9] of AnsiChar; // date of creation (yyyy-mm-dd)
- OriginationTime : Array[0.. 7] of AnsiChar; // time of creation (hh-mm-ss)
- TimeReference : QWORD; // first sample count since midnight (little-endian)
- Version : Word; // BWF version (little-endian)
- UMID : Array[0.. 63] of Byte; // SMPTE UMID
- Reserved : Array[0..189] of Byte;
- CodingHistory : Array of AnsiChar; // history
- end;
-
- BASS_DX8_CHORUS = record
- fWetDryMix: FLOAT;
- fDepth : FLOAT;
- fFeedback : FLOAT;
- fFrequency: FLOAT;
- lWaveform : DWORD; // 0=triangle, 1=sine
- fDelay : FLOAT;
- lPhase : DWORD; // BASS_DX8_PHASE_xxx
- end;
-
- BASS_DX8_COMPRESSOR = record
- fGain : FLOAT;
- fAttack : FLOAT;
- fRelease : FLOAT;
- fThreshold: FLOAT;
- fRatio : FLOAT;
- fPredelay : FLOAT;
- end;
-
- BASS_DX8_DISTORTION = record
- fGain : FLOAT;
- fEdge : FLOAT;
- fPostEQCenterFrequency: FLOAT;
- fPostEQBandwidth : FLOAT;
- fPreLowpassCutoff : FLOAT;
- end;
-
- BASS_DX8_ECHO = record
- fWetDryMix : FLOAT;
- fFeedback : FLOAT;
- fLeftDelay : FLOAT;
- fRightDelay: FLOAT;
- lPanDelay : BOOL;
- end;
-
- BASS_DX8_FLANGER = record
- fWetDryMix: FLOAT;
- fDepth : FLOAT;
- fFeedback : FLOAT;
- fFrequency: FLOAT;
- lWaveform : DWORD; // 0=triangle, 1=sine
- fDelay : FLOAT;
- lPhase : DWORD; // BASS_DX8_PHASE_xxx
- end;
-
- BASS_DX8_GARGLE = record
- dwRateHz : DWORD; // Rate of modulation in hz
- dwWaveShape: DWORD; // 0=triangle, 1=square
- end;
-
- BASS_DX8_I3DL2REVERB = record
- lRoom : Longint; // [-10000, 0 ] default: -1000 mB
- lRoomHF : Longint; // [-10000, 0 ] default: 0 mB
- flRoomRolloffFactor: FLOAT; // [0.0 , 10.0 ] default: 0.0
- flDecayTime : FLOAT; // [0.1 , 20.0 ] default: 1.49s
- flDecayHFRatio : FLOAT; // [0.1 , 2.0 ] default: 0.83
- lReflections : Longint; // [-10000, 1000 ] default: -2602 mB
- flReflectionsDelay : FLOAT; // [0.0 , 0.3 ] default: 0.007 s
- lReverb : Longint; // [-10000, 2000 ] default: 200 mB
- flReverbDelay : FLOAT; // [0.0 , 0.1 ] default: 0.011 s
- flDiffusion : FLOAT; // [0.0 , 100.0 ] default: 100.0 %
- flDensity : FLOAT; // [0.0 , 100.0 ] default: 100.0 %
- flHFReference : FLOAT; // [20.0 , 20000.0] default: 5000.0 Hz
- end;
-
- BASS_DX8_PARAMEQ = record
- fCenter : FLOAT;
- fBandwidth: FLOAT;
- fGain : FLOAT;
- end;
-
- BASS_DX8_REVERB = record
- fInGain : FLOAT; // [-96.0,0.0 ] default: 0.0 dB
- fReverbMix : FLOAT; // [-96.0,0.0 ] default: 0.0 db
- fReverbTime : FLOAT; // [0.001,3000.0] default: 1000.0 ms
- fHighFreqRTRatio: FLOAT; // [0.001,0.999 ] default: 0.001
- end;
-
- // callback function types
- STREAMPROC = function(handle: HSTREAM; buffer: Pointer; length: DWORD; user: Pointer): DWORD; stdcall;
- {
- User stream callback function. NOTE: A stream function should obviously be as
- quick as possible, other streams (and MOD musics) can't be mixed until
- it's finished.
- handle : The stream that needs writing
- buffer : Buffer to write the samples in
- length : Number of bytes to write
- user : The 'user' parameter value given when calling BASS_StreamCreate
- RETURN : Number of bytes written. Set the BASS_STREAMPROC_END flag to end
- the stream.
- }
-
-const
- // special STREAMPROCs
- STREAMPROC_DUMMY : STREAMPROC = STREAMPROC(0); // "dummy" stream
- STREAMPROC_PUSH : STREAMPROC = STREAMPROC(-1); // push stream
-
-type
-
- DOWNLOADPROC = procedure(buffer: Pointer; length: DWORD; user: Pointer); stdcall;
- {
- Internet stream download callback function.
- buffer : Buffer containing the downloaded data... NULL=end of download
- length : Number of bytes in the buffer
- user : The 'user' parameter value given when calling BASS_StreamCreateURL
- }
-
- SYNCPROC = procedure(handle: HSYNC; channel, data: DWORD; user: Pointer); stdcall;
- {
- Sync callback function. NOTE: a sync callback function should be very
- quick as other syncs cannot be processed until it has finished. If the
- sync is a "mixtime" sync, then other streams and MOD musics can not be
- mixed until it's finished either.
- handle : The sync that has occured
- channel: Channel that the sync occured in
- data : Additional data associated with the sync's occurance
- user : The 'user' parameter given when calling BASS_ChannelSetSync
- }
-
- DSPPROC = procedure(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: Pointer); stdcall;
- {
- DSP callback function. NOTE: A DSP function should obviously be as quick
- as possible... other DSP functions, streams and MOD musics can not be
- processed until it's finished.
- handle : The DSP handle
- channel: Channel that the DSP is being applied to
- buffer : Buffer to apply the DSP to
- length : Number of bytes in the buffer
- user : The 'user' parameter given when calling BASS_ChannelSetDSP
- }
-
- RECORDPROC = function(handle: HRECORD; buffer: Pointer; length: DWORD; user: Pointer): BOOL; stdcall;
- {
- Recording callback function.
- handle : The recording handle
- buffer : Buffer containing the recorded sample data
- length : Number of bytes
- user : The 'user' parameter value given when calling BASS_RecordStart
- RETURN : TRUE = continue recording, FALSE = stop
- }
-
-
-// Vars that will hold our dynamically loaded functions...
-var BASS_SetConfig :function(option, value: DWORD): BOOL; stdcall;
-var BASS_GetConfig :function(option: DWORD): DWORD; stdcall;
-var BASS_SetConfigPtr :function(option: DWORD; value: Pointer): BOOL; stdcall;
-var BASS_GetConfigPtr :function(option: DWORD): Pointer; stdcall;
-var BASS_GetVersion :function: DWORD; stdcall;
-var BASS_ErrorGetCode :function: Integer; stdcall;
-var BASS_GetDeviceInfo :function(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall;
-var BASS_Init :function(device: Integer; freq, flags: DWORD; win: HWND; clsid: PGUID): BOOL; stdcall;
-var BASS_SetDevice :function(device: DWORD): BOOL; stdcall;
-var BASS_GetDevice :function: DWORD; stdcall;
-var BASS_Free :function: BOOL; stdcall;
-var BASS_GetDSoundObject:function(obj: DWORD): Pointer; stdcall;
-var BASS_GetInfo :function(var info: BASS_INFO): BOOL; stdcall;
-var BASS_Update :function(length: DWORD): BOOL; stdcall;
-var BASS_GetCPU :function: FLOAT; stdcall;
-var BASS_Start :function: BOOL; stdcall;
-var BASS_Stop :function: BOOL; stdcall;
-var BASS_Pause :function: BOOL; stdcall;
-var BASS_SetVolume :function(volume: FLOAT): BOOL; stdcall;
-var BASS_GetVolume :function: FLOAT; stdcall;
-
-function BASS_PluginLoad (filename: PAnsiChar; flags: DWORD): HPLUGIN; stdcall;
-function BASS_PluginFree (handle: HPLUGIN): BOOL; stdcall;
-function BASS_PluginGetInfo(handle: HPLUGIN): PBASS_PLUGININFO; stdcall;
-
-var BASS_Set3DFactors :function(distf, rollf, doppf: FLOAT): BOOL; stdcall;
-var BASS_Get3DFactors :function(var distf, rollf, doppf: FLOAT): BOOL; stdcall;
-var BASS_Set3DPosition :function(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall;
-var BASS_Get3DPosition :function(var pos, vel, front, top: BASS_3DVECTOR): BOOL; stdcall;
-var BASS_Apply3D :procedure; stdcall;
-var BASS_SetEAXParameters:function(env: Integer; vol, decay, damp: FLOAT): BOOL; stdcall;
-var BASS_GetEAXParameters:function(var env: DWORD; var vol, decay, damp: FLOAT): BOOL; stdcall;
-
-var BASS_MusicLoad:function(mem: BOOL; f: Pointer; offset: QWORD; length, flags, freq: DWORD): HMUSIC; stdcall;
-var BASS_MusicFree:function(handle: HMUSIC): BOOL; stdcall;
-
-var BASS_SampleLoad :function(mem: BOOL; f: Pointer; offset: QWORD; length, max, flags: DWORD): HSAMPLE; stdcall;
-var BASS_SampleCreate :function(length, freq, chans, max, flags: DWORD): HSAMPLE; stdcall;
-var BASS_SampleFree :function(handle: HSAMPLE): BOOL; stdcall;
-var BASS_SampleSetData :function(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall;
-var BASS_SampleGetData :function(handle: HSAMPLE; buffer: Pointer): BOOL; stdcall;
-var BASS_SampleGetInfo :function(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall;
-var BASS_SampleSetInfo :function(handle: HSAMPLE; var info: BASS_SAMPLE): BOOL; stdcall;
-var BASS_SampleGetChannel :function(handle: HSAMPLE; onlynew: BOOL): HCHANNEL; stdcall;
-var BASS_SampleGetChannels:function(handle: HSAMPLE; channels: Pointer): DWORD; stdcall;
-var BASS_SampleStop :function(handle: HSAMPLE): BOOL; stdcall;
-
-var BASS_StreamCreate :function(freq, chans, flags: DWORD; proc: STREAMPROC; user: Pointer): HSTREAM; stdcall;
-var BASS_StreamCreateFile :function(mem: BOOL; f: Pointer; offset, length: QWORD; flags: DWORD): HSTREAM; stdcall;
-var BASS_StreamCreateURL :function(url: Pointer; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; stdcall;
-var BASS_StreamCreateFileUser :function(system, flags: DWORD; var procs: BASS_FILEPROCS; user: Pointer): HSTREAM; stdcall;
-var BASS_StreamFree :function(handle: HSTREAM): BOOL; stdcall;
-var BASS_StreamGetFilePosition:function(handle: HSTREAM; mode: DWORD): QWORD; stdcall;
-var BASS_StreamPutData :function(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall;
-var BASS_StreamPutFileData :function(handle: HSTREAM; buffer: Pointer; length: DWORD): DWORD; stdcall;
-
-var BASS_RecordGetDeviceInfo:function(device: DWORD; var info: BASS_DEVICEINFO): BOOL; stdcall;
-var BASS_RecordInit :function(device: Integer): BOOL; stdcall;
-var BASS_RecordSetDevice :function(device: DWORD): BOOL; stdcall;
-var BASS_RecordGetDevice :function: DWORD; stdcall;
-var BASS_RecordFree :function: BOOL; stdcall;
-var BASS_RecordGetInfo :function(var info: BASS_RECORDINFO): BOOL; stdcall;
-var BASS_RecordGetInputName :function(input: Integer): PAnsiChar; stdcall;
-var BASS_RecordSetInput :function(input: Integer; flags: DWORD; volume: FLOAT): BOOL; stdcall;
-var BASS_RecordGetInput :function(input: Integer; var volume: FLOAT): DWORD; stdcall;
-var BASS_RecordStart :function(freq, chans, flags: DWORD; proc: RECORDPROC; user: Pointer): HRECORD; stdcall;
-
-var BASS_ChannelBytes2Seconds :function(handle: DWORD; pos: QWORD): Double; stdcall;
-var BASS_ChannelSeconds2Bytes :function(handle: DWORD; pos: Double): QWORD; stdcall;
-var BASS_ChannelGetDevice :function(handle: DWORD): DWORD; stdcall;
-var BASS_ChannelSetDevice :function(handle, device: DWORD): BOOL; stdcall;
-var BASS_ChannelIsActive :function(handle: DWORD): DWORD; stdcall;
-var BASS_ChannelGetInfo :function(handle: DWORD; var info: BASS_CHANNELINFO):BOOL;stdcall;
-var BASS_ChannelGetTags :function(handle: HSTREAM; tags: DWORD): PAnsiChar; stdcall;
-var BASS_ChannelFlags :function(handle, flags, mask: DWORD): DWORD; stdcall;
-var BASS_ChannelUpdate :function(handle, length: DWORD): BOOL; stdcall;
-var BASS_ChannelLock :function(handle: DWORD; lock: BOOL): BOOL; stdcall;
-var BASS_ChannelPlay :function(handle: DWORD; restart: BOOL): BOOL; stdcall;
-var BASS_ChannelStop :function(handle: DWORD): BOOL; stdcall;
-var BASS_ChannelPause :function(handle: DWORD): BOOL; stdcall;
-var BASS_ChannelSetAttribute :function(handle, attrib: DWORD; value: FLOAT): BOOL; stdcall;
-var BASS_ChannelGetAttribute :function(handle, attrib: DWORD; var value: FLOAT): BOOL; stdcall;
-var BASS_ChannelSlideAttribute :function(handle, attrib: DWORD; value: FLOAT; time: DWORD): BOOL; stdcall;
-var BASS_ChannelIsSliding :function(handle, attrib: DWORD): BOOL; stdcall;
-var BASS_ChannelSet3DAttributes:function(handle: DWORD; mode: Integer; min, max: FLOAT; iangle, oangle, outvol: Integer): BOOL; stdcall;
-var BASS_ChannelGet3DAttributes:function(handle: DWORD; var mode: DWORD; var min, max: FLOAT; var iangle, oangle, outvol: DWORD): BOOL; stdcall;
-var BASS_ChannelSet3DPosition :function(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall;
-var BASS_ChannelGet3DPosition :function(handle: DWORD; var pos, orient, vel: BASS_3DVECTOR): BOOL; stdcall;
-var BASS_ChannelGetLength :function(handle, mode: DWORD): QWORD; stdcall;
-var BASS_ChannelSetPosition :function(handle: DWORD; pos: QWORD; mode: DWORD): BOOL; stdcall;
-var BASS_ChannelGetPosition :function(handle, mode: DWORD): QWORD; stdcall;
-var BASS_ChannelGetLevel :function(handle: DWORD): DWORD; stdcall;
-var BASS_ChannelGetData :function(handle: DWORD; buffer: Pointer; length: DWORD): DWORD; stdcall;
-var BASS_ChannelSetSync :function(handle: DWORD; type_: DWORD; param: QWORD; proc: SYNCPROC; user: Pointer): HSYNC; stdcall;
-var BASS_ChannelRemoveSync :function(handle: DWORD; sync: HSYNC): BOOL; stdcall;
-var BASS_ChannelSetDSP :function(handle: DWORD; proc: DSPPROC; user: Pointer; priority: Integer): HDSP; stdcall;
-var BASS_ChannelRemoveDSP :function(handle: DWORD; dsp: HDSP): BOOL; stdcall;
-var BASS_ChannelSetLink :function(handle, chan: DWORD): BOOL; stdcall;
-var BASS_ChannelRemoveLink :function(handle, chan: DWORD): BOOL; stdcall;
-var BASS_ChannelSetFX :function(handle, type_: DWORD; priority: Integer): HFX; stdcall;
-var BASS_ChannelRemoveFX :function(handle: DWORD; fx: HFX): BOOL; stdcall;
-
-var BASS_FXSetParameters:function(handle: HFX; par: Pointer): BOOL; stdcall;
-var BASS_FXGetParameters:function(handle: HFX; par: Pointer): BOOL; stdcall;
-var BASS_FXReset :function(handle: HFX): BOOL; stdcall;
-
-{ok, now we need something that loads our DLL and gets rid of it as well...}
-
-var BASS_Handle:Thandle=0; // this will hold our handle for the dll; it functions nicely as a mutli-dll prevention unit as well...
-
-Function Load_BASSDLL(dllfilename:PAnsiChar):boolean; overload;
-Function Load_BASSDLL(dllfilename:PWideChar):boolean; overload;
-
-Procedure Unload_BASSDLL; // another mystery function ???
-{
- This function frees the dynamically linked-in functions from memory...don't forget to call it once you're done !
- Best place to put this is probably the OnDestroy of your Main-Form;
- suggested use in OnDestroy :
- - Call BASS_Free to get rid of everything that's eating memory (automatically called, but just to be on the safe-side !),
- - Then call this function.
-}
-
-
-function BASS_SPEAKER_N(n: DWORD): DWORD;
-function BASS_SetEAXPreset(env: Integer): BOOL;
-{
- This function is defined in the implementation part of this unit.
- It is not part of BASS.DLL but an extra function which makes it easier
- to set the predefined EAX environments.
- env : a EAX_ENVIRONMENT_xxx constant
-}
-
-implementation
-
-var BASS_PluginLoad_ :function(f: PAnsiChar; flags: DWORD): HPLUGIN; stdcall;
-var BASS_PluginFree_ :function(handle: HPLUGIN): BOOL; stdcall;
-var BASS_PluginGetInfo_:function(handle: HPLUGIN): PBASS_PLUGININFO; stdcall;
-
-Function CheckBASSHandle:boolean;
-{$IFDEF CHECK_PROC}label L_Exit;{$ENDIF}
-begin
- if BASS_Handle<>0 then
- begin {now we tie the functions to the VARs from above}
-
- @BASS_SetConfig :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SetConfig'));
- {$IFDEF CHECK_PROC}if @BASS_SetConfig=nil then goto L_Exit;{$ENDIF}
- @BASS_GetConfig :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetConfig'));
- {$IFDEF CHECK_PROC}if @BASS_GetConfig=nil then goto L_Exit;{$ENDIF}
- @BASS_SetConfigPtr :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SetConfigPtr'));
- {$IFDEF CHECK_PROC}if @BASS_SetConfigPtr=nil then goto L_Exit;{$ENDIF}
- @BASS_GetConfigPtr :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetConfigPtr'));
- {$IFDEF CHECK_PROC}if @BASS_GetConfigPtr=nil then goto L_Exit;{$ENDIF}
- @BASS_GetVersion :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetVersion'));
- {$IFDEF CHECK_PROC}if @BASS_GetVersion=nil then goto L_Exit;{$ENDIF}
- @BASS_ErrorGetCode :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ErrorGetCode'));
- {$IFDEF CHECK_PROC}if @BASS_ErrorGetCode=nil then goto L_Exit;{$ENDIF}
- @BASS_GetDeviceInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetDeviceInfo'));
- {$IFDEF CHECK_PROC}if @BASS_GetDeviceInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_Init :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Init'));
- {$IFDEF CHECK_PROC}if @BASS_Init=nil then goto L_Exit;{$ENDIF}
- @BASS_SetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_SetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_GetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_GetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_Free :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Free'));
- {$IFDEF CHECK_PROC}if @BASS_Free=nil then goto L_Exit;{$ENDIF}
- @BASS_GetDSoundObject:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetDSoundObject'));
- {$IFDEF CHECK_PROC}if @BASS_GetDSoundObject=nil then goto L_Exit;{$ENDIF}
- @BASS_GetInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_GetInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_Update :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Update'));
- {$IFDEF CHECK_PROC}if @BASS_Update=nil then goto L_Exit;{$ENDIF}
- @BASS_GetCPU :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetCPU'));
- {$IFDEF CHECK_PROC}if @BASS_GetCPU=nil then goto L_Exit;{$ENDIF}
- @BASS_Start :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Start'));
- {$IFDEF CHECK_PROC}if @BASS_Start=nil then goto L_Exit;{$ENDIF}
- @BASS_Stop :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Stop'));
- {$IFDEF CHECK_PROC}if @BASS_Stop=nil then goto L_Exit;{$ENDIF}
- @BASS_Pause :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Pause'));
- {$IFDEF CHECK_PROC}if @BASS_Pause=nil then goto L_Exit;{$ENDIF}
- @BASS_SetVolume :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SetVolume'));
- {$IFDEF CHECK_PROC}if @BASS_SetVolume=nil then goto L_Exit;{$ENDIF}
- @BASS_GetVolume :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetVolume'));
- {$IFDEF CHECK_PROC}if @BASS_GetVolume=nil then goto L_Exit;{$ENDIF}
-
- @BASS_PluginLoad_ :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_PluginLoad'));
- {$IFDEF CHECK_PROC}if @BASS_PluginLoad_=nil then goto L_Exit;{$ENDIF}
- @BASS_PluginFree_ :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_PluginFree'));
- {$IFDEF CHECK_PROC}if @BASS_PluginFree_=nil then goto L_Exit;{$ENDIF}
- @BASS_PluginGetInfo_:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_PluginGetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_PluginGetInfo_=nil then goto L_Exit;{$ENDIF}
-
- @BASS_Set3DFactors :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Set3DFactors'));
- {$IFDEF CHECK_PROC}if @BASS_Set3DFactors=nil then goto L_Exit;{$ENDIF}
- @BASS_Get3DFactors :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Get3DFactors'));
- {$IFDEF CHECK_PROC}if @BASS_Get3DFactors=nil then goto L_Exit;{$ENDIF}
- @BASS_Set3DPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Set3DPosition'));
- {$IFDEF CHECK_PROC}if @BASS_Set3DPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_Get3DPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Get3DPosition'));
- {$IFDEF CHECK_PROC}if @BASS_Get3DPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_Apply3D :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_Apply3D'));
- {$IFDEF CHECK_PROC}if @BASS_Apply3D=nil then goto L_Exit;{$ENDIF}
- @BASS_SetEAXParameters:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SetEAXParameters'));
- {$IFDEF CHECK_PROC}if @BASS_SetEAXParameters=nil then goto L_Exit;{$ENDIF}
- @BASS_GetEAXParameters:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_GetEAXParameters'));
- {$IFDEF CHECK_PROC}if @BASS_GetEAXParameters=nil then goto L_Exit;{$ENDIF}
-
- @BASS_MusicLoad:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_MusicLoad'));
- {$IFDEF CHECK_PROC}if @BASS_MusicLoad=nil then goto L_Exit;{$ENDIF}
- @BASS_MusicFree:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_MusicFree'));
- {$IFDEF CHECK_PROC}if @BASS_MusicFree=nil then goto L_Exit;{$ENDIF}
-
- @BASS_SampleLoad :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleLoad'));
- {$IFDEF CHECK_PROC}if @BASS_SampleLoad=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleCreate :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleCreate'));
- {$IFDEF CHECK_PROC}if @BASS_SampleCreate=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleFree :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleFree'));
- {$IFDEF CHECK_PROC}if @BASS_SampleFree=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleSetData :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleSetData'));
- {$IFDEF CHECK_PROC}if @BASS_SampleSetData=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleGetData :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleGetData'));
- {$IFDEF CHECK_PROC}if @BASS_SampleGetData=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleGetInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleGetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_SampleGetInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleSetInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleSetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_SampleSetInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleGetChannel :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleGetChannel'));
- {$IFDEF CHECK_PROC}if @BASS_SampleGetChannel=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleGetChannels:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleGetChannels'));
- {$IFDEF CHECK_PROC}if @BASS_SampleGetChannels=nil then goto L_Exit;{$ENDIF}
- @BASS_SampleStop :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_SampleStop'));
- {$IFDEF CHECK_PROC}if @BASS_SampleStop=nil then goto L_Exit;{$ENDIF}
-
- @BASS_StreamCreate :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamCreate'));
- {$IFDEF CHECK_PROC}if @BASS_StreamCreate=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamCreateFile :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamCreateFile'));
- {$IFDEF CHECK_PROC}if @BASS_StreamCreateFile=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamCreateURL :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamCreateURL'));
- {$IFDEF CHECK_PROC}if @BASS_StreamCreateURL=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamCreateFileUser :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamCreateFileUser'));
- {$IFDEF CHECK_PROC}if @BASS_StreamCreateFileUser=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamFree :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamFree'));
- {$IFDEF CHECK_PROC}if @BASS_StreamFree=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamGetFilePosition:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamGetFilePosition'));
- {$IFDEF CHECK_PROC}if @BASS_StreamGetFilePosition=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamPutData :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamPutData'));
- {$IFDEF CHECK_PROC}if @BASS_StreamPutData=nil then goto L_Exit;{$ENDIF}
- @BASS_StreamPutFileData :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_StreamPutFileData'));
- {$IFDEF CHECK_PROC}if @BASS_StreamPutFileData=nil then goto L_Exit;{$ENDIF}
-
- @BASS_RecordGetDeviceInfo:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordGetDeviceInfo'));
- {$IFDEF CHECK_PROC}if @BASS_RecordGetDeviceInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordInit :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordInit'));
- {$IFDEF CHECK_PROC}if @BASS_RecordInit=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordSetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordSetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_RecordSetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordGetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordGetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_RecordGetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordFree :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordFree'));
- {$IFDEF CHECK_PROC}if @BASS_RecordFree=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordGetInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordGetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_RecordGetInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordGetInputName :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordGetInputName'));
- {$IFDEF CHECK_PROC}if @BASS_RecordGetInputName=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordSetInput :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordSetInput'));
- {$IFDEF CHECK_PROC}if @BASS_RecordSetInput=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordGetInput :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordGetInput'));
- {$IFDEF CHECK_PROC}if @BASS_RecordGetInput=nil then goto L_Exit;{$ENDIF}
- @BASS_RecordStart :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_RecordStart'));
- {$IFDEF CHECK_PROC}if @BASS_RecordStart=nil then goto L_Exit;{$ENDIF}
-
- @BASS_ChannelBytes2Seconds :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelBytes2Seconds'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelBytes2Seconds=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSeconds2Bytes :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSeconds2Bytes'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSeconds2Bytes=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetDevice :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetDevice'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetDevice=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelIsActive :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelIsActive'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelIsActive=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetInfo :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetInfo'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetInfo=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetTags :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetTags'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetTags=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelFlags :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelFlags'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelFlags=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelUpdate :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelUpdate'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelUpdate=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelLock :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelLock'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelLock=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelPlay :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelPlay'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelPlay=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelStop :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelStop'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelStop=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelPause :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelPause'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelPause=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetAttribute :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetAttribute'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetAttribute=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetAttribute :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetAttribute'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetAttribute=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSlideAttribute :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSlideAttribute'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSlideAttribute=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelIsSliding :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelIsSliding'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelIsSliding=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSet3DAttributes:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSet3DAttributes'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSet3DAttributes=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGet3DAttributes:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGet3DAttributes'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGet3DAttributes=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSet3DPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSet3DPosition'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSet3DPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGet3DPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGet3DPosition'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGet3DPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetLength :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetLength'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetLength=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetPosition'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetPosition :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetPosition'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetPosition=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetLevel :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetLevel'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetLevel=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelGetData :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelGetData'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelGetData=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetSync :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetSync'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetSync=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelRemoveSync :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelRemoveSync'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelRemoveSync=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetDSP :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetDSP'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetDSP=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelRemoveDSP :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelRemoveDSP'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelRemoveDSP=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetLink :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetLink'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetLink=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelRemoveLink :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelRemoveLink'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelRemoveLink=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelSetFX :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelSetFX'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelSetFX=nil then goto L_Exit;{$ENDIF}
- @BASS_ChannelRemoveFX :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_ChannelRemoveFX'));
- {$IFDEF CHECK_PROC}if @BASS_ChannelRemoveFX=nil then goto L_Exit;{$ENDIF}
-
- @BASS_FXSetParameters:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_FXSetParameters'));
- {$IFDEF CHECK_PROC}if @BASS_FXSetParameters=nil then goto L_Exit;{$ENDIF}
- @BASS_FXGetParameters:=GetProcAddress(BASS_Handle,PAnsiChar('BASS_FXGetParameters'));
- {$IFDEF CHECK_PROC}if @BASS_FXGetParameters=nil then goto L_Exit;{$ENDIF}
- @BASS_FXReset :=GetProcAddress(BASS_Handle,PAnsiChar('BASS_FXReset'));
- {$IFDEF CHECK_PROC}if @BASS_FXReset=nil then goto L_Exit;{$ENDIF}
-
- result:=true;
- exit;
-{$IFDEF CHECK_PROC}
-L_Exit:
- FreeLibrary(BASS_Handle);
- BASS_Handle:=0;
-{$ENDIF}
- end;
- result:=false;
-end;
-
-Function Load_BASSDLL(dllfilename:PAnsiChar):boolean;
-var
- oldmode:integer;
-begin
- if BASS_Handle<>0 then result:=true
- else
- begin
- oldmode:=SetErrorMode($8001);
- BASS_Handle:=LoadLibraryA(dllfilename);
- SetErrorMode(oldmode);
- result:=CheckBASSHandle;
- end;
-end;
-
-Function Load_BASSDLL(dllfilename:PWideChar):boolean;
-var
- oldmode:integer;
-begin
- if BASS_Handle<>0 then result:=true
- else
- begin
- oldmode:=SetErrorMode($8001);
- BASS_Handle:=LoadLibraryW(dllfilename);
- SetErrorMode(oldmode);
- result:=CheckBASSHandle;
- end;
-end;
-
-Procedure Unload_BASSDLL;
-begin
- if BASS_Handle<>0 then
- begin
- BASS_Free; // make sure we release everything
- FreeLibrary(BASS_Handle);
- end;
- BASS_Handle:=0;
-end;
-
-function BASS_SPEAKER_N(n: DWORD): DWORD;
-begin
- Result := n shl 24;
-end;
-
-type
- tEAXrec = record
- vol ,
- decay,
- damp : FLOAT;
- end;
-
-const
- EAXTable : array [0..EAX_ENVIRONMENT_COUNT-1] of tEAXRec = (
- (vol:0.5 ; decay: 1.493; damp:0.5 ),
- (vol:0.25 ; decay: 0.1 ; damp:0 ),
- (vol:0.417; decay: 0.4 ; damp:0.666),
- (vol:0.653; decay: 1.499; damp:0.166),
- (vol:0.208; decay: 0.478; damp:0 ),
- (vol:0.5 ; decay: 2.309; damp:0.888),
- (vol:0.403; decay: 4.279; damp:0.5 ),
- (vol:0.5 ; decay: 3.961; damp:0.5 ),
- (vol:0.5 ; decay: 2.886; damp:1.304),
- (vol:0.361; decay: 7.284; damp:0.332),
- (vol:0.5 ; decay:10.0 ; damp:0.3 ),
- (vol:0.153; decay: 0.259; damp:2.0 ),
- (vol:0.361; decay: 1.493; damp:0 ),
- (vol:0.444; decay: 2.697; damp:0.638),
- (vol:0.25 ; decay: 1.752; damp:0.776),
- (vol:0.111; decay: 3.145; damp:0.472),
- (vol:0.111; decay: 2.767; damp:0.224),
- (vol:0.194; decay: 7.841; damp:0.472),
- (vol:1 ; decay: 1.499; damp:0.5 ),
- (vol:0.097; decay: 2.767; damp:0.224),
- (vol:0.208; decay: 1.652; damp:1.5 ),
- (vol:0.652; decay: 2.886; damp:0.25 ),
- (vol:1 ; decay: 1.499; damp:0 ),
- (vol:0.875; decay: 8.392; damp:1.388),
- (vol:0.139; decay:17.234; damp:0.666),
- (vol:0.486; decay: 7.563; damp:0.806));
-
-function BASS_SetEAXPreset(env: Integer): BOOL;
-begin
- if env<EAX_ENVIRONMENT_COUNT then
- begin
- with EAXTable[env] do
- result:=BASS_SetEAXParameters(env,vol,decay,damp);
- end
- else
- result:=false;
-end;
-
-const
- PluginsMax = 50;
-const
- NumPlugin:cardinal=0;
-var
- arrPlugins:array [0..PluginsMax] of HPLUGIN;
-
-// Plugin functions
-function BASS_PluginLoad(filename:PAnsiChar;flags:DWORD):HPLUGIN; stdcall;
-var
- i:cardinal;
-begin
- result:=BASS_PluginLoad_(filename,flags);
- if result<>0 then // 0 - not plugin?
- begin
- i:=0;
- while i<NumPlugin do
- begin
- if arrPlugins[i]=result then // if present already
- exit;
- inc(i);
- end;
- // Remember for future
- arrPlugins[i]:=result;
- inc(NumPlugin);
- arrPlugins[NumPlugin]:=0; //last - zero
- end;
-end;
-
-function BASS_PluginFree(handle:HPLUGIN):BOOL; stdcall;
-var
- i:cardinal;
-begin
- result:=BASS_PluginFree_(handle);
- if result then
- begin
- if handle=0 then
- NumPlugin:=0
- else
- begin
- i:=0;
- while i<NumPlugin do
- begin
- if arrPlugins[i]=handle then
- begin
- move(arrPlugins[i+1],arrPlugins[i],SizeOf(HPLUGIN)*(NumPlugin-i));
- dec(NumPlugin);
- exit;
- end;
- inc(i);
- end;
- end;
- end;
-end;
-
-function BASS_PluginGetInfo(handle:HPLUGIN):PBASS_PLUGININFO; stdcall;
-begin
- if handle=0 then
- begin
- if NumPlugin=0 then
- result:=nil
- else
- result:=@arrPlugins;
- end
- else
- result:=BASS_PluginGetInfo_(handle);
-end;
-
-end.
diff --git a/delphi/Awkward/DynBass/dynbasswma.pas b/delphi/Awkward/DynBass/dynbasswma.pas
deleted file mode 100644
index 0359a40..0000000
--- a/delphi/Awkward/DynBass/dynbasswma.pas
+++ /dev/null
@@ -1,228 +0,0 @@
-{
- BASSWMA 2.4 Delphi unit
- Copyright (c) 2002-2008 Un4seen Developments Ltd.
-
- See the BASSWMA.CHM file for more detailed documentation
-}
-
-unit DynBassWMA;
-
-interface
-
-uses Windows, Dynamic_Bass;
-
-const
- // Additional error codes returned by BASS_ErrorGetCode
- BASS_ERROR_WMA_LICENSE = 1000; // the file is protected
- BASS_ERROR_WMA = 1001; // Windows Media (9 or above) is not installed
- BASS_ERROR_WMA_WM9 = BASS_ERROR_WMA;
- BASS_ERROR_WMA_DENIED = 1002; // access denied (user/pass is invalid)
- BASS_ERROR_WMA_INDIVIDUAL = 1004; // individualization is needed
-
- // Additional BASS_SetConfig options
- BASS_CONFIG_WMA_PRECHECK = $10100;
- BASS_CONFIG_WMA_PREBUF = $10101;
-// BASS_CONFIG_WMA_ASX = $10102;
- BASS_CONFIG_WMA_BASSFILE = $10103;
- BASS_CONFIG_WMA_NETSEEK = $10104;
-
- // additional WMA sync types
- BASS_SYNC_WMA_CHANGE = $10100;
- BASS_SYNC_WMA_META = $10101;
-
- // additional BASS_StreamGetFilePosition WMA mode
- BASS_FILEPOS_WMA_BUFFER = 1000; // internet buffering progress (0-100%)
-
- // Additional flags for use with BASS_WMA_EncodeOpen/File/Network/Publish
- BASS_WMA_ENCODE_STANDARD = $2000; // standard WMA
- BASS_WMA_ENCODE_PRO = $4000; // WMA Pro
- BASS_WMA_ENCODE_24BIT = $8000; // 24-bit
- BASS_WMA_ENCODE_SCRIPT = $20000; // set script (mid-stream tags) in the WMA encoding
-
- // Additional flag for use with BASS_WMA_EncodeGetRates
- BASS_WMA_ENCODE_RATES_VBR = $10000; // get available VBR quality settings
-
- // WMENCODEPROC "type" values
- BASS_WMA_ENCODE_HEAD = 0;
- BASS_WMA_ENCODE_DATA = 1;
- BASS_WMA_ENCODE_DONE = 2;
-
- // BASS_WMA_EncodeSetTag "type" values
- BASS_WMA_TAG_ANSI = 0;
- BASS_WMA_TAG_UNICODE = 1;
- BASS_WMA_TAG_UTF8 = 2;
-
- // BASS_CHANNELINFO type
- BASS_CTYPE_STREAM_WMA = $10300;
- BASS_CTYPE_STREAM_WMA_MP3 = $10301;
-
- // Additional BASS_ChannelGetTags type
- BASS_TAG_WMA = 8; // WMA header tags : series of null-terminated UTF-8 strings
- BASS_TAG_WMA_META = 11; // WMA mid-stream tag : UTF-8 string
-
-
-type
- HWMENCODE = DWORD; // WMA encoding handle
-
- CLIENTCONNECTPROC = procedure(handle:HWMENCODE; connect:BOOL; ip:PChar; user:Pointer); stdcall;
- {
- Client connection notification callback function.
- handle : The encoder
- connect: TRUE=client is connecting, FALSE=disconnecting
- ip : The client's IP (xxx.xxx.xxx.xxx:port)
- user : The 'user' parameter value given when calling BASS_WMA_EncodeSetNotify
- }
-
- WMENCODEPROC = procedure(handle:HWMENCODE; dtype:DWORD; buffer:Pointer; length:DWORD; user:Pointer); stdcall;
- {
- Encoder callback function.
- handle : The encoder handle
- dtype : The type of data, one of BASS_WMA_ENCODE_xxx values
- buffer : The encoded data
- length : Length of the data
- user : The 'user' parameter value given when calling BASS_WMA_EncodeOpen
- }
-
-
-const
- basswmadll = 'basswma.dll';
-
-var BASS_WMA_StreamCreateFile :function(mem:BOOL; fl:pointer; offset,length:QWORD; flags:DWORD): HSTREAM; stdcall;
-var BASS_WMA_StreamCreateFileAuth :function(mem:BOOL; fl:pointer; offset,length:QWORD; flags:DWORD; user,pass:PChar): HSTREAM; stdcall;
-var BASS_WMA_StreamCreateFileUser :function(system,flags:DWORD; var procs:BASS_FILEPROCS; user:Pointer): HSTREAM; stdcall;
-
-var BASS_WMA_EncodeGetRates :function(freq,chans,flags:DWORD): PDWORD; stdcall;
-var BASS_WMA_EncodeOpen :function(freq,chans,flags,bitrate:DWORD; proc:WMENCODEPROC; user:Pointer): HWMENCODE; stdcall;
-var BASS_WMA_EncodeOpenFile :function(freq,chans,flags,bitrate:DWORD; fname:PChar): HWMENCODE; stdcall;
-var BASS_WMA_EncodeOpenNetwork :function(freq,chans,flags,bitrate,port,clients:DWORD): HWMENCODE; stdcall;
-var BASS_WMA_EncodeOpenNetworkMulti:function(freq,chans,flags:DWORD; bitrates:PDWORD; port,clients:DWORD): HWMENCODE; stdcall;
-var BASS_WMA_EncodeOpenPublish :function(freq,chans,flags,bitrate:DWORD; url,user,pass:PChar): HWMENCODE; stdcall;
-var BASS_WMA_EncodeOpenPublishMulti:function(freq,chans,flags:DWORD; bitrates:PDWORD; url,user,pass:PChar): HWMENCODE; stdcall;
-var BASS_WMA_EncodeGetPort :function(handle:HWMENCODE): DWORD; stdcall;
-var BASS_WMA_EncodeSetNotify :function(handle:HWMENCODE; proc:CLIENTCONNECTPROC; user:Pointer): BOOL; stdcall;
-var BASS_WMA_EncodeGetClients :function(handle:HWMENCODE): DWORD; stdcall;
-var BASS_WMA_EncodeSetTag :function(handle:HWMENCODE; tag,text:PChar; ttype:DWORD): BOOL; stdcall;
-var BASS_WMA_EncodeWrite :function(handle:HWMENCODE; buffer:Pointer; length:DWORD): BOOL; stdcall;
-var BASS_WMA_EncodeClose :function(handle:HWMENCODE): BOOL; stdcall;
-
-var BASS_WMA_GetWMObject :function(handle:DWORD): Pointer; stdcall;
-
-function InitWMA:bool;
-Function Load_WMADLL(dllfilename:PAnsiChar):boolean; overload;
-Function Load_WMADLL(dllfilename:PWideChar):boolean; overload;
-
-implementation
-
-const
- WMA_Handle:THANDLE = 0;
- from:integer = 0;
-
-procedure SetProcs(handle:THANDLE);
-begin
- @BASS_WMA_StreamCreateFile :=GetProcAddress(handle,'BASS_WMA_StreamCreateFile');
- @BASS_WMA_StreamCreateFileAuth:=GetProcAddress(handle,'BASS_WMA_StreamCreateFileAuth');
- @BASS_WMA_StreamCreateFileUser:=GetProcAddress(handle,'BASS_WMA_StreamCreateFileUser');
-
- @BASS_WMA_EncodeGetRates :=GetProcAddress(handle,'BASS_WMA_EncodeGetRates');
- @BASS_WMA_EncodeOpen :=GetProcAddress(handle,'BASS_WMA_EncodeGetOpen');
- @BASS_WMA_EncodeOpenFile :=GetProcAddress(handle,'BASS_WMA_EncodeOpenFile');
- @BASS_WMA_EncodeOpenNetwork :=GetProcAddress(handle,'BASS_WMA_EncodeOpenNetwork');
- @BASS_WMA_EncodeOpenNetworkMulti:=GetProcAddress(handle,'BASS_WMA_EncodeOpenNetworkMulti');
- @BASS_WMA_EncodeOpenPublish :=GetProcAddress(handle,'BASS_WMA_EncodeOpenPublish');
- @BASS_WMA_EncodeOpenPublishMulti:=GetProcAddress(handle,'BASS_WMA_EncodeOpenPublishMulti');
- @BASS_WMA_EncodeGetPort :=GetProcAddress(handle,'BASS_WMA_EncodeGetPort');
- @BASS_WMA_EncodeSetNotify :=GetProcAddress(handle,'BASS_WMA_EncodeSetNotify');
- @BASS_WMA_EncodeGetClients :=GetProcAddress(handle,'BASS_WMA_EncodeGetClients');
- @BASS_WMA_EncodeSetTag :=GetProcAddress(handle,'BASS_WMA_EncodeSetTag');
- @BASS_WMA_EncodeWrite :=GetProcAddress(handle,'BASS_WMA_EncodeWrite');
- @BASS_WMA_EncodeClose :=GetProcAddress(handle,'BASS_WMA_EncodeClose');
-
- @BASS_WMA_GetWMObject:=GetProcAddress(handle,'BASS_WMA_GetWMObject');
-end;
-
-function InitWMA:bool;
-var
- info:PBASS_PLUGININFO;
- i:dword;
- pHPlugin:^HPLUGIN;
-begin
- if WMA_Handle<>0 then
- begin
- result:=true;
- exit;
- end;
- result:=false;
- pHPlugin:=pointer(BASS_PluginGetInfo(0));
- if pHPlugin=nil then exit;
- while pHPlugin^<>0 do
- begin
- info:=BASS_PluginGetInfo(pHPlugin^);
- i:=0;
- while i<info^.formatc do
- begin
- if info^.formats^[i].ctype=BASS_CTYPE_STREAM_WMA then
- begin
- WMA_Handle:=pHPlugin^;
- SetProcs(pHPlugin^);
- from:=2;
- result:=true;
- exit;
- end;
- inc(i);
- end;
- inc(pHPlugin);
- end;
-end;
-
-Function Load_WMADLL(dllfilename:PAnsiChar):boolean;
-var
- oldmode:integer;
-begin
- if WMA_Handle<>0 then result:=true
- else
- begin
- oldmode:=SetErrorMode($8001);
- WMA_Handle:=LoadLibraryA(dllfilename);
- SetErrorMode(oldmode);
- result:=WMA_Handle<>0;
- if result then
- begin
- from:=1;
- SetProcs(WMA_Handle);
- end;
- end;
-end;
-
-Function Load_WMADLL(dllfilename:PWideChar):boolean;
-var
- oldmode:integer;
-begin
- if WMA_Handle<>0 then result:=true
- else
- begin
- oldmode:=SetErrorMode($8001);
- WMA_Handle:=LoadLibraryW(dllfilename);
- SetErrorMode(oldmode);
- result:=WMA_Handle<>0;
- if result then
- begin
- from:=1;
- SetProcs(WMA_Handle);
- end;
- end;
-end;
-
-Procedure Unload_WMADLL;
-begin
- if WMA_Handle<>0 then
- begin
- if from=2 then
- BASS_PluginFree(WMA_Handle)
- else //if from=1 then
- FreeLibrary(WMA_Handle);
- WMA_Handle:=0;
- end;
- from:=0;
-end;
-
-end.
diff --git a/delphi/Awkward/include/FreeImage.pas b/delphi/Awkward/include/FreeImage.pas
deleted file mode 100644
index 480b0d0..0000000
--- a/delphi/Awkward/include/FreeImage.pas
+++ /dev/null
@@ -1,738 +0,0 @@
-unit FreeImage;
-
-// ==========================================================
-// Delphi wrapper for FreeImage 3
-//
-// Design and implementation by
-// - Simon Beavis
-// - Peter Byström
-// - Anatoliy Pulyaevskiy (xvel84@rambler.ru)
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at your own risk!
-// ==========================================================
-
-interface
-
-uses Windows;
-
-{$MINENUMSIZE 4} // Make sure enums are stored as an integer to be compatible with C/C++
-
-const
- FIDLL = 'FreeImage.dll';
-
-// --------------------------------------------------------------------------
-// Bitmap types -------------------------------------------------------------
-// --------------------------------------------------------------------------
-
-type
- FIBITMAP = record
- data : Pointer;
- end;
- PFIBITMAP = ^FIBITMAP;
-
- FIMULTIBITMAP = record
- data : Pointer;
- end;
- PFIMULTIBITMAP = ^FIMULTIBITMAP;
-
-// --------------------------------------------------------------------------
-// Indexes for byte arrays, masks and shifts for treating pixels as words ---
-// These coincide with the order of RGBQUAD and RGBTRIPLE -------------------
-// Little Endian (x86 / MS Windows, Linux) : BGR(A) order -------------------
-// --------------------------------------------------------------------------
-
-const
- FI_RGBA_RED = 2;
- FI_RGBA_GREEN = 1;
- FI_RGBA_BLUE = 0;
- FI_RGBA_ALPHA = 3;
- FI_RGBA_RED_MASK = $00FF0000;
- FI_RGBA_GREEN_MASK = $0000FF00;
- FI_RGBA_BLUE_MASK = $000000FF;
- FI_RGBA_ALPHA_MASK = $FF000000;
- FI_RGBA_RED_SHIFT = 16;
- FI_RGBA_GREEN_SHIFT = 8;
- FI_RGBA_BLUE_SHIFT = 0;
- FI_RGBA_ALPHA_SHIFT = 24;
-
-// --------------------------------------------------------------------------
-// The 16bit macros only include masks and shifts, --------------------------
-// since each color element is not byte aligned -----------------------------
-// --------------------------------------------------------------------------
-
-const
- FI16_555_RED_MASK = $7C00;
- FI16_555_GREEN_MASK = $03E0;
- FI16_555_BLUE_MASK = $001F;
- FI16_555_RED_SHIFT = 10;
- FI16_555_GREEN_SHIFT = 5;
- FI16_555_BLUE_SHIFT = 0;
- FI16_565_RED_MASK = $F800;
- FI16_565_GREEN_MASK = $07E0;
- FI16_565_BLUE_MASK = $001F;
- FI16_565_RED_SHIFT = 11;
- FI16_565_GREEN_SHIFT = 5;
- FI16_565_BLUE_SHIFT = 0;
-
-// --------------------------------------------------------------------------
-// ICC profile support ------------------------------------------------------
-// --------------------------------------------------------------------------
-
-const
- FIICC_DEFAULT = $0;
- FIICC_COLOR_IS_CMYK = $1;
-
-type
- FIICCPROFILE = record
- flags : WORD; // info flag
- size : DWORD; // profile's size measured in bytes
- data : Pointer; // points to a block of contiguous memory containing the profile
- end;
- PFIICCPROFILE = ^FIICCPROFILE;
-
-// --------------------------------------------------------------------------
-// Important enums ----------------------------------------------------------
-// --------------------------------------------------------------------------
-
-type
- FREE_IMAGE_FORMAT = type Integer;
- FREE_IMAGE_TYPE = type Integer;
- FREE_IMAGE_COLOR_TYPE = type Integer;
- FREE_IMAGE_QUANTIZE = type Integer;
- FREE_IMAGE_DITHER = type Integer;
- FREE_IMAGE_FILTER = type Integer;
- FREE_IMAGE_COLOR_CHANNEL = type Integer;
- FREE_IMAGE_MDTYPE = type Integer;
- FREE_IMAGE_MDMODEL = type Integer;
- FREE_IMAGE_JPEG_OPERATION = type Integer;
- FREE_IMAGE_TMO = type Integer;
-
-const
- // I/O image format identifiers.
- FIF_UNKNOWN = FREE_IMAGE_FORMAT(-1);
- FIF_BMP = FREE_IMAGE_FORMAT(0);
- FIF_ICO = FREE_IMAGE_FORMAT(1);
- FIF_JPEG = FREE_IMAGE_FORMAT(2);
- FIF_JNG = FREE_IMAGE_FORMAT(3);
- FIF_KOALA = FREE_IMAGE_FORMAT(4);
- FIF_LBM = FREE_IMAGE_FORMAT(5);
- FIF_IFF = FIF_LBM;
- FIF_MNG = FREE_IMAGE_FORMAT(6);
- FIF_PBM = FREE_IMAGE_FORMAT(7);
- FIF_PBMRAW = FREE_IMAGE_FORMAT(8);
- FIF_PCD = FREE_IMAGE_FORMAT(9);
- FIF_PCX = FREE_IMAGE_FORMAT(10);
- FIF_PGM = FREE_IMAGE_FORMAT(11);
- FIF_PGMRAW = FREE_IMAGE_FORMAT(12);
- FIF_PNG = FREE_IMAGE_FORMAT(13);
- FIF_PPM = FREE_IMAGE_FORMAT(14);
- FIF_PPMRAW = FREE_IMAGE_FORMAT(15);
- FIF_RAS = FREE_IMAGE_FORMAT(16);
- FIF_TARGA = FREE_IMAGE_FORMAT(17);
- FIF_TIFF = FREE_IMAGE_FORMAT(18);
- FIF_WBMP = FREE_IMAGE_FORMAT(19);
- FIF_PSD = FREE_IMAGE_FORMAT(20);
- FIF_CUT = FREE_IMAGE_FORMAT(21);
- FIF_XBM = FREE_IMAGE_FORMAT(22);
- FIF_XPM = FREE_IMAGE_FORMAT(23);
- FIF_DDS = FREE_IMAGE_FORMAT(24);
- FIF_GIF = FREE_IMAGE_FORMAT(25);
- FIF_HDR = FREE_IMAGE_FORMAT(26);
- FIF_FAXG3 = FREE_IMAGE_FORMAT(27);
- FIF_SGI = FREE_IMAGE_FORMAT(28);
-
- // Image type used in FreeImage.
- FIT_UNKNOWN = FREE_IMAGE_TYPE(0); // unknown type
- FIT_BITMAP = FREE_IMAGE_TYPE(1); // standard image: 1-, 4-, 8-, 16-, 24-, 32-bit
- FIT_UINT16 = FREE_IMAGE_TYPE(2); // array of unsigned short: unsigned 16-bit
- FIT_INT16 = FREE_IMAGE_TYPE(3); // array of short: signed 16-bit
- FIT_UINT32 = FREE_IMAGE_TYPE(4); // array of unsigned long: unsigned 32-bit
- FIT_INT32 = FREE_IMAGE_TYPE(5); // array of long: signed 32-bit
- FIT_FLOAT = FREE_IMAGE_TYPE(6); // array of float: 32-bit IEEE floating point
- FIT_DOUBLE = FREE_IMAGE_TYPE(7); // array of double: 64-bit IEEE floating point
- FIT_COMPLEX = FREE_IMAGE_TYPE(8); // array of FICOMPLEX: 2 x 64-bit IEEE floating point
- FIT_RGB16 = FREE_IMAGE_TYPE(9); // 48-bit RGB image: 3 x 16-bit
- FIT_RGBA16 = FREE_IMAGE_TYPE(10); // 64-bit RGBA image: 4 x 16-bit
- FIT_RGBF = FREE_IMAGE_TYPE(11); // 96-bit RGB float image: 3 x 32-bit IEEE floating point
- FIT_RGBAF = FREE_IMAGE_TYPE(12); // 128-bit RGBA float image: 4 x 32-bit IEEE floating point
-
- // Image color type used in FreeImage.
- FIC_MINISWHITE = FREE_IMAGE_COLOR_TYPE(0); // min value is white
- FIC_MINISBLACK = FREE_IMAGE_COLOR_TYPE(1); // min value is black
- FIC_RGB = FREE_IMAGE_COLOR_TYPE(2); // RGB color model
- FIC_PALETTE = FREE_IMAGE_COLOR_TYPE(3); // color map indexed
- FIC_RGBALPHA = FREE_IMAGE_COLOR_TYPE(4); // RGB color model with alpha channel
- FIC_CMYK = FREE_IMAGE_COLOR_TYPE(5); // CMYK color model
-
- // Color quantization algorithms. Constants used in FreeImage_ColorQuantize.
- FIQ_WUQUANT = FREE_IMAGE_QUANTIZE(0); // Xiaolin Wu color quantization algorithm
- FIQ_NNQUANT = FREE_IMAGE_QUANTIZE(1); // NeuQuant neural-net quantization algorithm by Anthony Dekker
-
- // Dithering algorithms. Constants used FreeImage_Dither.
- FID_FS = FREE_IMAGE_DITHER(0); // Floyd & Steinberg error diffusion
- FID_BAYER4x4 = FREE_IMAGE_DITHER(1); // Bayer ordered dispersed dot dithering (order 2 dithering matrix)
- FID_BAYER8x8 = FREE_IMAGE_DITHER(2); // Bayer ordered dispersed dot dithering (order 3 dithering matrix)
- FID_CLUSTER6x6 = FREE_IMAGE_DITHER(3); // Ordered clustered dot dithering (order 3 - 6x6 matrix)
- FID_CLUSTER8x8 = FREE_IMAGE_DITHER(4); // Ordered clustered dot dithering (order 4 - 8x8 matrix)
- FID_CLUSTER16x16 = FREE_IMAGE_DITHER(5); // Ordered clustered dot dithering (order 8 - 16x16 matrix)
-
- // Lossless JPEG transformations Constants used in FreeImage_JPEGTransform
- FIJPEG_OP_NONE = FREE_IMAGE_JPEG_OPERATION(0); // no transformation
- FIJPEG_OP_FLIP_H = FREE_IMAGE_JPEG_OPERATION(1); // horizontal flip
- FIJPEG_OP_FLIP_V = FREE_IMAGE_JPEG_OPERATION(2); // vertical flip
- FIJPEG_OP_TRANSPOSE = FREE_IMAGE_JPEG_OPERATION(3); // transpose across UL-to-LR axis
- FIJPEG_OP_TRANSVERSE = FREE_IMAGE_JPEG_OPERATION(4); // transpose across UR-to-LL axis
- FIJPEG_OP_ROTATE_90 = FREE_IMAGE_JPEG_OPERATION(5); // 90-degree clockwise rotation
- FIJPEG_OP_ROTATE_180 = FREE_IMAGE_JPEG_OPERATION(6); // 180-degree rotation
- FIJPEG_OP_ROTATE_270 = FREE_IMAGE_JPEG_OPERATION(7); // 270-degree clockwise (or 90 ccw)
-
- // Tone mapping operators. Constants used in FreeImage_ToneMapping.
- FITMO_DRAGO03 = FREE_IMAGE_TMO(0); // Adaptive logarithmic mapping (F. Drago, 2003)
- FITMO_REINHARD05 = FREE_IMAGE_TMO(1); // Dynamic range reduction inspired by photoreceptor physiology (E. Reinhard, 2005)
-
- // Upsampling / downsampling filters. Constants used in FreeImage_Rescale.
- FILTER_BOX = FREE_IMAGE_FILTER(0); // Box, pulse, Fourier window, 1st order (constant) b-spline
- FILTER_BICUBIC = FREE_IMAGE_FILTER(1); // Mitchell & Netravali's two-param cubic filter
- FILTER_BILINEAR = FREE_IMAGE_FILTER(2); // Bilinear filter
- FILTER_BSPLINE = FREE_IMAGE_FILTER(3); // 4th order (cubic) b-spline
- FILTER_CATMULLROM = FREE_IMAGE_FILTER(4); // Catmull-Rom spline, Overhauser spline
- FILTER_LANCZOS3 = FREE_IMAGE_FILTER(5); // Lanczos3 filter
-
- // Color channels. Constants used in color manipulation routines.
- FICC_RGB = FREE_IMAGE_COLOR_CHANNEL(0); // Use red, green and blue channels
- FICC_RED = FREE_IMAGE_COLOR_CHANNEL(1); // Use red channel
- FICC_GREEN = FREE_IMAGE_COLOR_CHANNEL(2); // Use green channel
- FICC_BLUE = FREE_IMAGE_COLOR_CHANNEL(3); // Use blue channel
- FICC_ALPHA = FREE_IMAGE_COLOR_CHANNEL(4); // Use alpha channel
- FICC_BLACK = FREE_IMAGE_COLOR_CHANNEL(5); // Use black channel
- FICC_REAL = FREE_IMAGE_COLOR_CHANNEL(6); // Complex images: use real part
- FICC_IMAG = FREE_IMAGE_COLOR_CHANNEL(7); // Complex images: use imaginary part
- FICC_MAG = FREE_IMAGE_COLOR_CHANNEL(8); // Complex images: use magnitude
- FICC_PHASE = FREE_IMAGE_COLOR_CHANNEL(9); // Complex images: use phase
-
- // Tag data type information (based on TIFF specifications)
- FIDT_NOTYPE = FREE_IMAGE_MDTYPE(0); // placeholder
- FIDT_BYTE = FREE_IMAGE_MDTYPE(1); // 8-bit unsigned integer
- FIDT_ASCII = FREE_IMAGE_MDTYPE(2); // 8-bit bytes w/ last byte null
- FIDT_SHORT = FREE_IMAGE_MDTYPE(3); // 16-bit unsigned integer
- FIDT_LONG = FREE_IMAGE_MDTYPE(4); // 32-bit unsigned integer
- FIDT_RATIONAL = FREE_IMAGE_MDTYPE(5); // 64-bit unsigned fraction
- FIDT_SBYTE = FREE_IMAGE_MDTYPE(6); // 8-bit signed integer
- FIDT_UNDEFINED = FREE_IMAGE_MDTYPE(7); // 8-bit untyped data
- FIDT_SSHORT = FREE_IMAGE_MDTYPE(8); // 16-bit signed integer
- FIDT_SLONG = FREE_IMAGE_MDTYPE(9); // 32-bit signed integer
- FIDT_SRATIONAL = FREE_IMAGE_MDTYPE(10); // 64-bit signed fraction
- FIDT_FLOAT = FREE_IMAGE_MDTYPE(11); // 32-bit IEEE floating point
- FIDT_DOUBLE = FREE_IMAGE_MDTYPE(12); // 64-bit IEEE floating point
- FIDT_IFD = FREE_IMAGE_MDTYPE(13); // 32-bit unsigned integer (offset)
- FIDT_PALETTE = FREE_IMAGE_MDTYPE(14); // 32-bit RGBQUAD
-
- // Metadata models supported by FreeImage
- FIMD_NODATA = FREE_IMAGE_MDMODEL(-1);
- FIMD_COMMENTS = FREE_IMAGE_MDMODEL(0); // single comment or keywords
- FIMD_EXIF_MAIN = FREE_IMAGE_MDMODEL(1); // Exif-TIFF metadata
- FIMD_EXIF_EXIF = FREE_IMAGE_MDMODEL(2); // Exif-specific metadata
- FIMD_EXIF_GPS = FREE_IMAGE_MDMODEL(3); // Exif GPS metadata
- FIMD_EXIF_MAKERNOTE = FREE_IMAGE_MDMODEL(4); // Exif maker note metadata
- FIMD_EXIF_INTEROP = FREE_IMAGE_MDMODEL(5); // Exif interoperability metadata
- FIMD_IPTC = FREE_IMAGE_MDMODEL(6); // IPTC/NAA metadata
- FIMD_XMP = FREE_IMAGE_MDMODEL(7); // Abobe XMP metadata
- FIMD_GEOTIFF = FREE_IMAGE_MDMODEL(8); // GeoTIFF metadata (to be implemented)
- FIMD_ANIMATION = FREE_IMAGE_MDMODEL(9); // Animation metadata
- FIMD_CUSTOM = FREE_IMAGE_MDMODEL(10); // Used to attach other metadata types to a dib
-
-//{$endif}
-
-type
- // Handle to a metadata model
- FIMETADATA = record
- data: Pointer;
- end;
- PFIMETADATA = ^FIMETADATA;
-
- // Handle to a metadata tag
- FITAG = record
- data: Pointer;
- end;
- PFITAG = ^FITAG;
-
-// --------------------------------------------------------------------------
-// File IO routines ---------------------------------------------------------
-// --------------------------------------------------------------------------
-
-type
- FI_Handle = Pointer;
- PCardinal = ^Cardinal;
- PInt = ^Integer;
-
- FI_ReadProc = function(buffer : pointer; size : Cardinal; count : Cardinal; handle : fi_handle) : PCardinal; stdcall;
- FI_WriteProc = function(buffer : pointer; size, count : Cardinal; handle : FI_Handle) : PCardinal; stdcall;
- FI_SeekProc = function(handle : fi_handle; offset : longint; origin : integer) : pint; stdcall;
- FI_TellProc = function(handle : fi_handle) : PCardinal; stdcall;
-
- FreeImageIO = packed record
- read_proc : FI_ReadProc; // pointer to the function used to read data
- write_proc: FI_WriteProc; // pointer to the function used to write data
- seek_proc : FI_SeekProc; // pointer to the function used to seek
- tell_proc : FI_TellProc; // pointer to the function used to aquire the current position
- end;
- PFreeImageIO = ^FreeImageIO;
-
- // Handle to a memory I/O stream
- FIMEMORY = record
- data: Pointer;
- end;
- PFIMEMORY = ^FIMEMORY;
-
-const
- // constants used in FreeImage_Seek for Origin parameter
- SEEK_SET = 0;
- SEEK_CUR = 1;
- SEEK_END = 2;
-
-// --------------------------------------------------------------------------
-// Plugin routines ----------------------------------------------------------
-// --------------------------------------------------------------------------
-
-type
- PPluginStruct = ^PluginStruct;
-
- FI_InitProc = procedure(Plugin: PPluginStruct; Format_ID: Integer); stdcall;
- FI_FormatProc = function: PAnsiChar; stdcall;
- FI_DescriptionProc = function: PAnsiChar; stdcall;
- FI_ExtensionListProc = function: PAnsiChar; stdcall;
- FI_RegExprProc = function: PAnsiChar; stdcall;
- FI_OpenProc = function(IO: PFreeImageIO; Handle: FI_Handle; Read: Boolean): Pointer; stdcall;
- FI_CloseProc = procedure(IO: PFreeImageIO; Handle: FI_Handle; Data: Pointer); stdcall;
- FI_PageCountProc = function(IO: PFreeImageIO; Handle: FI_Handle; Data: Pointer): Integer; stdcall;
- FI_PageCapabilityProc = function(IO: PFreeImageIO; Handle: FI_Handle; Data: Pointer): integer; stdcall;
- FI_LoadProc = function(IO: PFreeImageIO; Handle: FI_Handle; Page, Flags: Integer; data: pointer): PFIBITMAP; stdcall;
- FI_SaveProc = function(IO: PFreeImageIO; Dib: PFIBITMAP; Handle: FI_Handle; Page, Flags: Integer; Data: Pointer): Boolean; stdcall;
- FI_ValidateProc = function(IO: PFreeImageIO; Handle: FI_Handle): Boolean; stdcall;
- FI_MimeProc = function: PAnsiChar; stdcall;
- FI_SupportsExportBPPProc = function(Bpp: integer): boolean; stdcall;
- FI_SupportsExportTypeProc = function(AType: FREE_IMAGE_TYPE): Boolean; stdcall;
- FI_SupportsICCProfilesProc = function: Boolean; stdcall;
-
- PluginStruct = record
- format_proc : FI_FormatProc;
- description_proc : FI_DescriptionProc;
- extension_proc : FI_ExtensionListProc;
- regexpr_proc : FI_RegExprProc;
- open_proc : FI_OpenProc;
- close_proc : FI_CloseProc;
- pagecount_proc : FI_PageCountProc;
- pagecapability_proc : FI_PageCapabilityProc;
- load_proc : FI_LoadProc;
- save_proc : FI_SaveProc;
- validate_proc : FI_ValidateProc;
- mime_proc : FI_MimeProc;
- supports_export_bpp_proc : FI_SupportsExportBPPProc;
- supports_export_type_proc : FI_SupportsExportTypeProc;
- supports_icc_profiles_proc: FI_SupportsICCProfilesProc;
- end;
-
-// --------------------------------------------------------------------------
-// Load/Save flag constants -------------------------------------------------
-// --------------------------------------------------------------------------
-
-const
- BMP_DEFAULT = 0;
- BMP_SAVE_RLE = 1;
- CUT_DEFAULT = 0;
- DDS_DEFAULT = 0;
- FAXG3_DEFAULT = 0;
- GIF_DEFAULT = 0;
- ICO_DEFAULT = 0;
- ICO_MAKEALPHA = 0; // convert to 32bpp and create an alpha channel from the AND-mask when loading
- IFF_DEFAULT = 0;
- JPEG_DEFAULT = 0;
- JPEG_FAST = 1;
- JPEG_ACCURATE = 2;
- JPEG_QUALITYSUPERB = $0080;
- JPEG_QUALITYGOOD = $0100;
- JPEG_QUALITYNORMAL = $0200;
- JPEG_QUALITYAVERAGE = $0400;
- JPEG_QUALITYBAD = $0800;
- JPEG_CMYK = $1000; // load separated CMYK "as is" (use | to combine with other flags)
- KOALA_DEFAULT = 0;
- LBM_DEFAULT = 0;
- MNG_DEFAULT = 0;
- PCD_DEFAULT = 0;
- PCD_BASE = 1; // load the bitmap sized 768 x 512
- PCD_BASEDIV4 = 2; // load the bitmap sized 384 x 256
- PCD_BASEDIV16 = 3; // load the bitmap sized 192 x 128
- PCX_DEFAULT = 0;
- PNG_DEFAULT = 0;
- PNG_IGNOREGAMMA = 1; // avoid gamma correction
- PNM_DEFAULT = 0;
- PNM_SAVE_RAW = 0; // If set the writer saves in RAW format (i.e. P4, P5 or P6)
- PNM_SAVE_ASCII = 1; // If set the writer saves in ASCII format (i.e. P1, P2 or P3)
- PSD_DEFAULT = 0;
- RAS_DEFAULT = 0;
- SGI_DEFAULT = 0;
- TARGA_DEFAULT = 0;
- TARGA_LOAD_RGB888 = 1; // If set the loader converts RGB555 and ARGB8888 -> RGB888.
- TIFF_DEFAULT = 0;
- TIFF_CMYK = $0001; // reads/stores tags for separated CMYK (use | to combine with compression flags)
- TIFF_PACKBITS = $0100; // save using PACKBITS compression
- TIFF_DEFLATE = $0200; // save using DEFLATE compression
- TIFF_ADOBE_DEFLATE = $0400; // save using ADOBE DEFLATE compression
- TIFF_NONE = $0800; // save without any compression
- TIFF_CCITTFAX3 = $1000; // save using CCITT Group 3 fax encoding
- TIFF_CCITTFAX4 = $2000; // save using CCITT Group 4 fax encoding
- TIFF_LZW = $4000; // save using LZW compression
- TIFF_JPEG = $8000; // save using JPEG compression
- WBMP_DEFAULT = 0;
- XBM_DEFAULT = 0;
- XPM_DEFAULT = 0;
-
-// --------------------------------------------------------------------------
-// Init/Error routines ------------------------------------------------------
-// --------------------------------------------------------------------------
-
-procedure FreeImage_Initialise(load_local_plugins_only : boolean = False); stdcall; external FIDLL name '_FreeImage_Initialise@4';
-procedure FreeImage_DeInitialise; stdcall; external FIDLL name '_FreeImage_DeInitialise@0';
-
-// --------------------------------------------------------------------------
-// Version routines ---------------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetVersion : PAnsiChar; stdcall; external FIDLL name '_FreeImage_GetVersion@0';
-function FreeImage_GetCopyrightMessage : PAnsiChar; stdcall; external FIDLL name '_FreeImage_GetCopyrightMessage@0';
-
-// --------------------------------------------------------------------------
-// Message output functions -------------------------------------------------
-// --------------------------------------------------------------------------
-
-procedure FreeImage_OutPutMessageProc(fif: Integer; fmt: PAnsiChar); stdcall; external FIDLL name 'FreeImage_OutputMessageProc';
-type FreeImage_OutputMessageFunction = function(fif: FREE_IMAGE_FORMAT; msg: PAnsiChar): pointer; stdcall;
-procedure FreeImage_SetOutputMessage(omf: FreeImage_OutputMessageFunction); stdcall; external FIDLL name '_FreeImage_SetOutputMessage@4';
-
-// --------------------------------------------------------------------------
-// Allocate/Unload routines -------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_Allocate(width, height, bpp: integer; red_mask: Cardinal = 0; green_mask: Cardinal = 0; blue_mask: Cardinal = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Allocate@24';
-function FreeImage_AllocateT(Atype: FREE_IMAGE_TYPE; Width, Height: Integer; bpp: Integer = 8; red_mask: Cardinal = 0; green_mask: Cardinal = 0; blue_mask: Cardinal = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_AllocateT@28';
-function FreeImage_Clone(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Clone@4';
-procedure FreeImage_Unload(dib: PFIBITMAP); stdcall; external FIDLL name '_FreeImage_Unload@4';
-
-// --------------------------------------------------------------------------
-// Load / Save routines -----------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_Load(fif: FREE_IMAGE_FORMAT; const filename: PAnsiChar; flags: integer = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Load@12';
-function FreeImage_LoadU(fif: FREE_IMAGE_FORMAT; const filename: PWideChar; flags: Integer = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_LoadU@12';
-function FreeImage_LoadFromHandle(fif: FREE_IMAGE_FORMAT; io: PFreeImageIO; handle: fi_handle; flags: integer = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_LoadFromHandle@16';
-function FreeImage_Save(fif: FREE_IMAGE_FORMAT; dib: PFIBITMAP; filename: PAnsiChar; flags: integer = 0): Boolean; stdcall; external FIDLL name '_FreeImage_Save@16';
-function FreeImage_SaveU(fif: FREE_IMAGE_FORMAT; dib: PFIBITMAP; const filename: PWideChar; flags: Integer = 0): Boolean; stdcall; external FIDLL name '_FreeImage_SaveU@16';
-function FreeImage_SaveToHandle(fif: FREE_IMAGE_FORMAT; dib: PFIBITMAP; io : PFreeImageIO; handle : fi_handle; flags : integer = 0) : Boolean; stdcall; external FIDLL name '_FreeImage_SaveToHandle@20';
-
-// --------------------------------------------------------------------------
-// Memory I/O stream routines -----------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_OpenMemory(data: PByte = nil; size_in_bytes: DWORD = 0): PFIMEMORY; stdcall; external FIDLL name '_FreeImage_OpenMemory@8';
-procedure FreeImage_CloseMemory(stream: PFIMEMORY); stdcall; external FIDLL name '_FreeImage_CloseMemory@4';
-function FreeImage_LoadFromMemory(fif: FREE_IMAGE_FORMAT; stream: PFIMEMORY; flags: Integer = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_LoadFromMemory@12';
-function FreeImage_SaveToMemory(fif: FREE_IMAGE_FORMAT; dib: PFIBITMAP; stream: PFIMEMORY; flags: Integer = 0): Boolean; stdcall; external FIDLL name '_FreeImage_SaveToMemory@16';
-function FreeImage_TellMemory(stream: PFIMEMORY): Longint; stdcall; external FIDLL name '_FreeImage_TellMemory@4';
-function FreeImage_SeekMemory(stream: PFIMEMORY; offset: Longint; origin: Integer): Boolean; stdcall; external FIDLL name '_FreeImage_SeekMemory@12';
-function FreeImage_AcquireMemory(stream: PFIMEMORY; var data: PByte; var size_in_bytes: DWORD): Boolean; stdcall; external FIDLL name '_FreeImage_AcquireMemory@12';
-
-// --------------------------------------------------------------------------
-// Plugin Interface ---------------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_RegisterLocalPlugin(proc_address: FI_InitProc; format, description, extension, regexpr: PAnsiChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_RegisterLocalPlugin@20';
-function FreeImage_RegisterExternalPlugin(path, format, description, extension, regexpr: PAnsiChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_RegisterExternalPlugin@20';
-function FreeImage_GetFIFCount: Integer; stdcall; external FIDLL name '_FreeImage_GetFIFCount@0';
-procedure FreeImage_SetPluginEnabled(fif: FREE_IMAGE_FORMAT; enable: Boolean); stdcall; external FIDLL Name '_FreeImage_SetPluginEnabled@8';
-function FreeImage_IsPluginEnabled(fif: FREE_IMAGE_FORMAT): Integer; stdcall; external FIDLL Name '_FreeImage_IsPluginEnabled@4';
-function FreeImage_GetFIFFromFormat(const format: PAnsiChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL Name '_FreeImage_GetFIFFromFormat@4';
-function FreeImage_GetFIFFromMime(const format: PAnsiChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL Name '_FreeImage_GetFIFFromMime@4';
-function FreeImage_GetFormatFromFIF(fif: FREE_IMAGE_FORMAT): PAnsiChar; stdcall; external FIDLL Name '_FreeImage_GetFormatFromFIF@4';
-function FreeImage_GetFIFExtensionList(fif: FREE_IMAGE_FORMAT): PAnsiChar; stdcall; external FIDLL Name '_FreeImage_GetFIFExtensionList@4';
-function FreeImage_GetFIFDescription(fif: FREE_IMAGE_FORMAT): PAnsiChar; stdcall; external FIDLL Name '_FreeImage_GetFIFDescription@4';
-function FreeImage_GetFIFRegExpr(fif: FREE_IMAGE_FORMAT): PAnsiChar; stdcall; external FIDLL Name '_FreeImage_GetFIFRegExpr@4';
-function FreeImage_GetFIFFromFilename(const fname: PAnsiChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL Name '_FreeImage_GetFIFFromFilename@4';
-function FreeImage_GetFIFFromFilenameU(const fname:PWideChar): FREE_IMAGE_FORMAT; stdcall; external FIDLL Name '_FreeImage_GetFIFFromFilenameU@4';
-function FreeImage_FIFSupportsReading(fif: FREE_IMAGE_FORMAT): Boolean; stdcall; external FIDLL Name '_FreeImage_FIFSupportsReading@4';
-function FreeImage_FIFSupportsWriting(fif: FREE_IMAGE_FORMAT): Boolean; stdcall; external FIDLL Name '_FreeImage_FIFSupportsWriting@4';
-function FreeImage_FIFSupportsExportBPP(fif: FREE_IMAGE_FORMAT; bpp: Integer): Boolean; stdcall; external FIDLL Name '_FreeImage_FIFSupportsExportBPP@8';
-function FreeImage_FIFSupportsICCProfiles(fif: FREE_IMAGE_FORMAT): Boolean; stdcall; external FIDLL Name '_FreeImage_FIFSupportsICCProfiles@4';
-function FreeImage_FIFSupportsExportType(fif: FREE_IMAGE_FORMAT; image_type: FREE_IMAGE_TYPE): Boolean; stdcall; external FIDLL name '_FreeImage_FIFSupportsExportType@8';
-
-// --------------------------------------------------------------------------
-// Multipaging interface ----------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_OpenMultiBitmap(fif: FREE_IMAGE_FORMAT; filename: PAnsiChar; create_new, read_only, keep_cache_in_memory: Boolean; flags: integer = 0): PFIMULTIBITMAP; stdcall; external FIDLL Name '_FreeImage_OpenMultiBitmap@24';
-function FreeImage_CloseMultiBitmap(bitmap: PFIMULTIBITMAP; flags: Integer = 0): Boolean; stdcall; external FIDLL Name '_FreeImage_CloseMultiBitmap@8';
-function FreeImage_GetPageCount(bitmap: PFIMULTIBITMAP): Integer; stdcall; external FIDLL Name '_FreeImage_GetPageCount@4';
-procedure FreeImage_AppendPage(bitmap: PFIMULTIBITMAP; data: PFIBITMAP); stdcall; external FIDLL Name '_FreeImage_AppendPage@8';
-procedure FreeImage_InsertPage(bitmap: PFIMULTIBITMAP; page: Integer; data: PFIBITMAP); stdcall; external FIDLL Name '_FreeImage_InsertPage@12';
-procedure FreeImage_DeletePage(bitmap: PFIMULTIBITMAP; page: Integer); stdcall; external FIDLL Name '_FreeImage_DeletePage@8';
-function FreeImage_LockPage(bitmap: PFIMULTIBITMAP; page: Integer): PFIBITMAP; stdcall; external FIDLL Name '_FreeImage_LockPage@8';
-procedure FreeImage_UnlockPage(bitmap: PFIMULTIBITMAP; page: PFIBITMAP; changed: boolean); stdcall; external FIDLL Name '_FreeImage_UnlockPage@12';
-function FreeImage_MovePage(bitmap: PFIMULTIBITMAP; target, source: Integer): Boolean; stdcall; external FIDLL Name '_FreeImage_MovePage@12';
-function FreeImage_GetLockedPageNumbers(bitmap: PFIMULTIBITMAP; var pages: Integer; var count : integer): Boolean; stdcall; external FIDLL Name '_FreeImage_GetLockedPageNumbers@12';
-
-// --------------------------------------------------------------------------
-// Filetype request routines ------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetFileType(const filename: PAnsiChar; size: Integer): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_GetFileType@8';
-function FreeImage_GetFileTypeU(const filename: PWideChar; size: Integer): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_GetFileTypeU@8';
-function FreeImage_GetFileTypeFromHandle(io: PFreeImageIO; handle: FI_Handle; size: Integer = 0): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_GetFileTypeFromHandle@12';
-function FreeImage_GetFileTypeFromMemory(stream: PFIMEMORY; size: Integer = 0): FREE_IMAGE_FORMAT; stdcall; external FIDLL name '_FreeImage_GetFileTypeFromMemory@8';
-
-// --------------------------------------------------------------------------
-// ImageType request routine ------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetImageType(dib: PFIBITMAP): FREE_IMAGE_TYPE; stdcall; external FIDLL name '_FreeImage_GetImageType@4';
-
-// --------------------------------------------------------------------------
-// FreeImage helper routines ------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_IsLittleEndian: Boolean; stdcall; external FIDLL name '_FreeImage_IsLittleEndian@0';
-function FreeImage_LookupX11Color(const szColor: PAnsiChar; var nRed, nGreen, nBlue: PByte): Boolean; stdcall; external FIDLL name '_FreeImage_LookupX11Color@16';
-function FreeImage_LookupSVGColor(const szColor: PAnsiChar; var nRed, nGreen, nBlue: PByte): Boolean; stdcall; external FIDLL name '_FreeImage_LookupSVGColor@16';
-
-// --------------------------------------------------------------------------
-// Pixels access routines ---------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetBits(dib: PFIBITMAP): PByte; stdcall; external FIDLL name '_FreeImage_GetBits@4';
-function FreeImage_GetScanLine(dib: PFIBITMAP; scanline: Integer): PByte; stdcall; external FIDLL name '_FreeImage_GetScanLine@8';
-
-function FreeImage_GetPixelIndex(dib: PFIBITMAP; X, Y: Longint; Value: PByte): Boolean; stdcall; external FIDLL name '_FreeImage_GetPixelIndex@16';
-function FreeImage_GetPixelColor(dib: PFIBITMAP; X, Y: Longint; Value: PRGBQuad): Boolean; stdcall; external FIDLL name '_FreeImage_GetPixelColor@16';
-function FreeImage_SetPixelIndex(dib: PFIBITMAP; X, Y: Longint; Value: PByte): Boolean; stdcall; external FIDLL name '_FreeImage_SetPixelIndex@16';
-function FreeImage_SetPixelColor(dib: PFIBITMAP; X, Y: Longint; Value: PRGBQuad): Boolean; stdcall; external FIDLL name '_FreeImage_SetPixelColor@16';
-
-// --------------------------------------------------------------------------
-// DIB info routines --------------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetColorsUsed(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetColorsUsed@4';
-function FreeImage_GetBPP(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetBPP@4';
-function FreeImage_GetWidth(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetWidth@4';
-function FreeImage_GetHeight(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetHeight@4';
-function FreeImage_GetLine(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetLine@4';
-function FreeImage_GetPitch(dib : PFIBITMAP) : Cardinal; stdcall; external FIDLL name '_FreeImage_GetPitch@4';
-function FreeImage_GetDIBSize(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetDIBSize@4';
-function FreeImage_GetPalette(dib: PFIBITMAP): PRGBQUAD; stdcall; external FIDLL name '_FreeImage_GetPalette@4';
-
-function FreeImage_GetDotsPerMeterX(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetDotsPerMeterX@4';
-function FreeImage_GetDotsPerMeterY(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetDotsPerMeterY@4';
-procedure FreeImage_SetDotsPerMeterX(dib: PFIBITMAP; res: Cardinal); stdcall; external FIDLL name '_FreeImage_SetDotsPerMeterX@8';
-procedure FreeImage_SetDotsPerMeterY(dib: PFIBITMAP; res: Cardinal); stdcall; external FIDLL name '_FreeImage_SetDotsPerMeterY@8';
-
-function FreeImage_GetInfoHeader(dib: PFIBITMAP): PBITMAPINFOHEADER; stdcall; external FIDLL name '_FreeImage_GetInfoHeader@4';
-function FreeImage_GetInfo(var dib: FIBITMAP): PBITMAPINFO; stdcall; external FIDLL name '_FreeImage_GetInfo@4';
-function FreeImage_GetColorType(dib: PFIBITMAP): FREE_IMAGE_COLOR_TYPE; stdcall; external FIDLL name '_FreeImage_GetColorType@4';
-
-function FreeImage_GetRedMask(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetRedMask@4';
-function FreeImage_GetGreenMask(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetGreenMask@4';
-function FreeImage_GetBlueMask(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetBlueMask@4';
-
-function FreeImage_GetTransparencyCount(dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetTransparencyCount@4';
-function FreeImage_GetTransparencyTable(dib: PFIBITMAP): PByte; stdcall; external FIDLL name '_FreeImage_GetTransparencyTable@4';
-procedure FreeImage_SetTransparent(dib: PFIBITMAP; enabled: boolean); stdcall; external FIDLL name '_FreeImage_SetTransparent@8';
-procedure FreeImage_SetTransparencyTable(dib: PFIBITMAP; table: PByte; count: integer); stdcall; external FIDLL name '_FreeImage_SetTransparencyTable@12';
-function FreeImage_IsTransparent(dib: PFIBITMAP): boolean; stdcall; external FIDLL name '_FreeImage_IsTransparent@4';
-
-function FreeImage_HasBackgroundColor(dib: PFIBITMAP): Boolean; stdcall; external FIDLL name '_FreeImage_HasBackgroundColor@4';
-function FreeImage_GetBackgroundColor(dib: PFIBITMAP; var bkcolor: PRGBQUAD): Boolean; stdcall; external FIDLL name '_FreeImage_GetBackgroundColor@8';
-function FreeImage_SetBackgroundColor(dib: PFIBITMAP; bkcolor: PRGBQUAD): Boolean; stdcall; external FIDLL name '_FreeImage_SetBackgroundColor@8';
-
-// --------------------------------------------------------------------------
-// ICC profile routines -----------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_GetICCProfile(var dib: FIBITMAP): PFIICCPROFILE; stdcall; external FIDLL name '_FreeImage_GetICCProfile@4';
-function FreeImage_CreateICCProfile(var dib: FIBITMAP; data: Pointer; size: Longint): PFIICCPROFILE; stdcall; external FIDLL name 'FreeImage_CreateICCProfile@12';
-procedure FreeImage_DestroyICCProfile(var dib : FIBITMAP); stdcall; external FIDLL name 'FreeImage_DestroyICCProfile@4';
-
-// --------------------------------------------------------------------------
-// Line conversion routines -------------------------------------------------
-// --------------------------------------------------------------------------
-
-procedure FreeImage_ConvertLine1To4(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine1To4@12';
-procedure FreeImage_ConvertLine8To4(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQuad); stdcall; external FIDLL name '_FreeImage_ConvertLine8To4@16';
-procedure FreeImage_ConvertLine16To4_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To4_555@12';
-procedure FreeImage_ConvertLine16To4_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To4_565@12';
-procedure FreeImage_ConvertLine24To4(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine24To4@12';
-procedure FreeImage_ConvertLine32To4(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine32To4@12';
-
-procedure FreeImage_ConvertLine1To8(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine1To8@12';
-procedure FreeImage_ConvertLine4To8(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine4To8@12';
-procedure FreeImage_ConvertLine16To8_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To8_555@12';
-procedure FreeImage_ConvertLine16To8_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To8_565@12';
-procedure FreeImage_ConvertLine24To8(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine24To8@12';
-procedure FreeImage_ConvertLine32To8(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine32To8@12';
-
-procedure FreeImage_ConvertLine1To16_555(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine1To16_555@16';
-procedure FreeImage_ConvertLine4To16_555(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine4To16_555@16';
-procedure FreeImage_ConvertLine8To16_555(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine8To16_555@16';
-procedure FreeImage_ConvertLine16_565_To16_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16_565_To16_555@12';
-procedure FreeImage_ConvertLine24To16_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine24To16_555@12';
-procedure FreeImage_ConvertLine32To16_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine32To16_555@12';
-
-procedure FreeImage_ConvertLine1To16_565(target, source : PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine1To16_565@16';
-procedure FreeImage_ConvertLine4To16_565(target, source : PBYTE; width_in_pixels : Integer; palette : PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine4To16_565@16';
-procedure FreeImage_ConvertLine8To16_565(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine8To16_565@16';
-procedure FreeImage_ConvertLine16_555_To16_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16_555_To16_565@12';
-procedure FreeImage_ConvertLine24To16_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine24To16_565@12';
-procedure FreeImage_ConvertLine32To16_565(target, source : PBYTE; width_in_pixels : Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine32To16_565@12';
-
-procedure FreeImage_ConvertLine1To24(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine1To24@16';
-procedure FreeImage_ConvertLine4To24(target, source : PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine4To24@16';
-procedure FreeImage_ConvertLine8To24(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine8To24@16';
-procedure FreeImage_ConvertLine16To24_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To24_555@12';
-procedure FreeImage_ConvertLine16To24_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To24_565@12';
-procedure FreeImage_ConvertLine32To24(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine32To24@12';
-
-procedure FreeImage_ConvertLine1To32(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine1To32@16';
-procedure FreeImage_ConvertLine4To32(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine4To32@16';
-procedure FreeImage_ConvertLine8To32(target, source: PBYTE; width_in_pixels: Integer; palette: PRGBQUAD); stdcall; external FIDLL name '_FreeImage_ConvertLine8To32@16';
-procedure FreeImage_ConvertLine16To32_555(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To32_555@12';
-procedure FreeImage_ConvertLine16To32_565(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine16To32_565@12';
-procedure FreeImage_ConvertLine24To32(target, source: PBYTE; width_in_pixels: Integer); stdcall; external FIDLL name '_FreeImage_ConvertLine24To32@12';
-
-// --------------------------------------------------------------------------
-// Smart conversion routines ------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_ConvertTo4Bits(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo4Bits@4';
-function FreeImage_ConvertTo8Bits(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo8Bits@4';
-function FreeImage_ConvertToGreyscale(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertToGreyscale@4';
-function FreeImage_ConvertTo16Bits555(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo16Bits555@4';
-function FreeImage_ConvertTo16Bits565(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo16Bits565@4';
-function FreeImage_ConvertTo24Bits(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo24Bits@4';
-function FreeImage_ConvertTo32Bits(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertTo32Bits@4';
-function FreeImage_ColorQuantize(dib: PFIBITMAP; quantize: FREE_IMAGE_QUANTIZE): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ColorQuantize@8';
-function FreeImage_ColorQuantizeEx(dib: PFIBITMAP; quantize: FREE_IMAGE_QUANTIZE = FIQ_WUQUANT; PaletteSize: Integer = 256; ReserveSize: Integer = 0; ReservePalette: PRGBQuad = nil): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ColorQuantizeEx@20';
-function FreeImage_Threshold(dib: PFIBITMAP; T: Byte): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Threshold@8';
-function FreeImage_Dither(dib: PFIBITMAP; algorithm: FREE_IMAGE_DITHER): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Dither@8';
-
-function FreeImage_ConvertFromRawBits(bits: PBYTE; width, height, pitch: Integer; bpp, red_mask, green_mask, blue_mask: LongWord; topdown: Boolean): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertFromRawBits@36';
-procedure FreeImage_ConvertToRawBits(bits: PBYTE; dib: PFIBITMAP; pitch: Integer; bpp, red_mask, green_mask, blue_mask: LongWord; topdown: Boolean); stdcall; external FIDLL name '_FreeImage_ConvertToRawBits@32';
-
-function FreeImage_ConvertToRGBF(dib: PFIBITMAP): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertToRGBF@4';
-
-function FreeImage_ConvertToStandardType(src: PFIBITMAP; scale_linear: Boolean = True): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertToStandardType@8';
-function FreeImage_ConvertToType(src: PFIBITMAP; dst_type: FREE_IMAGE_TYPE; scale_linear: Boolean = True): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ConvertToType@12';
-
-// tone mapping operators
-function FreeImage_ToneMapping(dib: PFIBITMAP; tmo: FREE_IMAGE_TMO; first_param: Double = 0; second_param: Double = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_ToneMapping@24';
-function FreeImage_TmoDrago03(src: PFIBITMAP; gamma: Double = 2.2; exposure: Double = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_TmoDrago03@20';
-function FreeImage_TmoReinhard05(src: PFIBITMAP; intensity: Double = 0; contrast: Double = 0): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_TmoReinhard05@20';
-
-// --------------------------------------------------------------------------
-// ZLib interface -----------------------------------------------------------
-// --------------------------------------------------------------------------
-
-function FreeImage_ZLibCompress(target: PBYTE; target_size: DWORD; source: PBYTE; source_size: DWORD): DWORD; stdcall; external FIDLL name '_FreeImage_ZLibCompress@16';
-function FreeImage_ZLibUncompress(target: PBYTE; target_size: DWORD; source: PBYTE; source_size: DWORD): DWORD; stdcall; external FIDLL name '_FreeImage_ZLibUncompress@16';
-
-function FreeImage_ZLibGZip(target: PBYTE; target_size: DWORD; source: PBYTE; source_size: DWORD): DWORD; stdcall; external FIDLL name '_FreeImage_ZLibGZip@16';
-function FreeImage_ZLibGUnzip(target: PBYTE; target_size: DWORD; source: PBYTE; source_size: DWORD): DWORD; stdcall; external FIDLL name '_FreeImage_ZLibGUnzip@16';
-function FreeImage_ZLibCRC32(crc: DWORD; source: PByte; source_size: DWORD): DWORD; stdcall; external FIDLL name '_FreeImage_ZLibCRC32@12';
-
-// --------------------------------------------------------------------------
-// Metadata routines --------------------------------------------------------
-// --------------------------------------------------------------------------
-
-// tag creation / destruction
-function FreeImage_CreateTag: PFITAG; stdcall; external FIDLL name '_FreeImage_CreateTag@0';
-procedure FreeImage_DeleteTag(tag: PFITAG); stdcall; external FIDLL name '_FreeImage_DeleteTag@4';
-function FreeImage_CloneTag(tag: PFITAG): PFITAG; stdcall; external FIDLL name '_FreeImage_CloneTag@4';
-
-// tag getters and setters
-function FreeImage_GetTagKey(tag: PFITAG): PAnsiChar; stdcall; external FIDLL name '_FreeImage_GetTagKey@4';
-function FreeImage_GetTagDescription(tag: PFITAG): PAnsiChar; stdcall; external FIDLL name '_FreeImage_GetTagDescription@4';
-function FreeImage_GetTagID(tag: PFITAG): Word; stdcall; external FIDLL name '_FreeImage_GetTagID@4';
-function FreeImage_GetTagType(tag: PFITAG): FREE_IMAGE_MDTYPE; stdcall; external FIDLL name '_FreeImage_GetTagType@4';
-function FreeImage_GetTagCount(tag: PFITAG): DWORD; stdcall; external FIDLL name '_FreeImage_GetTagCount@4';
-function FreeImage_GetTagLength(tag: PFITAG): DWORD; stdcall; external FIDLL name '_FreeImage_GetTagLength@4';
-function FreeImage_GetTagValue(tag: PFITAG): Pointer; stdcall; external FIDLL name '_FreeImage_GetTagValue@4';
-
-function FreeImage_SetTagKey(tag: PFITAG; const key: PAnsiChar): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagKey@8';
-function FreeImage_SetTagDescription(tag: PFITAG; const description: PAnsiChar): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagDescription@8';
-function FreeImage_SetTagID(tag: PFITAG; id: Word): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagID@8';
-function FreeImage_SetTagType(tag: PFITAG; atype: FREE_IMAGE_MDTYPE): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagType@8';
-function FreeImage_SetTagCount(tag: PFITAG; count: DWORD): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagCount@8';
-function FreeImage_SetTagLength(tag: PFITAG; length: DWORD): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagLength@8';
-function FreeImage_SetTagValue(tag: PFITAG; const value: Pointer): Boolean; stdcall; external FIDLL name '_FreeImage_SetTagValue@8';
-
-// iterator
-function FreeImage_FindFirstMetadata(model: FREE_IMAGE_MDMODEL; dib: PFIBITMAP; var tag: PFITAG): PFIMETADATA; stdcall; external FIDLL name '_FreeImage_FindFirstMetadata@12';
-function FreeImage_FindNextMetadata(mdhandle: PFIMETADATA; var tag: PFITAG): Boolean; stdcall; external FIDLL name '_FreeImage_FindNextMetadata@8';
-procedure FreeImage_FindCloseMetadata(mdhandle: PFIMETADATA); stdcall; external FIDLL name '_FreeImage_FindCloseMetadata@4';
-
-// metadata setter and getter
-function FreeImage_SetMetadata(model: FREE_IMAGE_MDMODEL; dib: PFIBITMAP; const key: PAnsiChar; tag: PFITAG): Boolean; stdcall; external FIDLL name '_FreeImage_SetMetadata@16';
-function FreeImage_GetMetaData(model: FREE_IMAGE_MDMODEL; dib: PFIBITMAP; const key: PAnsiChar; var tag: PFITAG): Boolean; stdcall; external FIDLL name '_FreeImage_GetMetadata@16';
-
-// helpers
-function FreeImage_GetMetadataCount(model: FREE_IMAGE_MDMODEL; dib: PFIBITMAP): Cardinal; stdcall; external FIDLL name '_FreeImage_GetMetadataCount@8';
-
-// tag to C string conversion
-function FreeImage_TagToString(model: FREE_IMAGE_MDMODEL; tag: PFITAG; Make: PAnsiChar = nil): PAnsiChar; stdcall; external FIDLL name '_FreeImage_TagToString@12';
-
-// --------------------------------------------------------------------------
-// Image manipulation toolkit -----------------------------------------------
-// --------------------------------------------------------------------------
-
-// rotation and flipping
-function FreeImage_RotateClassic(dib: PFIBITMAP; angle: Double): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_RotateClassic@12';
-function FreeImage_RotateEx(dib: PFIBITMAP; angle, x_shift, y_shift, x_origin, y_origin: Double; use_mask: Boolean): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_RotateEx@48';
-function FreeImage_FlipHorizontal(dib: PFIBITMAP): Boolean; stdcall; external FIDLL name '_FreeImage_FlipHorizontal@4';
-function FreeImage_FlipVertical(dib: PFIBITMAP): Boolean; stdcall; external FIDLL name '_FreeImage_FlipVertical@4';
-function FreeImage_JPEGTransform(const src_file: PAnsiChar; const dst_file: PAnsiChar; operation: FREE_IMAGE_JPEG_OPERATION; perfect: Boolean = False): Boolean; stdcall; external FIDLL name '_FreeImage_JPEGTransform@16';
-
-// upsampling / downsampling
-function FreeImage_Rescale(dib: PFIBITMAP; dst_width, dst_height: Integer; filter: FREE_IMAGE_FILTER): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Rescale@16';
-function FreeImage_MakeThumbnail(dib: PFIBITMAP; max_pixel_size: Integer; convert:boolean = TRUE): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_MakeThumbnail@12';
-
-// color manipulation routines (point operations)
-function FreeImage_AdjustCurve(dib: PFIBITMAP; LUT: PBYTE; channel: FREE_IMAGE_COLOR_CHANNEL): Boolean; stdcall; external FIDLL name '_FreeImage_AdjustCurve@12';
-function FreeImage_AdjustGamma(dib: PFIBITMAP; gamma: Double): Boolean; stdcall; external FIDLL name '_FreeImage_AdjustGamma@12';
-function FreeImage_AdjustBrightness(dib: PFIBITMAP; percentage: Double): Boolean; stdcall; external FIDLL name '_FreeImage_AdjustBrightness@12';
-function FreeImage_AdjustContrast(dib: PFIBITMAP; percentage: Double): Boolean; stdcall; external FIDLL name '_FreeImage_AdjustContrast@12';
-function FreeImage_Invert(dib: PFIBITMAP): Boolean; stdcall; external FIDLL name '_FreeImage_Invert@4';
-function FreeImage_GetHistogram(dib: PFIBITMAP; histo: PDWORD; channel: FREE_IMAGE_COLOR_CHANNEL = FICC_BLACK): Boolean; stdcall; external FIDLL name '_FreeImage_GetHistogram@12';
-
-// channel processing routines
-function FreeImage_GetChannel(dib: PFIBITMAP; channel: FREE_IMAGE_COLOR_CHANNEL): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_GetChannel@8';
-function FreeImage_SetChannel(dib, dib8: PFIBITMAP; channel: FREE_IMAGE_COLOR_CHANNEL): Boolean; stdcall; external FIDLL name '_FreeImage_SetChannel@12';
-function FreeImage_GetComplexChannel(src: PFIBITMAP; channel: FREE_IMAGE_COLOR_CHANNEL): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_GetComplexChannel@8';
-function FreeImage_SetComplexChannel(src: PFIBITMAP; channel: FREE_IMAGE_COLOR_CHANNEL): Boolean; stdcall; external FIDLL name '_FreeImage_SetComplexChannel@12';
-
-// copy / paste / composite routines
-
-function FreeImage_Copy(dib: PFIBITMAP; left, top, right, bottom: Integer): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Copy@20';
-function FreeImage_Paste(dst, src: PFIBITMAP; left, top, alpha: Integer): Boolean; stdcall; external FIDLL name '_FreeImage_Paste@20';
-function FreeImage_Composite(fg: PFIBITMAP; useFileBkg: Boolean = False; appBkColor: PRGBQUAD = nil; bg: PFIBITMAP = nil): PFIBITMAP; stdcall; external FIDLL name '_FreeImage_Composite@16';
-
-{$MINENUMSIZE 1}
-implementation
-
-end.
diff --git a/delphi/Awkward/include/interfaces.inc b/delphi/Awkward/include/interfaces.inc
deleted file mode 100644
index 2c9e2a3..0000000
--- a/delphi/Awkward/include/interfaces.inc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Used to define the end of the MirandaPluginInterface list
-const MIID_LAST :MUUID='{00000000-0000-0000-0000-000000000000}';
-
-// My
-const MIID_MRADIO :MUUID='{EEBC474C-B0AD-470F-99A8-9DD9210CE233}';
-const MIID_WATRACK :MUUID='{FC6C81F4-837E-4430-9601-A0AA43177AE3}';
-const MIID_QUICKSEARCH :MUUID='{E4058506-6494-4d60-9CF4-40BF545F78BD}';
-const MIID_HKMANAGER :MUUID='{C48EE4EB-BC04-4a88-A2D0-727227BBAF48}';
-
-// Replaceable internal modules interface ids
-const MIID_HISTORY :MUUID='{5CA0CBC1-999A-4EA2-8B44-F8F67D7F8EBE}';
-const MIID_UIFINDADD :MUUID='{B22C528D-6852-48EB-A294-0E26A9161213}';
-const MIID_UIUSERINFO :MUUID='{570B931C-9AF8-48F1-AD9F-C4498C618A77}';
-const MIID_SRURL :MUUID='{5192445C-F5E8-46C0-8F9E-2B6D43E5C753}';
-const MIID_SRAUTH :MUUID='{377780B9-2B3B-405B-9F36-B3C4878E6F33}';
-const MIID_SRAWAY :MUUID='{5AB54C76-1B4C-4A00-B404-48CBEA5FEFE7}';
-const MIID_SREMAIL :MUUID='{D005B5A6-1B66-445A-B603-74D4D4552DE2}';
-const MIID_SRFILE :MUUID='{989D104D-ACB7-4EE0-B96D-67CE4653B695}';
-const MIID_UIHELP :MUUID='{F2D35C3C-861A-4CC3-A78F-D1F7850441CB}';
-const MIID_UIHISTORY :MUUID='{7F7E3D98-CE1F-4962-8284-968550F1D3D9}';
-const MIID_AUTOAWAY :MUUID='{9C87F7DC-3BD7-4983-B7FB-B848FDBC91F0}';
-const MIID_USERONLINE :MUUID='{130829E0-2463-4FF8-BBC8-CE73C0188442}';
-const MIID_IDLE :MUUID='{296F9F3B-5B6F-40E5-8FB0-A6496C18BF0A}';
-const MIID_FONTSERVICE :MUUID='{56F39112-E37F-4234-A9E6-7A811745C175}';
-const MIID_UPDATENOTIFY :MUUID='{4E68B12A-6B54-44DE-8637-F1120DB68140}';
-
-// Common plugin interfaces (core plugins)
-const MIID_DATABASE :MUUID='{AE77FD33-E484-4DC7-8CBC-099FEDCCCFDD}';
-const MIID_CLIST :MUUID='{9D8DA8BF-665B-4908-9E61-9F7598AE330E}';
-//temp const MIID_CLIST :MUUID='{CC1FF6C6-A43C-40B9-AF51-8284EEB063FA}';
-const MIID_CHAT :MUUID='{23576A43-3A26-4357-9B1B-4A719E425D48}';
-const MIID_SRMM :MUUID='{58C7EEA6-F9DB-4DD9-8036-AE802BC0414C}';
-const MIID_IMPORT :MUUID='{5F3BCAD4-75F8-476E-B36B-2B307032490C}';
-const MIID_IMGSERVICES :MUUID='{F3974915-C9D5-4C87-8564-A0EBF9D25AA0}';
-const MIID_TESTPLUGIN :MUUID='{53B974F4-3C74-4DBA-8FC2-6F92FE013B8C}';
-
-const MIID_EXTRAICONSSERVICE:MUUID='{62D80749-F169-4592-B44D-3DD6DE9D50C5}';
-
-// Common plugin interfaces (non-core plugins)
-const MIID_VERSIONINFO :MUUID='{CFEB6325-334E-4052-A645-562193DFCC77}';
-const MIID_FOLDERS :MUUID='{CFEBEC29-39EF-4B62-AD38-9A652CA324ED}';
-const MIID_BIRTHDAYNOTIFY:MUUID='{CFBA5784-3701-4D83-816A-199C00D4A67A}';
-const MIID_BONSAI :MUUID='{CFAAE811-30E1-4A4F-8784-153CCCB0037A}';
-const MIID_EXCHANGE :MUUID='{CFD79A89-9959-4E65-B076-413F98FE0D15}';
-const MIID_MIRPY :MUUID='{CFF91A5C-1786-41C1-8886-094B14281F15}';
-const MIID_SERVICESLIST :MUUID='{CF4BDF02-5D27-4241-99E5-1951AAB0C454}';
-const MIID_TRANSLATOR :MUUID='{CFB637B0-7217-4C1E-B22A-D922323A5D0B}';
-const MIID_TOOLTIPS :MUUID='{BCBDA043-2716-4404-B0FA-3D2D93819E03}';
-const MIID_POPUPS :MUUID='{33299069-1919-4FF8-B131-1D072178A766}';
-const MIID_LOGWINDOW :MUUID='{C53AFB90-FA44-4304-BC9D-6A841C3905F5}';
-const MIID_EVENTNOTIFY :MUUID='{F3D7EC5A-F7EF-45DD-8CA5-B0F6BA18647B}';
-const MIID_SRCONTACTS :MUUID='{7CA6050E-BAF7-42D2-B936-0DB9DF572B95}';
-const MIID_HISTORYEXPORT :MUUID='{18FA2ADE-E31B-4B5D-953D-0AB25781C604}';
-const MIID_SMILEY :MUUID='{E03C71B2-6DEE-467E-A4F0-DD516745876A}';
-const MIID_FLAGS :MUUID='{88A3B66E-C438-4381-BC17-71D99D225F9C}';
-const MIID_SPELLCHECKER :MUUID='{26EED12A-7016-4D0F-9B4A-0CAA7E2229F3}';
-const MIID_MDETAILS :MUUID='{DBA18DBC-5BE6-4504-A799-29EC6CCA0065}';
-const MIID_HISTORYEVENTS :MUUID='{C8BE8543-6618-4030-85CF-9082C7DE7FF7}';
-const MIID_LISTENINGTO :MUUID='{01FC1EFA-AA9F-461B-9269-AF666B8931EE}';
-
-{
- Special exception interface for protocols.
- This interface allows more than one plugin to implement it at the same time
-}
-const MIID_PROTOCOL :MUUID='{2A3C815E-A7D9-424B-BA30-02D083229085}';
-const MIID_SERVICEMODE :MUUID='{8A92C026-953A-4F5F-9921-F2C2DC195EC5}';
diff --git a/delphi/Awkward/include/m_acc.inc b/delphi/Awkward/include/m_acc.inc
deleted file mode 100644
index cb82eec..0000000
--- a/delphi/Awkward/include/m_acc.inc
+++ /dev/null
@@ -1,136 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci, Nightwish
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ACC}
-{$DEFINE M_ACC}
-
-const
- AVATAR_CONTROL_CLASS = 'MAvatarControlClass'; // Class of the control
-
-{
- Sets the contact that this avatar represents. This invalidates
- a previous call of AVATAR_SETPROTCOL.
- wParam = not used
- lParam = (HANDLE) hContact
- Usage: SendMessage(hwnd, AVATAR_SETCONTACT, 0, (LPARAM) hContact);
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETCONTACT = WM_USER+1;
-
-{
- Sets the user protocol that this avatar represents. This invalidates
- a previous call of AVATAR_SETCONTACT.
- wParam = not used
- lParam = (AnsiChar *) protcol name
- Usage: SendMessage(hwnd, AVATAR_SETPROTOCOL, 0, (LPARAM) "MSN");
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETPROTOCOL = WM_USER+2;
-
-{
- Sets the background color of thr control
- Default: transparent
- wParam = not used
- lParam = (COLORREF) color or -1 to transparent
- Usage: SendMessage(hwnd, AVATAR_SETBKGCOLOR, 0, (LPARAM) RGB(0,0,0));
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETBKGCOLOR = WM_USER+3;
-
-{
- Sets the control border color
- Default: no border
- wParam = not used
- lParam = (COLORREF) color or -1 to no border
- Usage: SendMessage(hwnd, AVATAR_SETBKGCOLOR, 0, (LPARAM) RGB(0,0,0));
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETBORDERCOLOR = WM_USER+4;
-
-{
- Sets the avatar border color
- Default: no border
- wParam = not used
- lParam = (COLORREF) color or -1 to no border
- Usage: SendMessage(hwnd, AVATAR_SETBKGCOLOR, 0, (LPARAM) RGB(0,0,0));
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETAVATARBORDERCOLOR = WM_USER+5;
-
-{
- Sets the radius of the round corner of the avatar
- Default: 0
- wParam = not used
- lParam = (int) radius or 0 to not use round corners
- Usage: SendMessage(hwnd, AVATAR_SETAVATARROUNDCORNERRADIUS, 0, 4);
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETAVATARROUNDCORNERRADIUS = WM_USER+6;
-
-{
- Sets the text to be shown if no avatar is set. The font can be set using WM_SETFONT.
- Default: ""
- wParam = not used
- lParam = (AnsiChar *) text (it will be translated) - max 128 chars
- Usage: SendMessage(hwnd, AVATAR_SETNOAVATARTEXT, 0, (LPARAM) "Contact has no avatar");
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETNOAVATARTEXT = WM_USER+7;
-
-{
- Sets if the hidden setting must be respected and hidden avatars shouldn't be draw
- Default: TRUE
- wParam = not used
- lParam = (BOOL) respect?
- Usage: SendMessage(hwnd, AVATAR_RESPECTHIDDEN, 0, (LPARAM) FALSE);
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_RESPECTHIDDEN = WM_USER+8;
-
-{
- Get the space inside the control that is really beeing used to display the avatar (the rest
- is filled with background color). Set both to 0 if no avatar exists.
- wParam = (int *) width
- lParam = (int *) height
- Usage: SendMessage(hwnd, AVATAR_GETUSEDSPACE, (WPARAM) &width, (LPARAM) &height);
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_GETUSEDSPACE = WM_USER+9;
-
-{
- Sets if the avatar will be resized when its smaller then the control size
- Default: TRUE
- wParam = not used
- lParam = (BOOL) TRUE or FALSE
- Usage: SendMessage(hwnd, AVATAR_SETRESIZEIFSMALLER, 0, (LPARAM) FALSE);
- Only works on AVATAR_CONTROL_CLASS controls
-}
- AVATAR_SETRESIZEIFSMALLER = WM_USER+10;
-
-{
- tell acc to paint avatar on aero surface (must draw with alpha channel, not using BitBlt()
- wParam = not used
- lParam = (BOOL) TRUE -> enable, FALSE -> disable
-}
- AVATAR_SETAEROCOMPATDRAWING = WM_USER+11;
-
-// Set to the parent throught WM_NOTIFY to notify when the avatar shown has changed
- NM_AVATAR_CHANGED = -200;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_addcontact.inc b/delphi/Awkward/include/m_addcontact.inc
deleted file mode 100644
index cdd6adf..0000000
--- a/delphi/Awkward/include/m_addcontact.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ADDCONTACT}
-{$DEFINE M_ADDCONTACT}
-
-const
- HANDLE_SEARCHRESULT = 0;
- HANDLE_EVENT = 1;
- HANDLE_CONTACT = 2;
-
-type
- PADDCONTACTSTRUCT = ^TADDCONTACTSTRUCT;
- TADDCONTACTSTRUCT = record
- handleType: Integer;
- handle : THandle; // HDBEVENT, HCONTACT, SearchResult
- szProto : PAnsiChar; // used by search result only
- psr : Pointer; // @PROTOSEARCHRESULT
- end;
-
-const
- {
- wParam : (HWND) Parent window of the dialog that will be presented
- lParam : Pointer to an initialised TADDCONTACTSTRUCT
- Affect : Open's the add contact dialog
- Version: 0.1.2.2+
- }
- MS_ADDCONTACT_SHOW:PAnsiChar = 'AddContact/Show';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_anismiley.inc b/delphi/Awkward/include/m_anismiley.inc
deleted file mode 100644
index 163e6ab..0000000
--- a/delphi/Awkward/include/m_anismiley.inc
+++ /dev/null
@@ -1,116 +0,0 @@
-{$IFNDEF M_ANISMILEY}
-{$DEFINE M_ANISMILEY}
-
-const
- IASF_UNICODE = 1;
-
-type
- TINSERTANISMILEY = record
- cbSize :size_t;
- hWnd :HWND;
- szFilename :TChar;
- dwBackColor:COLORREF;
- nHeight :int;
- dwFlags :dword;
- end;
- tagINSERTANISMILEY = TINSERTANISMILEY;
-
-const
- MS_INSERTANISMILEY :PAnsiChar = 'mAnimator/InsertSmiley';
-(*
- function InsertAnimatedSmiley(wnd:HWND;filename:TChar;Back:TCOLORREF;height:integer);
- const
- bServiceExists:int=-1
- var
- ias:TINSERTANISMILEY;
- begin
- if bServiceExists=-1 then
- bServiceExists:=ServiceExists(MS_INSERTANISMILEY);
- if bServiceExists=0 then
- result:=false
- else
- begin
- ias.cbSize :=SizeOf(TINSERTANISMILEY);
- ias.hWnd :=wnd;
- ias.tcsFilename:=Filename.w;
- ias.dwFlags :=IASF_UNICODE;
- ias.nHeight :=Height;
- ias.dwBackColor:=Back;
- result:=CallService(MS_INSERTANISMILEY,WPARAM(@ias),0)<>0;
- end;
- end;
-
- BOOL InsertAnimatedSmiley(HWND _hwnd, TCHAR * _szFilename, COLORREF _dwBack, int _nHeight)
- {
- static int bServiceExists=-1;
- ias={0};
- if (bServiceExists==-1)
- bServiceExists=ServiceExists(MS_INSERTANISMILEY);
- if (!bServiceExists) return FALSE;
- ias.cbSize=sizeof(INSERTANISMILEY);
- ias.hWnd=_hwnd;
- ias.tcsFilename=_szFilename;
- ias.dwFlags=IASF_TCHAR;
- ias.nHeight=_nHeight;
- ias.dwBackColor=_dwBack;
- return (BOOL) CallService(MS_INSERTANISMILEY,(WPARAM)&ias, 0);
- };
-*)
-
-
-{
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-}
-
-const
-// Type of Event one of
- FVCN_PREFIRE = 1;
- FVCN_POSTFIRE = 2;
-
-// Action of event are going to be done
- FVCA_NONE = 0;
- FVCA_DRAW = 1; // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
- FVCA_CUSTOMDRAW = 2;
- FVCA_INVALIDATE = 3;
- FVCA_SENDVIEWCHANGE = 4;
- FVCA_SKIPDRAW = 5;
-
-// Extended NMHDR structure for WM_NOTIFY
-type
- TFVCNDATA_NMHDR = packed record
- //NMHDR structure
- hwndFrom :HWND; // Window of smiley host
- idFrom :uint; // ignored
- code :uint; // NM_FIREVIEWCHANGE
-
- cbSize :size_t;
- bEvent :byte; // FVCN_ value - pre- or post- painting
- bAction :byte; // FVCA_ keys
- hDC :HDC; // Canvas to draw on
- rcRect :TRECT; // Valid/should be in case of FVCA_DRAW
- clrBackground:TCOLORREF; // color to fill background if fTransparent is not set
- fTransparent :bool; // if need to fill back color
- lParam :LPARAM; // used by host window PreFire and PostFire event
- end;
-
-const
-// Code of WM_NOTIFY message (code)
- NM_FIREVIEWCHANGE = NM_FIRST+1;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_api.pas b/delphi/Awkward/include/m_api.pas
deleted file mode 100644
index de20e63..0000000
--- a/delphi/Awkward/include/m_api.pas
+++ /dev/null
@@ -1,353 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$A+,H+}
-unit m_api;
-
-interface
-
-uses
- Windows, FreeImage;
-
-// often used
-const
- strCList:PAnsiChar = 'CList';
-const
- WM_USER = $0400; // from Messages
- NM_FIRST = 0; // from CommCtrl
-
-// RichEdit definitions
-type
- PCHARRANGE = ^TCHARRANGE;
- TCHARRANGE = record
- cpMin:integer;
- cpMax:integer;
- end;
-
-// C translations
-type
- size_t = integer;
- time_t = DWORD;
- int = Integer;
- uint = Cardinal;
- pint = ^int;
- WPARAM = Integer;
- LPARAM = Integer;
-
-// My definitions
- TWNDPROC = function (Dialog:HWnd; hMessage, wParam:WPARAM;lParam:LPARAM):integer; cdecl;
-
-type
- PTChar = ^TChar;
- TChar = record
- case boolean of
- false: (a:PAnsiChar); // ANSI or UTF8
- true: (w:PWideChar); // Unicode
- end;
-
-{$include m_system.inc}
-const
- mmi:TMM_INTERFACE=(
- cbSize :SizeOf(TMM_INTERFACE));
-
-{-- start newpluginapi --}
-const
- MAXMODULELABELLENGTH = 64;
- CALLSERVICE_NOTFOUND = $80000000;
-
-const
- UNICODE_AWARE = 1;
-
-type
- PPLUGININFO = ^TPLUGININFO;
- TPLUGININFO = record
- cbSize :int;
- shortName :PAnsiChar;
- version :DWORD;
- description:PAnsiChar; // [TRANSLATED-BY-CORE]
- author :PAnsiChar;
- authorEmail:PAnsiChar;
- copyright :PAnsiChar;
- homepage :PAnsiChar;
- flags :Byte; // right now the only flag, UNICODE_AWARE, is recognized here
- { one of the DEFMOD_* consts in m_plugin or zero, if non zero, this will
- suppress loading of the specified builtin module }
- replacesDefaultModule: int;
- end;
-
-{
- 0.7+
- New plugin loader implementation
-}
-// The UUID structure below is used to for plugin UUID's and module type definitions
-type
- PMUUID = ^TMUUID;
- MUUID = TGUID;
- TMUUID = MUUID;
-{
- MUUID = record
- a:cardinal;
- b:word;
- c:word;
- d:array [0..7] of byte;
- end;
-}
-
-{$include interfaces.inc}
-
-type
- PPLUGININFOEX = ^TPLUGININFOEX;
- TPLUGININFOEX = record
- cbSize :int;
- shortName :PAnsiChar;
- version :DWORD;
- description:PAnsiChar;
- author :PAnsiChar;
- authorEmail:PAnsiChar;
- copyright :PAnsiChar;
- homepage :PAnsiChar;
- flags :Byte; // right now the only flag, UNICODE_AWARE, is recognized here
- { one of the DEFMOD_* consts in m_plugin or zero, if non zero, this will
- suppress loading of the specified builtin module }
- replacesDefaultModule: int;
- uuid :MUUID; // Not required until 0.8.
- end;
-
-{ modules.h is never defined -- no check needed }
-
- TMIRANDAHOOK = function(wParam: WPARAM; lParam: LPARAM): int; cdecl;
- TMIRANDAHOOKPARAM = function(wParam: WPARAM; lParam,lParam1: LPARAM): int; cdecl;
- TMIRANDAHOOKOBJ = function(ptr:pointer;wParam:WPARAM;lParam:LPARAM): int; cdecl;
- TMIRANDAHOOKOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1: LPARAM): int; cdecl;
- TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int; cdecl;
- TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):int; cdecl;
- TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):int; cdecl;
- TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):int; cdecl;
-
- //see modules.h tor what all this stuff is
-
- TCreateHookableEvent = function(const AnsiChar: PAnsiChar): THandle; cdecl;
- TDestroyHookableEvent = function(Handle: THandle): int; cdecl;
- TNotifyEventHooks = function(Handle: THandle; wParam: WPARAM; lParam: LPARAM): int; cdecl;
- THookEvent = function(const AnsiChar: PAnsiChar; MIRANDAHOOK: TMIRANDAHOOK): THandle; cdecl;
- THookEventMessage = function(const AnsiChar: PAnsiChar; Wnd: THandle; wMsg: Integer): THandle; cdecl;
- TUnhookEvent = function(Handle: THandle): int; cdecl;
- TCreateServiceFunction = function(const AnsiChar: PAnsiChar; MIRANDASERVICE: TMIRANDASERVICE): THandle; cdecl;
- TCreateTransientServiceFunction = function(const AnsiChar: PAnsiChar; MIRANDASERVICE: TMIRANDASERVICE): THandle; cdecl;
- TDestroyServiceFunction = function(Handle: THandle): int; cdecl;
- TCallService = function(const AnsiChar: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int; cdecl;
- TServiceExists = function(const AnsiChar: PAnsiChar): int; cdecl;
- TCallServiceSync = function(const AnsiChar: PAnsiChar;wParam: WPARAM; lParam: LPARAM):int; cdecl; //v0.3.3+
- TCallFunctionAsync = function(ptr1,ptr2:pointer):int; cdecl; {stdcall;} //v0.3.4+
- TSetHookDefaultForHookableEvent = function(Handle:THandle;MIRANDAHOOK: TMIRANDAHOOK):int; cdecl;// v0.3.4 (2004/09/15)
- TCreateServiceFunctionParam = function(const AnsiChar:PAnsiChar; MIRANDASERVICEPARAM:TMIRANDASERVICEPARAM): THandle; cdecl;
- TNotifyEventHooksDirect = function(Handle:THANDLE;wParam:WPARAM;lParam:LPARAM):int; cdecl; // v0.7+
- TCallProtoService = function(const str1:PAnsiChar;const str2:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int; cdecl; //v0.8+
- TCallContactService = function(Handle:THANDLE;const str:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int; cdecl; // v0.8+
- THookEventParam = function(const str:PAnsiChar;mhp:TMIRANDAHOOKPARAM;lParam:LPARAM):THANDLE; cdecl;
- THookEventObj = function(const str:PAnsiChar;mho:TMIRANDAHOOKOBJ;ptr:pointer):THANDLE; cdecl;
- THookEventObjParam = function(const str:PAnsiChar;mhop:TMIRANDAHOOKOBJPARAM;ptr:pointer;lParam:LPARAM):THANDLE; cdecl;
- TCreateServiceFunctionObj = function(const str:PAnsiChar;mso:TMIRANDASERVICEOBJ;ptr:pointer):THANDLE; cdecl;
- TCreateServiceFunctionObjParam = function(const str:PAnsiChar;msop:TMIRANDASERVICEOBJPARAM;ptr,ptr2:pointer;lParam:LPARAM):THANDLE; cdecl;
- TKillObjectServices = procedure(var ptr);
- TKillObjectEventHooks = procedure(var ptr);
-
- PPLUGINLINK = ^TPLUGINLINK;
- TPLUGINLINK = record
- CreateHookableEvent : TCreateHookableEvent;
- DestroyHookableEvent : TDestroyHookableEvent;
- NotifyEventHooks : TNotifyEventHooks;
- HookEvent : THookEvent;
- HookEventMessage : THookEventMessage;
- UnhookEvent : TUnhookEvent;
- CreateServiceFunction : TCreateServiceFunction;
- CreateTransientServiceFunction: TCreateTransientServiceFunction;
- DestroyServiceFunction : TDestroyServiceFunction;
- CallService : TCallService;
- ServiceExists : TServiceExists; // v0.1.0.1+
- CallServiceSync : TCallServiceSync; // v0.3.3+
- CallFunctionAsync : TCallFunctionAsync; // v0.3.4+
- SetHookDefaultForHookableEvent: TSetHookDefaultForHookableEvent; // v0.3.4 (2004/09/15)
- CreateServiceFunctionParam : TCreateServiceFunctionParam; // v0.7+ (2007/04/24)
- NotifyEventHooksDirect : TNotifyEventHooksDirect; // v0.7+
- CallProtoService : TCallProtoService; // v0.8+
- CallContactService : TCallContactService; // v0.8+
- HookEventParam : THookEventParam; // v0.8+
- HookEventObj : THookEventObj; // v0.8+
- HookEventObjParam : THookEventObjParam; // v0.8+
- CreateServiceFunctionObj : TCreateServiceFunctionObj; // v0.8+
- CreateServiceFunctionObjParam : TCreateServiceFunctionObjParam; // v0.8+
- KillObjectServices : TKillObjectServices;
- KillObjectEventHooks : TKillObjectEventHooks;
- end;
-
- { Database plugin stuff }
-
- // grokHeader() error codes
- const
- EGROKPRF_NOERROR = 0;
- EGROKPRF_CANTREAD = 1; // can't open the profile for reading
- EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
- EGROKPRF_VERNEWER = 3; // header correct, version in profile newer than reader/writer
- EGROKPRF_DAMAGED = 4; // header/version fine, other internal data missing, damaged.
- // makeDatabase() error codes
- EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
-
-type
- PDATABASELINK = ^TDATABASELINK;
- TDATABASELINK = record
- cbSize : longint;
- {
- returns what the driver can do given the flag
- }
- getCapability : function (flag:longint):longint; cdecl;
- {
- buf: pointer to a string buffer
- cch: length of buffer
- shortName: if true, the driver should return a short but descriptive name, e.g. "3.xx profile"
- Affect: The database plugin must return a "friendly name" into buf and not exceed cch bytes,
- e.g. "Database driver for 3.xx profiles"
- Returns: 0 on success, non zero on failure
- }
- getFriendlyName : function (buf:PAnsiChar; cch:size_t; shortName:longint):longint; cdecl;
- {
- profile: pointer to a string which contains full path + name
- Affect: The database plugin should create the profile, the filepath will not exist at
- the time of this call, profile will be C:\..\<name>.dat
- Note: Do not prompt the user in anyway about this operation.
- Note: Do not initialise internal data structures at this point!
- Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_
- }
- makeDatabase : function (profile:PAnsiChar; error:Plongint):longint; cdecl;
- {
- profile: [in] a null terminated string to file path of selected profile
- error: [in/out] pointer to an int to set with error if any
- Affect: Ask the database plugin if it supports the given profile, if it does it will
- return 0, if it doesnt return 1, with the error set in error -- EGROKPRF_ can be valid error
- condition, most common error would be [EGROKPRF_UNKHEADER]
- Note: Just because 1 is returned, doesnt mean the profile is not supported, the profile might be damaged
- etc.
- Returns: 0 on success, non zero on failure
- }
- grokHeader : function (profile:PAnsiChar; error:Plongint):longint; cdecl;
- {
- Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link,
- which is a PLUGINLINK structure
- Returns: 0 on success, nonzero on failure
- }
- Load : function (profile:PAnsiChar; link:pointer):longint; cdecl;
- {
- Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures
- Returns: 0 on success, nonzero on failure
- Note: Unload() might be called even if Load() was never called, wasLoaded is set to 1 if Load() was ever called.
- }
- Unload : function (wasLoaded:longint):longint; cdecl;
- end;
-
-{-- end newpluginapi --}
-
-var
- { this is now a pointer to a record of function pointers to match the C API,
- and to break old code and annoy you. }
- PLUGINLINK: PPLUGINLINK;
-(*
- { has to be returned via MirandaPluginInfo and has to be statically allocated,
- this means only one module can return info, you shouldn't be merging them anyway! }
- PLUGININFO: TPLUGININFO;
-*)
- {$include m_plugins.inc}
- {$include m_database.inc}
- {$include m_findadd.inc}
- {$include m_awaymsg.inc}
- {$include m_email.inc}
- {$include m_history.inc}
- {$include m_message.inc}
- {$include m_url.inc}
- {$include m_clui.inc}
- {$include m_ignore.inc}
- {$include m_skin.inc}
- {$include m_file.inc}
- {$include m_netlib.inc}
- {$include m_langpack.inc}
- {$include m_clist.inc}
- {$include m_clc.inc}
- {$include m_userinfo.inc}
- {$include m_protosvc.inc}
- {$include m_options.inc}
- {$include m_ssl.inc}
- {$include m_icq.inc}
- {$include m_protoint.inc}
- {$include m_protocols.inc}
- {$include m_protomod.inc}
- {$include m_utils.inc}
- {$include m_addcontact.inc}
- {$include statusmodes.inc}
- {$include m_contacts.inc}
- {$include m_genmenu.inc}
- {$include m_icolib.inc}
- {$include m_fontservice.inc}
- {$include m_chat.inc}
- {$include m_fingerprint.inc}
- {$include m_toptoolbar.inc}
- {$include m_updater.inc}
- {$include m_variables.inc}
- {$include m_cluiframes.inc}
- {$include m_popup.inc}
- {$include m_avatars.inc}
- {$include m_png.inc}
- {$include m_smileyadd.inc}
- {$include m_tipper.inc}
- {$include m_button.inc}
- {$include m_dbeditor.inc}
- {$include m_userinfoex.inc}
- {$include m_imgsrvc.inc}
- {$include m_hotkeys.inc}
- {.$include m_anismiley.inc}
- {$include m_acc.inc}
- {$include m_xml.inc}
- {$include m_historyevents.inc}
- {$include m_modernopt.inc}
- {$include m_descbutton.inc}
- {$include m_iconheader.inc}
- {$include m_extraicons.inc}
- {$include m_toolbar.inc}
- {$include m_errors.inc}
- {$include m_help.inc}
- {$include m_proto_listeningto.inc}
-{$define M_API_UNIT}
- {$include m_helpers.inc}
- {$include m_clistint.inc}
- {$include m_metacontacts.inc}
-
-procedure InitMMI;
-
-implementation
-
-{$undef M_API_UNIT}
- {$include m_helpers.inc}
- {$include m_clistint.inc}
-
-procedure InitMMI;
-begin
- PluginLink^.CallService(MS_SYSTEM_GET_MMI,0,Integer(@mmi));
-end;
-
-end.
diff --git a/delphi/Awkward/include/m_avatars.inc b/delphi/Awkward/include/m_avatars.inc
deleted file mode 100644
index a638ad6..0000000
--- a/delphi/Awkward/include/m_avatars.inc
+++ /dev/null
@@ -1,381 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2004 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- Avatar service
-
- - load and maintain a cache of contact avatars.
- - draw avatars to a given target device context
- - maintain per protocol fallback images
-
- The avatar service builds on top of Mirandas core bitmap loading service (MS_UTILS_LOADBITMAP).
- However, if imgdecoder.dll is installed in mirandas main or Plugins directory, it can be used
- to support PNG images. The avatar service loads 32bit PNG images and peforms alpha channel
- premultiplication so that these images can be rendered by using the Win32 AlphaBlend() API.
-
- The cache grows on demand only, that is, no avatars are PREloaded. An avatar is only loaded
- if a plugin requests this by using the MS_AV_GETAVATAR service. Since avatars may update
- asynchronously, the avatar iamge may not be ready when a plugin calls the service. In that
- case, an event (ME_AV_AVATARCHANGED) is fired when a contacts avatar changes. This event
- is also fired, when a contact avatar changes automatically.
-
- The service takes care about protocol capabilites (does not actively fetch avatars for
- protocols which do not report avatar capabilities via PF4_AVATARS or for protocols which
- have been disabled in the option dialog). It also does not actively fetch avatars for
- protocols which are in invisible status mode (may cause privacy issues and some protocols
- like MSN don't allow any outbound client communication when in invisible status mode)
- unless AF_FETCHALWAYS is set.
-
- - TODO
- - maintain recent avatars (store the last hashes to avoid re-fetching)
- - cache expiration, based on least recently used algorithm.
-
- (c) 2005 by Nightwish, silvercircle@gmail.com
-}
-
-{$IFNDEF M_AVATARS}
-{$DEFINE M_AVATARS}
-
-const
- AVS_BITMAP_VALID = 1;
- AVS_BITMAP_EXPIRED = 2; // the bitmap has been expired from the cache. (unused, currently)
- AVS_HIDEONCLIST = 4;
- AVS_PREMULTIPLIED = 8; // set in the dwFlags member of the struct avatarCacheEntry
- // for 32 bit transparent images when loaded with
- // imgdecoder. These images can be rendered transparently
- // using the AlphaBlend() API with AC_SRC_ALPHA
- AVS_PROTOPIC = 16; // picture is a protocol picture
- AVS_CUSTOMTRANSPBKG = 32; // Bitmap was changed to set the background color transparent
- AVS_HASTRANSPARENCY = 64; // Bitmap has at least one pixel transparent
- AVS_OWNAVATAR = 128; // is own avatar entry
- AVS_NOTREADY = 4096;
-
-type
- PavatarCacheEntry = ^TavatarCacheEntry;
- TavatarCacheEntry = record
- cbSize : DWORD; // set to sizeof(struct)
- hContact : THANDLE; // contacts handle, 0, if it is a protocol avatar
- hbmPic : HBITMAP; // bitmap handle of the picture itself
- dwFlags : DWORD; // see above for flag values
- bmHeight : integer; // bitmap dimensions
- bmWidth : integer;
- t_lastAccess: DWORD; // last access time (currently unused, but plugins should still
- // use it whenever they access the avatar. may be
- // used in the future to implement cache expiration
- lpDIBSection: pointer;
- szFilename : array[0..MAX_PATH-1] of AnsiChar; // filename of the avatar (absolute path)
- end;
-
- PCacheNode = ^TCacheNode;
- TCacheNode = record
- pNextNode:pCacheNode;
- ace :TavatarCacheEntry;
-// cs :RTL_CRITICAL_SECTION;
- loaded :bool;
- mustLoad :int;
- dwFlags :DWORD;
- pa_format:int;
- end;
-
-const
- AVDRQ_FALLBACKPROTO = $0001; // use the protocol picture as fallback (currently not used)
- AVDRQ_FAILIFNOTCACHED = $0002; // don't create a cache entry if it doesn't already
- // exist. (currently not working)
- AVDRQ_ROUNDEDCORNER = $0004; // draw with rounded corners
- AVDRQ_DRAWBORDER = $0008; // draw a border around the picture
- AVDRQ_PROTOPICT = $0010; // draw a protocol picture (if available).
- AVDRQ_HIDEBORDERONTRANSPARENCY = $0020; // hide border if bitmap has transparency
- AVDRQ_OWNPIC = $0040; // draw own avatar (szProto is valid, use "" for global avatar)
- AVDRQ_RESPECTHIDDEN = $0080; // don't draw images marked as hidden
- AVDRQ_DONTRESIZEIFSMALLER = $0100; // don't resize images that are smaller then the draw area
- AVDRQ_FORCEFASTALPHA = $0200; // force rendering with simple AlphaBlend (will use FI_Resample otherwise)
- AVDRQ_FORCEALPHA = $0400; // force with simple AlphaBlend (may use StretchBlt otherwise)
- AVDRQ_AERO = $0800; // draw on aero surface
-
-// request to draw a contacts picture. See MS_AV_DRAWAVATAR service description
-
-type
- PavatarDrawRequest = ^TavatarDrawRequest;
- TavatarDrawRequest = record
- cbSize : DWORD; // set this to sizeof(AVATARDRAWREQUEST) - mandatory,
- // service will return failure code if cbSize is wrong
- hContact : THANDLE; // the contact for which the avatar should be drawn.
- // set it to 0 to draw a protocol picture
- hTargetDC : HDC; // target device context
- rcDraw : TRECT; // target rectangle. The avatar will be centered
- // within the rectangle and scaled to fit.
- dwFlags : DWORD; // flags (see above for valid bitflags)
- dwReserved: DWORD; // for future use
- dwInternal: DWORD; // don't use it
- clrBorder : TCOLORREF; // color for the border (used with AVDRQ_DRAWBORDER)
- radius : byte; // radius (used with AVDRQ_ROUNDEDCORNER)
- alpha : byte; // alpha value for semi-transparent avatars (valid
- // values form 1 to 255, if it is set to 0 the
- // avatar won't be transparent.
- szProto : PAnsiChar; // only used when AVDRQ_PROTOPICT is set
- end;
-
-const
-// INITIAL_AVATARCACHESIZE = 300;
-// CACHE_GROWSTEP = 50;
- CACHE_BLOCKSIZE = 20;
-const
- AVS_MODULE :PAnsiChar = 'AVS_Settings'; // db settings module path
- PPICT_MODULE:PAnsiChar = 'AVS_ProtoPics'; // protocol pictures are saved here
-
- {
- obtain the bitmap handle of the avatar for the given contact
- wParam = hContact
- lParam = 0;
- returns: pointer to a struct avatarCacheEntry *, NULL on failure
- if it returns a failure, the avatar may be ready later and the caller may
- receive a notification via ME_AV_AVATARCHANGED
- DONT modify the contents of the returned data structure
- }
- MS_AV_GETAVATARBITMAP:PAnsiChar = 'SV_Avatars/GetAvatar';
-
- {
- obtain a avatar cache entry for one of my own avatars
- wParam = 0
- lParam = szProto (protocol for which we need to obtain the own avatar information)
- Use "" to global
- returns: pointer to a struct avatarCacheEntry *, NULL on failure
- DONT modify the contents of the returned data structure
- }
- MS_AV_GETMYAVATAR:PAnsiChar = 'SV_Avatars/GetMyAvatar';
-
- {
- protect the current contact picture from being overwritten by automatic
- avatar updates. Actually, it only backups the contact picture filename
- and will used the backuped version until the contact picture gets unlocked
- again. So this service does not disable avatar updates, but it "fakes"
- a locked contact picture to the users of the GetAvatar service.
-
- wParam = hContact
- lParam = 1 -> lock the avatar, lParam = 0 -> unlock
- }
- MS_AV_PROTECTAVATAR:PAnsiChar = 'SV_Avatars/ProtectAvatar';
-
- {
- set (and optionally protect) a local contact picture for the given hContact
-
- wParam = hContact
- lParam = either a full picture filename or NIL. If lParam = NIL, the service
- will open a file selection dialog.
- }
- MS_AV_SETAVATAR:PAnsiChar = 'SV_Avatars/SetAvatar';
-
- {
- set a local picture for the given protocol
-
- wParam = (AnsiChar *) protocol name or NULL for all protocols
- lParam = either a full picture filename or NULL. If lParam == NULL, the service
- will open a file selection dialog.
- }
- MS_AV_SETMYAVATAR:PAnsiChar = 'SV_Avatars/SetMyAvatar';
-
- {
- see if is possible to set the avatar for the expecified protocol
-
- wParam = (AnsiChar *) protocol name
- lParam = 0
- return = 1 if can set, 0 if can't
- }
- MS_AV_CANSETMYAVATAR:PAnsiChar = 'SV_Avatars/CanSetMyAvatar';
- {
- Call avatar option dialog for contact
- wParam = hContact
- }
- MS_AV_CONTACTOPTIONS:PAnsiChar = 'SV_Avatars/ContactOptions';
-
- {
- draw an avatar picture
-
- wParam = 0 (not used)
- lParam = pointer to AVATARDRAWREQUEST
- draw a contact picture to a destination device context. see description of
- the AVATARDRAWREQUEST structure for more information on how to use this
- service.
- return value: 0 -> failure, avatar probably not available, or not ready. The
- drawing service DOES schedule an avatar update so your plugin will be notified
- by the ME_AV_AVATARCHANGED event when the requested avatar is ready for use.
- 1 -> success. avatar was found and drawing should be ok.
- -1 -> global avatar is incosistent
- }
- MS_AV_DRAWAVATAR:PAnsiChar = 'SV_Avatars/Draw';
-// MS_AV_BLENDDRAWAVATAR = 'SV_Avatars/BlendDraw';
-
- {
- fired when the contacts avatar changes
- wParam = hContact
- lParam = struct avatarCacheEntry *cacheEntry
- the event CAN pass a NULL pointer in lParam which means that the avatar has
- changed, but is no longer valid (happens, when a contact removes his avatar,
- for example).
- DONT DESTROY the bitmap handle passed in the struct avatarCacheEntry *
-
- It is also possible that this event passes 0 as wParam (hContact), in which case,
- a protocol picture (pseudo - avatar) has been changed.
- }
- ME_AV_AVATARCHANGED:PAnsiChar = 'SV_Avatars/AvatarChanged';
-
-type
- TContactAvatarChangedNotification = record
- cbSize :int; // sizeof()
- hContact:THANDLE; // this might have to be set by the caller too
- format :int; // PA_FORMAT_*
- filename:array [0..MAX_PATH-1] of AnsiChar; // full path to filename which contains the avatar
- hash :array [0..127] of AnsiChar; // avatar hash (always an empty string by now)
- end;
-
-const
- {
- fired when the contacts avatar is changed by the contact
- wParam = hContact
- lParam = struct CONTACTAVATARCHANGENOTIFICATION *cacn
- the event CAN pass a NULL pointer in lParam which means that the contact deleted its avatar
- }
- ME_AV_CONTACTAVATARCHANGED:PAnsiChar = 'SV_Avatars/ContactAvatarChanged';
-
- {
- fired when one of our own avatars was changed
- wParam = szProto (protocol for which a new avatar was set)
- lParam = AVATARCACHEENTRY *ace (new cache entry,
- NULL if the new avatar is not valid)
- }
- ME_AV_MYAVATARCHANGED:PAnsiChar = 'SV_Avatars/MyAvatarChanged';
-
- {
- Service to be called by protocols to report an avatar has changed. Some avatar changes
- can be detected automatically, but some not (by now only Skype ones)
- wParam = (AnsiChar *)szProto (protocol for which a new avatar was set)
- lParam = 0
- }
- MS_AV_REPORTMYAVATARCHANGED:PAnsiChar = 'SV_Avatars/ReportMyAvatarChanged';
-
-// Bitmap services //////////////////////////////////////////////////////////////////////
-
- {
- Load an image
- wParam = NULL
- lParam = filename
- }
- MS_AV_LOADBITMAP32:PAnsiChar = 'SV_Avatars/LoadBitmap32';
-
- {
- Save an HBITMAP to an image
- wParam = HBITMAP
- lParam = full path of filename
- }
- MS_AV_SAVEBITMAP :PAnsiChar = 'SV_Avatars/SaveBitmap';
- MS_AV_SAVEBITMAPW:PAnsiChar = 'SV_Avatars/SaveBitmapW';
-
- {
- Returns != 0 if can save that type of image, = 0 if cant
- wParam = 0
- lParam = PA_FORMAT_* // image format
- }
- MS_AV_CANSAVEBITMAP:PAnsiChar = 'SV_Avatars/CanSaveBitmap';
-
- {
- Returns a copy of the bitmap with the size especified or the original bitmap
- if nothing has to be changed
- wParam = ResizeBitmap *
- lParam = NULL
- }
- MS_AV_RESIZEBITMAP:PAnsiChar = 'SV_Avatars/ResizeBitmap';
-
-{
- * flags for internal use ONLY
-}
-
- MC_ISMASTERCONTACT = 1;
- MC_ISSUBCONTACT = 2;
- AVH_MUSTNOTIFY = 4; // node->dwFlags (loader thread must notify avatar
- // history about change/delete event)
- AVS_DELETENODEFOREVER = 8;
-
-// Protocol services //////////////////////////////////////////////////////////////////////
-
-{
- wParam=0
- lParam=(const AnsiChar *)Avatar file name or NULL to remove the avatar
- return=0 for sucess
-}
- PS_SETMYAVATAR = '/SetMyAvatar';
-
-{
- wParam=Buffer to file name
- lParam=(int)Buffer size
- return=0 for sucess
-}
- PS_GETMYAVATAR = '/GetMyAvatar';
-
- PIP_NONE = 0;
- PIP_SQUARE = 1;
-
-// Avatar image max size
-// lParam = (POINT*) maxSize (use -1 for no max)
-// return 0 for success
- AF_MAXSIZE = 1;
-
-// Avatar image proportion
-// lParam = 0
-// return or of PIP_*
- AF_PROPORTION = 2;
-
-// Avatar format
-// lParam = PA_FORMAT_*
-// return = 1 (supported) or 0 (not supported)
- AF_FORMATSUPPORTED = 3;
-
-// Avatars are enabled for protocol?
-// lParam = 0
-// return = 1 (avatars ready) or 0 (disabled)
- AF_ENABLED = 4;
-
-// This protocol don't need delays for fetching contact avatars
-// lParam = 0
-// return = 1 (don't need) or 0 (need)
- AF_DONTNEEDDELAYS = 5;
-
-// Avatar file max size
-// return size in bytes (0 for no limit)
- AF_MAXFILESIZE = 6;
-
-// The amount of time avs should wait after a download avatar failed for a contact
-// lParam = 0
-// return = the time, in ms
- AF_DELAYAFTERFAIL = 7;
-
-// Fetching avatars is always possible and allowed
-// lParam = 0
-// return = 1 (always) or 0 (depending on our or contacts status mode)
- AF_FETCHALWAYS = 8;
-
-{
- Query avatar caps for a protocol
- wParam = One of AF_*
- lParam = See descr of each AF_*
- return = See descr of each AF_*. Return 0 by default
-}
- PS_GETAVATARCAPS = '/GetAvatarCaps';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_awaymsg.inc b/delphi/Awkward/include/m_awaymsg.inc
deleted file mode 100644
index f5c083f..0000000
--- a/delphi/Awkward/include/m_awaymsg.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_AWAYMSG}
-{$DEFINE M_AWAYMSG}
-
-const
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Show the away/na/etc message for a contact
- Returns: 0 on success, non zero on failure, see notes
- notes : returns without waiting for the message to be shown.
- version: v0.1.0.1+
- }
- MS_AWAYMSG_SHOWAWAYMSG:PAnsiChar = 'SRAway/GetMessage';
-
- {
- returns: the default status message for a status
- wParam=status
- lParam=szProto
- notes: returns status msg. Remember to free the return value
- }
- MS_AWAYMSG_GETSTATUSMSG :PAnsiChar = 'SRAway/GetStatusMessage';
- MS_AWAYMSG_GETSTATUSMSGW:PAnsiChar = 'SRAway/GetStatusMessageW';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_button.inc b/delphi/Awkward/include/m_button.inc
deleted file mode 100644
index 7b9cd11..0000000
--- a/delphi/Awkward/include/m_button.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- Miranda IM
- Copyright (C) 2002 Robert Rainwater
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
- { Added in 0.3.0.0+ }
-{$IFNDEF M_BUTTON}
-{$DEFINE M_BUTTON}
-
-const
- MIRANDABUTTONCLASS = 'MButtonClass';
-
-const
- {
- Sets whether a dropdown arrow is used
- wParam = TRUE/FALSE turns arrow on or off
- lParam = not used
- Usage: SendMessage(hwndbutton,BUTTONSETARROW,1,0);
- Only works on MButtonClass buttons
- }
- BUTTONSETARROW = WM_USER + 1;
-
- {
- Sets whether the button is a default button
- wParam = TRUE/FALSE default on/off
- lParam = not used
- Usage: SendMessage(hwndbutton,BUTTONSETDEFAULT,1,0);
- Only works on MButtonClass buttons
- }
- BUTTONSETDEFAULT = WM_USER + 2;
-
- {
- Sets the button as a push button
- wParam = lParam = not used
- Usage: SendMessage(hwndbutton,BUTTONSETASPUSHBTN,0,0);
- Only works on MButtonClass buttons
- }
- BUTTONSETASPUSHBTN = WM_USER + 3;
-
- {
- Sets the button type as a flat button without borders v0.3.3+
- Usage: SendMessage(hwndbutton,BUTTONSETASFLATBTN,0,0);
- Only works on MButtonClass buttons
- }
- BUTTONSETASFLATBTN = WM_USER + 4;
-
- {
- Sets a tooltip for the button v0.3.3+
- wParam = PAnsiChar(szTip)
- lParam = not used
- Usage: SendMessage(hwndButton,BUTTONADDTOOLTIP,(WPARAM)"My Tip",BATF_* flags);
- }
- BATF_UNICODE = 1;
-
- BUTTONADDTOOLTIP = WM_USER + 5;
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_chat.inc b/delphi/Awkward/include/m_chat.inc
deleted file mode 100644
index b3ac1b4..0000000
--- a/delphi/Awkward/include/m_chat.inc
+++ /dev/null
@@ -1,640 +0,0 @@
-{
-Chat module plugin for Miranda IM
-
-Copyright (C) 2003 Jörgen Persson
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CHAT}
-{$DEFINE M_CHAT}
-(*
- This plugin provides event driven chat rooms for protocols that wish to use it.
- It is built for IRC, which I also develop and is naturally biased towards IRC,
- but it should work very well with other protocols too. I will try to explain as
- careful as possible in this document how to use chat.dll
-
- -- General guidelines --
-
- There is ONE rule a protocol MUST follow to use this:
-
- 1. Do NOT touch hContacts that has a byte "ChatRoom" set to ANYTHING other than 0! (Could be 1, 2, 3, ...)
- This is because chat.dll adds contacts to the clist using the protocol name
- supplied by the protocol. But this will naturally not work well if the
- protocol also tampers with the contacts. The value of the BYTE indicates which type of
- window/contact it is (see the GCW_* flags below). There is two exceptions to this rule:
-
- * You should continue to handle the right click menu items of these
- contacts as usual, by hooking the menu prebuild hook etc. Chat.dll can not
- handle this in an efficient manner!
-
- * You should also handle when the user deletes the contact/room from the
- contact list, as the protocol will then most likely have to send some message
- to the server that the user has left the room.
-
- NOTE. Chat keeps its own copies of strings passed.
-
-
- * * Example of implementing this rule * *:
- * * This is a code snippet that is common in protocols * *:
-
-
-
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- while (hContact)
- {
- szProto = (AnsiChar * ) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (szProto != NULL && !lstrcmpi(szProto, PROTONAME))
- {
- ... do something with the hContact here;
- }
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
- }
-
- * * You should do this instead * *:
-
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
- while (hContact)
- {
- szProto = (AnsiChar * ) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (szProto != NULL && !lstrcmpi(szProto, PROTONAME))
- {
- if (DBGetContactSettingByte(hContact, PROTONAME, "ChatRoom", 0) == 0)
- {
- ... do something with the hContact here;
- }
- }
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
- }
-
-
- There is not more to it than that! To recapitulate: do NOT touch contacts where the
- BYTE "ChatRoom" is set to anything other than 0,
-*)
-{
- OK, enough of the precautions, HOW DO YOU USE CHAT? In short you need to do FOUR things:
-
- 1. REGISTER your protocol with Chat
- Only registered protocols can use Chat
-
- 2. CREATE SESSIONS when your protocol are joining a group chat room. (One per room joined)
- These sessions will be put on the contact-list and are managed totally by chat.
- This is the reason you must obey to the "precautions" I mentioned above.
- Do not tamper directly with Chat's hContacts. Use Services provided by Chat instead.
-
- 3. SEND EVENTS to the sessions created in #3.
- These events reflect users joining/leaving/speaking etc.
-
- 4. DESTROY SESSIONS when the user leaves the room (ie the session is not needed anymore).
-
- These four points are implemented in three services: MS_GC_REGISTER, MS_GC_NEWSESSION
- and MS_GC_EVENT.
-}
-
-
-//------------------------- SERVICES ------------------------
-{
- Step 1. -- REGISTER with Chat --
-
- The first thing that a protocol need to do is register with Chat. This is best done
- when ALL modules has loaded (ME_SYSTEM_MODULESLOADED). The registration is
- needed to make sure that the protocol obey rule 1 mentioned above, but also to
- set protocol specific preferences.
-
- * Use MS_GC_REGISTER like this: CallService(MS_GC_REGISTER, 0, (LPARAM)(GCREGISTER *) &gcr;
-
- * returns 0 on success or error code on failure.
-}
-
-const
-// Flags
- GC_BOLD = $0001; //enable the 'bold' button
- GC_ITALICS = $0002; //enable the 'italics' button
- GC_UNDERLINE = $0004; //enable the 'underline' button
- GC_COLOR = $0008; //enable the 'foreground color' button
- GC_BKGCOLOR = $0010; //enable the 'background color' button
- GC_ACKMSG = $0020; //the protocol must acknowlege messages sent
- GC_TYPNOTIF = $0040; //NOT SUPPORTED YET! Enable typing notifications.
- GC_CHANMGR = $0080; //enable the 'channel settings' button
- GC_SINGLEFORMAT = $0100; //the protocol supports only 1 formatting per message
- GC_FONTSIZE = $0200; //enable font size selection
-
- GC_UNICODE = $1000; //NOT SUPPORTED YET! Enable unicode (if chat supports it),
- //Pass UNICODE instead of ASCII. Note that
- //registration will fail if the unicode version of chat is not installed
- GC_TCHAR = GC_UNICODE;
-
-// Error messages
- GC_REGISTER_WRONGVER = 1; //You appear to be using the wrong version of this API. Registration failed.
- GC_REGISTER_ERROR = 2; //An internal error occurred. Registration failed.
- GC_REGISTER_NOUNICODE = 3; //MS_GC_REGISTER returns this error if the Unicode version of chat
- //is not installed and GC_UNICODE is set. Registration failed
-
-// GCREGISTER struct
-type
- TGCREGISTER = record
- cbSize :int; //Set to sizeof(GCREGISTER);
- dwFlags :DWORD; //Use GC_* flags above to indicate features supported
- pszModule :PAnsiChar; //This MUST be the protocol name as registered with Miranda IM
- pszModuleDispName:TChar; //This is the protocol's real name as it will be displayed to the user
- iMaxText :int; //Max message length the protocol supports. Will limit the typing area input. 0 = no limit
- nColors :int; //Number of colors in the colorchooser menu for the color buttons. Max = 100
- pColors :^TCOLORREF;//pointer to the first item in a static COLORREF array containing the colors
- //that should be showed in the colorchooser menu.
- //ie: COLORREF crCols[nColors];
- // pColors = &crCols[0];
- end;
-
-const
- MS_GC_REGISTER:PAnsiChar = 'GChat/Register';
-
-{
- Step 2. -- CREATE a new SESSION --
-
- Create a new session (chat room) and set various settings related to it.
- The chat room will not be shown to the user until the 'set up' phase is
- completed and SESSION_INITDONE is sent. See the MS_GC_EVENT for that.
-
- * Use MS_GC_NEWSESSION like this: CallService(MS_GC_NEWSESSION, 0, (LPARAM)(GCSESSION *) &gcr;
-
- * returns 0 on success or error code on failure
-}
-
-
-// Session type
- GCW_CHATROOM = 1; // the session is a dedicated multi user chat room. ex "IRC channels".
- // A hContact will be added for the session
- GCW_SERVER = 2; // the session is used as a network console. ex "IRC server window"
- // A hContact will be added for the session, but it will default to being
- // hidden (on the CList)
- GCW_PRIVMESS = 3; // NOT SUPPORTED YET! the session is a 1 to 1 session, but with additional
- // support for adding more users etc. ex "MSN session".
-
-// Error messages
- GC_NEWSESSION_WRONGVER = 1; //You appear to be using the wrong version of this API.
- GC_NEWSESSION_ERROR = 2; //An internal error occurred.
-
-// GCSESSION structure
-type
- TGCSESSION = record
- cbSize :int; //Set to sizeof(GCSESSION);
- iType :int; //Use one of the GCW_* flags above to set the type of session
- pszModule :PAnsiChar; //The name of the protocol owning the session (the same as pszModule when you register)
- szName :TCHAR; //The name of the session as it will be displayed to the user
- szID :TCHAR; //The unique identifier for the session.
- szStatusbarText:TCHAR; //Optional text to set in the statusbar of the chat room window, or NULL.
- dwFlags :dword;
- dwItemData :dword; //Set user defined data for this session. Retrieve it by using the GC_EVENT_GETITEMDATA event
- end;
-
-const
- MS_GC_NEWSESSION:PAnsiChar = 'GChat/NewChat';
-
-{
- Step 3 -- SEND an EVENT --
-
- Events is what drives Chat! After having created the session in Step 2
- it is time to make it work for real. Follow these guidelines:
-
- 1. Start off by telling Chat what possible statuses a user can have (in the nicklist)
- by sending GC_EVENT_ADDGROUP as many times as needed. Also supply an icon
- to go with this status. Ex "Voice status" on IRC
-
- 2.Then send "JOIN" events (GC_EVENT_JOIN) to populate the user list.
- You will need to send one event per user that should be added. As long as
- SESSION_INITDONE has not been sent these events will not show up in the log.
-
- 3.When you are done with filling the user list it is a good time to end
- the set up phase and make the window visible by calling GC_EVENT_CONTROL event
- with wParam = SESSION_INITDONE.
-
- 4.You will also want to send a GC_EVENT_CONTROL with wParam = SESSION_ONLINE to
- make the statusbar and the CList item go to "online" status
-
- You have now set up the session and made it active. A CList hContact has been added
- to the contact list and a chat room window is associated to the session. Send EVENTS to
- Chat users speaking, users joining and so on. See below for full
- list of what events are possible.
-
- IMPORTANT: For sending events you'll use the GCEVENT and GCDEST structures. A GCDEST
- structure pointer is passed inside GCEVENT and it tells Chat what event type it is
- and what session it is related to. The GCDEST structure and its members are ALWAYS
- used (but the members can be NULL in some occasions). Depending on what type of event
- you are sending, the members of GCEVENT have different usage. Each event and how to
- use the members are discussed below. The "bAddToLog" and "time" members are always valid
- and always mean the same. bAddToLog = TRUE means that the event is added to the disk log
- (at least when this makes sense). This can be used by Jabber for instance, when
- it needs to add channel history to the window, but without logging to disk.
- The "time" member is the timestamp of the event.(Tip. use the function time(NULL)
- to set the current time)
-
- NOTE. It is possible to send formatted text (bold, italics, underlined, foreground color
- and background color) to Chat by using the following identifiers in the text (pszText):
-
- %cXX - set the foreground color ( XX is the zero based decimal index of the color registered in MS_GC_REGISTER.. Always use two digits )
- %C - reset foreground color to default
- %fXX - set the background color ( XX is the zero based decimal index of the color registered in MS_GC_REGISTER.. Always use two digits )
- %F - reset the background color to default
- %b - enable bold
- %B - disable bold
- %u - enable underlined
- %U - disable underlined
- %i - enable italics
- %I - disable italics
- %r - reset all to default
- %% - escape the formatting. Translates to %
-
- IMPORTANT. If you have specified GC_COLOR or GC_BKGCOLOR when you registered you can expect to
- get these identifiers in the text you receive from Chat as well. Make sure % is ALWAYS
- translated to %% in text you send to Chat to avoid accidental formatting.
- NOTE. You will not get %cRRRGGGBBB back, instead you will get the index of the colour as
- registered with GC_REGISTER. Eg %c3 (the fourth colour of your index)
-
- * Use MS_GC_EVENT like this: CallService(MS_GC_EVENT, 0, (LPARAM)(GCEVENT *) &gce;
-
- * returns 0 on success or error code on failure
-}
-
-// * List of possible events to send to Chat. Unlisted members are not valid *
-// * for the event. Listed members are mandatory unless otherwise specified *
-
-
-// GC_EVENT_JOIN - "<pszNick> has joined" (A user is joining the session)
-// pszNick - Display name
-// pszUID - Unique identifier of the user
-// pszStatus - Which status does the user have. Should be a status previously
-// registered with GC_EVENT_ADDGROUP. Ex "Voice" in IRC
-// bIsMe - Set to TRUE if it is the Miranda user
-// Chat needs to know which user in the userlist that is "self"
-// It cannot highlight a message containing the "own" nick without this info
-// NOTE. if time == NULL, then the event will not be shown in the message log
- GC_EVENT_JOIN = $0001;
-
-// GC_EVENT_PART - "<pszNick> has left: <pszText>" (A user left the session)
-// pszNick - Display name
-// pszUID - Unique identifier
-// pszText - Optional part message, can be NULL
- GC_EVENT_PART = $0002;
-
-// GC_EVENT_QUIT - "<pszNick> disconnected: pszText" (A user disconnected from the network)
-// pszID(in GCDEST) - Should be NULL as a disconnect event is global.
-// pszNick - Display name
-// pszUID - Unique identifier
-// pszText - Optional disconnect message, can be NULL
- GC_EVENT_QUIT = $0004;
-
-// GC_EVENT_KICK - "<pszStatus> kicked <pszNick>: <pszText>" (A user is kicking another user from the room)
-// pszNick - Display name of the one being being kicked
-// pszUID - Unique identifier of the one being kicked
-// pszStatus - Name of user who is doing the kicking
-// pszText - Optional kick message, can be NULL
- GC_EVENT_KICK = $0008;
-
-// GC_EVENT_NICK - "<pszNick> is now known as <pszText>" (A user changed his name)
-// NOTE, see GC_EVENT_CHUID also
-// pszID(in GCDEST) - Should be NULL as a nick change event is global.
-// pszNick - Old display name
-// pszUID - Unique identifier
-// pszText - New display name of the user. Color codes are not valid
- GC_EVENT_NICK = $0010;
-
-// GC_EVENT_NOTICE - "Notice from <pszNick>: <pszText>" (An IRC type notice)
-// pszID(in GCDEST) - Should be NULL to send to the active window
-// pszNick - Display name
-// pszUID - Unique identifier
-// pszText - Notice text
- GC_EVENT_NOTICE = $0020;
-
-// GC_EVENT_MESSAGE - "<pszNick>: <pszText> (A user is speaking)
-// pszNick - Display name
-// pszUID - Unique identifier
-// bIsMe - Set to TRUE if it is the Miranda user
-// pszText - Message text.
- GC_EVENT_MESSAGE = $0040;
-
-// GC_EVENT_TOPIC - "Topic is <pszText> (Set by: <pszNick>" (The room topic was changed/set)
-// pszNick - Optional display name of who set the topic, can be NULL
-// pszUID - Optional unique identifier of who set the topic, can be NULL
-// pszText - Topic text
- GC_EVENT_TOPIC = $0080;
-
-// GC_EVENT_INFORMATION (Informational text) Ex a server response to a /WHO command in IRC
-// pszID(in GCDEST) - NULL to send to the active window
-// pszText - Information text
- GC_EVENT_INFORMATION = $0100;
-
-// GC_EVENT_ACTION - "<pszNick> <pszText>" (An IRC Style action event)
-// pszNick - Display name
-// pszUID - Unique identifier
-// bIsMe - Set to TRUE if it is the Miranda user
-// pszText - Message text.
- GC_EVENT_ACTION = $0200;
-
-// GC_EVENT_ADDSTATUS - "<pszText> enables '<pszStatus>' for <pszNick>" (A status change has occured for a user)
-// NOTE. Status changes are cumulative. The user will show in the nicklist with the highest status received.
-// Ex, IRC users can have "Op" and "Voice" statuses simultaneously but s/he will be displayed as "Op"
-// pszNick - Display name of the one who receives a new status
-// pszUID - Unique identifier of the one who receives a new status
-// pszText - The display name of the one who is setting the status. Color codes are not valid
-// pszStatus - The status. Should be a status previously
-// registered with GC_EVENT_ADDGROUP. Ex "Voice" in IRC
- GC_EVENT_ADDSTATUS = $0400;
-
-// GC_EVENT_REMOVESTATUS - "<pszText> disables '<pszStatus>' for <pszNick>" (A status change has occured for a user)
-// NOTE. Status changes are cumulative. The user will show in the nicklist with the highest status received.
-// Ex, IRC users can have "Op" and "Voice" statuses simultaneously but s/he will be displayed as "Op"
-// pszNick - Display name of the one who got a status mode disabled
-// pszUID - Unique identifier of the one who got a status mode disabled
-// pszText - The display name of the one disabling the status. Color codes are not valid
-// pszStatus - The status. Should be a status previously
-// registered with GC_EVENT_ADDGROUP. Ex "Voice" in IRC
- GC_EVENT_REMOVESTATUS = $0800;
-
-// GC_EVENT_CHUID - not shown in the log (Change the unique identifier of a contact)
-// pszID(in GCDEST) - Should be NULL as a unique id's are global.
-// pszUID - The current unique identifier
-// pszText - The new unique identifier. Color codes are not valid
- GC_EVENT_CHUID = $1000;
-
-// GC_EVENT_CHANGESESSIONAME - not shown in the log (Change the display name of a session)
-// pszText - The new name. Color codes are not valid
- GC_EVENT_CHANGESESSIONAME = $1001;
-
-// GC_EVENT_ADDGROUP - not shown in the log (Add a possible status mode to the nicklist, ex IRC uses "Op", "Voice", "Normal" etc )
-// NOTE. When adding several statuses, start with the highest status
-// pszStatus - The new group name
-// dwItemData - Optional HICON handle to a 10x10 icon. Set to NULL to use the built in icons.
- GC_EVENT_ADDGROUP = $1002;
-
-// GC_EVENT_SETITEMDATA & GC_EVENT_SETITEMDATA - not shown in the log (Get/Set the user defined data of a session)
-// dwItemData - The itemdata to set or get
- GC_EVENT_SETITEMDATA = $1003;
- GC_EVENT_GETITEMDATA = $1004;
-
-// GC_EVENT_SETSBTEXT - not shown in the log (Set the text of the statusbar for a chat room window)
-// pszText - Statusbar text. Color codes are not valid
- GC_EVENT_SETSBTEXT = $1006;
-
-// GC_EVENT_ACK - not shown in the log (Acknowledge a outgoing message, when GC_ACKMSG is set
- GC_EVENT_ACK = $1007;
-
-// GC_EVENT_SENDMESSAGE - not shown in the log ("Fake" a message from a chat room as if the user had typed it). Used by IRC to broadcast /AME and /AMSG messages
-// pszText - The text
- GC_EVENT_SENDMESSAGE = $1008;
-
-// GC_EVENT_SETSTATUSEX - not shown in the log (Space or tab delimited list of pszUID's to indicate as away).
-// Used by IRC to mark users as away in the nicklist. If UIDs can contain spaces, use tabs
-// pszText - Space or tab delimited list of pszUID's
-
- GC_SSE_ONLYLISTED = $0001; // processes only listed contacts, resets all contacts otherwise
- GC_SSE_ONLINE = $0002; // displays a contact online, otherwise away
- GC_SSE_TABDELIMITED = $0004; // use tabs as delimiters
-
- GC_EVENT_SETSTATUSEX = $1009;
-
-
-// GC_EVENT_SETCONTACTSTATUS - sets status icon for contact
-// pszUID - Unique identifier of the one who receives a new status
-// pszStatus - (DWORD)ID_STATUS_* or zero to remove status icon
- GC_EVENT_SETCONTACTSTATUS = $100A;
-
-// GC_EVENT_CONTROL - not shown in the log (Control window associated to a session and the session itself)
-// NOTE 1: No members of GCEVENT are used, send one of the below flags in wParam instead,
-// Ex CallService(GC_EVENT_CONTROL, SESSION_INITDONE, (LPARAM)&gce);
-// NOTE 2: The first four control events are the only ones you should use most likely!
-// The ones below them are used by IRC to join channels hidden or maximized and show the server window from the system menu.
-// The SESSION_VISIBLE, SESSION_HIDDEN, SESSION_MAXIMIZE and SESSION_MINIMIZE events CAN replace SESSION_INITDONE but I urge you not to
-// do that as it will override any settings the user has made in the Chat options
-// NOTE 3: If pszID (of GCDEST) = NULL then this message will be broadcasted to all sessions, which can be usefule for terminating
-// all sessions when the protocol was disconnected
- SESSION_INITDONE = 1; //send this when the session is fully set up (all users have ben added to the nicklist)
- SESSION_TERMINATE = 7; //send to terminate a session and close the window associated with it
- SESSION_OFFLINE = 8; //send to set the session as "online" (hContact is set to Online etc)
- SESSION_ONLINE = 9; //send to set the session as "offline" (hContact is set to Offline etc)
-//------------
- WINDOW_VISIBLE = 2; //make the room window visible
- WINDOW_HIDDEN = 3; //close the room window. Session is not terminated.
- WINDOW_MAXIMIZE = 4; //make the room window maximized
- WINDOW_MINIMIZE = 5; //make the room window minimized
- WINDOW_CLEARLOG = 6; //clear the log of the room window
-
- GC_EVENT_CONTROL = $1005;
-
-// Error messages
- GC_EVENT_WRONGVER = 1; //You appear to be using the wrong version of this API.
- GC_EVENT_ERROR = 2; //An internal error occurred.
-
-// The GCDEST structure. It is passed to Chat inside GCEVENT.
-type
- PGCDEST = ^TGCDEST;
- TGCDEST = record
- pszModule:PAnsiChar; //Name of the protocol (same as you registered with)
- szID :TCHAR; //Unique identifier of the session, or NULL to broadcast to all sessions as specified above
- iType :int; //Use GC_EVENT_* as defined above. Only one event per service call.
- end;
-
-// The GCEVENT structure
-type
- TGCEVENT = record
- cbSize :int; // Set to sizeof(GCEVENT);
- pDest :PGCDEST; // pointer to a GCDEST structure which specifies the session to receive the event
- szText :TCHAR; // usage depends on type of event, max 2048 characters
- szNick :TCHAR; // usage depends on type of event
- szUID :TCHAR; // usage depends on type of event, Do NOT use spaces for unique user identifiers.
- szStatus :TCHAR; // usage depends on type of event
- szUserInfo:TCHAR; // Additional user information that is displayed after the nickname.
- // IRC use it to display a hostmask for JOIN, PART (and more) events.
- bIsMe :bool; // Is this event from the Miranda user?
- dwFlags :dword; // event flags: GCEF_ADDTOLOG, GC_UNICODE
-
- // FALSE any other time than when initializing the window (before sending SESSION_INITDONE)
- dwItemData:dword; // User specified data.
- time :dword; // Timestamp of the event
- end;
-
-const
- MS_GC_EVENT:PAnsiChar = 'GChat/NewEvent';
-
- GCEF_ADDTOLOG = $0001;
-
-// OK! That was about everything that you need to know about for operating Chat in a basic way.
-// There are however some more things you will need to know about. Some you may use and some you may not need,
-
-{
- -- GETTING info about a SESSION or session data --
-
- Use this service to get information on different aspects of the sessions that are registered with Chat.
-
- * Use MS_GC_GETINFO like this: CallService(MS_GC_GETSESSIONCOUNT, 0, (LPARAM)(AnsiChar *) pszModule);
-
- * returns -1 on failure and the sessioncount on success
-}
- MS_GC_GETSESSIONCOUNT:PAnsiChar = 'GChat/GetCount';
-
-{
- -- GETTING info about a SESSION or session data --
-
- Use this service to get information on different aspects of the sessions that are registered with Chat.
-
- * Use MS_GC_GETINFO like this: CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci;
-
- * returns 0 on success or error code on failure
-}
-
-// Flags
- GCI_BYINDEX = $0001; // iItem is valid and should contain the index of the session to get
- GCI_BYID = $0002; // pszID is valid and should contain the ID of the session to get. This is the default if no
- GCI_HCONTACT = $0004; // hContact is valid
- GCI_DATA = $0008; // wItemData is valid
- GCI_ID = $0010; // pszID is valid.
- GCI_NAME = $0020; // pszName is valid
- GCI_ITYPE = $0040; // iType is valid
- GCI_COUNT = $0080; // iCount is valid
- GCI_USERS = $0100; // pszUsers is valid
-
-// The GC_INFO structure
-type
- TGC_INFO = record
- Flags :dword; // use a combination of the above flags
- iItem :int; // session type (GCW_*)
- iType :int; // session type (GCW_*)
- pszModule :PAnsiChar; // the module name as registered in MS_GC_REGISTER
- pszID :TCHAR; // unique ID of the session
- pszName :TCHAR; // display name of the session
- dwItemData:dword; // user specified data.
- iCount :int; // count of users in the nicklist
- pszUsers :PAnsiChar; // space separated string containing the UID's of the users in the user list.
- // NOTE. Use Mirandas mmi_free() on the returned string.
- hContact :THANDLE; // hContact for the session (can be NULL)
- end;
-
-const
- MS_GC_GETINFO:PAnsiChar = 'GChat/GetInfo';
-
-//------------------------- HOOKS ------------------------
-{
- -- user interaction --
- Hook this to receive notifications about when user take actions in a chat room window.
- Check for the below flags to find out what type of user interaction it is. See the
- to find out which members of GCHOOK that are valid.
-
- * wParam=0
- * lParam=(LPARAM)(GCEVENT *)pgch
-
- * Returning nonzero from your hook will stop other hooks from being called.
-}
- GC_USER_MESSAGE = 1; // user sent a message, with \n delimiting lines, pszText contains the text.
- GC_USER_CHANMGR = 2; // user clicked the settings button in a chat room
- GC_USER_LOGMENU = 3; // user has selected a message log menu item, dwData is valid. See ME_GC_BUILDMENU
- GC_USER_NICKLISTMENU = 4; // user has selected a userlist menu item, valid members: dwData. See ME_GC_BUILDMENU
- GC_USER_TYPNOTIFY = 5; // NOT IMPLEMENTED YET! user is typing
- GC_USER_PRIVMESS = 6; // user requests to send a private message to a user. pszUID is valid
- GC_USER_LEAVE = 8; // user requests to leave the session
- GC_USER_CLOSEWND = 9; // user closed the window (this is usually not an indication that the protocol
- // should take action, but MSN may want to terminate the session here)
- GC_SESSION_TERMINATE = 7; // the session is about to be terminated, the "user defined data" is passed in dwData, which can be good free'ing any allocated memory.
-
- ME_GC_EVENT:PAnsiChar = 'GChat/OutgoingEvent';
-
-type
- TGCHOOK = record
- pDest :PGCDEST; // pointer to a GCDEST structure which specifies from which session the hook was triggered
- szText:TCHAR; // usage depends on type of event
- szUID :TCHAR; // unique identifier, usage depends on type of event
- dwData:dword; // user defined data, usage depends on type of event}
- end;
-
-{
- -- Build the pop up menus --
- The user wants to show a right click (popup) menu and your protocol should tell what
- items should be added to the menu. You should create a static array of struct gc_item's.
- When you get this notification you should set "nItems" to the number of gc_item's
- you want to show on the user's popup menu and then set the "Item" member to point to that array.
-
- * wParam=0
- * lParam=(LPARAM)(GCMENUITEM *)gcmi
-
- Returning nonzero from your hook will stop other hooks from being called.
-}
-const
-// type of item to add to the popup menu
- MENU_NEWPOPUP = 1; // add submenu
- MENU_POPUPITEM = 2; // add item to current submenu
- MENU_POPUPSEPARATOR = 3; // add separator to current submenu
- MENU_SEPARATOR = 4; // add separator to menu
- MENU_ITEM = 5; // add item
- MENU_POPUPCHECK = 6; // add checked item to current submenu
- MENU_CHECK = 7; // add checked item
- MENU_POPUPHMENU = 8; // add custom submenu to current submenu, use dwID to specify HMENU
- MENU_HMENU = 9; // add custom submenu, use dwID to specify HMENU
-
-// type of menu that is being requested
- MENU_ON_LOG = 1; // pop up menu on the message log
- MENU_ON_NICKLIST = 2; // pop up menu on the user list
-
-// contains info on a menuitem to be added
-type
- pgc_item = ^tgc_item;
- tgc_item = record
- szDesc :TCHAR; // Textual description of the menu item to add
- dwID :dword; // when/if the user selects this menu item this
- // value will be returned via the above hook, GC_USER_LOGMENU
- // or GC_USER_NICKLISTMENU. Must not be 0 and must be unique.
- uType :int; // What kind of menu item is it? Use MENU_* flags above
- bDisabled:bool; // should the menu item be shown as disabled
- end;
-
-type
- TGCMENUITEMS = record
- pszModule:PAnsiChar; // Contains the protocol name, do NOT change.
- pszID :TCHAR; // The unique identifier of the session that triggered the hook, do NOT change.
- pszUID :TCHAR; // Contains the unique identifier if Type = MENU_ON_NICKLIST. do NOT change.
- _Type :int; // Type of menu. MENU_ON_* flags used. do NOT change.
- nItems :int; // Set this to the number of menu items you want to add
- Item :pgc_item; // pointer to the first in the array of gc_item's
- end;
-
-const
- ME_GC_BUILDMENU:PAnsiChar = 'GChat/BuildMenu';
-
-(*
- * Example of how to add 2 items to the popup menu for the userlist *
-
- GCMENUITEMS *gcmi= (GCMENUITEMS* ) lParam;
- if (gcmi->Type == MENU_ON_NICKLIST)
- {
- static struct gc_item Item[] = {
- {Translate("User &details"), 1, MENU_ITEM, FALSE},
- {Translate("&Op"), 2, MENU_POPUPITEM, FALSE},
- };
-
- gcmi->nItems = sizeof(Item)/sizeof(Item[0]);
- gcmi->Item = &Item[0];
- gcmi->Item[gcmi->nItems-1].bDisabled = bFlag;
-
- return 0;
- }
-*)
-
-{
- Get Chat ToolTip Text for buddy
- wParam = (WPARAM)(TCHAR*) roomID parentdat->ptszID
- lParam = (WPARAM)(TCHAR*) userID ui1->pszUID
- result (int)(TCHAR*)mir_tstrdup("tooltip text")
- returns pointer to text of tooltip and starts owns it
-}
- MS_GC_PROTO_GETTOOLTIPTEXT = '/GetChatToolTipText';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_clc.inc b/delphi/Awkward/include/m_clc.inc
deleted file mode 100644
index 9a73733..0000000
--- a/delphi/Awkward/include/m_clc.inc
+++ /dev/null
@@ -1,306 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CLC}
-{$DEFINE M_CLC}
-
-const
- CLISTCONTROL_CLASS = 'CListControl';
-
- // styles
-
- CLS_MANUALUPDATE = $0001; // todo
- CLS_SHOWHIDDEN = $0002;
- CLS_HIDEOFFLINE = $0004; // hides all offline users
- CLS_CHECKBOXES = $0008;
- CLS_MULTICOLUMN = $0010; // not true multi-column, just for ignore/vis options
- CLS_HIDEEMPTYGROUPS = $0020; // note: this flag will be spontaneously removed if the 'new subgroup' menu item is clicked, for obvious reasons
- CLS_USEGROUPS = $0040;
- CLS_NOHIDEOFFLINE = $0080; // overrides CLS_HIDEOFFLINE and the per-group hideoffline setting
- CLS_GREYALTERNATE = $0100; // make every other line slightly grey
- CLS_GROUPCHECKBOXES = $0200; // put checkboxes on groups too (managed by CLC)
- CLS_CONTACTLIST = $0400; // this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
-
- CLS_EX_DISABLEDRAGDROP = $00000001;
- CLS_EX_EDITLABELS = $00000002;
- CLS_EX_SHOWSELALWAYS = $00000004;
- CLS_EX_TRACKSELECT = $00000008;
- CLS_EX_SHOWGROUPCOUNTS = $00000010;
- CLS_EX_DIVIDERONOFF = $00000020;
- CLS_EX_HIDECOUNTSWHENEMPTY = $00000040;
- CLS_EX_NOTRANSLUCENTSEL = $00000080;
- CLS_EX_LINEWITHGROUPS = $00000100;
- CLS_EX_QUICKSEARCHVISONLY = $00000200;
- CLS_EX_SORTGROUPSALPHA = $00000400;
- CLS_EX_NOSMOOTHSCROLLING = $00000800;
-
- CLM_FIRST = $1000; // this is the same as LVM_FIRST
- CLM_LAST = $1100;
-
-// messages, compare with equivalent TVM_* in the WINAPI
-
- CLM_ADDCONTACT = (CLM_FIRST+0); // wParam=hContact
- CLM_ADDGROUP = (CLM_FIRST+1); // wParam=hGroup
- CLM_AUTOREBUILD = (CLM_FIRST+2);
- CLM_DELETEITEM = (CLM_FIRST+3); // wParam=hItem
- CLM_EDITLABEL = (CLM_FIRST+4); // wParam=hItem
- CLM_ENDEDITLABELNOW = (CLM_FIRST+5); // wParam=cancel, 0 to save
- CLM_ENSUREVISIBLE = (CLM_FIRST+6); // wParam=hItem, lParam=partialOk
-
- CLE_TOGGLE = -1;
- CLE_COLLAPSE = 0;
- CLE_EXPAND = 1;
- CLE_INVALID = $FFFF;
-
- CLM_EXPAND = (CLM_FIRST+7); // wParam=hItem, lParam=CLE_
- CLM_FINDCONTACT = (CLM_FIRST+8); // wParam=hContact, returns an hItem
- CLM_FINDGROUP = (CLM_FIRST+9); // wParam=hGroup, returns an hItem
- CLM_GETBKCOLOR = (CLM_FIRST+10); // returns a COLORREF
- CLM_GETCHECKMARK = (CLM_FIRST+11); // wParam=hItem, returns 1 or 0
- CLM_GETCOUNT = (CLM_FIRST+12); // returns the total number of items
-
- CLM_GETEDITCONTROL = (CLM_FIRST+13); // returns the HWND, or NULL
- CLM_GETEXPAND = (CLM_FIRST+14); // wParam=hItem, returns a CLE_, CLE_INVALID if not a group
- CLM_GETEXTRACOLUMNS = (CLM_FIRST+15); // returns number of extra columns
- CLM_GETEXTRAIMAGE = (CLM_FIRST+16); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or $FF
- CLM_GETEXTRAIMAGELIST = (CLM_FIRST+17); // returns HIMAGELIST
- CLM_GETFONT = (CLM_FIRST+18); // wParam=fontId, see clm_setfont. returns hFont.
- CLM_GETINDENT = (CLM_FIRST+19); // wParam=new group indent
- CLM_GETISEARCHSTRING = (CLM_FIRST+20); // lParam=(AnsiChar*)pszStr, max 120 bytes, returns number of chars in string
- CLM_GETITEMTEXT = (CLM_FIRST+21); // wParam=hItem, lParam=(TChar*)pszStr, max 120 bytes
- CLM_GETSCROLLTIME = (CLM_FIRST+22); // returns time in ms
- CLM_GETSELECTION = (CLM_FIRST+23); // returns hItem
-
- CLCHT_ABOVE = $0001; // above client area
- CLCHT_BELOW = $0002; // below client area
- CLCHT_TOLEFT = $0004; // left of client area
- CLCHT_TORIGHT = $0008; // right of client area
- CLCHT_NOWHERE = $0010; // in client area, not on an item
- CLCHT_ONITEMICON = $0020;
- CLCHT_ONITEMCHECK = $0040;
- CLCHT_ONITEMLABEL = $0080;
- CLCHT_ONITEMINDENT = $0100; // to the left of an item icon
- CLCHT_ONITEMEXTRA = $0200; // on an extra icon, HIBYTE(HIWORD()) says which
- CLCHT_ONITEM = $03E0;
- CLCHT_INLEFTMARGIN = $0400;
- CLCHT_BELOWITEMS = $0800; // in client area but below last item
-
- CLM_HITTEST = (CLM_FIRST+25); // lParam=MAKELPARAM(x,y) (relative to control), wParam=(PDWORD)&hitTest (see encoding of HitTest() in clc.h, can be NULL) returns hItem or NULL
- CLM_SELECTITEM = (CLM_FIRST+26); // wParam=hItem
-
- CLB_TOPLEFT = 0;
- CLB_STRETCHV = 1;
- CLB_STRETCHH = 2; // and tile vertically
- CLB_STRETCH = 3;
-
- CLBM_TYPE = $00FF;
- CLBF_TILEH = $1000;
- CLBF_TILEV = $2000;
- CLBF_PROPORTIONAL = $4000;
- CLBF_SCROLL = $8000;
-
- CLM_SETBKBITMAP = (CLM_FIRST+27); // wParam=mode, lParam=hBitmap (don't delete it), NULL for none
- CLM_SETBKCOLOR = (CLM_FIRST+28); // wParam=a COLORREF, default is GetSysColor(COLOR_3DFACE)
- CLM_SETCHECKMARK = (CLM_FIRST+29); // wParam=hItem, lParam=1 or 0
- CLM_SETEXTRACOLUMNS = (CLM_FIRST+30); // wParam=number of extra columns (zero to MAXEXTRACOLUMNS from clc.h, currently 16)
- CLM_SETEXTRAIMAGE = (CLM_FIRST+31); // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=$FF is a blank
- CLM_SETEXTRAIMAGELIST = (CLM_FIRST+32); // lParam=HIMAGELIST, wParam=WideImageList
-
- FONTID_CONTACTS = 0;
- FONTID_INVIS = 1;
- FONTID_OFFLINE = 2;
- FONTID_NOTONLIST = 3;
- FONTID_GROUPS = 4;
- FONTID_GROUPCOUNTS = 5;
- FONTID_DIVIDERS = 6;
- FONTID_OFFINVIS = 7;
- FONTID_STATUSMSG = 8;
- FONTID_GROUPSCLOSED = 9;
- FONTID_CONTACTSHOVER = 10;
- FONTID_MAX = 18;
-
- CLM_SETFONT = (CLM_FIRST+33); // wParam=hFont, lParam=MAKELPARAM(fRedraw,fontId)
- CLM_SETINDENT = (CLM_FIRST+34); // wParam=new indent, default is 3 pixels
- CLM_SETITEMTEXT = (CLM_FIRST+35); // wParam=hItem, lParam=(AnsiChar*)pszNewText
- CLM_SETSCROLLTIME = (CLM_FIRST+36); // wParam=time in ms, default 200
- CLM_SETHIDEEMPTYGROUPS = (CLM_FIRST+38); // wParam=TRUE/FALSE
-
- GREYF_UNFOCUS = $80000000;
- MODEF_OFFLINE = $40000000;
-
- // and use the PF2_ #defines from m_protosvc.inc
- CLM_SETGREYOUTFLAGS = (CLM_FIRST+39); // wParam=new flags
- CLM_GETHIDEOFFLINEROOT = (CLM_FIRST+40); // returns TRUE/FALSE
- CLM_SETHIDEOFFLINEROOT = (CLM_FIRST+41); // wParam=TRUE/FALSE
- CLM_SETUSEGROUPS = (CLM_FIRST+42); // wParam=TRUE/FALSE
- CLM_SETOFFLINEMODES = (CLM_FIRST+43); // for 'hide offline', wParam=PF2_ flags and MODEF_OFFLINE
- CLM_GETEXSTYLE = (CLM_FIRST+44); // returns CLS_EX_ flags
- CLM_SETEXSTYLE = (CLM_FIRST+45); // wParam=CLS_EX_ flags
- CLM_GETLEFTMARGIN = (CLM_FIRST+46); // returns count of pixels
- CLM_SETLEFTMARGIN = (CLM_FIRST+47); // wParam=pixels
-
-// the order of info items is never changed, so make sure you add them in the
-// order you want them to remain
-
-const
- CLM_ADDINFOITEMA = (CLM_FIRST+48); // lParam=&TCLCINFOITEM, returns hItem
- CLM_GETITEMTYPE = (CLM_FIRST+49); // wParam=hItem, returns a CLCIT_
- CLM_GETNEXTITEM = (CLM_FIRST+50); // wParam=flag, lParam=hItem, returns an hItem
- CLM_GETTEXTCOLOR = (CLM_FIRST+51); // wParam=FONTID_, returns COLORREF
- CLM_SETTEXTCOLOR = (CLM_FIRST+52); // wParam=FONTID_, lParam=COLORREF
-
- CLM_ADDINFOITEMW = (CLM_FIRST+53); // lParam=&TCLCINFOITEM, returns hItem
- CLM_ADDINFOITEM = CLM_ADDINFOITEMW;
-
-//DO NOT USE IT EXTERNALLY CAN BE NOT SUPPORTED BY CLIST
- CLM_SETWIDEEXTRAIMAGE = CLM_FIRST+60; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),iImage). iImage=0xFFFF is a blank
- CLM_GETWIDEEXTRAIMAGE = CLM_FIRST+61; // wParam=hItem, lParam=MAKELPARAM(iColumn (0 based),0), returns iImage or 0xFF
- CLM_GETWIDEEXTRAIMAGELIST = CLM_FIRST+62; // returns HWIDEIMAGELIST
-
- CLCIIF_BELOWGROUPS = 1; // put it between groups and contacts, default is at top
- CLCIIF_BELOWCONTACTS = 2; // put it at the bottom
- CLCIIF_CHECKBOX = $40; // give this item a check box
- CLCIIF_GROUPFONT = $80; // draw the item using FONTID_GROUPS
-
- CLCIT_INVALID = -1;
- CLCIT_GROUP = 0;
- CLCIT_CONTACT = 1;
- CLCIT_DIVIDER = 2;
- CLCIT_INFO = 3;
-
- CLGN_ROOT = 0;
- CLGN_CHILD = 1;
- CLGN_PARENT = 2;
- CLGN_NEXT = 3;
- CLGN_PREVIOUS = 4;
- CLGN_NEXTCONTACT = 5;
- CLGN_PREVIOUSCONTACT = 6;
- CLGN_NEXTGROUP = 7;
- CLGN_PREVIOUSGROUP = 8;
-
- CLNF_ISGROUP = 1;
- CLNF_ISINFO = 2;
-
- CLN_FIRST = (0-100);
- CLN_EXPANDED = (CLN_FIRST-0); // hItem=hGroup, action=CLE_*
- CLN_LISTREBUILT = (CLN_FIRST-1);
- CLN_ITEMCHECKED = (CLN_FIRST-2); // todo // hItem,action,flags valid
- CLN_DRAGGING = (CLN_FIRST-3); // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
- CLN_DROPPED = (CLN_FIRST-4); // hItem,pt,flags valid. only sent when cursor outside window, return nonzero if processed
- CLN_LISTSIZECHANGE = (CLN_FIRST-5); // pt.y valid. the vertical height of the visible items in the list has changed.
- CLN_OPTIONSCHANGED = (CLN_FIRST-6); // nothing valid. If you set some extended options they have been overwritten and should be re-set
- CLN_DRAGSTOP = (CLN_FIRST-7); // hItem,flags valid. sent when cursor goes back in to the window having been outside, return nonzero if processed
- CLN_NEWCONTACT = (CLN_FIRST-8); // hItem,flags valid. sent when a new contact is added without a full list rebuild
- CLN_CONTACTMOVED = (CLN_FIRST-9); // hItem,flags valid. sent when contact is moved without a full list rebuild
- CLN_CHECKCHANGED = (CLN_FIRST-10); // hItem,flags valid. sent when any check mark is changed, but only for one change if there are many
-
-type
- PCLCINFOITEM = ^TCLCINFOITEM;
- TCLCINFOITEM = record
- cbSize : int;
- pszText : TChar;
- hParentGroup: THandle;
- flags : DWORD;
- hIcon : THandle; // todo
- end;
-
- PNMCLISTCONTROL = ^TNMCLISTCONTROL;
- TNMCLISTCONTROL = record
- hdr : TNMHDR; // depends on Windows.pas
- hItem : THandle;
- action : int;
- iColumn: int; // -1 if not on an extra column
- flags : DWORD;
- pt : TPoint; // depends on Windows.pas
- end;
-
- PCLCINFOTIP = ^TCLCINFOTIP;
- TCLCINFOTIP = record
- cbSize : int;
- isTreeFocused: int; // so the plugin can provide an option
- isGroup : int; // 0 if it's contact, 1 if it's a group
- hItem : THANDLE; // handle to group or contact
- ptCursor : TPOINT;
- rcItem : TRECT;
- end;
-
- PCLCEXTRAINFOTIP = ^TCLCEXTRAINFOTIP;
- TCLCEXTRAINFOTIP = record
- cbSize : int;
- isTreeFocused: int; // so the plugin can provide an option
- hItem : THANDLE; // handle to group or contact
- ptCursor : TPOINT;
- rcItem : TRECT;
- extraIndex : int;
- hwnd : HWND;
- end;
-
-const
- {
- wParam : 0
- lParam : Pointer to a TCLCINFOTIP structure
- Affect : An InfoTip for an item should be shown now, see notes
- Returns: [non zero] if you process this, because it makes no sense
- for more than one module to process this.
- Notes : It's upto the module where to put the InfoTip, Normally
- it's a few pixels below and to the right of the cursor.
- -
- This event is called after the mouse ehas been stationary over
- a contact for (by default) 200ms
- }
- ME_CLC_SHOWINFOTIP :PAnsiChar = 'CLC/ShowInfoTip';
- ME_CLC_SHOWEXTRAINFOTIP:PAnsiChar = 'CLC/ShowExtraInfoTip';
-
- {
- wParam : 0
- lParam : Pointer to an initialised TCLCINFOTIP
- Affect : It's time to destroy an infotip, see notes
- Notes : Only cbSize, isGroup, hItem are set
- notes : This is sent when the mouse moves off a contact when ME_CLC_SHOWINFOTIP
- has previously been called.
- -
- If you don't want this behaviour, you should have grabbed the mouse
- capture yourself --
- }
- ME_CLC_HIDEINFOTIP:PAnsiChar = 'CLC/HideInfoTip';
-
- {
- wParam : new_time
- lParam : 0
- Affect : Set a new hover time before the info tip hooks are called, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : The value of this setting is applid to all current CLC windows
- and saved to b applied to all future windows, it is persistent.
- -
- Time is in milliseconds, default is 750ms
- }
- MS_CLC_SETINFOTIPHOVERTIME:PAnsiChar = 'CLC/SetInfoTipHoverTime';
-
- {
- wParam : 0
- lParam : 0
- Affect : get the hover time before the infotip hooks are called
- returns: the hover time in MS
- }
- MS_CLC_GETINFOTIPHOVERTIME:PAnsiChar = 'CLC/GetInfoTipHoverTime';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/m_clist.inc b/delphi/Awkward/include/m_clist.inc
deleted file mode 100644
index 67fc78d..0000000
--- a/delphi/Awkward/include/m_clist.inc
+++ /dev/null
@@ -1,702 +0,0 @@
-{$IFNDEF M_CLIST}
-{$DEFINE M_CLIST}
-
-{$ifndef STATUSMODES}
- {$include statusmodes.inc}
-{$endif}
-
-type
- HGENMENU = THANDLE;
-
-const
- {
- wParam : new_status
- lParam : 0
- Affect : Sent when the user acks to change their status, see notes
- Notes : Also sent due to a MS_CLIST_SETSTATUSMODE
- }
- ME_CLIST_STATUSMODECHANGE:PAnsiChar = 'CList/StatusModeChange';
-
- {
- wParam : new_status
- lParam : 0
- Affect : Force a change of status mode, see statusmodes.inc
- }
- MS_CLIST_SETSTATUSMODE:PAnsiChar = 'CList/SetStatusMode';
-
- {
- wParam : 0
- lParam : 0
- Affect : Get the current status mode, see notes
- Notes : This is the status, as set by the user, not any protocol specific status
- all protocol modules will attempt to conform to this setting at ALL times.
- }
- MS_CLIST_GETSTATUSMODE:PAnsiChar = 'CList/GetStatusMode';
-
- GSMDF_PREFIXONLINE = 1; // prefix "Online :" for online submodes, e.g. 'away'
- GCMDF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GSMDF_UNTRANSLATED = 4;
-
- {
- wParam : status_mode
- lParam : flags
- Affect : Get a textual description of the given status mode
- Returns: pointer to a static buffer of the description of the given status mode
- or NULL(0) if the mode was unknown.
- Version: v0.1.0.1+
- }
- MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
-
-type
-// WARNING: do not use Translate(TS) for p(t)szName or p(t)szPopupName as they
-// are translated by the core, which may lead to double translation.
-// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
- PCLISTMENUITEM = ^TCLISTMENUITEM;
- TCLISTMENUITEM = record
- cbSize : int; // size in bytes of this structure
- szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item
- flags : DWORD;
- position : int; // approx position on the menu, lower numbers go nearer the top
- hIcon : THandle; // icon to put by the item, if this was *not* loaded from
- // a resource, you can delete it straight after the call
- //icolibItem:HANDLE; if CMIF_ICONFROMICOLIB used
- pszService : PAnsiChar; // name of the service to call when the service is clicked
- szPopupName : TChar; // [TRANSLATED-BY-CORE] name of the popup menu that this item is on, if this
- // is NULL the iteem is on the root of the menu
- // or hParentMenu:HGENMENU - valid if CMIF_ROOTHANDLE is set. NULL or (HGENMENU)-1 means the root menu
- popupPosition : int; // position of the popup menu on the root menu, ignored
- // if pszPopupName is NULL(0) or if the popup menu already exists
- hotKey : DWORD; // keyboard accelerator, same as lParam of WM_HOTKEY, 0 for none
- pszContactOwner: PAnsiChar; // contact menus only, the protocol module that owns
- // the contacts to which this to which this menu item
- // applies, NULL(0) if it applies to all contacts.
- // if it applies to multiple but not all protocols
- // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU
- end;
-
-const
- HGENMENU_ROOT = HGENMENU(-1);
-
-const
- CMIF_GRAYED = 1;
- CMIF_CHECKED = 2;
- CMIF_HIDDEN = 4; // only works on contact menus
- CMIF_NOTOFFLINE = 8; // item won't appear for contacts that are offline
- CMIF_NOTONLINE = 16; // " online
- CMIF_NOTONLIST = 32; // item won't appear on standard contacts
- CMIF_NOTOFFLIST = 64; // item won't appear on contacts that have the 'NotOnList' setting
- CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
- CMIF_UNICODE = 512; // will return TCHAR* instead of AnsiChar*
- CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
- CMIF_ICONFROMICOLIB = 2048; // use icolibName instead of hIcon
-
- CMIF_DEFAULT = 4096; // this menu item is the default one
-
-// for compatibility. since 0.8.0 they both mean nothing
- CMIF_ROOTPOPUP = 128; // root item for new popup (save return id for childs)
- CMIF_CHILDPOPUP = 256; // child for rootpopup menu
-
- {
- wParam : 0
- lParam : Pointer to a initalised TCLISTMENUITEM structure
- Affect : Add a new menu item to the main menu, see notes
- Returns: A handle to the new MENU item or NULL(0) on failure
- Notes : The given TCLISTMENUITEM.pszService in is called when the item
- get clicked with :
- -
- wParam = 0, lParam = hwndContactList
- }
- MS_CLIST_ADDMAINMENUITEM:PAnsiChar = 'CList/AddMainMenuItem';
-
- {
- wParam : 0
- lParam : Pointer to a initalised TCLISTMENUITEM structure
- Affect : Add a new item to the user contact menus, see notes
- Notes : exactly the same as MS_CLIST_ADDMAINMENUITEM except when an item
- is selected, the service gets called with wParam=hContact,
- pszContactOwner is obeyed.
- -
- Popup menus are not supported, pszPopupName and popupPosition
- are ignored. If CTRL is held down when right clicking the menu
- position numbers will be displayed in brackets after the menu item
- text, this only works in debug builds!
- }
- MS_CLIST_ADDCONTACTMENUITEM:PAnsiChar = 'CList/AddContactMenuItem';
- MS_CLIST_ADDSTATUSMENUITEM :PAnsiChar = 'CList/AddStatusMenuItem';
-//adds a protocol menu item v0.9+
- MS_CLIST_ADDPROTOMENUITEM :PAnsiChar = 'CList/AddProtoMenuItem';
-
- CMIM_NAME = $80000000;
- CMIM_FLAGS = $40000000;
- CMIM_ICON = $20000000;
- CMIM_HOTKEY = $10000000;
- CMIM_ALL = $F0000000;
-
- {
- wParam : HMENUITEM
- lParam : Pointer to a initalised TCLISTMENUITEM
- Affect : Modify an existing menu item, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : hMenuItem will have been returned by MS_CLIST_ADD[MAIN]MENUITEM
- TCLISTMENUITEM.flags should contain CMIM_* constants (see above)
- to mark which fields should be updated, if it's not present, they
- can't be updated -- if flags do not exist for a field it can not
- be updated.
- Version: v0.1.0.1+
- }
- MS_CLIST_MODIFYMENUITEM:PAnsiChar = 'CList/ModifyMenuItem';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : the context menu for a contact is about to be built, see notes
- Notes : modules should use this to change menu items that are specific
- to the contact that has them
- Version: v0.1.0.1+
- }
- ME_CLIST_PREBUILDCONTACTMENU:PAnsiChar = 'CList/PreBuildContactMenu';
-
-type
- PCLISTDOUBLECLICKACTION = ^TCLISTDOUBLECLICKACTION;
- TCLISTDOUBLECLICKACTION = record
- cbSize : int;
- pszContactOwner: PAnsiChar; // name of the protocol owning the contact or NULL(0) for all
- flags : DWORD; // CMIF_NOT flags above
- pszService : PAnsiChar; // service to call on double click, is called with wParam=hContact, lParam=0
- end;
-
-const
- {
- wParam : 0
- lParam : Pointer to a initalised TCLISTDOUBLECLICKACTION structure
- Affect : Sets the service to call when a contact is double-clicked, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : in case of conflicts, the first module to have registered
- will get the double click, no others will, this service
- will return success even for duplicates
- -
- This service was dropped from development during 0.3.0.0, it is no
- longer supported, see ME_CLIST_DOUBLECLICKED
- Version: 0.1.2.2+, 0.2.0+ ONLY (not 3.0a)
- }
- MS_CLIST_SETDOUBLECLICKACTION:PAnsiChar = 'CList/SetDoubleClickAction';
-
- {
- wParam : HCONTACT
- lParam : <none>
- Affect : Register with this event to be notified of a double click on the CList
- against a HCONTACT, you will not be notified if there is a pending CList event
- that the double click clears, (i.e. flashing icon is presented to be clicked)
- Version: 0.3.0.0
- }
- ME_CLIST_DOUBLECLICKED:PAnsiChar = 'CList/DoubleClicked';
-
- GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
- GCDNF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GCDNF_NOCACHE = 4; // will not use the cache
- {
- wParam : HCONTACT
- lParam : flags
- Affect : Gets the string that the contact list will use to represent a contact
- Returns: Always a pointer
- Notes : Returns a pointer to the name, will always succeed, even if it needs
- to return "(Unknown Contact)"
- -
- this pointer is a statically allocated buffer which will
- be overwritten on every call to this service, callers should make
- sure that they copy the information before they call it again
- Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
- }
- MS_CLIST_GETCONTACTDISPLAYNAME:PAnsiChar = 'CList/GetContactDisplayName';
-
- {
- Invalidates the display name cache
- wParam=(WPARAM)(HANDLE)hContact
- lParam=not used
- }
- MS_CLIST_INVALIDATEDISPLAYNAME:PAnsiChar = 'CList/InvalidateDiplayName';
-
-type
- PCLISTEVENT = ^TCLISTEVENT;
- TCLISTEVENT = record
- cbSize : int; // size in bytes
- hContact : THANDLE; // handle to the contact to put the icon by
- hIcon : THANDLE; // icon to flash!
- flags : DWORD;
- hDBEvent : THANDLE; // caller defined, but should be unique for hContact
- // or pszProtocol:PAnsiChar
- lParam : LPARAM;
- pszService: PAnsiChar; // name of service to call on activation
- szTooltip : TChar; // short description of the event to display as a tooltip on the systray
- end;
-
-const
- CLEF_URGENT = 1; // flashes the icon even if the user is occupied, and puts
- // the event at the top of the queue
- CLEF_ONLYAFEW = 2; // icon will not flash forever, only a few times,
- // e.g. online alert
- CLEF_UNICODE = 4; // set pszTooltip as unicode
- CLEF_PROTOCOLGLOBAL = 8; // set event globally for protocol, hContact has to
- // be NULL, lpszProtocol the protocol ID name to be set
- {
- wParam : 0
- lParam : Pointer to a TCLISTEVENT
- Affect : Add's an event to the list
- Notes : The service will flash TCLISTEVENT.hIcon, next to the
- contact, TCLISTEVENT.hContact
- -
- pszService is called is called wParam=hwndContactList,
- lParam=pointer to a TCLISTEVENT.
- -
- the TCLISTEVENT data is invalidated after this service returns
- so copy anything from it if required.
- -
- TCLISTEVENT.pszService will also be called if the user
- double clicks on the icon, at which point it will be removed
- from the contact lists queue automatically.
- -
- TCLISTEVENT.hContact and TCLISTEVENT.hDBEvent should be unique.
- }
- MS_CLIST_ADDEVENT:PAnsiChar = 'CList/AddEvent';
-
- {
- wParam : HCONTACT
- lParam : HDBEVENT
- Affect : Remove an event from the contact list queue
- Returns: 0 on success, [non zero] on failure
- }
- MS_CLIST_REMOVEEVENT:PAnsiChar = 'Clist/RemoveEvent';
-
- {
- wParam : HCONTACT
- lParam : iEvent
- Affect : Get the details of an event in the queue, see notes
- Returns: A CLISTEVENT* or NULL(0) on failure
- Notes : Returns the iEvent'1st/2nd/3rd/nth elemented queried,
- e.g. iEvent=0 will get the event that will be returned if the
- user double clicks on that HCONTACT
- -
- Use HCONTACT=NULL, iEvent=0 for example to get the event
- the user will get if they double click on the tray.
- Version: v0.1.2.1+
- }
- MS_CLIST_GETEVENT:PAnsiChar = 'CList/GetEvent';
-
- {
- wParam : ControlID
- lParam : Pointer to MEASUREITEMSTRUCT struct
- Affect : Process a WM_MEASUREITEM message for user context menus, see notes
- Notes : just because wParam, lParam is defined here, only pass them
- opaquely to this service, as is.
- -
- This is just to draw icons, if it is not called, the icons
- will not be drawn
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUMEASUREITEM:PAnsiChar = 'CList/MenuMeasureItem';
-
- {
- wParam :
- lParam :
- Affect : Process a WM_DRAWITEM message for user context menus,
- wParam, lParam should be passed from such message handler.
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUDRAWITEM:PAnsiChar = 'CList/MenuDrawItem';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Built the context menu for a specific contact
- Returns: A HMENU handle identifying the menu, this should be DestroyMenu()ed
- when done.
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUBUILDCONTACT:PAnsiChar = 'CList/MenuBuildContact';
-
- {
- wParam : 0
- lParam : 0
- Affect : Get the image list handle with all the useful icons in it
- Version: v0.1.1.0+
- }
- MS_CLIST_GETICONSIMAGELIST:PAnsiChar = 'CList/GetIconsImageList';
- IMAGE_GROUPOPEN = 11;
- IMAGE_GROUPSHUT = 12;
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Get the icon that should be associated with a contact
- Returns: an index into the contact list imagelist, if the icon
- is a flashing icon, this service won't return information about it
- see below
- Version: v0.1.2.0+
- }
- MS_CLIST_GETCONTACTICON:PAnsiChar = 'CList/GetContactIcon';
-
- {
- wParam : HCONTACT
- lParam : ICON_ID
- Affect : The icon of a contact in the contact list has changed,
- ICON_ID is an index to what image has changed
- Version: v0.1.2.1+
- }
- ME_CLIST_CONTACTICONCHANGED:PAnsiChar = 'CList/ContactIconChanged';
-
-//******************************* CLUI only *********************************
-
- {
- wParam : 0
- lParam : 0
- Affect : Get the handle to Miranda's main menu
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUGETMAIN:PAnsiChar = 'CList/MenuGetMain';
-
- {
- wParam : 0
- lParam : 0
- Affect : Get a handle to Miranda's status menu
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUGETSTATUS:PAnsiChar = 'CList/MenuGetStatus';
-
- CLISTMENUIDMIN = $4000; // reserved range for clist menu ids
- CLISTMENUIDMAX = $7FFF;
- {
- NOTE: v0.7.0.26+
- Due to it is generic practice to handle menu command via WM_COMMAND
- window message handle and practice to process it via calling service
- in form: CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),
- MPCF_CONTACTMENU),(LPARAM) hContact))
- to ensure that WM_COMMAND was realy from clist menu not from other menu
- it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
- the menu items with ids outside from such range will not be processed by service.
- Moreover if you process WM_COMMAND youself and your window contains self menu
- please be sure that you will not call service for non-clist menu items.
- The simplest way is to ensure that your menus are not use item ids from such range.
- Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from your
- internal menu and DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
- }
- MPCF_CONTACTMENU = 1; // test commands from a contact menu
- MPCF_MAINMENU = 2; // test commands from the main menu
- {
- wParam : MAKEWPARAM(LOWORD(wParam of WM_COMMAND),flags)
- lParam : HCONTACT
- Affect : Process a menu selection from a menu, see notes
- Returns: True if it processed the command, False otherwise
- notes : hContact is the currently selected contact, it is not used
- if this is a main menu command, if this is NULL then the command
- is a contact menu one, the command is ignored
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUPROCESSCOMMAND:PAnsiChar = 'CList/MenuProcessCommand';
-
- {
- wParam : virtual key code
- lParam : MPCF_* flags
- Affect : Process a menu hotkey, see notes
- Returns: True if it processed the command, False otherwise
- Notes : this should be called in WM_KEYDOWN
- Version: v0.1.1.0+
- }
- MS_CLIST_MENUPROCESSHOTKEY:PAnsiChar = 'CList/MenuProcessHotkey';
-
- {
- wParam : Pointer to a MSG structurer
- lParam : Pointer to an LRESULT
- Affect : Process all the messages required for docking, see notes
- Returns: True if the message should NOT be processed anymore, False otherwise
- Notes : only msg.hwnd, msg.message, msg.wParam and msg.lParam are used
- your WndProc should return the lResult if AND only IF, TRUE is returned
- Version: v0.1.1.0+
- }
- MS_CLIST_DOCKINGPROCESSMESSAGE:PAnsiChar = 'CList/DockingProcessMessage';
-
- {
- wParam : 0
- lParam : 0
- Affect : Determines wheter the contact list docked
- Returns: pnon zero] if the contact list is docked, or 0 if it's not
- Version: v0.1.1.0+
- }
- MS_CLIST_DOCKINGISDOCKED:PAnsiChar = 'CList/DockingIsDocked';
-
- {
- wParam : Pointer to a TMSG
- lParam : Pointer to an LRESULT
- Affect : Process all the messages required for the tray icon, see notes
- Returns: TRUE if the message should not be processed anymore, False otherwise
- Notes : Only msg.hwnd, msg.message, msg.wparam and msg.lParam are used
- your WndProc should return LRESULT if and ONLY if TRUE is returned
- Version: v0.1.1.0+
- }
- MS_CLIST_TRAYICONPROCESSMESSAGE:PAnsiChar = 'CList/TrayIconProcessMessage';
-
- {
- wParam : Pointer to TMSG
- lParam : Pointer to an LRESULT
- Affect : Process all the messages required for hotkeys, see notes
- Returns: True if the message should not be processed anymore or False otherwise
- Notes : only msg.hwnd, msg.message, msg.wParam, msg.lParam are used
- Version: v0.1.1.0+
- }
- MS_CLIST_HOTKEYSPROCESSMESSAGE:PAnsiChar = 'CList/HotkeysProcessMessage';
-
- {
- wParam : 0
- lParam : 0
- Affect : Toggles the show/hide status of the contact list
- Returns: 0 on success, [non zero] on failure
- Version: v0.1.1.0+
- }
- MS_CLIST_SHOWHIDE:PAnsiChar = 'CList/ShowHide';
-
- {
- wParam : 0
- lParam : 0
- Affect : temporarily disable the autohide feature, see notes
- Notes : this service will restart the auto hide timer, so if you need
- to keep the window visible you'll have to bee getting user input
- or calling this service each time
- Version: v0.1.2.1+
- }
- MS_CLIST_PAUSEAUTOHIDE:PAnsiChar = 'CList/PauseAutoHide';
-
-{
- sent when the group get modified (created, renamed or deleted)
- or contact is moving from group to group
- wParam=hContact - NULL if operation on group
- lParam=pointer to CLISTGROUPCHANGE
-}
-type
- CLISTGROUPCHANGE = record
- cbSize :int; //size in bytes of this structure
- pszOldName:PAnsiChar; //old group name
- pszNewName:PAnsiChar; //new group name
- end;
-const
- ME_CLIST_GROUPCHANGE:PAnsiChar = 'CList/GroupChange';
-
- {
- wParam : HPARENTGROUP
- lParam : 0 or Pointer to new group name
- Affect : Create a new group and calls CLUI to display it, see notes
- Returns: A handle to the new group.
- Notes : If HPARENTGROUP is NULL(0) it will create a group at the root.
- Version: v0.1.1.0+
- }
- MS_CLIST_GROUPCREATE:PAnsiChar = 'CList/GroupCreate';
-
- {
- wParam : HGROUP
- lParam : 0
- Affect : Delete a group and call CLUI to display the change
- Returns: 0 on success, [non zero] on failure
- Version: v0.1.1.0+
- }
- MS_CLIST_GROUPDELETE:PAnsiChar = 'CList/GroupDelete';
-
- {
- wParam : HGROUP
- lParam : newState
- Affect : Change the expanded state flag for a group internally, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : if newState is non zero then the group is expanded, 0 it's collapsed
- CLUI IS *NOT* called when the change is made.
- Version: v0.1.1.0+
- }
- MS_CLIST_GROUPSETEXPANDED:PAnsiChar = 'CList/GroupSetExpanded';
-
- {
- wParam : HGROUP
- lParam : MAKELPARAM(flags, flagsMask)
- Affect : Change the flag for a group, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : only if flags given in flagsmask are altered,
- CLUI is called on change to GROUPF_HIDEOFFLINE
- Version: v0.1.2.1+
- }
- MS_CLIST_GROUPSETFLAGS:PAnsiChar = 'CList/GroupSetFlags';
-
- {
- wParam : HGROUP
- lParam : Pointer to a integer to be filled with expanded state
- Affect : get the name of a group, see notes
- Returns: a static buffer pointing to the name of the group
- returns NULL(0) if HGROUP is invalid.
- Notes : the returned buffer is only valid til the next call
- to this service, lParam can be NULL(0) if you don't
- want to know if the group is expanded
- Version: v0.1.1.0+
- }
- MS_CLIST_GROUPGETNAME:PAnsiChar = 'CList/GroupGetName';
-
- {
- wParam : HGROUP
- lParam : Pointer to flags
- Affect : Get the name of the group, see notes
- Returns: A static buffer pointing to the name of the group
- returns NULL(0) if HGROUP is invalid
- Note : this buffer is only valid til the next call to this service
- flags can be NULL(0), otherwise it'll return GROUPF_* constants
- Version: v0.1.2.1+
- }
- MS_CLIST_GROUPGETNAME2:PAnsiChar = 'CList/GroupGetName2';
-
- GROUPF_EXPANDED = $04;
- GROUPF_HIDEOFFLINE = $08;
- {
- wParam : HGROUP
- lParam : HBEFOREGROUP
- Affect : Move a group directly before another group
- Returns: the new handle of the group on success, NULL(0) on failure
- Notes : the order is represented by the order in which MS_CLUI_GROUPADDED
- is called, however UI's are free to ignore this order and sort
- if they wish.
- Version: v0.1.2.1+
- }
- MS_CLIST_GROUPMOVEBEFORE:PAnsiChar = 'CList/GroupMoveBefore';
-
- {
- wParam : HGROUP
- lParam : Pointer to a null terminated string containing the new name
- Affect : Rename a group internally, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : this will fail if the group name is a duplicate of an existing
- a name, CLUI is not called when this change is made.
- Version: v0.1.1.0+
- }
- MS_CLIST_GROUPRENAME:PAnsiChar = 'CList/GroupRename';
-
- {
- wParam : 0
- lParam : 0
- Affect : Build a menu of the group tree, see notes
- Returns: Handle to the menu, NULL(0) on failure
- Notes : NULL be returned if the user doesn't have any groups
- the dwItemData of every menu item is the handle to that group.
- Menu item ID's are assigned starting at 100 in no particular order
- Version: v0.1.2.1+
- }
- MS_CLIST_GROUPBUILDMENU:PAnsiChar = 'CList/GroupBuildMenu';
-
- {
- wParam : newValue
- lParam : 0
- Affect : Changes the 'hide offline contacts' flag and calls CLUI, see notes
- Returns: 0 success, [non zero] on failure
- Notes : newValue is 0 to show all contacts, 1 to show only online contacts
- -1 to toggle the value
- Version: v0.1.1.0+
- }
- MS_CLIST_SETHIDEOFFLINE:PAnsiChar = 'CList/SetHideOffline';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Do the message processing associated with the double clicking a contact
- Returns: 0 on success, [non zero] on failure
- Version: v0.1.1.0+
- }
- MS_CLIST_CONTACTDOUBLECLICKED:PAnsiChar = 'CList/ContactDoubleClicked';
-
- {
- wParam : HCONTACT
- lParam : Pointer to an array of PAnsiChar's containing files/dirs
- Affect : Do the processing when some files are droppeed on a contact, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : the array is terminated when a NULL(0) entry is found
- Version: v0.1.2.1+
- }
- MS_CLIST_CONTACTFILESDROPPED:PAnsiChar = 'CList/ContactFilesDropped';
-
- {
- wParam : HCONTACT
- lParam : HGROUP
- Affect : Change the group a contact belongs to, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : use hGroup=NULL(0) to remove any group association with the contact
- Version: v0.1.1.0+
- }
- MS_CLIST_CONTACTCHANGEGROUP:PAnsiChar = 'CList/ContactChangeGroup';
-
- {
- wParam : HCONTACT_1
- lParam : HCONTACT_2
- Affect : Determine the ordering of two given contacts
- Returns: 0 if hContact1 is the same as hContact2
- 1 if hContact1 should be displayed before hContact2
- -1 if hContact1 should be displayed after hCotnact2
- Version: v0.1.1.0+
- }
- MS_CLIST_CONTACTSCOMPARE:PAnsiChar = 'CList/ContactsCompare';
-
- {
- wParam=0 (not used)
- lParam=(LPARAM) &MIRANDASYSTRAYNOTIFY
-
- Affects: Show a message in a ballon tip against a protocol icon (if installed)
- Returns: 0 on success, non zero on failure
- Notes : This service will not be created on systems that haven't got the Windows
- support for ballontips, also note that it's upto Windows if it shows your
- message and it keeps check of delays (don't be stupid about showing messages)
-
- Version: 0.3.1a
- }
- NIIF_INFO = $00000001;
- NIIF_WARNING = $00000002;
- NIIF_ERROR = $00000003;
- NIIF_ICON_MASK = $0000000F;
- NIIF_NOSOUND = $00000010;
- NIIF_INTERN_UNICODE = $00000100;
-
-type
- PMIRANDASYSTRAYNOTIFY = ^TMIRANDASYSTRAYNOTIFY;
- TMIRANDASYSTRAYNOTIFY = record
- cbSize :int; // sizeof(MIRANDASYSTRAY)
- szProto :PAnsiChar; // protocol to show under (may have no effect)
- szInfoTitle:PAnsiChar; // only 64chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
- szInfo :PAnsiChar; // only 256chars of it will be used, TCHAR if NIIF_INTERN_UNICODE is specified
- dwInfoFlags:dword; // see NIIF_* stuff
- uTimeout :dword; // how long to show the tip for
- end;
-
-const
- MS_CLIST_SYSTRAY_NOTIFY:PAnsiChar = 'Miranda/Systray/Notify';
-
-const
- SETTING_TOOLWINDOW_DEFAULT = 1;
- SETTING_SHOWMAINMENU_DEFAULT = 1;
- SETTING_SHOWCAPTION_DEFAULT = 1;
- SETTING_CLIENTDRAG_DEFAULT = 0;
- SETTING_ONTOP_DEFAULT = 1;
- SETTING_MIN2TRAY_DEFAULT = 1;
- SETTING_TRAY1CLICK_DEFAULT = 0;
- SETTING_HIDEOFFLINE_DEFAULT = 0;
- SETTING_HIDEEMPTYGROUPS_DEFAULT = 0;
- SETTING_USEGROUPS_DEFAULT = 1;
- SETTING_SORTBYSTATUS_DEFAULT = 0;
- SETTING_SORTBYPROTO_DEFAULT = 0;
- SETTING_TRANSPARENT_DEFAULT = 0;
- SETTING_ALPHA_DEFAULT = 200;
- SETTING_AUTOALPHA_DEFAULT = 150;
- SETTING_CONFIRMDELETE_DEFAULT = 1;
- SETTING_AUTOHIDE_DEFAULT = 0;
- SETTING_HIDETIME_DEFAULT = 30;
- SETTING_CYCLETIME_DEFAULT = 4;
- SETTING_ALWAYSSTATUS_DEFAULT = 0;
- SETTING_ALWAYSMULTI_DEFAULT = 0;
-
- SETTING_TRAYICON_SINGLE = 0;
- SETTING_TRAYICON_CYCLE = 1;
- SETTING_TRAYICON_MULTI = 2;
- SETTING_TRAYICON_DEFAULT = SETTING_TRAYICON_SINGLE;
-
- SETTING_STATE_HIDDEN = 0;
- SETTING_STATE_MINIMIZED = 1;
- SETTING_STATE_NORMAL = 2;
- SETTING_BRINGTOFRONT_DEFAULT = 0;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_clistint.inc b/delphi/Awkward/include/m_clistint.inc
deleted file mode 100644
index 73b16d3..0000000
--- a/delphi/Awkward/include/m_clistint.inc
+++ /dev/null
@@ -1,518 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright 2000-2008 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFDEF M_API_UNIT}
-
-{Type
- P_menuProto = ^_menuProto;
- PClcCacheEntryBase = ^ClcCacheEntryBase;
- PClcContact = ^ClcContact;
- PClcData = ^ClcData;
- PClcFontInfo = ^ClcFontInfo;
- PClcGroup = ^ClcGroup;
- PClcProtoStatus = ^ClcProtoStatus;
- PCLIST_INTERFACE = ^CLIST_INTERFACE;
- PCListEvent = ^CListEvent;
- PContactList = ^ContactList;
- PEventList = ^EventList;
- PMenuProto = ^MenuProto;
- PMIRANDASYSTRAYNOTIFY = ^MIRANDASYSTRAYNOTIFY;
- PPROTOCOLDESCRIPTOR = ^PROTOCOLDESCRIPTOR;
- PtrayIconInfo_t = ^trayIconInfo_t;
-}
-const
- HCONTACT_ISGROUP = $80000000;
- HCONTACT_ISINFO = $FFFF0000;
- MAXEXTRACOLUMNS = 16;
- MAX_TIP_SIZE = 2048;
-
-function IsHContactGroup (h:THANDLE):bool;
-function IsHContactInfo (h:THANDLE):bool;
-function IsHContactContact(h:THANDLE):bool;
-
-const
- INTM_NAMECHANGED = WM_USER+10;
- INTM_ICONCHANGED = WM_USER+11;
- INTM_GROUPCHANGED = WM_USER+12;
- INTM_GROUPSCHANGED = WM_USER+13;
- INTM_CONTACTADDED = WM_USER+14;
- INTM_CONTACTDELETED = WM_USER+15;
- INTM_HIDDENCHANGED = WM_USER+16;
- INTM_INVALIDATE = WM_USER+17;
- INTM_APPARENTMODECHANGED = WM_USER+18;
- INTM_SETINFOTIPHOVERTIME = WM_USER+19;
- INTM_NOTONLISTCHANGED = WM_USER+20;
- INTM_RELOADOPTIONS = WM_USER+21;
- INTM_NAMEORDERCHANGED = WM_USER+22;
- INTM_IDLECHANGED = WM_USER+23;
- INTM_SCROLLBARCHANGED = WM_USER+24;
- INTM_PROTOCHANGED = WM_USER+25;
-
- TIMERID_RENAME = 10;
- TIMERID_DRAGAUTOSCROLL = 11;
- TIMERID_INFOTIP = 13;
- TIMERID_REBUILDAFTER = 14;
- TIMERID_DELAYEDRESORTCLC = 15;
- TIMERID_TRAYHOVER = 16;
- TIMERID_TRAYHOVER_2 = 17;
-
- GROUP_ALLOCATE_STEP = 8;
-
-type
- PClcContact = ^ClcContact;
- ClcContact = record
- {undefined structure}
- end;
-
- PClcData = ^ClcData;
- ClcData = record
- {undefined structure}
- end;
-
-{ templates, where are you... }
-
- PContactList = ^ContactList;
- ContactList = record
- items : ^PClcContact;
- count : int;
- limit : int;
- increment : int;
- sortFunc : pointer;
- end;
-
- PEventList = ^EventList;
- EventList = record
- items : ^PCListEvent;
- count : int;
- limit : int;
- increment : int;
- sortFunc : pointer;
- end;
-
- PClcGroup = ^ClcGroup;
- ClcGroup = record
- cl : ContactList;
- expanded : int;
- hideOffline : int;
- groupId : int;
- parent : PClcGroup;
- scanIndex : int;
- totalMembers : int;
- end;
-
- PClcFontInfo = ^ClcFontInfo;
- ClcFontInfo = record
- hFont : HFONT;
- fontHeight : int;
- changed : int;
- colour : COLORREF;
- end;
-
- PtrayIconInfo_t = ^trayIconInfo_t;
- trayIconInfo_t = record
- id : int;
- szProto : PAnsiChar;
- hBaseIcon : HICON;
- isBase : int;
- ptszToolTip : TChar;
- end;
-
-{This is DLL-based unique name }
-
- P_menuProto = ^_menuProto;
- _menuProto = record
- szProto : PAnsiChar;
- pMenu : HGENMENU;
- hIcon : HICON;
- end;
- MenuProto = _menuProto;
- PMenuProto = ^MenuProto;
-{ constants }
-
-const
- DRAGSTAGE_NOTMOVED = 0;
- DRAGSTAGE_ACTIVE = 1;
- DRAGSTAGEM_STAGE = $00FF;
- DRAGSTAGEF_MAYBERENAME = $8000;
- DRAGSTAGEF_OUTSIDE = $4000;
-
- CONTACTF_ONLINE = 1;
- CONTACTF_INVISTO = 2;
- CONTACTF_VISTO = 4;
- CONTACTF_NOTONLIST = 8;
- CONTACTF_CHECKED = 16;
- CONTACTF_IDLE = 32;
-
- DROPTARGET_OUTSIDE = 0;
- DROPTARGET_ONSELF = 1;
- DROPTARGET_ONNOTHING = 2;
- DROPTARGET_ONGROUP = 3;
- DROPTARGET_ONCONTACT = 4;
- DROPTARGET_INSERTION = 5;
-
- CLCDEFAULT_ROWHEIGHT = 16;
- CLCDEFAULT_EXSTYLE = CLS_EX_EDITLABELS or CLS_EX_TRACKSELECT or
- CLS_EX_SHOWGROUPCOUNTS or CLS_EX_HIDECOUNTSWHENEMPTY or
- CLS_EX_TRACKSELECT or CLS_EX_NOTRANSLUCENTSEL;
- //plus CLS_EX_NOSMOOTHSCROLL is got from the system
- CLCDEFAULT_SCROLLTIME = 150;
- CLCDEFAULT_GROUPINDENT = 5;
- CLCDEFAULT_USEBITMAP = 0;
- CLCDEFAULT_BKBMPUSE = CLB_STRETCH;
- CLCDEFAULT_OFFLINEMODES = MODEF_OFFLINE;
- CLCDEFAULT_GREYOUTFLAGS = 0;
- CLCDEFAULT_SELBLEND = 1;
- CLCDEFAULT_FULLGREYOUTFLAGS = MODEF_OFFLINE or PF2_INVISIBLE or GREYF_UNFOCUS;
- CLCDEFAULT_QUICKSEARCHCOLOUR = $0000FFFF; //RGB(255,255,0);
- CLCDEFAULT_LEFTMARGIN = 0;
- CLCDEFAULT_GAMMACORRECT = 1;
- CLCDEFAULT_SHOWIDLE = 1;
- CLCDEFAULT_USEWINDOWSCOLOURS = 0;
-
- TRAYICON_ID_BASE = 100;
- TIM_CALLBACK = WM_USER+1857;
- TIM_CREATE = WM_USER+1858;
-
-function CLCDEFAULT_BKCOLOUR:dword;
-function CLCDEFAULT_TEXTCOLOUR:dword;
-function CLCDEFAULT_SELBKCOLOUR:dword;
-function CLCDEFAULT_SELTEXTCOLOUR:dword;
-function CLCDEFAULT_HOTTEXTCOLOUR:dword;
-
-const
-{
- Miranda 0.4.3.0+
- retrieves the pointer to a CLIST_INTERFACE structure
- NOTE: valid only for the clist clone building, not for the regular use
-}
- MS_CLIST_RETRIEVE_INTERFACE:PansiChar = 'CList/RetrieveInterface';
-
- {**************************************************************************
- * CLIST_INTERFACE structure definition
- ************************************************************************** }
-
-type
- PClcProtoStatus = ^ClcProtoStatus;
- ClcProtoStatus = record
- szProto :PAnsiChar;
- dwStatus:dword;
- end;
-
-type
- PClcCacheEntryBase = pointer;
- PClcCacheEntryBaseA = ^ClcCacheEntryBaseA;
- ClcCacheEntryBaseA = record
- hContact:THANDLE;
- name :TCHAR;
- group :TCHAR;
- isHidden:int;
- end;
- PClcCacheEntryBaseW = ^ClcCacheEntryBaseW;
- ClcCacheEntryBaseW = record
- hContact:THANDLE;
- name :TCHAR;
- szName :PAnsiChar;
- group :TCHAR;
- isHidden:int;
- end;
-
-type
- PCLIST_INTERFACE = ^CLIST_INTERFACE;
- CLIST_INTERFACE = record
- version : int;
- hwndContactList : HWND;
- hwndContactTree : HWND;
- hwndStatus : HWND;
- hMenuMain : HMENU;
- hInst : HMODULE;
- hClcProtoCount : int;
- clcProto : PClcProtoStatus;
-
- (* clc.h *)
- pfnClcOptionsChanged : procedure ;cdecl;
- pfnClcBroadcast : procedure (_para1:int; _para2:WPARAM; _para3:LPARAM); cdecl;
- pfnBuildGroupPopupMenu : function (_para1:PClcGroup):HMENU; cdecl;
-
- pfnContactListControlWndProc:function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
-
- (* clcfiledrop.c *)
- pfnRegisterFileDropping : procedure (hwnd:HWND); cdecl;
- pfnUnregisterFileDropping : procedure (hwnd:HWND); cdecl;
-
- (* clcidents.c *)
- pfnGetRowsPriorTo : function (var group:ClcGroup; var subgroup:ClcGroup;
- contactIndex:int):int; cdecl;
- pfnFindItem : function (hwnd:HWND; var dat:ClcData; hItem:THANDLE;
- var contact:PClcContact; var subgroup:PClcGroup;
- var isVisible:int):int; cdecl;
- pfnGetRowByIndex : function (var dat:ClcData; testindex:int;
- var contact:PClcContact; var subgroup:PClcGroup):int; cdecl;
- pfnContactToHItem : function (var contact:ClcContact):THANDLE;cdecl;
- pfnContactToItemHandle : function (var contact:ClcContact; var nmFlags:DWORD):THANDLE; cdecl;
-
- (* clcitems.c *)
- pfnCreateClcContact : function :PClcContact; cdecl;
- pfnAddGroup : function (hwnd:HWND; var dat:ClcData; szName:TChar;
- flags:DWORD; groupId:int; calcTotalMembers:int):PClcGroup; cdecl;
- pfnRemoveItemFromGroup : function (hwnd:HWND; var group:ClcGroup;
- var contact:ClcContact; updateTotalCount:int):PClcGroup; cdecl;
-
- pfnFreeContact : procedure (var contact:ClcContact); cdecl;
- pfnFreeGroup : procedure (var group:ClcGroup); cdecl;
-
- pfnAddInfoItemToGroup : function (var group:ClcGroup; flags:int; pszText:TChar):int; cdecl;
- pfnAddItemToGroup : function (var group:ClcGroup; iAboveItem:int):int; cdecl;
- pfnAddContactToGroup : function (var dat:ClcData; var group:ClcGroup;
- hContact:THANDLE):int; cdecl;
- pfnAddContactToTree : procedure (hwnd:HWND; var dat:ClcData; hContact:THANDLE;
- updateTotalCount:int; checkHideOffline:int); cdecl;
- pfnDeleteItemFromTree : procedure (hwnd:HWND; hItem:THANDLE); cdecl;
- pfnRebuildEntireList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnGetGroupContentsCount : function (var group:ClcGroup; visibleOnly:int):int; cdecl;
- pfnSortCLC : procedure (hwnd:HWND; var dat:ClcData; useInsertionSort:int); cdecl;
- pfnSaveStateAndRebuildList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
-
- (* clcmsgs.c *)
- pfnProcessExternalMessages : function (hwnd:HWND; var dat:ClcData; msg:UINT;
- wParam:WPARAM; lParam:LPARAM):LRESULT; cdecl;
-
- (* clcpaint.c *)
- pfnPaintClc : procedure (hwnd:HWND; var dat:ClcData; hdc:HDC; var rcPaint:TRECT); cdecl;
-
- (* clcutils.c *)
- pfnGetGroupCountsText : function (var dat:ClcData; var contact:ClcContact):PAnsiChar; cdecl;
- pfnHitTest : function (hwnd:HWND; var dat:ClcData; testx:int;
- testy:int; var contact:PClcContact;
- var group:PClcGroup; var flags:DWORD):int; cdecl;
- pfnScrollTo : procedure (hwnd:HWND; var dat:ClcData; desty:int; noSmooth:int); cdecl;
- pfnEnsureVisible : procedure (hwnd:HWND; var dat:ClcData; iItem:int; partialOk:int); cdecl;
- pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnSetGroupExpand : procedure (hwnd:HWND; var dat:ClcData; var group:ClcGroup; newState:int); cdecl;
- pfnDoSelectionDefaultAction : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnFindRowByText : function (hwnd:HWND; var dat:ClcData; text:TChar; prefixOk:int):int; cdecl;
- pfnEndRename : procedure (hwnd:HWND; var dat:ClcData; save:int); cdecl;
- pfnDeleteFromContactList : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnBeginRenameSelection : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnCalcEipPosition : procedure (var dat:ClcData; var contact:ClcContact; var group:ClcGroup; var result:TPOINT); cdecl;
- pfnGetDropTargetInformation : function (hwnd:HWND; var dat:ClcData; pt:TPOINT):int; cdecl;
- pfnClcStatusToPf2 : function (status:int):int; cdecl;
- pfnIsHiddenMode : function (var dat:ClcData; status:int):int; cdecl;
- pfnHideInfoTip : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnNotifyNewContact : procedure (hwnd:HWND; hContact:THANDLE); cdecl;
- pfnGetDefaultExStyle : function :DWORD; cdecl;
- pfnGetDefaultFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
- pfnGetFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
- pfnLoadClcOptions : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnRecalculateGroupCheckboxes : procedure (hwnd:HWND; var dat:ClcData); cdecl;
- pfnSetGroupChildCheckboxes : procedure (var group:ClcGroup; checked:int); cdecl;
- pfnInvalidateItem : procedure (hwnd:HWND; var dat:ClcData; iItem:int); cdecl;
-
- pfnGetRowBottomY : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowHeight : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowTopY : function (var dat:ClcData; item:int):int; cdecl;
- pfnGetRowTotalHeight : function (var dat:ClcData):int; cdecl;
- pfnRowHitTest : function (var dat:ClcData; y:int):int; cdecl;
-
- (* clistevents.c *)
- pfnEventsProcessContactDoubleClick : function (hContact:THANDLE):int; cdecl;
- pfnEventsProcessTrayDoubleClick : function (_para1:int):int; cdecl;
-
- (* clistmod.c *)
- pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:THANDLE):int; cdecl;
- pfnShowHide : function (_para1:WPARAM; _para2:LPARAM):int; cdecl;
- pfnGetStatusModeDescription : function (mode:int; flags:int):TChar; cdecl;
-
- (* clistsettings.c *)
- pfnGetCacheEntry : function (hContact:THANDLE):PClcCacheEntryBase; cdecl;
- pfnCreateCacheItem : function (hContact:THANDLE):PClcCacheEntryBase; cdecl;
- pfnCheckCacheItem : procedure (_para1:PClcCacheEntryBase); cdecl;
- pfnFreeCacheItem : procedure (_para1:PClcCacheEntryBase); cdecl;
-
- pfnGetContactDisplayName : function (hContact:THANDLE; mode:int):TChar; cdecl;
- pfnInvalidateDisplayNameCacheEntry : procedure (hContact:THANDLE); cdecl;
-
- (* clisttray.c *)
- pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar;
- szPreferredProto:PAnsiChar); cdecl;
- pfnTrayIconUpdateBase : procedure (szChangedProto:PAnsiChar); cdecl;
- pfnTrayIconSetToBase : procedure (szPreferredProto:PAnsiChar); cdecl;
- pfnTrayIconIconsChanged : procedure ; cdecl;
- pfnTrayIconPauseAutoHide : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
- pfnTrayIconProcessMessage : function (wParam:WPARAM; lParam:LPARAM):pint; cdecl;
- pfnCListTrayNotify : function (_para1:PMIRANDASYSTRAYNOTIFY):int; cdecl;
-
- (* clui.c *)
- pfnContactListWndProc:function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
-
- pfnCluiProtocolStatusChanged : procedure (status:int; szProto:PAnsiChar); cdecl;
- pfnDrawMenuItem : procedure (_para1:PDRAWITEMSTRUCT; _para2:HICON;
- _para3:HICON); cdecl;
- pfnLoadCluiGlobalOpts : procedure ; cdecl;
- pfnInvalidateRect : function (hwnd:HWND; var lpRect:TRECT; bErase:BOOL):BOOL; cdecl;
- pfnOnCreateClc : procedure ; cdecl;
-
- (* contact.c *)
- pfnChangeContactIcon : procedure (hContact:THANDLE; iIcon:int; add:int); cdecl;
- pfnLoadContactTree : procedure ; cdecl;
- pfnCompareContacts : function (var contact1:ClcContact; var contact2:ClcContact):int; cdecl;
- pfnSortContacts : procedure ; cdecl;
- pfnSetHideOffline : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
-
- (* docking.c *)
- pfnDocking_ProcessWindowMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
-
- (* group.c *)
- pfnGetGroupName : function (idx:int; var pdwFlags:DWORD):TChar; cdecl;
- pfnRenameGroup : function (groupID:int; newName:TChar):int; cdecl;
-
- (* keyboard.c *)
- pfnHotKeysRegister : function (hwnd:HWND):int; cdecl;
- pfnHotKeysUnregister : procedure (hwnd:HWND); cdecl;
- pfnHotKeysProcess : function (hwnd:HWND; wParam:WPARAM; lParam:LPARAM):int; cdecl;
- pfnHotkeysProcessMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
-
- (*************************************************************************************
- * version 2 - events processing
- *************************************************************************************)
-
- events : EventList;
-
- pfnCreateEvent : function :PCListEvent; cdecl;
- pfnFreeEvent : procedure (_para1:PCListEvent); cdecl;
-
- pfnAddEvent : function (_para1:PCLISTEVENT):PCListEvent; cdecl;
- pfnGetEvent : function (hContact:THANDLE; idx:int):PCLISTEVENT; cdecl;
-
- pfnRemoveEvent : function (hContact:THANDLE; hDbEvent:THANDLE):int; cdecl;
- pfnGetImlIconIndex : function (hIcon:HICON):int; cdecl;
-
- (*************************************************************************************
- * version 3 additions
- *************************************************************************************)
-
- pfnGetWindowVisibleState : function (hWnd:HWND; iStepX:int; iStepY:int):int; cdecl;
-
- (*************************************************************************************
- * version 4 additions (0.7.0.x) - genmenu
- *************************************************************************************)
-
- menuProtos : PMenuProto;
- menuProtoCount : int;
-
- hPreBuildStatusMenuEvent : THANDLE;
- currentStatusMenuItem : int;
- currentDesiredStatusMode : int;
- bDisplayLocked : BOOL;
-
- pfnGetProtocolMenu : function (_para1:PAnsiChar):HGENMENU; cdecl;
- pfnStub2 : function (_para1:int):int; cdecl;
-
- pfnGetProtocolVisibility : function (_para1:PAnsiChar):int; cdecl;
- pfnGetProtoIndexByPos : function (var proto:PPROTOCOLDESCRIPTOR;
- protoCnt:int; Pos:int):int; cdecl;
- pfnReloadProtoMenus : procedure ; cdecl;
-
- (*************************************************************************************
- * version 5 additions (0.7.0.x) - tray icons
- *************************************************************************************)
-
- trayIcon : PtrayIconInfo_t;
- trayIconCount : int;
- shellVersion : int;
- cycleTimerId : int;
- cycleStep : int;
- szTip : TChar;
- bTrayMenuOnScreen : BOOL;
-
- pfnGetIconFromStatusMode : function (hContact:THANDLE; szProto:PAnsiChar;
- status:int):HICON; cdecl;
-
- pfnInitTray : procedure ; cdecl;
- pfnTrayIconAdd : function (hwnd:HWND; szProto:PAnsiChar; szIconProto:PAnsiChar;
- status:int):int; cdecl;
- pfnTrayIconDestroy : function (hwnd:HWND):int; cdecl;
- pfnTrayIconInit : function (hwnd:HWND):int; cdecl;
- pfnTrayIconMakeTooltip : function (szPrefix:TChar; szProto:PAnsiChar):TChar; cdecl;
- pfnTrayIconRemove : procedure (hwnd:HWND; szProto:PAnsiChar); cdecl;
- pfnTrayIconSetBaseInfo : function (hIcon:HICON; szPreferredProto:PAnsiChar):int; cdecl;
- pfnTrayIconTaskbarCreated : procedure (hwnd:HWND); cdecl;
- pfnTrayIconUpdate : function (hNewIcon:HICON; szNewTip:TChar;
- szPreferredProto:PAnsiChar; isBase:int):int; cdecl;
-
- pfnUninitTray : procedure ; cdecl;
- pfnLockTray : procedure ; cdecl;
- pfnUnlockTray : procedure ; cdecl;
-
- pfnTrayCycleTimerProc : procedure(hwnd:HWND;message:uint;idEvent:pint;dwTime:DWORD); stdcall;
-
- (*************************************************************************************
- * version 6 additions (0.8.0.x) - accounts
- *************************************************************************************)
- pfnGetAccountIndexByPos : function (pos:int):int; cdecl;
- end;
-
-{
-var
- cli : CLIST_INTERFACE;cvar;external;
-}
-
-{$ELSE}
-
-function IsHContactGroup(h:THANDLE):bool;
-begin
- result:=(h xor HCONTACT_ISGROUP)<(HCONTACT_ISGROUP xor HCONTACT_ISINFO);
-end;
-function IsHContactInfo(h:THANDLE):bool;
-begin
- result:=(h and HCONTACT_ISINFO)=HCONTACT_ISINFO;
-end;
-function IsHContactContact(h:THANDLE):bool;
-begin
- result:=(h and HCONTACT_ISGROUP)=0;
-end;
-
-function CLCDEFAULT_BKCOLOUR:dword;
-begin
- result:=GetSysColor(COLOR_3DFACE);
-end;
-function CLCDEFAULT_TEXTCOLOUR:dword;
-begin
- result:=GetSysColor(COLOR_WINDOWTEXT);
-end;
-function CLCDEFAULT_SELBKCOLOUR:dword;
-begin
- result:=GetSysColor(COLOR_HIGHLIGHT);
-end;
-function CLCDEFAULT_SELTEXTCOLOUR:dword;
-begin
- result:=GetSysColor(COLOR_HIGHLIGHTTEXT);
-end;
-function CLCDEFAULT_HOTTEXTCOLOUR:dword;
-begin
-{
- if IsWinVer98Plus then
- result:=RGB(0,0,255)
- else
-}
- result:=GetSysColor(COLOR_HOTLIGHT);
-end;
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_clui.inc b/delphi/Awkward/include/m_clui.inc
deleted file mode 100644
index 1edd114..0000000
--- a/delphi/Awkward/include/m_clui.inc
+++ /dev/null
@@ -1,243 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CLUI}
-{$DEFINE M_CLUI}
-
-{<</
- this header was created for use for v0.1.1.0, most of it's UI related
- stuff and you probably don't need to call it, see m_clist.inc instead.
- -- There are some functions that were implemented in v0.1.2.0 though
-/>>}
-
-const
- {
- wParam : 0
- lParam : 0
- Affects: Returns a window handle for the contact list window, see notes
- Returns: ""
- Notes : This call has a very specific purpose internally Miranda
- and shouldn't be used gratuitously, in almost all cases
- there's another call to do whatever it is that you're
- trying to do.
- }
- MS_CLUI_GETHWND:PAnsiChar = 'CLUI/GetHwnd';
-
- //get ContactTree hwnd
- MS_CLUI_GETHWNDTREE:PAnsiChar = 'CLUI/GetHwndTree';
-
- {
- wParam : new status
- lParam : null terminated string to a protocol ID
- Affects: Change the protocol specific status indicators, see notes!
- Returns: 0 on success, [non zero] on failure
- Notes : protocol modules don't want to call this, they want
- clist/protocolstatuschanged instead
- }
- MS_CLUI_PROTOCOLSTATUSCHANGED:PAnsiChar = 'CLUI/ProtocolStatusChanged';
-
- {
- wParam : Handle to a group
- lParam : 1 or 0
- Affect : A new group was created, add it to the list, see notes
- Notes : lParam is set to 1 or 0 if the user just created
- the group or not.
- -
- this is also called when the contact list is being rebuilt,
- new groups are always created with the name 'New group'
- }
- MS_CLUI_GROUPADDED:PAnsiChar = 'CLUI/GroupCreated';
-
- {
- wParam : HCONTACT
- lParam : ICON_ID
- Affect : Change the icon for a contact, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : ICON_ID is an offset in the imagelist, see clist/geticonsimagelist
- }
- MS_CLUI_CONTACTSETICON:PAnsiChar = 'CLUI/ContactSetIcon';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Remove a contact from the list, see notes
- Returns: 0 on success, [non zereo] on failure
- Notes : this contact is NOT actually being deleted, since if
- a contact goes offline while 'hide offline' option is sset,
- this service will be called then ALSO
- }
- MS_CLUI_CONTACTDELETED:PAnsiChar = 'CLUI/ContactDeleted';
-
- {
- wParam : HCONTACT
- lParam : ICON_ID
- Affect : Add a contact to the list, see note
- returns: 0 on success, [non zero] on failure
- Notes : the caller processes the 'hide offline' setting, so the callee
- should not do further processing based on the value of this setting
- -
- WARNING: this will be called to re-add a contact when they come
- online if 'hide offline' is on, but it cannot determine if
- the contact is already on the list, so you may get requests to
- add a contact when it is already on the list, which you should ignore.
- -
- You'll also get this whenever an event is added for a contact,
- since if the contact was offline, it needs to be shown to
- display the mesage, even if 'hide offlines' is on.
- -
- you should not resort the list on this call, a seperate resort
- request will be sent.
- -
- ICON_ID is an offset in the image list, see clist/geticonsimagelist
-
- }
- MS_CLUI_CONTACTADDED:PAnsiChar = 'CLUI/ContactAdded';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Reename a contact in the lists, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : You should not re-sort the list on this call, a separate resort
- request will be sent, you can get the new name from clist/getcontactdisplayname
- }
- MS_CLUI_CONTACTRENAMED:PAnsiChar = 'CLUI/ContactRenamed';
-
- {
- wParam : 0
- lParam : 0
- Affect : Start a rebuild of the contact list, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : this is the cue to clear the existing content of the list
- expect to get a series of :
-
- clui/groupadded
- clui/contactadded
- clui/resortlist
- }
- MS_CLUI_LISTBEGINREBUILD:PAnsiChar = 'CLUI/ListBeginRebuild';
-
- {
- wParam : 0
- lParam : 0
- Affect : End a rebuild of the contact list, see notes
- Returns: 0 on success, [non zero] on error
- Notes : if you dissplayed an hourglass in beginbuild, set it back
- here, you do not need to explicitly sort the list
- }
- MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild';
-
- {
- wParam : 0
- lParam : 0
- Affect : Sort the contact list now, see notes
- Returns: 0 success, [non zero] on failure
- Notes : Sorts are buffered so you won't get this message lots of times
- if the lists needs to be resorted many times rapidly
- }
- MS_CLUI_SORTLIST:PAnsiChar = 'CLUI/SortList';
-
- {
- wParam : CLUICAPS_*
- lParam : 0
- Affect : Gets a load of capabilites for the loaded CLUI, see notes
- Returns: the requested value, 0 of wParam is unknown --
- if this service is not implemented it is assumed all return
- values will be 0.
- Version: v0.1.2.1+
- }
-{
- CLUIF2_PLUGININFO = 1; // returns pointer to plugininfo
- CLUIF2_CLISTTYPE = 2; // the genaration of list in chronologic
- // modern layered return 0x07 (assuming classic,
- // mw, meta, nicer1, modern1, nicer++, modernLayered)
- // +0x0100 for unicode
- CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to
- // be set in main window
- CLUIF2_USEREXTRASTART = 4; // return index of first 'advanced' image except
- // Adv1 and Adv2
-}
- // can only provide this flag to return the following set of caps, the strings
- // show the database setting/type to store the list option, changing the value
- // does not reflect what the change is, i.e. ontop can only be affected with
- // a call to SetWindowPos()
- CLUICAPS_FLAGS1 = 0;
- // empty groups aren't shown, 'CList/HideEmptyGroups' (byte) [changes make the list reload]
- CLUIF_HIDEEMPTYGROUPS = 1;
- // groups can be disabled, lists can be merged into one seamlessly, (byte) 'CList/UseGroups'
- CLUIF_DISABLEGROUPS = 2;
- // list can be displayed 'on top' of all other windows, 4 (byte) 'CList/OnTop'
- CLUIF_HASONTOPOPTION = 4;
- // can disappear after a while of inactive use,
- // (byte) 'CList/AutoHide' (word) 'CList/HideTime'
- CLUIF_HASAUTOHIDEOPTION = 8;
-
- CLUICAPS_FLAGS2 = 1; // Returns info about extra icons
- // HIWORD is the first extra icon number, LOWORD is the extra icons count
-
-//LPARAMS for CLUICAPS_FLAGS1
- CLUIF2_PLUGININFO = 1; //returns pointer to plugininfo
- CLUIF2_CLISTTYPE = 2; // the genaration of list in chronologic
-// modern layered return 0x07
-// (assuming classic, mw, meta, nicer1, modern1, nicer++, modernLayered)
-// +0x0100 for unicode
- CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to be set in main window
- CLUIF2_USEREXTRASTART = 4; // return index of first 'advanced' image except Adv1 and Adv2
-
- MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps';
-
- {
- wParam : HCONTACT
- lParam : MAKELPARAM(screenX, screenY)
- Affect : A contact is being dragged outside the main window
- Return : return [non zero] to show the drag cursor as "accepting" the drag
- or zero to show the circle/slash 'not allowed'
- Version: v0.1.2.0+
- }
- ME_CLUI_CONTACTDRAGGING:PAnsiChar = 'CLUI/ContactDragging';
-
- {
- wParam : HCONTACT
- lParam : MAKELPARAM(screenX, screenY)
- Affect : a contact has just been dropped outside the main window, see notes
- Notes : return non zero to stop other hooks processing this event.
- Version: v0.1.2.0+
- }
- ME_CLUI_CONTACTDROPPED:PAnsiChar = 'CLUI/ContactDropped';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : A contact that *was* being dragged outside the main window
- has gone back to the main window
- Return : always return 0
- Version: v0.1.2.1+
- }
- ME_CLUI_CONTACTDRAGSTOP:PAnsiChar = 'CLUI/ContactDragStop';
-
-// return TRUE if Clist Module Support Metacontacts
- ME_CLUI_METASUPPORT:PAnsiChar = 'CLUI/MetaContactSupport';
-
-// return pointer to PLUGININFO structure
-// MS_CLIST_GETCLISTCAPS = 'CList/GetCaps';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/m_cluiframes.inc b/delphi/Awkward/include/m_cluiframes.inc
deleted file mode 100644
index 29178a6..0000000
--- a/delphi/Awkward/include/m_cluiframes.inc
+++ /dev/null
@@ -1,324 +0,0 @@
-{
-Miranda ICQ: the free icq client for MS Windows
-Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-////////////////////////////////////
-//Extra Image Column Support +0.5.0.0
-
-//Extra columns type.
-//column arranged in this way
-//
-// [statusicon] ContactName [ADV1][ADV2][SMS][EMAIL][PROTO]
-//
-{$IFNDEF M_CLUIFRAMES}
-{$DEFINE M_CLUIFRAMES}
-
-const
- EXTRA_ICON_RES0 = 0; // only used by nicer
- EXTRA_ICON_EMAIL = 1;
- EXTRA_ICON_PROTO = 2; // used by mwclist and modern
- EXTRA_ICON_RES1 = 2; // only used by nicer
- EXTRA_ICON_SMS = 3;
- EXTRA_ICON_ADV1 = 4;
- EXTRA_ICON_ADV2 = 5;
- EXTRA_ICON_WEB = 6;
- EXTRA_ICON_CLIENT = 7;
- EXTRA_ICON_VISMODE = 8; // only used by modern
- EXTRA_ICON_RES2 = 8; // only used by nicer
- EXTRA_ICON_ADV3 = 9;
- EXTRA_ICON_ADV4 = 10;
-
- EXTRA_ICON_COUNT = 10;
-
-// DEFAULT_TITLEBAR_HEIGHT = 18;
-
-//this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
- CLS_SKINNEDFRAME = $0800;
-
-type
- PIconExtraColumn = ^TIconExtraColumn;
- TIconExtraColumn = record
- cbSize :int; //must be sizeof(IconExtraColumn)
- ColumnType:int;
- hImage :THANDLE; //return value from MS_CLIST_EXTRA_ADD_ICON
- end;
-
-const
-//Set icon for contact at needed column
-//wparam=hContact
-//lparam=pIconExtraColumn
-//return 0 on success,-1 on failure
-//
-//See above for supported columns
- MS_CLIST_EXTRA_SET_ICON:PAnsiChar = 'CListFrames/SetIconForExraColumn';
-
-//Adding icon to extra image list.
-//Call this in ME_CLIST_EXTRA_LIST_REBUILD event
-//
-//wparam=hIcon
-//lparam=0
-//return hImage on success,-1 on failure
- MS_CLIST_EXTRA_ADD_ICON:PAnsiChar = 'CListFrames/AddIconToExtraImageList';
-
- ME_CLIST_EXTRA_LIST_REBUILD:PAnsiChar = 'CListFrames/OnExtraListRebuild';
-
-//called with wparam=hContact
- ME_CLIST_EXTRA_IMAGE_APPLY:PAnsiChar = 'CListFrames/OnExtraImageApply';
-
-//called with wparam=hContact lparam=extra
- ME_CLIST_EXTRA_CLICK:PAnsiChar = 'CListFrames/OnExtraClick';
-
-//adds a frame window
-//wParam=(CLISTFrame*)
-//lParam=0
-//returns an integer, the frame id.
-type
- PCLISTFrame = ^TCLISTFrame;
- TCLISTFrame = record
- cbSize:dword;
- hWnd :hwnd;
- hIcon :HICON;
- align :int; // al flags below
- height:int; // or minSize - the actual meaning depends from type of frame
- Flags :int; // F_flags below
- name :TChar; // frame window name,will be shown in menu (DO NOT TRANSLATE)
- TBname:TChar; // titlebar caption
- // TBBackColour:COLORREF; //titlebar background colour
- end;
- PtagCLISTFrame = PCLISTFrame;
- tagCLISTFrame = TCLISTFrame;
-
-const
- F_VISIBLE = 1; // Frame visible
- F_SHOWTB = 2; // Show TitleBar
- F_UNCOLLAPSED = 4; // UnCollapse frame
- F_LOCKED = 8; // Lock Frame
- F_NOBORDER = 16; // Dont apply WS_BORDER style for window
- F_SHOWTBTIP = 32; // Show titlebar tooltip
-
- F_CANBEVERTICAL = 64; // frames can be vertical
- F_CANNOTBEHORIZONTAL = 128; // frames can NOT be horizontal F_CANBEVERTICAL have to be set
- F_NO_SUBCONTAINER = 1024; // Support skining no subcontainer needed
-
- F_SKINNED = 2048; // skinned frame (for owned subframe only)
- F_UNICODE = 32768; // Use unicode text
-
-// frame alignment
- alTop = $00000001;
- alBottom = $00000002;
- alClient = $00000004; // only one alClient frame
-
-// since 0.7.0.20
- alLeft = $00000011; // frame is vertical
- alRight = $00000012;
-
- alVertFrameMask = $00000010;
-
- FU_TBREDRAW = 1; // redraw titlebar
- FU_FMREDRAW = 2; // redraw Frame
- FU_FMPOS = 4; // update Frame position
-
- FO_FLAGS = $0001; // return set of F_VISIBLE,F_SHOWTB,F_UNCOLLAPSED,
- // F_LOCKED,F_NOBORDER,F_SHOWTBTIP
- FO_NAME = $0002; // Change m_cacheTName
- FO_TBNAME = $0003; // Change TB caption
- FO_TBSTYLE = $0004; // Change TB style
- FO_TBEXSTYLE = $0005; // Change TB exstyle
- FO_ICON = $0006; // Change icon
- FO_HEIGHT = $0007; // Change height
- FO_ALIGN = $0008; // Change align
- FO_TBTIPNAME = $0009; // Change TB tooltip
- FO_FLOATING = $000A; // Change floating mode
-
- FO_UNICODETEXT = $8000; // flag for FO_NAME,FO_TBNAME, FO_TBTIPNAME set/get lPAram as unicode wchar_t
-
-// want show tooltip for statusbar
-// wparam=(AnsiChar *)protocolname
-// lparam=0
- ME_CLIST_FRAMES_SB_SHOW_TOOLTIP:PAnsiChar = 'CListFrames/StatusBarShowToolTip';
-
-// want hide tooltip for statusbar
-// wparam=lparam=0
- ME_CLIST_FRAMES_SB_HIDE_TOOLTIP:PAnsiChar = 'CListFrames/StatusBarHideToolTip';
-
-{
- adds a frame window
- wParam=(CLISTFrame*)
- lParam=0
- returns an integer, the frame id.
-}
- MS_CLIST_FRAMES_ADDFRAME:PAnsiChar = 'CListFrames/AddFrame';
-
-// remove frame
-// wParam=Frame Id
-// lParam=0
-// window with hWnd field in CLISTFrame will be destroyed!!
- MS_CLIST_FRAMES_REMOVEFRAME:PAnsiChar = 'CListFrames/RemoveFrame';
-
-//shows all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
- MS_CLIST_FRAMES_SHOWALLFRAMES:PAnsiChar = 'CListFrames/ShowALLFrames';
-
-//shows the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
- MS_CLIST_FRAMES_SHOWALLFRAMESTB:PAnsiChar = 'CListFrames/ShowALLFramesTB';
-
-//hides the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
- MS_CLIST_FRAMES_HIDEALLFRAMESTB:PAnsiChar = 'CListFrames/HideALLFramesTB';
-
-{
- shows the frame if it is hidden,
- hides the frame if it is shown
- wParam=FrameId
- lParam = Frame number (can be shown in profile in CLUIFrames key)
- returns 0 on success, -1 on failure
- note that Frame number will be taken only if wParam == 0
-}
- MS_CLIST_FRAMES_SHFRAME:PAnsiChar = 'CListFrames/SHFrame';
-
-{
- shows the frame titlebar if it is hidden,
- hides the frame titlebar if it is shown
- wParam=FrameId
- lParam = Frame number (can be shown in profile in CLUIFrames key)
- returns 0 on success, -1 on failure
- note that Frame number will be taken only if wParam == 0
-}
- MS_CLIST_FRAMES_SHFRAMETITLEBAR:PAnsiChar = 'CListFrame/SHFrameTitleBar';
-
-{
- locks the frame if it is unlocked,
- unlock the frame if it is locked
- wParam=FrameId
- lParam = Frame number (can be shown in profile in CLUIFrames key)
- returns 0 on success, -1 on failure
- note that Frame number will be taken only if wParam == 0
-}
- MS_CLIST_FRAMES_ULFRAME:PAnsiChar = 'CListFrame/ULFrame';
-
-{
- collapses the frame if it is uncollapsed,
- uncollapses the frame if it is collapsed
- wParam=FrameId
- lParam = Frame number (can be shown in profile in CLUIFrames key)
- returns 0 on success, -1 on failure
- note that Frame number will be taken only if wParam == 0
-}
- MS_CLIST_FRAMES_UCOLLFRAME:PAnsiChar = 'CListFrame/UCOLLFrame';
-
-{
- trigger border flags
- wparam=frameid
- lParam = Frame number (can be shown in profile in CLUIFrames key)
- returns 0 on success, -1 on failure
- note that Frame number will be taken only if wParam == 0
-}
- MS_CLIST_FRAMES_SETUNBORDER:PAnsiChar = 'CListFrame/SetUnBorder';
-
-//trigger skinned flags
-//wparam=frameid
-//lparam=0
- MS_CLIST_FRAMES_SETSKINNED:PAnsiChar = 'CListFrame/SetSkinnedFrame';
-
-{
- redraws the frame
- wParam=FrameId, -1 for all frames
- lparam=FU_flags
- returns a pointer to option, -1 on failure
-}
- MS_CLIST_FRAMES_UPDATEFRAME:PAnsiChar = 'CListFrame/UpdateFrame';
-
-{
- gets the frame options
- (HIWORD)wParam=FrameId
- (LOWORD)wParam=FO_flag
- lParam=0
- returns a pointer to option, -1 on failure
-}
- MS_CLIST_FRAMES_GETFRAMEOPTIONS:PAnsiChar = 'CListFrame/GetFrameOptions';
-
-//sets the frame options
-//(HIWORD)wParam=FrameId
-//(LOWORD)wParam=FO_flag
-//lParam=value
-//returns 0 on success, -1 on failure
- MS_CLIST_FRAMES_SETFRAMEOPTIONS:PAnsiChar = 'CListFrame/SetFrameOptions';
-
-//menu stuff
-
-{
- add a new item to the context frame menu
- wParam=0
- lParam=(LPARAM)(CLISTMENUITEM*)&mi
- returns a handle to the new item
- popupposition=frameid
- contactowner=advanced parameter
-}
- MS_CLIST_ADDCONTEXTFRAMEMENUITEM:PAnsiChar = 'CList/AddContextFrameMenuItem';
-
-{
- remove a item from context frame menu
- wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVECONTEXTFRAMEMENUITEM:PAnsiChar = 'CList/RemoveContextFrameMenuItem';
-
-{
- builds the context menu for a frame
- wparam=frameid
- lParam=0
- returns a HMENU on success, or NULL on failure
-}
- MS_CLIST_MENUBUILDFRAMECONTEXT:PAnsiChar = 'CList/BuildContextFrameMenu';
-
-{
-//the frame menu is about to be built
-wparam=frameid
-lparam=
--1 for build from titlebar,
- use
- MS_CLIST_ADDCONTEXTFRAMEMENUITEM
- MS_CLIST_REMOVECONTEXTFRAMEMENUITEM
-
->0 for build in main menu,
-must be popupname=lparam to place your items in right popup of main menu.
- use
- MS_CLIST_ADDMAINMENUITEM
- MS_CLIST_REMOVEMAINMENUITEM
-
-}
- ME_CLIST_PREBUILDFRAMEMENU:PAnsiChar = 'CList/PreBuildFrameMenu';
-
-//needed by cluiframes module to add frames menu to main menu.
-//it just calls NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam);
- MS_CLIST_FRAMEMENUNOTIFY:PAnsiChar = 'CList/ContextFrameMenuNotify';
-
-//#define FONTID_STATUS 8
-//#define FONTID_FRAMETITLE 9
-
-//#undef FONTID_MAX
-//#define FONTID_MAX 9
-
-// ME_CLIST_PREBUILDSTATUSMENU = 'CList/PreBuildStatusMenu';
-// MS_CLIST_ADDSTATUSMENUITEM = 'CList/AddStatusMenuItem';
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_contacts.inc b/delphi/Awkward/include/m_contacts.inc
deleted file mode 100644
index cef88c4..0000000
--- a/delphi/Awkward/include/m_contacts.inc
+++ /dev/null
@@ -1,112 +0,0 @@
-{
-Miranda IM
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CONTACTS}
-{$DEFINE M_CONTACTS}
-type
- PCONTACTINFO = ^TCONTACTINFO;
- TCONTACTINFO = record
- cbSize : int;
- dwFlag : Byte;
- hContact: THandle;
- szProto : PAnsiChar;
- _type : Byte;
- retval: record // in C this is a nameless union
- case longint of
- 0: (bVal : Byte);
- 1: (wVal : WORD);
- 2: (dVal : DWORD);
- 3: (szVal : TChar);
- 4: (cchVal: Word);
- end;
- end;
-
-const
-
-// CNF_* Types of information you can retreive by setting the dwFlag in CONTACTINFO
-
- CNF_FIRSTNAME = 1; // returns first name (string)
- CNF_LASTNAME = 2; // returns last name (string)
- CNF_NICK = 3; // returns nick name (string)
- CNF_CUSTOMNICK = 4; // returns custom nick name, clist name (string)
- CNF_EMAIL = 5; // returns email (string)
- CNF_CITY = 6; // returns city (string)
- CNF_STATE = 7; // returns state (string)
- CNF_COUNTRY = 8; // returns country (string)
- CNF_PHONE = 9; // returns phone (string)
- CNF_HOMEPAGE = 10; // returns homepage (string)
- CNF_ABOUT = 11; // returns about info (string)
- CNF_GENDER = 12; // returns gender (byte,'M','F' character)
- CNF_AGE = 13; // returns age (byte, 0==unspecified)
- CNF_FIRSTLAST = 14; // returns first name + last name (string)
- CNF_UNIQUEID = 15; // returns uniqueid, protocol username (must check type for type of return)
- CNF_FAX = 18; // returns fax (string)
- CNF_CELLULAR = 19; // returns cellular (string)
- CNF_TIMEZONE = 20; // returns timezone (string)
- CNF_MYNOTES = 21; // returns user specified notes (string)
- CNF_BIRTHDAY = 22; // returns birthday day of month (byte)
- CNF_BIRTHMONTH = 23; // returns birthday month (byte)
- CNF_BIRTHYEAR = 24; // returns birthday year (word)
- CNF_STREET = 25; // returns street (string)
- CNF_ZIP = 26; // returns zip code (string)
- CNF_LANGUAGE1 = 27; // returns language1 (string)
- CNF_LANGUAGE2 = 28; // returns language2 (string)
- CNF_LANGUAGE3 = 29; // returns language3 (string)
- CNF_CONAME = 30; // returns company name (string)
- CNF_CODEPT = 31; // returns company department (string)
- CNF_COPOSITION = 32; // returns company position (string)
- CNF_COSTREET = 33; // returns company street (string)
- CNF_COCITY = 34; // returns company city (string)
- CNF_COSTATE = 35; // returns company state (string)
- CNF_COZIP = 36; // returns company zip code (string)
- CNF_COCOUNTRY = 37; // returns company country (string)
- CNF_COHOMEPAGE = 38; // returns company homepage (string)
- CNF_DISPLAYUID = 39; // returns uniqueid to display in interface (must check type for type of return)
-
-// Special types
-// Return the custom name using the name order setting
-// IMPORTANT: When using CNF_DISPLAY you MUST free the string returned
-// You must **NOT** do this from your version of free() you have to use Miranda's free()
-// you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
- CNF_DISPLAY = 16;
-// Same as CNF_DISPLAY except the custom handle is not used
-// IMPORTANT: When using CNF_DISPLAYNC you MUST free the string returned
-// You must **NOT** do this from your version of free() you have to use Miranda's free()
-// you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
- CNF_DISPLAYNC = 17;
-
-// Add this flag if you want to get the Unicode info
- CNF_UNICODE = $80;
-
-// If MS_CONTACT_GETCONTACTINFO returns 0 (valid), then one of the following
-// types is setting telling you what type of info you received
- CNFT_BYTE = 1;
- CNFT_WORD = 2;
- CNFT_DWORD = 3;
- CNFT_ASCIIZ = 4;
-
- {
- wParam : not used
- lParam : Pointer to an initialised TCONTACTINFO structure
- affects: Get contact information
- returns: Zero on success, non zero on failure.
- notes : If successful, the type is set and the result is put into the associated member of TCONTACTINFO
- }
- MS_CONTACT_GETCONTACTINFO:PAnsiChar = 'Miranda/Contact/GetContactInfo';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_database.inc b/delphi/Awkward/include/m_database.inc
deleted file mode 100644
index 807325c..0000000
--- a/delphi/Awkward/include/m_database.inc
+++ /dev/null
@@ -1,711 +0,0 @@
-{$IFNDEF M_DATABASE}
-{$DEFINE M_DATABASE}
-
-const
- DBVT_DELETED = 0; // setting got deleted, no values are valid
- DBVT_BYTE = 1; // bVal, cVal are valid
- DBVT_WORD = 2; // wVal, sVal are valid
- DBVT_DWORD = 4; // dVal, lVal are valid
- DBVT_ASCIIZ = 255; // pszVal is valid
- DBVT_BLOB = 254; // cpbVal and pbVal are valid
- DBVT_UTF8 = 253; // pszVal is valid
- DBVT_WCHAR = 252; // pszVal is valid
- DBVTF_VARIABLELENGTH = $80; // ?
- DBVTF_DENYUNICODE = $10000;
-
-type
- HDBEVENT = Integer;
- PDBVARIANT = ^TDBVARIANT;
- TDBVARIANT = record
- _type: Byte;
- case LongInt of
- 0: (bVal: Byte);
- 1: (cVal: AnsiChar);
- 2: (wVal: Word);
- 3: (sVal: ShortInt);
- 4: (dVal: LongInt);
- 5: (lVal: Integer);
- 6: (
- szVal : TChar;
- cchVal: Word;
- );
- 7: (
- cpbVal: Word;
- pbVal : PByte;
- );
- end;
-
-const
- {
- wParam : size of the buffer to be filled
- lParam : pointer to the buffer to be filled
- affect : Get's the name of the current profile being used by the database
- module -- this is the same as the filename of the profile without
- the .ext
- return : 0 on success, non zero on failure
- }
- MS_DB_GETPROFILENAME:PAnsiChar = 'DB/GetProfileName';
-
- {
- wParam : size of buffer pointed to by lParam
- lParam : pointer to a buffer to be filled
- affect : Fill a buffer with the current profile path being used, this does not include the trailing backslash.
- return : 0 on success, non zero on failure
- version: 0.3a only
- }
- MS_DB_GETPROFILEPATH:PAnsiChar = 'DB/GetProfilePath';
-
-type
- PDBCONTACTGETSETTING = ^TDBCONTACTGETSETTING;
- TDBCONTACTGETSETTING = record
- szModule : PAnsiChar; // name of the module that wrote the setting to get
- szSetting: PAnsiChar; // the name of the setting to get
- pValue : PDBVARIANT; // pointer to DBVARIANT to receive the value
- end;
-
- PDBCONTACTWRITESETTING = ^TDBCONTACTWRITESETTING;
- TDBCONTACTWRITESETTING = record
- szModule : PAnsiChar; // module sig to write this setting under
- szSetting: PAnsiChar; // setting name to write
- value : TDBVARIANT; // variant containing value to set
- end;
-
-const
- {
- wParam : Handle of a contact to get the setting for (see notes)
- lParam : pointer to a TDBCONTACTGETSETTING structure to be filled with setting
- this structure also has to be initalised (see notes)
- affect : Queries the database module for a setting from a contact.
- returns: 0 on success, non zero on failure (contact not found, setting doesn't exist)
- notes : TDBCONTACTGETSETTING must be filled with the module name that created
- /wrote the setting you want to get (e.g. your module name)
- and the actual setting to read with TDBCONTACTGETSETTING.szModule and
- TDBCONTACTGETSETTING.szSetting -- TDBCONTACTGETSETTING.pValue is
- a pointer to a TDBVARIANT with the returned setting, this maybe nil
- and MUST be freed after you're done with it with FreeVariant()
-
- There are helper functions for reading/writing/deleting common types to and
- from the database -- see DBGetContactSetting<type>
-
- the contact handle (hContact) can be returned by FindContact/AddContact
- }
- MS_DB_CONTACT_GETSETTING:PAnsiChar = 'DB/Contact/GetSetting';
-
- {
- DB/Contact/GetSettingString service 0.4.3+
- Same as DB/Contact/GetSetting, but also gets the required string type
- inside the dbcgs->type parameter
- }
- MS_DB_CONTACT_GETSETTING_STR:PAnsiChar = 'DB/Contact/GetSettingStr';
-
- {
- wParam : Handle for a contact to query a setting for
- lParam : Pointer to a TDBCONTACTGETSETTING structure
- affects: This service is almost the same as the one above, but it does
- not return a dynamic copy (with malloc()) -- the caller
- must do this for datatypes which require it, e.g. a string.
-
- This means the TDBCONTACTGETSETTING.pValue *has* to exist and be
- allocated by the caller (doesn't have to be allocated from the heap)
- the DBVARIANT structure has to be initalised with the type wanted
- and enough buffer space around to return the info, do not
- expect this service to be as fast as the one above.
-
- returns: 0 on success, non zero on failure.
- }
- MS_DB_CONTACT_GETSETTINGSTATIC:PAnsiChar = 'DB/Contact/GetSettingStatic';
-
- {
- wParam : 0
- lParam : Pointer to a TDBVARIANT structure
- affect : Free's the passed DBVARIANT's dynamic memory (if any) see notes
- returns: 0 on success, non zero on failure
- notes : use the helper function FreeVariant()
- }
- MS_DB_CONTACT_FREEVARIANT:PAnsiChar = 'DB/Contact/FreeVariant';
-
- {
- wParam : Handle to contact to write setting for
- lParam : Pointer to TDBCONTACTWRITESETTING which must be initalised
- affects: writes a setting under a contact -- TDBCONTACTWRITESETTING structure
- must contain the module name writing -- the setting name, and the value
- to write (which is NOT a pointer) .szModule, .szSetting, .Value, see notes
- returns: 0 on success, non zero on failure
- notes : this service triggers 'DB/Contact/SettingChanged' before it returns
- as always, there is a helper function to use this service.
- }
- MS_DB_CONTACT_WRITESETTING:PAnsiChar = 'DB/Contact/WriteSetting';
-
- {
- wParam : hContact under which the setting should be deleted
- lParam : Pointer to a TDBCONTACTGETSETTING structure
- affects: Deletes the given setting for a contact, the TDBCONTACTGETSETTING.pValue
- field is ignored -- only .szModule and .szSetting are needed, see notes
- returns: 0 on success, non zero on failure
- notes : triggers 'DB/Contact/SettingChanged' BEFORE it deletes the given
- setting, when the service returns the TDBVARIANT structure .type_ is set
- to 0 and no fields are valid, there is a helper function for this
- service, see below.
- }
- MS_DB_CONTACT_DELETESETTING:PAnsiChar = 'DB/Contact/DeleteSetting';
-
- {
- wParam : Handle of a contact to enum settings for
- lParam : Pointer to a TDBCONTACTENUMSETTINGS structure, must be initalised
- affect : Enumerates all settings for a given contact under a module,
- TDBCONTACTENUMSETTINGS must be filled with the function pointer to call
- the TDBCONTACTENUMSETTINGS.lParam value to pass to it each time,
- as well as the .szModule under which the contact is valid
- returns: returns the value of the last call to the enum function, or -1
- if no settings could be enumerated
- notes : the szSetting argument passed to the enumeration function is only
- valid for the duration of that enumeration call,
- it must be allocated dynamically if it is required after that call frame
- has returned.
- Also, deleting settings as they are enumerated has unpredictable results!
- but writing a new value for a setting is okay.
- it is unclear how you stop the enumeration once it is started, maybe
- possible to return -1 to stop it.
- vesion : only valid for 0.1.0.1+
- }
-
-type
- TDBSETTINGENUMPROC = function(const szSetting: PAnsiChar; lParam: LPARAM): int; cdecl;
-
- PDBCONTACTENUMSETTINGS = ^TDBCONTACTENUMSETTINGS;
- TDBCONTACTENUMSETTINGS = record
- pfnEnumProc: TDBSETTINGENUMPROC; // function pointer to call to start the
- // enum via MS_DB_CONTACT_ENUMSETTINGS
- lParam : LPARAM; // passed to the above function
- szModule : PAnsiChar; // name of the module to get settings for
- ofsSettings: DWORD; // not used by us
- end;
-
-const
- MS_DB_CONTACT_ENUMSETTINGS:PAnsiChar = 'DB/Contact/EnumSettings';
-
- {
- wParam : 0
- lParam : 0
- affect : none
- returns: Returns the number of contacts in the database for the loaded profile
- not including the profile user, see notes.
- notes : the contacts in the database can be read with FindFirst/FindNext
- }
- MS_DB_CONTACT_GETCOUNT:PAnsiChar = 'DB/Contact/GetCount';
-
- {
- wParam : 0
- lParam : 0
- returns: Returns a handle to the first contact in the database,
- this handle does not need to be closed, if there are no users
- NULL(0) is returned.
- }
- MS_DB_CONTACT_FINDFIRST:PAnsiChar = 'DB/Contact/FindFirst';
-
- {
- wParam : Contact handle
- lParam : 0
- returns: Returns a handle to the next contact after the given contact in
- wParam, this handle does not neeed to be closed -- may return NULL(0)
- if the given contact in wParam was the last in the database, or the
- given contact was invalid
- }
- MS_DB_CONTACT_FINDNEXT:PAnsiChar = 'DB/Contact/FindNext';
-
- {
- wParam : Handle of a contact to delete
- lParam : 0
- affect : the user by the given handle is deleted from the database, see notes
- returns: Returns 0 on success or nonzero if the handle was invalid
- notes : this triggers DB/Contact/Deleted BEFORE it actually deletes the contact
- all events are also deleted -- other modules may end up with invalid
- handles because of this, which they should be prepared for.
- }
- MS_DB_CONTACT_DELETE:PAnsiChar = 'DB/Contact/Delete';
-
- {
- wParam : 0
- lParam : 0
- affects: creates a new contact in the database, they have no settings,
- settings must be added with MS_DB_CONTACT_WRITESETTING or
- database helper functions for writing, see notes
- returns: A handle to a new contact or NULL(0) on failure.
- notes : triggers the ME_DB_CONTACT_ADDED event just before the service returns
- }
- MS_DB_CONTACT_ADD:PAnsiChar = 'DB/Contact/Add';
-
-
- {
- wParam : (HANDLE) hContact
- lParam : 0
- affects: Checks the given handle within the database for valid information, for
- a proper internal header.
- returns: Returns 1 if the contact handle is valid, 0 if it is not
- notes : Due to the nature of multiple threading a contact handle can be deleted
- soon after this service has returned a handle as valid, however it will never point
- to another contact.
- }
- MS_DB_CONTACT_IS:PAnsiChar = 'DB/Contact/Is';
-
-//************************** Event *********************************
-
-{ DB/EventType/Register service (0.7+)
-Registers the specified database event type, with module, id & description.
-When someone needs to retrieve an event's text, a service named Module/GetEventText<id>
-will be called. For example, for module named 'foo' and event id 2000 a service
-foo/GetEventText2000 should be defined to process this request. That handler should
-decode a blob and return the event text in the required format, its prototype is identical
-to a call of MS_DB_EVENT_GETTEXT (see below)
- wParam=0
- lParam=(LPARAM)(DBEVENTTYPEDESCR*)
-Always returns 0.
-}
-
-type
- TDBEVENTTYPEDESCR = record
- cbSize :int; // structure size in bytes
- module :PAnsiChar; // event module name
- eventType :int; // event id, unique for this module
- descr :PAnsiChar; // event type description (i.e. "File Transfer")
- textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
- iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
- eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
- flags :DWORD; // flags, combination of the DETF_*
- end;
-
-const
-// constants for default event behaviour
- DETF_HISTORY = 1; // show event in history
- DETF_MSGWINDOW = 2; // show event in message window
- DETF_NONOTIFY = 4; // block event notify (e.g. Popups)
-
-const
- DBEVENTTYPEDESCR_SIZE = sizeof(TDBEVENTTYPEDESCR);
- DBEVENTTYPEDESCR_SIZE_V1 = $10;
-
-const
- MS_DB_EVENT_REGISTERTYPE:PAnsiChar = 'DB/EventType/Register';
-
- { DB/EventType/Get service (0.7+)
- Retrieves the previously registered database event type, by module & id.
- wParam=(WPARAM)(AnsiChar*)szModule
- lParam=(LPARAM)(int)eventType
- Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found.
- }
- MS_DB_EVENT_GETTYPE:PAnsiChar = 'DB/EventType/Get';
-
- {
- wParam : contact handle for events count is needed
- lParam : 0
- service: Gets the number of events in the chain belonging to a contact
- in the databasee.
- returns: the numbef of events owned by hContact or -1 if hContact
- is invalid, they can be found with the event/find* servicees
- }
- MS_DB_EVENT_GETCOUNT:PAnsiChar = 'DB/Event/GetCount';
-
- {
- wParam : contact handle to add an event for
- lParam : Pointer to TDBEVENTINFO initialised with data
- affect : Add's an event to the contact's event list, the TDBEVENTINFO
- structure should be filled with the event of message -- see notes
- returns: a handle to a DB event (HDBEVENT), or NULL on error
- notes : Triggers DB/Event/Added event just before it returns,
- Events are sorted chronologically as they are entered,
- so you cannot guarantee that the new hEvent is the last event in the chain,
- however if a new event is added that has a timestamp less than
- 90 seconds *before* the event that should be after it,
- it will be added afterwards, to allow for protocols that only
- store times to the nearest minute, and slight delays in transports.
- There are a few predefined eventTypes below for easier compatibility, but
- modules are free to define their own, beginning at 2000
- DBEVENTINFO.timestamp is in GMT, as returned by time()
- }
-
- DBEF_FIRST = 1; // internally only, do not use
- DBEF_SENT = 2; // if set, the event was sent by the user, otherwise it was received
- DBEF_READ = 4; // event has been read by the user -- only needed for history
- DBEF_RTL = 8; // event contains the right-to-left aligned text
- DBEF_UTF = 16; // event contains a text in utf-8
-
- EVENTTYPE_MESSAGE = 0;
- EVENTTYPE_URL = 1;
- EVENTTYPE_CONTACTS = 2; // v0.1.2.2+
- EVENTTYPE_ADDED = 1000; // v0.1.1.0+: these used to be module-
- EVENTTYPE_AUTHREQUEST = 1001; // specific codes, hence the module-
- EVENTTYPE_FILE = 1002; // specific limit has been raised to 2000
-
-type
- PDBEVENTINFO = ^TDBEVENTINFO;
- TDBEVENTINFO = record
- cbSize : int; // size of the structure
- szModule : PAnsiChar; // module that 'owns' this event and controls the data format
- timestamp: DWORD; // timestamp in UNIX time
- flags : DWORD; // the DBEF_* flags above
- eventType: WORD; // event type, such as message, can be module defined
- cbBlob : DWORD; // size in bytes of pBlob^
- pBlob : PByte; // pointer to buffer containing the module defined event data
- end;
-
-const
- MS_DB_EVENT_ADD:PAnsiChar = 'DB/Event/Add';
-
- {
- wParam : Handle to the contact
- lParam : HDBEVENT handle to delete
- affects: Removes a single event from the database for the given contact
- returns: 0 on success, nonzero on failure
- notes : Triggers DB/Event/Deleted just before the event *is* deleted
- }
- MS_DB_EVENT_DELETE:PAnsiChar = 'DB/Event/Delete';
-
- {
- wParam : Handle to DB event
- lParam : 0
- returns: Returns the space in bytes requried to store the blob in HDBEVENT
- given by HDBEVENT(wParam) -- or -1 on error
- }
- MS_DB_EVENT_GETBLOBSIZE:PAnsiChar = 'DB/Event/GetBlobSize';
-
- {
- wParam : Handle to a DB event
- lParam : Pointer to a TDBEVENTINFO structure which must be initialised
- affects: Returns all the information about an DB event handle to a TDBEVENTINFO
- structure which must be initalised, DBEI.cbSize, DBEI.pBlob and DBEI.cbSize
- before calling this service, the size can be assertained with
- GetBlobSize() service, see notes
- returns: Returns 0 on success, non zero on failure
- notes : The correct value dbe.cbBlob can be got using db/event/getblobsize
- If successful, all the fields of dbe are filled. dbe.cbBlob is set to the
- actual number of bytes retrieved and put in dbe.pBlob
- If dbe.cbBlob is too small, dbe.pBlob is filled up to the size of dbe.cbBlob
- and then dbe.cbBlob is set to the required size of data to go in dbe.pBlob
- On return, dbe.szModule is a pointer to the database module's
- own internal list of modules. Look but don't touch.
- }
- MS_DB_EVENT_GET:PAnsiChar = 'DB/Event/Get';
-
- { DB/Event/GetText (0.7.0+)
- Retrieves the event's text
- wParam=0
- lParam=pointer to TDBEVENTGETTEXT
- dbe should be the valid database event read via MS_DB_EVENT_GET
- Only events of type EVENTTYPE_MESSAGE are supported.
- Function returns a pointer to a string in the required format.
- This string should be freed by a call of mir_free
- }
-type
- TDBEVENTGETTEXT = record
- dbei:PDBEVENTINFO;
- datatype:int; // DBVT_ASCIIZ, DBVT_WCHAR (DBVT_TCHAR)
- codepage:int;
- end;
-const
- MS_DB_EVENT_GETTEXT:PAnsiChar = 'DB/Event/GetText';
-
- { DB/Event/GetIcon (0.7.0.1+)
- wParam : flags - use LR_SHARED for shared HICON
- lParam : dbei - pointer to DBEVENTINFO
- affect : Retrieves the event's icon
- Returns: HICON (use DestroyIcon to release resources if not LR_SHARED)
- notes : dbei should be a valid database event read via MS_DB_EVENT_GET
- A plugin can register the standard event icon in IcoLib named
- 'eventicon_'+Module+EvtID,like eventicon_ICQ2001. Otherwise, to declare an icon
- with the non-standard name, you can declare the special service,
- Module/GetEventIcon<id>, which will retrieve the custom icon handle (HICON). This
- service function has the same parameters MS_DB_EVENT_GETICON does.
- }
- MS_DB_EVENT_GETICON:PAnsiChar = 'DB/Event/GetIcon';
-
-{ DB/Event/GetString (0.9.0+)
- Converts the event's string to TCHAR* depending on the event's format
- wParam=(LPARAM)(DBEVENTINFO*)dbei
- lParam=(WPARAM)(char*)str - string to be converted
- returns TCHAR* - the converted string
- Caller must free the result using mir_free
-}
-
- MS_DB_EVENT_GETSTRINGT:PAnsiChar = 'DB/Event/GetStringT';
-
- {
- wParam : HCONTACT
- lParam : HDBEVENT
- affect : Changes the flag for an event to mark it as read
- Returns: Returns the entire flag DWORD for the event after the change, or -1
- if HDBEVENT is invalid, see notes
- notes : This iss one of the database write operations that does not trigger
- an event, modules should not save flagss states for any length of time.
- }
- MS_DB_EVENT_MARKREAD:PAnsiChar = 'DB/Event/MarkRead';
-
- {
- wParam : HDBEVENT
- lParam : 0
- Affect : Returns a handle to a contact that owns the HDBEVENT,
- see notes
- Returns: Returns a handle if successful or HDBEEVENT(-1) on failure
- notes : This service is very slow, only use wheen you have no other choice
- at all.
- }
- MS_DB_EVENT_GETCONTACT:PAnsiChar = 'DB/Event/GetContact';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Retrieves a handlee to the first event in the chain
- for a HCONTACT
- returns: Returns a handle, or NULL(0) if HCONTACT is invalid or has
- no events, events in a chain are sorted chronologically automatically
- }
- MS_DB_EVENT_FINDFIRST:PAnsiChar = 'DB/Event/FindFirst';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Retrieves a handle to the first unreead event in a chain for a HCONTACT
- see notes
- Returns: Returns a HDBEVENT handle or NULL(0) if the HCONTACT is invalid
- or all it's events have beeen read.
- Notes : Events in a chain are sorted chronologically automatically,
- but this does not necessarily mean that all events after
- the first unread are unread too.
- They should be checked individually with event/findnext and event/get
- This service is designed for startup, reloading all the events that remained
- unread from last time
- }
- MS_DB_EVENT_FINDFIRSTUNREAD:PAnsiChar = 'DB/Event/FindFirstUnread';
-
- {
- wParam : HCONTACT
- lParam : 0;
- Affects: Retrieves a handle to the lasts event in the chain for a HCONTACT
- Returns: Returns a handle or NULL(0) if HCONTACT is invalid or has no events
- }
- MS_DB_EVENT_FINDLAST:PAnsiChar = 'DB/Event/FindLast';
-
- {
- wParam : HDBEVENT
- lParam : 0
- Affects: Retrieves a handle to the next event in a chain after HDBEVENT
- Returns: A handle to the next DB event or NULL(0) if HDBEVENT is invalid
- or the last event in the chain.
- }
- MS_DB_EVENT_FINDNEXT:PAnsiChar = 'DB/Event/FindNext';
-
- {
- wParam : HDBEVENT
- lParam : 0
- Affects: Retrieves a handle to the previous event in a chain before HDBEVENT
- Returns: A handle to the previous HDBEVENT or NULL(0) if HDBEVENT is invalid
- or is the first event in the chain
- }
- MS_DB_EVENT_FINDPREV:PAnsiChar = 'DB/Event/FindPrev';
-
-//************************** Encryption ****************************
-
- {
- wParam : size in bytes of string buffer (including null term)
- lParam : pointer to string buffer
- Affect : Scrambles the string buffer in place using a strange encryption algorithm,
- see notes
- Returns: Always returns 0
- notes : this service may be changed at a later date such that it increasess
- the length of the string
- }
- MS_DB_CRYPT_ENCODESTRING:PAnsiChar = 'DB/Crypt/EncodeString';
-
- {
- wParam : size in bytes of string buffer, including null term
- lParam : pointer to string buffer
- Affect : Descrambles pszString in-place using the strange encryption algorithm,
- see notes.
- Return : Always returns 0
- notes : Reverses the operation done by MS_DB_CRYPT_ENCODINGSTRING
- }
- MS_DB_CRYPT_DECODESTRING:PAnsiChar = 'DB/Crypt/DecodeString';
-
-//**************************** Time ********************************
-
- {
- wParam : timestamp (DWORD)
- lParam : 0
- Affect : Converts a GMT timestap into local time
- Returns: Returns the converted value, see notes
- Notes : Timestamps have a zereo at midnight 1/1/1970 GMT, this service
- converts such a value to be based at midnight 1/1/1970 local time.
- This service does not use a simple conversion based on the current offset
- between GMT and local. Rather, it figures out whether daylight savings time
- would have been in place at the time of the stamp and gives the local time as
- it would have been at the time and date the stamp contains.
- }
- MS_DB_TIME_TIMESTAMPTOLOCAL:PAnsiChar = 'DB/Time/TimestampToLocal';
-
- {
- wParam : timestamp (DWORD)
- lParam : pointer to initalised DBTIMETOSTRING structure
- Affect : Converts a GMT timestamp to a customisable local time string
- see notes
- Returns: Always returns 0
- notes : The string is formatted according to thhe current user's locale
- language and preference --
-
- .szFormat can have the following special chars :
- t time without seconds, e.g. hh:mm
- s time with seconds, e.g. hh:mm:ss
- m time without minutes e.g. hh
- d short date, e.g. dd/mm/yyyy
- D long date, e.g. d mmmm yyyy
-
- all other characters are copied as is.
- }
-
-type
- PDBTIMETOSTRING = ^TDBTIMETOSTRING;
- TDBTIMETOSTRING = record
- szFormat: TChar; // format string, see above
- szDest : TChar; // pointer to dest buffer to store the result
- cbDest : int; // size of the buffer
- end;
-
-const
- MS_DB_TIME_TIMESTAMPTOSTRING :PAnsiChar = 'DB/Time/TimestampToString';
- MS_DB_TIME_TIMESTAMPTOSTRINGT:PAnsiChar = 'DB/Time/TimestampToStringT';
-
-//*************************** Random *******************************
-
- {
- wParam : newSetting (BOOLEAN)
- lParam : 0
- Affect : Miranda's database is normally protected against corruption by
- aggressively flushing data to the disk on writes, if you're doing
- alot of writes e.g. an import plugin, it can sometimes be desirable
- to switch this feature off to speed up the process, if you do switch
- it off, you must remember that crashes are far more likely to be
- catastrophic, so switch it back on at the earliest possible opportunity.
- if you're doing a lot of setting writes, the flush is already delayed
- so you need not use this service for that purpose, see notes.
- Returns: Always returns 0 (successful)
- notes : This is set to true initally
- }
- MS_DB_SETSAFETYMODE:PAnsiChar = 'DB/SetSafetyMode';
-
-//*************************** Modules ******************************
-
- {
- wParam : (caller defined data) will be passed to lParam of the call back
- lParam : function pointer to TDBMODULEENUMPROC
- Affects: Enumerates the names of all modules that have stored or
- requested information from the database,
- the modules are returned in no real order --
- Writing to the database while module names are being enumerated will cause
- unpredictable results in the enumeration, but the write will work.
-
- the enumeration will stop if the callback returns a non zero value.
-
- Returns: the last return value from the enumeration call back.
- Notes : This service is only useful for debugging or EnumSettings
- version: The service registered to enumerate all modules that have touched
- the database module uses wParam as the lParam cookie value and the lParam
- value given here is the function pointer -- this is not safe
- to use before v0.1.2.1 because I don't know if this was done in v0.1.2.1-
-
- prior to v0.1.2.1 you can not pass a value to the enumeration because
- of a bug -- which is fixed, but hey :) -- [sam]
- }
-type
- TDBMODULEENUMPROC = function(const szModule: PAnsiChar; ofsModuleName: DWORD; lParam: LPARAM): int; cdecl;
-const
- MS_DB_MODULES_ENUM:PAnsiChar = 'DB/Modules/Enum';
-
-{ DB/Module/Delete 0.8.0+
-
- Removes all settings for the specified module.
- wParam=0 (unused)
- lParam=(LPARAM)(AnsiChar*)szModuleName - the module name to be deleted
-}
- MS_DB_MODULE_DELETE:PAnsiChar = 'DB/Module/Delete';
-
-//************************** EVENTS ********************************
-
- {
- wParam : HCONTACT
- lParam : HDBCONTACT
- Affect : Called when a new event has been added to the event chain
- for a contact, HCONTACT contains the contact who added the event,
- HDBCONTACT a handle to what was added.
- see notes
- notes : since events are sorted chronologically, you can not guarantee
- that HDBEVEnT is in any particular position in the chain.
-
- }
- ME_DB_EVENT_ADDED:PAnsiChar = 'DB/Event/Added';
-
- {
- wParam : HANDLE (hContact)
- lParam : @DBEVENTINFO
- Affects: Hook is fired before any DBEVENTS are created within the database for
- a contact (or a user, if hContact is NULL(0)) - It allows a module to
- query/change DBEVENTINFO before it is created, see notes.
- Returns: Hook should return 1 to stop event being added (will stop other hooks seeing the event too)
- Or 0 to continue processing (passing the data on as well)
- Notes : This hook is fired for all event types, and the BLOBS that the eventypes mark
- Maybe changed, therefore be careful about using BLOB formats.
- Because the memory pointing within the DBEVENTINFO CAN NOT BE OWNED or free()'d
- it is recommended that the hook only be used to stop events.
- Version: 0.3.3a+ (2003/12/03)
- }
- ME_DB_EVENT_FILTER_ADD:PAnsiChar = 'DB/Event/FilterAdd';
-
- {
- wParam : HCONTACT
- lParam : HDBEVENT
- Affect : Called when an event is about to be deleted from the event chain
- for a contact, see notes
- notes : Returning non zero from your hook will NOT stop the deletion,
- but it will as usual stop other hooks being called
- }
- ME_DB_EVENT_DELETED:PAnsiChar = 'DB/Event/Deleted';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Called when a new contact has been added to the database,
- HCONTACT contains a handle to the new contact.
- }
- ME_DB_CONTACT_ADDED:PAnsiChar = 'DB/Contact/Added';
-
- {
- wParam : HCONTACT
- lParam : 0
- Affect : Called when a contact is about to be deleted
- Returns: Returning nonzero from your hook will not stop the deletion
- but it will stop the other hooks from being called
- }
- ME_DB_CONTACT_DELETED:PAnsiChar = 'DB/Contact/Deleted';
-
- {
- wParam : HCONTACT
- lParam : Pointer to a TDBCONTACTWRITESETTING
- Affect : Calleed when a contact has one of it's settings changed
- hContact is a valid handle to the contact that has changed,
- see notes.
- notes : this event will be triggered many times rapidly when alot of values
- are set.
- Modules that hook this should be aware of this fact and quickly
- return if they are not interested in the value that has changed.
- Careful not to get into infinite loops with this event,
-
- The TDBCONTACTWRITESETTING pointer is the same one as the
- original service all, so don't change any of it's fields
- }
- ME_DB_CONTACT_SETTINGCHANGED:PAnsiChar = 'DB/Contact/SettingChanged';
-
- { DB/Contact/SetSettingResident service (0.6+)
- Disables a setting saving to the database.
- wParam=(WPARAM)(BOOL)bIsResident
- lParam=(LPARAM)(AnsiChar*)pszSettingName
- }
- MS_DB_SETSETTINGRESIDENT:PAnsiChar = 'DB/SetSettingResident';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_dbeditor.inc b/delphi/Awkward/include/m_dbeditor.inc
deleted file mode 100644
index 4360ee8..0000000
--- a/delphi/Awkward/include/m_dbeditor.inc
+++ /dev/null
@@ -1,33 +0,0 @@
-{$IFNDEF M_DBEDITOR}
-{$DEFINE M_DBEDITOR}
-
-const
-{
- wParam: Module name
- lParam: 0
- Affect: Register single module as 'known'
- Note: must be used after or in ME_SYSTEM_MODULESLOADED
-}
- MS_DBEDIT_REGISTERSINGLEMODULE:PAnsiChar = 'DBEditorpp/RegisterSingleModule';
-
-{
- wParam: array with module names
- lParam: count of module names
- Affect: Register modules as 'known'
- Note: must be used after or in ME_SYSTEM_MODULESLOADED
- Example:
- var mods:array [0..2] = ('Module1','Module2','Module3');
- ...
- CallService(MS_DBEDIT_REGISTERMODULE,WPARAM(@mods),3);
-
-}
- MS_DBEDIT_REGISTERMODULE:PAnsiChar = 'DBEditorpp/RegisterModule';
-
-{
- wParam: hContact
- lParam: 0
- Affect: Open user tree in DBE++
-}
- MS_DBEDIT_MENUCOMMAND:PAnsiChar = 'DBEditorpp/MenuCommand';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_descbutton.inc b/delphi/Awkward/include/m_descbutton.inc
deleted file mode 100644
index 9c12ed1..0000000
--- a/delphi/Awkward/include/m_descbutton.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2007 Artem Shpynov
-Copyright 2000-2007 Miranda ICQ/IM project,
-
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_DESCBUTTON}
-{$DEFINE M_DESCBUTTON}
-
-const
- MIRANDADESCBUTTONCLASS = 'MirandaDescButtonClass';
-
- MDBCF_SHAREDICON = $01;
- MDBCF_UNICODE = $02;
-
- DBCM_FIRST = (WM_USER+1024);
- DBCM_LAST = (DBCM_FIRST+64);
-
- DBCM_SETTITLE = (DBCM_FIRST+1); //WPARAM is set of flags, LPARAM is string pointer
- DBCM_SETDESCRIPTION = (DBCM_FIRST+2); //WPARAM is set of flags, LPARAM is string pointer
- DBCM_SETICON = (DBCM_FIRST+3); //WPARAM is set of flags, LPARAM icon handle
-
-{
-#define MDescButton_SetTitle(hwnd, title) \
- (SendMessage((hwnd), DBCM_SETTITLE, MDBCF_TCHAR, (LPARAM)(title)))
-#define MDescButton_SetDescription(hwnd, title) \
- (SendMessage((hwnd), DBCM_SETDESCRIPTION, MDBCF_TCHAR, (LPARAM)(title)))
-#define MDescButton_SetIcon(hwnd, hicon) \
- (SendMessage((hwnd), DBCM_SETICON, 0, (LPARAM)(hicon)))
-#define MDescButton_SetIconShared(hwnd, hicon) \
- (SendMessage((hwnd), DBCM_SETICON, MDBCF_SHAREDICON, (LPARAM)(hicon)))
-}
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_email.inc b/delphi/Awkward/include/m_email.inc
deleted file mode 100644
index 38c0b49..0000000
--- a/delphi/Awkward/include/m_email.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_EMAIL}
-{$DEFINE M_EMAIL}
-
-const
- {
- wParam : HCONTACT
- lParam : 0
- Affects: Send an e-mail to the specified contact, see notes
- Returns: Returns 0 on success or nonzero on failure
- Notes : If an error occurs the service displays a message box
- with the error text -- use this service to alter this
- }
- MS_EMAIL_SENDEMAIL:PAnsiChar = 'SREMail/SendCommand';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_errors.inc b/delphi/Awkward/include/m_errors.inc
deleted file mode 100644
index af9579e..0000000
--- a/delphi/Awkward/include/m_errors.inc
+++ /dev/null
@@ -1,123 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ERRORS}
-{$DEFINE M_ERRORS}
-
-const
- MERR_UNICODE = $01;
- MERR_DEFAULT_INFO = $02;
- MERR_DEFAULT_WARNING = $04;
- MERR_DEFAULT_ERROR = $08;
- MERR_DEFAULT_ALL = $0E;
-
- MERR_TCHAR = MERR_UNICODE;
-
-// Error notifications are sorted according to this level
- MERR_LEVEL_INFO = 1;
- MERR_LEVEL_WARNING = 2;
- MERR_LEVEL_ERROR = 3;
-
-// Predefined error types (no need to call MS_ERROR_REGISTER)
- MERR_TYPE_INFO :pAnsiChar = 'Core/Info';
- MERR_TYPE_SRV_INFO :pAnsiChar = 'Core/SrvInfo';
- MERR_TYPE_WARNING :pAnsiChar = 'Core/Warning';
- MERR_TYPE_SRV_WARNING:pAnsiChar = 'Core/SrvWarning';
- MERR_TYPE_SRV_ERROR :pAnsiChar = 'Core/SrvError';
- MERR_TYPE_NETWORK :pAnsiChar = 'Core/Network';
- MERR_TYPE_LOGIN :pAnsiChar = 'Core/Login';
-
-// Specify set of buttons to make query box
- MERR_BTN_NONE = 0;
- MERR_BTN_YESNO = 1;
- MERR_BTN_YESNOCANCEL = 2;
- MERR_BTN_ABORTRETRYIGNORE = 4;
-
-// General-purpose error definition
-type
- PMIRANDAERROR_TYPE = ^MIRANDAERROR_TYPE;
- MIRANDAERROR_TYPE = record
- cbSize :int;
- flags :dword;
- level :int;
- name :PAnsiChar;
- szTitle:TChar;
- end;
-
-// General-purpose error definition
-type
- MIRANDAERROR = record
- cbSize :int;
- flags :dword;
- _type :pAnsiChar;
- szModuleTitle :TCHAR;
-
- buttons :int;
- btnDefault :int;
- pszQueryName :PAnsiChar; // to save answer in DB
- pszSvcCallback:PAnsiChar;
- lParam :LPARAM;
-
- // information itself
- hContact :THANDLE;
- szTitle :TCHAR;
- szText :TCHAR;
-
- // filled by core and may be used in handlers.
- typeInfo :PMIRANDAERROR_TYPE;
- dwTimestamp :dword;
- end;
-
-// Information about particular error handler for options UI
-type
- MIRANDAERROR_HANDLER = record
- cbSize :int;
- flags :dword;
- pszDbModule:PAnsiChar;
-
- hIcolibIcon:THANDLE;
- szTitle :TCHAR;
- end;
-
-const
- MS_ERROR_REGISTER :PAnsiChar = 'Errors/Register';
- MS_ERROR_ADDHANDLER:PAnsiChar = 'Errors/AddHandler';
- MS_ERROR_PROCESS :PAnsiChar = 'Errors/Process';
- ME_ERROR_ONPROCESS :PAnsiChar = 'Errors/OnProcess';
-
-(*
- static __forceinline void mir_ReportError(HANDLE hContact, TCHAR *ptszModuleTitle,
- char *pszType, TCHAR *ptszText, TCHAR *ptszTitle DEFVAL(NULL))
- {
- MIRANDAERROR err = {0};
- err.cbSize = sizeof(err);
- err.flags = MERR_TCHAR;
- err.type = pszType;
- err.ptszModuleTitle = ptszModuleTitle;
- err.hContact = hContact;
- err.ptszText = ptszText;
- err.ptszTitle = ptszTitle;
- CallServiceSync(MS_ERROR_PROCESS, 0, (LPARAM)&err);
- }
-*)
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_extraicons.inc b/delphi/Awkward/include/m_extraicons.inc
deleted file mode 100644
index b6c1a02..0000000
--- a/delphi/Awkward/include/m_extraicons.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- Copyright (C) 2009 Ricardo Pescuma Domenecci
-
- This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this file; see the file license.txt. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_EXTRAICONS}
-{$DEFINE M_EXTRAICONS}
-
-const
- EXTRAICON_TYPE_CALLBACK = 0; // Similar to old clist callbacks, it fires 2 notifications
- EXTRAICON_TYPE_ICOLIB = 1; // This extra icon will use only icons registered with icolib.
- // No callbacks needed. Just call MS_EXTRAICON_SET_ICON passing the name of the
- // extraicon to set one.
-
-type
- TEXTRAICON_INFO = record
- cbSize:int;
- _type :int; // One of EXTRAICON_TYPE_*
- name :PAnsiChar; // Internal name. More than one plugin can register extra icons
- // with the same name if both have the same type. In this case,
- // both will be handled as one. This is usefull for ex for extra
- // status, where icq and jabber can share the same slot.
- // If the types are different the second one will be denied.
- description:PAnsiChar; // [Translated by plugin] Description to be used in GUI
- descIcon :PAnsiChar; // [Optional] Name of an icon registered with icolib to be used in GUI.
-
- // If type == EXTRAICON_TYPE_CALLBACK this two must be set
-
- // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
- // wParam=lParam=0
- RebuildIcons:TMIRANDAHOOK;
-
- // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HANDLE hContact
- // lParam = int slot
- ApplyIcon:TMIRANDAHOOK;
-
- // Other optional callbacks
-
- // [Optional] Callback called when extra icon was clicked
- // wParam = HANDLE hContact
- // lParam = int slot
- // param = onClickParam
- OnClick:TMIRANDAHOOKPARAM;
-
- onClickParam:LPARAM;
- end;
-
-const
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
- MS_EXTRAICON_REGISTER:PAnsiChar = 'ExtraIcon/Register';
-
-type
- TEXTRAICON = record
- cbSize :int;
- hExtraIcon:THANDLE; // Value returned by MS_EXTRAICON_REGISTER
- hContact :THANDLE; // Contact to set the extra icon
- // The icon to be set. This depends on the type of the extra icon:
- case boolean of
- false:(hImage :THANDLE); // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- true :(icoName:PAnsiChar); // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- end;
-
-const
-// Set an extra icon icon
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
- MS_EXTRAICON_SET_ICON:PAnsiChar = 'ExtraIcon/SetIcon';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_file.inc b/delphi/Awkward/include/m_file.inc
deleted file mode 100644
index 224aa41..0000000
--- a/delphi/Awkward/include/m_file.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FILE}
-{$DEFINE M_FILE}
-
-const
- {
- wParam : HCONTACT
- lParam : 0
- Affects: Brings up the send file dialog for a contact, see notes
- Returns: 0 on success [non zero] on failure
- Notes : Returns immediately without waiting for the send
- }
- MS_FILE_SENDFILE:PAnsiChar = 'SRFile/SendCommand';
-
- {
- wParam : HCONTACT
- lParam : pointer to an array of PAnsiChar's the first nil item
- terminates the list -- see notes
- Affects: Brings up the send file dialog with specifieed files already chosen
- the user is not prevented from editing the list --
- Returns: 0 on success [non zero] on failure -- returns immediately without
- waiting for the send to finish
- Notes : both directories and files can be given
- Version: v0.1.2.1+
- }
- MS_FILE_SENDSPECIFICFILES:PAnsiChar = 'SRFile/SendSpecificFiles';
-
-{
- v0.9.0+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(const TCHAR**)ppFiles
- returns 0 on success or nonzero on failure
- returns immediately, without waiting for the send
-}
- MS_FILE_SENDSPECIFICFILEST:PAnsiChar = 'SRFile/SendSpecificFilesT';
-
- {
- wParam : HCONTACT
- lParam : Pointer to a buffer
- Affects: returns the received files folder for a contact, the buffer
- should be at least MAX_PATH long (defined with WinAPI),
- the returned path may not exist -- see notes
- Returns: Returns 0 on success [non zero] on failure
- notes : If HCONTACT is NULL(0) the path returned is the path
- without the postfix contact name.
- Version: v0.1.2.2+
- }
- MS_FILE_GETRECEIVEDFILESFOLDER:PAnsiChar = 'SRFile/GetReceivedFilesFolder';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_findadd.inc b/delphi/Awkward/include/m_findadd.inc
deleted file mode 100644
index 8adde75..0000000
--- a/delphi/Awkward/include/m_findadd.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FINDADD}
-{$DEFINE M_FINDADD}
-
-const
- {
- wParam : 0
- lParam : 0
- Affects: Opens the find/add users dialog box, or gives it focus if it's
- already open.
- Returns: Always returns 0
- }
- MS_FINDADDFINDADD:PAnsiChar = 'FindAdd/FindAddCommand';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_fingerprint.inc b/delphi/Awkward/include/m_fingerprint.inc
deleted file mode 100644
index 73622ac..0000000
--- a/delphi/Awkward/include/m_fingerprint.inc
+++ /dev/null
@@ -1,61 +0,0 @@
-{
-Based on Miranda plugin template, originally by Richard Hughes
-http://miranda-icq.sourceforge.net/
-
-Miranda IM: the free IM client for Microsoft Windows
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{***********************************************************************
-* Author: Artem Shpynov aka FYR mailto:shpynov@nm.ru
-* icons by Angeli-Ka
-* January 12, 2006
-************************************************************************}
-
-{$IFNDEF M_FINGERPRINT}
-{$DEFINE M_FINGERPRINT}
-// FINGERPRINT PLUGIN SERVICES HEADER
-
-const
-{
- Service SameClients MS_FP_SAMECLIENTS
- wParam - AnsiChar * first MirVer value
- lParam - AnsiChar * second MirVer value
- return pointer to AnsiChar string - client desription (DO NOT DESTROY) if clients are same otherwise NULL
-}
- MS_FP_SAMECLIENTS:PAnsiChar = 'Fingerprint/SameClients';
-
-{
- ServiceGetClientIcon MS_FP_GETCLIENTICON
- wParam - AnsiChar * MirVer value to get client for.
- lParam - int noCopy - if wParam is equal to "1" will return icon handler without copiing icon.
-}
- MS_FP_GETCLIENTICON:PAnsiChar = 'Fingerprint/GetClientIcon';
-
-// Plugin UUIDs for New plugin loader
-// req. 0.7.18+ core
-const MIID_FINGERPRINT :MUUID='{FFF4B77A-CE40-11DB-A5CD-06A755D89593}';
-const MIID_FINGERPRINT_MOD :MUUID='{BAC0BBBE-CE40-11DB-A11E-72A655D89593}';
-const MIID_FINGERPRINT_FULL :MUUID='{0AFE5BBB-CE62-11DB-8314-0800200C9A66}';
-const MIID_FINGERPRINT_STANDARD:MUUID='{0AFE5ABC-CE62-11DB-8314-0800200C9A66}';
-const MIID_FINGERPRINT_LITE :MUUID='{0AFE5DEF-CE62-11DB-8314-0800200C9A66}';
-const MIID_FINGERPRINT_CUSTOM :MUUID='{0AFE5BAD-CE62-11DB-8314-0800200C9A66}';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_fontservice.inc b/delphi/Awkward/include/m_fontservice.inc
deleted file mode 100644
index e60f32f..0000000
--- a/delphi/Awkward/include/m_fontservice.inc
+++ /dev/null
@@ -1,245 +0,0 @@
-// Copyright Scott Ellis (mail@scottellis.com.au) 2005
-// This software is licenced under the GPL (General Public Licence)
-// available at http://www.gnu.org/copyleft/gpl.html
-{$IFNDEF FONT_SERVICE_API}
-{$DEFINE FONT_SERVICE_API}
-
-const
-// style flags
- DBFONTF_BOLD = 1;
- DBFONTF_ITALIC = 2;
- DBFONTF_UNDERLINE = 4;
- DBFONTF_STRIKEOUT = 8;
-// flags for compatibility
- FIDF_APPENDNAME = 1; // append 'Name' to the setting used to store
- // font face (as CLC settings require)
- FIDF_NOAS = 2; // disable the <prefix>As setting to prevent
- // 'same as' behaviour
- FIDF_SAVEACTUALHEIGHT = 4; // write the actual height of a test string to the db
- FIDF_SAVEPOINTSIZE = 8; // write the font point size to the db
-// additional flags
- FIDF_DEFAULTVALID = 32; // the default font settings are valid - else,
- // just use generic default
- FIDF_NEEDRESTART = 64; // setting changes will not take effect until
- // miranda is restarted
- FIDF_ALLOWREREGISTER = 128; // allow plugins to register this font again
- // (i.e. override already registered settings
- // such as flags)
- FIDF_ALLOWEFFECTS = 256; // allow setting of font effects
- // (i.e. underline and strikeout)
-
-const
-// font class
- FIDF_CLASSMASK = $70000000;
- FIDF_CLASSHEADER = $10000000;
- FIDF_CLASSGENERAL = $20000000;
- FIDF_CLASSSMALL = $30000000;
-
-type
-// settings to be used for the value of 'deffontsettings' in the FontID
-// structure below - i.e. defaults
- PFontSettings_tag = ^TFontSettings_tag;
- TFontSettings_tag = record
- colour : TCOLORREF;
- size : AnsiChar;
- style : BYTE; // see the DBFONTF_* flags above
- charset : BYTE;
- szFace : array[0..(LF_FACESIZE)-1] of AnsiChar;
- end;
- TFontSettings = TFontSettings_tag;
- PFontSettings = ^TFontSettings;
-
- PFontSettingsW_tag = ^TFontSettingsW_tag;
- TFontSettingsW_tag = record
- colour : TCOLORREF;
- size : AnsiChar;
- style : BYTE; // see the DBFONTF_* flags above
- charset : BYTE;
- szFace : array[0..(LF_FACESIZE)-1] of WideChar;
- end;
- TFontSettingsW = TFontSettingsW_tag;
- PFontSettingsW = ^TFontSettingsW;
-
-const
- FontID_SIZEOF_V2 = 372;
- FontID_SIZEOF_V2A = 372;
- FontID_SIZEOF_V2U = 660;
- FontIDW_SIZEOF_V2 = 660;
-
-type
-// a font identifier structire - used for registering a font,
-// and getting one out again
- PFontID_tag = ^TFontID_tag;
- TFontID_tag = record
- cbSize : int;
- // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
- group : array[0..63] of AnsiChar;
- // [TRANSLATED-BY-CORE] the name of the font setting e.g. 'contacts' in the 'contact list' group
- name : array[0..63] of AnsiChar;
- // the 'module' in the database where the font data is stored
- dbSettingsGroup: array[0..31] of AnsiChar;
- // prepended to the settings used to store this font's data in the db
- prefix : array[0..31] of AnsiChar;
- // bitwise OR of the FIDF_* flags above
- flags : DWORD;
- deffontsettings: TFontSettings; // defaults, if flags & FIDF_DEFAULTVALID
- // controls the order in the font group in which the fonts are listed in the
- // UI (if order fields are equal, they will be ordered alphabetically by name)
- order : int;
- backgroundGroup:array [0..63] of AnsiChar;
- backgroundName: array [0..63] of AnsiChar;
- end;
- TFontID = TFontID_tag;
- PFontID = ^TFontID;
-
- PFontIDW_tag = ^TFontIDW_tag;
- TFontIDW_tag = record
- cbSize : int;
- // [TRANSLATED-BY-CORE] group the font belongs to - this is the 'Font Group' list in the options page
- group : array[0..63] of WideChar;
- // [TRANSLATED-BY-CORE] the name of the font setting e.g. 'contacts' in the 'contact list' group
- name : array[0..63] of WideChar;
- // the 'module' in the database where the font data is stored
- dbSettingsGroup: array[0..31] of AnsiChar;
- // prepended to the settings used to store this font's data in the db
- prefix : array[0..31] of AnsiChar;
- // bitwise OR of the FIDF_* flags above
- flags : DWORD;
- deffontsettings: TFontSettingsW; // defaults, if flags & FIDF_DEFAULTVALID
- // controls the order in the font group in which the fonts are listed in the
- // UI (if order fields are equal, they will be ordered alphabetically by name)
- order : int;
- backgroundGroup:array [0..63] of WideChar;
- backgroundName: array [0..63] of WideChar;
- end;
- TFontIDW = TFontIDW_tag;
- PFontIDW = ^TFontIDW;
-
- PColourID_tag = ^TColourID_tag;
- TColourID_tag = record
- cbSize : int;
- group : array[0..63] of AnsiChar;
- name : array[0..63] of AnsiChar;
- dbSettingsGroup : array[0..31] of AnsiChar;
- setting : array[0..31] of AnsiChar;
- flags : DWORD; // not used
- defcolour : TCOLORREF; // default value
- order : int;
- end;
- TColourID = TColourID_tag;
- PColourID = ^TColourID;
-
- PColourIDW_tag = ^TColourIDW_tag;
- TColourIDW_tag = record
- cbSize : int;
- group : array[0..63] of WideChar;
- name : array[0..63] of WideChar;
- dbSettingsGroup : array[0..31] of AnsiChar;
- setting : array[0..31] of AnsiChar;
- flags : DWORD; // not used
- defcolour : TCOLORREF; // default value
- order : int;
- end;
- TColourIDW = TColourIDW_tag;
- PColourIDW = ^TColourIDW;
-
-const
- { register a font }
- { wparam = pointer to FontID structure}
- { lparam = 0 }
- MS_FONT_REGISTERA:PAnsiChar = 'Font/Register';
- MS_FONT_REGISTERW:PAnsiChar = 'Font/RegisterW';
-
- { get a font }
- { wparam = pointer to FontID structure (only name and group matter) }
- { lParam = pointer to LOGFONT structure }
- { returns the font's colour }
- MS_FONT_GETA:PAnsiChar = 'Font/Get';
- MS_FONT_GETW:PAnsiChar = 'Font/GetW';
-
- { fired when a user modifies font settings, so reget your fonts }
- ME_FONT_RELOAD:PAnsiChar = 'Font/Reload';
-
- { register a colour (this should be used for everything except actual text colour for registered fonts) }
- { [note - a colour with name 'Background' has special meaning and will be used as the background colour of }
- { the font list box in the options, for the given group] }
- { wparam = pointer to ColourID structure }
- { lparam = 0 }
- MS_COLOUR_REGISTERA:PAnsiChar = 'Colour/Register';
- MS_COLOUR_REGISTERW:PAnsiChar = 'Colour/RegisterW';
-
- { get a colour }
- { wparam = pointer to ColourID structure (only name and group matter) }
- { returns the colour (as COLORREF), or -1 if not found }
- MS_COLOUR_GETA:PAnsiChar = 'Colour/Get';
- MS_COLOUR_GETW:PAnsiChar = 'Colour/GetW';
-
- { fired when a user modifies font settings, so reget your fonts and colours }
- ME_COLOUR_RELOAD:PAnsiChar = 'Colour/Reload';
-
-var
- MS_FONT_REGISTER :PAnsiChar absolute MS_FONT_REGISTERW;
- MS_FONT_GET :PAnsiChar absolute MS_FONT_GETW;
- MS_COLOUR_REGISTER:PAnsiChar absolute MS_COLOUR_REGISTERW;
- MS_COLOUR_GET :PAnsiChar absolute MS_COLOUR_GETW;
-
-
-//////////////////////////////////////////////////////////////////////////
-//
-// EFFECTS
-//
-type
- FONTEFFECT_tag = record
- effectIndex :byte;
- baseColour :dword; // ARGB
- secondaryColour:dword; // ARGB
- end;
- TFONTEFFECT = FONTEFFECT_tag;
-
-type
- EffectID_tag = record
- cbSize :int;
- group :array [0..63] of AnsiChar;
- name :array [0..63] of AnsiChar;
- dbSettingsGroup:array [0..31] of AnsiChar;
- setting :array [0..31] of AnsiChar;
- flags :dword;
- defeffect :TFONTEFFECT;
- order :int;
- value :TFONTEFFECT;
- end;
- TEffectID = EffectID_tag;
-
-type
- EffectIDW_tag = record
- cbSize :int;
- group :array [0..63] of WideChar;
- name :array [0..63] of WideChar;
- dbSettingsGroup:array [0..31] of AnsiChar;
- setting :array [0..31] of AnsiChar;
- flags :dword;
- defeffect :TFONTEFFECT;
- order :int;
- value :TFONTEFFECT;
- end;
- TEffectIDW = EffectIDW_tag;
-
-const
-// register an effect
-// wparam = (EffectID *)&effect_id
-// lparam = 0
- MS_EFFECT_REGISTER :pAnsiChar = 'Effect/Register';
- MS_EFFECT_REGISTERW:pAnsiChar = 'Effect/RegisterW';
-
-// get a effect
-// wparam = (EffectID *)&effect_id (only name and group matter)
-// lparam = (FONTEFFECT *)&effect
-// rerturns 0, or -1 if not found
- MS_EFFECT_GET :pAnsiChar = 'Effect/Get';
- MS_EFFECT_GETW:pAnsiChar = 'Effect/GetW';
-
-// fired when a user modifies font settings, so reget your fonts and colours
-// wparam = lparam = 0
- ME_EFFECT_RELOAD:pAnsiChar = 'Effect/Reload';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_genmenu.inc b/delphi/Awkward/include/m_genmenu.inc
deleted file mode 100644
index 15b78c9..0000000
--- a/delphi/Awkward/include/m_genmenu.inc
+++ /dev/null
@@ -1,467 +0,0 @@
-{$IFNDEF M_GENMENU}
-{$DEFINE M_GENMENU}
-{
- Main features:
- 1) Independet from clist,may be used in any module.
- 2) Module defined Exec and Check services.
- 3) Menu with any level of popups,icons for root of popup.
- 4) You may use measure/draw/processcommand even if menuobject is unknown.
-
- Idea of GenMenu module consists of that,
- it must be independet and offers only general menu purpose services:
- MO_CREATENEWMENUOBJECT
- MO_REMOVEMENUOBJECT
- MO_ADDNEWMENUITEM
- MO_REMOVEMENUITEM
- ...etc
-
- And then each module that want use and offer to others menu handling
- must create own services.For example i rewrited mainmenu and
- contactmenu code in clistmenus.c.If you look at code all functions
- are very identical, and vary only in check/exec services.
-
- So template set of function will like this:
- Remove<NameMenu>Item
- Add<NameMenu>Item
- Build<NameMenu>
- <NameMenu>ExecService
- <NameMenu>CheckService
-
- ExecService and CheckService used as callbacks when GenMenu must
- processcommand for menu item or decide to show or not item.This make
- GenMenu independet of which params must passed to service when user
- click on menu,this decide each module.
- 28-04-2003 Bethoven
-
-}
-
-{
-Analog to CLISTMENUITEM,but invented two params root and ownerdata.
-root is used for creating any level popup menus,set to -1 to build
-at first level and root=MenuItemHandle to place items in submenu
-of this item.Must be used two new flags CMIF_ROOTPOPUP and CMIF_CHILDPOPUP
-(defined in m_clist.h)
-
-ownerdata is passed to callback services(ExecService and CheckService)
-when building menu or processed command.
-}
-
-// GENMENU_MODULE
-{
-Changes:
-
-28-04-2003
-Moved all general stuff to genmenu.c(m_genmenu.h,genmenu.h),
-so removed all frames stuff.
-
-
-Changes:
-
-28-12-2002
-
-Contact menu item service called with wparam=hcontact,lparam=popupPosition -
-plugin may add different menu items with some service.
-(old behavior wparam=hcontact lparam=0)
-
-
-
-25-11-2002 Full support of runtime build of all menus.
- Contact MS_CLIST_ADDCONTACTMENUITEM
- MS_CLIST_REMOVECONTACTMENUITEM
- MS_CLIST_MENUBUILDCONTACT
- ME_CLIST_PREBUILDCONTACTMENU
-
- MainMenu MS_CLIST_ADDMAINMENUITEM
- MS_CLIST_REMOVEMAINMENUITEM
- MS_CLIST_MENUBUILDMAIN
- ME_CLIST_PREBUILDMAINMENU
-
- FrameMenu MS_CLIST_ADDCONTEXTFRAMEMENUITEM
- MS_CLIST_REMOVECONTEXTFRAMEMENUITEM
- MS_CLIST_MENUBUILDFRAMECONTEXT
- ME_CLIST_PREBUILDFRAMEMENU
-
- For All menus may be used
- MS_CLIST_MODIFYMENUITEM
-
- All menus supported any level of popups
- (pszPopupName=(AnsiChar *)hMenuItem - for make child of popup)
-}
-
-const
-{
- SubGroup MENU
- remove a item from SubGroup menu
- wParam=hMenuItem returned by MS_CLIST_ADDSubGroupMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVESUBGROUPMENUITEM:PAnsiChar = 'CList/RemoveSubGroupMenuItem';
-
-{
- builds the SubGroup menu
- wParam=lParam=0
- returns a HMENU identifying the menu.
-}
- MS_CLIST_MENUBUILDSUBGROUP:PAnsiChar = 'CList/MenuBuildSubGroup';
-
-{
- add a new item to the SubGroup menus
- wParam=lpGroupMenuParam, params to call when exec menuitem
- lParam=(LPARAM)(CLISTMENUITEM*)&mi
-}
- MS_CLIST_ADDSUBGROUPMENUITEM:PAnsiChar = 'CList/AddSubGroupMenuItem';
-
-{
- the SubGroup menu is about to be built
- wParam=lParam=0
-}
- ME_CLIST_PREBUILDSUBGROUPMENU:PAnsiChar = 'CList/PreBuildSubGroupMenu';
-
-// SubGroup MENU
-
-// Group MENU
-type
- lpGroupMenuParam = ^GroupMenuParam;
- GroupMenuParam = record
- wParam:integer;
- lParam:integer;
- end;
-
-const
-{
- remove a item from Group menu
- wParam=hMenuItem returned by MS_CLIST_ADDGroupMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVEGROUPMENUITEM:PAnsiChar = 'CList/RemoveGroupMenuItem';
-
-{
- builds the Group menu
- wParam=lParam=0
- returns a HMENU identifying the menu.
-}
- MS_CLIST_MENUBUILDGROUP:PAnsiChar = 'CList/MenuBuildGroup';
-
-{
- add a new item to the Group menus
- wParam=lpGroupMenuParam, params to call when exec menuitem
- lParam=(LPARAM)(CLISTMENUITEM*)&mi
-}
- MS_CLIST_ADDGROUPMENUITEM:PAnsiChar = 'CList/AddGroupMenuItem';
-
-{
- the Group menu is about to be built
- wParam=lParam=0
-}
- ME_CLIST_PREBUILDGROUPMENU:PAnsiChar = 'CList/PreBuildGroupMenu';
-
-// Group MENU
-
-// TRAY MENU
-{
- remove a item from tray menu
- wParam=hMenuItem returned by MS_CLIST_ADDTRAYMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVETRAYMENUITEM:PAnsiChar = 'CList/RemoveTrayMenuItem';
-
-{
- builds the tray menu
- wParam=lParam=0
- returns a HMENU identifying the menu.
-}
- MS_CLIST_MENUBUILDTRAY:PAnsiChar = 'CList/MenuBuildTray';
-
-{
- add a new item to the tray menus
- wParam=0
- lParam=(LPARAM)(CLISTMENUITEM*)&mi
-}
- MS_CLIST_ADDTRAYMENUITEM:PAnsiChar = 'CList/AddTrayMenuItem';
-
-{
- the tray menu is about to be built
- wParam=lParam=0
-}
- ME_CLIST_PREBUILDTRAYMENU:PAnsiChar = 'CList/PreBuildTrayMenu';
-
-// STATUS MENU
-
-{
- the status menu is about to be built
- wParam=lParam=0
-}
- ME_CLIST_PREBUILDSTATUSMENU:PAnsiChar = 'CList/PreBuildStatusMenu';
-
-{
- add a new item to the status menu
- wParam=0
- lParam=(LPARAM)(CLISTMENUITEM*)&mi
-}
-//!! MS_CLIST_ADDSTATUSMENUITEM = 'CList/AddStatusMenuItem'; // defined in m_clist.inc
-
-{
- remove a item from main menu
- wParam=hMenuItem returned by MS_CLIST_ADDMAINMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVEMAINMENUITEM:PAnsiChar = 'CList/RemoveMainMenuItem';
-
-{
- builds the main menu
- wParam=lParam=0
- returns a HMENU identifying the menu.
-}
- MS_CLIST_MENUBUILDMAIN:PAnsiChar = 'CList/MenuBuildMain';
-
-{
- the main menu is about to be built
- wParam=lParam=0
-}
- ME_CLIST_PREBUILDMAINMENU:PAnsiChar = 'CList/PreBuildMainMenu';
-
-{
- remove a item from contact menu
- wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_CLIST_REMOVECONTACTMENUITEM:PAnsiChar = 'CList/RemoveContactMenuItem';
-
-// GENMENU_MODULE
-
- SETTING_NOOFFLINEBOTTOM_DEFAULT = 0;
-
-type
- PMO_MenuItem = ^TMO_MenuItem;
- TMO_MenuItem = record
- cbSize :integer;
- szName :TCHAR;
- position :integer;
- root :HGENMENU;
- flags :integer;
- hIcon :HICON; // or hIcolibItem:THANDLE;
- hotKey :DWORD;
- ownerdata:^pointer;
- end;
-
-{
-This structure passed to CheckService.
-}
-type
- PCheckProcParam = ^TCheckProcParam;
- TCheckProcParam = record
- MenuItemOwnerData:^pointer;
- MenuItemHandle:HGENMENU;
- wParam:WPARAM; // from ListParam.wParam when building menu
- lParam:LPARAM; // from ListParam.lParam when building menu
- end;
-
-type
- PMenuParam = ^TMenuParam;
- TMenuParam = record
- cbSize:integer;
- name :PAnsiChar;
-{
- This service called when module build menu(MO_BUILDMENU).
- Service called with params
-
- wparam=PCheckProcParam
- lparam=0
- if return==FALSE item is skiped.
-}
- CheckService:PAnsiChar;
-{
- This service called when user select menu item.
- Service called with params
- wparam=ownerdata
- lparam=lParam from MO_PROCESSCOMMAND
-}
- ExecService:PAnsiChar;//called when processmenuitem called
- end;
-
-//used in MO_BUILDMENU
-type
- lpListParam = ^ListParam;
- ListParam = record
- rootlevel :integer;
- MenuObjectHandle:THANDLE;
- wParam :WPARAM;
- lParam :LPARAM;
-end;
- tagListParam = ListParam;
-
-type
- lpProcessCommandParam = ^ProcessCommandParam;
- ProcessCommandParam = record
- menu :HMENU;
- ident :integer;
- lParam:LPARAM;
- end;
-
-const
-{
- wparam started hMenu
- lparam ListParam*
- result hMenu
-}
- MO_BUILDMENU:PAnsiChar = 'MO/BuildMenu';
-
-{
- wparam=MenuItemHandle
- lparam userdefined
- returns TRUE if it processed the command, FALSE otherwise
-}
- MO_PROCESSCOMMAND:PAnsiChar = 'MO/ProcessCommand';
-
-{
- if menu not known call this
- LOWORD(wparam) menuident (from WM_COMMAND message)
- returns TRUE if it processed the command, FALSE otherwise
- Service automatically find right menuobject and menuitem
- and call MO_PROCESSCOMMAND
-}
- MO_PROCESSCOMMANDBYMENUIDENT:PAnsiChar = 'MO/ProcessCommandByMenuIdent';
-
-{
- wparam=0;
- lparam=PMenuParam;
- returns=MenuObjectHandle on success,-1 on failure
-}
- MO_CREATENEWMENUOBJECT:PAnsiChar = 'MO/CreateNewMenuObject';
-
-{
- wparam=MenuObjectHandle
- lparam=0
- returns 0 on success,-1 on failure
- Note: you must free all ownerdata structures, before you
- call this service.MO_REMOVEMENUOBJECT NOT free it.
-}
- MO_REMOVEMENUOBJECT:PAnsiChar = 'MO/RemoveMenuObject';
-
-{
- wparam=MenuItemHandle
- lparam=0
- returns 0 on success,-1 on failure.
- You must free ownerdata before this call.
- If MenuItemHandle is root all child will be removed too.
-}
- MO_REMOVEMENUITEM:PAnsiChar = 'MO/RemoveMenuItem';
-
-{
- wparam=MenuObjectHandle
- lparam=PMO_MenuItem
- return MenuItemHandle on success,-1 on failure
- Service supports old menu items (without CMIF_ROOTPOPUP or
- CMIF_CHILDPOPUP flag).For old menu items needed root will be created automatically.
-}
- MO_ADDNEWMENUITEM:PAnsiChar = 'MO/AddNewMenuItem';
-
-{
- wparam MenuItemHandle
- returns ownerdata on success,NULL on failure
- Useful to get and free ownerdata before delete menu item.
-}
- MO_MENUITEMGETOWNERDATA:PAnsiChar = 'MO/MenuItemGetOwnerData';
-
-{
- wparam MenuItemHandle
- lparam PMO_MenuItem
- returns 0 on success,-1 on failure
-}
- MO_MODIFYMENUITEM:PAnsiChar = 'MO/ModifyMenuItem';
-
-{
- wparam=MenuItemHandle
- lparam=PMO_MenuItem
- returns 0 and filled PMO_MenuItem structure on success and -1 on failure
-}
- MO_GETMENUITEM:PAnsiChar = 'MO/GetMenuItem';
-
-{
- wparam=MenuItemHandle
- lparam=0
- returns a menu handle on success or NULL on failure
-}
- MO_GETDEFAULTMENUITEM:PAnsiChar = 'MO/GetDefaultMenuItem';
-
-{
- wparam=MenuObjectHandle
- lparam=vKey
- returns TRUE if it processed the command, FALSE otherwise
- this should be called in WM_KEYDOWN
-}
- MO_PROCESSHOTKEYS:PAnsiChar = 'MO/ProcessHotKeys';
-
-{
- process a WM_DRAWITEM message
- wparam=0
- lparam=LPDRAWITEMSTRUCT
- returns TRUE if it processed the command, FALSE otherwise
-}
- MO_DRAWMENUITEM:PAnsiChar = 'MO/DrawMenuItem';
-
-{
- process a WM_MEASUREITEM message
- wparam=0
- lparam=LPMEASUREITEMSTRUCT
- returns TRUE if it processed the command, FALSE otherwise
-}
- MO_MEASUREMENUITEM:PAnsiChar = 'MO/MeasureMenuItem';
-
-{
- set uniq name to menuitem(used to store it in database when enabled OPT_USERDEFINEDITEMS)
-}
- OPT_MENUITEMSETUNIQNAME = 1;
-{
- Set FreeService for menuobject. When freeing menuitem it will be called with
- wParam=MenuItemHandle
- lParam=mi.ownerdata
-}
- OPT_MENUOBJECT_SET_FREE_SERVICE = 2;
-
-{
- Set onAddService for menuobject.
-}
- OPT_MENUOBJECT_SET_ONADD_SERVICE = 3;
-
- OPT_MENUOBJECT_SET_CHECK_SERVICE = 4;
-
-//enable ability user to edit menuitems via options page.
- OPT_USERDEFINEDITEMS = 1;
-
-type
- lpOptParam = ^OptParam;
- OptParam = record
- Handle :THANDLE;
- Setting:integer;
- Value :integer;
- end;
-
-const
-{
- wparam=0
- lparam=*lpOptParam
- returns TRUE if it processed the command, FALSE otherwise
-}
- MO_SETOPTIONSMENUOBJECT:PAnsiChar = 'MO/SetOptionsMenuObject';
-
-{
- wparam=0
- lparam=*lpOptParam
- returns TRUE if it processed the command, FALSE otherwise
-}
- MO_SETOPTIONSMENUITEM:PAnsiChar = 'MO/SetOptionsMenuItem';
-
-{
- wparam=char* szProtoName
- lparam=0
- returns HGENMENU of the root item or NULL
-}
- MO_GETPROTOROOTMENU:PAnsiChar = 'MO/GetProtoRootMenu';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_help.inc b/delphi/Awkward/include/m_help.inc
deleted file mode 100644
index 9f8c684..0000000
--- a/delphi/Awkward/include/m_help.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_HELP}
-{$DEFINE M_HELP}
-
-{
- wParam = 0
- lParam = (char *)url;
- Sends the bug report url in lParam. Is usually called from
- the Help/Report Bug menu.
-}
-const
- ME_HELP_BUGREPORT:PAnsiChar = 'Help/ReportBug';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_helpers.inc b/delphi/Awkward/include/m_helpers.inc
deleted file mode 100644
index 3f90a66..0000000
--- a/delphi/Awkward/include/m_helpers.inc
+++ /dev/null
@@ -1,576 +0,0 @@
-{$ifdef M_API_UNIT}
-
-function ProtoServiceExists(const proto,service: PAnsiChar): int; cdecl;
-
-{$else}
-
-function ProtoServiceExists(const proto,service: PAnsiChar): int; cdecl;
-var
- buf:array [0..127] of AnsiChar;
-begin
- lStrCpyA(@buf,proto);
- lStrCatA(@buf,service);
- result:=PluginLink^.ServiceExists(@buf);
-end;
-
-{$endif}
-
-
-{$ifdef M_API_UNIT}
-
-function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
-function CreateVersionStringPlugin(pluginInfo:PPluginInfo;buf:PAnsiChar):PAnsiChar;
-
-{$else}
-
-function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
-var
- vers:array [0..3] of integer;
-begin
- vers[0]:=(version shr 24) and $FF;
- vers[1]:=(version shr 16) and $FF;
- vers[2]:=(version shr 8) and $FF;
- vers[3]:=version and $FF;
- wvsprintfa(buf,'%d.%d.%d.%d',@vers);
- result:=buf;
-end;
-
-function CreateVersionStringPlugin(pluginInfo:PPluginInfo;buf:PAnsiChar):PAnsiChar;
-begin
- result:=CreateVersionString(pluginInfo^.version,buf);
-end;
-
-{$endif}
-
-{$ifdef M_API_UNIT}
-
-function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
-function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
-
-{$else}
-
-function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
-begin
- Result := (a shl 24) or (b shl 16) or (c shl 8) or d;
-end;
-
-function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
-begin
- Result := 0;
- { could be used to compare for severity of age for positive values, if a<b
- results are minus values, 0 for equal, positive if a is newer }
- Inc(Result, (verA and $FF ) - (verB and $FF));
- Inc(Result, (verA and $FF00 ) - (verB and $FF00));
- Inc(Result, (verA and $FF0000 ) - (verB and $FF0000));
- Inc(Result, (verA and $FF000000) - (verB and $FF000000));
-end;
-
-{$endif}
-
-{$ifdef M_SYSTEM}
- {$ifdef M_API_UNIT}
-
-function CallService(const szService: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int;
-function HookEvent(const szHook: PAnsiChar; hook_proc: TMIRANDAHOOK): int;
-function CreateServiceFunction(const szName: PAnsiChar; const MirandaService: TMIRANDASERVICE): int;
-
- {$else}
-
-function CallService(const szService: PAnsiChar; wParam: WPARAM; lParam: lParam): int;
-begin
- Result := PluginLink^.CallService(szService, wParam, lParam);
-end;
-
-function HookEvent(const szHook: PAnsiChar; hook_proc: TMIRANDAHOOK): int;
-begin
- Result := PluginLink^.HookEvent(szHook, @hook_proc);
-end;
-
-function CreateServiceFunction(const szName: PAnsiChar; const MirandaService: TMIRANDASERVICE): int;
-begin
- Result := PluginLink^.CreateServiceFunction(szName, @MirandaService);
-end;
-
- {$endif}
-
-{$endif}
-
-(*
-{$ifdef M_DATABASE}
-
- {$ifdef M_API_UNIT}
-
-function DBGetContactSettingByte(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-function DBGetContactSettingWord(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-function DBGetContactSettingDword(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-function DBGetContactSetting(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; dbv: PDBVARIANT): Integer;
-function DBGetContactSettingStr(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; dbv: PDBVARIANT): Integer;
-function DBFreeVariant(dbv: PDBVARIANT): integer;
-function DBDeleteContactSetting(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar): Integer;
-function DBWriteContactSettingByte(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: Byte): Integer;
-function DBWriteContactSettingWord(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: Word): Integer;
-function DBWriteContactSettingDWord(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: LongInt): Integer;
-function DBWriteContactSettingString(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; const val: PAnsiChar): Integer;
-function DBWriteContactSettingUnicode(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; const val: PWideChar): Integer;
-
- {$else}
-
-function DBGetContactSettingByte(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-var
- dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := @dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
- Result := ErrorValue
- else
- Result := dbv.bVal;
-end;
-
-function DBGetContactSettingWord(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-var
- dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := @dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
- Result := ErrorValue
- else
- Result := dbv.wVal;
-end;
-
-function DBGetContactSettingDword(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; errorValue: Integer): Integer;
-var
- dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := @dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
- Result := ErrorValue
- else
- Result := dbv.dVal;
-end;
-
-function DBGetContactSetting(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; dbv: PDBVARIANT): Integer;
-var
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := dbv;
- Result := PluginLink^.CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs));
-end;
-
-function DBGetContactSettingStr(hContact: THandle;
- const szModule: PAnsiChar; const szSetting: PAnsiChar; dbv: PDBVARIANT): Integer;
-var
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := dbv;
- Result := PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR, hContact, lParam(@cgs));
-end;
-
-function DBFreeVariant(dbv: PDBVARIANT): Integer;
-begin
- Result := PluginLink^.CallService(MS_DB_CONTACT_FREEVARIANT, 0, lParam(dbv));
-end;
-
-function DBDeleteContactSetting(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar): Integer;
-var
- cgs: TDBCONTACTGETSETTING;
-begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- Result := PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING, hContact, lParam(@cgs));
-end;
-
-function DBWriteContactSettingByte(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: Byte): Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule := szModule;
- cws.szSetting := szSetting;
- cws.value._type := DBVT_BYTE;
- cws.value.bVal := Val;
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
-function DBWriteContactSettingWord(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: Word): Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule := szModule;
- cws.szSetting := szSetting;
- cws.value._type := DBVT_WORD;
- cws.value.wVal := Val;
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
-function DBWriteContactSettingDWord(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; val: LongInt): Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule := szModule;
- cws.szSetting := szSetting;
- cws.value._type := DBVT_DWORD;
- cws.value.dVal := Val;
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
-function DBWriteContactSettingString(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; const val: PAnsiChar): Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule := szModule;
- cws.szSetting := szSetting;
- cws.value._type := DBVT_ASCIIZ;
- cws.value.szVal.a:= Val;
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
-function DBWriteContactSettingUnicode(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; const val: PWideChar): Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule := szModule;
- cws.szSetting := szSetting;
- cws.value._type := DBVT_WCHAR;
- cws.value.szVal.w:= Val;
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
- {$endif}
-
-{$endif}
-*)
-{$ifdef M_NETLIB}
-
- {$ifdef M_API_UNIT}
-
-function Netlib_CloseHandle(Handle: THandle): int;
-function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
-function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
-function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int;
-function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int;
-procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
-
- {$else}
-
-function Netlib_CloseHandle(Handle: THandle): int;
-begin
- Result := PluginLink^.CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
-end;
-
-function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
-begin
- Result := (cchEncoded shr 2) * 3;
-end;
-
-function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
-begin
- Result := (cbDecoded * 4+11) div 12*4+1;
-end;
-
-function Netlib_Send(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int;
-var
- nlb: TNETLIBBUFFER;
-begin
- nlb.buf := buf;
- nlb.len := len;
- nlb.flags := flags;
- Result := PluginLink^.CallService(MS_NETLIB_SEND, wParam(hConn), lParam(@nlb));
-end;
-
-function Netlib_Recv(hConn: THandle; const buf: PAnsiChar; len: int; flags: int): int;
-var
- nlb: TNETLIBBUFFER;
-begin
- nlb.buf := buf;
- nlb.len := len;
- nlb.flags := flags;
- Result := PluginLink^.CallService(MS_NETLIB_RECV, wParam(hConn), lParam(@nlb));
-end;
-
-procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
-begin
- PluginLink^.CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
-end;
-
- {$endif}
-
-{$endif}
-
-{$ifdef M_UTILS}
-
- {$ifdef M_API_UNIT}
-
-function WindowList_Add(hList: THandle; hWnd: HWND; hContact: THandle): int;
-function WindowList_Remove(hList: THandle; hWnd: THandle): int;
-function WindowList_Find(hList: THandle; hContact: THandle): int;
-function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int;
-function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int;
-function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int;
-function mir_a2u(src:PAnsiChar):pWideChar;
-function mir_u2a(src:PWideChar):PAnsiChar;
-
- {$else}
-
-function WindowList_Add(hList: THandle; hWnd: hWnd; hContact: THandle): int;
-var
- wle: TWINDOWLISTENTRY;
-begin
- wle.hList := hList;
- wle.hWnd := hWnd;
- wle.hContact := hContact;
- Result := PluginLink^.CallService(MS_UTILS_ADDTOWINDOWLIST, 0, lParam(@wle));
-end;
-
-function WindowList_Remove(hList: THandle; hWnd: THandle): int;
-begin
- Result := PluginLink^.CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
-end;
-
-function WindowList_Find(hList: THandle; hContact: THandle): int;
-begin
- Result := PluginLink^.CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
-end;
-
-function WindowList_Broadcast(hList: THandle; message: int; wParam: WPARAM; lParam: LPARAM): int;
-var
- msg: TMSG;
-begin
- msg.message := message;
- msg.wParam := wParam;
- msg.lParam := lParam;
- Result := PluginLink^.CallService(MS_UTILS_BROADCASTTOWINDOWLIST, hList, Integer(@Msg));
-end;
-
-function Utils_SaveWindowPosition(hWnd: THandle; hContact: THandle; const szModule, szNamePrefix: PAnsiChar): int;
-var
- swp: TSAVEWINDOWPOS;
-begin
- swp.hWnd := hWnd;
- swp.hContact := hContact;
- swp.szModule := szModule;
- swp.szNamePrefix := szNamePrefix;
- Result := PluginLink^.CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, lParam(@swp));
-end;
-
-function Utils_RestoreWindowPosition(hWnd: THandle; hContact: THandle; Flags: int; const szModule, szNamePrefix: PAnsiChar): int;
-var
- swp: TSAVEWINDOWPOS;
-begin
- swp.hWnd := hWnd;
- swp.hContact := hContact;
- swp.szModule := szModule;
- swp.szNamePrefix := szNamePrefix;
- Result := PluginLink^.CallService(MS_UTILS_RESTOREWINDOWPOSITION, Flags, lParam(@swp));
-end;
-
-function mir_a2u(src:PAnsiChar):pWideChar;
-var
- codepage:int;
- cbLen:int;
-begin
- codepage:=PluginLink^.CallService('LangPack/GetCodePage',0,0 );
-
- cbLen:= MultiByteToWideChar(codepage,0,src,-1,NIL,0);
- result:=mmi.malloc(sizeof(WideChar)*(cbLen+1));
- if result=nil then
- exit;
-
- MultiByteToWideChar(codepage,0,src,-1,result,cbLen);
- result[cbLen]:=#0;
-end;
-
-function mir_u2a(src:PWideChar):PAnsiChar;
-var
- codepage:int;
- cbLen:int;
-begin
- codepage:=PluginLink^.CallService('LangPack/GetCodePage',0,0 );
-
- cbLen:= WideCharToMultiByte(codepage,0,src,-1,NIL,0,nil,nil);
- result:=mmi.malloc(cbLen+1);
- if result=nil then
- exit;
-
- WideCharToMultiByte(codepage,0,src,-1,result,cbLen,nil,nil);
- result[cbLen]:=#0;
-end;
- {$endif}
-
-{$endif}
-
-{$ifdef M_LANGPACK}
-
- {$ifdef M_API_UNIT}
-
-function Translate(sz: PAnsiChar): PAnsiChar;
-function Translatew(sz: PWideChar): PWideChar;
-function TranslateString(const sz: string): string;
-function TranslateDialogDefault(hwndDlg: THandle): int;
-
- {$else}
-
-function TranslateW(sz: PWideChar): PWideChar;
-begin
- { the return value maybe NULL(0) -- it's upto the caller to know if the allocated
- string has to be removed from the DLL heap, this has little to do with Miranda,
- but if a dynamic string is passed and a return string is used -- the dynamic
- string is lost -- be careful, lazy? use TranslateString (note it's slower) }
- Result := PWideChar(PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz)));
-end;
-
-function Translate(sz: PAnsiChar): PAnsiChar;
-begin
- { the return value maybe NULL(0) -- it's upto the caller to know if the allocated
- string has to be removed from the DLL heap, this has little to do with Miranda,
- but if a dynamic string is passed and a return string is used -- the dynamic
- string is lost -- be careful, lazy? use TranslateString (note it's slower) }
- Result := PAnsiChar(PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING, 0, lParam(sz)));
-end;
-
-function TranslateString(const sz:string):string;
-begin
- Result:=string(PAnsiChar(PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING,0,lparam(sz))));
-end;
-
-function TranslateDialogDefault(hwndDlg: THandle): int;
-var
- lptd: TLANGPACKTRANSLATEDIALOG;
-begin
- lptd.cbSize := sizeof(lptd);
- lptd.flags := 0;
- lptd.hwndDlg := hwndDlg;
- lptd.ignoreControls := nil;
- Result := PluginLink^.CallService(MS_LANGPACK_TRANSLATEDIALOG, 0, lParam(@lptd));
-end;
-
- {$endif}
-
-{$endif}
-
-{$ifdef M_PROTOCOLS}
- {$ifdef M_API_UNIT}
-
-function CallContactService(hContact: THandle; const szProtoService: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int;
-function CallProtoService(const szModule, szService: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int;
-
- {$else}
-
-function CallContactService(hContact: THandle; const szProtoService: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int;
-var
- css: TCCSDATA;
-begin
- css.hContact := hContact;
- css.szProtoService := szProtoService;
- css.wParam := wParam;
- css.lParam := lParam;
- Result := PluginLink^.CallService(MS_PROTO_CALLCONTACTSERVICE, 0, Integer(@css));
-end;
-
-function CallProtoService(const szModule, szService: PAnsiChar; wParam: WPARAM; lParam: LPARAM): int;
-var
- szStr: array[0..MAXMODULELABELLENGTH*2] of AnsiChar;
-begin
- lstrcpya(szStr, szModule);
- lstrcata(szStr, szService);
- Result := PluginLink^.CallService(szStr, wParam, lParam);
-end;
-
- {$endif}
-{$endif}
-
-{$ifdef M_PROTOMOD}
- {$ifdef M_API_UNIT}
-
-function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int;
-function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int;
-
- {$else}
-
-function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int;
-var
- ack: TACKDATA;
-begin
- ack.cbSize := sizeof(TACKDATA);
- ack.szModule := szModule;
- ack.hContact := hContact;
- ack._type := type_;
- ack._result := result_;
- ack.hProcess := hProcess;
- ack.lParam := lParam;
- Result := PluginLink^.CallService(MS_PROTO_BROADCASTACK, 0, Integer(@ack));
-end;
-
-function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int;
-var
- szStr: array[0..MAXMODULELABELLENGTH*2] of AnsiChar;
-begin
- lstrcpya(szStr, szModule);
- lstrcata(szStr, szService);
- Result := PluginLink^.CreateServiceFunction(szStr, @serviceProc);
-end;
-
- {$endif}
-
-{$endif}
-
-{$ifdef M_SKIN}
-
- {$ifdef M_API_UNIT}
-
-function LoadSkinnedIcon(id: int): THandle;
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
-function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int;
-function SkinPlaySound (const name: PAnsiChar): int;
-
- {$else}
-
-function LoadSkinnedIcon(id: int): THandle;
-begin
- Result := PluginLink^.CallService(MS_SKIN_LOADICON, id, 0);
-end;
-
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
-begin
- Result := PluginLink^.CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
-end;
-
-function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int;
-var
- ssd: TSKINSOUNDDESC;
-begin
- ssd.cbSize := sizeof(ssd);
- ssd.pszName := name;
- ssd.pszDescription := description;
- ssd.pszDefaultFile := defaultFile;
- Result := PluginLink^.CallService(MS_SKIN_ADDNEWSOUND, 0, lParam(@ssd));
-end;
-
-function SkinPlaySound (const name: PAnsiChar): int;
-begin
- Result := PluginLink^.CallService(MS_SKIN_PLAYSOUND, 0, lParam(name));
-end;
-
- {$endif}
-
-{$endif}
diff --git a/delphi/Awkward/include/m_history.inc b/delphi/Awkward/include/m_history.inc
deleted file mode 100644
index 006528d..0000000
--- a/delphi/Awkward/include/m_history.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_HISTORY}
-{$DEFINE M_HISTORY}
-
-const
- {
- wParam : HCONTACT
- lParam : 0
- Affects: Show's the history dialog box for a contact, see notes
- Notes : HCONTACT can be NULL(0) to show system messages
- }
- MS_HISTORY_SHOWCONTACTHISTORY:PAnsiChar = 'History/ShowContactHistory';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_historyevents.inc b/delphi/Awkward/include/m_historyevents.inc
deleted file mode 100644
index ae582f0..0000000
--- a/delphi/Awkward/include/m_historyevents.inc
+++ /dev/null
@@ -1,201 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-
-{$IFNDEF M_HISTORYEVENTS}
-{$DEFINE M_HISTORYEVENTS}
-
-const
- HISTORYEVENTS_FORMAT_CHAR = 1;
- HISTORYEVENTS_FORMAT_WCHAR = 2;
- HISTORYEVENTS_FORMAT_RICH_TEXT = 4;
- HISTORYEVENTS_FORMAT_HTML = 8;
-
-const
- HISTORYEVENTS_FLAG_DEFAULT = 1 shl 0; // Is a miranda core event type
- HISTORYEVENTS_FLAG_SHOW_IM_SRMM = 1 shl 1; // If this event has to be shown in srmm dialog
- HISTORYEVENTS_FLAG_USE_SENT_FLAG = 1 shl 2; // Means that it can be a sent or received and uses DBEF_SENT to mark that
- HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE = 1 shl 3; // Means that who is drawing this should draw the contact name before the text
- HISTORYEVENTS_FLAG_ONLY_LOG_IF_SRMM_OPEN = 1 shl 4; // If this event will be logged only if the message window is open
- HISTORYEVENTS_FLAG_FLASH_MSG_WINDOW = 1 shl 5; // If this event will trigger the openning/flashing of the message window
-
- HISTORYEVENTS_REGISTERED_IN_ICOLIB = 9 shl 16; // If the icon is a name already registered in icolib
-
- HISTORYEVENTS_FLAG_KEEP_ONE_YEAR = 1 shl 8; // By default store in db for 1 year
- HISTORYEVENTS_FLAG_KEEP_SIX_MONTHS = 2 shl 8; // By default store in db for 6 months
- HISTORYEVENTS_FLAG_KEEP_ONE_MONTH = 3 shl 8; // By default store in db for 1 month
- HISTORYEVENTS_FLAG_KEEP_ONE_WEEK = 4 shl 8; // By default store in db for 1 week
- HISTORYEVENTS_FLAG_KEEP_ONE_DAY = 5 shl 8; // By default store in db for 1 day
- HISTORYEVENTS_FLAG_KEEP_FOR_SRMM = 6 shl 8; // By default store in db only enought for message log
- HISTORYEVENTS_FLAG_KEEP_MAX_TEN = 7 shl 8; // By default store in db max 10 entries
- HISTORYEVENTS_FLAG_KEEP_MAX_HUNDRED = 8 shl 8; // By default store in db for 100 entries
- HISTORYEVENTS_FLAG_KEEP_DONT = 9 shl 8; // By default don't store in db (aka ignore it)
-
-
-// This function must be implemented by subscribers. It must return a pointer or NULL
-// to say it can't handle the text
-type
- fGetHistoryEventText = function(hContact:THANDLE; hDbEvent:THANDLE;
- dbe:PDBEVENTINFO; format:int):pointer; cdecl;
-
-type
- HISTORY_EVENT_HANDLER = record
- cbSize :int;
- module :PAnsiChar;
- name :PAnsiChar; // Internal event name
- description:PAnsiChar; // Will be translated. When retrieving it is already translated
- eventType :word; // The event type it can handle
- defaultIcon:HICON; // PAnsiChar= icon name if HISTORYEVENTS_REGISTERED_IN_ICOLIB is set.
- // Always use this one when retrieving
- supports :int; // What kind of return is supported - or of HISTORYEVENTS_FORMAT_*
- flags :int; // or of HISTORYEVENTS_FLAG_*
- pfGetHistoryEventText:fGetHistoryEventText; // NULL to use default get text (similar to message, without extra format)
-
- // Aditional data if wants to use add to history services
- templates:^PAnsiChar; // Each entry is: "Name\nDefault\n%var%\tDescription\n%var%\tDescription\n%var%\tDescription"
- numTemplates:int;
- end;
-const
-{
- Get the number of registered events
-
- wParam: ignored
- lParam: ignored
- Return: The number of events registered with the plugin
-}
- MS_HISTORYEVENTS_GET_COUNT:PAnsiChar = 'HistoryEvents/GetCount';
-
-{
- Get an event by number or by type.
- To retrieve by number, pass -1 as type. To retrieve by type, pass -1 as number.
-
- wParam: (int) event number
- lParam: (int) event type
- Return: (const HISTORY_EVENT_HANDLER *) if the event exists, NULL otherwise. Don't change the
- returned strunc: it is a pointer to the internall struct.
-}
- MS_HISTORYEVENTS_GET_EVENT:PAnsiChar = 'HistoryEvents/GetEvent';
-
-{
- Register a plugin that can handle an event type. This must be called during the call to the
- Load function of the plugin. In ModulesLoaded callback all plugins have to be already
- registered, so srmm and history modules can query then.
-
- wParam: HISTORY_EVENT_HANDLER *
- lParam: ignored
- Return: 0 for success
-}
- MS_HISTORYEVENTS_REGISTER:PAnsiChar = 'HistoryEvents/Register';
-
-
-type
- HISTORY_EVENT_PARAM = record
- cbSize :int;
- hDbEvent:THANDLE;
- dbe :PDBEVENTINFO; // Optional
- format :int; // one of HISTORYEVENTS_FORMAT_*
- end;
-
-const
-{
- Check if an event can be handled by any subscribers
-
- wParam: WORD - event type
- lParam: ignored
- Return: BOOL
-}
- MS_HISTORYEVENTS_CAN_HANDLE:PAnsiChar = 'HistoryEvents/CanHandle';
-
-{
- Get the icon for a history event type
-
- wParam: WORD - event type
- lParam: ignored
- Return: HICON - after use free with MS_HISTORYEVENTS_RELEASE_ICON
-}
- MS_HISTORYEVENTS_GET_ICON:PAnsiChar = 'HistoryEvents/GetIcon';
-
-{
- Get the flags for a history event type
-
- wParam: WORD - event type
- lParam: ignored
- Return: int - or of HISTORYEVENTS_FLAG_* or -1 if error
-}
- MS_HISTORYEVENTS_GET_FLAGS:PAnsiChar = 'HistoryEvents/GetFlags';
-
-{
- Release the icon for a history event type. This is really just a forward to icolib
-
- wParam: HICON
- lParam: ignored
-}
- MS_HISTORYEVENTS_RELEASE_ICON:PAnsiChar = 'Skin2/Icons/ReleaseIcon';
-
-{
- Get the text for a history event type
-
- wParam: HISTORY_EVENT_PARAM *
- lParam: ignored
- Return: char * or wchar * depending on sent flags. Free with mir_free or MS_HISTORYEVENTS_RELEASE_TEXT
-}
- MS_HISTORYEVENTS_GET_TEXT:PAnsiChar = 'HistoryEvents/GetText';
-
-{
- Release the text for a history event type. Internally is just a call to mir_free
-
- wParam: char * or wchar *
- lParam: ignored
-}
- MS_HISTORYEVENTS_RELEASE_TEXT:PAnsiChar = 'HistoryEvents/ReleaseText';
-
-
-type
- HISTORY_EVENT_ADD = record
- cbSize :int;
- hContact :THANDLE;
- eventType :word;
- templateNum :int;
- variables :^PTCHAR; // TCHAR **variables
- numVariables :int;
- additionalData :pbyte;
- additionalDataSize:int;
- flags :int; // Flags for the event type
- end;
-
-const
-{
- Add an registered event to the history. This is a helper service
-
- wParam: HISTORY_EVENT_ADD
- lParam: ignored
- Return: HANDLE to the db event
-}
- MS_HISTORYEVENTS_ADD_TO_HISTORY:PAnsiChar = 'HistoryEvents/AddToHistory';
-
-{
- Check if a template is enabled
-
- wParam: event type
- lParam: template num
- Return: TRUE or FALSE
-}
- MS_HISTORYEVENTS_IS_ENABLED_TEMPLATE:PAnsiChar = 'HistoryEvents/IsEnabledTemplate';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_hotkeys.inc b/delphi/Awkward/include/m_hotkeys.inc
deleted file mode 100644
index 31b0195..0000000
--- a/delphi/Awkward/include/m_hotkeys.inc
+++ /dev/null
@@ -1,93 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_HOTKEYS}
-{$DEFINE M_HOTKEYS}
-
-const
- HKD_UNICODE = $0001;
-const
- HOTKEYDESC_SIZE_V1 = 7*SizeOf(dword); //(offsetof(HOTKEYDESC, dwFlags))
-
-type
- HOTKEYDESC = record
- cbSize :int;
- pszName :PAnsiChar; // name to refer to hotkey when playing and in db
- pszDescription:TChar; // description for options dialog
- pszSection :TChar; // section name used to group sounds (NULL is acceptable)
- pszService :PAnsiChar; // Service to call when HotKey Pressed
- DefHotKey :word; // default hot key for action
- lParam :LPARAM; // lParam to pass to service
- dwFlags :dword; // Miranda ver >=9.0
- end;
- THOTKEYDESC = HOTKEYDESC;
-
-const
- HKF_MIRANDA_LOCAL = $8000;
-
-{ use this macro to defile hotkey codes like this:
- hkd.DefHotkey = HOTKEYCODE(HOTKEYF_SHIFT|HOTKEYF_EXT, 'A');
-}
-// HOTKEYCODE(mod,vk) (MAKEWORD((vk),(mod)))
-
-{ CoreHotkeys/Register service
-Registers new hotkey
- wParam=(WPARAM)0
- lParam=(LPARAM)(HOTKEYDESC *)hotkey
-Returns 0 on failure or hotkey atom id on success
-}
- MS_HOTKEY_REGISTER :PAnsiChar = 'CoreHotkeys/Register';
-
-{ CoreHotkeys/Unregister service
-Unregister existing hotkey
- wParam=(WPARAM)0
- lParam=(LPARAM)(AnsiChar *)pszName
-Returns 0 on success or nonzero otherwise
-}
- MS_HOTKEY_UNREGISTER:PAnsiChar = 'CoreHotkeys/Unregister';
-
-{ CoreHotkeys/Check service
-Checks if "manual" hotkey was activated and returns its id.
- wParam=(WPARAM)(MSG *)message
- lParam=(LPARAM)(AnsiChar *)pszSection
-Returns lParam associated with activated hotkey
-}
- MS_HOTKEY_CHECK :PAnsiChar = 'CoreHotkeys/Check';
-
-{ Subclass/unsubclass edit box to act as hotkey control
- wParam=(WPARAM)(HWND)hwndEdit
- lParam=(LPARAM)0
-Returns zero on success
-
-You will get notification with LOWORD(wParam) == 0 when users sets hotkey.
-
-Subclassed control processes HKM_SETHOTKEY and HKM_GETHOTKEY similarly to
-windows' hotkey, in all other it acts just like normal editbox (beware of
-standart notifications that occur on text updates!)
-
-Subclass procedure uses GWL_USERDATA to store internal information. Do not
-use it for own purposes.
-}
- MS_HOTKEY_SUBCLASS :PAnsiChar = 'CoreHotkeys/Subclass';
- MS_HOTKEY_UNSUBCLASS :PAnsiChar = 'CoreHotkeys/Unsubclass';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_icolib.inc b/delphi/Awkward/include/m_icolib.inc
deleted file mode 100644
index 62225cc..0000000
--- a/delphi/Awkward/include/m_icolib.inc
+++ /dev/null
@@ -1,112 +0,0 @@
-{$IFNDEF ICOLIB}
-{$DEFINE ICOLIB}
-
-type
-// WARNING: do not use Translate(TS) for p(t)szSection or p(t)szDescription as they
-// are translated by the core, which may lead to double translation.
-// Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl".
- PSKINICONDESC = ^TSKINICONDESC;
- TSKINICONDESC = record
- cbSize :int;
- szSection :TChar; // [TRANSLATED-BY-CORE] section name used to group icons
- szDescription :TChar; // [TRANSLATED-BY-CORE] description for options dialog
- pszName :PAnsiChar; // name to refer to icon when playing and in db
- // this name is miranda-wide. so use prefixes of
- // your plugin: "isee_connect", "clist_delete", etc
- pszDefaultFile :TChar; // default icon file to use
- iDefaultIndex :int; // index of icon in default file
- // V2
- hDefaultIcon :HICON; // handle to default icon
- // V3
- cx, cy :int; // dimensions of icon (if 0 then standard size icon (big and small options available)
- // new
- flags :int;
- end;
-
-const
- SKINICONDESC_SIZE = SizeOf(TSKINICONDESC);
- SKINICONDESC_SIZE_V1 = $18;
- SKINICONDESC_SIZE_V2 = $1C;
- SKINICONDESC_SIZE_V3 = $24;
-
-const
- SIDF_SORTED = 1; // Icons in section are sorted by name
- SIDF_UNICODE = $100; // Section and Description are in UCS-2
- SIDF_PATH_UNICODE = $200; // Default File is in UCS-2
- SIDF_ALL_UNICODE = SIDF_PATH_UNICODE or SIDF_UNICODE;
-
-const
-{
- Add a icon into options UI
-
- wParam = 0
- lParam = PSKINICONDESC
- returns a handle to the newly added item
-}
- MS_SKIN2_ADDICON:PAnsiChar = 'Skin2/Icons/AddIcon';
-
-{
- Remove a icon from options UI
-
- wParam = 0
- lParam = pszName
- WARNING: This will invalidate all HICONs retrieved for specified pszName
-}
- MS_SKIN2_REMOVEICON:PAnsiChar = 'Skin2/Icons/RemoveIcon';
-{
- Retrieve HICON with name specified in lParam
- Returned HICON SHOULDN'T be destroyed, it managed by IcoLib
-
- wParam = 0 - small 1 - big
- lParam = pszName
-}
- MS_SKIN2_GETICON :PAnsiChar = 'Skin2/Icons/GetIcon';
-
-{
- Retrieve an icolib handle for icon by name specified in lParam
-
- wParam = 0
- lParam = (LPARAM)(char*)pszName
-}
- MS_SKIN2_GETICONHANDLE:PAnsiChar = 'Skin2/Icons/GetIconHandle';
-
-{
- Retrieve HICON with HANDLE specified in lParam
- Returned HICON SHOULDN'T be destroyed, it is managed by IcoLib
-
- wParam = (WPARAM)0 - small 1 - big
- lParam = (HANDLE)hIcoLibIcon
-}
- MS_SKIN2_GETICONBYHANDLE:PAnsiChar = 'Skin2/Icons/GetIconByHandle';
-
-{
- Add reference to HICON
-
- wParam = (WPARAM)HICON
- lParam = 0 - small 1 - big
-}
- MS_SKIN2_ADDREFICON:PAnsiChar = 'Skin2/Icons/AddRef';
-
-{
- Retrieved HICON is not needed anymore (this helps optimize GDI usage)
-
- wParam = HICON (optional)
- lParam = pszName (optional) // at least one needs to be specified
-}
- MS_SKIN2_RELEASEICON :PAnsiChar = 'Skin2/Icons/ReleaseIcon';
- MS_SKIN2_RELEASEICONBIG:PAnsiChar = 'Skin2/Icons/ReleaseIconBig';
-
-{
- Check whether HICON is managed by IcoLib
-
- wParam = (WPARAM)HICON
- lParam = 0
-}
- MS_SKIN2_ISMANAGEDICON:PAnsiChar = 'Skin2/Icons/IsManaged';
-
-{
- Icons change notification
-}
- ME_SKIN2_ICONSCHANGED:PAnsiChar = 'Skin2/IconsChanged';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_iconheader.inc b/delphi/Awkward/include/m_iconheader.inc
deleted file mode 100644
index 1d99c41..0000000
--- a/delphi/Awkward/include/m_iconheader.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2007 Artem Shpynov
-Copyright 2000-2007 Miranda ICQ/IM project,
-
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ICONHEADER}
-{$DEFINE M_ICONHEADER}
-
-const
- MIRANDAICOTABCLASS = 'MirandaIcoTabClass';
-
- MITCF_SHAREDICON = $01;
- MITCF_UNICODE = $02;
-
- ITCM_FIRST = (WM_USER+1024);
- ITCM_LAST = (ITCM_FIRST+64);
-
- ITCM_SETBACKGROUND = (ITCM_FIRST+1); //LPARAM is HBITMAP
- ITCM_ADDITEM = (ITCM_FIRST+2); //LPARAM is pointer to MIcoTab
- ITCM_SETSEL = (ITCM_FIRST+3); //WPARAM is new selected index
- ITCM_GETSEL = (ITCM_FIRST+4); //result is selected item index
- ITCM_GETITEMDATA = (ITCM_FIRST+5); //WPARAM is item index, result is custom data
-
- ITCN_SELCHANGED = 1;
- ITCN_SELCHANGEDKBD = 2;
-// structure is used for storing info about single tab
-type
- MIcoTab = record
- hIcon:HICON;
- szzName:TChar;
- flag:dword;
- data:LPARAM;
- end;
-
-(*
-#define MIcoTab_SetBackground(hwnd, hBmp) \
- (SendMessage((hwnd), ITCM_SETBACKGROUND, 0, (LPARAM)(hBmp)))
-#define MIcoTab_SetSel(hwnd, idx) \
- (SendMessage((hwnd), ITCM_SETSEL, (idx), 0))
-#define MIcoTab_GetSel(hwnd) \
- (SendMessage((hwnd), ITCM_GETSEL, 0, 0))
-#define MIcoTab_GetItemData(hwnd, idx) \
- (SendMessage((hwnd), ITCM_GETITEMDATA, (idx), 0))
-
-static __forceinline void MIcoTab_AddItem(HWND hwnd, TCHAR *lptzName, HICON hIcon, LPARAM data, BOOL bSharedIcon)
-{
- MIcoTab mit = {0};
- mit.flag = (bSharedIcon?MITCF_SHAREDICON:0)|MITCF_TCHAR;
- mit.hIcon = hIcon;
- mit.tcsName = lptzName;
- mit.data = data;
- SendMessage(hwnd, ITCM_ADDITEM, (WPARAM)&mit, 0);
-}
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_icq.inc b/delphi/Awkward/include/m_icq.inc
deleted file mode 100644
index 36094b9..0000000
--- a/delphi/Awkward/include/m_icq.inc
+++ /dev/null
@@ -1,374 +0,0 @@
-{ ---------------------------------------------------------------------------
- ICQ plugin for Miranda Instant Messenger
- ________________________________________
-
- Copyright c 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
- Copyright c 2001-2002 Jon Keating, Richard Hughes
- Copyright c 2002-2004 Martin –berg, Sam Kothari, Robert Rainwater
- Copyright c 2004-2009 Joe Kucera
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- -----------------------------------------------------------------------------
-
-// File name : $URL: https://svn.sourceforge.net/svnroot/miranda/trunk/miranda/include/m_icq.h $
-// Revision : $Revision: 9376 $
-// Last change on : $Date: 2009-04-09 23:55:33 +0400 (‘', 09 øõ‘? 2009) $
-// Last change by : $Author: jokusoftware $
-
- DESCRIPTION:
-
- Describe me here please...
-
- -----------------------------------------------------------------------------
- Note: In v0.3 the part before "/Servicename" is dynamic. It will be the name of the protocol.
- Example: If the plugin was loaded from ICQ.dll, the service name is "ICQ/Servicename", and if
- the dll was Icq2.dll, the service name will be "Icq2/Servicename". This behaviour is temporary
- until proper multiaccounts are implemented.
-}
-
-{$IFNDEF M_ICQ}
-{$DEFINE M_ICQ}
-// extended search result structure, used for all searches
-type
- PICQSEARCHRESULT = ^TICQSEARCHRESULT;
- TICQSEARCHRESULT = record
- hdr : TPROTOSEARCHRESULT;
- uin : DWORD;
- auth: BYTE;
-
- // not presents in new version
- uid :PAnsiChar;
- nick :PAnsiChar; // utf-8
- firstName :PAnsiChar;
- lastName :PAnsiChar;
-
- gender :byte;
- age :byte;
- country :dword;
- maritalStatus:byte;
- end;
-(*
-{
- start a search of all ICQ users by e-mail
- wParam=0
- lParam=(LPARAM)(const AnsiChar* )email
- returns a handle to the search on success, NULL on failure
- Results are returned using the same scheme documented in PSS_BASICSEARCH
- **DEPRECATED** in favour of PS_SEARCHBYEMAIL
-}
-const
- MS_ICQ_SEARCHBYEMAIL = '/SearchByEmail';
-{
- start a search of all ICQ users by details
- wParam=0
- lParam=(LPARAM)(ICQDETAILSSEARCH* )&ids
- returns a handle to the search on success, NULL on failure
- Results are returned using the same scheme documented in PSS_BASICSEARCH
- **DEPRECATED** in favour of PS_SEARCHBYNAME
-}
-type
- PICQDETAILSSEARCH = ^TICQDETAILSSEARCH;
- TICQDETAILSSEARCH = record
- nick : PAnsiChar;
- firstName : PAnsiChar;
- lastName : PAnsiChar;
- end;
-
-const
- MS_ICQ_SEARCHBYDETAILS = '/SearchByDetails';
-*)
-{
- Request authorization
- wParam=(WPARAM)hContact
-}
-const
- MS_REQ_AUTH = '/ReqAuth';
-{
- Grant authorization
- wParam=(WPARAM)hContact;
-}
- MS_GRANT_AUTH = '/GrantAuth';
-{
- Revoke authorization
- wParam=(WPARAM)hContact
-}
- MS_REVOKE_AUTH = '/RevokeAuth';
-{
- Add contact to server-list
- wParam=(WPARAM)hContact
-}
- MS_ICQ_ADDSERVCONTACT = '/AddServerContact';
-{
- Display XStatus detail (internal use only)
- wParam=(WPARAM)hContact;
-}
- MS_XSTATUS_SHOWDETAILS = '/ShowXStatusDetails';
-{Send an SMS via the ICQ network
-wParam=(WPARAM)(const AnsiChar*)szPhoneNumber
-lParam=(LPARAM)(const AnsiChar*)szMessage
-Returns a HANDLE to the send on success, or NULL on failure
-szPhoneNumber should be the full number with international code and preceeded
- by a +
-
-When the server acks the send, an ack will be broadcast:
- type=ICQACKTYPE_SMS, result=ACKRESULT_SENTREQUEST, lParam=(LPARAM)(AnsiChar*)szInfo
-At this point the message is queued to be delivered. szInfo contains the raw
-XML data of the ack. Here's what I got when I tried:
-"<sms_response><source>airbornww.com</source><deliverable>Yes</deliverable><network>BT Cellnet, United Kingdom</network><message_id>[my uin]-1-1955988055-[destination phone#, without +]</message_id><messages_left>0</messages_left></sms_response>\r\n"
-Now the hProcess has been deleted. The only way to track which receipt
-corresponds with which response is to parse the <message_id> field.
-At a (possibly much) later time the SMS will have been delivered. An ack will
-be broadcast:
- type=ICQACKTYPE_SMS, result=ACKRESULT_SUCCESS, hProcess=NULL, lParam=(LPARAM)(AnsiChar*)szInfo
-Note that the result will always be success even if the send failed, just to
-save needing to have an attempt at an XML parser in the ICQ module.
-Here's the szInfo for a success:
-"<sms_delivery_receipt><message_id>[my uin]-1--1461632229-[dest phone#, without +]</message_id><destination>[dest phone#, without +]</destination><delivered>Yes</delivered><text>[first 20 bytes of message]</text><submition_time>Tue, 30 Oct 2001 22:35:16 GMT</submition_time><delivery_time>Tue, 30 Oct 2001 22:34:00 GMT</delivery_time></sms_delivery_receipt>"
-And here's a failure:
-"<sms_delivery_receipt><message_id>[my uin]-1-1955988055-[destination phone#, without leading +]</message_id><destination>[destination phone#, without leading +]</destination><delivered>No</delivered><submition_time>Tue, 23 Oct 2001 23:17:02 GMT</submition_time><error_code>999999</error_code><error><id>15</id><params><param>0</param><param>Multiple message submittion failed</param></params></error></sms_delivery_receipt>"
-SMSes received from phones come through this same ack, again to avoid having
-an XML parser in the protocol module. Here's one I got:
-"<sms_message><source>MTN</source><destination_UIN>[UIN of recipient, ie this account]</destination_UIN><sender>[sending phone number, without +]</sender><senders_network>[contains one space, because I sent from ICQ]</senders_network><text>[body of the message]</text><time>Fri, 16 Nov 2001 03:12:33 GMT</time></sms_message>"
-}
- ICQACKTYPE_SMS = 1001;
- ICQEVENTTYPE_SMS = 2001; {database event type }
- MS_ICQ_SENDSMS = '/SendSMS';
-
-{
- e-mail express
- db event added to NULL contact
- blob format is:
- ASCIIZ text, usually of the form "Subject: %s\r\n%s"
- ASCIIZ from name
- ASCIIZ from e-mail
-}
- ICQEVENTTYPE_EMAILEXPRESS = 2002; // database event type
-{
- www pager
- db event added to NULL contact
- blob format is:
- ASCIIZ text, usually "Sender IP: xxx.xxx.xxx.xxx\r\n%s"
- ASCIIZ from name
- ASCIIZ from e-mail
-}
- ICQEVENTTYPE_WEBPAGER = 2003; // database event type
-{
- missed message notification
- db event added to contact's history
- blob format is:
- WORD error code
-}
- ICQEVENTTYPE_MISSEDMESSAGE = 2004; //database event type
-{
- for server-side lists, used internally only
- hProcess=dwSequence
- lParam=server's error code, 0 for success
-}
- ICQACKTYPE_SERVERCLIST = 1003;
-{
- for rate warning distribution (mainly upload dlg)
- hProcess=Rate class ID
- lParam=server's status code
-}
- ICQACKTYPE_RATEWARNING = 1004;
-{
- received Xtraz Notify response
- hProcess=dwSequence
- lParam=contents of RES node
-}
- ICQACKTYPE_XTRAZNOTIFY_RESPONSE = 1005;
-{
- received Custom Status details response
- hProcess=dwSequence
- lParam=0
-}
- ICQACKTYPE_XSTATUS_RESPONSE = 1006;
-
-//Update user details on server
-//Permited operation types:
- CIXT_BASIC = $0001;
- CIXT_MORE = $0002;
- CIXT_WORK = $0004;
- CIXT_CONTACT = $0008;
- CIXT_LOCATION = $0010;
- CIXT_BACKGROUND = $0020;
- CIXT_EDUCATION = $0040;
- CIXT_EXTRA = $0080;
- CIXT_FULL = $00FF;
-
-//wParam=operationType
- PS_CHANGEINFOEX = '/ChangeInfoEx';
-
-{
- Change nickname in White pages
- lParam=(LPARAM)(const AnsiChar*)szNewNickName
-}
- PS_SET_NICKNAME = '/SetNickname';
-
-{
- Set password for current session
- lParam=(LPARAM)(const AnsiChar*)szPassword
-}
- PS_ICQ_SETPASSWORD = '/SetPassword';
-
-{
- miranda/icqoscar/statusmsgreq event
- called when our status message is requested
- wParam=(BYTE)msgType
- lParam=(DWORD)uin
- msgType is one of the ICQ_MSGTYPE_GET###MSG constants in icq_constants.h
- uin is the UIN of the contact requesting our status message
-}
- ME_ICQ_STATUSMSGREQ = '/StatusMsgReq';
-
-{
- set owner avatar
- wParam=0
- lParam=(const AnsiChar *)Avatar file name
- return=0 for sucess
-}
- PS_ICQ_SETMYAVATAR = '/SetMyAvatar';
-
-{
- get current owner avatar
- wParam=(AnsiChar *)Buffer to file name
- lParam=(int)Buffer size
- return=0 for sucess
-}
- PS_ICQ_GETMYAVATAR = '/GetMyAvatar';
-
-{
- get size limit for avatar image
- wParam=(int *)max width of avatar - will be set
- lParam=(int *)max height of avatar - will be set
- return=0 for sucess
-}
- PS_ICQ_GETMYAVATARMAXSIZE = '/GetMyAvatarMaxSize';
-
-{
- check if image format supported for avatars
- wParam = 0
- lParam = PA_FORMAT_* // avatar format
- return = 1 (supported) or 0 (not supported)
-}
- PS_ICQ_ISAVATARFORMATSUPPORTED = '/IsAvatarFormatSupported';
-
-{ Custom Status helper API *
- - to set custom status message & title use PS_ICQ_GETCUSTOMSTATUS to obtain
- DB settings and write values to them (UTF-8 strings best).
- - use PS_ICQ_GETCUSTOMSTATUSEX and PS_ICQ_SETCUSTOMSTATUSEX for controling Custom Status
- - custom messages for each user supported - ME_ICQ_STATUSMSGREQ with type MTYPE_SCRIPT_NOTIFY
-}
-
- CSSF_MASK_STATUS = $0001; // status member valid for set/get
- CSSF_MASK_NAME = $0002; // pszName member valid for set/get
- CSSF_MASK_MESSAGE = $0004; // pszMessage member valid for set/get
- CSSF_DISABLE_MENU = $0020; // disable default custom status menu, wParam = bEnable
- CSSF_DISABLE_UI = $0040; // disable default custom status UI, wParam = bEnable
- CSSF_DEFAULT_NAME = $0080; // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status)
- CSSF_STATUSES_COUNT = $0100; // returns number of custom statuses in wParam, only get API
- CSSF_STR_SIZES = $0200; // returns sizes of custom status name & message (wParam & lParam members) in chars
- CSSF_UNICODE = $1000; // strings are in UCS-2
-
-type
- PICQ_CUSTOM_STATUS = ^TICQ_CUSTOM_STATUS;
- TICQ_CUSTOM_STATUS = record
- cbSize :int; // size of the structure
- flags :int; // combination of CSSF_*
- status :^int; // custom status id
- szName :TChar; // buffer for custom status name
- szMessage:TChar; // buffer for custom status message
- wParam :^WPARAM; // extra params, see flags
- lParam :^LPARAM;
- end;
-
-const
-{
- Sets owner current custom status
- wParam = (int)N // custom status id (1-29)
- lParam = 0
- return = N (id of status set) or 0 (failed - probably bad params)
-}
- PS_ICQ_SETCUSTOMSTATUS = '/SetXStatus';
-
-{
- Sets owner current custom status
- wParam = 0 // reserved
- lParam = (ICQ_CUSTOM_STATUS*)pData // contains what to set and new values
- return = 0 (for success)
-}
- PS_ICQ_SETCUSTOMSTATUSEX = '/SetXStatusEx';
-
-{
- Retrieves custom status details for specified hContact
- wParam = (HANDLE)hContact
- lParam = (ICQ_CUSTOM_STATUS*)pData // receives details (members must be prepared)
- return = 0 (for success)
-}
- PS_ICQ_GETCUSTOMSTATUSEX = '/GetXStatusEx';
-
-const
- LR_BIGICON = $40;
-{
- Retrieves specified custom status icon
- wParam = (int)N // custom status id (1-32), 0 = my current custom status
- lParam = flags // use LR_SHARED for shared HICON, LR_BIGICON for 32x32 icon
- return = HICON // custom status icon (use DestroyIcon to release resources)
-}
- PS_ICQ_GETCUSTOMSTATUSICON = '/GetXStatusIcon';
-
-{
- Get Custom status DB field names & current owner custom status
- wParam = (AnsiChar**)szDBTitle // will receive title DB setting name (do not free)
- lParam = (AnsiChar**)szDBMsg // will receive message DB setting name
- Return = N // current custom status id if successful, 0 otherwise
-}
- PS_ICQ_GETCUSTOMSTATUS = '/GetXStatus';
-
-{
- Request Custom status details (messages) for specified contact
- wParam = hContact // request custom status details for this contact
- lParam = 0
- return = (int)dwSequence // if successful it is sequence for ICQACKTYPE_XSTATUS_RESPONSE
- 0 failed to request (e.g. auto-request enabled)
- -1 delayed (rate control) - sequence unknown
-}
- PS_ICQ_REQUESTCUSTOMSTATUS = '/RequestXStatusDetails';
-
-{
- Called when contact changes custom status and extra icon is set to clist_mw
- wParam = hContact // contact changing status
- lParam = hIcon // HANDLE to clist extra icon set as custom status
-}
- ME_ICQ_CUSTOMSTATUS_EXTRAICON_CHANGED = '/XStatusExtraIconChanged';
-
-{
- Called when a contact changes its custom status
- wParam = hContact
- lParam = 0
-}
- ME_ICQ_CUSTOMSTATUS_CHANGED = '/XStatusChanged';
-
-{
- Called from contact list in order to get index of custom status icon in list
- wParam = hContact
- lParam = 0
- return = (int) index of extra contact icon shifted <<16
- (the low word will be normal status icon, the high will be xStatus Icon)
-}
- PS_ICQ_GETADVANCEDSTATUSICON = '/GetAdvancedStatusIcon';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_ignore.inc b/delphi/Awkward/include/m_ignore.inc
deleted file mode 100644
index 9880e9b..0000000
--- a/delphi/Awkward/include/m_ignore.inc
+++ /dev/null
@@ -1,73 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_IGNORE}
-{$DEFINE M_IGNORE}
-
-// this module only provides UI and storage for blocking only, protocol modules
-// are responsible for implementing the block
-
-const
- IGNOREEVENT_ALL = LPARAM(-1);
- IGNOREEVENT_MESSAGE = 1;
- IGNOREEVENT_URL = 2;
- IGNOREEVENT_FILE = 3;
- IGNOREEVENT_USERONLINE = 4;
- IGNOREEVENT_AUTHORIZATION = 5;
- IGNOREEVENT_YOUWEREADDED = 6; // 0.3.3a+
- IGNOREEVENT_TYPINGNOTIFY = 7; // 0.7+
-
- {
- wParam : HCONTACT
- lParam : IGNOREEVENT_*
- Affects: Determines if a message type to a contact should be ignored, see notes
- Returns: 0 if the message type MUST be shown [non zero] if it MUST be ignored
- Notes : HCONTACT can be NULL(0) to see what to do with a contact
- that isn't on the list (or is unknown in some way)
- don't use the IGNOREEVENT_ALL type!
- Version: v0.1.0.1+
- }
- MS_IGNORE_ISIGNORED:PAnsiChar = 'Ignore/IsIgnored';
-
- {
- wParam : HCONTACT
- lParam : IGNOREEVENT_* constant
- Affects: Ignore future messages from a contact, see notes
- Returns: 0 on success, [nonzero] on failure
- Notes : wParam: NULL(0) can be used to see if an unknown contact should be
- ignored or not - you can't SET unknown contact's ignore types, this
- is to stop a plugin allowing certain functions (I guess)
- Version: v0.1.0.1+
- }
- MS_IGNORE_IGNORE:PAnsiChar = 'Ignore/Ignore';
-
- {
- wParam : HCONTACT
- lParam : IGNOREEVENT_*
- Affects: Receive future messages from a contact -- of the given type, see notes
- Returns: 0 on success, non zero on failure
- Notes : Use NULL(0) for HCONTACT to retrieve the setting for an unknown contact
- Version: v0.1.0.1+
- }
- MS_IGNORE_UNIGNORE:PAnsiChar = 'Ignore/Unignore';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_imgsrvc.inc b/delphi/Awkward/include/m_imgsrvc.inc
deleted file mode 100644
index be3fd7b..0000000
--- a/delphi/Awkward/include/m_imgsrvc.inc
+++ /dev/null
@@ -1,557 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
------------------------------------------------------------------------
-Miranda Image services plugin / API definitions
-Provides various services for image loading, saving and manipulations.
-
-This module is based on the freeimage library, copyrighted by the FreeImage
-Project members.
-
-Miranda plugin code (c) 2007 by Nightwish, silvercircle@gmail.com, all else (C)
-by the FreeImage project (http://freeimage.sourceforge.net)
-}
-
-{$IFNDEF M_IMGSRVC}
-{$DEFINE M_IMGSRVC}
-
-{.$include m_freeimage.inc}
-//#define _FI_MIMPLUGIN 1
-
-const
- FI_IF_VERSION = $00000100; // interface version - must match
-
-// memory i/o defs
-
-{
- this struct defines a memio job.
- datalen and filename must match and must be populated to the size of the memory buffer (caution)
- data must point to the buffer.
- curpos is internal and should be initialized to 0
-}
-
-type
- fiio_mem_handle = record
- filelen,
- datalen,
- curpos:cardinal;
- data:pointer;
- end;
- fiio_mem_handle_s = fiio_mem_handle;
-{
- it is up to the user to create a fiio_mem_handle and init datalen and data
- filelen will be pre-set to 0 by SaveToMem
- curpos will be pre-set to 0 by SaveToMem and LoadFromMem
- IMPORTANT: data should be set to NULL and datalen to 0,
- unless the user wants to manually malloc a larger buffer
-}
-(*
-FIBITMAP *FreeImage_LoadFromMem(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
-BOOL FreeImage_SaveToMem(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
-
-void SetMemIO(FreeImageIO *io);
-unsigned __stdcall fiio_mem_ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
-unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
-int __stdcall fiio_mem_SeekProc(fi_handle handle, long offset, int origin);
-long __stdcall fiio_mem_TellProc(fi_handle handle);
-*)
-{
- this interface directly exports most of FreeImage routines
- you can use them in your plugin after obtaining the interfasce using MS_IMG_GETINTERFACE
-}
-(*
-typedef struct _tagFI_interface {
-
- DWORD version;
-
- FIBITMAP *(DLL_CALLCONV *FI_Allocate)(int width, int height, int bpp, unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI__AllocateT)(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_Clone)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_Unload)(FIBITMAP *dib);
-
- // Load / Save routines -----------------------------------------------------
-
- FIBITMAP *(DLL_CALLCONV *FI_Load)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, int flags FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_LoadU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_LoadFromHandle)(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_Save)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const AnsiChar *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveU)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, const wchar_t *filename, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToHandle)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
-
-// Memory I/O stream routines -----------------------------------------------
-
- FIMEMORY *(DLL_CALLCONV *FI_OpenMemory)(BYTE *data FI_DEFAULT(0), DWORD size_in_bytes FI_DEFAULT(0));
- void (DLL_CALLCONV *FI_CloseMemory)(FIMEMORY *stream);
- FIBITMAP *(DLL_CALLCONV *FI_LoadFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_SaveToMemory)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, FIMEMORY *stream, int flags FI_DEFAULT(0));
- long (DLL_CALLCONV *FI_TellMemory)(FIMEMORY *stream);
- BOOL (DLL_CALLCONV *FI_SeekMemory)(FIMEMORY *stream, long offset, int origin);
- BOOL (DLL_CALLCONV *FI_AcquireMemory)(FIMEMORY *stream, BYTE **data, DWORD *size_in_bytes);
- unsigned (DLL_CALLCONV *FI_ReadMemory)(void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
- unsigned (DLL_CALLCONV *FI_WriteMemory)(const void *buffer, unsigned size, unsigned count, FIMEMORY *stream);
- FIMULTIBITMAP *(DLL_CALLCONV *FI_LoadMultiBitmapFromMemory)(FREE_IMAGE_FORMAT fif, FIMEMORY *stream, int flags FI_DEFAULT(0));
-
-// Plugin Interface ---------------------------------------------------------
-
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterLocalPlugin)(FI_InitProc proc_address, const AnsiChar *format FI_DEFAULT(0), const AnsiChar *description FI_DEFAULT(0), const AnsiChar *extension FI_DEFAULT(0), const AnsiChar *regexpr FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_RegisterExternalPlugin)(const AnsiChar *path, const AnsiChar *format FI_DEFAULT(0), const AnsiChar *description FI_DEFAULT(0), const AnsiChar *extension FI_DEFAULT(0), const AnsiChar *regexpr FI_DEFAULT(0));
- int (DLL_CALLCONV *FI_GetFIFCount)(void);
- int (DLL_CALLCONV *FI_SetPluginEnabled)(FREE_IMAGE_FORMAT fif, BOOL enable);
- int (DLL_CALLCONV *FI_IsPluginEnabled)(FREE_IMAGE_FORMAT fif);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFormat)(const AnsiChar *format);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromMime)(const AnsiChar *mime);
- const AnsiChar *(DLL_CALLCONV *FI_GetFormatFromFIF)(FREE_IMAGE_FORMAT fif);
- const AnsiChar *(DLL_CALLCONV *FI_GetFIFExtensionList)(FREE_IMAGE_FORMAT fif);
- const AnsiChar *(DLL_CALLCONV *FI_GetFIFDescription)(FREE_IMAGE_FORMAT fif);
- const AnsiChar *(DLL_CALLCONV *FI_GetFIFRegExpr)(FREE_IMAGE_FORMAT fif);
- const AnsiChar *(DLL_CALLCONV *FI_GetFIFMimeType)(FREE_IMAGE_FORMAT fif);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilename)(const AnsiChar *filename);
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFIFFromFilenameU)(const wchar_t *filename);
- BOOL (DLL_CALLCONV *FI_FIFSupportsReading)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsWriting)(FREE_IMAGE_FORMAT fif);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportBPP)(FREE_IMAGE_FORMAT fif, int bpp);
- BOOL (DLL_CALLCONV *FI_FIFSupportsExportType)(FREE_IMAGE_FORMAT fif, FREE_IMAGE_TYPE type);
- BOOL (DLL_CALLCONV *FI_FIFSupportsICCProfiles)(FREE_IMAGE_FORMAT fif);
-
-// Multipaging interface ----------------------------------------------------
-
- FIMULTIBITMAP *(DLL_CALLCONV *FI_OpenMultiBitmap)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, BOOL create_new, BOOL read_only, BOOL keep_cache_in_memory FI_DEFAULT(FALSE), int flags FI_DEFAULT(0));
- BOOL (DLL_CALLCONV *FI_CloseMultiBitmap)(FIMULTIBITMAP *bitmap, int flags FI_DEFAULT(0));
- int (DLL_CALLCONV *FI_GetPageCount)(FIMULTIBITMAP *bitmap);
- void (DLL_CALLCONV *FI_AppendPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data);
- void (DLL_CALLCONV *FI_InsertPage)(FIMULTIBITMAP *bitmap, int page, FIBITMAP *data);
- void (DLL_CALLCONV *FI_DeletePage)(FIMULTIBITMAP *bitmap, int page);
- FIBITMAP *(DLL_CALLCONV *FI_LockPage)(FIMULTIBITMAP *bitmap, int page);
- void (DLL_CALLCONV *FI_UnlockPage)(FIMULTIBITMAP *bitmap, FIBITMAP *data, BOOL changed);
- BOOL (DLL_CALLCONV *FI_MovePage)(FIMULTIBITMAP *bitmap, int target, int source);
- BOOL (DLL_CALLCONV *FI_GetLockedPageNumbers)(FIMULTIBITMAP *bitmap, int *pages, int *count);
-
-// Filetype request routines ------------------------------------------------
-
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileType)(const AnsiChar *filename, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeU)(const wchar_t *filename, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeFromHandle)(FreeImageIO *io, fi_handle handle, int size FI_DEFAULT(0));
- FREE_IMAGE_FORMAT (DLL_CALLCONV *FI_GetFileTypeFromMemory)(FIMEMORY *stream, int size FI_DEFAULT(0));
-
-// FreeImage helper routines ------------------------- MISSING !!!! TODO
-
- BOOL (DLL_CALLCONV *FI_IsLittleEndian)(void);
- BOOL (DLL_CALLCONV *FI_LookupX11Color)(const AnsiChar *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
- BOOL (DLL_CALLCONV *FI_LookupSVGColor)(const AnsiChar *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nBlue);
-
-// Image type request routine -----------------------------------------------
-
- FREE_IMAGE_TYPE (DLL_CALLCONV *FI_GetImageType)(FIBITMAP *dib);
-
-// Pixel access routines ----------------------------------------------------
-
- BYTE *(DLL_CALLCONV *FI_GetBits)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetScanLine)(FIBITMAP *dib, int scanline);
-
- BOOL (DLL_CALLCONV *FI_GetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_GetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
- BOOL (DLL_CALLCONV *FI_SetPixelIndex)(FIBITMAP *dib, unsigned x, unsigned y, BYTE *value);
- BOOL (DLL_CALLCONV *FI_SetPixelColor)(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value);
-
-// DIB info routines --------------------------------------------------------
-
- unsigned (DLL_CALLCONV *FI_GetColorsUsed)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetBPP)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetWidth)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetHeight)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetLine)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetPitch)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetDIBSize)(FIBITMAP *dib);
- RGBQUAD *(DLL_CALLCONV *FI_GetPalette)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetDotsPerMeterX)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetDotsPerMeterY)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_SetDotsPerMeterX)(FIBITMAP *dib, unsigned res);
- void (DLL_CALLCONV *FI_SetDotsPerMeterY)(FIBITMAP *dib, unsigned res);
-
- BITMAPINFOHEADER *(DLL_CALLCONV *FI_GetInfoHeader)(FIBITMAP *dib);
- BITMAPINFO *(DLL_CALLCONV *FI_GetInfo)(FIBITMAP *dib);
- FREE_IMAGE_COLOR_TYPE (DLL_CALLCONV *FI_GetColorType)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetRedMask)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetGreenMask)(FIBITMAP *dib);
- unsigned (DLL_CALLCONV *FI_GetBlueMask)(FIBITMAP *dib);
-
- unsigned (DLL_CALLCONV *FI_GetTransparencyCount)(FIBITMAP *dib);
- BYTE *(DLL_CALLCONV *FI_GetTransparencyTable)(FIBITMAP *dib);
- void (DLL_CALLCONV *FI_SetTransparent)(FIBITMAP *dib, BOOL enabled);
- void (DLL_CALLCONV *FI_SetTransparencyTable)(FIBITMAP *dib, BYTE *table, int count);
- BOOL (DLL_CALLCONV *FI_IsTransparent)(FIBITMAP *dib);
-
- BOOL (DLL_CALLCONV *FI_HasBackgroundColor)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
- BOOL (DLL_CALLCONV *FI_SetBackgroundColor)(FIBITMAP *dib, RGBQUAD *bkcolor);
-
- // ICC profile routines ------------------------------- MISSING !!! TODO
-
- FIICCPROFILE *(DLL_CALLCONV *FI_GetICCProfile)(FIBITMAP *dib);
- FIICCPROFILE *(DLL_CALLCONV *FI_CreateICCProfile)(FIBITMAP *dib, void *data, long size);
- void (DLL_CALLCONV *FI_DestroyICCProfile)(FIBITMAP *dib);
-
- // Line conversion routines ----------------------------MISSING !!! TODO
-
-// Smart conversion routines ------------------------------------------------
-
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo4Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo8Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToGreyscale)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo16Bits555)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo16Bits565)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo24Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertTo32Bits)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ColorQuantize)(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize);
-
- FIBITMAP *(DLL_CALLCONV *FI_ColorQuantizeEx)(FIBITMAP *dib, FREE_IMAGE_QUANTIZE quantize /*FI_DEFAULT(FIQ_WUQUANT) */, int PaletteSize FI_DEFAULT(256), int ReserveSize FI_DEFAULT(0), RGBQUAD *ReservePalette FI_DEFAULT(NULL));
-
- FIBITMAP *(DLL_CALLCONV *FI_Threshold)(FIBITMAP *dib, BYTE T);
- FIBITMAP *(DLL_CALLCONV *FI_Dither)(FIBITMAP *dib, FREE_IMAGE_DITHER algorithm);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertFromRawBits)(BYTE *bits, int width, int height, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
- void (DLL_CALLCONV *FI_ConvertToRawBits)(BYTE *bits, FIBITMAP *dib, int pitch, unsigned bpp, unsigned red_mask, unsigned green_mask, unsigned blue_mask, BOOL topdown FI_DEFAULT(FALSE));
-
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToRGBF)(FIBITMAP *dib);
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToStandardType)(FIBITMAP *src, BOOL scale_linear FI_DEFAULT(TRUE));
- FIBITMAP *(DLL_CALLCONV *FI_ConvertToType)(FIBITMAP *src, FREE_IMAGE_TYPE dst_type, BOOL scale_linear FI_DEFAULT(TRUE));
-
-// tone mapping operators
- FIBITMAP *(DLL_CALLCONV *FI_ToneMapping)(FIBITMAP *dib, FREE_IMAGE_TMO tmo, double first_param FI_DEFAULT(0), double second_param FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_TmoDrago03)(FIBITMAP *src, double gamma FI_DEFAULT(2.2), double exposure FI_DEFAULT(0));
- FIBITMAP *(DLL_CALLCONV *FI_TmoReinhard05)(FIBITMAP *src, double intensity FI_DEFAULT(0), double contrast FI_DEFAULT(0));
-
-// ZLib interface -----------------------------------------------------------
-
- DWORD (DLL_CALLCONV *FI_ZLibCompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibUncompress)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGZip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibGUnzip)(BYTE *target, DWORD target_size, BYTE *source, DWORD source_size);
- DWORD (DLL_CALLCONV *FI_ZLibCRC32)(DWORD crc, BYTE *source, DWORD source_size);
-
-
-// --------------------------------------------------------------------------
-// Metadata routines --------------------------------------------------------
-// --------------------------------------------------------------------------
-
-// tag creation / destruction
- FITAG *(DLL_CALLCONV *FI_CreateTag)();
- void (DLL_CALLCONV *FI_DeleteTag)(FITAG *tag);
- FITAG *(DLL_CALLCONV *FI_CloneTag)(FITAG *tag);
-
-// tag getters and setters
- const AnsiChar *(DLL_CALLCONV *FI_GetTagKey)(FITAG *tag);
- const AnsiChar *(DLL_CALLCONV *FI_GetTagDescription)(FITAG *tag);
- WORD (DLL_CALLCONV *FI_GetTagID)(FITAG *tag);
- FREE_IMAGE_MDTYPE (DLL_CALLCONV *FI_GetTagType)(FITAG *tag);
- DWORD (DLL_CALLCONV *FI_GetTagCount)(FITAG *tag);
- DWORD (DLL_CALLCONV *FI_GetTagLength)(FITAG *tag);
- const void *(DLL_CALLCONV *FI_GetTagValue)(FITAG *tag);
-
- BOOL (DLL_CALLCONV *FI_SetTagKey)(FITAG *tag, const AnsiChar *key);
- BOOL (DLL_CALLCONV *FI_SetTagDescription)(FITAG *tag, const AnsiChar *description);
- BOOL (DLL_CALLCONV *FI_SetTagID)(FITAG *tag, WORD id);
- BOOL (DLL_CALLCONV *FI_SetTagType)(FITAG *tag, FREE_IMAGE_MDTYPE type);
- BOOL (DLL_CALLCONV *FI_SetTagCount)(FITAG *tag, DWORD count);
- BOOL (DLL_CALLCONV *FI_SetTagLength)(FITAG *tag, DWORD length);
- BOOL (DLL_CALLCONV *FI_SetTagValue)(FITAG *tag, const void *value);
-
-// iterator
- FIMETADATA *(DLL_CALLCONV *FI_FindFirstMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag);
- BOOL (DLL_CALLCONV *FI_FindNextMetadata)(FIMETADATA *mdhandle, FITAG **tag);
- void (DLL_CALLCONV *FI_FindCloseMetadata)(FIMETADATA *mdhandle);
-
-// metadata setter and getter
- BOOL (DLL_CALLCONV *FI_SetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG *tag);
- BOOL (DLL_CALLCONV *FI_GetMetadata)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const AnsiChar *key, FITAG **tag);
-
-// helpers
- unsigned (DLL_CALLCONV *FI_GetMetadataCount)(FREE_IMAGE_MDMODEL model, FIBITMAP *dib);
-
-// tag to C string conversion
- const AnsiChar *(DLL_CALLCONV *FI_TagToString)(FREE_IMAGE_MDMODEL model, FITAG *tag, AnsiChar *Make FI_DEFAULT(NULL));
-
-
-// --------------------------------------------------------------------------
-// Image manipulation toolkit -----------------------------------------------
-// --------------------------------------------------------------------------
-
-// rotation and flipping
- FIBITMAP *(DLL_CALLCONV *FI_RotateClassic)(FIBITMAP *dib, double angle);
- FIBITMAP *(DLL_CALLCONV *FI_RotateEx)(FIBITMAP *dib, double angle, double x_shift, double y_shift, double x_origin, double y_origin, BOOL use_mask);
- BOOL (DLL_CALLCONV *FI_FlipHorizontal)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_FlipVertical)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_JPEGTransform)(const AnsiChar *src_file, const AnsiChar *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(FALSE));
-
-// upsampling / downsampling
- FIBITMAP *(DLL_CALLCONV *FI_Rescale)(FIBITMAP *dib, int dst_width, int dst_height, FREE_IMAGE_FILTER filter);
- FIBITMAP *(DLL_CALLCONV *FI_MakeThumbnail)(FIBITMAP *dib, int max_pixel_size, BOOL convert FI_DEFAULT(TRUE));
-
-// color manipulation routines (point operations)
- BOOL (DLL_CALLCONV *FI_AdjustCurve)(FIBITMAP *dib, BYTE *LUT, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_AdjustGamma)(FIBITMAP *dib, double gamma);
- BOOL (DLL_CALLCONV *FI_AdjustBrightness)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_AdjustContrast)(FIBITMAP *dib, double percentage);
- BOOL (DLL_CALLCONV *FI_Invert)(FIBITMAP *dib);
- BOOL (DLL_CALLCONV *FI_GetHistogram)(FIBITMAP *dib, DWORD *histo, FREE_IMAGE_COLOR_CHANNEL channel);
-
-// channel processing routines
- FIBITMAP *(DLL_CALLCONV *FI_GetChannel)(FIBITMAP *dib, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetChannel)(FIBITMAP *dib, FIBITMAP *dib8, FREE_IMAGE_COLOR_CHANNEL channel);
- FIBITMAP *(DLL_CALLCONV *FI_GetComplexChannel)(FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
- BOOL (DLL_CALLCONV *FI_SetComplexChannel)(FIBITMAP *dst, FIBITMAP *src, FREE_IMAGE_COLOR_CHANNEL channel);
-
-// copy / paste / composite routines
- FIBITMAP *(DLL_CALLCONV *FI_Copy)(FIBITMAP *dib, int left, int top, int right, int bottom);
- BOOL (DLL_CALLCONV *FI_Paste)(FIBITMAP *dst, FIBITMAP *src, int left, int top, int alpha);
- FIBITMAP *(DLL_CALLCONV *FI_Composite)(FIBITMAP *fg, BOOL useFileBkg FI_DEFAULT(FALSE), RGBQUAD *appBkColor FI_DEFAULT(NULL), FIBITMAP *bg FI_DEFAULT(NULL));
- BOOL (DLL_CALLCONV *FI_JPEGCrop)(const AnsiChar *src_file, const AnsiChar *dst_file, int left, int top, int right, int bottom);
-
-// own functions
-
- // memory I/O
- FIBITMAP *(*FI_LoadFromMem)(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags);
- BOOL (*FI_SaveToMem)(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags);
-
- // helpers
- FIBITMAP *(*FI_CreateDIBFromHBITMAP)(HBITMAP hBmp);
- HBITMAP (*FI_CreateHBITMAPFromDIB)(FIBITMAP *dib);
- BOOL (*FI_Premultiply)(HBITMAP hBmp); // premultiplies alpha channel for usage with AlphaBlend()
- // original HBITMAP stays valid and must be 32bit RGBA
- int (*FI_BmpFilterResizeBitmap)(WPARAM wParam,LPARAM lParam); // more generic resizer for avatar images
- void (*FI_CorrectBitmap32Alpha)(HBITMAP hBitmap, BOOL force); // corrects broken images (when all alpha values are 0)
-
- BYTE reserved[200]; // future usage
-} FI_INTERFACE;
-*)
-{
- image services
-
- only basic functionality is wrapped around Miranda services, because otherwise we
- would get a huge load of services with complex parameter marshalling requirements.
-}
-const
-// get the interface version number
-// wParam = lParam = 0
-// returns FI_IF_VERSION
-
- MS_IMG_GETIFVERSION:PAnsiChar = 'IMG/GetVersion';
-
-{
- obtain the full FreeImage interface from the library. This interface provides
- full access to freeimage internal functions, thus enabling devs to fully utilize
- the FreeImage API. Only popular functions will be exported as miranda services.
- wParam = (DWORD)version Number // the caller MUST provide the desired version number
- lParam = **FI_INTERFACE
- returns S_OK on success, any other value indicates a problem.
- the interface is populated during the _DllMain() handler, so you can assume it
- is ready when Miranda calls the Load() handler of your plugin and you can return
- 1 in your Load() to disable your plugin when it depends on the freeimage interface
- and the freeimage plugin is missing
-
- example:
- var
- fif:PFI_INTERFACE;
- fif:=nil;
- result:=CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION,dword(fii));
-
- if result<>S_OK then
- failed, in this case, fei will be NULL and your plugin will crash when using the interface,
- so ALWAYS check it
-}
- MS_IMG_GETINTERFACE:PAnsiChar = 'IMG/GetInterface';
-
- IMGL_RETURNDIB = 1; // will NOT return a HBITMAP but a FIBITMAP * instead (useful,
- // if you want to do further image manipulations before
- // converting to a Win32 bitmap caller MUST then free the
- // FIBITMAP * using fii->FI_Unload() or MS_IMG_UNLOAD (see below)
- IMGL_WCHAR = 2; // filename is Unicode
-
-{
- load an image from disk
- wParam = full path and filename to the image
- lParam = IMGL_* flags
- returns a valid HBITMAP or 0 if image cannot be loaded
- if IMGL_RETURNDIB is set, it returns a pointer to a freeimage bitmap (FIBITMAP *)
-}
- MS_IMG_LOAD:PAnsiChar = 'IMG/Load';
-
-{
- control structure for loading images from memory buffers (e.g. network buffers,
- memory mapped files).
-}
-
-type
-//!!
-// FREE_IMAGE_FORMAT = type Integer;
-{(
- FIF_UNKNOWN = -1,
- FIF_BMP = 0,
- FIF_ICO = 1,
- FIF_JPEG = 2,
- FIF_JNG = 3,
- FIF_KOALA = 4,
- FIF_LBM = 5,
- FIF_IFF = FIF_LBM,
- FIF_MNG = 6,
- FIF_PBM = 7,
- FIF_PBMRAW = 8,
- FIF_PCD = 9,
- FIF_PCX = 10,
- FIF_PGM = 11,
- FIF_PGMRAW = 12,
- FIF_PNG = 13,
- FIF_PPM = 14,
- FIF_PPMRAW = 15,
- FIF_RAS = 16,
- FIF_TARGA = 17,
- FIF_TIFF = 18,
- FIF_WBMP = 19,
- FIF_PSD = 20,
- FIF_CUT = 21,
- FIF_XBM = 22,
- FIF_XPM = 23,
- FIF_DDS = 24,
- FIF_GIF = 25,
- FIF_HDR = 26,
- FIF_FAXG3 = 27,
- FIF_SGI = 28
-);}
- TIMGSRVC_MEMIO = record
- iLen:cardinal; // length of the buffer
- pBuf:pointer; // the buffer itself (you are responsible for allocating and free'ing it)
- fif:FREE_IMAGE_FORMAT; // -1 to detect the format or one of the FIF_* image format constant. Make sure to provide the right one.
- flags:dword; // flags to pass to FreeImage_LoadFromMem() (see freeimage docs)
- end;
- _tagIMGSRVC_MEMIO = TIMGSRVC_MEMIO;
-
-const
-{
- load an image from a memory buffer
- wParam = IMGSRVC_MEMIO *
- lParam = flags (see IMG/Load), valid are IMGL_RETURNDIB
- you must popupate iLen (buffer length) and pBuf (pointer to memory buffer)
- you must also specify the format in IMGSRVC_MEMIO.fif using one of the FIF_* constants
-}
- MS_IMG_LOADFROMMEM:PAnsiChar = 'IMG/LoadFromMem';
-
-// flags for IMGSRVC_INFO.dwMask
-
- IMGI_FBITMAP = 1; // the dib member is valid
- IMGI_HBITMAP = 2; // the hbm member is valid
-
-{
- generic structure for various img functions
- you must populate the fields as required, set the mask bits to indicate which member is valid
-}
-
-type
-//!!
-{
- FIBITMAP = record
- data : Pointer;
- end;
- PFIBITMAP = ^FIBITMAP;
-}
- TIMGSRVC_INFO = record
- cbSize:dword;
- szName:TChar;
- hbm:HBITMAP;
- dib:PFIBITMAP;
- dwMask:dword;
- fif:FREE_IMAGE_FORMAT;
- end;
- _tagIMGSRVC_INFO = TIMGSRVC_INFO;
-
-const
-{
- save image to disk
- wParam = pointer to IMGSRVC_INFO (szName/wszName, hbm OR dib, cbSize, dwMask
- mandatory. fif optional, if FIF_UNKNOWN is given it will be determined
- from the filename).
- lParam = low word: IMG_* flags (IMGL_WCHAR is the only valid - filename will be assumed
- to be wchar_t and wszName must be used)
- high word: FreeImage_Save flags
- set IMGSRVC_INFO.dwMask to indicate whether the HBITMAP of FIBITMAP member is valid
-}
- MS_IMG_SAVE:PAnsiChar = 'IMG/Save';
-
-{
- unload a FIFBITMAP
- wParam = FIFBITMAP *
- lParam = 0;
- this service is useful when you have loaded a bitmap with IMGL_RETURNDIB in
- which case you do not get a HBITMAP but instead a FBITMAP * which describes
- the freeimage-internal representation of a bitmap.
-}
- MS_IMG_UNLOAD:PAnsiChar = 'IMG/Unload';
-
-{
- resizer from loadavatars moved to image service plugin
-}
-
- RESIZEBITMAP_STRETCH = 0; // Distort bitmap to size in (max_width, max_height)
- RESIZEBITMAP_KEEP_PROPORTIONS = 1; // Keep bitmap proportions (probabily only
- // one of the max_width/max_height will be
- // respected, and the other will be smaller)
- RESIZEBITMAP_CROP = 2; // Keep bitmap proportions but crop it to
- // fix exactly in (max_width, max_height)
- // Some image info outside will be lost
- RESIZEBITMAP_MAKE_SQUARE = 3; // Image will be allways square. Image will
- // be croped and the size returned will be
- // min(max_width, max_height)
- RESIZEBITMAP_FLAG_DONT_GROW = $1000; // If set, the image will not grow. Else,
- // it will grow to fit the max width/height
-
-type
- TResizeBitmap = record
- size :size_t; // sizeof(ResizeBitmap);
- hBmp :HBITMAP;
- max_width :int;
- max_height:int;
- fit :int; // One of RESIZEBITMAP_* with an OR with RESIZEBITMAP_FLAG_DONT_GROW if needed
- end;
-
-const
-{
- Returns a copy of the bitmap with the size especified or the original bitmap
- if nothing has to be changed
- wParam = ResizeBitmap *
- lParam = NULL
- return NULL on error, ResizeBitmap->hBmp if don't need to resize or a new HBITMAP if resized
- You are responsible for calling DestroyObject() on the original HBITMAP
-}
- MS_IMG_RESIZE:PAnsiChar = 'IMG/ResizeBitmap';
-
-{
- * format conversion helpers
- *
- * these helper macros allow converting HBITMAP to FIBITMAP * format and vice vera. In any case,
- * the caller is responsible for freeing or deleting the original object.
- * These macros wrap around the FI_CreateHBITMAPFromDib() and FI_CreateDIBFromHBITMAP() interface
- * functions.
-}
-
-//#define FI_HBM2DIB(x) (FI_CreateDIBFromHBITMAP((x)))
-//#define FI_DIB2HBM(x) (FI_CreateHBITMAPFromDIB((x)))
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_keybindings.inc b/delphi/Awkward/include/m_keybindings.inc
deleted file mode 100644
index e0c31c3..0000000
--- a/delphi/Awkward/include/m_keybindings.inc
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_KEYBINDINGS}
-
-const
- KB_CTRL_FLAG = $10000;
- KB_SHIFT_FLAG = $20000;
- KB_ALT_FLAG = $40000;
-
- KBDF_UNICODE = 1;
-
-type
- TKEYBINDINGDESC = record
- cbSize :int; //size of the structure
- szSection :TChar; // section name used to display key bindings in the tree view [TRANSLATED-BY-CORE]
- pszActionName :TChar; // action name used to display key bindings in the tree view [TRANSLATED-BY-CORE]
- pszActionGroup:PAnsiChar; // action group name used to group unique shortcuts, shortcuts cannot be duplicated within a group
- key :array [0..4] of dword; // virtual key + KB_* flags, up to 5 different shortcuts may be defined for each action
- flags :dword; // flags (KBDF_*)
- action :int; // id of the action
- end;
-
-{Registers action with default key bindings assigned to it.
- wParam = (WPARAM) 0; not used
- lParam = (LPARAM) (KEYBINDINGDESC*)
- return: 0 on success, error code otherwise
-}
- MS_KEYBINDINGS_REGISTER :PAnsiChar = 'KeyBindings/Register';
-
-{Gets action assigned to the given key
- key[0] and pszActionGroup in KEYBINDINGDESC should be set before calling this service
- wParam = (WPARAM) 0; not used
- lParam = (LPARAM) (KEYBINDINGDESC*)
- return: 0 if action assigned to the given key was found, 1 otherwise
-}
- MS_KEYBINDINGS_GET :PAnsiChar = 'KeyBindings/Get';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_langpack.inc b/delphi/Awkward/include/m_langpack.inc
deleted file mode 100644
index 64ba4f1..0000000
--- a/delphi/Awkward/include/m_langpack.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_LANGPACK}
-{$DEFINE M_LANGPACK}
-
-const
- LANG_UNICODE = $1000;
-
-{
- translates a single string into the user's local language v0.1.1.0+
- wParam=LANG_* flags
- lParam=(LPARAM)(const AnsiChar*)szEnglish
- returns a pointer to the localised string. If there is no known translation
- it will return szEnglish. The return value does not need to be freed in any way
- Note that the Translate() macro as defined below will crash plugins that are
- loaded into Miranda 0.1.0.1 and earlier. If anyone's actually using one of
- these versions, I pity them.
-}
- MS_LANGPACK_TRANSLATESTRING:PAnsiChar = 'LangPack/TranslateString';
-
-{
- translates a dialog into the user's local language v0.1.1.0+
- wParam=0
- lParam=(LPARAM)(LANGPACKTRANSLATEDIALOG*)&lptd
- returns 0 on success, nonzero on failure
- This service only knows about the following controls:
- Window titles, STATIC, EDIT, Hyperlink, BUTTON
-}
-type
- IntArray = array [0..1000] of integer;
- PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG;
- TLANGPACKTRANSLATEDIALOG = record
- cbSize :integer;
- flags :DWORD;
- hwndDlg :HWND;
- ignoreControls:^IntArray; // zero-terminated list of control IDs *not* to translate
- end;
-
-const
- LPTDF_NOIGNOREEDIT = 1; // translate all edit controls. By default
- // non-read-only edit controls are not translated
- LPTDF_NOTITLE = 2; //do not translate the title of the dialog
-
-const
- MS_LANGPACK_TRANSLATEDIALOG:PAnsiChar = 'LangPack/TranslateDialog';
-
-{
- translates a menu into the user's local language v0.1.1.0+
- wParam=(WPARAM)(HMENU)hMenu
- lParam=0
- returns 0 on success, nonzero on failure
-}
- MS_LANGPACK_TRANSLATEMENU:PAnsiChar = 'LangPack/TranslateMenu';
-
-{
- returns the codepage used in the language pack v0.4.3.0+
- wParam=0
- lParam=0
- returns the codepage stated in the langpack, or CP_ACP if no langpack is present
-}
- MS_LANGPACK_GETCODEPAGE:PAnsiChar = 'LangPack/GetCodePage';
-
-{
- returns the locale id associated with the language pack v0.4.3.0+
- wParam=0
- lParam=0
- returns the Windows locale id stated in the langpack, or LOCALE_USER_DEFAULT if no langpack is present
-}
- MS_LANGPACK_GETLOCALE:PAnsiChar = 'LangPack/GetLocale';
-
-{
- returns the strdup/wcsdup of lparam according to the langpack v0.4.3.0+
- wParam=0
- lParam=(LPARAM)(AnsiChar*)source string
- returns a string converted from AnsiChar* to TCHAR* using the langpack codepage.
- This string should be freed using mir_free() then
-}
- MS_LANGPACK_PCHARTOTCHAR:PAnsiChar = 'LangPack/PcharToTchar';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_message.inc b/delphi/Awkward/include/m_message.inc
deleted file mode 100644
index 76aa4b6..0000000
--- a/delphi/Awkward/include/m_message.inc
+++ /dev/null
@@ -1,200 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$IFNDEF M_MESSAGE}
-{$DEFINE M_MESSAGE}
-const
- {brings up the send message dialog for a contact
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(AnsiChar*)szText
- returns 0 on success or nonzero on failure
- returns immediately, just after the dialog is shown
- szText is the text to put in the edit box of the window (but not send)
- szText=NULL will not use any text
- szText!=NULL is only supported on v0.1.2.0+
- NB: Current versions of the convers plugin use the name
- "SRMsg/LaunchMessageWindow" instead. For compatibility you should call
- both names and the correct one will work. }
- MS_MSG_SENDMESSAGE:PAnsiChar = 'SRMsg/SendCommand';
- ME_MSG_WINDOWEVENT:PAnsiChar = 'MessageAPI/WindowEvent';
-
- MS_MSG_CONVERS:PAnsiChar = 'SRMsg/LaunchMessageWindow';
-
- {wparam=0 }
- {lparam=(WPARAM)(MessageWindowEventData*)hWindowEvent; }
- {Event types }
- MSG_WINDOW_EVT_OPENING = 1; // window is about to be opened
- MSG_WINDOW_EVT_OPEN = 2; // window has been opened
- MSG_WINDOW_EVT_CLOSING = 3; // window is about to be closed
- MSG_WINDOW_EVT_CLOSE = 4; // window has been closed
- MSG_WINDOW_EVT_CUSTOM = 5; // custom event for message plugins to use
- // (custom uFlags may be used)
- MSG_WINDOW_UFLAG_MSG_FROM = $00000001;
- MSG_WINDOW_UFLAG_MSG_TO = $00000002;
- MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
-
-type
- PMessageWindowEventData = ^TMessageWindowEventData;
- TMessageWindowEventData = record
- cbSize : int;
- hContact : THANDLE;
- hwndWindow: HWND; // top level window for the contact
- szModule : PAnsiChar; // used to get plugin type (which means you could use
- // local if needed)
- uType : dword; // see event types above
- uFlags : dword; // used to indicate message direction for all event
- // types except custom
- local : pointer; // used to store pointer to custom data
- hwndInput : HWND; // input area window for the contact (or NULL if there is none)
- hwndLog : HWND; // log area window for the contact (or NULL if there is none)
- end;
-
-const
- MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
- { wparam=0
- lparam=0
- Returns a dword with the current message api version
- Current version is 0,0,0,4
- }
-
- MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
- { wparam=(AnsiChar*)szBuf
- lparam=(int)cbSize size of buffer
- Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
- }
-
-type
- PMessageWindowInputData = ^TMessageWindowInputData;
- TMessageWindowInputData = record
- cbSize : int;
- hContact: THANDLE;
- uFlags : int; // see uflags above
- end;
-
-const
- MSG_WINDOW_STATE_EXISTS = $00000001; // Window exists should always be true
- // if hwndWindow exists
- MSG_WINDOW_STATE_VISIBLE = $00000002;
- MSG_WINDOW_STATE_FOCUS = $00000004;
- MSG_WINDOW_STATE_ICONIC = $00000008;
-
-type
- PMessageWindowOutputData = ^TMessageWindowOutputData;
- TMessageWindowOutputData = record
- cbSize : int;
- hContact : THANDLE;
- uFlags : int; // should be same as input data unless 0, then it
- // will be the actual type
- hwndWindow: HWND; // top level window for the contact or NULL if no window exists
- uState : int; // see window states
- local : pointer; // used to store pointer to custom data
- end;
- PMessageWindowData = PMessageWindowOutputData;
- TMessageWindowData = TMessageWindowOutputData;
-
-const
- MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
-{ wparam=(MessageWindowInputData*)
- lparam=(MessageWindowOutputData*)
- returns 0 on success and returns non-zero (1) on error or if no window data
- exists for that hcontact
-}
-
- ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
-{ wParam = 0
- lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
- Fired to allow plugins to add itens to the msg window popup menu
- Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
- This is done to allow cleaning of resources.
-}
- MSG_WINDOWPOPUP_SHOWING = 1;
- MSG_WINDOWPOPUP_SELECTED = 2;
-
- MSG_WINDOWPOPUP_INPUT = 1;
- MSG_WINDOWPOPUP_LOG = 2;
-
-type
- MessageWindowPopupData = record
- cbSize :int;
- uType :uint; // see popup types above
- uFlags :uint; // used to indicate in which window the popup was requested
- hContact :THANDLE;
- hwnd :HWND; // window where the popup was requested
- hMenu :HMENU; // The handle to the menu
- pt :TPOINT; // The point, in screen coords
- selection:int; // The menu control id or 0 if no one was selected
- end;
-
-// status icons - HICONs will be automatically destroyed when removed or when miranda exits
-const
- MBF_DISABLED = 1;
- MBF_HIDDEN = 2;
-
-type
- StatusIconData = record
- cbSize :integer;
- szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
- dwId :DWORD;
- hIcon,
- hIconDisabled:HICON; // hIconDisabled is optional - if null, will use hIcon in the disabled state
- flags :integer; // one of MBF_* above
- szTooltip :PAnsiChar;
- end;
-
-const
- MBCF_RIGHTBUTTON = 1; // if this flag is specified, the click was a right button -
- // otherwize it was a left click
-
-type
- StatusIconClickData = record
- cbSize :integer;
- clickLocation:TPOINT; // click location, in screen coordinates
- szModule :PAnsiChar;
- dwId :DWORD;
- flags :integer; // one of MBCF_* above
- end;
-
-const
- MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
-// lParam = (StatusIconData *)&StatusIconData
-
- MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
-{
- lParam = (StatusIconData *)&StatusIconData
- only szModule and szId are used
-}
-
- MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
-{
- wParam = (HANDLE)hContact
- lParam = (StatusIconData *)&StatusIconData
- if hContact is null, icon is modified for all contacts
- otherwise, only the flags field is valid
- if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
-}
-
- ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
-{
- wParam = (HANDLE)hContact;
- lParam = (StatusIconClickData *)&StatusIconClickData;
- catch to show a popup menu, etc.
-}
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_metacontacts.inc b/delphi/Awkward/include/m_metacontacts.inc
deleted file mode 100644
index 5ff5cf9..0000000
--- a/delphi/Awkward/include/m_metacontacts.inc
+++ /dev/null
@@ -1,168 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
- Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$IFNDEF M_METACONTACTS}
-{$DEFINE M_METACONTACTS}
-
-const
- { get the handle for a contact's parent metacontact
- wParam=(HANDLE)hSubContact
- lParam=0
- returns a handle to the parent metacontact, or null if this contact is not
- a subcontact
- }
- MS_MC_GETMETACONTACT = 'MetaContacts/GetMeta';
-
- { gets the handle for the default contact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns a handle to the default contact, or null on failure }
- MS_MC_GETDEFAULTCONTACT = 'MetaContacts/GetDefault';
-
- { gets the contact number for the default contact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns a DWORD contact number, or -1 on failure }
- MS_MC_GETDEFAULTCONTACTNUM = 'MetaContacts/GetDefaultNum';
-
- { gets the handle for the 'most online' contact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns a handle to the 'most online' contact }
- MS_MC_GETMOSTONLINECONTACT = 'MetaContacts/GetMostOnline';
-
- { gets the number of subcontacts for a metacontact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns a DWORD representing the number of subcontacts for the given metacontact }
- MS_MC_GETNUMCONTACTS = 'MetaContacts/GetNumContacts';
-
- { gets the handle of a subcontact, using the subcontact's number
- wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
- returns a handle to the specified subcontact }
- MS_MC_GETSUBCONTACT = 'MetaContacts/GetSubContact';
-
- { sets the default contact, using the subcontact's contact number
- wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
- returns 0 on success }
- MS_MC_SETDEFAULTCONTACTNUM = 'MetaContacts/SetDefault';
-
- { sets the default contact, using the subcontact's handle
- wParam=(HANDLE)hMetaContact
- lParam=(HANDLE)hSubcontact
- returns 0 on success }
- MS_MC_SETDEFAULTCONTACT = 'MetaContacts/SetDefaultByHandle';
-
- { forces the metacontact to send using a specific subcontact, using the subcontact's contact number
- wParam=(HANDLE)hMetaContact
- lParam=(DWORD)contact number
- returns 0 on success }
- MS_MC_FORCESENDCONTACTNUM = 'MetaContacts/ForceSendContact';
-
- { forces the metacontact to send using a specific subcontact, using the subcontact's handle
- wParam=(HANDLE)hMetaContact
- lParam=(HANDLE)hSubcontact
- returns 0 on success (will fail if 'force default' is in effect) }
- MS_MC_FORCESENDCONTACT = 'MetaContacts/ForceSendContactByHandle';
-
- { 'unforces' the metacontact to send using a specific subcontact
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns 0 on success (will fail if 'force default' is in effect) }
- MS_MC_UNFORCESENDCONTACT = 'MetaContacts/UnforceSendContact';
-
- { 'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
- overrides (and clears) 'force send' above, and will even force use of offline contacts
- will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
- wParam=(HANDLE)hMetaContact
- lParam=0
- returns 1(true) or 0(false) representing new state of 'force default' }
- MS_MC_FORCEDEFAULT = 'MetaContacts/ForceSendDefault';
-
- { method to get state of 'force' for a metacontact
- wParam=(HANDLE)hMetaContact
- lParam= (DWORD)&contact_number or NULL
- if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
- or if none is in force, the value (DWORD)-1 will be copied
- (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above) }
- MS_MC_GETFORCESTATE = 'MetaContacts/GetForceState';
-
- { fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
- wParam=(HANDLE)hMetaContact
- lParam=(HANDLE)hDefaultContact }
- ME_MC_DEFAULTTCHANGED = 'MetaContacts/DefaultChanged';
-
- { fired when a metacontact's subcontacts change (fired upon creation of
- metacontact, when contacts are added or removed, and when contacts are
- reordered) - a signal to re-read metacontact data
- wParam=(HANDLE)hMetaContact
- lParam=0 }
- ME_MC_SUBCONTACTSCHANGED = 'MetaContacts/SubcontactsChanged';
-
- { fired when a metacontact is forced to send using a specific subcontact
- wParam=(HANDLE)hMetaContact
- lParam=(HANDLE)hForceContact }
- ME_MC_FORCESEND = 'MetaContacts/ForceSend';
-
- { fired when a metacontact is 'unforced' to send using a specific subcontact
- wParam=(HANDLE)hMetaContact
- lParam=0 }
- ME_MC_UNFORCESEND = 'MetaContacts/UnforceSend';
-
- { method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
- wParam=lParam=0 }
- MS_MC_GETPROTOCOLNAME = 'MetaContacts/GetProtoName';
-
- { added 0.9.5.0 (22/3/05)
- wParam=(HANDLE)hContact
- lParam=0
- convert a given contact into a metacontact
- }
- MS_MC_CONVERTTOMETA = 'MetaContacts/ConvertToMetacontact';
-
- { added 0.9.5.0 (22/3/05)
- wParam=(HANDLE)hContact
- lParam=(HANDLE)hMeta
- add an existing contact to a metacontact
- }
- MS_MC_ADDTOMETA = 'MetaContacts/AddToMetacontact';
-
- { added 0.9.5.0 (22/3/05)
- wParam=0
- lParam=(HANDLE)hContact
- remove a contact from a metacontact
- }
- MS_MC_REMOVEFROMMETA = 'MetaContacts/RemoveFromMetacontact';
-
-
- { added 0.9.13.2 (6/10/05)
- wParam=(BOOL)disable
- lParam=0
- enable/disable the 'hidden group hack' - for clists that support subcontact
- hiding using 'IsSubcontact' setting. Should be called once in the clist
- 'onmodulesloaded' event handler (which, since it's loaded after the db, will
- be called before the metacontact onmodulesloaded handler where the subcontact
- hiding is usually done)
- }
- MS_MC_DISABLEHIDDENGROUP = 'MetaContacts/DisableHiddenGroup';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_modernopt.inc b/delphi/Awkward/include/m_modernopt.inc
deleted file mode 100644
index cbb981b..0000000
--- a/delphi/Awkward/include/m_modernopt.inc
+++ /dev/null
@@ -1,110 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2007 Artem Shpynov
-Copyright 2000-2007 Miranda ICQ/IM project,
-
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_MODERNOPT}
-{$DEFINE M_MODERNOPT}
-
-{
- 260x210 - subsection
- 368x210 - section
-}
-const
- MS_MODERNOPT_SHOW :PAnsiChar = 'ModernOpt/Show';
-
- ME_MODERNOPT_INITIALIZE:PAnsiChar = 'ModernOpt/Initialize';
-
- MODEROPT_FLG_UNICODE = $01;
- MODEROPT_FLG_NORESIZE = $02;
-
-type
- moType = (
- MODERNOPT_TYPE_SECTIONPAGE,
- MODERNOPT_TYPE_SUBSECTIONPAGE,
- MODERNOPT_TYPE_IGNOREOBJECT,
- MODERNOPT_TYPE_SELECTORPAGE,
- MODERNOPT_TYPE_COUNT);
-
-type
- moPage = (
- MODERNOPT_PAGE_HOME,
- MODERNOPT_PAGE_ACCOUNTS,
- MODERNOPT_PAGE_SKINS,
- MODERNOPT_PAGE_CLIST,
- MODERNOPT_PAGE_MSGS,
- MODERNOPT_PAGE_IGNORE,
- MODERNOPT_PAGE_STATUS,
- MODERNOPT_PAGE_ADVANCED,
- MODERNOPT_PAGE_MODULES,
- MODERNOPT_PAGE_COUNT);
-
-const
- MODERNOPT_CTRL_LAST = 0;
-
-type
- TMODERNOPTOBJECT = record
- cbSize :int;
- dwFlags :dword;
- iType :int;
- iSection :int;
-
- hIcon :HICON;
- szSubsection :TChar;
-
- // Generic dialog page
- hInstance :HINST;
- lpzTemplate :PAnsiChar;
- pfnDlgProc :pointer;
- iBoldControls :pint;
-
- // General page support
- lpzClassicGroup :PAnsiChar;
- lpzClassicPage :PAnsiChar;
- lpzClassicTab :PAnsiChar;
- lpzHelpUrl :PAnsiChar;
-
- // Ingore page
- lpzIgnoreModule :PAnsiChar;
- lpzIgnoreSetting :PAnsiChar;
- dwIgnoreBit :dword;
-
- // Selector type page
- lpzThemeExtension :PAnsiChar;
- lpzThemeModuleName:PAnsiChar;
- end;
-
-const
- MS_MODERNOPT_ADDOBJECT :PAnsiChar = 'ModernOpt/AddObject';
- MS_MODERNOPT_SELECTPAGE:PAnsiChar = 'ModernOpt/SelectPage';
- ME_MODERNINGORE_RELOAD :PAnsiChar = 'ModernOpt/Ignore/Reload';
-
- TS_SKIN_ACTIVE = '/Active';
-
- TS_SKIN_PREVIEW = '/Preview';
-
- TS_SKIN_APPLY = '/Apply';
-
-// used by core options module to switch back to modernopt module
- MS_MODERNOPT_RESTORE:PAnsiChar = 'ModernOpt/Restore';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_netlib.inc b/delphi/Awkward/include/m_netlib.inc
deleted file mode 100644
index 59684c2..0000000
--- a/delphi/Awkward/include/m_netlib.inc
+++ /dev/null
@@ -1,841 +0,0 @@
-{$IFNDEF M_NETLIB}
-{$DEFINE M_NETLIB}
-
-{>>/
-
- NetLib :
-
- Instead of you writing all the code for working with sockets and supporting
- app level protocols such as SOCKS5, it's all done for you.
-
- NetLib takes care of all that and you can even register a special abstract
- nexus, e.g. ICQ direct, the user can configure all this from the options dialog
- and you don't have to bother with any of it.
-
- NetLib wraps up any Winsock calls but you can still get the socket handle
- from your netlib handle and do stuff.
-
- It gives all modules an abstract way of dealing with transport -- mainly sockets
- and proxies, Now the but..
-
- It's new (mmmm) thus unsupported by any older version of Miranda, and if you
- want to be lazy and not write any "wrapper" mini netlib then you'll have
- the kudos of "only works with nightly build version of Miranda" :)
-
-/<<}
-
-const
- // for TNETLIBUSER.flags
- NUF_INCOMING = $01; // bind incoming ports
- NUF_OUTGOING = $02; // makes outgoing plain connections
- NUF_HTTPGATEWAY = $04; //can use HTTP gateway for plain sockets.
- // ???HttpGateway* are valid, enables the HTTP
- // proxy option, displayed in options
- NUF_NOOPTIONS = $08; // don't show this as an entry for custom settings to
- // be defined for, TNETLIB.szDescriptiveName is ignored
- NUF_HTTPCONNS = $10; // some connections are made for HTTP communication,
- // enables the HTTP proxy option, displayed in options
- NUF_NOHTTPSOPTION = $20; // Disables the HTTPS proxy option in options, Use
- // this if all communication is HTTP
- NUF_UNICODE = $40; // if set ptszDescriptiveName points to Unicode, otherwise ANSI
-
- // for TNETLIBUSERSETTINGS.proxyType
-
- { SOCKS4 -- No DNS or multi addressing mode (proxy side) -- optional username can
- be given, no password }
- PROXYTYPE_SOCKS4 = 1;
- { SOCKS5 -- DNS names can be given as addresses to connect to, optional
- plain text username/password scheme (which may cause failure due to denied access)
- IP address maybe returned for DNS addresses -- thus server side DNS }
- PROXYTYPE_SOCKS5 = 2;
- PROXYTYPE_HTTP = 3;
- PROXYTYPE_HTTPS = 4;
- PROXYTYPE_IE = 5;
-
- NETLIBBIND_SIZEOF_V1 = 16; // sizeof(NETLIBBIND) prior to 0.3.4+ (2004/08/05)
- NETLIBBIND_SIZEOF_V2 = 20; // sizeof(NETLIBBIND) prior to 0.6+ (2006/07/03)
-
- // for TNETLIBOPENCONNECTION.flags
-
- { this connection will be useed for HTTP communications,
- if configured for an HTTP(S) proxy the connection is opened as if there
- was no proxy }
- NLOCF_HTTP = $0001;
- { this connection should send the sticky headers associated with NetLib
- user apart of any HTTP request}
- NLOCF_STICKYHEADERS = $0002;
- { this connection understands the newer structure, newer cbSize isnt enough}
- NLOCF_V2 = $0004;
- NLOCF_UDP = $0008; // this connection is UDP
- NLOCF_SSL = $0010; // this connection is SSL
- NLOCF_HTTPGATEWAY = $0020; // this connection is HTTP Gateway
-
- NETLIBOPENCONNECTION_V1_SIZE = 16;
- // old sizeof() is 14 bytes, but there is padding of 2 bytes
-
- // for TNETLIBHTTPPROXYINFO.flags
-
- NLHPIF_USEGETSEQUENCE = $0001; // append sequence numbers to GET requests
- NLHPIF_USEPOSTSEQUENCE = $0002; // append sequence numbers to POST requests
- NLHPIF_GETPOSTSAMESEQUENCE = $0004; // GET and POST use the same sequence
- NLHPIF_HTTP11 = $0008; // HTTP 1.1 proxy
-
- // for TNETLIBHTTPREQUEST.flags, .requestType
-
- { used by MS_NETLIB_RECVHTTPHEADERS returned structure }
-
- REQUEST_RESPONSE = 0;
- REQUEST_GET = 1;
- REQUEST_POST = 2;
- REQUEST_CONNECT = 3;
- REQUEST_HEAD = 4; // new in 0.5.1
- REQUEST_PUT = 5;
- REQUEST_DELETE = 6;
-
- NLHRF_GENERATEHOST = $00000001; // auto generate a 'host' header from .szUrl
- NLHRF_REMOVEHOST = $00000002; // remove any host and/or protocol portion
- // of szUrl before sending it
- NLHRF_SMARTREMOVEHOST = $00000004; // removes host and/or protocol from szUrl
- // unless the connection was opened through
- // an HTTP or HTTPS proxy.
- NLHRF_SMARTAUTHHEADER = $00000008; // if the connection was opened through an
- // HTTP or HTTPS proxy then send a
- // Proxy-Authorization header if required.
- NLHRF_HTTP11 = $00000010; // use HTTP 1.1
- NLHRF_PERSISTENT = $00000020; // preserve connection on exit, open connection provided
- // in the nlc field of the reply it should be supplied in
- // nlc field of request for reuse or closed if not needed
- NLHRF_SSL = $00000040; // use ssl connection
- NLHRF_NOPROXY = $00000080; // do not use proxy server
- NLHRF_REDIRECT = $00000100; // handle HTTP redirect requests (response 30x), the
- // resulting url provided in szUrl of the response
- NLHRF_NODUMP = $00010000; // never dump this to the log
- NLHRF_NODUMPHEADERS = $00020000; // don't dump http headers (only useful for
- // POSTs and MS_NETLIB_HTTPTRANSACTION
- NLHRF_DUMPPROXY = $00040000; // this transaction is a proxy communication.
- // For dump filtering only.
- NLHRF_DUMPASTEXT = $00080000; // dump posted and reply data as text.
- // Headers are always dumped as text.
- NLHRF_NODUMPSEND = $00100000; // do not dump sent message.
-
- // for TNETLIBBUFFER.flags
-
- MSG_NOHTTPGATEWAYWRAP = $010000; // don't wrap outgoing packet using
- // TNETLIBUSER.pfnHttpGatewayWrapSend
- MSG_NODUMP = $020000; // don't dump this packet to the log
- MSG_DUMPPROXY = $040000; // this is proxy communication, for dump
- // filtering only
- MSG_DUMPASTEXT = $080000; // don't dump as hex, it's text
- MSG_RAW = $100000; // send as raw, bybpass HTTP proxy stuff
- MSG_DUMPSSL = $200000; // this is SSL traffic. For dump filtering only.
-
-
-// all record types structures are declared in their own block because the C
-// header file used forward declaration (to get typed parameters for certain
-// function pointers). This sort of define-type-pointer-before-type can only be
-// done in the same type block in D2 (don't know about later versions)
-
- FD_SETSIZE = 65;
-
-type
- { forward typed pointers to records }
- PNETLIBOPENCONNECTION = ^TNETLIBOPENCONNECTION;
- PNETLIBHTTPREQUEST = ^TNETLIBHTTPREQUEST;
-
- { This function pointer is to the CRT realloc() used by Miranda -- it allows reallocation of memory passed
- to us (not that we could EVER share the same CRT) but to allow DLLs in general to reallocate memory }
- TNetlibRealloc = function(Mem: Pointer; size_t: int): Pointer; cdecl;
- TNetlibHTTPGatewayInitProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION; nlhr: PNETLIBHTTPREQUEST): int; cdecl;
- TNetlibHTTPGatewayBeginProc = function(hConn: THandle; nloc: PNETLIBOPENCONNECTION): int; cdecl;
- TNetlibHTTPGatewayWrapSendProc = function(hConn: THandle; buf: PByte; len: int; flags: int; pfnNetLibSend: TMIRANDASERVICE): int; cdecl;
- TNetlibHTTPGatewayUnwrapRecvProc = function(nlhr: PNETLIBHTTPREQUEST; buf: PByte; len: int; outBufLen: pInt; NetlibRealloc: TNetlibRealloc): PByte; cdecl;
-
- PNETLIBUSER = ^TNETLIBUSER;
- TNETLIBUSER = record
- cbSize: int;
- szSettingsModule: PAnsiChar; // used for DB settings and log, 'NL' stuff
- szDescriptiveName: TChar; // shows a descriptive name for which different proxy settings can be defined
- flags: DWORD; // see NUF_* constants above
- szHttpGatewayHello: PAnsiChar;
- szHttpGatewayUserAgent: PAnsiChar; // can be NULL(0) to send no User-Agent: also used by HTTPS proxies
- pfnHttpGatewayInit: TNetlibHTTPGatewayInitProc;
- pfnHttpGatewayBegin: TNetlibHTTPGatewayBeginProc; // can be NULL(0) if no begin is required
- pfnHttpGatewayWrapSend: TNetlibHTTPGatewayWrapSendProc; // can be NULL(0) if no wrapping is required
- pfnHttpGatewayUnwrapRecv: TNetlibHTTPGatewayUnwrapRecvProc; // can be NULL(0) " "
- minIncomingPorts: int; // only if NUF_INCOMING, will be used for validation of user input
- end;
-
- PNETLIBUSERSETTINGS = ^TNETLIBUSERSETTINGS;
- TNETLIBUSERSETTINGS = record
- cbSize :int; // filled before calling
- useProxy :int; // 1 or 0
- proxyType :int; // PROXYTYPE_* constant, see above
- szProxyServer :PAnsiChar; // can be NULL(0)
- wProxyPort :int; // in host byte order
- useProxyAuth :int; // 1 or 0, always 0 for SOCKS4 (doesn't have auth)
- szProxyAuthUser :PAnsiChar; // can be NULL(0), always used by SOCKS4
- szProxyAuthPassword :PAnsiChar; // can be NULL(0)
- useProxyAuthNtlm :int; // 1 or 0, only used by HTTP, HTTPS
- dnsThroughProxy :int; // 1 or 0
- specifyIncomingPorts:int; // 1 or 0
- szIncomingPorts :PAnsiChar; // can be NULL(0), form '1024-1050,1060-1070,2000'
- specifyOutgoingPorts:int; // 0.3.3a+
- szOutgoingPorts :PAnsiChar; // 0.3.3a+
- enableUPnP :int; // 0.6.1+ only for NUF_INCOMING
- validateSSL :int;
- end;
-
- TNetlibNewConnectionProc = procedure(hNewConnection:THandle; dwRemoveIP:DWORD); cdecl;
- TNetlibNewConnectionProc_V2 = procedure(hNewConnection:THandle; dwRemoveIP:DWORD; pExtra:pointer); cdecl;
-
- PNETLIBBINDOLD = ^TNETLIBBINDOLD;
- TNETLIBBINDOLD = record
- cbSize: int;
- pfnNewConnection:TNetlibNewConnectionProc; // function to call when there's
- // a new connection, dwRemoteIP is
- // in host byte order -- the handle
- // is to the new connection
- dwInternalIP: DWORD; // set on return, host byte order
- wPort: WORD; // set on return, host byte order
- end;
-
- PNETLIBBIND = ^TNETLIBBIND;
- TNETLIBBIND = record
- cbSize:int;
- // new code should use V2
- pfnNewConnection:TNETLIBNEWCONNECTIONPROC;
- // or pfnNewConnectionV2:NETLIBNEWCONNECTIONPROC_V2;
- //function to call when there's a new connection. Params are: the
- //new connection, IP of remote machine (host byte order)
- dwInternalIP:DWORD; //set on return, host byte order
- wPort :DWORD; //set on return, host byte order
- pExtra :^pointer; //argument is sent to callback, added during 0.3.4+
- dwExternalIP:DWORD; //set on return, host byte order
- wExPort :word; //set on return, host byte order
- end;
-
- twaitcallback = function(timeout:dword):integer; cdecl;
- { Pointered type is above }
- TNETLIBOPENCONNECTION = record
- cbSize : int;
- szHost : PAnsiChar; // can be an IP in string form
- wPort : Word;
- flags : DWORD; // see NLOCF_* flags
- timeout: Cardinal;
- // optional, called in the context of the thread that issued the attempt,
- // if it returns 0 the connection attempt is stopped, the remaining
- // timeout value can also be adjusted
- waitcallback:twaitcallback;
- end;
-
- PNETLIBHTTPPROXYINFO = ^TNETLIBHTTPPROXYINFO;
- TNETLIBHTTPPROXYINFO = record
- cbSize : int;
- flags : DWORD; // see NLHPIF_* above
- szHttpPostUrl : PAnsiChar;
- szHttpGetUrl : PAnsiChar;
- firstGetSequence : int;
- firstPostSequence: int;
- combinePackets : int; // MIRANDA_VER >= 0x0900
- end;
-
- PNETLIBBASE64 = ^TNETLIBBASE64;
- TNETLIBBASE64 = record
- pszEncoded: PAnsiChar;
- cchEncoded: int;
- pbDecoded : PByte;
- cbDecoded : int;
- end;
-
- PNETLIBHTTPHEADER = ^TNETLIBHTTPHEADER;
- TNETLIBHTTPHEADER = record
- szName : PAnsiChar;
- szValue: PAnsiChar;
- end;
- ANETLIBHTTPHEADER = array [0..1000] of TNETLIBHTTPHEADER;
-
- { PNETLIBHTTPREQUEST = ^TNETLIBHTTPREQUEST, defined above because this is
- forward referenced from there }
- TNETLIBHTTPREQUEST = record
- cbSize :int;
- requestType :int; // REQUEST_* constant
- flags :DWORD;
- szUrl :PAnsiChar;
- { doesn't contain Content-Length, it'll be added automatically }
- headers :^ANETLIBHTTPHEADER; // pointer to an array of em?
- headersCount :int; // yes they do
- pData :PAnsiChar; // data to be sent on POST request
- dataLength :int; // must be 0 for REQUEST_GET/REQUEST_CONNECT
- resultCode :int;
- szResultDescr:PAnsiChar;
- nlc :THANDLE;
- end;
-
- PNETLIBBUFFER = ^TNETLIBBUFFER;
- TNETLIBBUFFER = record
- buf : PAnsiChar;
- len : int;
- flags: int; // see MSG_* constants above
- end;
-
- PNETLIBSELECT = ^TNETLIBSELECT;
- TNETLIBSELECT = record
- cbSize : int;
- dwTimeout : DWORD; // in milliseconds, INFINITE is acceptable
- hReadConns : array [0..FD_SETSIZE] of THandle;
- hWriteConns : array [0..FD_SETSIZE] of THandle;
- hExceptConns: array [0..FD_SETSIZE] of THandle;
- end;
-
- PNETLIBSELECTEX = ^TNETLIBSELECTEX;
- TNETLIBSELECTEX = record
- cbSize : int;
- dwTimeout : DWORD; // in milliseconds, INFINITE is acceptable
- hReadConns : array [0..FD_SETSIZE] of THandle;
- hWriteConns : array [0..FD_SETSIZE] of THandle;
- hExceptConns: array [0..FD_SETSIZE] of THandle;
- // Added in v0.3.3+
- hReadStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
- hWriteStatus : array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
- hExceptStatus: array [0..FD_SETSIZE] of BOOL; // out, [in, expected to be FALSE]
- end;
-
- PNETLIBPACKETRECVER = ^TNETLIBPACKETRECVER;
- TNETLIBPACKETRECVER = record
- cbSize : int;
- dwTimeout : DWORD; // infinite is allowed -- initialise before use
- bytesUsed : int; // this many bytes are removed from the start of the
- // buffer, set to 0 on return -- initialise before use
- bytesAvailable: int; // equal the returnd value by service, unless the
- // return value is 0 (connection closed)
- bufferSize : int; // same as the parameter given to
- // MS_NETLIB_CREATEPACKETRECVER: wParam
- buffer : PByte; // contains the read data
- end;
-
-const
- {
- wParam : 0
- lParam : Pointer to an initalised TNETLIBUSER structure
- Affects: Initialises the netlib for a set of connections, see notes
- Returns: Returns a handle for future netlib calls, NULL on failure.
- Notes : Netlib is loaded AFTER all plugins, thus a call to this service
- in Load() will fail, hook ME_SYSTEM_MODULESLOADED and call it
- from there.
- -
- Netlib will save settings under .szSettings module, all settings
- (being?) begin with 'NL'.
- -
- Defacto settings are the same as <All connections> combobox entry option
- as seen in Miranda->Options->Network
- Version: v0.1.2.2+
- Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY, ERROR_DUP_NAME
- }
- MS_NETLIB_REGISTERUSER:PAnsiChar = 'Netlib/RegisterUser';
-
-{
- Assign a Netlib user handle a set of dynamic HTTP headers to be used with all
-
- HTTP connections that enable the HTTP-use-sticky headers flag.
- The headers persist until cleared with lParam=NULL.
-
- All memory should be allocated by the caller using malloc() from MS_SYSTEM_GET_MMI
- Once it has passed to Netlib, Netlib is the owner of it, the caller should not refer to the memory
- In any way after this point.
-
- wParam=(WPARAM)hNetLibUser
- lParam=(LPARAM)(AnsiChar*)szHeaders
-
- NOTE: The szHeaders parameter should be a NULL terminated string following the HTTP header syntax.
- This string will be injected verbatim, thus the user should be aware of setting strings that are not
- headers. This service is NOT THREAD SAFE, only a single thread is expected to set the headers and a single
- thread reading the pointer internally, stopping race conditions and mutual exclusion don't happen.
-
- Version 0.3.2a+ (2003/10/27)
-}
- MS_NETLIB_SETSTICKYHEADERS:PAnsiChar = 'Netlib/SetStickyHeaders';
-
- {
- wParam : HANDLE
- lParam : Pointer to a initalised TNETLIBUSERSETTINGS structure
- Affects: Gets the user configured settings for a Netlib user, see notes
- Returns: [non zero] on SUCCESS, NULL(0) on failure
- Notes : .cbSize must be filled with sizeof() before calling --
- the returned null terminated strings (in the structure) are valid
- as long as HANDLE remains open or proxy options are changed
- again, do not rely on them being around forever.
- Version: v0.1.2.2+
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_GETUSERSETTINGS:PAnsiChar = 'Netlib/GetUserSettings';
-
- {
- wParam : HANDLE
- lParam : Pointer to a initalised NETLIBUSERSETTINGS structure
- Affect : Changes the configurable settings for a Netlib user -- see notes
- Returns: [non zero] on success, NULL(0) on failure
- Notes : This service is only really useful for people that specify NUF_NOOPTIONS
- when registering and want to create their own options.
- Settings will be stored even if the option to enable it, is it not enabled,
- e.g. useProxyAuth is 0, szProxyAuthPassword will still be saved
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_SETUSERSETTINGS:PAnsiChar = 'Netlib/SetUserSettings';
-
- {
- wParam : HANDLE / SOCKET
- lParam : 0
- Affects: Closes a handle, see notes
- Returns: Returns [non zero] on success, NULL(0) on failure
- Notes : All netlib handles should be closed once they're finished with,
- If a SOCKET type is passed instead of netlib handle type, it is closed
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_CLOSEHANDLE:PAnsiChar = 'Netlib/CloseHandle';
-
- {
- wParam : HANDLE
- lParam : Pointer to a initialised TNETLIBBIND
- Affects: Open a port and wait for connections on it -- see notes
- Returns: Returns a handle on success, NULL(0) on failure
- Notes : this function does the equivalent of socket(), bind(), getsockname(),
- listen(), accept() -- internally this function creates a new thread
- which waits around in accept() for new connections.
- When one is received, TNETLIBBIND.pfnNewConnection is called,
- from the context of the NEW thread and then it
- returns to waiting for connections.
- -
- Close the returned handle to end the thread and close the port.
- -
- Errors : ERROR_INVALID_PARAMETER, any returned by socket(), bind(), listen()
- getsockname()
- }
- MS_NETLIB_BINDPORT:PAnsiChar = 'Netlib/BindPort';
-
- {
- wParam : HANDLE
- lParam : Pointer to an initalised TNETLIBOPENCONNECTION structure
- Affects: Opens a connection -- see notes
- Returns: Returns a Handle to a new connection on success, NULL(0) on failure
- Notes : internally this service is the equivalent of socket(), gethostbyname(),
- connect()
- -
- If NLOCF_HTTP is set and HANDLE is configured for HTTP(S) proxy
- then this function will connect() to that proxy server ONLY,
- without performing any initialisation conversation.
- -
- If HANDLE is configured for an HTTP proxy and does not support
- HTTP gateways and you try to open a connection without NLOCF_HTTP
- then this service will first attempt to open an HTTPS connection,
- if that fails, it will try a direct connection, if *that* fails
- then it will return failure with the error
- from connect() during the connection attempt
- Errors : ERROR_INVALID_PARAMETER, any returned by socket(), gethostbyname(),
- connect(), MS_NETLIB_SEND, MS_NETLIB_RECV, select()
- -
- ERROR_TIMEOUT (during proxy communication)
- ERROR_BAD_FORMAT (very invalid proxy reply)
- ERROR_ACCESS_DENIED (by proxy)
- ERROR_CONNECTION_UNAVAIL (socks proxy can't connect to identd)
- ERROR_INVALID_ACCESS (proxy refused identd auth)
- ERROR_INVALID_DATA (proxy returned invalid code)
- ERROR_INVALID_ID_AUTHORITY (proxy requires use of auth method that's not supported)
- ERROR_GEN_FAILURE (socks5/https general failure)
- ERROR_CALL_NOT_IMPLEMENTED (socks5 command not supported)
- ERROR_INVALID_ADDRESS (socks5 address type not supported)
- -
- HTTP: anything from TNETLIBUSER.pfnHttpGatewayInit, TNETLIBUSER.pfnHttpGatewayBegin,
- MS_NETLIB_SENDHTTPREQUEST or MS_NETLIB_RECVHTTPHEADERS
- }
- MS_NETLIB_OPENCONNECTION:PAnsiChar = 'Netlib/OpenConnection';
-
- {
- wParam : HANDLE
- lParam : Pointer to an initialised NETLIBHTTPPROXYINFO structure
- Affects: Sets the required information for an HTTP proxy connection -- see notes
- Returns: [non zero] on success, NULL(0) on failure
- Notes : This service is designed to be called from
- within TNETLIBUSER.pfnHttpGatewayInit (see notes in C header under
- MS_NETLIB_REGISTERUSER)
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_SETHTTPPROXYINFO:PAnsiChar = 'Netlib/SetHttpProxyInfo';
-
- {
- wParam : HANDLE
- lParam : 0
- Affects: Get's the SOCKET associated with a handle -- see notes
- Returns: the SOCKET on success, INVALID_SOCKET on failure
- Notes : The Netlib handle passed to this service should only be passed
- if they were returned with MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT
- -
- Be careful how you use this socket because you might be connected via an
- HTTP proxy, in which case calling send/recv() will break things
- -
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_GETSOCKET:PAnsiChar = 'Netlib/GetSocket';
-
- {
- wParam : 0
- lParam : Pointer to a null terminated string
- Affects: URL-encodes a string for x-www-form-urlencoded (and other uses) -- see notes
- Returns: A pointer to a null terminated string, NULL(0) on failure
- Notes : The returned string must be freed after it's no longer needed,
- to do this Miranda's process heap must be used (under the WINAPI), e.g.
- HeapFree(GetProcessHeap(), 0, the_returned_string)
- Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
- }
- MS_NETLIB_URLENCODE:PAnsiChar = 'Netlib/UrlEncode';
-
- {
- wParam : 0
- lParam : Pointer to a TNETLIBBASE64 initialised structure
- Affects: Decodes a Base64 null terminated string, see notes
- Returns: [non zero] on success, NULL(0) on failure
- Notes : TNETLIBBASE64.pszEncoded and cchEncoded must contain a pointer to
- a buffer to use as input, and it's length, the length
- should not include space taken for null termination --
- -
- Output is placed in ..pbDecoded and ..cbDecoded for buffer and
- length of buffer -- the maxiumum output for a given input can
- be worked out with Netlib_GetBase64DecodedBufferSize() function
- see below.
- -
- For more information on Base64 see rfc-1421.
- Errors : ERROR_INVALID_PARAMETER, ERROR_INVALID_DATA, ERROR_BUFFER_OVERFLOW
- }
- MS_NETLIB_BASE64DECODE:PAnsiChar = 'Netlib/Base64Decode';
-
- {
- wParam : 0
- lParam : Pointer to an initialised TNETLIBBASE64 structure
- Affect : Base64 encode a string, see notes
- Returns: [non zero] on success, NULL(0) on failure
- Notes : TNETLIBBASE64.pbDecode and TNETLIBBASE64.cbDecoded contain
- the input buffer and it's length --
- TNETLIBBASE64.pszEncoded and TNETLIBBASE64.cchEncoded contain the
- buffer in which to put the output and it's length.
- -
- The maximum output size for a given input can be worked
- out with the function Netlib_GetBase64EncodedBufferSize() below
- .pszEncoded is null terminated, on return TNETLIBBASE64.cchEncoded
- is set to the actual length excluding 0.
- Errors : ERROR_INVALID_PARAMETER, ERROR_BUFFER_OVERFLOW
- }
- MS_NETLIB_BASE64ENCODE:PAnsiChar = 'Netlib/Base64Encode';
-
- {
- wParam : HANDLE
- lParam : Pointer to a initialised TNETLIBHTTPREQUEST structure
- Affect : Send an HTTP request over a connection, see notes
- Returns: The number of bytes on success, SOCKET_ERROR on failure
- Notes : HANDLE must of been returned by MS_NETLIB_OPENCONNECTION,,
- If you use NLHRF_SMARTAUTHHEADER and NTLM auth is in use then
- full NTLM auth transcation occurs, comprising sending the
- domain, getting the challenge, sending the response.
- NETLIBHTTPREQUEST.resultCode and NETLIBHTTPREQUEST.szResultDescr are
- ignored by this service.
- Errors : ERROR_INVALID_PARAMETER, MS_NETLIB_SEND (return codes)
- }
- MS_NETLIB_SENDHTTPREQUEST:PAnsiChar = 'Netlib/SendHttpRequest';
-
- {
- wParam : HANDLE
- lParam : 0
- Affect : Receive HTTP headers, see notes
- Returns: A pointer to a TNETLIBHTTPREQUEST structure on success, NULL(0) on failure
- Notes : The returned pointer must be freed after it's done with
- use MS_NETLIB_FREEHTTPREQUESTSTRUCT.
- -
- HANDLE must be returned by MS_NETLIB_OPENCONNECTION
- -
- Return^.pData=NIL and Return^.dataLength=0 always
- -
- The returned data should be retrieved using MS_NETLIB_RECV once
- the headers have been parsed.
- If headers haven't finished within 60 seconds the function returns
- NULL(0) and ERROR_TIMEOUT
- Errors : ERROR_INVALID_PARAMETER, any MS_NETLIB_RECV or select()
- ERROR_HANDLE_EOF (connection closed bfore headers complete)
- ERROR_TIMEOUT (headers still not complete after 60 seconds)
- ERROR_BAD_FORMAT (invalid character or line ending in headers, or first line is blank)
- ERROR_BUFFER_OVERFLOW (each header line must be less than 4096 chars long)
- ERROR_INVALID_DATA (first header line is malformed ("http/[01].[0-9] [0-9]+ .*", or no colon in subsequent line)
-
- }
- MS_NETLIB_RECVHTTPHEADERS:PAnsiChar = 'Netlib/RecvHttpHeaders';
-
- {
- wParam : 0
- lParam : Pointer returned by MS_NETLIB_RECVHTTPHEADERS to free
- Affect : Free the memory used by a TNETLIBHTTPREQUEST structure, see notes
- Returns: [non zero] on success, NULL(0) on failure
- Notes : This service should only be used with memory pointers returned
- by either MS_NETLIB_RECVHTTPHEADERS or MS_NETLIB_HTTPTRANSACTION!.
- Errors : ERROR_INVALID_PARAMETER
-
- }
- MS_NETLIB_FREEHTTPREQUESTSTRUCT:PAnsiChar = 'Netlib/FreeHttpRequestStruct';
-
- {
- wParam : HANDLE
- lParam : Pointer to a TNETLIBHTTPREQUEST structure
- Affect : Carry out an entire HTTP transaction, see notes
- Returns: another pointer to a TNETLIBHTTPREQUEST structure or NULL(0)
- on failure
- Notes : The returned pointer must be freed at some point
- with MS_NETLIB_FREEHTTPREQUESTSTRUCT,
- -
- TNETLIBHTTPREQUEST.szUrl should have a full HTTP URL, if it
- does not start with http://, that will be assumed, but do not
- take this assumption to stay assumed (heh..) in the future
- -
- this service equivalent of open(), sendhttp(), getheaders()
- netlib_recv(), netlib_closehandle()
- -
- TNETLIBHTTPREQUEST.headers will be added to with the following
- headers if they're not already present :
- "Host" (even if it is requested in .flags)
- "User-Agent" (in form : 'Miranda/d.d.d.d <(status of release)>')
- "Content-Length" (for POSTs only, set to TNETLIBHTTPREQUEST.dataLength)
-
- If you don't want to send any of these headers --
- set TNETLIBHTTPREQUEST.headers to NULL(0)
- -
- In the returned pointer, pData[dataLen] is always 0 for 'safety'
- also : headers, headersCount, pData, dataLength, resultCode and
- szResultDescr are all valid
- -
- Also take care not to assume that a returned pointer means that
- at the HTTP level it all worked out -- refer to the resultCode for
- 2xx before doing anything else
- -
- Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
- Errors returned by the aforementioned internally used functions
- }
- MS_NETLIB_HTTPTRANSACTION:PAnsiChar = 'Netlib/HttpTransaction';
-
- {
- wParam : HANDLE
- lParam : Pointer to an initialised TNETLIBBUFFER structure
- Affect : Send data over an open connection see notes
- Returns: The number of bytes sent on success, SOCKET_ERROR on failure
- Notes : see Netlib_Send() helper function
- Errors : ERROR_INVALID_PARAMETER,
- anything from socket(), connect()
- send(), TNETLIBUSER.pfnHttpGatewayWrapSend(),
- (HTTP proxy): ERROR_GEN_FAILURE (http result code wasn't 2xx)
- MS_NETLIB_SENDHTTPREQUEST, MS_NETLIB_RECVHTTPHEADERS
- }
- MS_NETLIB_SEND:PAnsiChar = 'Netlib/Send';
-
- {
- wParam : HANDLE
- lParam : Pointer to an initialised TNETLIBBUFFER structure
- Affect : Receive data over a connection, see notes
- Returns: The number of bytes read on success, SOCKET_ERROR on failure
- Notes :
- This service uses some of the same flags as MS_NETLIB_SEND :
- MSG_PEEK,
- MSG_NODUMP,
- MSG_DUMPPROXY,
- MSG_NOHTTPGATEWAYWRAP,
- MSG_DUMPASTEXT,
- MSG_RAW
- -
- On using MSG_NOHTTPGATEWAYWRAP: Because packets through an HTTP proxy are
- batched and cached and stuff, using this flag is not a guarantee that it
- will be obeyed, and if it is it may even be propogated to future calls
- even if you don't specify it then. Because of this, the flag should be
- considered an all-or-nothing thing: either use it for the entire duration
- of a connection, or not at all.
- Errors : ERROR_INVALID_PARAMETER, anything from recv()
- (HTTP proxy):
- ERROR_GEN_FAILURE (http result code wasn't 2xx)
- ERROR_INVALID_DATA (no Content-Length header in reply)
- ERROR_NOT_ENOUGH_MEMORY (Content-Length very large)
- ERROR_HANDLE_EOF (connection closed before Content-Length bytes recved)
- anything from select(),
- MS_NETLIB_RECVHTTPHEADERS, nlu.pfnHttpGatewayUnwrapRecv, socket(),
- connect(), MS_NETLIB_SENDHTTPREQUEST
-
- }
- MS_NETLIB_RECV:PAnsiChar = 'Netlib/Recv';
-
- {
- wParam : 0
- lParam : Pointer to an initialised TNETLIBSELECT structure
- Affect : Determine the status of one or more connections, see notes
- Returns: The numbe of ready connections, SOCKET_ERROR on failure
- Notes : All handles passed to this service must have been returned
- either by MS_NETLIB_OPENCONNECTION or MS_NETLIB_BINDPORT,
- the last handle in each list must be followed by either NULL
- or INVALID_HANDLE_VALUE.
- Errors : ERROR_INVALID_HANDLE, ERROR_INVALID_DATA, anything from select()
- }
- MS_NETLIB_SELECT :PAnsiChar = 'Netlib/Select';
- MS_NETLIB_SELECTEX:PAnsiChar = 'Netlib/SelectEx'; // added in v0.3.3
-
-{
- Shutdown connection
- wParam=(WPARAM)(HANDLE)hConnection
- lParam=(LPARAM)0
- Returns 0
-}
- MS_NETLIB_SHUTDOWN:PAnsiChar = 'Netlib/Shutdown';
-
- {
- wParam : HANDLE
- lParam : maxPacketSize
- Affect : Create a packet receiver, see notes
- Returns: A handle on success, NULL(0) on failure
- Notes : The packet receiver implements the common situation where
- you have a variable length of packets coming thru over a connection
- and you want them split up in order to handle them.
- -
- The major limiation is, that the buffer is created in memory,
- so you can't have arbitrarily large packets
- Errors : ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
- }
- MS_NETLIB_CREATEPACKETRECVER:PAnsiChar = 'Netlib/CreatePacketRecver';
-
- {
- wParam : Handle returned by MS_NETLIB_CREATEPACKETRECVER
- lParam : Pointer to an initialised TNETLIBPACKETRECVER
- Returns: The total number of bytes available in the buffer, NULL(0)
- if the connection was closed or SOCKET_ERROR.
- -
- If TNETLIBPACKETRECVER.bytesUsed is set to zero and the
- buffer is already full up to the maxPacketSize, it is assumed
- that a too large packet has been received, All data in
- the buffer is discarded and receiving has started anew.
- -
- This will probably cause alignment problem so if you think
- that tis iss likely to happen, then you should deal with it
- yourself.
- -
- Closing the packet receiver will not close the associated
- connection but will discard any bytes still in the buffer,
- so if you intend to carry on reading from that connection,
- make sure you have processed the buffer first.
- -
- This service is equivalent of memmove() to remove
- the first bytesUsed from the buffer, select(), if dwTimeOut
- is not INFINITE, then MS_NETLIB_RECV
- Errors : ERROR_INVALID_PARAMETER, ERROR_TIMEOUT, anything from select(),
- MS_NETLIB_RECV
- }
- MS_NETLIB_GETMOREPACKETS:PAnsiChar = 'Netlib/GetMorePackets';
-
- {
- wParam : HANDLE
- lParam : Pointer to null terminated string to uh, log.
- Affect : Add a message to the log (if it's running) see notes
- Returns: non zeror on success, NULL(0) on failure
- Notes : Don't include \r\n or #13#10 it's not needed,
- -
- Doesn't support formatting like the given C code for
- Netlib_Logf, just use FmtStr() and then call this service
- if you want that.
- Errors : ERROR_INVALID_PARAMETER
- }
- MS_NETLIB_LOG:PAnsiChar = 'Netlib/Log';
- MS_NETLIB_LOGW:PAnsiChar = 'Netlib/LogW';
-
- {
- Sets a gateway polling timeout interval
- wParam=(WPARAM)(HANDLE)hConn
- lParam=(LPARAM)timeout
- Returns previous timeout value
- Errors: -1
- }
- MS_NETLIB_SETPOLLINGTIMEOUT:PAnsiChar = 'Netlib/SetPollingTimeout';
-
-{
- Makes connection SSL
- wParam=(WPARAM)(HANDLE)hConn
- lParam=0
- Returns 0 on failure 1 on success
-}
- MS_NETLIB_STARTSSL:PAnsiChar = 'Netlib/StartSsl';
-
-type
- NETLIBSSL = record
- cbSize:int;
- host :PAnsiChar; // Expected host name
- flags :int; // Reserved
- end;
-
- const
-/////////////////////////////////////////////////////////////////////////////////////////
-// Security providers (0.6+)
-
- NNR_UNICODE = 1;
-// Inits a required security provider. Right now only NTLM is supported
-// Returns HANDLE = NULL on error or non-null value on success
- MS_NETLIB_INITSECURITYPROVIDER:PAnsiChar = 'Netlib/InitSecurityProvider';
-
-type
- NETLIBNTLMINIT2 = record
- cbSize :size_t;
- szProviderName:TChar;
- szPrincipal :TChar;
- flags :dword;
- end;
-
-const
- MS_NETLIB_INITSECURITYPROVIDER2:PAnsiChar = 'Netlib/InitSecurityProvider2';
-
-// Destroys a security provider's handle, provided by Netlib_InitSecurityProvider.
-// Right now only NTLM is supported
- MS_NETLIB_DESTROYSECURITYPROVIDER:PAnsiChar = 'Netlib/DestroySecurityProvider';
-
-// Returns the NTLM response string. The result value should be freed using mir_free
- MS_NETLIB_NTLMCREATERESPONSE:PAnsiChar = 'Netlib/NtlmCreateResponse';
-
-type
- NETLIBNTLMREQUEST = record
- szChallenge:PAnsiChar;
- userName :PAnsiChar;
- password :PAnsiChar;
- complete :int;
- end;
-
-type
- NETLIBNTLMREQUEST2 = record
- cbSize :size_t;
- szChallenge:PAnsiChar;
- szUserName :TChar;
- szPassword :TChar;
- complete :dword;
- flags :dword;
- end;
-
-const
- MS_NETLIB_NTLMCREATERESPONSE2 = 'Netlib/NtlmCreateResponse2';
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Netlib hooks (0.8+)
-
-// WARNING: these hooks are being called in the context of the calling thread, without switching
-// to the first thread, like all another events do. The hook procedure should be ready for the
-// multithreaded mode
-//
-// Parameters:
-// wParam: NETLIBNOTIFY* - points to the data being sent/received
-// lParam: NETLIBUSER* - points to the protocol definition
-
-type
- NETLIBNOTIFY = record
- nlb :PNETLIBBUFFER; // pointer to the request buffer
- result:int; // amount of bytes really sent/received
- end;
- TNETLIBNOTIFY = NETLIBNOTIFY;
-
-const
- ME_NETLIB_FASTRECV :PAnsiChar = 'Netlib/OnRecv'; // being called on every receive
- ME_NETLIB_FASTSEND :PAnsiChar = 'Netlib/OnSend'; // being called on every send
- ME_NETLIB_FASTDUMP :PAnsiChar = 'Netlib/OnDump'; // being called on every dump
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_newawaysys.inc b/delphi/Awkward/include/m_newawaysys.inc
deleted file mode 100644
index 1a12135..0000000
--- a/delphi/Awkward/include/m_newawaysys.inc
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- New Away System plugin for Miranda IM
- Copyright (C) 2005 Chervov Dmitry
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-{$IFNDEF M_NEWAWAYSYS}
-{$DEFINE M_NEWAWAYSYS}
-
-const
-// NAS_PROTOINFO::Flags constants
- PIF_NO_CLIST_SETSTATUSMODE = 1; // NAS won't call MS_CLIST_SETSTATUSMODE service on a global status change, if this flag is set. it's useful if you want to change the global message and status in NAS without changing current "real" protocol statuses. NAS ignores this flag if szProto != NULL
- PIF_NOTTEMPORARY = 2; // usually you should NOT set this flag
-// MS_NAS_SETSTATE: NAS will overwrite current user-defined message for szProto if this flag is specified; otherwise (if the flag isn't specified), your szMsg will be stored only until the next szProto status change, and won't overwrite any messages specified by user
-// MS_NAS_GETSTATE: NAS ignores any temporary messages and returns only non-temporary ones. this flag affects something only when status == 0
-
-type
- PNAS_PROTOINFO = ^TNAS_PROTOINFO;
- TNAS_PROTOINFO = record
- cbSize : int;
- szProto: PAnsiChar; // pointer to protocol modulename (NULL means global)
- Msg : TChar; // pointer to the status message (may be NULL -
- // means that there's no specific message for this protocol)
-{
- Be aware that MS_NAS_GETSTATE allocates memory for szMsg through Miranda's
- memory management interface (MS_SYSTEM_GET_MMI). And MS_NAS_SETSTATE expects
- szMsg to be allocated through the same service. MS_NAS_SETSTATE deallocates szMsg.
-}
- status : WORD; // status mode. 0 means current (NAS will overwrite 0 with
- // the current status mode)
-{
- for MS_NAS_GETSTATE if the specified status is not 0, MS_NAS_GETSTATE will
- return the default/last status message (depends on settings) - i.e. the same
- message that will be shown by default when user changes status to the specified
- one. please note that, for example, if current status mode is ID_STATUS_AWAY,
- then status messages returned by MS_NAS_GETSTATE for status=0 and
- status=ID_STATUS_AWAY may be different! for status=ID_STATUS_AWAY it always
- returns the default/last status message, and for status=0 it returns
- _current_ status message.
-}
- Flags : int;
- end;
-
-const
-// MS_NAS_GETSTATE
-// Fills specified array of NAS_PROTOINFO items with protocol data.
-// You must construct the array and specify cbSize and szProto fields of
-// all items in the array before calling this service.
-// Remember to free szMsg fields through Miranda's MMI if you don't pass them back to NAS through MS_NAS_SETSTATE later.
-// wParam = (WPARAM)(NAS_PROTOINFO*)pi - pointer to an array of NAS_PROTOINFO items to be filled.
-// lParam = (LPARAM)(int)protoCount - number of items in pi.
-// returns 0 on success
- MS_NAS_GETSTATEA:PAnsiChar = 'NewAwaySystem/GetStateA';
- MS_NAS_GETSTATEW:PAnsiChar = 'NewAwaySystem/GetStateW';
-
-// MS_NAS_SETSTATE
-// Changes status mode and message of specified protocols.
-// (Note that this service deallocates szMsg field of the specified items through
-// Miranda's MMI, so the array is not valid anymore after MS_NAS_SETSTATE returns!)
-// wParam = (NAS_PROTOINFO*)pi - pointer to an array of NAS_PROTOINFO items.
-// lParam = (LPARAM)(int)protoCount - number of items in pi.
-// returns 0 on success
- MS_NAS_SETSTATEA:PAnsiChar = 'NewAwaySystem/SetStateA';
- MS_NAS_SETSTATEW:PAnsiChar = 'NewAwaySystem/SetStateW';
-var
- MS_NAS_GETSTATE:PAnsiChar absolute MS_NAS_GETSTATEW;
- MS_NAS_SETSTATE:PAnsiChar absolute MS_NAS_SETSTATEW;
-
-const
-// NAS_ISWINFO::Flags constants
- ISWF_NOCOUNTDOWN = 1; // don't start the countdown to close the window
- ISWF_UNICODE = 2; // specifies that NAS_ISWINFO::szMsg is a WCHAR*
-type
- PNAS_ISWINFO = ^TNAS_ISWINFO;
- TNAS_ISWINFO = record
- cbSize :int;
- szProto :PAnsiChar; // pointer to initial protocol modulename (NULL means
- // global); ignored when hContact is not NULL.
- hContact:THANDLE; // NAS will select this contact in the window initially,
- // if it's not NULL.
- Msg :TChar; // pointer to an initial status message (may be NULL,
- // NAS will use the default message then)
- status :word; // status mode. 0 means current.
- iFlags :int; // a combination of ISWF_ constants
- end;
-
-const
-// MS_NAS_INVOKESTATUSWINDOW
-// Invokes the status message change window.
-// Though if the window is open already, this service just activates an existing window and changes protocol status (i.e. it ignores szMsg and hContact). This behavior may change in future.
-// wParam = (WPARAM)(NAS_ISWINFO*)iswi - pointer to a NAS_ISWINFO structure.
-// lParam = 0
-// returns HWND of the window on success, or NULL on failure.
- MS_NAS_INVOKESTATUSWINDOW:PAnsiChar = 'NewAwaySystem/InvokeStatusWindow';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_options.inc b/delphi/Awkward/include/m_options.inc
deleted file mode 100644
index 7567bb2..0000000
--- a/delphi/Awkward/include/m_options.inc
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$IFNDEF M_OPTIONS}
-{$DEFINE M_OPTIONS}
-
-const
- { Opt/Initialise
- The user opened the options dialog. Modules should do whatever initialisation
- they need and call opt/addpage one or more times if they want pages displayed
- in the options dialog
- wParam=addInfo
- lParam=0
- addInfo should be passed straight to the wParam of opt/addpage
- }
- ME_OPT_INITIALISE:PAnsiChar = 'Opt/Initialise';
-
- { Opt/AddPage
- Must only be called during an opt/initialise hook
- Adds a page to the options dialog
- wParam=addInfo
- lParam=(LPARAM)(OPTIONSDIALOGPAGE )odp
- addInfo must have come straight from the wParam of opt/initialise
- Pages in the options dialog operate just like pages in property sheets. See the
- Microsoft documentation for details on how they operate.
- Strings in the structure can be released as soon as the service returns, but
- icons must be kept around. This is not a problem if you're loading them from a
- resource.
- Prior to v0.1.2.1 the options dialog would resize to fit the largest page, but
- since then it is fixed in size. The largest page that fits neatly is 314x240
- DLUs.
- }
-
-type
- POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
- TOPTIONSDIALOGPAGE = record
- cbSize :int;
- position :int; // a position number, lower numbers are topmost
- szTitle :TChar; // [TRANSLATED-BY-CORE]
- pfnDlgProc :pointer;
- pszTemplate :PAnsiChar;
- hInstance :THANDLE;
- hIcon :HICON; // v0.1.0.1+
- szGroup :TChar; // v0.1.0.1+ [TRANSLATED-BY-CORE]
- groupPosition :int; // v0.1.0.1+
- hGroupIcon :HICON; // v0.1.0.1+
- flags :dword; // v0.1.2.1+
- nIDBottomSimpleControl:int; // v0.1.2.1+
- // if in simple mode the dlg will be cut off after this control,
- // 0 to disable
- nIDRightSimpleControl :int; // v0.1.2.1+
- // if in simple mode the dlg will be cut off after this control,
- // 0 to disable
- expertOnlyControls :^int;
- nExpertOnlyControls :int; // v0.1.2.1+
- // these controls will be hidden in simple mode. Array must remain valid
- // for duration of dlg.
- szTab :TChar; // v0.6.0.0+ [TRANSLATED-BY-CORE]
- dwInitParam :LPARAM; // v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message
- end;
-
-const
- OPTIONPAGE_OLD_SIZE = 40;
- OPTIONPAGE_OLD_SIZE2 = 60;
- OPTIONPAGE_OLD_SIZE3 = 64;
-
-const
- ODPF_SIMPLEONLY = 1; // page is only shown when in simple mode
- ODPF_EXPERTONLY = 2; // " expert mode
- ODPF_BOLDGROUPS = 4; // give group box titles a bold font
- ODPF_UNICODE = 8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
- ODPF_USERINFOTAB = 16; // options page is tabbed
- ODPF_DONTTRANSLATE = 32; // do not translate option page title
-
-const
- PSN_EXPERTCHANGED = 2; //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state
-
- PSM_ISEXPERT = WM_USER+101; //returns true/false
- PSM_GETBOLDFONT = WM_USER+102; //returns HFONT used for group box titles
-
- MS_OPT_ADDPAGE:PAnsiChar = 'Opt/AddPage';
-
- { Opens the options dialog, optionally at the specified page v0.1.2.1+
- wParam=0
- lParam=(LPARAM)(OPENOPTIONSDIALOG*)&ood;
- Returns 0 on success, nonzero on failure
- The behaviour if the options dialog is already open is that it will just be
- activated, the page won't be changed. This may change in the future. }
-type
- POPENOPTIONSDIALOG = ^TOPENOPTIONSDIALOG;
- TOPENOPTIONSDIALOG = record
- cbSize :int;
- pszGroup:PAnsiChar; // set to NULL if it's a root item
- pszPage :PAnsiChar; // set to NULL to just open the options at no specific page
- pszTab :PAnsiChar; // set to NULL to just open the options at no specific tab
- end;
-
-const
- MS_OPT_OPENOPTIONS:PAnsiChar = 'Opt/OpenOptions';
-
-//Opens the options dialog, with only specified page v0.8.0.x+
- MS_OPT_OPENOPTIONSPAGE = 'Opt/OpenOptionsPage';
-
- SETTING_SHOWEXPERT_DEFAULT = 1;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_plugins.inc b/delphi/Awkward/include/m_plugins.inc
deleted file mode 100644
index 6a2052e..0000000
--- a/delphi/Awkward/include/m_plugins.inc
+++ /dev/null
@@ -1,92 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_PLUGINS}
-{$DEFINE M_PLUGINS}
-
-{
- Undocumented: Do NOT use.
- Version: 0.3.4.1+ (2004/10/04)
-}
-const
- DBPE_DONE = 1;
- DBPE_CONT = 0;
- DBPE_HALT = -1;
-type
- PPLUGIN_DB_ENUM = ^TPLUGIN_DB_ENUM;
- TPLUGIN_DB_ENUM = record
- cbSize : longint;
-// 0 = continue, 1 = found, -1 = stop now
- pfnEnumCallback : function (pluginname:PAnsiChar; link:pointer; lParam:LPARAM):longint;cdecl;
- lParam : LPARAM;
- end;
-
-const
- MS_PLUGINS_ENUMDBPLUGINS:PAnsiChar = 'Plugins/DbEnumerate';
-
-const
-// DEFMOD_PROTOCOLICQ = 1; // removed from v0.3.0.0 alpha
-// DEFMOD_PROTOCOLMSN = 2; // removed from v0.1.2.0+
- DEFMOD_UIFINDADD = 3;
- DEFMOD_UIUSERINFO = 4;
- DEFMOD_SRMESSAGE = 5; // removed from v0.3.3a (temp)
- DEFMOD_SRURL = 6;
- DEFMOD_SREMAIL = 7;
- DEFMOD_SRAUTH = 8;
- DEFMOD_SRFILE = 9;
- DEFMOD_UIHELP = 10;
- DEFMOD_UIHISTORY = 11;
-// DEFMOD_RNDCHECKUPD = 12; // removed from v0.3.1 alpha
-// DEFMOD_RNDICQIMPORT = 13; // not built in to v0.1.0.1+ (removed from v0.3 alpha)
- DEFMOD_RNDAUTOAWAY = 14;
- DEFMOD_RNDUSERONLINE = 15;
-// DEFMOD_RNDCRYPT = 16; // v0.1.0.1-v0.1.2.0
- DEFMOD_SRAWAY = 17; // v0.1.0.1+
- DEFMOD_RNDIGNORE = 18; // v0.1.0.1+
- DEFMOD_UIVISIBILITY = 19; // v0.1.1.0+, options page only
- DEFMOD_UICLUI = 20; // v0.1.1.0+
-// DEFMOD_UIPLUGINOPTS = 21; // v0.1.2.1+ removed from 0.4.0.1
-// DEFMOD_PROTOCOLNETLIB = 22; // v0.1.2.2+ removed from 0.8.0.5
- DEFMOD_RNDIDLE = 23; // v0.3.4a+
- DEFMOD_CLISTALL = 24; // v0.3.4a+ (2004/09/28)
- DEFMOD_DB = 25; // v0.3.4.3+ (2004/10/11)
- DEFMOD_FONTSERVICE = 26; // v0.7.0+ (2006/11/17)
- DEFMOD_UPDATENOTIFY = 27;
-// DEFMOD_ICOLIB = 27; // v0.7.0+ (2006/11/24)
- DEFMOD_SSL = 28; // v0.8.0+
-
- DEFMOD_HIGHEST = 28;
-
- {
- wParam : 0
- lParam : 0
- Affect : Gets an array of modules that the plugins report they want to replace
- Returns: Returns a pointer to an array of ints, with elements 1 or 0,
- indexed by the DEFMOD_* constants, 1 is to mark that the default
- module shouldn't be loaded, see notes
- Notes : this is primarily for use by the core's module initialiser,
- but could also be used by modules that are doing
- naughty things that are very feature-dependent.
- }
- MS_PLUGINS_GETDISABLEDEFAULTARRAY:PAnsiChar = 'Plugins/GetDisableDefaultArray';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_png.inc b/delphi/Awkward/include/m_png.inc
deleted file mode 100644
index 116ae1e..0000000
--- a/delphi/Awkward/include/m_png.inc
+++ /dev/null
@@ -1,67 +0,0 @@
-{
- Plugin of Miranda IM for reading/writing PNG images.
- Copyright (c) 2004-5 George Hazan (ghazan@postman.ru)
-
- Portions of this code are gotten from the libpng codebase.
- Copyright 2000, Willem van Schaik. For conditions of distribution and
- use, see the copyright/license/disclaimer notice in png.h
-
- Miranda IM: the free icq client for MS Windows
- Copyright (C) 2000-2002 Richard Hughes, Roland Rabien & Tristan Van de Vreede
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- File name : $Source: /cvsroot/miranda/miranda/include/m_png.h,v $
- Revision : $Revision: 1.1 $
- Last change on : $Date: 2005/10/29 17:10:51 $
- Last change by : $Author: ghazan $
-}
-
-{$IFNDEF M_PNG}
-{$DEFINE M_PNG}
-{ Image/Dib2Png
- Converts a Device Independent Bitmap to a png stored in memory
- wParam=0
- lParam=(WPARAM)(DIB2PNG*)descr
-}
-type
- PDIB2PNG = ^TDIB2PNG;
- TDIB2PNG = record
- pbmi : PBITMAPINFO;
- pDiData : PBYTE;
- pResult : PBYTE;
- pResultLen : Plongint;
- end;
-
-const
- MS_DIB2PNG:PAnsiChar = 'Image/Dib2Png';
-
-{ Image/Png2Dib
- Converts a png stored in memory to a Device Independent Bitmap
- wParam=0
- lParam=TPNG2DIB(descr)
-}
-type
- PPNG2DIB = ^TPNG2DIB;
- TPNG2DIB = record
- pSource : PBYTE;
- cbSourceSize : DWORD;
- pResult : ^PBITMAPINFOHEADER;
- end;
-
-const
- MS_PNG2DIB:PAnsiChar = 'Image/Png2Dib';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_popup.inc b/delphi/Awkward/include/m_popup.inc
deleted file mode 100644
index 57a25e8..0000000
--- a/delphi/Awkward/include/m_popup.inc
+++ /dev/null
@@ -1,484 +0,0 @@
-{
-===============================================================================
- PopUp plugin
-Plugin Name: PopUp
-Plugin authors: Luca Santarelli aka hrk (hrk@users.sourceforge.net)
- Victor Pavlychko (nullbie@gmail.com)
-===============================================================================
-The purpose of this plugin is to give developers a common "platform/interface"
-to show PopUps. It is born from the source code of NewStatusNotify, another
-plugin I've made.
-
-Remember that users *must* have this plugin enabled, or they won't get any
-popup. Write this in the requirements, do whatever you wish ;-)... but tell
-them!
-===============================================================================
-}
-
-{$IFNDEF M_POPUP}
-{$DEFINE M_POPUP}
-
-{
-NOTE! Since Popup 1.0.1.2 there is a main meun group called "PopUps" where I
-have put a "Enable/Disable" item. You can add your own "enable/disable" items
-by adding these lines before you call MS_CLIST_ADDMAINMENUITEM:
-mi.pszPopUpName = Translate("PopUps");
-mi.position = 0; //You don't need it and it's better if you put it to zero.
-}
-
-const POPUP_VERSION = $02010003;
-
-const
- MAX_CONTACTNAME = 2048;
- MAX_SECONDLINE = 2048;
- MAX_ACTIONTITLE = 64;
-
-// POPUP_USE_SKINNED_BG = $FFFFFFFF;
-
-// Popup Action flags
- PAF_ENABLED = $01; // Actions is enabled. You may store one global
- // action set and toggle some items depending on
- // popup you are requesting
-
-type
- PPOPUPACTION = ^TPOPUPACTION;
- TPOPUPACTION = record
- cbSize :int; // sizeof(POPUPACTION)
- lchIcon :HICON; // Action Icon
- // Action title text. Please use module name as prefix
- // (e.g. "Popup Plus/Dismiss Popup") and don't translate
- lpzTitle:array [0..MAX_ACTIONTITLE-1] of AnsiChar;
- flags :DWORD; // set of PAF_* flags
- wParam :WPARAM; // wParam for UM_POPUPACTION message
- lParam :LPARAM; // lParam for UM_POPUPACTION message
- end;
-
-type
- // for info on what this stuff is, see m_popup.h
- PPOPUPDATA = ^TPOPUPDATA;
- TPOPUPDATA = record
- lchContact : THANDLE; // Handle to the contact, can be NULL (main contact).
- lchIcon : HICON; // Handle to a icon to be shown. Cannot be NULL.
-// This is the contact name or the first line in the plugin. Cannot be NULL.
- lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
-// This is the second line text. Users can choose to hide it. Cannot be NULL.
- lpszText : array [0..MAX_SECONDLINE-1] of AnsiChar;
- colorBack : COLORREF; // COLORREF to be used for the background.
- // Can be NULL, default will be used.
- colorText : COLORREF; // COLORREF to be used for the text.
- // Can be NULL, default will be used.
- PluginWindowProc: pointer; // Read below. Can be NULL; default will be used.
- PluginData : Pointer; // Read below. Can be NULL.
- end;
-
-type
- PPOPUPDATAEX = ^TPOPUPDATAEX;
- TPOPUPDATAEX = record
- lchContact : THANDLE;
- lchIcon : HICON;
- lpszContactName : array [0..MAX_CONTACTNAME-1] of AnsiChar;
- lpszText : array [0..MAX_SECONDLINE -1] of AnsiChar;
- colorBack : COLORREF;
- colorText : COLORREF;
- PluginWindowProc: pointer;
- PluginData : Pointer;
- iSeconds : int; // Custom delay time in seconds.
- // -1 means "forever", 0 means = 'default time".
-{ Data prior $02010003 version
- lpzClass : PAnsiChar; // PopUp class. Used with skinning. See PopUp/AddClass for details
- skinBack : COLORREF; // Background color for colorizable skins
- cZero: array [0..15-SizeOf(PAnsiChar)-SizeOf(COLORREF)] of byte;
-}
- // you *MUST* pass APT_NEWDATA flag for services to take care of this data
- hReserved : THANDLE; // Reserved. Must be NULL
- actionCount : int; // Amount of passed actions
- lpActions : PPOPUPACTION; // Popup Actions
- icbSize : int; // struct size for future
- end;
-
-type
- PPOPUPDATAW = ^TPOPUPDATAW;
- TPOPUPDATAW = record
- lchContact : THANDLE;
- lchIcon : HICON;
- lpwzContactName : array [0..MAX_CONTACTNAME-1] of WideChar;
- lpwzText : array [0..MAX_SECONDLINE -1] of WideChar;
- colorBack : COLORREF;
- colorText : COLORREF;
- PluginWindowProc: Pointer; // must be a window procedure using stdcall
- PluginData : Pointer;
- iSeconds : int; // Custom delay time in seconds.
- // -1 means = 'forever", 0 means = 'default time".
-{ Data prior $02010003 version
- cZero: array [0..15] of AnsiChar; //16 unused bytes which may come useful in the future.
-}
- // you *MUST* pass APT_NEWDATA flag for services to take care of this data
- hReserved : THANDLE; // Reserved. Must be NULL
- actionCount : int; // Amount of passed actions
- lpActions : PPOPUPACTION; // Popup Actions
- icbSize : int; // struct size for future
- end;
-
-{
- When you call MS_POPUP_ADDPOPUP, my plugin will check if the given POPUPDATA
-structure is filled with acceptable values. If not, the data will be rejected
-and no popup will be shown.
-
-- lpzText should be given, because it's really bad if a user chooses to have the
-second line displayed and it's empty :-) Just write it and let the user choose
-if it will be displayed or not.
-
-- PluginWindowProc is a WNDPROC address you have to give me. Why? What? Where?
-Calm down 8) My plugin will take care of the creation of the popup, of the
-destruction of the popup, of the come into view and the hiding of the popup.
-Transparency, animations... all this stuff.
- My plugin will not (as example) open the MessageWindow when you left click on
-a popup. Why? Because I don't know if your popup desires to open the
-MessageWindow :)))) This means that you need to make a WNDPROC which takes care
-of the WM_messages you need.
- For example, WM_COMMAND or WM_CONTEXTMENU or WM_LMOUSEUP or whatever.
- At the end of your WNDPROC remember to "return DefWindowProc(hwnd, msg,
-wParam, lParam);" When you process a message that needs a return value (an
-example could be WM_CTLCOLORSTATIC, but you don't need to catch it 'cause it's
-my plugin's job), simply return the nedeed value. :)
-The default WNDPROC does nothing.
-
-- PluginData is a pointer to a void, which means a pointer to anything. You can
-make your own structure to store the data you need (example: a status
-information, a date, your name, whatever) and give me a pointer to that struct.
-You will need to destroy that structure and free the memory when the PopUp is
-going to be destroyed. You'll know this when you receive a UM_FREEPLUGINDATA.
-The name tells it all: free your own plugin data.
-
-Appendix A: Messages my plugin will handle and your WNDPROC will never see.
-WM_CREATE, WM_DESTROY, WM_TIMER, WM_ERASEBKGND
-WM_CTLCOLOR* [whatever it may be: WM_CTLCOLORDLG, WM_CTLCOLORSTATIC...]
-WM_PAINT, WM_PRINT, WM_PRINTCLIENT
-}
-
-const
-{
- Creates, adds and shows a popup, given a (valid) POPUPDATA structure pointer.
- wParam = (WPARAM)(*POPUPDATA)PopUpDataAddress
- lParam = 0
- Returns: > 0 on success, 0 if creation went bad, -1 if the PopUpData contained unacceptable values.
- NOTE: it returns -1 if the PopUpData was not valid, if there were already too many popups, if the module was disabled.
- Otherwise, it can return anything else...
-
-Popup Plus 2.0.4.0+
-You may pass additional creation flags via lParam:
- APF_RETURN_HWND ....... function returns handle to newly created popup window (however this calls are a bit slower)
- APF_CUSTOM_POPUP ...... new popup is created in hidden state and doesn't obey to popup queue rules.
- you may control it via UM_* messages and custom window procedure
- APF_NO_HISTORY ........ do not log this popup in popup history (useful for previews)
- APF_NO_POPUP .......... do not show popup. this is useful if you want popup yo be stored in history only
- APF_NEWDATA ........... use new version of POPUPDATAEX/POPUPDATAW structs
-}
- APF_RETURN_HWND = 1;
- APF_CUSTOM_POPUP = 2;
- APF_NO_HISTORY = 4;
- APF_NO_POPUP = 8;
- APF_NEWDATA = $10;
-
- MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUp';
- MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
- MS_POPUP_ADDPOPUPEX:PAnsiChar = 'PopUp/AddPopUpEx';
-
-{
- Returns the handle to the contact associated to the specified PopUpWindow.
- You will probably need to know this handle inside your WNDPROC. Exampole: you want to open the MessageWindow. :-)
- Call MS_POPUP_GETCONTACT on the hWnd you were given in the WNDPROC.
- wParam = (WPARAM)(HWND)hPopUpWindow
- lParam = 0;
- Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
-}
- MS_POPUP_GETCONTACT:PAnsiChar = 'PopUp/GetContact';
-
-{
- wParam = hPopUpWindow
- lParam = PluginDataAddress;
- Returns: the address of the PLUGINDATA structure. Can return NULL, meaning nothing was given. -1 means failure.
- IMPORTANT NOTE: it doesn't seem to work if you do:
- CallService(..., (LPARAM)aPointerToAStruct);
- and then use that struct.
- Do this, instead:
- aPointerToStruct = CallService(..., (LPARAM)aPointerToAStruct);
- and it will work. Just look at the example I've written above (PopUpDlgProc).
-}
- MS_POPUP_GETPLUGINDATA:PAnsiChar = 'PopUp/GetPluginData';
-
-{
- wParam = 0
- lParam = 0
- Returns: 0 if the user has chosen not to have the second line, 1 if he choose to have the second line.
-}
- MS_POPUP_ISSECONDLINESHOWN:PAnsiChar = 'PopUp/IsSecondLineShown';
-
-{
- Requests an action or an answer from PopUp module.
- wParam = (WPARAM)wpQuery
- returns 0 on success, -1 on error, 1 on stupid calls ;-)
-}
- PUQS_ENABLEPOPUPS = 1; // returns 0 if state was changed, 1 if state wasn't changed
- PUQS_DISABLEPOPUPS = 2; // " "
- PUQS_GETSTATUS = 3; // Returns 1 if popups are enabled, 0 if popups are disabled.
-
- MS_POPUP_QUERY:PAnsiChar = 'PopUp/Query';
-
-{
- UM_FREEPLUGINDATA
- wParam = lParam = 0. Process this message if you have allocated your own memory. (i.e.: POPUPDATA.PluginData != NULL)
-}
- UM_FREEPLUGINDATA = (WM_USER + $200);
-
-{
- UM_DESTROYPOPUP
- wParam = lParam = 0. Send this message when you want to destroy the popup, or use the function below.
-}
- UM_DESTROYPOPUP = (WM_USER + $201);
-
-{
- UM_INITPOPUP
- wParam = (WPARAM)(HWND)hPopUpWindow (but this is useless, since I'll directly send it to your hPopUpWindow
- lParam = 0.
- This message is sent to the PopUp when its creation has been finished, so POPUPDATA (and thus your PluginData) is reachable.
- Catch it if you needed to catch WM_CREATE or WM_INITDIALOG, which you'll never ever get in your entire popup-life.
- Return value: if you process this message, return 0. If you don't process it, return 0. Do whatever you like ;-)
-}
- UM_INITPOPUP = (WM_USER + $202);
-
-{
- wParam = hPopUpWindow
- lParam = lpzNewText
- returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
- Changes the text displayed in the second line of the popup.
-}
- MS_POPUP_CHANGETEXT :PAnsiChar = 'PopUp/Changetext';
- MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
-
-{
- wParam = (WPARAM)(HWND)hPopUpWindow
- lParam = (LPARAM)(POPUPDATAEX*)newData
- Changes the entire popup
-}
- MS_POPUP_CHANGE :PAnsiChar = 'PopUp/Change';
- MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
-
-{
- UM_CHANGEPOPUP
- This message is triggered by Change/ChangeText services. You also may post it directly :)
-
- wParam = Modification type
- lParam = value of type defined by wParam
-}
-
- CPT_TEXT = 1; // lParam = (AnsiChar *)text
- CPT_TEXTW = 2; // lParam = (WCHAR *)text
- CPT_TITLE = 3; // lParam = (AnsiChar *)title
- CPT_TITLEW = 4; // lParam = (WCHAR *)title
- CPT_DATA = 5; // lParam = (POPUPDATA *)data
- CPT_DATAEX = 6; // lParam = (POPUPDATAEX *)data
- CPT_DATAW = 7; // lParam = (POPUPDATAW *)data
- CPT_DATA2 = 8; // lParam = (POPUPDATA2 *)data
-
- UM_CHANGEPOPUP = WM_USER + $0203;
-
-{ UM_POPUPACTION
- Popup Action notification
-
- wParam and lParam are specified bu plugin.
- wParam = 0 is used buy popup plus internally!
-}
-
- UM_POPUPACTION = WM_USER + $0204;
-
-{ UM_POPUPMODIFYACTIONICON
- Modify Popup Action Icon
-
- wParam = (WPARAM)(LPPOPUPACTIONID)&actionId
- lParam = (LPARAM)(HICON)hIcon
-}
-
-type
- PPOPUPACTIONID = ^TPOPUPACTIONID;
- TPOPUPACTIONID = record
- wParam:WPARAM;
- lParam:LPARAM;
- end;
-
-const
- UM_POPUPMODIFYACTIONICON = WM_USER + $0205;
-
-const
- SM_WARNING = $01; //Triangle icon.
- SM_NOTIFY = $02; //Exclamation mark icon.
- SM_ERROR = $03; //Cross icon.
-{
- This is mainly for developers.
- Shows a warning message in a PopUp. It's useful if you need a = 'MessageBox" like function,
- but you don't want a modal window (which will interfere with a DialogProcedure. MessageBox
- steals focus and control, this one not.
- wParam = lpzMessage
- lParam = SM_* flag
- Returns: 0 if the popup was shown, -1 in case of failure.
-}
- MS_POPUP_SHOWMESSAGE :PAnsiChar = 'PopUp/ShowMessage';
- MS_POPUP_SHOWMESSAGEW:PAnsiChar = 'PopUp/ShowMessageW';
-
-{ PopUp/RegisterActions
-Registers your action in popup action list
-
-wParam = (WPARAM)(LPPOPUPACTION)actions
-lParam = (LPARAM)actionCount
-
-Returns: 0 if the popup was shown, -1 in case of failure.
-}
- MS_POPUP_REGISTERACTIONS:PAnsiChar = 'PopUp/RegisterActions';
-
-//------------- Class API ----------------//
-
-type
- TPOPUPCLASS = record
- cbSize :int;
- flags :int;
- pszName :pAnsiChar;
- szDescription :TChar;
- hIcon :HICON;
- colorBack :TCOLORREF;
- colorText :TCOLORREF;
- PluginWindowProc:pointer;
- iSeconds :int;
- end;
- POPUPCLASS = TPOPUPCLASS;
-
-const
- PCF_UNICODE = $0001;
-
-// wParam = 0
-// lParam = (POPUPCLASS *)&pc
- MS_POPUP_REGISTERCLASS = 'PopUp/RegisterClass';
-
-type
- TPOPUPDATACLASS = record
- cbSize :int;
- pszClassName:pAnsiChar;
- szTitle :TChar;
- szText :TChar;
- PluginData :pointer;
- hContact :THANDLE;
- end;
- POPUPDATACLASS = TPOPUPDATACLASS;
-
-const
-// wParam = 0
-// lParam = (POPUPDATACLASS *)&pdc
- MS_POPUP_ADDPOPUPCLASS = 'PopUp/AddPopupClass';
-
-(* OLD
-{
- Each skinned popup (e.g. with colorBack == POPUP_USE_SKINNED_BG) should have
- class set. Then you can choose separate skin for each class (for example, you
- can create separate class for your plugin and use it for all ypu popups. User
- would became able to choose skin for your popups independently from others)
-
- You have to register popup class before using it. To do so call
- "PopUp/AddClass" with lParam = (LPARAM)(const AnsiChar * )popUpClassName.
-
- All class names are translated (via Translate()) before being added to list.
- You should use english names for them.
-
- There are three predefined classes and one for backward compatability.
-
- Note that you can add clases after popup wal loaded, e.g. you shoul intercept
- ME_SYSTEM_MODULESLOADED event
-}
- MS_POPUP_ADDCLASS = 'PopUp/AddClass';
-
- POPUP_CLASS_DEFAULT = 'Default';
- POPUP_CLASS_WARNING = 'Warning';
- POPUP_CLASS_NOTIFY = 'Notify';
- POPUP_CLASS_OLDAPI = 'PopUp 1.0.1.x compatability'; // for internal purposes
-
-const
- NFOPT_POPUP2_BACKCOLOR = 'Popup2/BackColor';
- NFOPT_POPUP2_TEXTCOLOR = 'Popup2/TextColor';
- NFOPT_POPUP2_TIMEOUT = 'Popup2/Timeout';
- NFOPT_POPUP2_LCLICKSVC = 'Popup2/LClickSvc';
- NFOPT_POPUP2_LCLICKCOOKIE = 'Popup2/LClickCookie';
- NFOPT_POPUP2_RCLICKSVC = 'Popup2/RClickSvc';
- NFOPT_POPUP2_RCLICKCOOKIE = 'Popup2/RClickCookie';
- NFOPT_POPUP2_STATUSMODE = 'Popup2/StatusMode';
- NFOPT_POPUP2_PLUGINDATA = 'Popup2/PluginData';
- NFOPT_POPUP2_WNDPROC = 'Popup2/WndProc';
-
- NFOPT_POPUP2_BACKCOLOR_S = 'Popup2/BackColor/Save';
- NFOPT_POPUP2_TEXTCOLOR_S = 'Popup2/TextColor/Save';
- NFOPT_POPUP2_TIMEOUT_S = 'Popup2/Timeout/Save';
-
- MS_POPUP2_SHOW = 'Popup2/Show';
- MS_POPUP2_UPDATE = 'Popup2/Update';
- MS_POPUP2_REMOVE = 'Popup2/Remove';
-*)
-///////////////////////////////////////////////////////////////
-// Few notes about new popup api
-// ------------------------------
-// When you call any ADD service, Popup Plus creates local
-// copy of POPUPDATA2 to store the data. Each time you call
-// CHANGE service this data is updated. You can use the
-// MS_POPUP_GETDATA2 service to retrieve Popups's copy of
-// this data, however you MUST NOT chahge that.
-
-// unicode or ansi mode
-const
- PU2_ANSI = 00;
- PU2_UNICODE = 01;
- PU2_CUSTOM_POPUP = 02;
-
-type
- PPOPUPDATA2 = ^TPOPUPDATA2;
- TPOPUPDATA2 = record
- // general
- cbSize:int;
- flags:dword;
-
- // miranda bindings
- lchContact:THANDLE;
- lchEvent :THANDLE;
-
- // style
- colorBack:TCOLORREF;
- colorText:TCOLORREF;
- lchIcon:HICON;
- hbmAvatar:HBITMAP;
- pzTitle:TCHAR;
- pzText:TCHAR;
- lpzSkin:PAnsiChar;
-
- // time and timeout
- iSeconds:int;
- dwTimestamp:dword;
-
- // plugin bindings
- PluginWindowProc:TWNDPROC;
- PluginData:pointer;
-
- // popup actions
- actionCount:int;
- lpActions:PPOPUPACTION; // Ansi or unicode
- lchNotification:THANDLE;
- end;
-
-const
-// Creates new popup
-// wParam = (WPARAM)(LPPOPUPDATA2)&ppd2
-// lParam = (LPARAM)(combination of APF_* flags)
-// returns: window handle (if requested) of NULL on success, -1 on failure.
- MS_POPUP_ADDPOPUP2:PAnsiChar = 'Popup/AddPopup2';
-
-// Update an popup
-// wParam = (WPARAM)(HWND)hwndPopup
-// lParam = (LPARAM)(LPPOPUPDATA2)&ppd2
-// returns: zero on success, -1 on failure.
- MS_POPUP_CHANGEPOPUP2:PAnsiChar = 'Popup/ChangePopup2';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_proto_listeningto.inc b/delphi/Awkward/include/m_proto_listeningto.inc
deleted file mode 100644
index 922e4cf..0000000
--- a/delphi/Awkward/include/m_proto_listeningto.inc
+++ /dev/null
@@ -1,117 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-//this module was created in v0.6.0.0
-
-{$IFNDEF M_PROTO_LISTENINGTO}
-{$DEFINE M_PROTO_LISTENINGTO}
-
-// Protocol Services /////////////////////////////////////////////////////////////////
-
-// This is the services a protocol have to support to support listening info
-
-type
- PLISTENINGTOINFO = ^TLISTENINGTOINFO;
- TLISTENINGTOINFO = record
- cbSize :integer;
- szType :TCHAR; // Media type: Music, Video, etc...
- szArtist:TCHAR; // Artist name
- szAlbum :TCHAR; // Album name
- szTitle :TCHAR; // Song name
- szTrack :TCHAR; // Track number
- szYear :TCHAR; // Song year
- szGenre :TCHAR; // Song genre
- szLength:TCHAR; // Song length
- szPlayer:TCHAR; // Player name
- dwFlags :DWORD;
- end;
-
-const
- LTI_UNICODE = 1;
-
-const
-{
- Set the listening info for the protocol.
- Pass NULL to remove it.
- wParam = NULL
- lParam = LISTENINGTOINFO *
-}
- PS_SET_LISTENINGTO = '/SetListeningTo';
-
-{
- Get the listening info for the protocol
- wParam = NULL
- lParam = LISTENINGTOINFO *
- The strings inside the struct need to be free using miranda free.
-}
- PS_GET_LISTENINGT = '/GetListeningTo';
-
-// Also the protocol have to save a string with the text the other user is (probabily)
-// seeing under the main db key: <protocol>/ListeningTo
-
-// For a contact, the protocol should store the listening info as an string inside
-// the contact db key: <protocol>/ListeningTo
-
-// ListeningTo configuration plugin //////////////////////////////////////////////////
-
-// One plugin can be used to set some options relative to the listening to information.
-// But protocols should not assume this plugin exists. If it does not exist, protocols
-// have to decide what default to use.
-// This plugin have to support the following services:
-{
- Get the text format the user wants him / his contacts to see. Some strings represents
- the text information:
- %artist%, %album%, %title%, %track%, %year%, %genre%, %length%, %player%, %type%
- This service is optional
- wParam = TCHAR* - default text for this protocol
- lParam = 0
- Returns a TCHAR* containg the user setting. This need to be free using miranda free.
-}
- MS_LISTENINGTO_GETTEXTFORMAT:PAnsiChar = 'ListeningTo/GetTextFormat';
-
-{
- Get the text the user wants him / his contacts to see, parsed with the info sent to
- this service. Uses the same variables as the above service to the default text.
- wParam = TCHAR* - default text for this protocol
- lParam = LISTENINGTOINFO *
- Returns a TCHAR* containg the parsed text. This need to be free using miranda free.
-}
- MS_LISTENINGTO_GETPARSEDTEXT:PAnsiChar = 'ListeningTo/GetParsedText';
-
-{
- Get if the contact options about how to show the music info should be overriten or
- not.
- wParam = NULL
- lParam = hContact
- Returns a BOOL
-}
- MS_LISTENINGTO_OVERRIDECONTACTOPTION:PAnsiChar = 'ListeningTo/OverrideContactOption';
-
-{
- Get the text to show if some info of the contact is empty.
- wParam = NULL
- lParam = NULL
- Returns a TCHAR *. Don't free
-}
- MS_LISTENINGTO_GETUNKNOWNTEXT:PAnsiChar = 'ListeningTo/GetUnknownText';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_protocols.inc b/delphi/Awkward/include/m_protocols.inc
deleted file mode 100644
index 175e83b..0000000
--- a/delphi/Awkward/include/m_protocols.inc
+++ /dev/null
@@ -1,434 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-// this module was created in v0.1.1.0
-{$IFNDEF M_PROTOCOLS}
-{$DEFINE M_PROTOCOLS}
-
-{$include statusmodes.inc}
-
-//send a general request through the protocol chain for a contact
-//wParam=0
-//lParam=(LPARAM)(CCSDATA*)&ccs
-//returns the value as documented in the PS_ definition (m_protosvc.h)
-type
- PCCSDATA = ^TCCSDATA;
- TCCSDATA = record
- hContact : THANDLE;
- szProtoService: PAnsiChar; // a PS_* constant
- wParam : WPARAM;
- lParam : LPARAM;
- end;
-
-const
- MS_PROTO_CALLCONTACTSERVICE:PAnsiChar = 'Proto/CallContactService';
-
-//a general network 'ack'
-//wParam=0
-//lParam=(LPARAM)(ACKDATA*)&ack
-//Note that just because definitions are here doesn't mean they will be sent.
-//Read the documentation for the function you are calling to see what replies
-//you will receive.
-type
- PACKDATA = ^TACKDATA;
- TACKDATA = record
- cbSize : int;
- szModule: PAnsiChar; // the name of the protocol module which initiated this ack
- hContact: THANDLE;
- _type : int; // an ACKTYPE_* constant
- _result : int; // an ACKRESULT_* constant
- hProcess: THANDLE; // caller defined seq, I mean process code
- lParam : LPARAM; // caller defined data
- end;
-
-const
- ACKTYPE_MESSAGE = 0;
- ACKTYPE_URL = 1;
- ACKTYPE_FILE = 2;
- ACKTYPE_CHAT = 3;
- ACKTYPE_AWAYMSG = 4;
- ACKTYPE_AUTHREQ = 5;
- ACKTYPE_ADDED = 6;
- ACKTYPE_GETINFO = 7;
- ACKTYPE_SETINFO = 8;
- ACKTYPE_LOGIN = 9;
- ACKTYPE_SEARCH = 10;
- ACKTYPE_NEWUSER = 11;
- ACKTYPE_STATUS = 12;
- ACKTYPE_CONTACTS = 13; // send/recv of contacts
- ACKTYPE_AVATAR = 14; // send/recv of avatars from a protocol
- ACKTYPE_EMAIL = 15; // notify if the unread emails changed
-
- ACKRESULT_SUCCESS = 0;
- ACKRESULT_FAILED = 1;
-
-// 'in progress' result codes:
- ACKRESULT_CONNECTING = 100;
- ACKRESULT_CONNECTED = 101;
- ACKRESULT_INITIALISING = 102;
- ACKRESULT_SENTREQUEST = 103; // waiting for reply...
- ACKRESULT_DATA = 104; // blob of file data sent/recved, or search result
- ACKRESULT_NEXTFILE = 105; // file transfer went to next file
- ACKRESULT_FILERESUME = 106; // a file is about to be received, see PS_FILERESUME
- ACKRESULT_DENIED = 107; // a file send has been denied
- ACKRESULT_STATUS = 108; // an ack or a series of acks to do with a task
- // have a status change
- ACKRESULT_LISTENING = 109; // waiting for connection
- ACKRESULT_CONNECTPROXY = 110; // connecting to file proxy
- ACKRESULT_SEARCHRESULT = 111; // result of extended search
-const
- ME_PROTO_ACK:PAnsiChar = 'Proto/Ack';
-
-{ v0.3.2+: When result is ACKRESULT_FAILED or ACKRESULT_DENIED, lParam can point to }
-{ a human readable string with an explanation. For example: "The message was too }
-{ long to be delivered". If no error message is specified, lParam must be NULL. }
-{ Right now only explanations from ACKTYPE_MESSAGE is shown. }
-{when type==ACKTYPE_FILE && (result==ACKRESULT_DATA || result==ACKRESULT_FILERESUME), }
-{lParam points to this }
-const
- PFTS_RECEIVING = 0;
- PFTS_SENDING = 1;
- PFTS_UNICODE = 2;
- PFTS_UTF = 4;
-{
-type
- PFNAMECHAR = ^FNAMECHAR;
-//#if MIRANDA_VER >= 0x0900
- FNAMECHAR = TCHAR;
-//#else
-// FNAMECHAR = AnsiChar;
-//#endif
- TFNAMECHAR = FNAMECHAR;
-}
-type
- PPROTOFILETRANSFERSTATUS_V1 = ^TPROTOFILETRANSFERSTATUS_V1;
- TPROTOFILETRANSFERSTATUS_V1 = record
- cbSize : int;
- hContact : THANDLE;
- sending : int; // 1 if sending, 0 if receiving
- files : ^PAnsiChar;
- totalFiles : int;
- currentFileNumber : int;
- totalBytes : dword;
- totalProgress : dword;
- workingDir : PAnsiChar;
- currentFile : PAnsiChar;
- currentFileSize : dword;
- currentFileProgress: dword;
- currentFileTime : dword; // as seconds since 1970
- end;
-
- // especially for Miranda 9.0+
- PPROTOFILETRANSFERSTATUS = ^TPROTOFILETRANSFERSTATUS;
- TPROTOFILETRANSFERSTATUS = record
- cbSize : int;
- hContact : THANDLE;
- flags : dword; // one of PFTS_* constants
- files : ^TCHAR;
- totalFiles : int;
- currentFileNumber : int;
- totalBytes : int64;
- totalProgress : int64;
- workingDir : TCHAR;
- currentFile : TCHAR;
- currentFileSize : int64;
- currentFileProgress: int64;
- currentFileTime : int64; // as seconds since 1970
- end;
-
-{ Enumerate the currently running protocols
- wParam=(WPARAM)(int*)&numberOfProtocols
- lParam=(LPARAM)(PROTOCOLDESCRIPTOR***)&ppProtocolDescriptors
- Returns 0 on success, nonzero on failure
- Neither wParam nor lParam may be NULL
- The list returned by this service is the protocol modules currently installed
- and running. It is not the complete list of all protocols that have ever been
- installed.
- IMPORTANT NOTE #1: the list returned is not static, it may be changed in the
- program's lifetime. Do not use this list in the global context, copy protocols
- names otherwise.
- IMPORTANT NOTE #2: in version 0.8 this service is mapped to the MS_PROTO_ENUMACCOUNTS
- service to provide the compatibility with old plugins (first three members of
- PROTOACCOUNT are equal to the old PROTOCOLDESCRIPTOR format). If you declare the
- MIRANDA_VER macro with value greater or equal to 0x800, use MS_PROTO_ENUMPROTOS
- service instead to obtain the list of running protocols instead of accounts.
- Note that a protocol module need not be an interface to an Internet server,
- they can be encryption and loads of other things, too.
- And yes, before you ask, that is triple indirection. Deal with it.
- Access members using ppProtocolDescriptors[index]->element }
-const
- PROTOCOLDESCRIPTOR_V3_SIZE = SizeOf(int)*2+SizeOf(PAnsiChar);
-
-type
- pfnInitProto = function(const szModuleName:PAnsiChar;const szUserName:TCHAR):PPROTO_INTERFACE; cdecl;
-
-// deallocates an account instance
- pfnUninitProto = function(pin:PPROTO_INTERFACE):int; cdecl;
-
-// removes an account from the database
- pfnDestroyProto = function(pin:PPROTO_INTERFACE):int; cdecl;
-
-type
- PPROTOCOLDESCRIPTOR = ^TPROTOCOLDESCRIPTOR;
- TPROTOCOLDESCRIPTOR = record
- cbSize : int;
- szName : PAnsiChar; // unique name of the module
- _type : int; // module type, see PROTOTYPE_ constants
- // 0.8.0+ additions
- fnInit :pfnInitProto; // initializes an empty account
- fnUninit :pfnUninitProto; // deallocates an account instance
- fnDestroy:pfnDestroyProto; // removes an account
- end;
-
-{ v0.3.3+:
- For recv, it will go from lower to higher, so in this case:
- check ignore, decrypt (encryption), translate
- For send, it will go translate, encrypt, ignore(??), send
- The DB will store higher numbers here, LOWER in the protocol chain, and lower numbers
- here HIGHER in the protocol chain }
-const
- PROTOTYPE_IGNORE = 50; // added during v0.3.3
- PROTOTYPE_PROTOCOL = 1000;
- PROTOTYPE_ENCRYPTION = 2000;
- PROTOTYPE_FILTER = 3000;
- PROTOTYPE_TRANSLATION = 4000;
- PROTOTYPE_OTHER = 10000; // avoid using this if at all possible
- PROTOTYPE_DISPROTO = 20000;
-{
- MS_PROTO_ENUMPROTOS :PAnsiChar = 'Proto/EnumProtos'; // MIRANDA_VER >= $800
- MS_PROTO_ENUMACCOUNTS:PAnsiChar = 'Proto/EnumAccounts'; // MIRANDA_VER >= $800
-}
- MS_PROTO_ENUMPROTOCOLS:PAnsiChar = 'Proto/EnumProtocols';// MIRANDA_VER < $800
-
-{ determines if a protocol module is loaded or not
- wParam=0
- lParam=(LPARAM)(const AnsiChar*)szName
- Returns a pointer to the PROTOCOLDESCRIPTOR if the protocol is loaded, or
- NULL if it isn't.
-}
- MS_PROTO_ISPROTOCOLLOADED:PAnsiChar = 'Proto/IsProtocolLoaded';
-
-{ gets the network-level protocol associated with a contact
- wParam=(WPARAM)(HANDLE)hContact
- lParam=0
- Returns a AnsiChar* pointing to the asciiz name of the protocol or NULL if the
- contact has no protocol. There is no need to free() it or anything.
- This is the name of the module that actually accesses the network for that
- contact. }
- MS_PROTO_GETCONTACTBASEPROTO = 'Proto/GetContactBaseProto';
-
-{ determines whether the specified contact has the given protocol in its chain
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(const AnsiChar*)szName
- Returns -1 if it is base protocol, positive number if it is filter and 0 if it doesn't }
- MS_PROTO_ISPROTOONCONTACT:PAnsiChar = 'Proto/IsProtoOnContact';
-
-const
- PROTOTYPE_SELFTYPING_OFF = 0;
- PROTOTYPE_SELFTYPING_ON = 1;
-{ This service is for notifying protocols that the user is typing a message v0.3.3+
- in a message dialog.
- This is typically sent by a message dialog when a user in the clist is typing.
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(int)typing state
- NOTE: Only protocols should generally call this service }
- MS_PROTO_SELFISTYPING:PAnsiChar = 'Proto/SelfIsTyping';
-
-const
- PROTOTYPE_CONTACTTYPING_OFF = 0;
- PROTOTYPE_CONTACTTYPING_INFINITE = $7FFFFFFF;
-{ This service is for notifying message dialogs/other plugins of a user typing. v0.3.3+
- This is typically sent by a protocol when a user in the clist is typing.
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(int)time (secs)
- NOTE: The time in seconds is used to tell a message dialog (or other plugin)
- how long to display its notification. If time is 0, then notification
- of typing ends.
- NOTE: Only protocols should generally call this service }
- MS_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTyping';
-
-{ This hook notifies when a user is typing. If a message dialog supports sending v0.3.3+
- typing notifications it should hook this event and fire the
- ProtoService PSS_USERISTYPING to the contacts protocol *after* verifying
- that the hContact is not NULL and the the user wishes to send notifications
- to this user (checked visibility, individual typing blocking, etc).
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(int)typing state }
- ME_PROTO_CONTACTISTYPING:PAnsiChar = 'Proto/ContactIsTypingEvent';
-
-// -------------- accounts support --------------------- 0.8.0+
-
-type
- PPROTOACCOUNT = ^TPROTOACCOUNT;
- TPROTOACCOUNT = record
- cbSize :int; // sizeof this structure
- szModuleName :PAnsiChar; // unique physical account name (matches database module name)
- _type :int; // always equal to PROTOTYPE_PROTOCOL
- tszAccountName :TChar; // user-defined account name
- szProtoName :PAnsiChar; // physical protocol name
- bIsEnabled :int; // is account enabled?
- bIsVisible :int; // is account visible?
- iOrder :int; // account order in various menus & lists
- bOldProto :bool; // old-styled account (one instance per dll)
- ppro :PPROTO_INTERFACE; // pointer to the underlying object
-
- hwndAccMgrUI :HWND;
- bAccMgrUIChanged:Bool;
- bDynDisabled :Bool; // dynamic disable flag, is never written to db
- end;
- tagACCOUNT = TPROTOACCOUNT;
-
-const
-//account enumeration service
-//wParam=(WPARAM)(int)piNumAccounts
-//lParam=(LPARAM)(PROTOACCOUNT**)paAccounts
- MS_PROTO_ENUMACCOUNTS:PAnsiChar = 'Proto/EnumAccounts';
-(*
-__inline int ProtoEnumAccounts( int* accNumber, PROTOACCOUNT*** accArray )
-{ return CallService( MS_PROTO_ENUMACCOUNTS, ( WPARAM )accNumber, (LPARAM)accArray );
-}
-*)
-//retrieves an account's interface by its physical name (database module)
-//wParam=0
-//lParam=(LPARAM)(AnsiChar*)szAccountName
-//return value = PROTOACCOUNT* or NULL
- MS_PROTO_GETACCOUNT:PAnsiChar = 'Proto/GetAccount';
-(*
-__inline PROTOACCOUNT* ProtoGetAccount( const AnsiChar* accName )
-{ return (PROTOACCOUNT* )CallService( MS_PROTO_GETACCOUNT, 0, (LPARAM)accName );
-}
-*)
-
-//this event is fired when the accounts list gets changed
-//wParam = event type (1 - added, 2 - changed, 3 - deleted, 5 - enabled/disabled)
-//lParam = (LPARAM)(PROTOACCOUNT*) - account being changed
-
- PRAC_ADDED = 1;
- PRAC_CHANGED = 2;
- PRAC_REMOVED = 3;
- PRAC_UPGRADED = 4;
- PRAC_CHECKED = 5;
-// PRAC_CONVERT = 6;
-
- ME_PROTO_ACCLISTCHANGED:PAnsiChar = 'Proto/AccListChanged';
-{
-
- displays the Account Manager
- wParam=0
- lParam=0
-}
- MS_PROTO_SHOWACCMGR:PAnsiChar = 'Protos/ShowAccountManager';
-
-{
- determines if an account is enabled or not
- wParam = 0
- lParam = PPROTOACCOUNT
- Returns 1 if an account is valid and enabled, 0 otherwise
-}
- MS_PROTO_ISACCOUNTENABLED:PAnsiChar = 'Proto/IsAccountEnabled';
-
-{
- determines if an account is locked or not
- wParam = 0
- lParam = PAnsiChar szAccountName
- Returns 1 if an account is locked and not supposed to change status, 0 otherwise
-}
- MS_PROTO_ISACCOUNTLOCKED:PAnsiChar = 'Proto/IsAccountLocked';
-
-{
- gets the account associated with a contact
- wParam=(WPARAM)(HANDLE)hContact
- lParam=0
- Returns a pAnsiChar pointing to the asciiz name of the protocol or NULL if the
- contact has no protocol. There is no need to mir_free() it or anything.
- This is the name of the module that actually accesses the network for that contact.
-}
- MS_PROTO_GETCONTACTBASEACCOUNT:PAnsiChar = 'Proto/GetContactBaseAccount';
-
-// -------------- avatar support ---------------------
-{
- First a protocol must report it supports PF4_AVATARS via PS_GETCAPS, secondly
- it will return the following acks for certain events, the protocol must use
- ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDATA
-}
-{
- The following ACKs MUST be sent in order of .result via ProtoBroadcastAck()
-
- .szModule = protocol module
- .hContact = contact the avatar is for, or 0 if its for the user
- .type = ACKTYPE_AVATAR
- .result = ACKRESULT_CONNECTING, ACKRESULT_CONNECTED, ACKRESULT_SENTREQUEST, ACKRESULT_DATA
- .hProcess = protocol specific
- .lParam = 0
-
- Once the transfer is complete the following ACKs MUST be sent by the protocol
-
- .result = ACKRESULT_SUCCESS or ACKRESULT_FAILED
- .hProcess = (HANDLE) &PROTO_AVATAR_INFORMATION
- .lParam = 0;
-
- Anytime before or during the ack or series of acks ACKRESULT_STATUS maybe sent, this might
- be sent a long while before anything else happens (or after anything happening) For avatars
- it allows callers to identify status information to do with the avatar, including the time
- before background transport has been created, so that you know an avatar will be exchanged
- sometime in the future.
-
- When ACKRESULT_STATUS, hProcess is the result code - the value of this is protocol dependent,
- See protocol documentation to do with avatars for what codes are defined and what they mean.
-}
-const
- PA_FORMAT_UNKNOWN = 0; // the protocol can not determine much about the "bitmap"
- PA_FORMAT_PNG = 1; // the image is PNG
- PA_FORMAT_JPEG = 2;
- PA_FORMAT_ICON = 3;
- PA_FORMAT_BMP = 4;
- PA_FORMAT_GIF = 5;
- PA_FORMAT_SWF = 6;
- PA_FORMAT_XML = 7;
-
-type
- PPROTO_AVATAR_INFORMATION = ^TPROTO_AVATAR_INFORMATION;
- TPROTO_AVATAR_INFORMATION = record
- cbSize : longint; // sizeof()
- hContact: THANDLE; // this might have to be set by the caller too
- format : longint; // PA_FORMAT_*
- // full path to filename which contains the avatar
- filename: array[0..(MAX_PATH)-1] of AnsiChar;
- end;
-
-const
- GAIF_FORCE = 1; // force an update of the avatar if there is none
-
- GAIR_SUCCESS = 0; // information about the avatar has been returned
- GAIR_WAITFOR = 1; // you must hook ME_PROTO_ACK and wait for replies about avatar status
- GAIR_NOAVATAR = 2; // sorry, this contact has no avatars
-
-{
- wParam : GAIF_
- lParam : (LPARAM) &PROTO_AVATAR_INFORMATION
- Affect : Make a request to the protocol to return information about a hContact's avatar (or main user)
- it can return information, tell you there is none, or if forced start requesting an avatar.
- Note:
- Version: 0.3.4+ (2004/09/13)
-}
- PS_GETAVATARINFO = '/GetAvatarInformation';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_protoint.inc b/delphi/Awkward/include/m_protoint.inc
deleted file mode 100644
index 6364b73..0000000
--- a/delphi/Awkward/include/m_protoint.inc
+++ /dev/null
@@ -1,102 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_PROTOINT}
-{$DEFINE M_PROTOINT}
-
-type
- TPROTOEVENTTYPE = (
- EV_PROTO_ONLOAD,
- EV_PROTO_ONREADYTOEXIT,
- EV_PROTO_ONEXIT,
- EV_PROTO_ONRENAME,
- EV_PROTO_ONOPTIONS,
- EV_PROTO_ONERASE,
- EV_PROTO_ONMENU);
-
-type
- PROTOCHAR = TCHAR;
- PROTOFILEEVENT = TPROTORECVFILET;
-
-type
- PPROTO_INTERFACE = ^TPROTO_INTERFACE;
- TPROTO_INTERFACE = record
- iStatus :int;
- iDesiredStatus:int;
- iXStatus :int;
- iVersion :int;
- bOldProto :Bool;
- szPhysName :PAnsiChar;
- szProtoName :PAnsiChar;
- tszUserName :TChar;
- reserved :array [0..39] of dword;
-
- AddToList :function(intf:PPROTO_INTERFACE;flags:int; var psr:TPROTOSEARCHRESULT):THANDLE; cdecl;
- AddToListByEvent:function(intf:PPROTO_INTERFACE;flags:int; iContact:int; hDbEvent:THANDLE):THANDLE; cdecl;
-
- Authorize :function(intf:PPROTO_INTERFACE;hContact:THANDLE):int; cdecl;
- AuthDeny :function(intf:PPROTO_INTERFACE;hContact:THANDLE;const szReason:TChar):int; cdecl;
- AuthRecv :function(intf:PPROTO_INTERFACE;hContact:THANDLE;var ptr:TPROTORECVEVENT):int; cdecl;
- AuthRequest:function(intf:PPROTO_INTERFACE;hContact:THANDLE;szMessage:TChar):int; cdecl;
-
- ChangeInfo:function(intf:PPROTO_INTERFACE;iInfoType:int; var pInfoData:pointer):THANDLE; cdecl;
-
- FileAllow :function(intf:PPROTO_INTERFACE;hContact:THANDLE;hTransfer:THANDLE; szPath:PROTOCHAR):THANDLE; cdecl;
- FileCancel:function(intf:PPROTO_INTERFACE;hContact:THANDLE;hTransfer:THANDLE):int; cdecl;
- FileDeny :function(intf:PPROTO_INTERFACE;hContact:THANDLE;hTransfer:THANDLE; var szReason:PROTOCHAR):int; cdecl;
- FileResume:function(intf:PPROTO_INTERFACE;hTransfer:THANDLE;var action:Integer; var szFilename:PROTOCHAR):int; cdecl;
-
- GetCaps:function(intf:PPROTO_INTERFACE;_type:int):dword; cdecl;
- GetIcon:function(intf:PPROTO_INTERFACE;iconIndex:int):HICON; cdecl;
- GetInfo:function(intf:PPROTO_INTERFACE;hContact:THANDLE;infoType:int):int; cdecl;
-
- SearchBasic :function(intf:PPROTO_INTERFACE;id:PAnsiChar):THANDLE; cdecl;
- SearchByEmail :function(intf:PPROTO_INTERFACE;email:PAnsiChar):THANDLE; cdecl;
- SearchByName :function(intf:PPROTO_INTERFACE;nick:PAnsiChar; const firstName:PAnsiChar; const lastName:PAnsiChar):THANDLE; cdecl;
- SearchAdvanced :function(intf:PPROTO_INTERFACE;owner:HWND):HWND; cdecl;
- CreateExtendedSearchUI:function(intf:PPROTO_INTERFACE;owner:HWND):HWND; cdecl;
-
- RecvContacts:function(intf:PPROTO_INTERFACE;hContact:THANDLE;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvFile :function(intf:PPROTO_INTERFACE;hContact:THANDLE;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvMessage :function(intf:PPROTO_INTERFACE;hContact:THANDLE;var ptr:TPROTORECVEVENT):int; cdecl;
- RecvUrl :function(intf:PPROTO_INTERFACE;hContact:THANDLE;var ptr:TPROTORECVEVENT):int; cdecl;
-
- SendContacts:function(intf:PPROTO_INTERFACE;hContact:THANDLE;flags:int; nContacts:int; var hContactsList:THANDLE):int; cdecl;
- SendFile :function(intf:PPROTO_INTERFACE;hContact:THANDLE;szDescription:PROTOCHAR; var ppszFiles:PROTOCHAR):THANDLE; cdecl;
- SendMessage :function(intf:PPROTO_INTERFACE;hContact:THANDLE;flags:int; const msg:PAnsiChar):int; cdecl;
- SendUrl :function(intf:PPROTO_INTERFACE;hContact:THANDLE;flags:int; const url:PAnsiChar):int; cdecl;
-
- SetApparentMode:function(intf:PPROTO_INTERFACE;hContact:THANDLE;mode:int):int; cdecl;
- SetStatus :function(intf:PPROTO_INTERFACE;iNewStatus:int):int; cdecl;
-
- GetAwayMsg :function(intf:PPROTO_INTERFACE;hContact:THANDLE):THANDLE; cdecl;
- RecvAwayMsg:function(intf:PPROTO_INTERFACE;hContact:THANDLE;mode:int;var evt:TPROTORECVEVENT):int; cdecl;
- SendAwayMsg:function(intf:PPROTO_INTERFACE;hContact:THANDLE;hProcess:THANDLE;const msg:PAnsiChar):int; cdecl;
- SetAwayMsg :function(intf:PPROTO_INTERFACE;iStatus:int; const msg:PAnsiChar):int; cdecl;
-
- UserIsTyping:function(intf:PPROTO_INTERFACE;hContact:THANDLE; _type:int):int; cdecl;
- OnEvent:function(intf:PPROTO_INTERFACE;iEventType:TPROTOEVENTTYPE;wParam:WPARAM;lParam:LPARAM):int; cdecl;
- end;
-
- tagPROTO_INTERFACE = TPROTO_INTERFACE;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_protomod.inc b/delphi/Awkward/include/m_protomod.inc
deleted file mode 100644
index deb4958..0000000
--- a/delphi/Awkward/include/m_protomod.inc
+++ /dev/null
@@ -1,117 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_PROTOMOD}
-{$DEFINE M_PROTOMOD}
-
- {$IFNDEF M_PROTOCOLS}
- {$INCLUDE m_protocols.inc}
- {$ENDIF}
-
-const
- {
- wParam : 0
- lParam : Pointer to a initalised TPROTOCOLDESCRIPTOR structure
- Affect : Register a protocol module, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : This service MUST be called from your module's Load() function
- TPROTOCOLDESCRIPTOR.type can be a value other than PROTOTYPE_*
- which are used to provide a more precise positioning information
- for the contact protocol lists.
- -
- Relative values to the constants can be given, but this MUST NOT
- be done for PROTOTYPE_PROTOCOL.
- }
- MS_PROTO_REGISTERMODULE:PAnsiChar = 'Proto/RegisterModule';
-
- {
- wParam : HCONTACT
- lParam : protocol_name_string
- Affect : Add the given protocol module to the chain for a contact, see notes
- Returns: 0 success, [non zero] on failure
- Notes : The module is added to the correct positioning according to it's
- registered type.
- }
- MS_PROTO_ADDTOCONTACT:PAnsiChar = 'Proto/AddToContact';
-
- {
- wParam : HCONTACT
- lParam : protocol_name_string
- Affect : Remove the given protocol name from the chain for the given contact
- Returns: 0 on success, [non zero] on failure
- }
- MS_PROTO_REMOVEFROMCONTACT:PAnsiChar = 'Proto/RemoveFromContact';
-
- { see m_globaldefs.pas for CreateProtoServiceFunction }
-
- {
- wParam : wParam [arg]
- lParam : lParam [arg]
- Affect : Call the next service in the chain for the send operation, see notes
- Return : Return value should be returned by CallService(MS_PROTO_CHAINSEND,wParam,lParam)
- Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
- and can be modified or copid if needed.
- wParam and lParam should be the values passed to your service,
- typically your service should return ASAP.
- }
- MS_PROTO_CHAINSEND:PAnsiChar = 'Proto/ChainSend';
-
- {
- wParam : wParam [arg]
- lParam : lParam [arg]
- Affect : Call the next service in the chain in this receive operation, see notes
- Return : Return value should be returned by CallService(MS_PROTO_CHAINRECV,wParam,lParam)
- Notes : wParam MUST remain untouched, lParam is a pointer to a CSSDATA structure
- and can be modified or copied if needed.
- wParam and lParam should be the values passed to your service,
- typically your service should return ASAP.
- -
- MS_PROTO_CHAINRECV is thread safe since 0.1.2.0 -- calls
- are translated to the main thread and passed from there.
- }
- MS_PROTO_CHAINRECV:PAnsiChar = 'Proto/ChainRecv';
-
- {
- wParam : 0
- lParam : Pointer to an initalised ACKDATA
- Affect : Broadcast a ME_PROTO_ACK event, see notes
- Returns: The return value of the NotifyEventHooks() call
- Notes : ME_PROTO_ACK is completely thread safe since 01.2.0
- see notes in core/modules.h under NotifyEventHooks()
- }
- MS_PROTO_BROADCASTACK:PAnsiChar = 'Proto/BroadcastAck';
-
-// -- Added during 0.3.4 (2004/09/27) development! -----
-{
- wParam: (HANDLE)hContact
- lParam: 0
- Affect: Given a hContact, return the protocol that is registered for it, or NULL if no such protocol exists,
- the returned string does not have to be freed and is valid even for multiple threads.
- Note: Prior to 2004/09/28 this service WAS NOT THREAD SAFE and was slower
- Note: Prior to 2004/09/28 this service would return NULL for a hContact if the protocol module
- associated with the hContact was not currently loaded, no such check is performed now.
- Version: 0.3.4 (2004/09/28)
-}
-const
- MS_PROTODIR_PROTOFROMCONTACT = MS_PROTO_GETCONTACTBASEPROTO;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_protosvc.inc b/delphi/Awkward/include/m_protosvc.inc
deleted file mode 100644
index 42e5065..0000000
--- a/delphi/Awkward/include/m_protosvc.inc
+++ /dev/null
@@ -1,968 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2009 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_PROTOSVC}
-{$DEFINE M_PROTOSVC}
-
-type
- PFNAMECHAR = ^FNAMECHAR;
-//#if MIRANDA_VER >= 0x0900
- FNAMECHAR = TCHAR;
-//#else
-// FNAMECHAR = AnsiChar;
-//#endif
- TFNAMECHAR = FNAMECHAR;
-
-{<</
- none of these services should be used on there own (i.e. using CallService(), etc)
- hence the PS_ prefix, instead use the services exposed in m_protocols.inc
-
- these should be called with CallProtoService which prefixes the protocol module
- name before calling.
- -
- Deleting contacts from protocols that store the contact list on the server:
- If a contact is deleted while the protocol is online, it is expected that the
- protocol will have hooked me_db_contact_deleted and take the appropriate
- action by itself.
- If a contact is deleted while the protocol is offline, the contact list will
- display a message to the user about the problem, and set the byte setting
- "CList"/"Delete" to 1. Each time such a protocol changes status from offline
- or connecting to online the contact list will check for contacts with this
- flag set and delete them at that time. Your hook for me_db_contact_deleted
- will pick this up and everything will be good.
-/>>}
-
-const
- PFLAGNUM_1 = $1;
- PF1_IMSEND = $00000001; // supports IM sending
- PF1_IMRECV = $00000002; // supports IM receiving
- PF1_IM = (PF1_IMSEND or PF1_IMRECV);
- PF1_URLSEND = $00000004; // supports separate URL sending
- PF1_URLRECV = $00000008; // supports separate URL receiving
- PF1_URL = (PF1_URLSEND or PF1_URLRECV);
- PF1_FILESEND = $00000010; // supports file sending
- PF1_FILERECV = $00000020; // supports file receiving
- PF1_FILE = (PF1_FILESEND or PF1_FILERECV);
- PF1_MODEMSGSEND = $00000040; // supports broadcasting away messages
- PF1_MODEMSGRECV = $00000080; // supports reading others' away messages
- PF1_MODEMSG = (PF1_MODEMSGSEND or PF1_MODEMSGRECV);
- PF1_SERVERCLIST = $00000100; // contact lists are stored on the server, not locally. See notes below
- PF1_AUTHREQ = $00000200; // will get authorisation requests for some or all contacts
- PF1_ADDED = $00000400; // will get 'you were added' notifications
- PF1_VISLIST = $00000800; // has an invisible list
- PF1_INVISLIST = $00001000; // has a visible list for when in invisible mode
- PF1_INDIVSTATUS = $00002000; // supports setting different status modes to each contact
- PF1_EXTENSIBLE = $00004000; // the protocol is extensible and supports plugin-defined messages
- PF1_PEER2PEER = $00008000; // supports direct (not server mediated) communication between clients
- PF1_NEWUSER = $00010000; // supports creation of new user IDs
- PF1_CHAT = $00020000; // has a realtime chat capability
- PF1_INDIVMODEMSG = $00040000; // supports replying to a mode message request with different text depending on the contact requesting
- PF1_BASICSEARCH = $00080000; // supports a basic user searching facility
- PF1_EXTSEARCH = $00100000; // supports one or more protocol-specific extended search schemes
- PF1_CANRENAMEFILE = $00200000; // supports renaming of incoming files as they are transferred
- PF1_FILERESUME = $00400000; // can resume broken file transfers, see PS_FILERESUME below
- PF1_ADDSEARCHRES = $00800000; // can add search results to the contact list
- PF1_CONTACTSEND = $01000000; // can send contacts to other users
- PF1_CONTACTRECV = $02000000; // can receive contacts from other users
- PF1_CONTACT = (PF1_CONTACTSEND or PF1_CONTACTRECV);
- PF1_CHANGEINFO = $04000000; // can change our user information stored on server
- PF1_SEARCHBYEMAIL = $08000000; // supports a search by e-mail feature
- PF1_USERIDISEMAIL = $10000000; // set if the uniquely identifying field of the network is the e-mail address
- PF1_SEARCHBYNAME = $20000000; // supports searching by nick/first/last names
- PF1_EXTSEARCHUI = $40000000; // has a dialog box to allow searching all the possible fields
- PF1_NUMERICUSERID = $80000000; // the unique user IDs for this protocol are numeric
-
- PFLAGNUM_2 = 2; // the status modes that the protocol supports
- PF2_ONLINE = $00000001; // an unadorned online mode
- PF2_INVISIBLE = $00000002;
- PF2_SHORTAWAY = $00000004; // Away on ICQ, BRB on MSN
- PF2_LONGAWAY = $00000008; // NA on ICQ, Away on MSN
- PF2_LIGHTDND = $00000010; // Occupied on ICQ, Busy on MSN
- PF2_HEAVYDND = $00000020; // DND on ICQ
- PF2_FREECHAT = $00000040;
- PF2_OUTTOLUNCH = $00000080;
- PF2_ONTHEPHONE = $00000100;
- PF2_IDLE = $00000200; //added during 0.3.4 (2004/09/13)
-
- PFLAGNUM_3 = 3; //the status modes that the protocol supports
- //away-style messages for. Uses the PF2_ flags.
-
- PFLAGNUM_4 = 4; // v0.3+: flag asking a protocol plugin how auths are handled
- PF4_FORCEAUTH = $00000001; // protocol has to send auth's for things to work
- PF4_FORCEADDED = $00000002; // protocol has to tell people that they were added (otherwise things don't work)
- PF4_NOCUSTOMAUTH = $00000004; // protocol can't send a custom message while asking others for auth
- PF4_SUPPORTTYPING = $00000008; // protocol supports user is typing messages v0.3.3+
- PF4_SUPPORTIDLE = $00000010; // protocol understands idle, added during v0.3.4+ (2004/09/13)
- PF4_AVATARS = $00000020; // protocol has avatar support, added during v0.3.4 (2004/09/13)
- PF4_OFFLINEFILES = $00000040; // protocols supports sending files to offline users (v0.5.2)
- PF4_IMSENDUTF = $00000080; // protocol is able to process messages in utf-8 (v.0.7.0+)
- PF4_IMSENDOFFLINE = $00000100; // protocol supports sending offline messages (v0.8.0+)
- PF4_INFOSETTINGSVC = $00000200; // protocol supports user info translation services (v0.8.0+)
- PF4_NOAUTHDENYREASON = $00000400; // protocol doesn't support authorization deny reason (v0.9.0+)
-
- PFLAG_UNIQUEIDTEXT = 100; // returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
- PFLAG_MAXCONTACTSPERPACKET = 200; // v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS. lParam=(LPARAM)hContact.
- PFLAG_UNIQUEIDSETTING = 300; // v0.3+: returns the DB setting name (e.g. szProto=ICQ, szSetting=UIN) that has the ID which makes this user unique on that system (0.3a ONLY), the string is statically allocated so no need to free()
- PFLAG_MAXLENOFMESSAGE = 400; // v0.3.2+: return the maximum length of an instant message, lParam=(LPARAM)hContact
- {
- A protocol might not support this cap, it allows a protocol to say that PFLAGNUM_2 is for
- statuses contacts supports, and that PFLAGNUM_5 is for statuses a protocol can SET TO ITSELF,
- if this is not replied to, then PFLAGNUM_2 is alone in telling you which statuses a protocol
- can set to and what statuses a contact can set to as well.
-
- E.g. A protocol might report 'wireless' users but a login of the protocol from Miranda can
- not set itself to 'wireless' so PFLAGNUM_2 would return PF2_ONTHEPHONE and PFLAGNUM_5 would
- return PF2_ONTHEPHONE as well, this means "I will get contacts who are on the phone but you can
- not set on the phone" and so on.
-
- Do note that the reply here is a NEGATION of bitflags reported for PFLAGNUM_2, e.g. returning
- PF2_ONTHEPHONE for PFLAGNUM_2 and returning the same for PFLAGNUM_5 says that you DO NOT SUPPORT
- PF2_ONTHEPHONE for the user to PS_SETSTATUS to, but you will expect other contacts to have
- that status, e.g. you can get onthephone for users but can't go online with onthephone.
-
- The same PF2_ status flags are used in the reply.
-
- Added during 0.3.4 (2004/09/14)
- }
-
- PFLAGNUM_5 = 5;
-
- // for PS_SETSTATUS
-
- LOGINERR_WRONGPASSWORD = 1;
- LOGINERR_NONETWORK = 2;
- LOGINERR_PROXYFAILURE = 3;
- LOGINERR_BADUSERID = 4;
- LOGINERR_NOSERVER = 5;
- LOGINERR_TIMEOUT = 6;
- LOGINERR_WRONGPROTOCOL = 7;
- LOGINERR_OTHERLOCATION = 8;
-
- // flag for PS_ADDTOLIST
-
- PALF_TEMPORARY = 1; // add the contact temporarily and invisibly, just to get user info or something
-
- // flags for PS_GETINFO
-
- SGIF_MINIMAL = 1; // get only the most basic information. This should
- // contain at least a Nick and e-mail.
- SGIF_ONOPEN = 2; // set when the User Info form is being opened
-
- // for PSR_MESSAGE
-
- PREF_CREATEREAD = 1; // create the database event with the 'read' flag set
- PREF_UNICODE = 2;
- PREF_RTL = 4; // 0.5+ addition: support for right-to-left messages
- PREF_UTF = 8; // message is in utf-8 (0.7.0+)
-
- // for PS_FILERESUME
-
- FILERESUME_OVERWRITE = 1;
- FILERESUME_RESUME = 2;
- FILERESUME_RENAME = 3;
- FILERESUME_SKIP = 4;
-
-type
- PPROTOSEARCHRESULT = ^TPROTOSEARCHRESULT;
- TPROTOSEARCHRESULT = record
- cbSize : int;
- nick : TChar;
- firstName: TChar;
- lastName : TChar;
- email : TChar;
- id : TChar;
- flags : int;
- reserved : array [0..8] of Byte;
- // Protocols may extend this structure with extra members at will and supply
- // a larger cbSize to reflect the new information, but they must not change
- // any elements above this comment
- // The 'reserved' field is part of the basic structure, not space to
- // overwrite with protocol-specific information.
- // If modules do this, they should take steps to ensure that information
- // they put there will be retained by anyone trying to save this structure.
- end;
-
- PPROTOSEARCHBYNAME = ^TPROTOSEARCHBYNAME;
- TPROTOSEARCHBYNAME = record
- pszNick : PAnsiChar;
- pszFirstName: PAnsiChar;
- pszLastName : PAnsiChar;
- end;
-
- PPROTORECVEVENT = ^TPROTORECVEVENT;
- TPROTORECVEVENT = record
- flags : DWORD;
- timestamp: DWORD;
- szMessage: PAnsiChar;
- lParam : LPARAM;
- end;
-
- PPROTORECVFILE = ^TPROTORECVFILE;
- TPROTORECVFILE = record
- flags : DWORD;
- timestamp : DWORD; // unix time
- szDescription: PAnsiChar;
- pFiles : ^PAnsiChar; // pointer to an array of PAnsiChar's
- lParam : LPARAM;
- end;
-
- //File(s) have been received (0.9.x)
- PPROTORECVFILET = ^TPROTORECVFILET;
- TPROTORECVFILET = record
- flags : DWORD;
- timestamp : DWORD; // unix time
- szDescription: TChar;
- FileCount : integer;
- pFiles : ^TChar; // pointer to an array of PAnsiChar's
- lParam : LPARAM;
- end;
-
- PPROTOFILERESUME = ^TPROTOFILERESUME;
- TPROTOFILERESUME = record
- action : int; // FILERESUME_* flag
- szFilename: TFNAMECHAR; // full path, only valid if action=FILERESUME_RENAME
- end;
-
-const
- {
- wParam : PFLAGNUM_* (see above)
- lParam : 0
- Affects: Returns a bitfield for settings corresponding to flag number, see notes
- Returns: a bitfield of supported features -- or 0 if flag_num is not supported
- Notes : this checks what sort of things are actively supported by a protocol
- module
- }
- PS_GETCAPS = '/GetCaps';
-
- {
- wParam : cchName
- lParam : Pointer to a buffer to fill with human-readable name
- Affect : Get a human-readable name for the protocol, see notes
- Result : 0 on success, [non zero] on failure
- Notes : Should be translated before being returned, cchName
- has the size of the buffer, example strings: "ICQ", "AIM"
- }
- PS_GETNAME = '/GetName';
-
- {
- wParam : whichIcon
- lParam : 0
- Affect : Loads one of the protocol-sspecific icons
- Returns: the HICON or NULL on failure, the returned icon
- must be DestroyIcon()ed, the UI should overlay
- the online icon with further UI-specified icon to
- repressent the exact status mode.
- }
- PLI_PROTOCOL = $1; // An icon representing the protocol (eg the multicoloured flower for ICQ)
- PLI_ONLINE = $2; // Online state icon for that protocol (eg green flower for ICQ)
- PLI_OFFLINE = $3; // Offline state icon for that protocol (eg red flower for ICQ)
-
- PLIF_LARGE = $0; // Or with one of the above to get the large (32x32 by default) icon
- PLIF_SMALL = $10000; // Or with one of the above to get the small (16x16 by default) icon
- PLIF_ICOLIB = $20000; // the returned HICON is managed by IcoLib, DO NOT DestroyIcon() it
- PLIF_ICOLIBHANDLE = $40000; // the function will return IcoLib handle not HICON
-
- PS_LOADICON = '/LoadIcon';
-
- {
- wParam : status_mode
- lParam : Pointer to a null terminated string containing message
- Affect : Sets the status mode specific message for the user, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : This service is not available unless PF1_MODEMSGSEND is set,
- and PF1_INDIVMODEMSG is *not* set.
- If PF1_INDIVMODEMSG is set, then see PSS_AWAYMSSG for details
- of operations of away messages.
- -
- Protocol modules smust support lParam=NULL, it may eithere mean
- to use an empty message or (preferably) not to reply at all to
- any requests.
- }
- PS_SETAWAYMSG = '/SetAwayMsg';
- PS_SETAWAYMSGW = '/SetAwayMsgW';
-
- {
- wParam : newMode from statusmodes.inc
- lParam : 0
- Affect : Change the protocol's status mode, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : Will send an ack with :
- type=ACKTYPE_SUCCESS, result=ACKRESULT_SUCCESS, hProcess=previousMode, lParam=newMode
- -
- when the change completes. This ack is sent for all changes, not
- just ones caused by calling this function.
- -
- NewMode can be ID_STATUS_CONNECTING<=newMode<ID_STATUS_CONNECTING+
- MAX_CONNECT_RETRIES to signify that it's connecting and it's the nth retry.
- -
- Protocols are initially always in offline mode, if a protocol
- doesn't support a specific status mode, it should pick the closest
- ones that it does support, and change to that.
-
- If a protocol has to switch from offline mode to online (or a substate
- of online, like away) then it should report any errors in the
- form of an additional ack :
-
- type=ACKTYPE_LOGIN, result=ACKRESULT_FAILURE, hProcess=NULL, lParam=LOGINERR_*
-
- SetStatus() is called when a protocol module is first loaded
- with newMode=ID_STATUS_ONLINE.
- -
- Protocols can define their own LOGINERR_* starting at $1000, see
- LOGINERR_* above
- }
- PS_SETSTATUS = '/SetStatus';
-
- {
- wParam : 0
- lParam : 0
- Affect : Get the status mode that a protocol is currently in, see notes
- Returns: The current status mode
- Notes : Only protocol modules need to implement this, non network level
- protocol modules do not need to (but if you register as a protocol
- you need to, Miranda will GPF otherwise)
- }
- PS_GETSTATUS = '/GetStatus';
-
- {
- wParam : HDBEVENT
- lParam : 0
- Affect : allow 'somebody' to add the user to their contact list, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : Auth request come in the form of an event added to the database
- for the NULL(0) user, the form is:
- -
- protocolSpecific: DWORD;
- nick, firstname, lastName, e-mail, requestReason: ASCIIZ;
- -
- HDBEVENT musts be the handle of such an event, one or more
- fields may be empty if the protocol doesn't support them
- }
- PS_AUTHALLOW = '/Authorize';
-
- {
- wParam : HDBEVENT
- lParam : TChar - Reason
- Affect : Deny an authorisation request
- Returns: 0 on success, [non zero] on failure
- Notes : Protocol modules must be able to cope with lParam=NULL(0)
- }
- PS_AUTHDENY = '/AuthDeny';
- PS_AUTHDENYW = '/AuthDenyW';
-
- {
- Send a "You were added" event
- wParam=lParam=0
- Returns 0 on success, nonzero on failure
- }
- PSS_ADDED = '/YouWereAdded';
-
-{ Create account manager UI form
- wParam=0
- lParam=(LPARAM)(HWND)hwndAccMgr
- Returns handle on newly created form.
- Size for best fit is 186x134 DLUs, please avoid groupboxes
- paddind and advanced options. This should provide minimal setup
- for initial connect.
-}
- PS_CREATEACCMGRUI = '/CreateAccMgrUI';
- {
- wParam : 0
- lParam : Pointer to a null terminated string containing an ID to search for
- Affect : Send a basic search request, see notes
- Returns: A handle to the search request or NULL(0) on failure
- Notes : All protocols identify users uniquely by a single field
- this service will search by that field.
- -
- All search replies (even protocol-spec extended searches)
- are replied by a series of ack's,-
- -
- Result acks are a series of:
- type=ACKTYPE_SEARCH, result=ACKRESULT_DATA, lParam=Pointer to a TPROTOSEARCHRESULT structure
- -
- ending ack:
- type=ACKTYPE_SEARCH, result=ACKRESULT_SUCCESS, lParam=0
- -
- The pointers in the structure are not guaranteed to be
- valid after the ack is complete.
- -
- The structure to reply with search results can be extended
- per protocol basis (see below)
-
- }
- PS_BASICSEARCH = '/BasicSearch';
- PS_BASICSEARCHW = '/BasicSearchW';
-
- {
- wParam : 0
- lParam : Pointer to a NULL terminated string containing the e-mail to search for
- Affect : Search for user(s) by e-mail address, see notes
- Returns: A HANDLE to the search, or NULL(0) on failure
- Notes : Results are returned as for PS_BASICSEARCH, this service
- is only available if the PF1_USERIDISEMAIL flag is set for caps --
- -
- This service with the above service should be mapped to the same
- function if the aforementioned flag is set.
- Version: v0.1.2.1+
- }
- PS_SEARCHBYEMAIL = '/SearchByEmail';
- PS_SEARCHBYEMAILW = '/SearchByEmailW';
-
- {
- wParam : 0
- lParam : Pointer to a TPROTOSEARCHBYNAME structure
- Affect : Search for users by name, see notes
- Returns: Handle to the search, NULL(0) on failure
- Notes : this service is only available, if PF1_SEARCHBYNAME capability is set.
- Results are returned in the same manner as PS_BASICSEEARCH
- Version: v0.1.2.1+
- }
- PS_SEARCHBYNAME = '/SearchByName';
- PS_SEARCHBYNAMEW = '/SearchByNameW';
-
- {
- wParam : 0
- lParam : Handle to window owner
- Affect : Create the advanced search dialog box, see notes
- Returns: A window handle, or NULL(0) on failure
- Notes : this service is only available if PF1_EXTSEARCHUI capability is
- set, advanced search is very protocol-spec'd so it is left to
- the protocol itself to supply a dialog containing the options,
- this dialog should not have a titlebar and contain only search
- fields. the rest of the UI is supplied by Miranda.
- -
- The dialog should be created with CreateDialog() or it's kin
- and still be hidden when this function returns,
- -
- The dialog will be destroyed when the find/add dialog is closed
- Version: v0.1.2.1+
- }
- PS_CREATEADVSEARCHUI = '/CreateAdvSearchUI';
-
- {
- wParam : 0
- lParam : Handle to advanced search window handle
- Affect : Search using the advanced search dialog, see notes
- Returns: A handle or NULL(0) on failure
- Notes : Results are returned in the same manner as PS_BASICSEARCH,
- this service is only available if PF1_EXTSEARCHUI capability is set
- Version: v0.1.2.1+
- }
- PS_SEARCHBYADVANCED = '/SearchByAdvanced';
-
-type
- CUSTOMSEARCHRESULTS = record
- nSize :size_t;
- nFieldCount:int;
- szFields :^TCHAR;
- psr :TPROTOSEARCHRESULT;
- end;
-
- {
- wParam : flags
- lParam : Pointer to a TPROTOSEARCHRESULT structure
- Affect : Adds a search result to the contact list, see notes
- Returns: A handle to the new contact (HCONTACT) or NULL(0) on failure
- Notes : The pointer MUST be a result returned by a search function
- since there maybe extra protocol-spec data required by the protocol.
- -
- the protocol module should not allow duplicate contains to be added,
- but if such a request *is* received it should return a HCONTACT
- to the original user,
- -
- If flags is PALF_TEMPORARY set, the contact should be added
- temorarily and invisiblely, just to get the user info (??)
- -
- }
-const
- PS_ADDTOLIST = '/AddToList';
-
- {
- wParam : MAKEWPARAM(flags, iContact)
- lParam : HDBEVENT
- Affects: Add a contact to the contact list given an auth/added/contacts events, see notes
- Returns: A HCONTACT or NULL(0) on failure
- Notes : HDBEVENT must be either EVENTTYPE_AUTHREQ or EVENTTYPE_ADDED
- flags are the same as PS_ADDTOLIST,
- -
- iContacts is only used for contacts vents, it is 0-based index
- of the contacts in the event to add, there's no way to add two or more
- contacts at once, you should just call this as many times as needed.
- }
- PS_ADDTOLISTBYEVENT = '/AddToListByEvent';
-
- {
- wParam : InfoType
- lParam : Pointer to InfoData
- Affect : Changes user details as stored on the server, see notes
- Returns: A Handle to the change request or NULL(0) on failure
- Notes : the details stored on the server are very protocol spec'd
- so this service just supplies an outline for protocols to use.
- See protocol-specific documentation for what infoTypes are available
- and what InfoData should be for each infoTypes.
- -
- Sends an ack type=ACKTYPE_SETINFO, result=ACKRESULT_SUCCESS/FAILURE, lParam=0
- -
- This description just leaves me cold.
- Version: v0.1.2.0+
- }
- PS_CHANGEINFO = '/ChangeInfo';
-
- {
- wParam : HFILETRANSFER
- lParam : Pointer to a initalised TPROTOFILERESUME
- Affect : Informs the protocol of the user's chosen resume behaviour, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : If the protocol supports file resume (caps: PF1_FILERESUME) then before
- each file receive begins it will broadcast an ack with :
-
- type=ACKTYPE_FILE, result=ACKRESULT_RESUME, hProcess=hFileTransfer,
- lParam = TPROTOFILETRANSFERSTATUS.
-
- If the UI processes this ack it must return a [non zero] valuee from it's
- hook, it all the hooks complete without returning [non zero] then the
- protocol will assume that no resume UI was available and will continue
- to receive the file with a default behaviour (default: overwrite)
- -
- If a hook does return [non zero] then that UI MUST call this service,
- PS_FILERESUME at some point.
- When the protocol module receives this call it will proceed wit the
- file recieve usingg the given information.
- -
- Having sasid that, PS_FILERESUME MUST be called, it is also
- acceptable to completely abort the transfer instead, i.e. the file
- exists locally and the user doesn't want to overwrite or resume or
- reget.
- Version: v0.1.2.2+
- }
- PS_FILERESUME = '/FileResume';
- PS_FILERESUMEW = '/FileResumeW';
-
-{
- Asks a protocol to join the chatroom from contact v0.8.0+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)0
- Returns 0 on success, nonzero on failure
-}
- PS_JOINCHAT = '/JoinChat';
-
-{
- Asks a protocol to leave the chatroom from contact v0.8.0+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)0
- Returns 0 on success, nonzero on failure
-}
- PS_LEAVECHAT = '/LeaveChat';
-
-{
- Asks a protocol to read contact information and translate them (for a lookup fields) v0.8.0+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(DBCONTACTGETSETTING*)&dbcgs
- The flag PF4_INFOSETTINGSVC indicates that a protocol supports this. Basically it should
- do the same as MS_DB_CONTACT_GETSETTING_STR, except that for a lookup settings (e.g. Language)
- it returns string instead of an ID stored in the database.
- Caller is responsible for free()ing dbcgs.pValue->pszVal and pbVal if they are
- returned. You must **NOT** do this from your version of free() you have to use Miranda's free()
- you can get a function pointer to Miranda's free() via MS_SYSTEM_GET_MMI, see m_system.h
- Returns 0 on success or nonzero if the setting name was not found or hContact
- was invalid
-}
- PS_GETINFOSETTING = '/GetInfoSetting';
-
-{
- Asks protocol for the status message for a status
- wParam=(WORD) 0 for current status or a status id
- lParam=SGMA_xxx
- Returns status msg or NULL if there is none. The protocol have to handle only the current
- status. Handling messages for other statuses is optional.
- Remember to mir_free the return value
-}
- SGMA_UNICODE = 1; // return Unicode status
-
- PS_GETMYAWAYMSG = '/GetMyAwayMsg';
-
-{
- Set nickname for the user
- wParam=(WPARAM)SMNN_xxx
- lParam=(LPARAM)(char *) The new nickname for the user
- return=0 for success
-}
- SMNN_UNICODE = 1; // return Unicode status
-
- PS_SETMYNICKNAME = '/SetNickname';
-
-{
- Get the max allowed length for the user nickname
- Optional, default value is 1024
- wParam=(WPARAM)0
- lParam=(LPARAM)0
- return= <=0 for error, >0 the max length of the nick
-}
- PS_GETMYNICKNAMEMAXLENGTH = '/GetMyNicknameMaxLength';
-
-// WAYD = What are you doing
- WAYD_UNICODE = 1; // return Unicode texts
-
-{
- Get the WAYD message for the user
- wParam=(WPARAM)WAYD_xxx
- lParam=(LPARAM)0
- Returns the text or NULL if there is none. Remember to mir_free the return value.
-}
- PS_GETMYWAYD = '/GetMyWAYD';
-
-{
- Sets the WAYD message for the user
- wParam=(WPARAM)WAYD_xxx
- lParam=(LPARAM)(WCHAR * or char *)The message
- Returns 0 on success, nonzero on failure
-}
- PS_SETMYWAYD = '/SetMyWAYD';
-
-{
- Get the max allowed length that a WAYD message can have
- Optional, default value is 1024
- wParam=(WPARAM)0
- lParam=(LPARAM)0
- Returns the max length
-}
- PS_GETMYWAYDMAXLENGTH = '/GetMyWAYDMaxLength';
-
-// these should be called with CallContactService()
-
-{<</
- !IMPORTANT!
- wParam, lParam data expected declarations should be treated with
- one level of indirection, where it says (CCSDATA: Yes)
- should be :
-
- What you *actually* get in the service:
-
- wParam = 0
- lParam = pCCSDATA
-
- CCSDATA contains the ..wParam, ..lParam, hContact data declared with each service,
- so the wParam, lParam passed does not contain the data itself, but lParam
- contains a pointer to a structure which contains the data.
-
-/>>}
-
- {
- CCSDATA: Yes
- wParam : flags
- Param : 0
-
- Affect : Updates a contact's details from the server, see notes
- Returns: 0 on success, [non zero] on failure
- Notes :
-
- flags which may have SGIF_MINIMAL set to only get
- "basic" information, such as nickname, email address.
-
- PCCSDATA(lParam)^.hContact has the HCONTACT handle to get user
- information for.
-
- Will update all the information in the database and then
- send acks with :
-
- type=ACKTYPE_GETINFO, result=ACKRESULT_SUCCESS, hProcess=nReplies, lParam=thisReply
- -
- Since some protocol do not allow the module to tell when it has
- got all the information so it can send a final ack, one
- ack will be sent after each chunk of data has been received,
- -
- nReplies contains the number of distinct acks
- that will be sent to get all the information, 'thisReply'
- is the zero based index of this ack.
- When thisReply=0 the minimal information has just been received,
- all other numbering is arbitrary.
-
- }
- PSS_GETINFO = '/GetInfo';
-
- {
- CCSDATA: Yes
- wParam : flags
- lParam : Pointer to a null terminated string
- Affect : Send an instant message
- Returns: an hProcess corresponding to an ACK which will be sent after
- the hProcess.
- Notes: type=ACKTYPE_MESSAGE, result=ACKRESULT_SUCCESS/FAILURE,
- lParam=ansi error message or NIL
- -
- here's the deal, you must return a 'seq' from this service
- which you have to ack when the message actually get's sent,
- or send a fake ack sometime soon if you can't find out if the message
- was successfully received with the protocol that you're using.
- -
- this event is NOT added to the database automatically.
- }
- PSS_MESSAGE = '/SendMsg';
-// PSS_MESSAGEW = '/SendMsgW';
-
- {
- CCSDATA: Yes
- wParam : flags
- lParam : null terminated string to the URL, see notes
- Affect : Send a URL message, see notes
- Returns: A hProcess which will be ack'd later
- Notes : lParam may contain TWO strings, the first for URL, the second for
- description, in the format :
- <url>#0<desc>#0 or <url>#0#0
- Will send an ack for hProcess when the URL actually gets sent
- type=ACKTYPE_URL, result=ACKRESULT_SUCCESS/FAILURE,
- lParam=ansi error message or NIL
- -
- protocol modules are free to define flags starting at $10000
- -
- The event will *not* be added to the database automatically
- }
- PSS_URL = '/SendUrl';
-
- {
- CCSDATA: Yes
- wParam : MAKEWPARAM(flags)
- lParam : Pointer to hContactsList
- Affect : Send a set of contacts, see notes
- Returns: A hProcess which will be ack, NULL(0) on failure
- Notes : hContactsList is an array of nContacts handles to contacts,
- if this array includes one or more contains that can not be transferred
- using this protocol the function will fail.
- -
- Will send an ack when the contacts actually get sent:
-
- type=ACKTYPE_CONTACTS, result=ACKRESULT_SUCCESS/FAILURE,
- lParam=ansi error message or NIL
- -
- No flags have ben defined yet,
- -
- The event will *not* be added to the database automatically
- }
- PSS_CONTACTS = '/SendContacts';
-
- {
- CCSDATA: Yes
- wParam : 0
- lParam : 0
- Affect : Send a request to retrieve HCONTACT's mode message, see notes
- Returns: a hProcess which will be ack'd later, NULL(0) on failure
- Notes : the reply will come in a form of an ack :
-
- type=ACKTYPE_AWAYMSG, result=ACKRESULT_SUCCESS/FAILURE,
- lParam=pointer to a null terminated string the containing message
- }
- PSS_GETAWAYMSG = '/GetAwayMsg';
-
- {
- CCSDATA: Yes
- wParam : hProcess
- lParam : pointer to a buffer to fill with away message to reply with
- Affect : Sends an away message reply to a user, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : This service must only be called is caps has PF1_MODEMSGSEND set
- as well as PF1_INDIVMODEMSG otherwise PS_SETAWAYMESSAGE should
- be used.
- -
- Reply will be sent in the form of an ack :
-
- type=ACKTYPE_AWAYMSG, result=ACKRESULT_SENTREQUEST, lParam=0
- }
- PSS_AWAYMSG = '/SendAwayMsg';
-
- {
- CCSDATA: Yes
- wParam : status_mode
- lParam : 0
- Affect : Set the status mode the user will appear in to a user, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : If status_mode = 0 then revert to normal state for the user,
- ID_STATUS_ONLINE is possible if PF1_VISLIST
- ID_STATUS_ONLINE is possible if PF1_INDIVSTATUS
- }
- PSS_SETAPPARENTMODE = '/SetApparentMode';
-
- // only valid if caps support IM xfers
- {
- CCSDATA: Yes
- wParam : HTRANSFER
- lParam : null terminated string containing the path
- Affect : Allow a file transfer to begin, see notes
- Returns: A handle to the transfer to be used from now on.
- Notes : If the path does not point to a directory then:
- if a single file is being transfered and the protocol supports
- file renaming (PF1_CANRENAMEFILE) then the file is given
- this name, othewise the file is removed and file(s) are placed
- into the resulting directory.
- -
- File transfers are marked by a EVENTTYPE_FILE added to the database.
- The format is :
- hTransfer: DWORD
- filename(s), description: ASCIIZ
- }
- PSS_FILEALLOW = '/FileAllow';
- PSS_FILEALLOWW = '/FileAllowW';
-
- {
- CCSDATA: Yes
- wParam : HTRANSFER
- lparam : Pointer to a buffer to be filled with reason
- Affect : Refuses a file transfer request
- Returns: 0 on success, [non zero] on failure
- }
- PSS_FILEDENY = '/FileDeny';
- PSS_FILEDENYW = '/FileDenyW';
-
- {
- CCSDATA: Yes
- wParam : HTRANSFER
- lParam : 0
- Affect : Cancel an in-progress file transfer
- Returns: 0 on success, [non zero] on failure
- }
- PSS_FILECANCEL = '/FileCancel';
-
- {
- CCSDATA: Yes
- wParam : null terminated string containing description
- lParam : pointer to an array of PAnsiChar's containing file paths/directories
- Affect : Start a file(s) send, see notes
- Returns: A HTRANSFER handle on success, NULL(0) on failur
- Notes : All notifications are done thru acks :
- -
- type=ACKTYPE_FILE, if result=ACKRESULT_FAILED then
- lParam=null terminated string containing reason
- }
- PSS_FILE = '/SendFile';
- PSS_FILEW = '/SendFileW';
-
- {
- Send an auth request
- wParam=0
- lParam=TChar szMessage
- Returns 0 on success, nonzero on failure
- }
- PSS_AUTHREQUEST = '/AuthRequest';
- PSS_AUTHREQUESTW = '/AuthRequestW';
-
- {
- Send "User is Typing" (user is typing a message to the user) v0.3.3+
- wParam=(WPARAM)(HANDLE)hContact
- lParam=(LPARAM)(int)typing type - see PROTOTYPE_SELFTYPING_X defines in m_protocols.h
- }
- PSS_USERISTYPING = '/UserIsTyping';
-
-// Receiving Services
-{>>/
- Receiving Services:
- Before a message is sent to /RecvMessage it goes through a MS_PROTO_CHAINRECV
- which allows any other module to change data (for decryption, etc),
- this then reaches /RecvMessage.
-
- This does not have to be the same structure/memory contained within that
- structure that started the chain call.
-
- /RecvMessage adds the event to the database, any other modules who
- are interested in what message the user will see should hook at this point.
-/>>}
-
- {
- CCSDATA: Yes
- wParam : 0
- lParam : Pointer to a TPROTORECVEVENT
- Affect : An instant message has beeen received, see notes
- Returns: 0 - success, other failure
- // handle to the newly added event, or NULL on failure
- Notes : lParam^.lParam^.szMessage has the message, see structure above
- stored as DB event EVENTTYPE_MESSAGE, blob contains message
- string without null termination.
- }
- PSR_MESSAGE = '/RecvMessage';
-// PSR_MESSAGEW = '/RecvMessageW';
-
- MS_PROTO_RECVMSG = 'Proto/RecvMessage';
- {
- CCSDATA: Yes
- wParam : 0
- lParam : Pointer to a TPROTORECVEVENT, see notes
- Affect : A URL has been received
- Notes : szMessage is encoded the same as PSS_URL
- -
- Stored in the database : EVENTTYPE_URL, blob contains message
- without null termination
- }
- PSR_URL = '/RecvUrl';
-
- {
- CCSDATA: Yes
- wParam : 0
- lParam : Pointer to a TPROTORECVEVENT
- Affect : Contacts have been received, see notes
- Notes : pre.szMessage is actually a PROTOSEARCHRESULT list
- pre.lParam is the number of contains in that list.
- pre.flags can contain PREF_UTF defining the strings as utf-8 encoded (0.7.0+)
- -
- PS_ADDTOLIST can be used to add contacts to the list
- -
- repeat [
- ASCIIZ userNick
- ASCIIZ userId
- ]
- userNick should be a human-readable description of the user. It need not
- be the nick, or even confined to displaying just one type of
- information. The dbe.flags can contain DBEF_UTF defining userNick as
- utf-8 encoded.
- userId should be a machine-readable representation of the unique
- protocol identifying field of the user. Because of the need to be
- zero-terminated, binary data should be converted to text.
- Use PS_ADDTOLISTBYEVENT to add the contacts from one of these to the list.
- }
- PSR_CONTACTS = '/RecvContacts';
-
- {
- CCSDATA: Yes
- wParam : 0
- lParam : Pointer to a TPROTORECVFILE
- Affect : File(s) have been received
- }
- PSR_FILE = '/RecvFile';
-
- MS_PROTO_RECVFILE :pAnsiChar = 'Proto/RecvFile';
- MS_PROTO_RECVFILET:pAnsiChar = 'Proto/RecvFileT';
-
- {
- CCSDATA: Yes
- wParam : status_mode
- lParam : Pointer to a TPROTORECVEVENT structure
- Affect : An away message reply has been received
- }
- PSR_AWAYMSG = '/RecvAwayMsg';
-
- {
- An authorization request has been received
- wParam=0
- lParam=(LPARAM)(PROTORECVEVENT*)&pre
- pre.szMessage is same format as blob
- pre.lParam is the size of the blob
- }
- PSR_AUTH = '/RecvAuth';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_skin.inc b/delphi/Awkward/include/m_skin.inc
deleted file mode 100644
index 33f86cc..0000000
--- a/delphi/Awkward/include/m_skin.inc
+++ /dev/null
@@ -1,190 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SKIN}
-{$DEFINE M_SKIN}
-
-const
- // event icons
- SKINICON_EVENT_MESSAGE = 100;
- SKINICON_EVENT_URL = 101;
- SKINICON_EVENT_FILE = 102;
-
- // other icons
- SKINICON_OTHER_MIRANDA = 200;
- SKINICON_OTHER_EXIT = 201;
- SKINICON_OTHER_SHOWHIDE = 202;
- SKINICON_OTHER_GROUPOPEN = 203; // v0.1.1.0+
- SKINICON_OTHER_USERONLINE = 204; // v0.1.0.1+
- SKINICON_OTHER_GROUPSHUT = 205; // v0.1.1.0+
- SKINICON_OTHER_CONNECTING = 206; // v0.1.0.1+
- SKINICON_OTHER_ADDCONTACT = 207; // v0.7.0.2+
- SKINICON_OTHER_USERDETAILS = 208; // v0.7.0.2+
- SKINICON_OTHER_HISTORY = 209; // v0.7.0.2+
- SKINICON_OTHER_DOWNARROW = 210; // v0.7.0.2+
- SKINICON_OTHER_FINDUSER = 211; // v0.7.0.2+
- SKINICON_OTHER_OPTIONS = 212; // v0.7.0.2+
- SKINICON_OTHER_SENDEMAIL = 213; // v0.7.0.2+
- SKINICON_OTHER_DELETE = 214; // v0.7.0.2+
- SKINICON_OTHER_RENAME = 215; // v0.7.0.2+
- SKINICON_OTHER_SMS = 216; // v0.7.0.2+
- SKINICON_OTHER_SEARCHALL = 217; // v0.7.0.2+
- SKINICON_OTHER_TICK = 218; // v0.7.0.2+
- SKINICON_OTHER_NOTICK = 219; // v0.7.0.2+
- SKINICON_OTHER_HELP = 220; // v0.7.0.2+
- SKINICON_OTHER_MIRANDAWEB = 221; // v0.7.0.2+
- SKINICON_OTHER_TYPING = 222; // v0.7.0.2+
- SKINICON_OTHER_SMALLDOT = 223; // v0.7.0.2+
- SKINICON_OTHER_FILLEDBLOB = 224; // v0.7.0.2+
- SKINICON_OTHER_EMPTYBLOB = 225; // v0.7.0.2+
- SKINICON_OTHER_UNICODE = 226; // v0.7.0.19+
- SKINICON_OTHER_ANSI = 227; // v0.7.0.19+
- SKINICON_OTHER_LOADED = 228; // v0.7.0.19+
- SKINICON_OTHER_NOTLOADED = 229; // v0.7.0.19+
- SKINICON_OTHER_UNDO = 230; // v0.8.0.4+
- SKINICON_OTHER_WINDOW = 231; // v0.8.0.4+
- SKINICON_OTHER_WINDOWS = 232; // v0.8.0.4+
- SKINICON_OTHER_ACCMGR = 233; // v0.8.0.4+
- SKINICON_OTHER_MAINMENU = 234; // v0.8.0.12+
- SKINICON_OTHER_STATUS = 235; // v0.8.0.12+
- SKINICON_CHAT_JOIN = 236; // v0.8.0.27+
- SKINICON_CHAT_LEAVE = 237; // v0.8.0.27+
- SKINICON_OTHER_STATUS_LOCKED = 238; // v0.8.0.28+
- SKINICON_OTHER_GROUP = 239; // v0.8.0.29+
- SKINICON_OTHER_ON = 240; // v0.9.0.9+
- SKINICON_OTHER_OFF = 241; // v0.9.0.9+
-{
- SKINICON_EVENT_MESSAGE_BIG = 300;
- SKINICON_EVENT_URL_BIG = 301;
- SKINICON_EVENT_FILE_BIG = 302;
- SKINICON_OTHER_MIRANDA_BIG = 303;
- SKINICON_OTHER_ADDCONTACT_BIG = 304;
- SKINICON_OTHER_USERDETAILS_BIG = 305;
- SKINICON_OTHER_HISTORY_BIG = 306;
- SKINICON_OTHER_FINDUSER_BIG = 307;
- SKINICON_OTHER_OPTIONS_BIG = 308;
- SKINICON_OTHER_ACCMGR_BIG = 309;
-}
- // menu icons are owned by the module that uses them so are not and should
- // not be skinnable. Except exit and show/hide
-
- // status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
- SKINICON_STATUS_OFFLINE = 0;
- SKINICON_STATUS_ONLINE = 1;
- SKINICON_STATUS_AWAY = 2;
- SKINICON_STATUS_NA = 3;
- SKINICON_STATUS_OCCUPIED = 4;
- SKINICON_STATUS_DND = 5;
- SKINICON_STATUS_FREE4CHAT = 6;
- SKINICON_STATUS_INVISIBLE = 7;
- SKINICON_STATUS_ONTHEPHONE = 8;
- SKINICON_STATUS_OUTTOLUNCH = 9;
-
-const
- SSDF_UNICODE = $0001;
-type
- PSKINSOUNDDESCEX = ^TSKINSOUNDDESCEX;
- TSKINSOUNDDESCEX = record
- cbSize : int;
- pszName : PAnsiChar; // name to refer to sound when playing and in DB
- pszDescription: TChar; // [TRANSLATED-BY-CORE] description to use for it in options dialog
- pszDefaultFile: TChar; // the default sound file to use, WITHOUT path
- pszSection : TChar; // [TRANSLATED-BY-CORE] section name used to group sounds (NULL is acceptable) (added during 0.3.4+ (2004/10/*))
- dwFlags : dword; // if Miranda ver >=9.0
- end;
-
-const
- SKINSOUNDDESC_SIZE_V1 = 5*SizeOf(dword); // (offsetof(SKINSOUNDDESCEX, pszSection))
- SKINSOUNDDESC_SIZE_V2 = 6*SizeOf(dword); // (offsetof(SKINSOUNDDESCEX, dwFlags)) // MIRANDA_VER >= 0x0900
-
-type
-// Old struct pre 0.3.4
- PSKINSOUNDDESC = ^TSKINSOUNDDESC;
- TSKINSOUNDDESC = record
- cbSize : int;
- pszName : PAnsiChar; // name to refer to sound when playing and in DB
- pszDescription: PAnsiChar; // [TRANSLATED-BY-CORE] description to use for it in options dialog
- pszDefaultFile: PAnsiChar; // the default sound file to use, WITHOUT path
- end;
-
-const
- {
- wParam : ICON_ID or handle
- lParam : 0 if ICON_ID, else 1
- Affect : Load an icon from the user's custom skin lib, or from the exe
- if there isn't one loaded, see notes
- Return : HICON for the new icon, do *not* DestroyIcon() the return value
- returns NULL(0) if ICON_ID is invalid, but always success for a
- valid ID.
- }
- MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
-
- {
- wParam : null terminated string containing the protocol name
- lParam : status_wanted
- Affect : Load an icon representing the status_wanted for a particular protocol, see notes
- Returns: an HICON for the new icon, do NOT DestroyIcon() the return value
- returns NULL(0) on failure.
- Notes : If wParam is NULL(0) the service will load the user's selected
- 'all protocols' status icon
- }
- MS_SKIN_LOADPROTOICON :PAnsiChar = 'Skin/Icons/LoadProto';
- MS_SKIN_LOADPROTOICONBIG:PAnsiChar = 'Skin/Icons/LoadProtoBig';
-
- {
- wParam : 0
- lParam : Pointer to a initialised SKINSOUNDDESC
- Affect : Add a new sound so it has a default and can be changed in the
- options dialog
- Returns: 0 on success, [non zero] on failure
- }
- MS_SKIN_ADDNEWSOUND:PAnsiChar = 'Skin/Sounds/AddNew';
-
- {
- wParam : 0
- lParam : Pointer to a null terminated string containing the name of the
- sound to play
- Affect : play a named sound event, play name should of been added
- with MS_SKIN_ADDNEWSOUND, see notes
- Notes : function will not fail, it will play the Windows
- }
- MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play';
-
- {
- wParam : 0
- lParam : 0
- Affect : Sent when the icons DLL has been changed in the options dialog
- and everyone should remake their image lists.
- }
- ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged';
-
- {
- wParam: 0 when playing sound (1 when sound is being previewed)
- lParam: (AnsiChar*) pszSoundFile
- Affect: This hook is fired when the sound module needs to play a sound
- Note : This event has default processing, if no one HookEvent()'s this
- event then it will use the default hook code, which uses PlaySound()
- Version: 0.3.4a (2004/09/15)
- }
- ME_SKIN_PLAYINGSOUND:PAnsiChar = 'Skin/Sounds/Playing';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_smileyadd.inc b/delphi/Awkward/include/m_smileyadd.inc
deleted file mode 100644
index 6807719..0000000
--- a/delphi/Awkward/include/m_smileyadd.inc
+++ /dev/null
@@ -1,249 +0,0 @@
-{
- Miranda SmileyAdd Plugin
- Plugin support header file
- Copyright (C) 2004 Rein-Peter de Boer (peacow), and followers
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SMILEYADD}
-{$DEFINE M_SMILEYADD}
-const
- SAFLRE_INSERTEMF = 2; // insert smiley as EMF into RichEdit, otherwise bitmap
- // inserted this flag allows "true" transparency
- SAFLRE_OUTGOING = 4; // Parsing outgoing message
- SAFLRE_NOCUSTOM = 8; // Do not use custom smileys
-
-type
- PSMADD_RICHEDIT3 = ^TSMADD_RICHEDIT3;
- TSMADD_RICHEDIT3 = record
- cbSize :int; // size of the structure
- hwndRichEditControl:HWND; // handle to the rich edit control
- rangeToReplace :PCHARRANGE; // same meaning as for normal Richedit use (NULL = replaceall)
- Protocolname :PAnsiChar; // protocol to use... if you have defined a
- // protocol, u can use your own protocol name. SmileyAdd will
- // automatically select the smileypack that is defined for your protocol.
- // Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- // if you prefer those icons.
- // If not found or NULL, "Standard" will be used
- flags :dword; // Flags (SAFLRE_*) that define the behaivior
- disableRedraw :BOOL; // Parameter have been depricated, have no effect on operation
- hContact :THANDLE; // Contact handle
- end;
-
-{
- Replace smileys in a rich edit control...
- wParam = (WPARAM) 0; not used
- lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
- return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-}
-const
- MS_SMILEYADD_REPLACESMILEYS:PAnsiChar = 'SmileyAdd/ReplaceSmileys';
-
-type
- PSMADD_SHOWSEL3 = ^TSMADD_SHOWSEL3;
- TSMADD_SHOWSEL3 = record
- cbSize : int; // size of the structure
- Protocolname : PAnsiChar; // protocol to use... if you have defined a protocol,
- // you can use your own protocol name. Smiley add will automatically
- // select the smileypack that is defined for your protocol.
- // Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- // if you prefer those icons.
- // If not found or NULL: "Standard" will be used
- xPosition : int; // Postition to place the selectwindow
- yPosition : int;
- Direction : int; // Direction (i.e. size upwards/downwards/etc) of
- // the window 0, 1, 2, 3
- hwndTarget : HWND; // Window, where to send the message when smiley
- // is selected.
- targetMessage: DWORD; // Target message, to be sent.
- targetWParam : LPARAM; // Target WParam to be sent (LParam will be PAnsiChar to
- // select smiley) see the example file.
- hwndParent : HWND; // Parent window for smiley dialog
- hContact : THANDLE; // Contact handle
- end;
-
-{
- Show smiley selection window
- wParam = (WPARAM) 0; not used
- lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
- return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-}
-const
- MS_SMILEYADD_SHOWSELECTION:PAnsiChar = 'SmileyAdd/ShowSmileySelection';
-
-{
- get smiley button icon
- wParam = (WPARAM) 0; not used
- lParam = (LPARAM) (SMADD_INFO*) &smgi; //pointer to SMADD_INFO
-}
-type
- PSMADD_INFO2 = ^TSMADD_INFO2;
- TSMADD_INFO2 = record
- cbSize : int; // size of the structure
- Protocolname : PAnsiChar;
- ButtonIcon : HICON; // RETURN VALUE: this is filled with the
- // icon handle of the smiley that can be used on the button
- // do not destroy! NULL if the buttonicon is not defined...
- NumberOfVisibleSmileys: int; // Number of visible smileys defined.
- NumberOfSmileys : int; // Number of total smileys defined
- hContact : THANDLE; //Contact handle
- end;
-
-const
- MS_SMILEYADD_GETINFO2:PAnsiChar = 'SmileyAdd/GetInfo2';
-
-// Event notifies that options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
- ME_SMILEYADD_OPTIONSCHANGED:PAnsiChar = 'SmileyAdd/OptionsChanged';
-
- SAFL_PATH = 1; // provide smiley file path, icon otherwise
- SAFL_UNICODE = 2; // string fields in OPTIONSDIALOGPAGE are WCHAR*
- SAFL_OUTGOING = 4; // Parsing outgoing message
- SAFL_NOCUSTOM = 8; // Do not use custom smileys
-
-type
- PSMADD_BATCHPARSE2 = ^TSMADD_BATCHPARSE2;
- TSMADD_BATCHPARSE2 = record
- cbSize :int; // size of the structure
- Protocolname:PAnsiChar; // protocol to use... if you have defined a protocol, u can
- // use your own protocol name. Smiley add wil automatically
- // select the smileypack that is defined for your protocol.
- // Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- // if you prefer those icons.
- // If not found or NULL: "Standard" will be used
- str :TChar; // String to parse
- flag :dword; // One of the SAFL_ flags specifies parsing requirements
- // This parameter should be filled by the user
- numSmileys :dword; // Number of Smileys found, this parameter filled by SmileyAdd
- oflag :dword; // One of the SAFL_ flags specifies content of the parse results
- // this parameter filled by SmileyAdd
- hContact :THANDLE; // Contact handle
- end;
-
-type
- PSMADD_BATCHPARSERES = ^TSMADD_BATCHPARSERES;
- TSMADD_BATCHPARSERES = record
- startChar:dword; // Starting smiley character
- // Because of iterative nature of the API caller should
- // set this parameter to correct value
- size :dword; // Number of characters in smiley (0 if not found)
- // Because of iterative nature of the API caller should
- // set this parameter to correct value
- case boolean of
- false: (filepath:TChar);
- true: (hIcon:HICON); // User responsible for destroying icon handle
- end;
-const
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
- MS_SMILEYADD_BATCHPARSE:PAnsiChar = 'SmileyAdd/BatchParse';
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
- MS_SMILEYADD_BATCHFREE:PAnsiChar = 'SmileyAdd/BatchFree';
-
-type
- PSMADD_REGCAT = ^TSMADD_REGCAT;
- TSMADD_REGCAT = record
- cbSize :int; // size of the structure
- name :PAnsiChar; // smiley category name for reference
- dispname:PAnsiChar; // smiley category name for display
- end;
-
-const
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; //pointer to SMADD_REGCAT
- MS_SMILEYADD_REGISTERCATEGORY:PAnsiChar = 'SmileyAdd/RegisterCategory';
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
- MS_SMILEYADD_RELOAD:PAnsiChar = 'SmileyAdd/Reload';
-
-{
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-}
-
-const
-// Type of Event one of
- FVCN_PREFIRE = 1;
- FVCN_POSTFIRE = 2;
-
-// Action of event are going to be done
- FVCA_NONE = 0;
- FVCA_DRAW = 1; // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
- FVCA_CUSTOMDRAW = 2;
-// FVCA_INVALIDATE = 3; // (not supported)
-// FVCA_SENDVIEWCHANGE = 4; // (not supported)
- FVCA_SKIPDRAW = 5;
-
-// Extended NMHDR structure for WM_NOTIFY
-type
- FVCNDATA_NMHDR = packed record
- //NMHDR structure
- hwndFrom :HWND; // Window of smiley host
- idFrom :UINT; // ignored
- code :UINT; // NM_FIREVIEWCHANGE
-
- cbSize :size_t;
- bEvent :Byte; // FVCN_ value - pre- or post- painting
- bAction :Byte; // FVCA_ keys
- hDC :HDC; // Canvas to draw on
- rcRect :TRECT; // Valid/should be in case of FVCA_DRAW
- clrBackground:COLORREF; // color to fill background if fTransparent is not set
- fTransparent :BOOL; // if need to fill back color (not supported)
- lParam :LPARAM; // used by host window PreFire and PostFire event
- end;
-
-const
-// Code of WM_NOTIFY message (code)
- NM_FIREVIEWCHANGE = NM_FIRST+1;
-
-type
- SMADD_CONT = record
- hContact:THANDLE;
- _type :int; // 0 - directory, 1 - file;
- path :TChar; // smiley category name for reference
- end;
-const
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
- MS_SMILEYADD_LOADCONTACTSMILEYS:PAnsiChar = 'SmileyAdd/LoadContactSmileys';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/m_ssl.inc b/delphi/Awkward/include/m_ssl.inc
deleted file mode 100644
index 6589989..0000000
--- a/delphi/Awkward/include/m_ssl.inc
+++ /dev/null
@@ -1,54 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SSL}
-{$DEFINE M_SSL}
-
-type
- HSSL = THANDLE;
-
-type
- SSL_API = record
- cbSize:int;
- connect : function(s:dword{TSOCKET}; const host:PAnsiChar; verify:int):HSSL; cdecl;
- pending : function(ssl:HSSL):BOOL; cdecl;
- read : function(ssl:HSSL; buf:pAnsiChar; num:int; peek:int):int; cdecl;
- write : function(ssl:HSSL; const buf:pAnsiChar; num:int):int; cdecl;
- shutdown : procedure(ssl:HSSL); cdecl;
- sfree : procedure(ssl:HSSL); cdecl;
- end;
-
-// every protocol should declare this variable to use the SSL API
-// extern SSL_API si;
-
-{
-a service to obtain the SSL API
-
-wParam = 0;
-lParam = (LPARAM)(SSL_API*).
-
-returns TRUE if all is Ok, and FALSE otherwise
-}
-const
- MS_SYSTEM_GET_SI:PAnsiChar = 'Miranda/System/GetSslApi';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_system.inc b/delphi/Awkward/include/m_system.inc
deleted file mode 100644
index 6532101..0000000
--- a/delphi/Awkward/include/m_system.inc
+++ /dev/null
@@ -1,515 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$IFNDEF M_SYSTEM}
-{$DEFINE M_SYSTEM}
-
-{$IFNDEF MIRANDANAME}
-{$DEFINE MIRANDANAME}
-const
- MIRANDANAME = 'Miranda IM';
-{$ENDIF}
-{$IFNDEF MIRANDACLASS}
-{$DEFINE MIRANDACLASS}
-const
- MIRANDACLASS = 'Miranda';
-{$ENDIF}
-
-// set the default compatibility lever for Miranda 0.4.x
-{$IFNDEF MIRANDA_VER}
-{$DEFINE MIRANDA_VER}
-const
- MIRANDA_VER = $0400;
-{$ENDIF}
-
- { miranda/system/modulesloaded
- called after all modules have been successfully initialised
- wParam=lParam=0
- used to resolve double-dependencies in the module load order
- }
-const
- ME_SYSTEM_MODULESLOADED:PAnsiChar = 'Miranda/System/ModulesLoaded';
-
- { miranda/system/shutdown event
- called just before the application terminates
- the database is still guaranteed to be running during this hook.
- wParam=lParam=0
- }
- ME_SYSTEM_SHUTDOWN:PAnsiChar = 'Miranda/System/Shutdown';
-
- { restarts miranda ( 0.8+ )
- wParam=lParam=0
- }
- MS_SYSTEM_RESTART:PAnsiChar = 'Miranda/System/Restart';
-
- { miranda/system/oktoexit event
- called before the app goes into shutdown routine to make sure everyone is
- happy to exit
- wParam=lParam=0
- return nonzero to stop the exit cycle
- }
- ME_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExitEvent';
-
- { miranda/system/oktoexit service
- Check if everyone is happy to exit
- wParam=lParam=0
- if everyone acknowleges OK to exit then returns true, otherwise false
- }
- MS_SYSTEM_OKTOEXIT:PAnsiChar = 'Miranda/System/OkToExit';
-
- { gets the version number of Miranda encoded as a DWORD v0.1.0.1+
- wParam=lParam=0
- returns the version number, encoded as one version per byte, therefore
- version 1.2.3.10 is 0x0102030a
- }
- MS_SYSTEM_GETVERSION:PAnsiChar = 'Miranda/System/GetVersion';
-
- { gets the version of Miranda encoded as text v0.1.0.1+
- wParam=cch
- lParam=(LPARAM)(AnsiChar*)pszVersion
- cch is the size of the buffer pointed to by pszVersion, in bytes
- may return a build qualifier, such as "0.1.0.1 alpha"
- returns 0 on success, nonzero on failure
- }
- MS_SYSTEM_GETVERSIONTEXT:PAnsiChar = 'Miranda/System/GetVersionText';
-
- { Adds a HANDLE to the list to be checked in the main message loop v0.1.2.0+
- wParam=(WPARAM)(HANDLE)hObject
- lParam=(LPARAM)(const AnsiChar*)pszService
- returns 0 on success or nonzero on failure
- Causes pszService to be CallService()d (wParam=hObject,lParam=0) from the
- main thread whenever hObject is signalled.
- The Miranda message loop has a MsgWaitForMultipleObjects() call in it to
- implement this feature. See the documentation for that function for
- information on what objects are supported.
- There is a limit of MAXIMUM_WAIT_OBJECTS minus one (MWO is defined in winnt.h
- to be 64) on the number of handles MSFMO() can process. This service will
- return nonzero if that many handles are already being waited on.
- As of writing, the following parts of Miranda are thread-safe, so can be
- called from any thread:
- All of modules.h except NotifyEventHooks()
- Read-only parts of m_database.h (since the write parts will call hooks)
- All of m_langpack.h
- for all other routines your mileage may vary, but I would strongly recommend
- that you call them from the main thread, or ask about it on plugin-dev if you
- think it really ought to work.
- Update during 0.1.2.0 development, 16/10/01:
- NotifyEventHooks() now translates all calls into the context of the main
- thread, which means that all of m_database.h is now completely safe.
- Update during 0.1.2.2 development, 17/4/02:
- The main thread's message loop now also deals with asynchronous procedure
- calls. Loop up QueueUserAPC() for a neater way to accomplish a lot of the
- things that used to require ms_system_waitonhandle.
- Miranda is compiled with the multithreaded runtime - don't forget to do the
- same with your plugin.
- }
- MS_SYSTEM_WAITONHANDLE:PAnsiChar = 'Miranda/System/WaitOnHandle';
-
- {Removes a HANDLE from the wait list v0.1.2.0+ }
- {wParam=(WPARAM)(HANDLE)hObject }
- {lParam=0 }
- {returns 0 on success or nonzero on failure. }
- MS_SYSTEM_REMOVEWAIT:PAnsiChar = 'Miranda/System/RemoveWait';
-
- { Returns Miranda's RTL/CRT function poiners to malloc() free() realloc() -- 0.1.2.2+
- This is useful for preallocation of memory for use with Miranda's services
- that Miranda can free -- or reallocation of a block of memory passed with a
- service. Do not use with memory unless it is explicitly expected the memory
- can or shall be used in this way. the passed structure is expected to have
- it's .cbSize initialised
- wParam=0, lParam = (LPARAM) &MM_INTERFACE
- }
-
-type
- PMM_INTERFACE = ^TMM_INTERFACE;
- TMM_INTERFACE = record
- cbSize :integer;
- malloc :function (para1:integer):pointer;cdecl;
- realloc:function (para1:pointer; para2:integer):pointer;cdecl;
- free :procedure (para1:pointer);cdecl;
-// if MIRANDA_VER >= 0x0600
- calloc :function (para1:integer):pointer;cdecl;
- strdup :function (const src:PAnsiChar):PAnsiChar;cdecl;
- wstrdup:function (const src:PWideChar):PWideChar;cdecl;
-// if MIRANDA_VER >= 0x0700
- mir_snprintf :function(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar{, ...}):int; cdecl;
- mir_sntprintf :function(buffer:TChar;count:size_t;fmt:TChar{, ...}):int; cdecl;
- mir_vsnprintf :function(buffer:PAnsiChar;count:size_t;fmt:PAnsiChar;va:va_list):int; cdecl;
- mir_vsntprintf:function(buffer:TChar;count:size_t;fmt:TChar;va:va_list):int; cdecl;
-
- mir_a2u_cp:function(src:PAnsiChar;codepage:int):pWideChar; cdecl;
- mir_a2u :function(src:PAnsiChar):pWideChar; cdecl;
- mir_u2a_cp:function(src:pWideChar;codepage:int):PAnsiChar; cdecl;
- mir_u2a :function(src:pWideChar):PAnsiChar; cdecl;
- end;
-
-const
- MS_SYSTEM_GET_MMI:PAnsiChar = 'Miranda/System/GetMMI';
-
- { Returns the pointer to the simple lists manager.
- If the sortFunc member of the list gets assigned, the list becomes sorted
- wParam=0, lParam = (LPARAM)LIST_INTERFACE*
- }
- LIST_INTERFACE_V1_SIZE = sizeof(size_t)+ 7*sizeof(pointer);
- LIST_INTERFACE_V2_SIZE = sizeof(size_t)+ 9*sizeof(pointer);
- LIST_INTERFACE_V3_SIZE = sizeof(size_t)+11*sizeof(pointer);
-
-type
- TFSortFunc = function (para1:pointer; para2:pointer):longint;cdecl;
-
- PSortedList = ^TSortedList;
- TSortedList = record
- items : ^pointer;
- realCount: int;
- limit : int;
- increment: int;
- sortFunc : TFSortFunc;
- end;
- PLIST_INTERFACE = ^TLIST_INTERFACE;
- TLIST_INTERFACE = record
- cbSize :int;
- List_Create :function (para1:longint; para2:longint):PSortedList;cdecl;
- List_Destroy :procedure(para1:PSortedList);cdecl;
- List_Find :function (para1:PSortedList; para2:pointer):pointer;cdecl;
- List_GetIndex :function (para1:PSortedList; para2:pointer; para3:Plongint):longint;cdecl;
- List_Insert :function (para1:PSortedList; para2:pointer; para3:longint):longint;cdecl;
- List_Remove :function (para1:PSortedList; para2:longint):longint;cdecl;
- List_IndexOf :function (para1:PSortedList; para2:pointer):longint;cdecl;
-// if MIRANDA_VER >= 0x0600
- List_InsertPtr:function (list:PSortedList; p:pointer):int;cdecl;
- List_RemovePtr:function (list:PSortedList; p:pointer):int;cdecl;
-// if MIRANDA_VER >= 0x0800
- List_Copy :procedure (src:PSortedList; dst:PSortedList; size:size_t); cdecl;
- List_ObjCopy :procedure (src:PSortedList; dst:PSortedList; size:size_t); cdecl;
-
- end;
-
-const
- MS_SYSTEM_GET_LI:PAnsiChar = 'Miranda/System/GetLI';
-
-{
- UTF8 Manager interface. 0.5.2+
-
- Contains functions for utf8-strings encoding & decoding
-}
-
-const
- UTF8_INTERFACE_SIZEOF_V1 = (sizeof(size_t)+5*sizeof(dword));// 24;
- UTF8_INTERFACE_SIZEOF_V2 = (sizeof(size_t)+6*sizeof(dword));
-type
- pPWideChar = ^PWideChar;
- UTF8_INTERFACE = record
- cbSize:int;
-
- // decodes utf8 and places the result back into the same buffer.
- // if the second parameter is present, the additional wchar_t* string gets allocated,
- // and filled with the decoded utf8 content without any information loss.
- // this string should be freed using mir_free()
- utf8_decode :function (str:PAnsiChar; var ucs2:pPWideChar):PAnsiChar;cdecl;
- utf8_decodecp:function (str:PAnsiChar; codepage:int; var ucs2:pPWideChar):PAnsiChar;cdecl;
-
- // encodes an ANSI string into a utf8 format using the current langpack code page,
- // or CP_ACP, if lanpack is missing
- // the resulting string should be freed using mir_free
- utf8_encode :function(src:PAnsiChar):PAnsiChar;cdecl;
- utf8_encodecp:function(src:PAnsiChar;codepage:int):PAnsiChar;cdecl;
-
- // encodes an WCHAR string into a utf8 format
- // the resulting string should be freed using mir_free
- utf8_encodeW :function(src:PWideChar):PAnsiChar;cdecl;
-
- // decodes utf8 and returns the result as wchar_t* that should be freed using
- // mir_free() the input buffer remains unchanged
- utf8_decodeW :function(str:PAnsiChar):pWideChar;cdecl;
- // returns the predicted length of the utf-8 string
-
-// MIRANDA_VER >= 0x0900
- utf8_lenW :function(const src:pWideChar):int; cdecl;
- end;
-
-const
- MS_SYSTEM_GET_UTFI:PAnsiChar = 'Miranda/System/GetUTFI';
-
-(*
- -- Thread Safety --
-
- Proper thread safe shutdown was implemented in 0.3.0.0 (2003/04/18)
- and not before, therefore it is improper that any MT plugins be used
- with earlier versions of Miranda (as hav0c will result)
-
- Note: This does not apply to MT plugins which included their own
- thread-safe shutdown routines.
-
- Shutdown thread safety works thusly:
-
- All new threads must call MS_SYSTEM_THREAD_PUSH and MS_SYSTEM_THREAD_POP
- when they return.
-
- Due to the nature of thread creation, it is illegal to assume
- just a call pair of MS_SYSTEM_THREAD_PUSH inside the thread will
- be enough -- the source thread may only return when the new child
- thread has actually executed MS_SYSTEM_THREAD_PUSH
-
- This is because a thread maybe in an undefined state at the point
- when the thread creation routine returns, thus Miranda may exit
- thinking it is safe to do so, because MS_SYSTEM_THREAD_PUSH was not
- called in time.
-
- See miranda.c for how this can be done using an event object
- which is signalled just after the MS_SYSTEM_THREAD_PUSH call is executed
- and so the source thread knows that the created thread is known to Miranda.
-
- -- What happens when Miranda exits --
-
- Miranda will firstly set an event object to signalled, this will
- make MS_SYSTEM_TERMINATED return TRUE, it will then fire ME_SYSTEM_PRESHUTDOWN
- at this point, no plugins or modules are unloaded.
-
- Miranda will then enumerate all active threads and queue an APC call
- to each thread, so any thread in an alertable state will become active,
- this functionailty may not be required by your threads: but if you use
- the Winsock2 event object system or Sleep() please use the alertable
- wait functions, so that the thread will 'wake up' when Miranda queues
- a message to it, SleepEx() will return WAIT_IO_COMPLETION if this happens.
-
- After all threads have been signalled, Miranda will spin on the unwind thread stack waiting
- for it to become empty, in this time, it will carry on processing thread
- switches, clearing it's own APC calls (used by NotifyEventHooks(), CallServiceSync())
-
- So a thread should be written in this kind of form:
-
- void mythread(void arg)
- {
- // assume all thread pushing/popping is done by forkthread()
- int run=1;
- for (;run;)
- {
- Beep(4391,500);
- SleepEx(1500,TRUE);
- if (Miranda_Terminated()) {
- Beep(5000,150); run=0;
- } //if
- } //for
- }
-
- The above will make a nice Beep every 1.5 seconds and when the UI
- quits, it will make a lower beep and then return.
-
- As many copies of this thread maybe running, the creator does not need
- to worry about what to do with previous threads, as long as they're on the
- unwind stack.If there are any global resources (and they're mutex) you can free() them
- at Unload(), which will only be called, after all threads have returned.
-
- -- Summary --
-
- MS_SYSTEM_TERMINATED (will start returning TRUE)
- ME_SYSTEM_PRESHUTDOWN will be fired (The CList won't be visible at this point)
-
- All PROTOTYPE_PROTOCOL registered plugins will be sent ID_STATUS_OFFLINE
- automatically.
-
- All the threads will be notified via QueueUserAPC() and then Miranda
- will poll on the unwind thread queue until it is empty.
-
- ME_SYSTEM_SHUTDOWN will be fired, the database will be unloaded, the core
- will be unloaded -- Miranda will return.
-*)
-
-{ 0.5.2+
-wParam=function address
-lParam=function parameter
-
-registers a thread in the core and forks it
-}
-
-type
- pThreadFunc = function(p:pointer):integer; cdecl;
-
-const
- MS_SYSTEM_FORK_THREAD:PAnsiChar = 'Miranda/Thread/Fork';
-
-{ 0.5.2+
-wParam=void* - thread owner object
-lParam=FORK_THREADEX_PARAMS*
-
-registers a thread in the core and forks it
-passes the extended parameters info and returns the thread id
-}
-
-type
- pThreadFuncEx = function(p:pointer):integer; stdcall;
- pThreadFuncOwner = function(owner, param:pointer):integer; cdecl;
-
-type
- FORK_THREADEX_PARAMS = record
- pFunc :pThreadFuncEx;
- iStackSize:int;
- arg :pointer;
- threadID :^dword;
- end;
-
-const
- MS_SYSTEM_FORK_THREAD_EX:PAnsiChar = 'Miranda/Thread/ForkEx';
-(*
-static __inline int mir_forkthreadex( pThreadFuncEx aFunc, void* arg, int stackSize, unsigned* pThreadID )
-{
- FORK_THREADEX_PARAMS params;
- params.pFunc = aFunc;
- params.arg = arg;
- params.iStackSize = stackSize;
- params.threadID = pThreadID;
- return CallService( MS_SYSTEM_FORK_THREAD_EX, 0, (LPARAM)&params );
-}
-*)
-
-{ 0.8.0+
- wParam=(void*)owner
- lParam=FORK_THREADEX_PARAMS*
-
- registers a thread, owned by some object, in the core and forks it
- passes the owner info and extended parameters info and returns the thread id
-}
-
-// MS_SYSTEM_FORK_OWNED_THREAD:PAnsiChar = 'Miranda/Thread/ForkOwned';
-
-(*
-static __inline int mir_forkthreadowner( pThreadFuncOwner aFunc, void* owner, void* arg, unsigned* pThreadID )
-{
- FORK_THREADEX_PARAMS params;
- params.pFunc = ( pThreadFuncEx )aFunc;
- params.arg = arg;
- params.iStackSize = 0;
- params.threadID = pThreadID;
- return CallService( MS_SYSTEM_FORK_THREAD_EX, (WPARAM)owner, (LPARAM)&params );
-}
-*)
- {
- wParam=0
- lParam=0
-
- Add a thread to the unwind wait stack that Miranda will poll on
- when it is tearing down modules.
-
- This must be called in the context of the thread that is to be pushed
- i.e. there are no args, it works out what thread is being called
- and gets itself a handle to the calling thread.
- }
- MS_SYSTEM_THREAD_PUSH:PAnsiChar = 'Miranda/Thread/Push';
-
- {
- wParam=0
- lParam=0
-
- Remove a thread from the unwind wait stack -- it is expected
- that the call be made in the context of the thread to be removed.
-
- Miranda will begin to tear down modules and plugins if/when the
- last thread from the unwind stack is removed.
- }
- MS_SYSTEM_THREAD_POP:PAnsiChar = 'Miranda/Thread/Pop';
- {
- wParam=0
- lParam=0
-
- This hook is fired just before the thread unwind stack is used,
- it allows MT plugins to shutdown threads if they have any special
- processing to do, etc.
- }
- ME_SYSTEM_PRESHUTDOWN:PAnsiChar = 'Miranda/System/PShutdown';
-
- {
- wParam=0
- lParam=0
-
- Returns TRUE when Miranda has got WM_QUIT and is in the process
- of shutting down
- }
- MS_SYSTEM_TERMINATED:PAnsiChar = 'Miranda/SysTerm';
-
- {
- wParam : 0
- lParam : (address) void (__cdecl callback) (void)
- Affect : Setup a function pointer to be called after main loop iterations, it allows for
- idle processing, See notes
- Returns: 1 on success, 0 on failure
-
- Notes : This service will only allow one function to be registered, if one is registered, 0 will be returned
- Remember that this uses __cdecl.
- Version: Added during 0.3.4+
- }
- MS_SYSTEM_SETIDLECALLBACK:PAnsiChar = 'Miranda/SetIdleCallback';
-
- {
- wParam : 0
- lParam : &tick
- Affect : return the last window tick where a monitored event was seen, currently WM_CHAR/WM_MOUSEMOVE
- Returns: Always returns 0
- Version: Added during 0.3.4+ (2004/09/12)
- }
- MS_SYSTEM_GETIDLE:PAnsiChar = 'Miranda/GetIdle';
-
- {
- wParam: cchMax (max length of buffer)
- lParam: pointer to buffer to fill
- Affect: Returns the build timestamp of the core, as a string of YYYYMMDDhhmmss, this service might
- not exist and therefore the build is before 2004-09-30
- Returns: zero on success, non zero on failure
- Version: 0.3.4a+ (2004/09/30)
- DEFUNCT: This service was removed on 0.3.4.3+ (2004/11/19) use APILEVEL
- }
- MS_SYSTEM_GETBUILDSTRING:PAnsiChar = 'Miranda/GetBuildString';
-
- {
- Missing service catcher
- Is being called when one calls the non-existent service.
- All parameters are stored in the special structure
-
- The event handler takes 0 as wParam and TMissingServiceParams* as lParam.
-
- 0.4.3+ addition (2006/03/27)
- }
-type
- PTMissingServiceParams = ^TMissingServiceParams;
- TMissingServiceParams = record
- name :PAnsiChar;
- wParam:WPARAM;
- lParam:LPARAM;
- end;
-
-const
- ME_SYSTEM_MISSINGSERVICE:PAnsiChar = 'System/MissingService';
-
-{ Unhandled exceptions filter
-Is being called inside any thread launched via mir_forkthread, including the main thread.
-If a plugin's author executes a large piece of code inside __try/__except, he should
-obtain this filter and call it inside the __except section
-
-0.8.0+ addition (2008/07/20)
-}
-
-type
- PEXCEPTION_POINTERS = ^EXCEPTION_POINTERS;
- pfnExceptionFilter = function(code:dword; info:PEXCEPTION_POINTERS):DWORD; cdecl;
-const
- MS_SYSTEM_GETEXCEPTFILTER:PAnsiChar = 'System/GetExceptFilter';
-
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_tipper.inc b/delphi/Awkward/include/m_tipper.inc
deleted file mode 100644
index d9fea82..0000000
--- a/delphi/Awkward/include/m_tipper.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- Tipper API
- note: Tipper is internally unicode and requires unicows.dll to function
- correctly on 95/98/ME so you'll find a lot of wchar_t stuff in here
-
- translation function type
- use hContact, module and setting to read your db value(s) and put the resulting
- string into buff return buff if the translation was successful, or return 0 for failure
-}
-{$IFNDEF M_TIPPER}
-{$DEFINE M_TIPPER}
-type
- TranslateFunc = function (hContact:THANDLE;module:PAnsiChar;setting_or_prefix:PAnsiChar;
- buff:pWideChar;bufflen:int):pWideChar; cdecl;
-
-type
- PDBVTranslation = ^TDBVTranslation;
- TDBVTranslation = record
- tfunc:TranslateFunc; // address of your translation function (see typedef above)
- name :pWideChar; // make sure this is unique, and DO NOT translate it
- id :dword; // will be overwritten by Tipper - do not use
- end;
-
-{
- add a translation to tipper
- wParam not used
- lParam = pointer to PDBVTranslation
-}
-const
- MS_TIPPER_ADDTRANSLATION:PAnsiChar = 'Tipper/AddTranslation';
-
-{
- Show tooltip
- wParam - optional (PAnsiChar) text for text-only tips
- lParam - (PCLCINFOTIP) infoTip
-}
- MS_TIPPER_SHOWTIP:PAnsiChar = 'mToolTip/ShowTip';
-
-{
- unicode extension to the basic functionality
- wParam - optional (pWideChar) text for text-only tips
- lParam - (PCLCINFOTIP) infoTip
-}
- MS_TIPPER_SHOWTIPW:PAnsiChar = 'mToolTip/ShowTipW';
-
-{
- wParam=lParam=0;
-}
- MS_TIPPER_HIDETIP:PAnsiChar = 'mToolTip/HideTip';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_toolbar.inc b/delphi/Awkward/include/m_toolbar.inc
deleted file mode 100644
index 75d291b..0000000
--- a/delphi/Awkward/include/m_toolbar.inc
+++ /dev/null
@@ -1,96 +0,0 @@
-{$IFNDEF M_TOOLBAR}
-{$DEFINE M_TOOLBAR}
-
-// Modern contact list toolbar
-
-const
- TOOLBARBUTTON_ICONIDPREFIX = 'MTB_';
- TOOLBARBUTTON_ICONIDPRIMARYSUFFIX = '_Primary';
- TOOLBARBUTTON_ICONIDSECONDARYSUFFIX = '_Secondary';
- TOOLBARBUTTON_ICONNAMEPRESSEDSUFFIX = 'Pressed';
-
-//button flags
- TBBF_DISABLED = 1 shl 0;
- TBBF_VISIBLE = 1 shl 1;
- TBBF_PUSHED = 1 shl 2;
- TBBF_SHOWTOOLTIP = 1 shl 3;
- TBBF_ISSEPARATOR = 1 shl 5;
- TBBF_ISLBUTTON = 1 shl 6;
- TBBF_FLEXSIZESEPARATOR = TBBF_ISSEPARATOR or TBBF_PUSHED;
-
-type
- _tagTBButton = record
- cbSize :int; // size of structure
- pszButtonID :pAnsiChar; // char id of button used to store button info in DB and know about icon
- pszButtonName :pAnsiChar; // name of button (not translated)
- pszServiceName :pAnsiChar; // service name to be executed
- lParam :LPARAM; // param of service to be called
- pszTooltipUp :pAnsiChar;
- pszTooltipDn :pAnsiChar;
- defPos :dword; // default order pos of button (less values are nearer to
- // edge)..please use values greater that 100. the default
- // buttons has pos: 10,20..90
- tbbFlags :dword; // combine of TBBF_ flags above
- ParamDestructor :procedure(var param); //will be called on parameters deletion
- hPrimaryIconHandle :THANDLE;
- hSecondaryIconHandle:THANDLE;
- end;
- TBButton = _tagTBButton;
-
-const
-//////////////////////////////////////////////////////////////////////////
-// Events
-// Only after this event module subscribers should register their buttons
-// wparam=lparam=0
-// don't forget to return 0 to continue processing
- ME_TB_MODULELOADED:PAnsiChar = 'ToolBar/ModuleLoaded';
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-// WPARAM = 0
-// LPARAM = (TBButton *) &description
-// LRESULT = (HANDLE) hButton
-// in order to correctly process default icons via iconlib it should be
-// registered icolib icon with id named:
-// 'TBButton_'+pszButtonID+ 'Up' or +'Down' for Push (2-state) buttons
- MS_TB_ADDBUTTON:PAnsiChar = 'ToolBar/AddButton';
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-// WPARAM = (HANDLE) hButton;
-// LPARAM = 0;
- MS_TB_REMOVEBUTTON:PAnsiChar = 'ToolBar/RemoveButton';
-
-//////////////////////////////////////////////////////////////////////////
-// SetState
-// WPARAM = (HANDLE) hButton;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
- TBST_PUSHED = 1;
- TBST_RELEASED = 0;
- MS_TB_SETBUTTONSTATE:PAnsiChar = 'ToolBar/SetButtonState';
-
-//////////////////////////////////////////////////////////////////////////
-// SetStatebyId
-// WPARAM = (char *) szButtonID;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
- MS_TB_SETBUTTONSTATEBYID:PAnsiChar = 'ToolBar/SetButtonStateId';
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (HANLDE) hButton;
-// LPARAM = 0
-// LRESULT= current state
- MS_TB_GETBUTTONSTATE:PAnsiChar = 'ToolBar/GetButtonState';
-
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (char *) szButtonID;
-// LPARAM = 0
-// LRESULT= current state
- MS_TB_GETBUTTONSTATEBYID:PAnsiChar = 'ToolBar/GetButtonStateId';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_toptoolbar.inc b/delphi/Awkward/include/m_toptoolbar.inc
deleted file mode 100644
index f0d59f2..0000000
--- a/delphi/Awkward/include/m_toptoolbar.inc
+++ /dev/null
@@ -1,128 +0,0 @@
-{$IFNDEF M_TOPTOOLBAR}
-{$DEFINE M_TOPTOOLBAR}
-
-//button flags
-const
- TTBBF_DISABLED = 1;
- TTBBF_VISIBLE = 2;
- TTBBF_PUSHED = 4;
- TTBBF_SHOWTOOLTIP = 8;
- TTBBF_DRAWBORDER = 16; // draw border for bitmap,bitmap must be WxH 16x12
- TTBBF_ISSEPARATOR = 32;
-
-//for internal launch buttons
- TTBBF_ISLBUTTON = 64;
-
-type
- PTTBButton = ^TTBButton;
- TTBButton = record
- cbSize :integer;
- hbBitmapUp :HBITMAP;
- hbBitmapDown :HBITMAP;
- pszServiceUp :PAnsiChar;
- pszServiceDown:PAnsiChar;
- dwFlags :DWORD;
- lParamUp :LPARAM;
- wParamUp :WPARAM;
- lParamDown :LPARAM;
- wParamDown :WPARAM;
- name :PAnsiChar;
- end;
-
- PTTBButtonV2 = ^TTBButtonV2;
- TTBButtonV2 = record
- cbSize :integer;
- hbBitmapUp :HBITMAP;
- hbBitmapDown :HBITMAP;
- pszServiceUp :PAnsiChar;
- pszServiceDown:PAnsiChar;
- dwFlags :DWORD;
- lParamUp :LPARAM;
- wParamUp :WPARAM;
- lParamDown :LPARAM;
- wParamDown :WPARAM;
- name :PAnsiChar;
- hIconUp :HICON;
- hIconDn :HICON;
- tooltipUp :PAnsiChar;
- tooltipDn :PAnsiChar;
- end;
-
-const
-
-//=== EVENTS ===
-{
- toptoolbar/moduleloaded event
- wParam = lParam = 0
- Called when the toolbar services are available
-
- !!!Warning you may work with TTB services only in this event or later.
-
- Im use settimer() - so notify appear in miranda message loop
- after all onmodulesload calls.
-}
- ME_TTB_MODULELOADED:PAnsiChar = 'TopToolBar/ModuleLoaded';
-
-{
-//=== SERVICES ===
-
- toptoolbar/addbutton service
- wparam = (TTBButton*)lpTTBButton
- lparam = 0
- returns: hTTBButton - handle of added button on success, -1 on failure.
-}
- MS_TTB_ADDBUTTON:PAnsiChar = 'TopToolBar/AddButton';
-
-{
- toptoolbar/removebutton service
- wparam = (HANDLE)hTTButton
- lparam = 0
- returns: 0 on success, -1 on failure.
-}
- MS_TTB_REMOVEBUTTON:PAnsiChar = 'TopToolBar/RemoveButton';
-
-{
- toptoolbar/setstate service
- wparam = (HANDLE)hTTButton
- lparam = (LPARAM) state
- returns: 0 on success, -1 on failure.
-}
- TTBST_PUSHED = 1;
- TTBST_RELEASED = 2;
-
- MS_TTB_SETBUTTONSTATE:PAnsiChar = 'TopToolBar/SetState';
-
-{
- toptoolbar/getstate service
- wparam = (HANDLE)hTTButton
- lparam = 0
- returns: state on success, -1 on failure.
-}
- MS_TTB_GETBUTTONSTATE:PAnsiChar = 'TopToolBar/GetState';
-
-{
- toptoolbar/getoptions service
- (HIWORD)wparam = (HANDLE)hTTButton
- (LOWORD)wparam = TTBO_FLAG
- lparam = 0,or lparam=lpTTBButton if flag=TTBO_ALLDATA
- returns: value on success, -1 on failure.
-}
- TTBO_FLAGS = 0; // get/set all flags
- TTBO_POS = 1; // position
- TTBO_WIDTH = 2; // not impemented
- TTBO_HEIGHT = 3; // not impemented
- TTBO_TIPNAME = 4; // tool tip name
- TTBO_ALLDATA = 5; // change all data via lparam=lpTTBButton
-
- MS_TTB_GETBUTTONOPTIONS:PAnsiChar = 'TopToolBar/GetOptions';
-
-{
- toptoolbar/setoptions service
- (HIWORD)wparam = (HANDLE)hTTButton
- (LOWORD)wparam = TTBO_FLAG
- lparam = value
- returns: 1 on success, -1 on failure.
-}
- MS_TTB_SETBUTTONOPTIONS:PAnsiChar = 'TopToolBar/SetOptions';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_updater.inc b/delphi/Awkward/include/m_updater.inc
deleted file mode 100644
index 0682c04..0000000
--- a/delphi/Awkward/include/m_updater.inc
+++ /dev/null
@@ -1,122 +0,0 @@
-{$IFNDEF M_UPDATER}
-{$DEFINE M_UPDATER}
-
-{
- if you set Update::szUpdateURL to the following value when registering, as
- well as setting your beta site and version data, updater will ignore
- szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's
- from the backend XML data. for this to work, the plugin name in
- pluginInfo.shortName must match the file listing exactly (except for case)
-}
-const
- UPDATER_AUTOREGISTER = 'UpdaterAUTOREGISTER';
-
-type
- PUpdate_tag = ^TUpdate_tag;
- TUpdate_tag = record
- cbSize : int;
- szComponentName : PAnsiChar; // component name as it will appear in the UI
- // (will be translated before displaying)
- szVersionURL : PAnsiChar; // URL where the current version can be found (NULL to disable)
-
- pbVersionPrefix : PAnsiChar; // bytes occuring in VersionURL before the version,
- // used to locate the version information within
- // the URL data (not that this URL could point at
- // a binary file - dunno why, but it could :)
- cpbVersionPrefix: int; // number of bytes pionted to by pbVersionPrefix
- szUpdateURL : PAnsiChar; // URL where dll/zip is located
- szBetaVersionURL: PAnsiChar; // URL where the beta version can be found (NULL to disable betas)
-
- pbBetaVersionPrefix:PAnsiChar; // bytes occuring in VersionURL before the
- // version, used to locate the version
- // information within the URL data
- cpbBetaVersionPrefix:int; // number of bytes pointed to by pbVersionPrefix
- szBetaUpdateURL : PAnsiChar; // URL where dll/zip is located
- pbVersion : PAnsiChar; // bytes of current version, used for comparison
- // with those in VersionURL
- cpbVersion : int; // number of bytes pionted to by pbVersion
- szBetaChangelogURL:PAnsiChar; // url for displaying changelog for beta versions
- end;
- TUpdate = TUpdate_tag;
- PUpdate = ^TUpdate;
-
-const
- OLD_UPDATER_SIZE = SizeOf(TUpdate)-SizeOf(PAnsiChar);
-
-const
- {
- register a comonent with the updater
- wparam = 0
- lparam = (LPARAM)&Update
- }
- MS_UPDATE_REGISTER:PAnsiChar = 'Update/Register';
-
- {
- register the 'easy' way - use this method if you have no beta URL and the
- plugin is on the miranda file listing
- NOTE: the plugin 'short name' in pluginInfo must match the name of the
- plugin on the file listing, exactly (including case) AND the plugin version
- string on the file listing must be the string version of the version in
- pluginInfo (i.e. 0.0.0.1, so no letters, brackets, etc.)
-
- wParam = (int)fileID - this is the file ID from the file listing
- (i.e. the number at the end of the download link)
- lParam = (PLUGININFO*)&pluginInfo
- }
- MS_UPDATE_REGISTERFL:PAnsiChar = 'Update/RegisterFL';
-
- {
- this function can be used to 'unregister' components - useful for plugins
- that register non-plugin/langpack components and may need to change those
- components on the fly
- lParam = (AnsiChar *)szComponentName
- }
- MS_UPDATE_UNREGISTER:PAnsiChar = 'Update/Unregister';
-
- {
- this event is fired when the startup process is complete, but NOT if a
- restart is imminent it is designed for status managment plugins to use as a
- trigger for beggining their own startup process
- wParam = lParam = 0 (unused)
- (added in version 0.1.6.0)
- }
- ME_UPDATE_STARTUPDONE:PAnsiChar = 'Update/StartupDone';
-
- {
- this service can be used to enable/disable Updater's global status control
- it can be called from the StartupDone event handler
- wParam = (BOOL)enable
- lParam = 0
- (added in version 0.1.6.0)
- }
- MS_UPDATE_ENABLESTATUSCONTROL:PAnsiChar = 'Update/EnableStatusControl';
-
- {
- An description of usage of the above service and event:
- Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
- In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
- say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
- If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
- also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
- this service can be used to determine whether updates are possible for a component with the given name
- wParam = 0
- lParam = (AnsiChar *)szComponentName
- returns TRUE if updates are supported, FALSE otherwise
- }
- MS_UPDATE_ISUPDATESUPPORTED:PAnsiChar = 'Update/IsUpdateSupported';
-
-{
- An description of usage of the above service and event:
- Say you are a status control plugin that normally sets protocol or global
- statuses in your ModulesLoaded event handler.
- In order to make yourself 'updater compatible', you would move the status
- control code from ModulesLoaded to another function, say DoStartup. Then, in
- ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL
- service. If it does not exist, call DoStartup. If it does exist, hook the
- ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may also wish
- to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to
- disable Updater's own status control feature.
-}
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_url.inc b/delphi/Awkward/include/m_url.inc
deleted file mode 100644
index a1a4345..0000000
--- a/delphi/Awkward/include/m_url.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_URL}
-{$DEFINE M_URL}
-
-const
- {
- wParam : HCONTACT
- lParam : 0
- Affects: bring up the send URL dialogbox for a user
- Returns: 0 on success, nonzero on failure, see notes
- Notes : service returns before the URL is sent.
- }
- MS_URL_SENDURL:PAnsiChar = 'SRUrl/SendCommand';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_userinfo.inc b/delphi/Awkward/include/m_userinfo.inc
deleted file mode 100644
index d92f16f..0000000
--- a/delphi/Awkward/include/m_userinfo.inc
+++ /dev/null
@@ -1,78 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_USERINFO}
-{$DEFINE M_USERINFO}
-
-{$include m_options.inc}
-
-const
-{
- show the User Details dialog box
- wParam=(WPARAM)(HANDLE)hContact
- lParam=0
-}
- MS_USERINFO_SHOWDIALOG:PAnsiChar = 'UserInfo/ShowDialog';
-
-{ UserInfo/Initialise v0.1.2.0+
- The user opened a details dialog. Modules should do whatever initialisation
- they need and call userinfo/addpage one or more times if they want pages
- displayed in the options dialog
- wParam=addInfo
- lParam=(LPARAM)hContact
- addInfo should be passed straight to the wParam of userinfo/addpage
- NB: The built-in userinfo module is loaded after all plugins, so calling
- HookEvent() in your plugin's Load() function will fail if you specify this
- hook. Look up core/m_system.h:me_system_modulesloaded.
-}
- ME_USERINFO_INITIALISE:PAnsiChar = 'UserInfo/Initialise';
-
-{ UserInfo/AddPage v0.1.2.0+
- Must only be called during an userinfo/initialise hook
- Adds a page to the details dialog
- wParam=addInfo
- lParam=(LPARAM)(OPTIONSDIALOGPAGE*)odp
- addInfo must have come straight from the wParam of userinfo/initialise
- Pages in the details dialog operate just like pages in property sheets. See the
- Microsoft documentation for info on how they operate.
- When the pages receive WM_INITDIALOG, lParam=(LPARAM)hContact
- Strings in the structure can be released as soon as the service returns, but
- icons must be kept around. This is not a problem if you're loading them from a
- resource
- The 3 'group' elements in the structure are ignored, and will always be ignored
- Unlike the options dialog, the details dialog does not resize to fit its
- largest page. Details dialog pages should be 222x132 dlus.
- The details dialog (currently) has no Cancel button. I'm waiting to see if it's
- sensible to have one.
- Pages will be sent PSN_INFOCHANGED through WM_NOTIFY (idFrom=0) when a protocol
- ack is broadcast for the correct contact and with type=ACKTYPE_GETINFO.
- To help you out, PSN_INFOCHANGED will also be sent to each page just after it's
- created.
- All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam=(LPARAM)hContact
-}
- PSN_INFOCHANGED = 1;
- PSN_PARAMCHANGED = 2;
-
- PSM_FORCECHANGED = (WM_USER+100); //force-send a PSN_INFOCHANGED to all pages
- MS_USERINFO_ADDPAGE:PAnsiChar = 'UserInfo/AddPage';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_userinfoex.inc b/delphi/Awkward/include/m_userinfoex.inc
deleted file mode 100644
index 24c63be..0000000
--- a/delphi/Awkward/include/m_userinfoex.inc
+++ /dev/null
@@ -1,295 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_USERINFOEX}
-{$DEFINE M_USERINFOEX}
-
-{*************************************************************
- * Interfaces Module
-}
-
-const MIID_UIUSERINFOEX:MUUID='{9C23A24B-E6AA-43c6-B0B8-D6C36D2F7B57}';
-const MIID_CONTACTINFO :MUUID='{17DBD7C9-450E-4000-BFB4-908A7EF4CE72}';
-const MIID_REMINDER :MUUID='{02E890BD-278D-4890-918D-AB2CF5DC50BD}';
-
-{*************************************************************
- * PropertySheetPage Module
-}
-
-{ UserInfo/AddPage v0.1.0.0+
-If the hIcon member of te optiondialogpage is valid, the tree show it for nicer look.
-Otherwise the default icon is displayed for this treeitem.
-}
-const
-// ODPF_UNICODE = 8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
- ODPF_ICON = 64; // the hIcon member of the option dialog page is valid
-
-{ Handling notifications v0.1.0.4+
-A dialogbox should call SetWindowLongPtr(hDlg, DWL_MSGRESULT, PSP_CHANGED) on a PSN_INFOCHANGED notification if
-there are unsafed changes and apply button should keep enabled. Otherwise the changed status
-of the dialogbox is resetted as well as the changed status of the details dialog box itself if no page
-called this message. Because UserinfoEx now looks for changes in the settings of a user to keep the
-shown inforamtion up to date.
-}
- PSP_CHANGED = 2;
- PSN_ICONCHANGED = 2;
-
-{ PSM_GETBOLDFONT v0.1.0.3+
-wParam=NULL
-lParam=(HFONT*)&hFont
-get bold dialog font. wParam is pointer to a handle that retrieves the boldfont.
-You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the font.
-This function returns TRUE on success or FALSE otherwise.
-}
-//!! PSM_GETBOLDFONT = WM_USER+102; //defined in m_options.inc
-
-{ PSM_ISLOCKED v0.1.0.4+
-Returns state of propertysheet. If it is locked, The PSM_CHANGED messages sent by a propertysheetpage does not
-have any effect. To aVOID editcontrols, ... to check for changes on redrawing at a load of settings from database or
-if another propertysheetpage is selected, a plugin should check this state and skip those checks to reduce stressing
-the database if such a test if control's content changed does so.
-wParam=NULL
-lParam=NULL
-You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the handle.
-This function returns TRUE if the PropertySheet is locked or FALSE otherwise.
-
-Example:
-__inline BOOLEAN PspIsLocked(HWND hPsp)
-
- HWND hPs = GetParent(hPsp);
- return ((BOOLEAN)SendMessage((hPs), PSM_ISLOCKED, 0, 0) || GetWindowLongPtr((hPs), DWL_MSGRESULT) != 0);
-}
- PSM_ISLOCKED = WM_USER+901;
-
-{ PSM_GETCONTACT v0.1.0.4+
-You can get the handle to the contact the propertysheet is associated with by calling PSM_GETCONTACT
-to the parent of your propertysheetpage - the propertysheet.
-wParam=NULL
-lParam=(HANDLE*)&hContact
-You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the handle.
-This function returns TRUE on success or FALSE otherwise.
-}
- PSM_GETCONTACT = WM_USER+903;
-
-{ PSM_GETBASEPROTO v0.1.0.4+
-You can get a pointer to the basic protocol module by sending PSM_GETBASEPROTO to the parent of your propertysheetpage.
-wParam=NULL
-lParam=(LPCSTR*)&szBaseProto
-The propertysheet loads the basic contact protocol on creation for a better handling
-of owners (ICQ) protocol used for changing details on the server. Should also reduce database traffic.
-You can also call GetWindowLong(hDlg, DWL_MSGRESULT) to get the protocol.
-This function returns TRUE on success or FALSE otherwise.
-}
- PSM_GETBASEPROTO = WM_USER+905;
-
- INDEX_CURPAGE = -1;
-
-{ PSM_GETPAGEHWND v0.1.1.1+
-retrieve the windowhandle for a propertysheetpage identified by its id
-wParam=idDlg
-lParam=hInstance
-}
- PSM_GETPAGEHWND = WM_USER+906;
-
-{ PSM_DLGMESSAGE v0.1.1.1+
-Send a message to a specified propertypage of the details dialog.
-This enables communication between propertypages without the need to know
-the window handles of each page.
-}
-type
- PDLGCOMMAND = ^TDLGCOMMAND;
- TDLGCOMMAND = record
- hInst :HINST;
- idDlg :word;
- idDlgItem:word;
- uMsg :uint;
- wParam :WPARAM;
- lParam :LPARAM;
- end;
-
-const
- PSM_DLGMESSAGE = WM_USER+907;
-
-{*************************************************************
- * vCard Module
-}
-
-// UserInfo/vCardExport v0.1.0.4+
-
- MS_USERINFO_VCARD_IMPORT:PAnsiChar = 'UserInfo/vCard/Import';
-
- MS_USERINFO_VCARD_IMPORTALL:PAnsiChar = 'UserInfo/vCard/ImportAll';
-
-// UserInfo/vCardImport v0.1.0.4+
-
- MS_USERINFO_VCARD_EXPORT:PAnsiChar = 'UserInfo/vCard/Export';
-
-// UserInfo/vCardImport v0.1.0.4+
-
- MS_USERINFO_VCARD_EXPORTALL:PAnsiChar = 'UserInfo/vCard/ExportAll';
-
-{*************************************************************
- * time Module
-}
-
-{ UserInfo/LocalTime v0.1.0.3+
-Computes the local time for the desired contact and writes it to lpst.
-wParam=(WPARAM)hContact
-lParam=(LPSYSTEMTIME)lpst
-The service gets your windows box's local time, reads your timezoneinformation (Windows setting)
-and hContact's timezone from his user details. With these information contact's local time is computed
-considering daylightsaving time.
-Return values are TRUE for success and FALSE if anything went wrong.
-}
- MS_USERINFO_LOCALTIME:PAnsiChar = 'UserInfo/LocalTime';
-
-{*************************************************************
- * Reminder module
-}
-
-{ UserInfo/Reminder/Check v0.1.0.4+
-This service checks if one of your contacts has birthday in the next few days
-wParam = lParam = not used
-}
- MS_USERINFO_REMINDER_CHECK:PAnsiChar = 'UserInfo/Reminder/Check';
-
-{ UserInfo/Reminder/Check v0.1.1.1+
-This service creates a dialog, that lists all of the anniversaries
-wParam = lParam = not used
-}
- MS_USERINFO_REMINDER_LIST:PAnsiChar = 'UserInfo/Reminder/List';
-
-
-{ UserInfo/Reminder/Check v0.1.2.16+
-This service compares birthday date which is set by the protocol module of each contact
-to the first found custom set birthday date. If a difference is detected, the user is asked
-whether to update the custom set birthday by the one of the protocol or not.
-
-If no custom birthday is set yet and the protocol contains a valid birthday, it is copied to
-primary custom module (e.g.: mBirthday or UserInfo).
-wParam = handle to single contact or NULL to backup all
-lParam = not used
-}
- MS_USERINFO_REMINDER_AGGRASIVEBACKUP:PAnsiChar = 'UserInfo/Reminder/AggrassiveBackup';
-
-{*************************************************************
- * Uinfobuttonclass module
-}
-
-// button styles
- MBS_DEFBUTTON = $00001000; // default button
- MBS_PUSHBUTTON = $00002000; // toggle button
- MBS_FLAT = $00004000; // flat button
- MBS_DOWNARROW = $00008000; // has arrow on the right
-
- MBF_UNICODE = 1;
-
-// BUTTONADDTOOLTIP
-// use lParam=MBF_UNICODE to set unicode tooltips
-// for lParam=0 the string is interpreted as ansi
-
-// message to explicitly translate the buttons text,
-// as it is not done by default translation routine
-// wParam=lParam=NULL
- BUTTONTRANSLATE = WM_USER+6;
-
-{ UserInfo/MsgBox v0.1.0.4+
-Slightly modified version of MButtonClass, to draw both text and icon in a button control
-}
- UINFOBUTTONCLASS = 'UInfoButtonClass';
-
-{*************************************************************
- * Messagebox module
-}
-
-{ UserInfo/MsgBox v0.1.0.3+
-Some little changed message box for nicer look of miranda's messages or questions :-)
-wParam=hContact - can be null
-lParam=(TMsgBox*)pMsg - structure that holds information about the look of the message dialog
-uType member of TMsgBox can be a combination of the following values, where most of them are defined in winuser.h:
-MB_OK
-MB_OKCANCEL
-MB_YESALLNO
-MB_YESNO
-For valid icon values use one of the following MB_ICON_...
-Funktion returns: IDOK, IDYES, IDALL, IDNO or IDCANCEL
-}
- MB_YESALLNO = $00000007;
- MB_UNICODE = $10000000;
-
-{
-valid predefined icon values
-}
- MB_ICON_NONE = $00000000;
- MB_ICON_ERROR = $00000010;
- MB_ICON_QUESTION = $00000020;
- MB_ICON_WARNING = $00000030;
- MB_ICON_INFO = $00000040;
- MB_ICON_OTHER = $000000F0; // use icon TMsgBox->hiMsg
-
-type
- PMsgBox = ^TMsgBox;
- TMsgBox = record
- uSize :uint; // size of this structure
- uType :uint; // parameters
- hiLogo :HICON; // right upper icon of the info bar
- hiMsg :HICON; // icon left next to the message text
- szTitle :TCHAR; // dialog window title text
- szInfoText:TCHAR; // text of the infobar on the top of the dialog
- szMsg :TCHAR; // the message text
- hParent :hwnd; // parent window for the messagebox
- end;
-
-const
- MS_MSGBOX:PAnsiChar = 'UserInfo/MsgBox';
-
-{*************************************************************
- * contact info module
-}
-
-// additional information which can be retrieved with this service
- CNF_COPHONE = 39; // returns company phone (string)
- CNF_COFAX = 40; // returns company fax (string)
- CNF_COCELLULAR = 41; // returns company cellular (string)
- CNF_COEMAIL = 42; // returns company email address (string)
-
-{ CNF_BIRTHDATE v0.1.2.18+
-returns a formated string with the birthdate in it
-wParam - 1 for long dateformat, 0 for short dateformat
-lParam - CONTACTINFO structure as for all other fields, too
-returns 0 on success and 1 on failure
-}
- CNF_BIRTHDATE = 43; // returns date of birth (string)
-
-{*************************************************************
- * extended integration module
-}
-
-{ UserInfo/Homepage/OpenURL v0.1.2.19+
-This service reads the contact's homepage from UserInfo module or contact's protocol module
-and opens the default browser to show it.
-wParam=hContact - handle to contact whose homepage is to show
-lParam=not used
-}
- MS_USERINFO_HOMEPAGE_OPENURL:PAnsiChar = 'UserInfo/Homepage/OpenURL';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_utils.inc b/delphi/Awkward/include/m_utils.inc
deleted file mode 100644
index e04c6aa..0000000
--- a/delphi/Awkward/include/m_utils.inc
+++ /dev/null
@@ -1,442 +0,0 @@
-{$IFNDEF M_UTILS}
-{$DEFINE M_UTILS}
-
-const
- RD_ANCHORX_CUSTOM = 0; // function did everything required to the x axis, do no more processing
- RD_ANCHORX_LEFT = 0; // move the control to keep it constant distance from the left edge of the dialog
- RD_ANCHORX_RIGHT = 1; // move the control to keep it constant distance from the right edge of the dialog
- RD_ANCHORX_WIDTH = 2; // size the control to keep it constant distance from both edges of the dialog
- RD_ANCHORX_CENTRE = 4; // move the control to keep it constant distance from the centre of the dialog
- RD_ANCHORY_CUSTOM = 0;
- RD_ANCHORY_TOP = 0;
- RD_ANCHORY_BOTTOM = 8;
- RD_ANCHORY_HEIGHT = 16;
- RD_ANCHORY_CENTRE = 32;
-
- // for MS_UTILS_RESTOREWINDOWPOSITION
- RWPF_NOSIZE = 1; // don't use stored size info: leave dialog same size
- RWPF_NOMOVE = 2; // don't use stored position
- RWPF_NOACTIVATE = 4; // show but don't activate v0.3.3.0+
- RWPF_HIDDEN = 8; // make it hidden v0.9.0.9+
-
- // for WNDCLASS_COLOURPICKER
- CPM_SETCOLOUR = $1000;// lParam=new colour
- CPM_GETCOLOUR = $1001;// returns colour
- CPM_SETDEFAULTCOLOUR = $1002;// lParam=default, used as first custom colour
- CPM_GETDEFAULTCOLOUR = $1003;// returns colour
- CPN_COLOURCHANGED = 1; // sent through WM_COMMAND
-
- // Colour picker control, see CPM_* and CPN_* constants above
- WNDCLASS_COLOURPICKER = 'ColourPicker';
-
- // hyperlink messages
- {
- Use this in a SendMessage to set the color of the url when control is enabled
- wParam=DWORD color
- lParam=not used
- }
- HLK_SETENABLECOLOUR = WM_USER+101; // added in 0.3.1
-
- {
- Use this in a SendMessage to set the color of the url when control is disabled
- wParam=DWORD color
- lParam=not used
- }
- HLK_SETDISABLECOLOUR = WM_USER+102; // added in 0.3.1
-
-type
- PUTILRESIZECONTROL = ^TUTILRESIZECONTROL;
- TUTILRESIZECONTROL = record
- cbSize : int;
- wId : int; // control ID
- rcItem : TRECT; // original control rectangle, relative to dialog
- // modify in-placee to specify the new position
- dlgOriginalSize: TSize; // size of dialog client area in template
- dlgNewSize : TSize; // current size of dialog client area
- end;
-
- TDIALOGRESIZERPROC = function(hwndDlg: THANDLE; lParam: LPARAM; urc: PUTILRESIZECONTROL): int; cdecl;
-
- PUTILRESIZEDIALOG = ^TUTILRESIZEDIALOG;
- TUTILRESIZEDIALOG = record
- cbSize : int;
- hwndDlg : HWND;
- hInstance : THANDLE;
- lpTemplate: PAnsiChar;
- lParam : LPARAM;
- pfnResizer: TDIALOGRESIZERPROC;
- end;
-
- PCountryListEntry = ^TCountryListEntry;
- TCountryListEntry = record
- id : int;
- szName: PAnsiChar;
- end;
-
- PWINDOWLISTENTRY = ^TWINDOWLISTENTRY;
- TWINDOWLISTENTRY = record
- hList : THANDLE;
- hWnd : HWND;
- hContact: THANDLE;
- end;
-
- PSAVEWINDOWPOS = ^TSAVEWINDOWPOS;
- TSAVEWINDOWPOS = record
- hWnd : HWND;
- hContact : THANDLE;
- szModule : PAnsiChar; // module name eto store the settings in
- szNamePrefix: PAnsiChar; // text to prefix on 'x', 'width', etc
- end;
-
-const
- {
- wParam : bOpenInNewWindow
- lParam : Pointer to a null terminated string containing Url
- Affect : Open a URRL in the user's default web browser, see notes
- Returns: 0 on success, [non zero on failure]
- Notes : bOpenInWindow should be zero to open the URL in the browoser window
- the user last used, or nonzero to open in a new browser window,
- if there's no browser running, it will be started to show the URL
- Version: v0.1.0.1+
- }
- MS_UTILS_OPENURL:PAnsiChar = 'Utils/OpenURL';
-
- {
- wParam : 0
- lParam : Pointer to an initalised TUTILRESIZEDIALOG structure
- Affect : Resize a dialog by calling a custom routine to move each control, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : Does not support DIALOGTEMPLATEEX dialogboxes, and will return
- failure if you try to resize one.-
- the dialog iteself should have been resized prior to calling this
- service, .pfnResizer is called once for each control in the dialog
- .pfnResizer should return a combination of one RD_ANCHORx_ and one RD_ANCHORy constant
- Version: v0.1.0.1+
- }
- MS_UTILS_RESIZEDIALOG:PAnsiChar = 'Utils/ResizeDialog';
-
- {
- wParam : countryID
- lParam : 0
- Affect : Get the name of a country given it's number, e.g. 44 = UK
- Returns: Returns a pointer to a string containing the country name on success
- NULL(0) on failure
- Version: v0.1.2.0+
- }
- MS_UTILS_GETCOUNTRYBYNUMBER:PAnsiChar = 'Utils/GetCountryByNumber';
-
- {
- wParam : Pointer to an int to be filled with count -- !TODO! test.
- lParam : Pointer to an PCountryListEntry, see notes
- Affect : Get the full list of country IDs, see notes
- Returns: 0 always
- Notes : the list is sorted alphabetically by name, on the assumption
- it's quicker to search numbers that are out of outer, than strings
- that are out of order. a NULL(0) entry terminates
- -
- Neither wParam or lParam can be NULL(0)
- -
- lParam is filled with the first entry, it can be accessed as a pointer,
- to get the next entry, increment the pointer by sizeof(Pointer) NOT
- sizeof(TCountryList), only increment the pointer as many times as
- given by iCount.
- -
- this data can NOT be copied if an array of TCountryListEntry's is passed
- so don't try it.
- Version: v0.1.2.0+
- }
- MS_UTILS_GETCOUNTRYLIST:PAnsiChar = 'Utils/GetCountryList';
-
- // see WindowList_* functions below
-
- {
- wParam : 0
- lParam : 0
- Affect : Allocate a window list
- Returns: A handle to the new window list
- Version: v0.1.0.1+
- }
- MS_UTILS_ALLOCWINDOWLIST:PAnsiChar = 'Utils/AllocWindowList';
-
- {
- wParam : 0
- lParam : Pointer to an initalised TWINDOWLISTENTRY structure
- Affect : Add a window to a given window list handle
- Returns: 0 on success, [non zero] on failure
- Version: v0.1.0.1+
- }
- MS_UTILS_ADDTOWINDOWLIST:PAnsiChar = 'Utils/AddToWindowList';
-
- {
- wParam : Handle to window list to remove from
- lParam : Window handle to remove
- Affect : Remove a window from the specified window list
- Returns: 0 on success, [non zero] on failure
- Version: v0.1.0.1+
- }
- MS_UTILS_REMOVEFROMWINDOWLIST:PAnsiChar = 'Utils/RemoveFromWindowList';
-
- {
- wParam : Handle to the window list to look in
- lParam : Handle to a HCONTACT to find in the window list
- Affect : Find a window handle given the hContact
- Returns: The found window handle or NULL(0) on failure
- Version: v0.1.0.1+
- }
- MS_UTILS_FINDWINDOWINLIST:PAnsiChar = 'Utils/FindWindowInList';
-
- {
- wParam : Handle to window list
- lParam : Pointer to TMSG (initalised with what to broadcast)
- Affect : Broadcast a message to all windows in a list, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : only TMSG.Message, .wParam, .lParam are used
- Version: v0.1.0.1+
- }
- MS_UTILS_BROADCASTTOWINDOWLIST:PAnsiChar = 'Utils/BroadcastToWindowList';
-
- {
- Version: 0.3.0.0+
- Inline helper: WindowList_BroadcastAsync
- wParam : Handle to window list
- lParam : Pointer to TMSG (initalised with what to broadcast)
- Affect : Broadcast a message to all windows in the given list using PostMessage()
- Returns: 0 on success, nonzero on failure, this service does not fail,
- even if PostMessage() fails for whatever reason
- }
- MS_UTILS_BROADCASTTOWINDOWLIST_ASYNC:PAnsiChar = 'Utils/BroadcastToWindowListAsync';
-
- {
- There aren't any services here, there's no need for them, the control class
- will obey the SS_LEFT (0), SS_CENTER (1), SS_RIGHT(2) styles
- the control will send STN_CLICKED via WM_COMMAND when the link itself is clicked
- -
- These are defined by STATIC controls and STN_CLICKED is sent to standard
- STATIC classes when they're clicked -- look at WINAPI docs for more info
- }
- WNDCLASS_HYPERLINK = 'Hyperlink';
-
- {
- wParam : 0
- lParam : Pointer to a initialised TSAVEWINDOWPOS structure
- Affect :
- Returns: 0 on success, [non zero] on failure
- Notes :
- Version: v0.1.1.0+
- }
- MS_UTILS_SAVEWINDOWPOSITION:PAnsiChar = 'Utils/SaveWindowPos';
-
- {
- wParam : see RWPF_* flags
- lParam : Pointer to a initalised TSAVEWINDOWPOS
- Affect : Restores the position of a window from the database, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : If no position info was found, the service will return 1.
- The NoSize version won't use stored information size, the window
- is left the same size
- -
- See Utils_RestoreWindowPosition() Helper function, this function is
- a bit different from the C function (which can be inlined too! dammit)
- that there's only one function and not three (which just passed different flags)
- Version: v0.1.1.0+
- }
- MS_UTILS_RESTOREWINDOWPOSITION:PAnsiChar = 'Utils/RestoreWindowPos';
-
-{
- wParam : pointer to RECT
- lParam : 0
- Affect : Moves a RECT inside screen if it is outside.It works with multiple monitors (v0.9.0.4+)
- Returns: <0 on error, 0 if not changed the rect, 1 if changed the rect
-}
- MS_UTILS_ASSERTINSIDESCREEN:pAnsiChar = 'Utils/AssertInsideScreen';
-
- {
- wParam : 0
- lParam : Pointer to a null terminated string containing filename
- Affect : Loads a bitmap (or other graphic type, see Notes
- Returns: HBITMAP on success, NULL(0) on failure
- Notes : This function also supports JPEG, GIF (and maybe PNG too)
- For speed, if the file extention is .bmp or .rle it will use LoadImage()
- and not load OLE for the extra image support
- -
- Remember to delete the returned handle with DeleteObject (see GDI documentation for WINAPI)
- Version: v0.1.2.1+
- }
- MS_UTILS_LOADBITMAP:PAnsiChar = 'Utils/LoadBitmap';
-
- {
- wParam : byte length of buffer (not to be confused with byte range)
- lParam : Pointer to buffer
- Affect : Get the filter strings for use in the open file dialog, see notes
- Returns: 0 on success [non zero] on failure
- Notes : See the WINAPI under OPENFILENAME.lpStrFiler for formatting,
- an 'All bitmaps' item is alway first, and 'All files' is always last
- -
- The returned string is always formatted
- -
- To build this filter, the filter string consists of
- filter followed by a descriptive text
- followed by more filters and their descriptive texts -- end with double NULL(0)
- e.g. *.bmp' #0 'All bitmaps' #0 '*.*' #0 'All Files' #0 #0
- }
- MS_UTILS_GETBITMAPFILTERSTRINGS:PAnsiChar = 'Utils/GetBitmapFilterStrings';
-
- {
- wParam : pszPath
- lParam : pszNewPath
- Affect : Saves a path to a relative path (from the miranda directory)
- Only saves as a relative path if the file is in the miranda
- directory (or sub directory)
- Notes : pszPath is the path to convert and pszNewPath is the buffer that
- the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
- Returns: numbers of chars copied.
- }
- MS_UTILS_PATHTORELATIVE :PAnsiChar = 'Utils/PathToRelative';
-//Unicode versions (0.6.2+)
- MS_UTILS_PATHTORELATIVEW:PAnsiChar = 'Utils/PathToRelativeW';
-
- {
- Affect : Saves a path to a absolute path (from the miranda directory)
- wParam : pszPath
- lParam : pszNewPath
- Notes : pszPath is the path to convert and pszNewPath is the buffer that
- the new path is copied too. pszNewPath MUST be of the size MAX_PATH.
- Returns: numbers of chars copied.
- }
- MS_UTILS_PATHTOABSOLUTE :PAnsiChar = 'Utils/PathToAbsolute';
-//Unicode versions (0.6.2+)
- MS_UTILS_PATHTOABSOLUTEW:PAnsiChar = 'Utils/PathToAbsoluteW';
-
-{
- Creates a directory tree (even more than one directories levels are missing) 0.7.0+
- wParam=0 (unused)
- lParam=pszPath - directory to be created
- Always returns 0
- Unicode version is available since 0.7.0
-}
- MS_UTILS_CREATEDIRTREE :PAnsiChar = 'Utils/CreateDirTree';
- MS_UTILS_CREATEDIRTREEW:PAnsiChar = 'Utils/CreateDirTreeW';
-
-{
- Generates Random number of any length
- wParam=size - length of the random number to generate
- lParam=(LPARAM)(char*)pszArray - pointer to array to fill with random number
- Always returns 0
-}
- MS_UTILS_GETRANDOM:PAnsiChar = 'Utils/GetRandom';
-
-//Replace variables in text
-//wParam=(char*/TCHAR*/WCHAR*)string (depends on RVF_UNICODE/RVF_TCHAR flag)
-//lParam=(REPLACEVARSDATA *) data about variables, item with key=0 terminates the list
-//returns new string, use mir_free to destroy
-type
- PREPLACEVARSARRAY = ^TREPLACEVARSARRAY;
- TREPLACEVARSARRAY = record
- szKey :TCHAR;
- szValue:TCHAR;
- end;
-
-type
- TREPLACEVARSDATA = record
- cbSize :int;
- dwFlags :dword;
- hContact :THANDLE;
- variables:PREPLACEVARSARRAY;
- end;
-
-const
- RVF_UNICODE = 1;
-
- MS_UTILS_REPLACEVARS:PAnsiChar = 'Utils/ReplaceVars';
-{ list of predefined variables
-"nick"
-"proto"
-"userid"
-"miranda_path"
-"appdata"
-"mydocuments"
-"desktop"
-"miranda_profile"
-"miranda_profilename"
-"username"
-"miranda_userdata"
-"miranda_avatarcache"
-"miranda_logpath"
-}
-
-{
- MD5 interface. 0.7.0.12
-
- Contains functions for md5 handling
-}
-// Define the state of the MD5 Algorithm.
-type
- pmir_md5_byte_t = ^mir_md5_byte_t;
- pmir_md5_word_t = ^mir_md5_word_t;
- mir_md5_byte_t = byte; // 8-bit byte
- mir_md5_word_t = cardinal; // 32-bit word
-
- pmir_md5_state_t = ^mir_md5_state_t;
- mir_md5_state_t = record
- count:array [0..1] of mir_md5_word_t; // message length in bits, lsw first
- abcd :array [0..3] of mir_md5_word_t; // digest buffer
- buf :array [0..63] of mir_md5_byte_t; // accumulate block
- end;
-
- TMD5_INTERFACE = record
- cbSize:int;
- md5_init : procedure(pms:pmir_md5_state_t); cdecl;
- md5_append : procedure(pms:pmir_md5_state_t; const data:pmir_md5_byte_t; nbytes:int); cdecl;
- md5_finish : procedure(pms:pmir_md5_state_t; digest:array of mir_md5_byte_t); cdecl;
- md5_hash : procedure(const data:pmir_md5_byte_t; len:int; digest:array of mir_md5_byte_t); cdecl; //16 byte
- end;
-
-const
- MS_SYSTEM_GET_MD5I:PAnsiChar = 'Miranda/System/GetMD5I';
-{
-var
- md5i:MD5_INTERFACE;
-}
-
-{
- SHA1 interface. 0.7.0.12
-
- Contains functions for SHA1 handling
-}
-
-type
- pmir_sha1_byte_t = ^mir_sha1_byte_t;
- pmir_sha1_long_t = ^mir_sha1_long_t;
- mir_sha1_byte_t = byte;
- mir_sha1_long_t = longword;
-
-const
- MIR_SHA1_HASH_SIZE = 20;
-
-type
- pmir_sha1_ctx = ^mir_sha1_ctx;
- mir_sha1_ctx = record
- H:array [0..4] of mir_sha1_long_t;
- W:array [0..79] of mir_sha1_long_t;
- lenW:int;
- sizeHi,sizeLo:mir_sha1_long_t;
- end;
-
- SHA1_INTERFACE = record
- cbSize:int;
- sha1_init : procedure(ctx:pmir_sha1_ctx); cdecl;
- sha1_append : procedure(ctx:pmir_sha1_ctx; dataIn:pmir_sha1_byte_t; len:int); cdecl;
- sha1_finish : procedure(ctx:pmir_sha1_ctx; hashout:array of mir_sha1_byte_t); cdecl;
- sha1_hash : procedure(dataIn:pmir_sha1_byte_t; len:int;
- hashout:array of mir_sha1_byte_t); cdecl; //20 bytes
- end;
-
-const
- MS_SYSTEM_GET_SHA1I:PAnsiChar = 'Miranda/System/GetSHA1I';
-
-{
-var
- sha1i:SHA1_INTERFACE;
-}
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_variables.inc b/delphi/Awkward/include/m_variables.inc
deleted file mode 100644
index 1ac4f5f..0000000
--- a/delphi/Awkward/include/m_variables.inc
+++ /dev/null
@@ -1,480 +0,0 @@
-{
- Variables Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-
-{$IFNDEF M_VARS}
-{$DEFINE M_VARS}
-
-const MIID_VARIABLES:MUUID = '{630756DE-3681-440B-991E-77A4742DA595}';
-
-// --------------------------------------------------------------------------
-// Memory management
-// --------------------------------------------------------------------------
-
-// Release memory that was allocated by the Variables plugin, e.g. returned
-// strings.
-
- MS_VARS_FREEMEMORY:PAnsiChar = 'Vars/FreeMemory';
-{
- Parameters:
- ------------------------
- wParam = (WPARAM)(void *)pntr
- Pointer to memory that was allocated by the Variables plugin (e.g. a
- returned string) (can be NULL).
- lParam = 0
-
- Return Value:
- ------------------------
- Does return 0 on success, nozero otherwise.
-
- Note: Do only use this service to free memory that was *explicitliy*
- stated that it should be free with this service.
-}
-
- MS_VARS_GET_MMI:PAnsiChar = 'Vars/GetMMI';
-{
- Get Variable's RTL/CRT function poiners to malloc(), free() and
- realloc().
-
- Parameters:
- ------------------------
- wParam = 0
- lParam = (LPARAM) &MM_INTERFACE
- Pointer to a memory manager interface struct (see m_system.h).
-
- Return Value:
- ------------------------
- Returns 0 on success, nozero otherwise
-
- Note: Works exactly the same as the MS_SYSTEM_GET_MMI service
- service of m_system.h.
-}
-
-// Helper function for easy using:
-
-// --------------------------------------------------------------------------
-// String formatting
-// --------------------------------------------------------------------------
-
- MS_VARS_FORMATSTRING:PAnsiChar = 'Vars/FormatString';
-{
- This service can be used to parse tokens in a text. The tokens will be
- replaced by their resolved values. A token can either be a field or a
- function. A field takes no arguments and is represented between
- %-characters, e.g. "%winampsong%". A function can take any number of
- arguments and is represented by a ? or !-character followed by the name
- of the function and a list of arguments, e.g. "?add(1,2)".
-
- Parameters:
- ------------------------
- wParam = (WPARAM)(FORMATINFO *)&fi
- See below.
- lParam = 0
-
- Return Value:
- ------------------------
- Returns a pointer to the resolved string or NULL in case of an error.
-
- Note: The returned pointer needs to be freed using MS_VARS_FREEMEMORY.
-}
-
-const
- FORMATINFOV2_SIZE = 28;
-
-type
- TFORMATINFO = record
- cbSize :integer; // Set this to sizeof(FORMATINFO).
- flags :integer; // Flags to use (see FIF_* below).
- szFormat :TCHAR; // Text in which the tokens will be replaced (can't be NULL).
- szExtraText:TCHAR; // Extra, context-specific string (can be NULL) ->
- // The field "extratext" will be replaced by this
- // string. (Previously szSource).
- hContact :THANDLE; // Handle to contact (can be NULL) -> The field "subject"
- // represents this contact.
- pCount :integer; // (output) Number of succesful parsed tokens, needs to
- // be set to 0 before the call
- eCount :integer; // (output) Number of failed tokens, needs to be set to
- // 0 before the call
- szaTemporaryVars:^TChar; // Temporary variables valid only in the duration of the format call
- // By pos: [i] is var name, [i + 1] is var value
- cbTemporaryVarsSize:int; // Number of elements in szaTemporaryVars array
- end;
-
-const
-// Possible flags:
- FIF_UNICODE = 1; // Expects and returns unicode text (WCHAR*).
- FIF_TCHAR = FIF_UNICODE; // Strings in structure are TCHAR*.
-
-// --------------------------------------------------------------------------
-// Register tokens
-// --------------------------------------------------------------------------
-
-// Plugins can define tokens which will be parsed by the Variables plugin.
-
- MS_VARS_REGISTERTOKEN:PAnsiChar = 'Vars/RegisterToken';
-{
- With this service you can define your own token. The newly added tokens
- using this service are taken into account on every call to
- MS_VARS_FORMATSTRING.
-
- Parameters:
- ------------------------
- wParam = 0
- lParam = (LPARAM)(TOKENREGISTER*)&tr
- See below.
-
- Return Value:
- ------------------------
- Returns 0 on success, nonzero otherwise. Existing tokens will be
- 'overwritten' if registered twice.
-}
-
-// Needed for szService and parseFunction:
-type
- PARGUMENTSINFO = ^TARGUMENTSINFO;
- TARGUMENTSINFO = record
- cbSize:integer; // You need to check if this is >=sizeof(ARGUMENTSINFO)
- // (already filled in).
- fi :^TFORMATINFO; // Arguments passed to MS_VARS_FORMATSTRING.
- argc :cardinal; // Number of elements in the argv array.
- argv :^TCHAR; // Argv[0] will be the token name, the following elements
- // are the additional arguments.
- flags :integer; // (output) You can set flags here (initially 0), use the
- // AIF_* flags (see below).
- end;
-
-// Available flags for ARGUMENTSINFO:
-// Set the flags of the ARGUMENTSINFO struct to any of these to influence
-// further parsing.
-const
- AIF_DONTPARSE = 1; // Don't parse the result of this function,
- // usually the result of a token is parsed
- // again, if the `?` is used as a function character.
- AIF_FALSE = 2; // The function returned logical false.
-
-// Definition of parse/cleanup functions:
-{
-typedef AnsiChar* (*VARPARSEFUNCA)(ARGUMENTSINFO *ai);
-typedef WCHAR* (*VARPARSEFUNCW)(ARGUMENTSINFO *ai);
-typedef void (*VARCLEANUPFUNCA)(AnsiChar *szReturn);
-typedef void (*VARCLEANUPFUNCW)(WCHAR *wszReturn);
-
-#define VARPARSEFUNC VARPARSEFUNCW
-#define VARCLEANUPFUNC VARCLEANUPFUNCW
-}
-type
- TTOKENREGISTER = record
- cbSize:integer; // Set this to sizeof(TOKENREGISTER).
- szTokenString:TCHAR; // Name of the new token to be created, without %,
- // ?, ! etc. signs (can't be NULL).
- szService:PAnsiChar; // Name of a service that is used to request the
- // token's value, if no service is used, a function
- // and TRF_PARSEFUNC must be used.
- // [VARPARSEFUNC];
- szCleanupService:PAnsiChar; // Name of a service to be called when the
- // memory allocated in szService can be freed
- // (only used when flag VRF_CLEANUP is set,
- // else set this to NULL).
- // [VARCLEANUPFUNC]
- szHelpText:PAnsiChar;// Help info shown in help dialog (can be NULL). Has to
- // be in the following format:
- // "subject\targuments\tdescription"
- // (Example: "math\t(x, y ,...)\tx + y + ..."), or:
- // "subject\tdescription"
- // (Example: "miranda\tPath to the Miranda-IM
- // executable").
- // Note: subject and description are translated by Variables.
- memType:integer; // Describes which method Varibale's plugin needs to use to
- // free the returned buffer, use one of the VR_MEM_* values
- // (see below). Only valid if the flag VRF_FREEMEM is set,
- // use TR_MEM_OWNER otherwise).
- flags :integer; // Flags to use (see below), one of TRF_* (see below).
- end;
-
-const
-// Available Memory Storage Types:
-// These values describe which method Variables Plugin will use to free the
-// buffer returned by the parse function or service
- TR_MEM_VARIABLES = 1; // Memory is allocated using the functions
- // retrieved by MS_VARS_GET_MMI.
- TR_MEM_MIRANDA = 2; // Memory is allocated using Miranda's Memory
- // Manager Interface (using the functions
- // returned by MS_SYSTEM_GET_MMI), if
- // VRF_FREEMEM is set, the memory will be
- // freed by Variables.
- TR_MEM_OWNER = 3; // Memory is owned by the calling plugin
- // (can't be freed by Variables Plugin
- // automatically). This should be used if
- // VRF_FREEMEM is not specified in the flags.
-
-// Available Flags for TOKENREGISTER:
- TRF_FREEMEM = $01; // Variables Plugin will automatically free the
- // pointer returned by the parse function or
- // service (which method it will us is
- // specified in memType -> see above).
- TRF_CLEANUP = $02; // Call cleanup service or function, notifying
- // that the returned buffer can be freed.
- // Normally you should use either TRF_FREEMEM
- // or TRF_CLEANUP.
- TRF_PARSEFUNC = $40; // parseFunction will be used instead of a service.
- TRF_CLEANUPFUNC = $80; // cleanupFunction will be used instead of a service.
- TRF_USEFUNCS = TRF_PARSEFUNC or TRF_CLEANUPFUNC;
- TRF_UNPARSEDARGS = $04; // Provide the arguments for the parse
- // function in their raw (unparsed) form.
- // By default, arguments are parsed before
- // presenting them to the parse function.
- TRF_FIELD = $08; // The token can be used as a %field%.
- TRF_FUNCTION = $10; // The token can be used as a ?function().
- // Normally you should use either TRF_FIELD or
- // TRF_FUNCTION.
- TRF_UNICODE = $20; // Strings in structure are unicode (WCHAR*).
- // In this case, the strings pointing to the
- // arguments in the ARGUMENTS struct are
- // unicode also. The returned buffer is
- // expected to be unicode also, and the
- // unicode parse and cleanup functions are called.
-
- TRF_TCHAR = TRF_UNICODE; // Strings in structure are TCHAR*.
-
-// Deprecated:
- TRF_CALLSVC = TRF_CLEANUP;
-
-// Callback Service (szService) / parseFunction:
-// ------------------------
-// Service that is called automatically by the Variable's Plugin to resolve a
-// registered variable.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(ARGUMENTSINFO *)&ai
-// see above
-
-// Return Value:
-// Needs to return the pointer to a dynamically allocacated string or NULL.
-// A return value of NULL is regarded as an error (eCount will be increaded).
-// Flags in the ARGUMENTSINFO struct can be set (see above).
-
-// Callback Service (szCallbackService) / cleanupFunction:
-// ------------------------
-// This service is called when the memory that was allocated by the parse
-// function or service can be freed. Note: It will only be called when the
-// flag VRF_CLEANUP of TOKENREGISTER is set.
-
-// Parameters:
-// wParam = 0
-// lParam = (LPARAM)(AnsiChar *)&res
-// Result from parse function or service (pointer to a string).
-
-// Return Value:
-// Should return 0 on success.
-
-
-
-// --------------------------------------------------------------------------
-// Show the help dialog
-// --------------------------------------------------------------------------
-
-// Plugins can invoke Variables' help dialog which can be used for easy input
-// by users.
-
- MS_VARS_SHOWHELPEX:PAnsiChar = 'Vars/ShowHelpEx';
-
-// This service can be used to open the help dialog of Variables. This dialog
-// provides easy input for the user and/or information about the available
-// tokens.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(HWND)hwndParent
-// lParam = (LPARAM)(VARHELPINFO)&vhi
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns 0 on succes, any other value on error.
-
-type
- TVARHELPINFO = record
- cbSize:integer; // Set to sizeof(VARHELPINFO).
- fi:^TFORMATINFO; // Used for both input and output. If this pointer is not
- // NULL, the information is used as the initial values for
- // the dialog.
- hwndCtrl:HWND; // Used for both input and output. The window text of this
- // window will be read and used as the initial input of the
- // input dialog. If the user presses the OK button the window
- // text of this window will be set to the text of the input
- // field and a EN_CHANGE message via WM_COMMAND is send to
- // this window. (Can be NULL).
- szSubjectDesc:PAnsiChar; // The description of the %subject% token will be set
- // to this text, if not NULL. This is translated
- // automatically.
- szExtraTextDesc:PAnsiChar; // The description of the %extratext% token will be
- // set to this text, if not NULL. This is translated
- // automatically.
- flags:integer; // Flags, see below.
- end;
-
-
-const
-// Flags for VARHELPINFO
- VHF_TOKENS = $00000001; // Create a dialog with the list of tokens
- VHF_INPUT = $00000002; // Create a dialog with an input
- // field (this contains the list of
- // tokens as well).
- VHF_SUBJECT = $00000004; // Create a dialog to select a
- // contact for the %subject% token.
- VHF_EXTRATEXT = $00000008; // Create a dialog to enter a text
- // for the %extratext% token.
- VHF_HELP = $00000010; // Create a dialog with help info.
- VHF_HIDESUBJECTTOKEN = $00000020; // Hide the %subject% token in the
- // list of tokens.
- VHF_HIDEEXTRATEXTTOKEN = $00000040; // Hide the %extratext% token in
- // the list of tokens.
- VHF_DONTFILLSTRUCT = $00000080; // Don't fill the struct with the
- // new information if OK is pressed
- VHF_FULLFILLSTRUCT = $00000100; // Fill all members of the struct
- // when OK is pressed. By default
- // only szFormat is set. With this
- // flag on, hContact and
- // szExtraText are also set.
- VHF_SETLASTSUBJECT = $00000200; // Set the last contact that was
- // used in the %subject% dialog in
- // case fi.hContact is NULL.
-
-// Predefined flags
- VHF_FULLDLG = VHF_INPUT or VHF_HELP or VHF_SUBJECT or VHF_EXTRATEXT;
- VHF_SIMPLEDLG = VHF_INPUT or VHF_HELP;
- VHF_NOINPUTDLG = VHF_TOKENS or VHF_HELP;
-
-// If the service fills information in the struct for szFormat or szExtraText,
-// these members must be free'd using the free function of Variables.
-// If wParam==NULL, the dialog is created modeless. Only one dialog can be
-// shown at the time.
-// If both hwndCtrl and fi are NULL, the user input will not be retrievable.
-// In this case, the dialog is created with only a "Close" button, instead of
-// the "OK" and "Cancel" buttons.
-// In case of modeless dialog and fi != NULL, please make sure this pointer
-// stays valid while the dialog is open.
-
-
- MS_VARS_GETSKINITEM:PAnsiChar = 'Vars/GetSkinItem';
-{
- This service can be used to get the icon you can use for example on the
- Variables help button in your options screen. You can also get the tooltip
- text to use with such a button. If icon library is available the icon will
- be retrieved from icon library manager, otherwise the default is returned.
-
- Parameters:
- ------------------------
- wParam = (WPARAM)0
- lParam = (LPARAM)VSI_* (see below)
-
- Return Value:
- ------------------------
- Depends on the information to retrieve (see below).
-}
-// VSI_ constants
- VSI_HELPICON = 1; // Can be used on the button accessing the
- // Variables help dialog. Returns (HICON)hIcon on
- // success or NULL on failure;
- VSI_HELPTIPTEXT = 2; // Returns the tooltip text you can use for the
- // help button. Returns (AnsiChar *)szTipText, a
- // static, translated buffer containing the help
- // text or NULL on error.
-
- MS_VARS_SHOWHELP:PAnsiChar = 'Vars/ShowHelp';
-{
- WARNING: This service is obsolete, please use MS_VARS_SHOWHELPEX
-
- Shows a help dialog where all possible tokens are displayed. The tokens
- are explained on the dialog, too. The user can edit the initial string and
- insert as many tokens as he likes.
-
- Parameters:
- ------------------------
- wParam = (HWND)hwndEdit
- Handle to an edit control in which the modified string
- should be inserted (When the user clicks OK in the dialog the edited
- string will be set to hwndEdit) (can be NULL).
- lParam = (AnsiChar *)pszInitialString
- String that the user is provided with initially when
- the dialog gets opened (If this is NULL then the current text in the
- hwndEdit edit control will be used) (can be NULL).
-
- Return Value:
- ------------------------
- Returns the handle to the help dialog (HWND).
-
- Note: Only one help dialog can be opened at a time. When the dialog gets
- closed an EN_CHANGE of the edit controll will be triggered because the
- contents were updated. (Only when user selected OK).
-
- Example:
- CallService(MS_VARS_SHOWHELP, (WPARAM)hwndEdit, (LPARAM)"some initial text");
-}
-
-// --------------------------------------------------------------------------
-// Retrieve a contact's HANDLE given a string
-// --------------------------------------------------------------------------
-
- MS_VARS_GETCONTACTFROMSTRING:PAnsiChar = 'Vars/GetContactFromString';
-{
- Searching for contacts in the database. You can find contacts in db by
- searching for their name, e.g first name.
-
- Parameters:
- ------------------------
- wParam = (WPARAM)(CONTACTSINFO *)&ci
- See below.
- lParam = 0
-
- Return Value:
- ------------------------
- Returns number of contacts found matching the given string representation.
- The hContacts array of CONTACTSINFO struct contains these hContacts after
- the call.
-
- Note: The hContacts array needs to be freed after use using
- MS_VARS_FREEMEMORY.
-}
-
-type
- TCONTACTSINFO = record
- cbSize :integer; // Set this to sizeof(CONTACTSINFO).
- szContact:TCHAR; // String to search for, e.g. last name (can't be NULL).
- hContacts:^THANDLE; // (output) Array of contacts found.
- flags :DWORD; // Contact details that will be matched with the search
- // string (flags can be combined).
- end;
-
-const
-// Possible flags:
- CI_PROTOID = $00000001; // The contact in the string is encoded in the
- // format <PROTOID:UNIQUEID>, e.g. <ICQ:12345678>.
- CI_NICK = $00000002; // Search nick names.
- CI_LISTNAME = $00000004; // Search custom names shown in contact list.
- CI_FIRSTNAME = $00000008; // Search contact's first names (contact details).
- CI_LASTNAME = $00000010; // Search contact's last names (contact details).
- CI_EMAIL = $00000020; // Search contact's email adresses (contact details).
- CI_UNIQUEID = $00000040; // Search unique ids of the contac, e.g. UIN.
- CI_CNFINFO = $40000000; // Searches one of the CNF_* flags (set flags to
- // CI_CNFINFO|CNF_X), only one CNF_ type possible
- CI_UNICODE = $80000000; // tszContact is a unicode string (WCHAR*).
- CI_TCHAR = CI_UNICODE; // Strings in structure are TCHAR*.
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/m_xml.inc b/delphi/Awkward/include/m_xml.inc
deleted file mode 100644
index a085193..0000000
--- a/delphi/Awkward/include/m_xml.inc
+++ /dev/null
@@ -1,220 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_XML}
-{$DEFINE M_XML}
-
-type
- HXML = THANDLE;
-
-type
- XML_ELEMENT_POS = int; // XML_ELEMENT_POS is not interchangeable with simple indexes
-
-type
- XML_ELEMENT_TYPE = (
- XML_ELEM_TYPE_CHILD,XML_ELEM_TYPE_ATTRIBUTE,
- XML_ELEM_TYPE_TEXT ,XML_ELEM_TYPE_CLEAR);
-
-const
- XML_API_SIZEOF_V1 = SizeOf(size_t)+26*sizeof(dword);
-
-type
- XML_API_A = record
- cbSize :size_t;
-
- createNode :function(const name, text:PAnsiChar; IsDeclaration:boolean):HXML;cdecl;
- destroyNode :procedure(node:HXML);cdecl;
-
- parseString :function(const str:PAnsiChar; datalen:pint; const tag:PAnsiChar):HXML;cdecl;
- toString :function(node:HXML;datalen:pint):PAnsiChar;cdecl;
-
- addChild :function(parent:HXML; const name,text:PAnsiChar):HXML;cdecl;
- addChild2 :procedure(child,parent:HXML);cdecl;
- copyNode :function(parent:HXML):HXML;cdecl;
- getChild :function(parent:HXML;number:int):HXML;cdecl;
- getChildCount :function(h:HXML):int;cdecl;
- getChildByAttrValue:function(parent:HXML; const name,attrName,attrValue:PAnsiChar):HXML;cdecl;
- getFirstChild :function(parent:HXML):HXML;cdecl;
- getNthChild :function(parent:HXML; const name:PAnsiChar; i:int):HXML;cdecl;
- getNextChild :function(parent:HXML; const name:PAnsiChar; i:pint):HXML;cdecl;
- getChildByPath :function(parent:HXML; const path:PAnsiChar;createNodeIfMissing:boolean):HXML;cdecl;
- getNextNode :function(node:HXML):HXML;cdecl;
- getName :function(h:HXML):PAnsiChar;cdecl;
- getParent :function(h:HXML):HXML;cdecl;
- getText :function(h:HXML):PAnsiChar;cdecl; // = getTextByIndex(HXML, 0)
- setText :procedure(h:HXML;value:PAnsiChar);cdecl; // = setTextByIndex(HXML, LPCTSTR, 0)
-
- getAttr :function(h:HXML;i:int):PAnsiChar;cdecl;
- getAttrName :function(h:HXML;i:int):PAnsiChar;cdecl;
- getAttrValue :function(h:HXML;const attrName:PAnsiChar):PAnsiChar;cdecl;
- getAttrCount :function(h:HXML):int;cdecl;
- addAttr :procedure(h:HXML;const attrName,attrValue:PAnsiChar);cdecl;
- addAttrInt :procedure(h:HXML; const attrName:PAnsiChar;attrValue:int);cdecl;
-
- freeMem :procedure(arg:pointer);cdecl;
-
- // #if MIRANDA_VER >= 0x0900, methods added in XML API v2
- isDeclaration :function(node:HXML):boolean;cdecl;
- toStringWithFormatting:function(node:HXML; var datalen:int):PAnsiChar;cdecl;
- deepCopy :function(node:HXML):HXML;cdecl;
- setAttrByIndex :procedure(node:HXML; i:int; value:PAnsiChar);cdecl;
- setAttrByName :procedure(node:HXML; name:PAnsiChar; value:PAnsiChar);cdecl;
- addChildEx :function(parent:HXML; name:PAnsiChar; isDeclaration:boolean;
- n:XML_ELEMENT_POS):HXML;cdecl;
- addChildEx2 :procedure(child:HXML; parent:HXML; n:XML_ELEMENT_POS);cdecl;
- getTextCount :function(node:HXML):int;cdecl;
- getTextByIndex :function(node:HXML; i:int):PAnsiChar;cdecl;
- addText :procedure(node:HXML; txt:PAnsiChar; n:XML_ELEMENT_POS);cdecl;
- setTextByIndex :procedure(node:HXML; i:int; txt:PAnsiChar);cdecl;
- getClearCount :function(node:HXML):int;cdecl;
- getClear :function(node:HXML; i:int; var openTag:PAnsiChar;
- var closeTag:PAnsiChar):PAnsiChar;cdecl;
- addClear :procedure(node:HXML; lpszValue:PAnsiChar; openTag:PAnsiChar;
- closeTag:PAnsiChar; n:XML_ELEMENT_POS);cdecl;
- setClear :procedure(node:HXML; i:int; lpszValue:PAnsiChar);cdecl;
- getElementCount :function(node:HXML):int;cdecl;
- getElement :function(node:HXML; n:XML_ELEMENT_POS; var _type:XML_ELEMENT_TYPE;
- var child:HXML;var value:PAnsiChar; var name:PAnsiChar;
- var openTag:PAnsiChar; var closeTag:PAnsiChar):int;cdecl;
- // With getElement() it's possible to enumerate all the different contents
- // (attribute,child,text, clear) of the current node. The order is reflecting the order
- // of the original file/string. NOTE: 0 <= i < getElementCount().
- // type, child, value, name, openTag, closeTag will be filled on return, depending on type:
- // for XML_ELEM_TYPE_CHILD , child is valid;
- // for XML_ELEM_TYPE_ATTRIBUTE, name and value are valid;
- // for XML_ELEM_TYPE_TEXT , value is valid;
- // for XML_ELEM_TYPE_CLEAR , value, openTag and closeTag are valid.
-
- deleteNodeContent:procedure(node:HXML);cdecl; // forces the deletion of the content of this node and the subtree
- deleteAttrByIndex:procedure(node:HXML; i:int);cdecl;
- deleteAttrByName :procedure(node:HXML; name:PAnsiChar);cdecl;
- deleteText :procedure(node:HXML; i:int);cdecl;
- deleteClear :procedure(node:HXML; i:int);cdecl;
-
- positionOfChildByIndex:function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- positionOfChildByNode :function(node:HXML; node1:HXML):XML_ELEMENT_POS;cdecl;
- positionOfChildByName :function(node:HXML; name:PAnsiChar; i:int):XML_ELEMENT_POS;cdecl;
- positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- end;
-
- XML_API_W = record
- cbSize :size_t;
-
- createNode :function(const name, text:PWideChar; IsDeclaration:boolean):HXML;cdecl;
- destroyNode :procedure(node:HXML);cdecl;
-
- parseString :function(const str:PWideChar; datalen:pint; const tag:PWideChar):HXML;cdecl;
- toString :function(node:HXML;datalen:pint):PWideChar;cdecl;
-
- addChild :function(parent:HXML; const name,text:PWideChar):HXML;cdecl;
- addChild2 :procedure(child,parent:HXML);cdecl;
- copyNode :function(parent:HXML):HXML;cdecl;
- getChild :function(parent:HXML;number:int):HXML;cdecl;
- getChildCount :function(h:HXML):int;cdecl;
- getChildByAttrValue:function(parent:HXML; const name,attrName,attrValue:PWideChar):HXML;cdecl;
- getFirstChild :function(parent:HXML):HXML;cdecl;
- getNthChild :function(parent:HXML; const name:PWideChar; i:int):HXML;cdecl;
- getNextChild :function(parent:HXML; const name:PWideChar; i:pint):HXML;cdecl;
- getChildByPath :function(parent:HXML; const path:PWideChar;createNodeIfMissing:boolean):HXML;cdecl;
- getNextNode :function(node:HXML):HXML;cdecl;
- getName :function(h:HXML):PWideChar;cdecl;
- getParent :function(h:HXML):HXML;cdecl;
- getText :function(h:HXML):PWideChar;cdecl; // = getTextByIndex(HXML, 0)
- setText :procedure(h:HXML;value:PWideChar);cdecl; // = setTextByIndex(HXML, LPCTSTR, 0)
-
- getAttr :function(h:HXML;i:int):PWideChar;cdecl;
- getAttrName :function(h:HXML;i:int):PWideChar;cdecl;
- getAttrValue :function(h:HXML;const attrName:PWideChar):PWideChar;cdecl;
- getAttrCount :function(h:HXML):int;cdecl;
- addAttr :procedure(h:HXML;const attrName,attrValue:PWideChar);cdecl;
- addAttrInt :procedure(h:HXML; const attrName:PWideChar;attrValue:int);cdecl;
-
- freeMem :procedure(arg:pointer);cdecl;
-
- // #if MIRANDA_VER >= 0x0900, methods added in XML API v2
- isDeclaration :function(node:HXML):boolean;cdecl;
- toStringWithFormatting:function(node:HXML; var datalen:int):PWideChar;cdecl;
- deepCopy :function(node:HXML):HXML;cdecl;
- setAttrByIndex :procedure(node:HXML; i:int; value:PWideChar);cdecl;
- setAttrByName :procedure(node:HXML; name:PWideChar; value:PWideChar);cdecl;
- addChildEx :function(parent:HXML; name:PWideChar; isDeclaration:boolean;
- n:XML_ELEMENT_POS):HXML;cdecl;
- addChildEx2 :procedure(child:HXML; parent:HXML; n:XML_ELEMENT_POS);cdecl;
- getTextCount :function(node:HXML):int;cdecl;
- getTextByIndex :function(node:HXML; i:int):PWideChar;cdecl;
- addText :procedure(node:HXML; txt:PWideChar; n:XML_ELEMENT_POS);cdecl;
- setTextByIndex :procedure(node:HXML; i:int; txt:PWideChar);cdecl;
- getClearCount :function(node:HXML):int;cdecl;
- getClear :function(node:HXML; i:int; var openTag:PWideChar;
- var closeTag:PWideChar):PWideChar;cdecl;
- addClear :procedure(node:HXML; lpszValue:PWideChar; openTag:PWideChar;
- closeTag:PWideChar; n:XML_ELEMENT_POS);cdecl;
- setClear :procedure(node:HXML; i:int; lpszValue:PWideChar);cdecl;
- getElementCount :function(node:HXML):int;cdecl;
- getElement :function(node:HXML; n:XML_ELEMENT_POS; var _type:XML_ELEMENT_TYPE;
- var child:HXML;var value:PWideChar; var name:PWideChar;
- var openTag:PWideChar; var closeTag:PWideChar):int;cdecl;
- // With getElement() it's possible to enumerate all the different contents
- // (attribute,child,text, clear) of the current node. The order is reflecting the order
- // of the original file/string. NOTE: 0 <= i < getElementCount().
- // type, child, value, name, openTag, closeTag will be filled on return, depending on type:
- // for XML_ELEM_TYPE_CHILD , child is valid;
- // for XML_ELEM_TYPE_ATTRIBUTE, name and value are valid;
- // for XML_ELEM_TYPE_TEXT , value is valid;
- // for XML_ELEM_TYPE_CLEAR , value, openTag and closeTag are valid.
-
- deleteNodeContent:procedure(node:HXML);cdecl; // forces the deletion of the content of this node and the subtree
- deleteAttrByIndex:procedure(node:HXML; i:int);cdecl;
- deleteAttrByName :procedure(node:HXML; name:PWideChar);cdecl;
- deleteText :procedure(node:HXML; i:int);cdecl;
- deleteClear :procedure(node:HXML; i:int);cdecl;
-
- positionOfChildByIndex:function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- positionOfChildByNode :function(node:HXML; node1:HXML):XML_ELEMENT_POS;cdecl;
- positionOfChildByName :function(node:HXML; name:PWideChar; i:int):XML_ELEMENT_POS;cdecl;
- positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
- end;
-
-// every protocol should declare this variable to use the XML API
-//const
-// extern XML_API xi;
-
-const
-{
-a service to obtain the XML API
-
-wParam = 0;
-lParam = (LPARAM)(XML_API*).
-
-returns TRUE if all is Ok, and FALSE otherwise
-}
- MS_SYSTEM_GET_XI:PAnsiChar = 'Miranda/System/GetXmlApi';
-(*
-__forceinline int mir_getXI( XML_API* dest )
-{
- dest->cbSize = sizeof(*dest);
- return CallService( MS_SYSTEM_GET_XI, 0, (LPARAM)dest );
-}
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_DataAsMessage.inc b/delphi/Awkward/include/reserve/helpers/m_DataAsMessage.inc
deleted file mode 100644
index b7a60ca..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_DataAsMessage.inc
+++ /dev/null
@@ -1,155 +0,0 @@
-{
- DataAsMessage plugin for Miranda IM
- Copyright (c) 2006 Chervov Dmitry
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-
-{$IFNDEF M_DATAASMESSAGE}
-{$DEFINE M_DATAASMESSAGE}
-
-const
-// DAM_SENDRESULTINFO::iResult values
- DAM_SR_SUCCESS = 0;
- DAM_SR_TIMEOUT = 1; // timeout period expired; this value is returned
- // also if the contact went offline for a time
- // longer than a timeout period
- DAM_SR_NOTSUPPORTED = 2; // means this szDataType is not supported by the
- // remote side
- DAM_SR_NODAM = 3; // means there is no DataAsMessage plugin on the
- // remote side; keep in mind that this error may
- // also appear accidentally because of a bad
- // connectivity during the handshake (if there
- // was a timeout when waiting for a response)
- DAM_SR_CANCELLEDLOCAL = 4; // cancelled from the local(sending) side
- DAM_SR_CANCELLEDREMOTE = 5; // cancelled from the remote(receiving) side
- DAM_SR_BADCRC = 6; // bad CRC; we can't do anything with this error. presumably, it will happen rarely, and the most probable cause is the protocol that filters some of characters in our messages OR it may be a bug in DataAsMessage plugin (hopefully not ;) ).
- DAM_SR_UNKNOWN = 7; // unknown error
-
-// Return values for DAM_SENDRESULTPROC
- DAM_SRA_RETRY = 1;
-
-type
-// hContact, szDataType and SessionID fields correspond to the fields of the
-// DAM_SENDDATAINFO structure
- PDAM_SENDRESULTINFO = ^TDAM_SENDRESULTINFO;
- TDAM_SENDRESULTINFO = record
- cbSize :int; // sizeof(DAM_SENDRESULTINFO)
- hContact :THANDLE;
- szDataType:PAnsiChar;
- SessionID :dword;
- iResult :int; // transmission result code
- end;
-
-type
- TDAM_SENDRESULTPROC = function(sri:PDAM_SENDRESULTINFO):int; cdecl;
-// this procedure receives the result of the transmission. it's called when the
-// session closes (either the data was sent successfully or there was an error)
-// you can return DAM_SRA_RETRY when iResult is DAM_SR_TIMEOUT if you want to
-// retry sending
-
-const
-// DAM_SENDDATAINFO::Flags constants
- DAM_SDF_DONTPACK = 1; // don't pack the data (by default all the data is packed)
- DAM_SDF_NOTIMEOUT = 2; // don't generate a timeout error ever, keep trying to
- // send the data. If the contact is offline, the data
- // is saved in the memory until the contact goes online.
- // Loss of the data occurs only if the sender's miranda
- // closes (this may change in future to allow fully
- // functional offline sending that will guarantee the
- // data to be sent in any case, but of course the
- // sending starts only when the both contacts are
- // online). other errors than the timeout error can be
- // still generated though.
-
-type
- TDAM_SENDDATAINFO = record
- cbSize :int; // sizeof(DAM_SENDDATAINFO)
- hContact :THANDLE;
- szDataType:PAnsiChar; // zero-terminated string, containing data type,
- // preferably in format "YourPluginName" or
- // "YourPluginName/Something" (make sure this string
- // won't coincide by an accident with someone else's
- // string!). you can identify your data by this ID later
- nDataLen :int; // keep in mind that if the length is too big (more than
- // about 8 KB), it's more preferable to split your data
- // into several chunks, as you won't be able to "pick
- // up" your data at the other end until all the data is
- // transferred
- cData :PAnsiChar;
- Flags :int; // combination of the DAM_SDF_ constants
- SendAfterSessionID:dword; // may be NULL; otherwise it's guaranteed that the
- // sending starts only after successful completion
- // of SendAfterSessionID session
- SendResultProc:TDAM_SENDRESULTPROC; // pointer to a procedure that receives
- // the result; can be NULL
- SessionID :dword; // OUT; receives the session ID
- end;
-
-const
-// MS_DAM_SENDDATA return values
- DAM_SDA_NOERROR = 0;
- DAM_SDA_NOTSUPPORTED = -1; // contact's protocol doesn't support sending/
- // receiving messages
- DAM_SDA_TOOMANYSESSIONS = -2; // too many sessions
-
-// MS_DAM_SENDDATA
-// sends the data
-// wParam = (WPARAM)(DAM_SENDDATAINFO*)sdi;
-// lParam = 0
-// Returns 0 (DAM_SDA_NOERROR) and fills SessionID if the session was queued for sending successfully; returns one of the DAM_SDA_ values on failure
- MS_DAM_SENDDATA = 'DataAsMessage/SendData';
-
-function DAMSendData(hContact:THANDLE; szDataType:PAnsiChar; nDataLen:int;
- cData:PAnsiChar; Flags:int; SendAfterSessionID:dword;
- SendResultProc:TDAM_SENDRESULTPROC;pSessionID:pdword):int;
-var
- sdi:TDAM_SENDDATAINFO;
-begin
- FillChar(sdi,SizeOf(sdi),0);
- sdi.cbSize :=SizeOf(sdi);
- sdi.hContact :=hContact;
- sdi.szDataType:=szDataType;
- sdi.nDataLen :=nDataLen;
- sdi.cData :=cData;
- sdi.Flags :=Flags;
- sdi.SendAfterSessionID:=SendAfterSessionID;
- sdi.SendResultProc :=SendResultProc;
- Result:=CallService(MS_DAM_SENDDATA,dword(@sdi),0);
- if pSessionID<>nil then
- pSessionID^:=sdi.SessionID;
-end;
-
-type
- TDAM_RECVDATAINFO = record
- cbSize :int; // sizeof(DAM_RECVDATAINFO)
- hContact :THANDLE;
- szDataType:PAnsiChar;
- nDataLen :int;
- cData :PAnsiChar;
- end;
-
-const
-// ME_DAM_RECVDATA
-// hook up to this event to check for incoming data
-// make sure rdi->szDataType is yours before doing anything!
-// The important thing here is that your plugin will receive TWO ME_DAM_RECVDATA notifications on every single MS_DAM_SENDDATA call from a remote side:
-// The first notification arrives when the remote side starts to transmit the data. In this case DAM_RECVDATAINFO::cData = NULL (and DAM_RECVDATAINFO::nDataLen = -1) as we didn't receive any data yet. Return 1 to indicate that your plugin recognized the DAM_RECVDATAINFO::szDataType, otherwise return 0. If there are no any plugin that recognized the data, DAM cancels the transfer and there won't be any second notification for it.
-// The second notification is when the data is transmitted successfully. nDataLen contains the usual data size and cData points to the data buffer. cData is guaranteed to be valid only during the ME_DAM_RECVDATA call. You must copy the data to your own plugin's memory if you need it later. again, return 1 to indicate that your plugin recognized the data, otherwise return 0
-// wParam = (WPARAM)(DAM_RECVDATAINFO*)rdi;
-// lParam = 0
- ME_DAM_RECVDATA = 'DataAsMessage/RecvData';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_contactdir.inc b/delphi/Awkward/include/reserve/helpers/m_contactdir.inc
deleted file mode 100644
index 1b21717..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_contactdir.inc
+++ /dev/null
@@ -1,164 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2005 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CONTACTDIR}
-{$DEFINE M_CONTACTDIR}
-
-{ Contactdir module was created on 2005/05/17, 0.4.0.1
-
- -- How you use this module as a protocol --
-
- On Load() Register your protocol with the setting name that stores unique IDs, example:
-
- if ( ContactDir_SupportExists() ) g_Atom=ContactDir_Register("ICQ", "UIN");
-
- This will register your protocol and walk the database looking for all contacts on PROTOCOL_NAME which have
- a "UIN" setting and store it in memory (converting to a string as needed) You of course have to
- provide fallback if the services don't exist, it's an idea to keep existing code for that.
-
- -
-
- When you add a new contact via MS_DB_CONTACT_ADD, you must register it with your protocol atom too, via
- ContactDir_AddContact(atom, "UIN #", hContact) and when it is deleted ContactDir_RemoveContact(atom, "UIN #")
-
- -
-
- To find a contact, use ContactDir_Lookup(atom, "ICQ #") which will return the hContact.
-}
-
-type
- PCONTACTDIRECTORYDESCRIPTOR = ^TCONTACTDIRECTORYDESCRIPTOR;
- TCONTACTDIRECTORYDESCRIPTOR = record
- cbSize :int;
- szProto :PAnsiChar;
- szSetting:PAnsiChar;
- atom :THANDLE; // out arg
- end;
-
-{
- wParam: 0
- lParam: (LPARAM) &CONTACTDIRECTORYDESCRIPTOR;
- Affect: Register a given protocol and it's setting name which contains the unique key entry. e.g. ("ICQ", "UIN")
- and return a HANDLE for use with other lookup services.
- Returns: 0 on success, non zero on failure -- a returned handle is in .atom
- Note: The directory will convert dword values into string representations but will not do this for bytes or words
- used as IDs -- the protocol has to convert the IDs itself (:
- Note: See ContactDir_Register() for a quicker way.
- *** WARNING ***: This service does not expect the given module name to have registered as a protocol module, it
- completely bypasses this information.
- Version: 0.4.0.1 (2005/05/17+)
-}
-const
- MS_CONTACTDIR_REGISTER = 'ContactDir/Register';
-
-type
- PCONTACTDIRECTORYLOOKUP = ^TCONTACTDIRECTORYLOOKUP;
- TCONTACTDIRECTORYLOOKUP = record
- cbSize :int;
- atom :THANDLE; // Atom handle from MS_CONTACTDIR_REGISTER
- szID :PAnsiChar; // in: value you wish to find (makes its own copy if needed)
- hContact:THANDLE; // out: hContact associated with szID, if any.
- end;
-
-{
- wParam: 0
- lParam: (LPARAM) &CONTACTDIRECTORYLOOKUP;
- Affect: Given an atom and string ID, will find the associated DB hContact value
- Returns: 0 on success, non zero on failure
- Version: 0.4.0.1 (2005/05/17+)
- Note: ContactDir_Lookup() helper macro might be of use.
-}
-const
- MS_CONTACTDIR_LOOKUP = 'ContactDir/Lookup';
-
-{
- wParam: 0
- lParam: (LPARAM)&CONTACTDIRECTORYLOOKUP;
- Affect: Add a contact to a protocol atom association.
- Returns: 0 on success, non zero on failure
- Version: 0.4.0.1 (2005/05/17+)
- Note: You must call this when you create a contact with MS_DB_CONTACT_ADD, see ContactDir_AddContact()
-}
- MS_CONTACTDIR_ADDCONTACT = 'ContactDir/AddContact';
-
-{
- wParam: 0
- lParam: (LPARAM)&CONTACTDIRECTORYLOOKUP;
- Affect: Remove a contact to a protocol atom association.
- Returns: 0 on success, non zero on failure
- Version: 0.4.0.1 (2005/05/17+)
- Note: see ContactDir_RemoveContact()
-}
- MS_CONTACTDIR_REMOVECONTACT = 'ContactDir/RemoveContact';
-
-(*
-/* -- Helper functions -- */
-
-static int ContactDir_SupportExists(void)
-{
- return ServiceExists(MS_CONTACTDIR_REGISTER);
-}
-
-// Only take as valid if ContactDir_SupportExists() returns true.
-static HANDLE ContactDir_Register(AnsiChar * szProto, AnsiChar * szSetting)
-{
- CONTACTDIRECTORYDESCRIPTOR cd;
- cd.cbSize=sizeof(CONTACTDIRECTORYDESCRIPTOR);
- cd.szProto=szProto;
- cd.szSetting=szSetting;
- cd.atom=NULL;
- CallService(MS_CONTACTDIR_REGISTER, 0, (LPARAM)&cd);
- return cd.atom;
-}
-
-static __inline HANDLE ContactDir_Lookup(HANDLE atom, AnsiChar * szID)
-{
- CONTACTDIRECTORYLOOKUP f;
- f.cbSize=sizeof(f);
- f.atom=atom;
- f.szID=szID;
- f.hContact=NULL;
- CallService(MS_CONTACTDIR_LOOKUP, 0, (LPARAM)&f);
- return f.hContact;
-}
-
-static __inline void ContactDir_AddContact(HANDLE atom, AnsiChar * szID, HANDLE hContact)
-{
- CONTACTDIRECTORYLOOKUP c = {0};
- c.cbSize=sizeof(CONTACTDIRECTORYLOOKUP);
- c.atom=atom;
- c.szID=szID;
- c.hContact=hContact;
- CallService(MS_CONTACTDIR_ADDCONTACT, 0, (LPARAM)&c);
-}
-
-static __inline void ContactDir_RemoveContact(HANDLE atom, AnsiChar * szID)
-{
- CONTACTDIRECTORYLOOKUP c = {0};
- c.cbSize=sizeof(CONTACTDIRECTORYLOOKUP);
- c.atom=atom;
- c.szID=szID;
- c.hContact=NULL;
- CallService(MS_CONTACTDIR_REMOVECONTACT, 0, (LPARAM)&c);
-}
-*)
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/helpers/m_folders.inc b/delphi/Awkward/include/reserve/helpers/m_folders.inc
deleted file mode 100644
index 0e55237..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_folders.inc
+++ /dev/null
@@ -1,272 +0,0 @@
-{
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FOLDERS}
-{$DEFINE M_FOLDERS}
-
-const
- FOLDERS_API = 501; //dunno why it's here but it is :)
-
- PROFILE_PATH = '%profile_path%';
- CURRENT_PROFILE = '%current_profile%';
- MIRANDA_PATH = '%miranda_path%';
- PLUGINS_PATH = '%miranda_path%\plugins';
- MIRANDA_USERDATA = '%miranda_userdata%';
-
- PROFILE_PATHW = '%profile_path%';
- CURRENT_PROFILEW = '%current_profile%';
- MIRANDA_PATHW = '%miranda_path%';
- MIRANDA_USERDATAW = '%miranda_userdata%';
-
- FOLDER_AVATARS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\avatars';
- FOLDER_VCARDS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\vcards';
- FOLDER_LOGS = PROFILE_PATH+'\'+CURRENT_PROFILE+'\logs';
- FOLDER_RECEIVED_FILES = PROFILE_PATH+'\'+CURRENT_PROFILE+'\received files';
- FOLDER_DOCS = MIRANDA_PATH+'\'+'docs';
-
- FOLDER_CONFIG = PLUGINS_PATH+'\config';
- FOLDER_SCRIPTS = MIRANDA_PATH+'\scripts';
- FOLDER_UPDATES = MIRANDA_PATH+'\updates';
-
- FOLDER_CUSTOMIZE = MIRANDA_PATH+'\customize';
- FOLDER_CUSTOMIZE_SOUNDS = FOLDER_CUSTOMIZE+'\sounds';
- FOLDER_CUSTOMIZE_ICONS = FOLDER_CUSTOMIZE+'\icons';
- FOLDER_CUSTOMIZE_SMILEYS = FOLDER_CUSTOMIZE+'\smileys';
- FOLDER_CUSTOMIZE_SKINS = FOLDER_CUSTOMIZE+'\skins';
- FOLDER_CUSTOMIZE_THEMES = FOLDER_CUSTOMIZE+'\themes';
-
- FOLDERS_NAME_MAX_SIZE = 64; //maximum name and section size
-
- FF_UNICODE = $00000001;
-
-type
- TFOLDERSDATA = packed record
- cbSize:integer; //size of struct
- //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- szSection:array [0..FOLDERS_NAME_MAX_SIZE-1] of AnsiChar;
- szName :array [0..FOLDERS_NAME_MAX_SIZE-1] of AnsiChar; //entry name - will be shown in options
- szFormat :TCHAR; // default string format. Fallback string in case
- // there's no entry in the database for this
- // folder. This should be the initial value for
- // the path, users will be able to change it later.
- flags :DWORD; // FF_* flags
- end;
-
-const
-{
- Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-}
- MS_FOLDERS_REGISTER_PATH = 'Folders/Register/Path';
-
-{
- Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-}
- MS_FOLDERS_GET_SIZE = 'Folders/Get/PathSize';
-
-type
- TFOLDERSGETDATA = packed record
- cbSize:integer;
- nMaxPathSize:integer; // maximum size of buffer. This represents the number
- // of characters that can be copied to it (so for
- // unicode strings you don't send the number of
- // bytes but the length of the string).
- szPath:TChar; //pointer to the buffer that receives the path without the last "\\"
- end;
-
-const
-{
- Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-}
- MS_FOLDERS_GET_PATH = 'Folders/Get/Path';
-
-type
- TFOLDERSGETALLOCDATA = packed record
- cbSize:integer;
- szPath:^TCHAR; // address of a string variable where the path should be
- // stored (the last \ won't be copied).
- end;
-
-const
-{
- Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-}
- MS_FOLDERS_GET_PATH_ALLOC = 'Folders/Get/Path/Alloc';
-
-{
- Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-}
- ME_FOLDERS_PATH_CHANGED = 'Folders/On/Path/Changed';
-
-(*
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don't want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const AnsiChar *section, const AnsiChar *name, const AnsiChar *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const AnsiChar *section, const AnsiChar *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, AnsiChar *path, const int size, AnsiChar *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- AnsiChar buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathEx(HANDLE hFolderEntry, AnsiChar *path, const int size, AnsiChar *notFound, AnsiChar *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- AnsiChar buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-#endif
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_hotkeysservice.inc b/delphi/Awkward/include/reserve/helpers/m_hotkeysservice.inc
deleted file mode 100644
index fbde963..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_hotkeysservice.inc
+++ /dev/null
@@ -1,218 +0,0 @@
-{$IFNDEF M_HOTKEYSSERVICE}
-{$DEFINE M_HOTKEYSSERVICE}
-
-const
- HKS_SERVICE_NAME = 'HotkeysService';
-
-// Modifiers for hotkeys
-// MOD_ALT = $0001;
-// MOD_CONTROL = $0002;
-// MOD_SHIFT = $0004;
-// MOD_WIN = $0008;
- MOD_GLOBAL = $0010;
-
-// FLAGS
-// inherit modifiers from group (specified modifiers ignored)
- HKS_ACTION_SHAREMODIFIERS = 1;
-// register item, but disable
- HKS_INITIALLY_DISABLED = 2;
-
-// Structure of hotkey
-type
- PHKSHotkey = ^THKSHotkey;
- THKSHotkey = record
- case boolean of
- false: (
- key :WORD;
- modifiers:WORD;);
- true: (hotkey:DWORD)
- end;
-
-const
-// ITEM TYPES
- HKS_ITEM_MODULE = 1;
- HKS_ITEM_GROUP = 2;
- HKS_ITEM_ACTION = 3;
- HKS_ITEM_MACRO = 4;
-
-// Structure passed to RegisterItem service.
-// Used only for registration pursposes, so free it after call.
-// name, owner and itemType field is mandatory.
-// owner is item ID or must be 0 for 1st level items (module, single action or macro)
-// itemType can be one of ITEM TYPES constants.
-// flags can be combined from FLAGS constants.
-// Group can contain other groups and items and optionally
-// set group modifiers. Only item can be tree leaf.
-// If creating group, hotkey.modifiers will be used
-// as group modifiers (if nonzero)
-// If creating action, hotkey is optional. If hotkey.key is filled, then
-// hotkey will be assigned to item (if unused).
-// If creating macro, hotkey is mandatory.
-
-type
- PHKSItem = ^THKSItem;
- THKSItem = record
- owner :int;
- name :PAnsiChar;
- itemType:int;
- hotkey :THKSHotkey;
- flags :int;
- end;
-
-const
-{
- Register item
- wParam: item data in PKHSItem format
- lParam: 0
- Returns HANDLE called "ID" in loWord.
- For actions and macros, hiWord returns state: 0 if ok, other if passed hotkey
- can't be registered (for example already used)
- In other cases hiWord is useless
-}
- MS_HKS_REGISTER_ITEM = 'HotkeysService/RegisterItem';
-
-{
- Unregister item
- If item is Group, then all subItems will be unregistered.
- wParam: item ID
- lParam: 0
- Returns: 0 on success, other on fail
-}
- MS_HKS_UNREGISTER_ITEM = 'HotkeysService/UnregisterItem';
-
-{
- Assign hotkey to item. If item is group, then only
- modifiers are taken as group modifiers. Do not call on modules.
- Hotkey consists of modifiers in hiWord and key in loWord.
- wParam: item ID
- lParam: hotkey as PHKS_Hotkey to register
- Returns:
- on success: hotkey
- on error: 0
-}
- MS_HKS_ASSIGN_HOTKEY = 'HotkeysService/AssignHotkey';
-
-{
- Get hotkey assigned to item. Don't apply to modules.
- wParam: item ID
- lParam: 0
- Returns: hotkey assigned, 0 otherwise.
-}
- MS_HKS_GET_HOTKEY = 'HotkeysService/GetAssignedHotkey';
-
-{
- Unassign hotkey from item. Only valid on action and macro items.
- wParam: item ID
- lParam: 0
- Returns: 0 on success, other on fail
-}
- MS_HKS_UNASSIGN_HOTKEY = 'HotkeysService/UnassignHotkey';
-
-{
- Enable/Disable item.
- If item is group or module, then all subItems will be affected.
- wParam: item ID
- lParam: 1 to enable, anything else to disable
- Returns: 0 on success, other on fail
-}
- MS_HKS_ENABLE_ITEM = 'HotkeysService/EnableItem';
-
-{
- Hotkey to text
- wParam: hotkey to textify
- lParam: address to place string, space must be allocated
- Returns: 0
-}
- MS_HKS_TO_TEXT = 'HotkeysService/HotkeyToText';
-
-{
- Get hotkey from text
- wParam: text to convert to hotkey
- lParam: 0
- Returns: hotkey
-}
- MS_HKS_FROM_TEXT = 'HotkeysService/HotkeyFromText';
-
-type
- PHKSEvent = ^TTHKSEvent;
- THKSEvent = record
- itemId :int;
- moduleId:int;
- name :PAnsiChar;
- itemType:int;
- hotkey :THKSHotkey;
- end;
-
-const
-{
- Event when hotkey is pressed
- wParam: PHKSEvent
- lParam: 0
-}
- ME_HKS_KEY_PRESSED = 'HotkeysService/HotkeyPressed';
-
-// Util functions ////////////////////////////////////////////////////////////////////////
-(*
-static int HKS_RegisterModule(AnsiChar *name)
-{
- THKSItem item = {0};
-
- if (!ServiceExists(MS_HKS_REGISTER_ITEM))
- return -1;
-
- item.name = name;
- item.itemType = HKS_ITEM_MODULE;
-
- return LOWORD(CallService(MS_HKS_REGISTER_ITEM, (WPARAM) &item, 0));
-}
-
-
-static int HKS_RegisterAction(int owner, AnsiChar *name, int modifiers, AnsiChar key, int flags)
-{
- THKSItem item = {0};
-
- if (!ServiceExists(MS_HKS_REGISTER_ITEM))
- return -1;
-
- item.owner = owner;
- item.name = name;
- item.itemType = HKS_ITEM_ACTION;
- item.flags = flags;
-
- if (key != 0)
- {
- item.hotkey.key = (WORD) key;
- item.hotkey.modifiers = modifiers;
- }
-
- return LOWORD(CallService(MS_HKS_REGISTER_ITEM, (WPARAM) &item, 0));
-}
-
-
-static int HKS_RegisterGroup(int owner, AnsiChar *name, int modifiers, int flags)
-{
- THKSItem item = {0};
-
- if (!ServiceExists(MS_HKS_REGISTER_ITEM))
- return -1;
-
- item.owner = owner;
- item.name = name;
- item.itemType = HKS_ITEM_GROUP;
- item.flags = flags;
- item.hotkey.modifiers = modifiers;
-
- return LOWORD(CallService(MS_HKS_REGISTER_ITEM, (WPARAM) &item, 0));
-}
-
-static int HKS_Unregister(int id)
-{
- THKSItem item = {0};
-
- if (!ServiceExists(MS_HKS_UNREGISTER_ITEM))
- return -1;
-
- return CallService(MS_HKS_UNREGISTER_ITEM, (WPARAM) id, 0);
-}
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_magneticWindows.inc b/delphi/Awkward/include/reserve/helpers/m_magneticWindows.inc
deleted file mode 100644
index 885760f..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_magneticWindows.inc
+++ /dev/null
@@ -1,72 +0,0 @@
-{$IFNDEF M_MAGNETICWINDOWS}
-{$DEFINE M_MAGNETICWINDOWS}
-
-const
-// For other Plugins to start snapping for their windows
-// wparam: hwnd of window
-// lparam: 0
-// return: 0 on success, 1 on error
- MS_MW_ADDWINDOW = 'Utils/MagneticWindows/Add';
-
-// For other Plugins to stop snapping for their windows
-// wparam: hwnd of window
-// lparam: 0
-// return: 0 on success, 1 on error
- MS_MW_REMWINDOW = 'Utils/MagneticWindows/Rem';
-
-//decide where to align on the list:
- MS_MW_STL_List_Left = $00000001; //Snaps the window to the left border of the list
- MS_MW_STL_List_Top = $00000002; //Snaps the window to the top border of the list
- MS_MW_STL_List_Right = $00000004; //Snaps the window to the right border of the list
- MS_MW_STL_List_Bottom = $00000008; //Snaps the window to the bottom border of the list
-//decide with what side (of the window you want to snap) to snap to the list
- MS_MW_STL_Wnd_Left = $00000010; //Snaps the window with the left border to the left/right side of the list
- MS_MW_STL_Wnd_Top = $00000020; //Snaps the window with the top border to the top/bottom side of the list
- MS_MW_STL_Wnd_Right = $00000040; //Snaps the window with the right border to the left/right side of the list
- MS_MW_STL_Wnd_Bottom = $00000080; //Snaps the window with the bottom border to the top/bottom side of the list
-
- MS_MW_STL_Wnd_FullWidth = (MS_MW_STL_Wnd_Left or MS_MW_STL_Wnd_Right);
- //Snaps to the top/bottom of the list and spans over the full width
-
- MS_MW_STL_Wnd_FullHeight = (MS_MW_STL_Wnd_Top or MS_MW_STL_Wnd_Bottom);
- //Snaps to the left/right of the list and spans over the full height
-
-// to place the window in the list combine f.e.
-// MS_MW_STL_List_Left | MS_MW_STL_Wnd_Right | *vetical alignment*
-
-//For other Plugins to snap a window to the list for other Plugins
-// wparam: hwnd of window
-// lparam: combination of the above constants MS_MW_STL_*
-// return: 0 on success, 1 on error
- MS_MW_SNAPTOLIST = 'Utils/MagneticWindows/SnapToList';
-
-// Helper functions
-{$IFNDEF MW_NO_HELPPER_FUNCTIONS}
-
-function MagneticWindows_AddWindow(hWnd:HWND):integer;
-begin
- if ServiceExists(MS_MW_ADDWINDOW)<>0 then
- result:=CallService(MS_MW_ADDWINDOW,hWnd,0);
- else
- result:=-1;
-end;
-
-function MagneticWindows_RemoveWindow(hWnd:HWND):integer;
-begin
- if ServiceExists(MS_MW_REMWINDOW)<>0 then
- result:=CallService(MS_MW_REMWINDOW,hWnd,0);
- else
- result:=-1;
-end;
-
-function MagneticWindows_SnapWindowToList(hWnd:HWND;MS_MW_STL_Options:integer):integer;
-begin
- if (ServiceExists(MS_MW_SNAPTOLIST))
- result:=CallService(MS_MW_SNAPTOLIST,hWnd,MS_MW_STL_Options);
- else
- result:=-1;
-end;
-
-{$ENDIF}
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_notify.inc b/delphi/Awkward/include/reserve/helpers/m_notify.inc
deleted file mode 100644
index 572adc0..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_notify.inc
+++ /dev/null
@@ -1,266 +0,0 @@
-{$IFNDEF M_NOTIFY}
-{$DEFINE M_NOTIFY}
-
-{** Miranda Notify Dispatcher ************************************************
-Notify Dispatcher provides common interface to different notification plugins
-like osd, popup, ticker etc.
-******************************************************************************}
-
-const
-{ Options UI event and service. The same as for miranda options }
- ME_NOTIFY_OPT_INITIALISE = 'Notify/Opt/Initialise';
- MS_NOTIFY_OPT_ADDPAGE = 'Notify/Opt/AddPage';
-
-type
- tagMNOTIFYACTIONINFO = record
- icon :HICON;
- name :array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
- service:array [0..MAXMODULELABELLENGTH-1] of AnsiChar;
- cookie :DWORD;
- end;
- MNOTIFYACTIONINFO = tagMNOTIFYACTIONINFO;
-
-// Just like miranda pluginLink... This should work faster then services,
-// we need some reactivity in notifications.
-type
- tagMNNOTIFYLINK = record
- // Create a new notification type
- function Register(name:PAnsiChar;icon:HICON):THANDLE;cdecl;
-
- // Create a new notification object
- function Create(atype:THANDLE):THANDLE;cdecl;
-
- // Check is handle is a valid notification object
- function IsValid(notify:THANDLE):integer;cdecl;
-
- // Set/get information about object, or type defaults
- function Set(notifyORtype:THANDLE;name:PAnsiChar;val:TDBVARIANT):integer;cdecl;
- function Get(notifyORtype:THANDLE;name:PAnsiChar;val:PDBVARIANT):integer;cdecl;
-
- // Set/get actions
- function AddAction (notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar;cookie:DWORD):integer;cdecl;
- function GetActions(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):integer;cdecl;
-
- // Increment/decrement refer count of notification object. Unreferred objects are destroyed
- function AddRef (notify:THANDLE):integer;cdecl;
- function Release(notify:THANDLE):integer;cdecl;
-
- // Notify user
- procedure Show (notify:THANDLE);cdecl;
- procedure Update(notify:THANDLE);cdecl;
- procedure Remove(notify:THANDLE);cdecl;
- end;
- PMNOTIFYLINK = ^TMNOTIFYLINK;
- TMNOTIFYLINK = tagMNOTIFYLINK;
-
-const
-// Get the MNOTIFYLINK struct
-// result = (LRESULT)(MNOTIFYLINK* )notifyLink
- MS_NOTIFY_GETLINK = 'Notify/GetLink';
-
-// Hook this to process corresponding actions
- ME_NOTIFY_SHOW = 'Notify/Show';
- ME_NOTIFY_UPDATE = 'Notify/Update';
- ME_NOTIFY_REMOVE = 'Notify/Remove';
-
-var
- notifyLink:PMNOTIFYLINK;
-(*
-function MNotifyRegister(name:PAnsiChar;icon:HICON):THANDLE;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Register(name,icon)
- else
- result:=0;
-end;
-function MNotifyCreate(atype:THANDLE):THANDLE;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Create(atype)
- else
- result:=0;
-end;
-function MNotifyIsValid(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.IsValid(notify)
- else
- result:=0;
-end;
-function MNotifySet(notifyORtype:THANDLE,name:PAnsiChar;val:TDBVARIANT):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Set(notifyORtype,name,val)
- else
- result:=0;
-end;
-function MNotifyGet(notifyORtype:THANDLE,name:PAnsiChar;val:PDBVARIANT):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Get(notifyORtype,name,val)
- else
- result:=0;
-end;
-function MNotifyAddAction(notifyORtype:THANDLE;icon:HICON;name:PAnsiChar;service:PAnsiChar=nil;cookie:DWORD=0):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.AddAction(notifyORtype,icon,name)
- else
- result:=0;
-end;
-function MNotifyGetActions(notifyORtype:THANDLE;actions:PMNOTIFYACTIONINFO):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.GetActions(notifyORtype,actions)
- else
- result:=0;
-end;
-function MNotifyAddRef(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.AddRef(notify)
- else
- result:=0;
-end;
-function MNotifyRelease(notify:THANDLE):int;
-begin
- if notifyLink<>nil then
- result:=notifyLink^.Release(notify)
- else
- result:=0;
-end;
-procedure MNotifyShow(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Show(notify)
-end;
-procedure MNotifyUpdate(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Update(notify)
-end;
-procedure MNotifyRemove(notify:THANDLE);
-begin
- if notifyLink<>nil then
- notifyLink^.Remove(notify)
-end;
-
-procedure MNotifyGetLink;
-begin
- if PluginLink^.ServiceExists(MS_NOTIFY_GETLINK)<>0 then
- notifyLink:=PMNOTIFYLINK(CallService(MS_NOTIFY_GETLINK,0,0))
- else
- notifyLink:=nil;
-end;
-
-// get helpers
-function MNotifyGetByte(notifyORtype:THANDLE;name:PAnsiChar;defValue:byte):byte;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_BYTE then
- result:=defValue
- else
- result:=dbv.bVal;
-end;
-function MNotifyGetWord(notifyORtype:THANDLE;name:PAnsiChar;defValue:word):word;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_WORD then
- result:=defValue
- else
- result:=dbv.wVal;
-end;
-function MNotifyGetDWord(notifyORtype:THANDLE;name:PAnsiChar;defValue:dword):dword;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_DWORD then
- result:=defValue
- else
- result:=dbv.dVal;
-end;
-function MNotifyGetString(notifyORtype:THANDLE;name:PAnsiChar;defValue:PAnsiChar):PAnsiChar;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_ASCIIZ then
- result:=defValue
- else
- result:=dbv.szVal.a;
-end;
-function MNotifyGetWString(notifyORtype:THANDLE;name:PAnsiChar;defValue:PWideChar):PWideChar;
-var
- dbv:TDBVARIANT;
-begin
- MNotifyGet(notifyORtype,name,dbv);
- if dbv._type<>DBVT_WCHAR then
- result:=defValue
- else
- result:=dbv.szVal.w;
-end;
-
-// set helpers
-procedure MNotifySetByte(notifyORtype:THANDLE;name:PAnsiChar;value:byte);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_BYTE;
- dbv.bVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetWord(notifyORtype:THANDLE;name:PAnsiChar;value:word);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_WORD;
- dbv.wVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetDWord(notifyORtype:THANDLE;name:PAnsiChar;value:dword);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type:=DBVT_DWORD;
- dbv.dVal :=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetString(notifyORtype:THANDLE;name:PAnsiChar;value:PAnsiChar);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type :=DBVT_ASCIIZ;
- dbv.szVal.a:=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-procedure MNotifySetWString(notifyORtype:THANDLE;name:PAnsiChar;value:PWideChar);
-var
- dbv:TDBVARIANT;
-begin
- dbv._type :=DBVT_WCHAR;
- dbv.szVal.w:=value;
- MNotifySet(notifyORtype,name,dbv);
-end;
-*)
-
-const
-// Common options for Get/Set actions
- NFOPT_TYPENAME = 'General/TypeName';
- NFOPT_ICON = 'General/Icon';
- NFOPT_CONTACT = 'General/Contact';
- NFOPT_EVENT = 'General/Event';
- NFOPT_TEXT = 'General/Text';
- NFOPT_TEXTW = 'General/TextW';
- NFOPT_TITLE = 'General/Title';
- NFOPT_TITLEW = 'General/TitleW';
- NFOPT_BACKCOLOR = 'General/BackColor';
- NFOPT_TEXTCOLOR = 'General/TextColor';
- NFOPT_TIMEOUT = 'General/Timeout';
-// NFOPT_ONDESTROY = 'General/OnDestroy';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_snapping_windows.inc b/delphi/Awkward/include/reserve/helpers/m_snapping_windows.inc
deleted file mode 100644
index e3c5134..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_snapping_windows.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-{$IFNDEF SNAPPING_WINDOWS}
-{$DEFINE SNAPPING_WINDOWS}
-
-type
- PSnapWindowProc = ^TSnapWindowProc;
- TSnapWindowProc = record
- hWnd : THWND;
- m_szMoveOffset : TSIZE;
- wParam : WPARAM;
- lParam : LPARAM;
- Reserved1 : int;
- Reserved2 : int;
- Reserved3 : int;
- end;
-
-const
- MS_SNAPWINDOWPROC = 'Utils/SnapWindowProc';
-
-function CallSnappingWindowProc(hwnd:hwnd; nMessage:int;
- wParam:WPARAM;lParam:LPARAM):int;// cdecl;
-const
- SnapInfo:TSnapWindowProc=();
-begin
- result:=0;
- if (nMessage=WM_MOVING) or (nMessage=WM_NCLBUTTONDOWN) or
- (nMessage=WM_SYSCOMMAND) or (nMessage=WM_SIZING) then
- begin
- SnapInfo.hWnd := hwnd;
- SnapInfo.wParam := wParam;
- SnapInfo.lParam := lParam;
- CallService(MS_SNAPWINDOWPROC,WPARAM(@SnapInfo),nMessage);
- if nMessage=WM_SIZING then result:=1;
- end;
-end;
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_statusplugins.inc b/delphi/Awkward/include/reserve/helpers/m_statusplugins.inc
deleted file mode 100644
index a638dd1..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_statusplugins.inc
+++ /dev/null
@@ -1,181 +0,0 @@
-{
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-{$IFNDEF M_STATUSPLUGINS}
-{$DEFINE M_STATUSPLUGINS}
-
-// -- common status -- (all three plugins)
-type
- PROTOCOLSETTINGEX = record
- cbSize :integer;
- szName :PAnsiChar; // pointer to protocol modulename
- szMsg :PAnsiChar; // pointer to the status message (may be NULL)
- status :word; // the status
- lastStatus:word; // last status
- tszAccName:TChar;
- end;
-
-const
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = 0
-// returns 0 on success
- MS_CS_SETSTATUSEX:PAnsiChar = 'CommonStatus/SetStatusEx';
-
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = timeout
-// returns hwnd
- MS_CS_SHOWCONFIRMDLGEX:PAnsiChar = 'CommonStatus/ShowConfirmDialogEx';
-
-// wParam = 0
-// lParam = 0
-// returns the number of protocols registerd
- MS_CS_GETPROTOCOUNT:PAnsiChar = 'CommonStatus/GetProtocolCount'; // added dec '04
-
-// wParam = PROTOCOLSETTINGEX*** (keep it like this for compatibility)
-// lParam = 0
- ME_CS_STATUSCHANGEEX:PAnsiChar = 'CommonStatus/StatusChangeEx';
-{
-// wParam = protoCount
-// lParam = 0
- ME_CS_CSMODULELOADED:PAnsiChar = 'CommonStatus/CommonStatusLoaded';
-}
-// -- startup status --
-// wParam = profile number (set to -1 to get default profile)
-// lParam = PROTOCOLSETTINGEX*** (keep for... )(memory must be allocated protoCount*PROTOCOLSETTINGEX* and protoCount*PROTOCOLSETTINGEX)
-// szMsg member does not have to be freed
-// returns 0 on success
- MS_SS_GETPROFILE:PAnsiChar = 'StartupStatus/GetProfile'; // don't use this > jan '05, internal use only
-
-// wParam = profile number
-// lParam = 0
-// return 0 on success
- MS_SS_LOADANDSETPROFILE:PAnsiChar = 'StartupStatus/LoadAndSetProfile'; // you can use this
-
-// wParam = int*, maybe NULL sets this int to the default profile number
-// lParam = 0
-// returns profile count
- MS_SS_GETPROFILECOUNT:PAnsiChar = 'StartupStatus/GetProfileCount';
-
-// wParam = profile number
-// lParam = AnsiChar* (must be allocated, size = 128)
-// returns 0 on success
- MS_SS_GETPROFILENAME:PAnsiChar = 'StartupStatus/GetProfileName';
-
-// -- AdvancedAutoAway --
-type
- STATES = [
- ACTIVE, // user is active
- STATUS1_SET, // first status change happened
- STATUS2_SET, // second status change happened
- SET_ORGSTATUS, // user was active again, original status will be restored
-
- HIDDEN_ACTIVE, // user is active, but this is not shown to the outside world
-
-// STATUS1_SET2, // first status change happened, but user may be active ('on inactive only was disabled')
-// STATUS2_SET2 // second status change happened, but user may be active ('on inactive only was disabled')
- ];
-
-type
- AUTOAWAYSETTING = record
- protocolSetting :^PROTOCOLSETTINGEX;
- originalStatusMode:int; // this is set only when going from ACTIVE to
- // STATUS1_SET (or to STATUS2_SET)
- // (note: this is therefore not always valid)
- oldState :STATES; // state before the call
- curState :STATES; // current state
- bstatusChanged :bool; // the status of the protocol will actually be changed
- // (note: unlike the name suggests, the status is
- // changed AFTER this hook is called)
- bManual :bool; // state changed becuase status was changed manually
- end;
-
-// wParam = 0;
-// lParam = AUTOAWAYSETTING*
-// Called when a protocol's state in AAA is changed this does NOT necessary means the status was changed
-// note: this hook is called for each protocol seperately
-const
- ME_AAA_STATECHANGED:PAnsiChar = 'AdvancedAutoAway/StateChanged';
-{
-type
- AAAOPTPAGE = record
- cbSize :int;
- pszText :PAnsiChar;
- hInst :HINSTANCE;
- pfnDlgProc :DLGPROC;
- pszTemplate:PAnsiChar;
- end;
-
-const
-// lParam=(LPARAM)(AAAOPTPAGE)&aop
- MS_AAA_REGISTEROPTIONPAGE:PAnsiChar = 'AdvancedAutoAway/RegisterOptionPage';
-}
-// -- KeepStatus --
- KS_CONN_STATE_LOST = 1; // lParam = protocol
- KS_CONN_STATE_OTHERLOCATION = 2; // lParam = protocol
- KS_CONN_STATE_RETRY = 3; // lParam = nth retry
- KS_CONN_STATE_STOPPEDCHECKING = 4; // lParam = TRUE if success, FALSE if failed
- KS_CONN_STATE_LOGINERROR = 5; // lParam = protocol, only if selected in options
- KS_CONN_STATE_RETRYNOCONN = 6; // lParam = nth try, a connection attempt will not be made
-// wParam = one of above
-// lParam depends on wParam
- ME_KS_CONNECTIONEVENT:PAnsiChar = 'KeepStatus/ConnectionEvent';
-
-// wParam = 0
-// lParam = 0
-// returns 0 on succes, nonzero on failure, probably keepstatus wasn't reconnecting
- MS_KS_STOPRECONNECTING:PAnsiChar = 'KeepStatus/StopReconnecting';
-
-// wParam = TRUE to enable checking a protocol, FALSE to disable checking a protocol
-// lParam = protocol
-// return 0 on success, nonzero on failure, probably the protocol is 'hard' disabled or not found
-// note: you cannot enable a protocol that is disabled in the options screen, you can disable a protocol
-// if it's enabled in the option screen.
- MS_KS_ENABLEPROTOCOL:PAnsiChar = 'KeepStatus/EnableProtocol';
-
-// wParam = 0
-// lParam = protocol
-// returns TRUE if protocol is enabled for checked, FALSE otherwise
- MS_KS_ISPROTOCOLENABLED:PAnsiChar = 'KeepStatus/IsProtocolEnabled';
-
-// Indicate the status will be changed which will not be regarded as a connection failure.
-// wParam = 0
-// lParam = PROTOCOLSETTINGEX* of the new situation
-// returns 0
- MS_KS_ANNOUNCESTATUSCHANGE:PAnsiChar = 'KeepStatus/AnnounceStatusChange';
-
-function announce_status_change(szProto:PAnsiChar;newstatus:integer;szMsg:PAnsiChar):integer;// cdecl;
-var
- ps:PROTOCOLSETTINGEX;
-begin
- FillChar(ps,SizeOf(PROTOCOLSETTINGEX),0);
- ps.cbSize:=SizeOf(PROTOCOLSETTINGEX);
- if szProto<>NIL then
- ps.lastStatus:=CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- else
- ps.lastStatus:=CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
-
- ps.status:=newstatus;
- ps.szMsg :=szMsg;
- ps.szName:=szProto;
-
- result:=CallService(MS_KS_ANNOUNCESTATUSCHANGE, 0,dword(@ps));
-end;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_trigger.inc b/delphi/Awkward/include/reserve/helpers/m_trigger.inc
deleted file mode 100644
index 7f40d16..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_trigger.inc
+++ /dev/null
@@ -1,986 +0,0 @@
-{$IFNDEF M_TRIGGER}
-{$DEFINE M_TRIGGER}
-
-// --------------------------------------------------------------------------
-// Triggers
-// --------------------------------------------------------------------------
-
-// This section explains how to create your own trigger. A trigger can be seen
-// as an event which can result in a set of actions that will be performed.
-// Implementing a trigger consists of two parts. First, you register a trigger
-// with MS_TRIGGER_REGISTERTRIGGER to allow a user to configure it in the
-// options dialog. Second, when the event occurs belonging to your registered
-// trigger, you inform the trigger plugin with MS_TRIGGER_REPORTEVENT. You can
-// send a 'payload' together with this notification. This payload, called
-// 'TriggerData', can consist of a certain contact, protocol, status and/or a
-// piece of text.
-
-// --------------------------------------------------------------------------
-// Triggers: Register a trigger
-// --------------------------------------------------------------------------
-const
- MS_TRIGGER_REGISTERTRIGGER = '/TriggerPlugin/RegisterTrigger';
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(TRIGGERREGISTER *)&tr
-// Pointer to a structure describing the trigger to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// trigger will replace this previously registered trigger.
-
-type
- TTRIGGERREGISTER = record
- cbSize :int; // Set to sizeof(TRIGGERREGISTER).
- pszName :PAnsiChar; // Used as identifier and shown in the options dialog,
- // must be unique.
- hInstance :HINSTANCE; // Only needed when options screen is available.
- pfnDlgProc :DLGPROC; // Optional, the callback procedure for the options page.
- pszTemplate:PAnsiChar; // Optional, template for the options page; must be
- // WS_CHILD.
- flags :int; // Flags, see below.
- dFlags :int; // Specify the default DF_* flags which your trigger can
- // send (see below).
- end;
-
-const
-// Flags
- TRF_NOEXPORT = 01; // This trigger cannot be exported. Set this flag
- // in case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-// Please specify the dFlags to indicate what kind of data your trigger is
-// able to send as TriggerData. Please specify the maximum set, if your trigger
-// does not always send a certain data, please specify it anyway.
-
- DF_CONTACT = $01; // The trigger might send a contact handle with the
- // TriggerData.
- DF_PROTO = $02; // The trigger might send a protocol ID with the
- // TriggerData.
- DF_STATUS = $04; // The trigger might send a status code with the
- // TriggerData.
- DF_TEXT = $08; // The trigger might send a string with the
- // TriggerData.
- DF_LPARAM = $10; // The trigger might send a custom parameter with the
- // TriggerData.
- DF_UNICODE = $20; // The trigger processes WCHAR strings.
-
-// Dialog Messages
-// The following message should be processed by your options dialog procedure,
-// if available. You can create an options dialog to give the user the
-// possibility to report your event only under certain circumstances. Each
-// trigger is assigned a certain ID. This ID can be used to store the settings
-// for your trigger.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)triggerID
-// The trigger ID for which the options are to be set. This can be a new ID
-// or an ID of a trigger which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain trigger ID.
-
- TM_ADDTRIGGER = WM_APP+10;
-
-// TM_ADDTRIGGER
-// 'OK' is pressed and a new trigger will be added. Save your settings using
-// the given trigger ID.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The trigger ID for which the settings are to be stored. There are helper
-// function at the end of this header file to store your settings with a
-// certain trigger ID.
-// lParam = 0
-
- TM_DELTRIGGER = WM_APP+11;
-
-// TM_DELTRIGGER
-// The trigger addociated with the given trigger ID will be removed.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The trigger ID for which the settings are to be removed. There is a
-// helper service at the end of this header file to easily cleanup settings
-// for a certain trigger ID.
-// lParam = 0
-
-// --------------------------------------------------------------------------
-// Triggers: Report the Event
-// --------------------------------------------------------------------------
-
-// When the event occurs, you report it with MS_TRIGGER_REPORTEVENT. If your
-// trigger is configurable, so it has an options screen, you might want to
-// report your trigger for certain trigger ID's only. Please use the
-// MS_TRIGGER_FINDNEXTTRIGGERID to enumerate over the trigger ID's associated
-// with your trigger in the correct order as specified by the user. It's up
-// to you to found out whether or not the trigger is to be reported for a
-// certain ID.
-
- MS_TRIGGER_FINDNEXTTRIGGERID = '/TriggerPlugin/FindNextTriggerID';
-
-// Enumerate over the associated trigger ID's for your trigger in the correct
-// order.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// 0 to retrieve the first trigger ID for your trigger or the previous ID
-// returned by this service to get the next one.
-// lParam = 0
-
-// Return Value:
-// ------------------------
-// Returns the next trigger ID given the parameter or 0 if no more trigger IDs
-// are available.
-
- MS_TRIGGER_REPORTEVENT = '/TriggerPlugin/ReportEvent';
-
-// Report your event for further processing. This can be a general event for
-// which no individual settings exist, or a specific event for a given
-// trigger ID.
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(REPORTINFO *)&ri
-// See below.
-
-// Return Value:
-// ------------------------
-// Returns CRV_TRUE if all conditions specific to this trigger hold and the
-// chain was executed. Returns CRV_FALSE if these conditions did not hold and
-// the chain were not processed.
-
-// The structure below can be used to send TriggerData with your trigger. This
-// can be used by the associated conditions and actions.
-
-type
- PTRIGGERDATA = ^TTRIGGERDATA;
- TTRIGGERDATA = record
- cbSize :int; // Set to sizeof(TRIGGERDATA)
- dFlags :int; // Indicate which members are valid using the DF_* flags
- hContact:THANDLE; // Associate a contact handle to this event.
- szProto :PAnsiChar; // Associate a protocol ID to this event.
- status :int; // Associcate a status code to this event.
- szText :TChar; // Associate a string to this event.
- lParam :LPARAM; // Associate custom data to this trigger.
- end;
-
-type
- PREPORTINFO = ^TREPORTINFO;
- TREPORTINFO = record
- cbSize :int; // Set to sizeof(REPORTINFO).
- triggerID:DWORD; // The trigger ID of the event to trigger or 0 if
- // this does not apply.
- pszName :PAnsiChar; // The name of the trigger (this may be NULL if
- // triggerID is not 0).
- flags :int; // On of the TRG_* flags, see below.
- td :PTRIGGERDATA; // Optional, the associated TriggerData, see above.
- end;
-
-const
- TRG_PERFORM = $01; // Indicates the event for this trigger actually
- // occured and needs to be processed accordingly.
- TRG_CLEANUP = $02; // Indicates the trigger instructs to remove the
- // itself and all associated information. This can
- // be used for "one time triggers". Remove your own
- // settings by yourself.
-
-// --------------------------------------------------------------------------
-// Actions
-// --------------------------------------------------------------------------
-
-// An actions might be performed as a reaction to a reported event by a
-// trigger. You first register your action so it can be associated to a
-// trigger in the options screen. Next, your provided service or function
-// will be called when necessary.
-
- MS_TRIGGER_REGISTERACTION = '/TriggerPlugin/RegisterAction';
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(ACTIONREGISTER *)&ar
-// Pointer to a structure describing the action to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// action will replace this previously registered action.
-
-type
- TACTIONREGISTER = record
- cbSize :int; // Set to sizeof(ACTIONREGISTER).
- pszName :PAnsiChar; // The name of this action, it must be a unique string.
- pszService :PAnsiChar; // A service (called with wParam =
- // (WPARAM)(DWORD)actionID, lParam =
- // (LPARAM)(REPORTINFO *)&ri) or function to be called
- // when the action has to be performed.
-// or actionFunction: function (actionID:dword; ri:PREPORTINFO):int;
- hInstance :HINSTANCE;// Only needed when an options screen is available.
- pfnDlgProc :DLGPROC; // Optional, the callback procedure for the options
- // dialog.
- pszTemplate:PAnsiChar; // Optional, template for the options dialog, must be
- // WS_CHILD.
- flags :int; // One of the ARF_* flags, see below.
- end;
-
-const
- ARF_UNICODE = $01; // This action processes unicode strings.
- ARF_FUNCTION = $02; // The actionFunction will be called instead of the service.
- ARF_NOEXPORT = $04; // This action cannot be exported. Set this flag in
- // case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-// The service or actionFunction will be called with a pointer to a REPORTINFO
-// struct, containing information about the trigger event. If you can use
-// TriggerData from this struct, always check the ri->td->dFlags before using
-// it. It's up to you to deal with an action in case the expected TriggerData
-// is not available. It's recommened though, to cancel your action. The
-// ri->flags is a combination of the ACT_* flags, indicating how to process the
-// call, see below.
-
- ACT_PERFORM = $01; // Your action is to be performed.
- ACT_CLEANUP = $02; // The settings associated to this action should be removed.
-
-// Dialog Messages
-// The following messages are to be processed by the options dialog, if there
-// is one.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)actionID
-// The action ID for which the options are to be set. This can be a new ID
-// or an ID of an action which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain action ID.
-
- TM_ADDACTION = WM_APP+12;
-
-// TM_ADDACTION
-// 'OK' is pressed and a new action will be added. Save your settings using
-// the given action ID. Helper functions can be found at the end of this
-// header file.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)actionID
-// The action ID for which the settings are to be saved. There are helper
-// functions at the end of this header file to store settings with a certain
-// action ID.
-// lParam = 0
-
-// Dialog Messages
-// You can send the following messages to the parent window of your dialog.
-// When initalizing your dialog, you might be interested in the TriggerData
-// the associated trigger is able to provide, you can do so by sending the
-// folowing message to the parent of your dialog.
-
- TM_GETTRIGGERINFO = WM_APP+13;
-
-// Parameters:
-// ------------------------
-// wParam = 0
-// lParam = (LPARAM)(TRIGGERINFO *)&ti
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, the struct given will be filled with the requested
-// information. Returns any other value on error.
-
-type
- PTRIGGERINFO = ^TTRIGGERINFO;
- TTRIGGERINFO = record
- cbSize:int; // (in) Set to sizeof(TRIGGERINFO).
- dFlags:int; // (out) The default DF_* flags used by the trigger (as indicated
- // by its TRIGGERREGISTER).
- end;
-
-// --------------------------------------------------------------------------
-// Conditions
-// --------------------------------------------------------------------------
-
-// Depending on the configuration of the user, a condition may need to hold
-// for an action to be performed. A condition function is called and its
-// return value specifies whether or not the condition holds. A condition
-// needs to be registered. After its registered, the condition function might
-// be called to check whether or not the condition holds.
-const
- MS_TRIGGER_REGISTERCONDITION = '/TriggerPlugin/RegisterCondition';
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(CONDITIONREGISTER *)&cr
-// Pointer to a structure describing the condition to add (see below).
-
-// Return Value:
-// ------------------------
-// Returns 0 on success, nozero otherwise. Registering an already existing
-// condition will replace this previously registered condition.
-
-type
- PCONDITIONREGISTER = ^TCONDITIONREGISTER;
- TCONDITIONREGISTER = record
- cbSize :int; // Set to sizeof(CONDITIONREGISTER).
- pszName :PAnsiChar; // The name identifying this condition, must be unique.
- pszService :PAnsiChar; // The service (wParam = (WPARAM)(DWORD)conditionID,
- // lParam = (LPARAM)(REPORTINFO *)&ri) or function which
- // is called to see whether the condition holds. Must
- // return CRV_TRUE if the condition holds, CRV_FALSE
- // otherwise.
-// or conditionFunction:function(conditionID:dword; ri:PREPORTINFO):int;
- hInstance :HINSTANCE; // Only needed when an options dialog is available.
- pfnDlgProc :DLGPROC; // Optional, the dialog procedure for the options
- // dialog.
- pszTemplate:PAnsiChar; // Optional, template for the options dialog, must be
- // WS_CHILD.
- flags :int; // CRF_* flags, see below.
- end;
-
-// The flags that can be used to register the condition.
-
-const
- CRF_UNICODE = $01; // The condition function or service processes
- // unicode strings.
- CRF_FUNCTION = $02; // The conditionFunction will be called instead of
- // the service.
- CRF_NOEXPORT = $04; // This condition cannot be exported. Set this flag
- // in case you stored settings not using the helper
- // functions at the end of this header. On export,
- // TriggerPlugin will search for these settings
- // and export them automatically. Contact-specific
- // settings are never exported.
-
-// The service or conditionFunction will be called with a pointer to a
-// REPORTINFO struct, containing information about the trigger event. If you
-// can use TriggerData from this struct, always check the ri->td->dFlags before
-// using it. It's up to you to deal with an condition in case the expected
-// TriggerData is not available. It's recommened though, to return CRV_FALSE in
-// those cases. The ri->flags is a combination of the CND_* flags, indicating
-// how to process the call, see below.
-
-// Return values for the condition function or service. The condition service
-// or function is expected to return one of the following.
-
- CRV_FALSE = 0; // The condition does not hold.
- CRV_TRUE = 1; // The condition does hold.
-
-// REPORTINFO flags, received by the condition function or service. These
-// indicate how to process the call.
-
- CND_PERFORM = 01; // Perform your condition and return either
- // CRV_TRUE or CRV_FALSE to indicate whether or not
- // your condition holds at this moment.
- CND_CLEANUP = 02; // The condition is deleted. Remove your settings
- // from the DB. There is a helper service below to
- // easily remove settings given a condition ID.
-
-// Dialog Messages
-// The following messages are to be processed by the options dialog, if there
-// is one.
-
-// WM_INITDIALOG
-
-// Parameters:
-// ------------------------
-// lParam = (LPARAM)(DWORD)conditionID
-// The condition ID for which the options are to be set. This can be a new ID
-// or an ID of a condition which is being edited. Initialize your options
-// dialog accordingly. There are helper function at the end of this header
-// file to read your settings for a certain condition ID.
-
- TM_ADDCONDITION = WM_APP+14;
-
-// TM_ADDCONDITION
-// 'OK' is pressed and a new condition will be added. Save your settings using
-// the given condition ID. Helper functions can be found at the end of this
-// header file.
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)conditionID
-// The condition ID for which the settings are to be saved. There are helper
-// functions at the end of this header file to store settings with a certain
-// condition ID.
-// lParam = 0
-
-// When initalizing your dialog, you might be interested in the TriggerData the
-// associated trigger is able to provide, you can find out by sending a
-// TM_GETTRIGGERINFO message to the parent of your dialog. See the section on
-// dialog messages for actions for more information (above).
-
-// --------------------------------------------------------------------------
-// Misc. Services
-// --------------------------------------------------------------------------
-
- MS_TRIGGER_ENABLETRIGGER = '/TriggerPlugin/EnableTrigger';
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)(DWORD)triggerID
-// The triggerID to set or get the state from or 0 for the global state.
-// lParam = (LPARAM)(int)type
-// One of ETT_* (see below).
-// Pointer to a structure describing the settings to remove (see below).
-
-// Return Value:
-// ------------------------
-// Returns the state (0=disabled) if ETT_GETSTATE is given as lParam.
-// Otherwise, it returns 0 if setting the state was succesful or any other on
-// failure. The global state must be enabled if a single state is to be
-// changed.
-
- ETT_DISABLE = 0; // Disable the trigger(s).
- ETT_ENABLE = 1; // Enable the trigger(s).
- ETT_TOGGLE = 2; // Toggle the state of the trigger(s).
- ETT_GETSTATE = 3; // Retrieve the state of the trigger (0=disabled).
-
-// --------------------------------------------------------------------------
-// Database Helper Services
-// --------------------------------------------------------------------------
-
-// The rest of this header file defines helper services and functions to easily
-// store and retrieve settings for a certain trigger, action or condition.
-
- MS_TRIGGER_REMOVESETTINGS = '/TriggerPlugin/RemoveSettings';
-
-// Parameters:
-// ------------------------
-// wParam = (WPARAM)0
-// lParam = (LPARAM)(REMOVETRIGGERSETTINGS *)&rts
-// Pointer to a structure describing the settings to remove (see below).
-
-// Return Value:
-// ------------------------
-// Returns the number of settings removed from the database.
-
-// This service helps you remove all settings you have written with the DB
-// helper functions, defined at the end of this header file.
-
-type
- PREMOVETRIGGERSETTINGS = ^TREMOVETRIGGERSETTINGS;
- TREMOVETRIGGERSETTINGS = record
- cbSize :int; // Set to sizeof(REMOVETRIGGERSETTINGS).
- prefix :PAnsiChar; // A string indicating what kind of setting are to be
- // removed, see below.
- id :DWORD; // The ID of the set of settings to be removed.
- szModule:PAnsiChar; // The module where the settings are stored.
- hContact:THANDLE; // The contact for which the setting are to be removed. Can
- // be INVALID_HANDLE_VALUE to remove the settings for all
- // contacts and NULL.
- end;
-
-// The following prefixes indicate what kind of settings are to be removed from
-// the database.
-const
- PREFIX_ACTIONID = 'aid'; // The prefix for a DB setting associated to
- // an action.
- PREFIX_TRIGGERID = 'tid'; // The prefix for a DB setting associated to
- // a trigger.
- PREFIX_CONDITIONID = 'cid'; // The prefix for a DB setting associated
- // to a condition.
-
-(* TRIGGER HELPER
-
-// Helper #1: RemoveAllTriggerSettings
-// ------------------------
-// Remove all settings from the DB given the triggerID and module.
-
-static __inline int RemoveAllTriggerSettings(DWORD triggerID, AnsiChar *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_TRIGGERID;
- rts.id = triggerID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// Helper #2: RemoveAllActionSettings
-// ------------------------
-// Remove all settings from the DB given the actionID and module.
-
-static __inline int RemoveAllActionSettings(DWORD actionID, AnsiChar *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_ACTIONID;
- rts.id = actionID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// Helper #1: RemoveAllConditionSettings
-// ------------------------
-// Remove all settings from the DB given the conditionID and module.
-
-static __inline int RemoveAllConditionSettings(DWORD conditionID, AnsiChar *szModule) {
-
- REMOVETRIGGERSETTINGS rts;
-
- rts.cbSize = sizeof(REMOVETRIGGERSETTINGS);
- rts.prefix = PREFIX_CONDITIONID;
- rts.id = conditionID;
- rts.szModule = szModule;
- rts.hContact = INVALID_HANDLE_VALUE;
-
- return CallService(MS_TRIGGER_REMOVESETTINGS, 0, (LPARAM)&rts);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions
-// --------------------------------------------------------------------------
-
-// Basically, these function work the same as Miranda's helper functions for
-// getting/setting DB settings. There is one extra parameter, the ID for the
-// trigger/action/condition. The settings are named as follows:
-
-// DBWriteTriggerSetting*(DWORD triggerID, ...) to write a setting given a
-// trigger ID.
-// DBGetTriggerSetting*(DWORD triggerID, ...) to read a setting given a
-// trigger ID.
-// DBWriteActionSetting*(DWORD actionID, ...) to write a setting given an
-// action ID.
-// DBGetActionSetting*(DWORD actionID, ...) to read a setting given an
-// action ID.
-// DBWriteConditionSetting*(DWORD conditionID, ...) to write a setting given a
-// condition ID.
-// DBGetConditionSetting*(DWORD conditionID, ...) to read a setting given a
-// condition ID.
-
-#define MAX_SETTING_LEN 255 // Max. length of a DB setting including the
- // prefix and ID.
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Triggers
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteTriggerSettingByte(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,BYTE val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingWord(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,WORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingDword(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,DWORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingString(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingTString(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const TCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingWString(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const WCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteTriggerSettingStringUtf(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetTriggerSettingByte(DWORD triggerID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetTriggerSettingWord(DWORD triggerID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetTriggerSettingDword(DWORD triggerID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetTriggerSetting(DWORD triggerID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, DBVARIANT *dbv) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingW(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingTString(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingWString(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetTriggerSettingStringUtf(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteTriggerSetting(DWORD triggerID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_TRIGGERID, triggerID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Actions
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteActionSettingByte(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,BYTE val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingWord(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,WORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingDword(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,DWORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingString(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingTString(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const TCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingWString(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const WCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteActionSettingStringUtf(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetActionSettingByte(DWORD actionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetActionSettingWord(DWORD actionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetActionSettingDword(DWORD actionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetActionSetting(DWORD actionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, DBVARIANT *dbv) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingW(DWORD actionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingTString(DWORD actionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingWString(DWORD actionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetActionSettingStringUtf(DWORD actionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteActionSetting(DWORD actionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_ACTIONID, actionID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-// --------------------------------------------------------------------------
-// Database Helper Functions: Conditions
-// --------------------------------------------------------------------------
-
-static int __inline DBWriteConditionSettingByte(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,BYTE val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingByte(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingWord(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,WORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingWord(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingDword(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,DWORD val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingDword(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingString(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingTString(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const TCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingTString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingWString(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const WCHAR *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingWString(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBWriteConditionSettingStringUtf(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting,const AnsiChar *val) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBWriteContactSettingStringUtf(hContact, szModule, dbSetting, val);
-}
-
-static int __inline DBGetConditionSettingByte(DWORD conditionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingByte(hContact, szModule, dbSetting, errorValue);
-}
-
-static WORD __inline DBGetConditionSettingWord(DWORD conditionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingWord(hContact, szModule, dbSetting, errorValue);
-}
-
-static DWORD __inline DBGetConditionSettingDword(DWORD conditionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, int errorValue) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingDword(hContact, szModule, dbSetting, errorValue);
-}
-
-static int __inline DBGetConditionSetting(DWORD conditionID, HANDLE hContact, const AnsiChar *szModule, const AnsiChar *szSetting, DBVARIANT *dbv) {
-
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSetting(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingW(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingW(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingTString(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingTString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingWString(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingWString(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBGetConditionSettingStringUtf(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule, const AnsiChar *szSetting,DBVARIANT *dbv) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBGetContactSettingStringUtf(hContact, szModule, dbSetting, dbv);
-}
-
-static int __inline DBDeleteConditionSetting(DWORD conditionID, HANDLE hContact,const AnsiChar *szModule,const AnsiChar *szSetting) {
-
- AnsiChar dbSetting[MAX_SETTING_LEN];
-
- mir_snprintf(dbSetting, sizeof(dbSetting), "%s%u_%s", PREFIX_CONDITIONID, conditionID, szSetting);
- return DBDeleteContactSetting(hContact, szModule, dbSetting);
-}
-
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/helpers/m_webcam.inc b/delphi/Awkward/include/reserve/helpers/m_webcam.inc
deleted file mode 100644
index 592e28a..0000000
--- a/delphi/Awkward/include/reserve/helpers/m_webcam.inc
+++ /dev/null
@@ -1,142 +0,0 @@
-{
- WebCam Video plugin by Sergei Polishchuk, SoftCab Inc
- http://www.softcab.com
- pserge@softcab.com
-}
-
-{$IFNDEF M_WEBCAM}
-{$DEFINE M_WEBCAM}
-
-const
- MS_WEBCAM_OPEN = 'WebCam/Open';
-{
- This opens webcamera
- wParam, and lParam must be zero.
- Returns HANDLE to web camera.
- For Example:
- HANDLE hWebcamera = CallService(MS_WEBCAM_OPEN, 0, 0);
-}
-
- MS_WEBCAM_ISREADY = 'WebCam/IsReady';
-{
- This zero if camera is ready for use, and non-zero if camera is still initializing.
- It's useful to user this function after asynchronous opening of camera
- wParam must be zero.
- lParam = (LPARAM)(HANDLE)hCamera - camera handle
- For Example:
- HANDLE hWebcamera = CallService(MS_WEBCAM_ISREADY, 0, 0);
-}
-
- MS_WEBCAM_CLOSE = 'WebCam/Close';
-{
- This will close web camera.
- wParam must be zero
- lParam = (LPARAM)(HANDLE)hWebcamera - a handle returned by MS_WEBCAM_OPEN
- Return value is undefined.
- For Example:
- CallService(MS_WEBCAM_CLOSE, 0, (LPARAM)hWebcamera);
-}
-
- MS_WEBCAM_SHOWWND = 'WebCam/Show';
-{
- This will show or hide web camera window
- wParam = 1 to show window, or zero to hide one
- lParam = (LPARAM)(HANDLE)hWebcamera - handle to camera
- Return value is undefined.
- For Example, this will show the window:
- CallService(MS_WEBCAM_SHOWWND, 1, (LPARAM)hWebcamera);
-}
-
- MS_WEBCAM_FREE = 'WebCam/Free';
-{
- This will free WEBCAM_QUERY fields.
- wParam = sizeof(WEBCAM_QUERY)
- lParam = (LPARAM)(WEBCAM_QUERY*)&Query
- Return value is undefined
- For Example:
- CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
-}
-
- MS_WEBCAM_QUERY = 'WebCam/Query';
- WANT_PICTURE = pointer(-1);
-{
- This will query web camera for data.
- wParam = sizeof(WEBCAM_QUERY)
- lParam = (LPARAM)(WEBCAM_QUERY*)&Query
- Returns zero in case of success, or non-zero in case of any error
- Before queryng camera, you need to setup some WEBCAM_QUERY structure fields.
-}
-
-(*
-WEBCAM_QUERY Query;
-memset(&Query, 0, sizeof(Query));
-Query.hCamera = hWebcamera;
-Query.Jpeg = WANT_PICTURE; // we want to get .JPG image
-Query.Bitmap = NULL; // we do not need .BMP image
-int ret = CallService(MS_WEBCAM_QUERY, sizeof(Query), (LPARAM)&Query);
-if(!ret)
-{ if(Query.Jpeg != NULL)
- { // do something with JPG picture. For example, you may save it to .JPG file.
- }
- // now let's release the memory
- CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
-}
-*)
-
- MS_WEBCAM_SCREENSHOT = 'WebCam/ScreenShot';
-{
- This will return window screenshot
- wParam = sizeof(WEBCAM_QUERY)
- lParam = (LPARAM)(WEBCAM_QUERY*)&Query
- Returns zero in case of success, or non-zero in case of any error
- WEBCAMBUF->hCamera specifies window handle.
- It's not required to open webcamera in order to run this service function.
-}
-
-(*
-
-WEBCAM_QUERY Query;
-memset(&Query, 0, sizeof(Query));
-Query.hCamera = (HANDLE)GetDesktopWindow(); // getting whole desktop picture.
-Query.Jpeg = WANT_PICTURE; // we want to get .JPG image
-Query.Bitmap = NULL; // we do not need .BMP image
-int ret = CallService(MS_WEBCAM_SCREENSHOT, sizeof(Query), (LPARAM)&Query);
-if(!ret)
-{ if(Query.Jpeg != NULL)
- { // do something with JPG picture. For example, you may save it to .JPG file.
- }
- // now let's release the memory
- CallService(MS_WEBCAM_FREE, sizeof(Query), (LPARAM)&Query);
-}
-
-*)
-
- ME_WEBCAM_SNAPSHOTRECEIVED = 'WebCam/SnapshotRecv';
-{
- This event will be fired right after receiving snapshot from remote contact.
- wParam=(WPARAM)(HANDLE)hContact - a contact handle
- lParam=(LPARAM)(WEBCAMBUF*)buffer - a buffer that contains JPEG image
- IMPORTANT: you should not modify the buffer. It's read-only.
-}
-
-type
- ptag_WEBCAMBUF = ^tag_WEBCAMBUF;
- tag_WEBCAMBUF = record
- Size:dword; // size of Data buffer in bytes
- Data:array [0..0] of byte;
- end;
- PWEBCAMBUF = ^WEBCAMBUF;
- WEBCAMBUF = tag_WEBCAMBUF;
-
-type
- ptag_WEBCAM_QUERY = ^tag_WEBCAM_QUERY;
- tag_WEBCAM_QUERY = record
- hCamera:THANDLE; // [in] HANDLE to web camera
- cx,cy :word; // [out] camera picture size
- Jpeg :PWEBCAMBUF; // [in,out] points to .JPG file content in memory
- Bitmap :PWEBCAMBUF; // [in,out] points to .BMP file content in memory
- end;
- PWEBCAM_QUERY = ^WEBCAM_QUERY;
- WEBCAM_QUERY = tag_WEBCAM_QUERY;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/imgdecoder.pas b/delphi/Awkward/include/reserve/imgdecoder.pas
deleted file mode 100644
index eea6ec2..0000000
--- a/delphi/Awkward/include/reserve/imgdecoder.pas
+++ /dev/null
@@ -1,114 +0,0 @@
-unit ImgDecoder;
-
-interface
-uses Windows;
-
-function IsImgDecoderAvailable:boolean;
-function ImgNewDecoder(var pDecoder:pointer):dword;
-function ImgDeleteDecoder(pDecoder:pointer):dword;
-function ImgNewDIBFromFile(pDecoder:pointer;Filename:PAnsiChar;var pImg:pointer):dword;
-function ImgDeleteDIBSection(pImg:pointer):dword;
-function ImgGetHandle(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword;
-
-implementation
-
-const
- hModule:THANDLE=0;
-type
- tImgNewDecoder =function(var pDecoder:pointer):dword; stdcall;
- tImgDeleteDecoder =function(pDecoder:pointer):dword; stdcall;
- tImgNewDIBFromFile =function(pDecoder:pointer;Filename:PAnsiChar;var pImg):dword; stdcall;
- tImgDeleteDIBSection=function(pImg:pointer):dword; stdcall;
- tImgGetHandle =function(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword; stdcall;
-
-const
- pImgNewDecoder :tImgNewDecoder = nil;
- pImgDeleteDecoder :tImgDeleteDecoder = nil;
- pImgNewDIBFromFile :tImgNewDIBFromFile = nil;
- pImgDeleteDIBSection:tImgDeleteDIBSection = nil;
- pImgGetHandle :tImgGetHandle = nil;
-
-function IsImgDecoderAvailable:boolean;
-begin
- result:=hModule<>0;
-end;
-
-function ImgNewDecoder(var pDecoder:pointer):dword;
-begin
- if @pImgNewDecoder<>nil then
- result:=pImgNewDecoder(pDecoder)
- else
- result:=0;
-end;
-
-function ImgDeleteDecoder(pDecoder:pointer):dword;
-begin
- if @pImgDeleteDecoder<>nil then
- result:=pImgDeleteDecoder(pDecoder)
- else
- result:=0;
-end;
-
-function ImgNewDIBFromFile(pDecoder:pointer;Filename:PAnsiChar;var pImg:pointer):dword;
-begin
- if @pImgNewDecoder<>nil then
- result:=pImgNewDIBFromFile(pDecoder,Filename,pImg)
- else
- result:=0;
-end;
-
-function ImgDeleteDIBSection(pImg:pointer):dword;
-begin
- if @pImgNewDecoder<>nil then
- result:=pImgDeleteDIBSection(pImg)
- else
- result:=0;
-end;
-
-function ImgGetHandle(pImg:pointer;var pBitmap:HBITMAP;var ppDIBBits:pointer):dword;
-begin
- if @pImgGetHandle<>nil then
- result:=pImgGetHandle(pImg,pBitmap,ppDIBBits)
- else
- result:=0;
-end;
-
-initialization
- hModule:=LoadLibrary('imgdecoder.dll');
- if hModule=0 then
- hModule:=LoadLibrary('plugins\imgdecoder.dll');
-
- if hModule<>0 then
- begin
- pImgNewDecoder :=GetProcAddress(hModule, 'ImgNewDecoder');
- pImgDeleteDecoder :=GetProcAddress(hModule, 'ImgDeleteDecoder');
- pImgNewDIBFromFile :=GetProcAddress(hModule, 'ImgNewDIBFromFile');
- pImgDeleteDIBSection:=GetProcAddress(hModule, 'ImgDeleteDIBSection');
- pImgGetHandle :=GetProcAddress(hModule, 'ImgGetHandle');
- end;
-
-finalization
- if hModule<>0 then
- FreeLibrary(hModule);
-end.
-{ Sample of using
-
-var
- pDecoder:pointer;
- pImg:pointer;
- bitmap:HBITMAP;
- pBits:pointer;
-begin
- if IsImgDecoderAvailable then
- begin
- ImgNewDecoder(pDecoder);
- if ImgNewDIBFromFile(pDecoder,PAnsiChar(ParamStr(1)),pImg)<>0 then
- begin
- ImgGetHandle(pImg,bitmap,pBits);
-// action
- ImgDeleteDIBSection(pImg);
- end;
- ImgDeleteDecoder(pDecoder);
- end;
-end.
-}
diff --git a/delphi/Awkward/include/reserve/m_alocale.inc b/delphi/Awkward/include/reserve/m_alocale.inc
deleted file mode 100644
index fd026ef..0000000
--- a/delphi/Awkward/include/reserve/m_alocale.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-Header file for Miranda plugin developers, which allows you to use AutoLocale with your windowed
-plugins. Just call service function "AutoLocale/ChangeLocale"
-
-Author Ni4 (Nickolay L. Olshevsky) , Kiev, Ukraine.
-All suggestions, wishes, bug reports please send to dark.ni4@ukr.net.
-}
-{$IFNDEF M_AUTOLOCALE}
-{$DEFINE M_AUTOLOCALE}
-{
- Now here is only one function, which allows you to change locale for current user.
- Must be called on WM_ACTIVATE message, for windows which represents messaging sessions.
-
- Parameters:
- wParam - (WPARAM) of contact identifier in database.
- lParam - doesn't matter.
-
- Return values:
- last watched user handle.
-}
-const
- MS_AUTOLOCALE_CHANGELOCALE = 'AutoLocale/ChangeLocale';
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_assocmgr.inc b/delphi/Awkward/include/reserve/m_assocmgr.inc
deleted file mode 100644
index 18b6387..0000000
--- a/delphi/Awkward/include/reserve/m_assocmgr.inc
+++ /dev/null
@@ -1,172 +0,0 @@
-{
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ASSOCMGR}
-{$DEFINE M_ASSOCMGR}
-
-const
-
-{
- File Association Manager v0.1.0.3
-}
-
-{ interface id }
- MIID_ASSOCMGR: TGUID = '{A05B56C0-CF7B-4389-A1E9-F13DB9360EF1}';
-
-{ Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam : 0
- lParam : (PFILETYPEDESC)ftd
-Returns 0 on success, nonzero otherwise.
-}
- MS_ASSOCMGR_ADDNEWFILETYPE = 'AssocMgr/AddNewFileType';
-
-type
- PFILETYPEDESC = ^TFILETYPEDESC;
- TFILETYPEDESC = packed record
- cbSize: Integer; // size of this structure, in bytes
-
- pszDescription: PAnsiChar; // description for options dialog and in registry.
- // please Translate().
-
- hInstance: HINST; // instance where the icon resource is located
-
- nIconResID: UINT; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- pszService: PAnsiChar; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to nil to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- flags: DWORD; // see FTDF_* flags below
-
- pszFileExt: PAnsiChar; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- pszMimeType: PAnsiChar; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
-
- pszVerbDesc: PAnsiChar; // description for the open verb e.g. "&Install".
- // set this to nil to use the default description "Open".
- // include an ampersand (&) character for a mnemonic key.
- // please Translate().
- end;
-
-const
- FTDF_UNICODE = $0001; // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
- FTDF_DEFAULTDISABLED = $0002; // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
- FTDF_BROWSERAUTOOPEN = $0004; // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
- FTDF_ISTEXT = $0008; // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-{ Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam : 0
- lParam : (PAnsiChar)pszFileExt
-Returns 0 on success, nonzero otherwise.
-}
- MS_ASSOCMGR_REMOVEFILETYPE = 'AssocMgr/RemoveFileType';
-
-{ Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam : 0
- lParam : (PURLTYPEDESC)utd
-Returns 0 on success, nonzero otherwise.
-}
- MS_ASSOCMGR_ADDNEWURLTYPE = 'AssocMgr/AddNewUrlType';
-
-type
- PURLTYPEDESC = ^TURLTYPEDESC;
- TURLTYPEDESC = packed record
- cbSize: Integer; // size of this structure, in bytes
-
- pszDescription: PAnsiChar; // description for options dialog and in registry.
- // please Translate().
-
- hInstance: HINST; // instance where the icon resource is located
-
- nIconResID: UINT; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- pszService: PAnsiChar; // service to call when a url is opened (can't be nil)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // the provided string has already been urldecoded.
- // return zero on suceess, nonzero on error.
-
- flags: DWORD; // see UTDF_* flags below
-
- pszProtoPrefix: PAnsiChar; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
- end;
-
-const
- UTDF_UNICODE = $0001; // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
- UTDF_DEFAULTDISABLED = $0002; // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-{ Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam : 0
- lParam : (PAnsiChar)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-}
- MS_ASSOCMGR_REMOVEURLTYPE = 'AssocMgr/RemoveUrlType';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_autoreplacer.inc b/delphi/Awkward/include/reserve/m_autoreplacer.inc
deleted file mode 100644
index bc1d528..0000000
--- a/delphi/Awkward/include/reserve/m_autoreplacer.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- AutoReplacer plugin
- by Angelo Luiz Tartari
-}
-
-{$IFNDEF M_AUTOREPLACER}
-{$DEFINE M_AUTOREPLACER}
-
-const
-
-{
- Adds a window handle to AutoReplacer.
- This handle must belong to any window based on a editbox (editbox, richtext, TMemo, TEdit, TMaskEdit, etc.).
- After adding a handle, AutoReplacer will automatically work on this window.
- wParam = 0
- lParam = (LPARAM)(HWND)hwnd
- Returns: 0 on success, -1 if hwnd is invalid, 1 on error.
-}
- MS_AUTOREPLACER_ADDWINHANDLE = 'AutoReplacer/AddWinHandle';
-
-{
- Removes a window handle from AutoReplacer's list.
- wParam = 0
- lParam = (LPARAM)(HWND)hwnd
- Returns: 0 on success, -1 if hwnd is invalid, 1 if hwnd wasn't found.
-}
- MS_AUTOREPLACER_REMWINHANDLE = 'AutoReplacer/RemWinHandle';
-
- function autoreplacer_AddWinHandle(hwnd: HWND): integer;
- begin
- Result := CallService(MS_AUTOREPLACER_ADDWINHANDLE, 0, LPARAM(hwnd));
- end;
-
- function autoreplacer_RemWinHandle(hwnd: HWND): integer;
- begin
- Result := CallService(MS_AUTOREPLACER_REMWINHANDLE, 0, LPARAM(hwnd));
- end;
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_changekeyboardlayout.inc b/delphi/Awkward/include/reserve/m_changekeyboardlayout.inc
deleted file mode 100644
index 5d205fc..0000000
--- a/delphi/Awkward/include/reserve/m_changekeyboardlayout.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-{$IFNDEF M_CHANGEKEYBOARDLAYOUT}
-{$DEFINE M_CHANGEKEYBOARDLAYOUT}
-
-const
-// change keyboard layout of text
-// wParam, lParam must be 0
-// returns 0 on success and returns non-zero (-1) on error.
- MS_CKL_CHANGELAYOUT 'ChangeKeyboardLayout/ChangeLayout';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_contactsex.inc b/delphi/Awkward/include/reserve/m_contactsex.inc
deleted file mode 100644
index 6250720..0000000
--- a/delphi/Awkward/include/reserve/m_contactsex.inc
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- aLONG with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CONTACTSEX}
-{$DEFINE M_CONTACTSEX}
-
-const
- USERINFO = 'UserInfo';
-
-// new flags that come with userinfoex
-const
- CNF_TITLE = 18; //returns title (string)
- CNF_SECONDNAME = 19; // returns second name (string)
- CNF_PREFIX = 20; // returns name prefix (string)
- CNF_MYNOTES = 21; // returns notes (string)
- CNF_LANGUAGE1 = 22; // returns first language (string)
- CNF_LANGUAGE2 = 23; // returns second language (string)
- CNF_LANGUAGE3 = 24; // returns third language (string)
- CNF_TIMEZONE = 25; // returns timezone (WORD)
- CNF_MARITAL = 26; // returns marital status (string)
- CNF_PARTNER = 27; // returns partner (string)
- CNF_ORIGIN_CITY = 28; // returns origin city (string)
- CNF_ORIGIN_STATE = 29; // returns origin state (string)
- CNF_ORIGIN_COUNTRY = 30; // returns origin country (string)
- CNF_STREET = 31; // returns street (string)
- CNF_POSTAL = 32; // returns postal code (string)
- CNF_FAX = 34; // returns fax (string)
- CNF_CELLULAR = 35; // returns cellular (string)
- CNF_EMAIL2 = 36; // returns second email adress (string)
- CNF_EMAIL3 = 37; // returns third email adress (string)
- CNF_COMPANY = 38;
- CNF_COMPANY_POSITION = 39;
- CNF_COMPANY_OCCUPATION = 40; // returns occupation (string)
- CNF_COMPANY_SUPERIOR = 41;
- CNF_COMPANY_ASSISTENT = 42;
- CNF_COMPANY_DEPARTMENT = 43;
- CNF_COMPANY_STREET = 44;
- CNF_COMPANY_POSTAL = 45;
- CNF_COMPANY_CITY = 46;
- CNF_COMPANY_STATE = 47;
- CNF_COMPANY_COUNTRY = 48;
- CNF_COMPANY_PHONE = 49;
- CNF_COMPANY_FAX = 50;
- CNF_COMPANY_CELLULAR = 51;
- CNF_COMPANY_EMAIL = 52;
- CNF_COMPANY_EMAIL2 = 53;
- CNF_COMPANY_EMAIL3 = 54;
- CNF_COMPANY_HOMEPAGE = 55;
-
- { UserInfo/GetContactInfo v0.1.0.4+
- This is more or less an extended version of MS_UTILS_GETCONTACTINFO. Same syntax and parameters
- except the dwFlag member of CONTACTINFO. It can also have the values above. CNF_DISPLAY and CNF_DISPLAYNC
- are ignored.
- }
- MS_UINFOEX_GETCONTACTINFO = 'UserInfo/GetContactInfo';
-
- { UserInfo/FreeContactInfo v0.1.0.4+
- Strings returned by MS_UINFOEX_GETCONTACTINFO (and btw. MS_UTILS_GETCONTACTINFO too) are pointers to
- dynamically allocated portions of memory and therefor should be freed after use by miranda's own
- version of free that can be accessed via MS_SYSTEM_GET_MMI. This function is an alternitive. It does
- all the mmi stuff for you and cleanly frees the memory. An helper macro (DBFreeContactInfoString) frees
- an string got by MS_UINFOEX_GETCONTACTINFO or MS_UTILS_GETCONTACTINFO service explicitly.
- wParam=(LPSTR)pszVal - pointer to a string got by DBGetCustomContactInfoString to delete directly
- lParam=(CONTACTINFO )ci - pointer to a CONTACTINFO whose string value is to be freed
- }
- MS_UINFOEX_FREECONTACTINFO = 'UserInfo/FreeContactInfo';
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_db3xsa.inc b/delphi/Awkward/include/reserve/m_db3xsa.inc
deleted file mode 100644
index 77ac666..0000000
--- a/delphi/Awkward/include/reserve/m_db3xsa.inc
+++ /dev/null
@@ -1,84 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_DB3XSA}
-{$DEFINE M_DB3XSA}
-
-const
-{ DB/SetPassword v0.5.1.3+
- This service is used to set, change or clear the password used for encrypting the profile.
- It opens the password change dialog.
- wParam=0
- lParam=0
-}
- MS_DB_SETPASSWORD = 'DB/SetPassword';
-
-{ DB/Backup v0.5.1.3+
- This service will make a backup of your current profile. Backups are named
- <ProfileName> xx.bak where xx is the number of backups. The larger the number, the
- older the backup.
- wParam=0
- lParam=0
-}
- MS_DB_BACKUP = 'DB/Backup';
-
-{ DB/Backup v0.5.1.3+
- This service is the trigger action service and does the same as the service above.
- Only difference is wParam carries flags from trigger plugin.
- wParam=flags
- lParam=0
-}
- MS_DB_BACKUPTRIGGER = 'DB/BackupTriggerAct';
-
-{ DB/GetProfilePath(W) v0.5.1.5+
- Gets the path of the profile currently being used by the database module. This
- path does not include the last '\'. It is appended with the profile's name if
- ProfileSubDir=yes is set in the mirandaboot.ini.
- wParam=(WPARAM)(int)cbName
- lParam=(LPARAM)(AnsiChar*)pszName
- pszName is a pointer to the buffer that receives the path of the profile
- cbName is the size in bytes of the pszName buffer
- Returns 0 on success or nonzero otherwise
-}
- MS_DB_GETPROFILEPATHW = 'DB/GetProfilePathW';
-
-
-{ DB/GetProfilePathBasic(W) v0.5.1.5+
- Gets the path of the profile currently being used by the database module. This
- path does not include the last '\'. This is never appended with the profile's name.
- wParam=(WPARAM)(int)cbName
- lParam=(LPARAM)(AnsiChar*)pszName
- pszName is a pointer to the buffer that receives the path of the profile
- cbName is the size in bytes of the pszName buffer
- Returns 0 on success or nonzero otherwise
-}
- MS_DB_GETPROFILEPATH_BASIC = 'DB/GetProfilePathBasic';
- MS_DB_GETPROFILEPATH_BASICW = 'DB/GetProfilePathBasicW';
-
- MIRANDAPATH = '%MIRANDAPATH%';
- MIRANDAPATHW = '%MIRANDAPATH%';
- PROFILEPATH = '%PROFILEPATH%';
- PROFILEPATHW = '%PROFILEPATH%';
- PROFILENAME = '%PROFILENAME%';
- PROFILENAMEW = '%PROFILENAME%';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_ersatz.inc b/delphi/Awkward/include/reserve/m_ersatz.inc
deleted file mode 100644
index 49f5b31..0000000
--- a/delphi/Awkward/include/reserve/m_ersatz.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_ERSATZ}
-{$DEFINE M_ERSATZ}
-
-const
-// Returns the status message for a status
-// wParam=(WORD) 0 for current status or a status
-// lParam=0
-// Returns status msg or NULL if there is none. The protocol have to handle only the current
-// status. Handling messages for other statuses is optional.
-// Remember to mir_free the return value
- PS_GETMYAWAYMSG = '/GetMyAwayMsg';
-
-// Created if ersatz is installed
-// wParam=0
-// lParam=0
-// returns always 1
- MS_ERSATZ_ENABLED = 'ERSATZ/Enabled';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_flags.inc b/delphi/Awkward/include/reserve/m_flags.inc
deleted file mode 100644
index f9f97ec..0000000
--- a/delphi/Awkward/include/reserve/m_flags.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-Miranda IM Country Flags Plugin
-Copyright (C) 2006-2007 H. Herkenrath
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program (Flags-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FLAGS}
-{$DEFINE M_FLAGS}
-
-const
-
-{
- Country Flags Plugin v0.1.0.3
-}
-
-{ interface id }
- MIID_FLAGS: TGUID = '{88A3B66E-C438-4381-BC17-71D99D225F9C}';
-
-{ Load a country flag icon from the skin library. v0.1.0.0+
-The retrieved icon should be released using MS_SKIN2_RELEASEICON after use.
-The country numbers can be retrieved using MS_UTILS_GETCOUNTRYLIST.
-Another way to get the country numbers are the CTRY_* constants in winnls.h of WinAPI.
-To retrieve the country number from a locale, call GetLocaleInfo().
-with LOCALE_ICOUNTRY.
- wParam : countryNumber
- lParam : (BOOL)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon)
-Returns a icon handle (HICON) on success, NULL on error.
-}
- MS_FLAGS_LOADCOUNTRYFLAGICON = 'Flags/LoadCountryFlagIcon';
-
-{ Create a merged country flag icon. v0.1.0.0+
-The retrieved icon should be released using DestroyIcon() after use.
- wParam : countryNumberUpper
- lParam : countryNumberLower
-Returns a icon handle (HICON) on success, NULL on error.
-}
- MS_FLAGS_CREATEMERGEDFLAGICON = 'Flags/CreateMergedFlagIcon';
-
-{ Get a corresponding country given an (external) IP address. v0.1.0.0+
-The retrieved number can be converted to a normal country name
-using MS_UTILS_GETCOUNTRYBYNUMBER.
- wParam : dwExternalIP (same format as used Netlib)
- lParam : 0
-Returns a country number on success,
-or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
-}
- MS_FLAGS_IPTOCOUNTRY = 'Flags/IpToCountry';
-
-{ Detect the origin country of a contact. v0.1.0.0+
-This uses the contacts's IP first, and falls back on using
-CNF_COUNTRY and CNF_COCOUNTRY of contact details.
-To get the contact's IP it relies on the db setting
-"RealIP" in the proto module.
- wParam : (WPARAM)(HANDLE)hContact
- lParam : 0
-Returns a country number on success,
-or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
-}
- MS_FLAGS_DETECTCONTACTORIGINCOUNTRY = 'Flags/DetectContactOriginCountry';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_flash.inc b/delphi/Awkward/include/reserve/m_flash.inc
deleted file mode 100644
index 6153bf0..0000000
--- a/delphi/Awkward/include/reserve/m_flash.inc
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-Miranda FlashAvatars Plugin
-Plugin support header file
-Copyright (C) 2006 Big Muscle
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FLASH}
-{$DEFINE M_FLASH}
-// Service functions
-
-{
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
-}
- MS_FAVATAR_DESTROY = 'FlashAvatar/Destroy';
-
-{
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
-}
- MS_FAVATAR_MAKE = 'FlashAvatar/Make';
-
-{
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM LPRECT
-}
- MS_FAVATAR_RESIZE = 'FlashAvatar/Resize';
-
-{
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM not used
-}
- MS_FAVATAR_GETINFO = 'FlashAvatar/GetInfo';
-
-{
- WPARAM FLASHAVATAR* (hContact, hParentWindow)
- LPARAM BSTR
-}
- MS_FAVATAR_SETEMOFACE = 'FlashAvatar/SetEmoFace';
-
-// Avatar emotion faces
- AV_SMILE = 'smile';
- AV_SAD = 'sad';
- AV_LAUGH = 'laugh';
- AV_MAD = 'mad';
- AV_CRY = 'cry';
- AV_OFFLINE = 'offline';
- AV_BUSY = 'busy';
- AV_LOVE = 'love';
- AV_NORMAL = 'stam';
-
-type
- TFLASHAVATAR = record
- hContact :THANDLE; // contact who flash avatar belongs to
- hWindow :HWND; // handle of flash avatar object
- hParentWindow:HWND; // handle of flash avatar's parent object
- cUrl :PAnsiChar; // url of .swf file
- id :int; // unique number of plugin which wants to use avatar service
- cProto :PAnsiChar; // contacts protocol
- end;
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_fortunemsg.inc b/delphi/Awkward/include/reserve/m_fortunemsg.inc
deleted file mode 100644
index a13a8c3..0000000
--- a/delphi/Awkward/include/reserve/m_fortunemsg.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-{
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_FORTUNEMSG}
-{$DEFINE M_FORTUNEMSG}
-
-const
- MIN_FORTUNEMSG = 10;
- MAX_FORTUNEMSG = 1024;
- FORTUNE_BUFSIZE = (MAX_FORTUNEMSG+1);
-
-//returns the fortune message (from a random file)
-//wParam=0
-//lParam=(AnsiChar *)buffer or 0
-//returns (AnsiChar *)status msg (buffer if specified), or 0 on failure
-//If lParam != 0 then the fortune msg is to be stored there, make sure
-//its length is at least equal to FORTUNE_BUFSIZE. If lParam == 0, then
-//the plugin will allocate the memory, but don't forget to free it (the
-//return value) using MS_FORTUNEMSG_FREEMEMORY (but only if you specify lParam=0!!!)
- MS_FORTUNEMSG_GETMESSAGE = 'FortuneMsg/GetMessage';
-
-//returns the fortune message for a protocol
-//wParam=(AnsiChar*)szProtoName
-//lParam=(AnsiChar *)buffer or 0
-//returns (AnsiChar *)status msg (buffer if specified), or 0 on failure
-//If lParam != 0 then the fortune msg is to be stored there, make sure
-//its length is at least equal to FORTUNE_BUFSIZE. If lParam == 0, then
-//the plugin will allocate the memory, but don't forget to free it (the
-//return value) using MS_FORTUNEMSG_FREEMEMORY (but only if you specify lParam=0!!!)
- MS_FORTUNEMSG_GETPROTOMSG = 'FortuneMsg/GetProtoMessage';
-
-//returns the fortune status message for a status
-//wParam=(int)status
-//lParam=(AnsiChar *)buffer or 0
-//returns (AnsiChar *)status msg (buffer if specified), or 0 on failure
-//If lParam != 0 then the fortune msg is to be stored there, make sure
-//its length is at least equal to FORTUNE_BUFSIZE. If lParam == 0, then
-//the plugin will allocate the memory, but don't forget to free it (the
-//return value) using MS_FORTUNEMSG_FREEMEMORY (but only if you specify lParam=0!!!)
- MS_FORTUNEMSG_GETSTATUSMSG = 'FortuneMsg/GetStatusMessage';
-
-//frees the memory allocated by one of the other three services
-//wParam=0
-//lParam=(void *)pointer to the memory to be freed
-//(the returned value from one of the other three services if called with lParam=0)
-//return value: 0 on success, -1 on failure (argument was NULL)
- MS_FORTUNEMSG_FREEMEMORY = 'FortuneMsg/FreeMemory';
-
-
-//this service was created for being used by Variables plugin
-//wParam=0
-//lParam=(ARGUMENTSINFO *) see m_variables.h for description of the structure
-//returns (AnsiChar *)status msg, or 0 on failure
- MS_FORTUNEMSG_FROMVARIABLES = 'FortuneMsg/FromVariables';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_fuse.inc b/delphi/Awkward/include/reserve/m_fuse.inc
deleted file mode 100644
index 82b002b..0000000
--- a/delphi/Awkward/include/reserve/m_fuse.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-{$IFNDEF M_FUSE}
-{$DEFINE M_FUSE}
-
-const
- FUSE_INIT = 0; // core started, Param=**FUSE_LINK
- FUSE_DEINIT = 1; // core stopped
- FUSE_DEFMOD = 3; // LoadDefaultModules() return code, Param=*int
- FUSE_DEATH = 4; // DestroyingModularEngine() just got called
-
-type
- PFUSE_LINK = ^TFUSE_LINK;
- TFUSE_LINK = record
- cbSize : longint;
- CreateHookableEvent : function (para1:PAnsiChar):THANDLE;cdecl;
- DestroyHookableEvent : function (para1:THANDLE):longint;cdecl;
- NotifyEventHooks : function (para1:THANDLE; para2:WPARAM; para3:LPARAM):longint;cdecl;
- HookEvent : function (para1:PAnsiChar; para2:TMIRANDAHOOK):THANDLE;cdecl;
- HookEventMessage : function (para1:PAnsiChar; para2:HWND; para3:dword):THANDLE;cdecl;
- UnhookEvent : function (para1:THANDLE):longint;cdecl;
- CreateServiceFunction : function (para1:PAnsiChar; para2:TMIRANDASERVICE):THANDLE;cdecl;
- CreateTransientServiceFunction : function (para1:PAnsiChar; para2:TMIRANDASERVICE):THANDLE;cdecl;
- DestroyServiceFunction : function (para1:THANDLE):longint;cdecl;
- CallService : function (para1:PAnsiChar; para2:WPARAM; para3:LPARAM):longint;cdecl;
- ServiceExists : function (para1:PAnsiChar):longint;cdecl; {v0.1.0.1+ }
- CallServiceSync : function (para1:PAnsiChar; para2:WPARAM; para3:LPARAM):longint;cdecl; {v0.1.2.2+ }
- end;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_help(plugin).inc b/delphi/Awkward/include/reserve/m_help(plugin).inc
deleted file mode 100644
index 0eb6361..0000000
--- a/delphi/Awkward/include/reserve/m_help(plugin).inc
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-Miranda IM Help Plugin
-Copyright (C) 2002 Richard Hughes, 2005-2007 H. Herkenrath
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program (Help-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_HELP}
-{$DEFINE M_HELP}
-
-const
-
-{
- Help Plugin 0.2.1.2
- All services in here except MS_HELP_SHOWLANGDIALOG should be thread-safe,
- you can call them from any thread
-}
-
-{ interface id }
- MIID_HELP: TGUID = '{302660C5-1BF6-4054-A79F-77B1965D6F48}';
-
-{ Enable/disable the help context menu for a specific control. v0.2.0.0+
-Note: You normally do not need to call this, read below.
-You can can use this to deactivate the appearance of the help context menu
-being shown when the user right clicks on an control.
-You can use this service to disable the context menu.
-
-You do *not* need to use this service when you would like to show
-a context menu by yourself, just handle WM_CONTEXTMENU correctly instead.
-You need to return TRUE in your DlgProc or 0 in your WndProc, indicating 'message handled'.
-
-The context menu is disabled by default on the following controls (looks silly on multi-component controls):
-ListView, TreeView, Statusbar, Toolbar, CLC
-AutoTips are disabled by default for controls stating DLGC_WANTALLKEYS or DLGC_HASSETSEL at
-WM_GETDLGCODE (autotips are annoying on edits).
- wParam : (HWND)hwndCtl
- lParam : flags (see below)
-Returns 0 on success or nonzero on failure
-}
- MS_HELP_SETCONTEXTSTATE = 'Help/SetContextState';
- HCSF_CONTEXTMENU = $01; // show help context menu for this control
- HCSF_AUTOTIP = $02; // show automatic help tip on hover for this control
- // only works for non-editable
-
-{ Show a help tooltip for a specific control or dialog. v0.2.0.0+
-You can call this if you would like to show help at a specific time.
- wParam : (HWND)hwndCtl
- lParam : 0
-Returns 0 on success or nonzero on failure.
-The service fails when the help tooltip cannot be instantiated.
-}
- MS_HELP_SHOWHELP = 'Help/ShowHelp';
-
-{ Show the download language dialog. v0.2.1.0+
- wParam : 0
- lParam : 0
-The dialog can't have a parent due to it's asynchronous nature.
-If the language window is already opened it will be
-brought to front instead (returns success).
-Returns 0 on success, nonzero otherwise.
-}
- MS_HELP_SHOWLANGDIALOG = 'Help/ShowLangDialog';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_historypp.inc b/delphi/Awkward/include/reserve/m_historypp.inc
deleted file mode 100644
index 78d8fb0..0000000
--- a/delphi/Awkward/include/reserve/m_historypp.inc
+++ /dev/null
@@ -1,191 +0,0 @@
-{
- History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright (‘) 2006-2007 theMIROn, 2003-2006 Art Fedorov.
- History+ parts (C) 2001 Christian Kastner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
-
-{-----------------------------------------------------------------------------
- m_historypp (historypp project)
-
- Version: 1.5
- Created: 06.08.2004
- Author: Oxygen
-
- [ Description ]
-
- Header with History++ services declaration
-
- [ History ]
-
- 1.5 (05.08.2004)
- First version
-
- [ Modifications ]
- none
-
- [ Known Issues ]
- none
-
- Contributors: theMIROn, Art Fedorov
------------------------------------------------------------------------------}
-
-{$IFNDEF M_HISTORYPP}
-{$DEFINE M_HISTORYPP}
-
-const
- //** VALUES FOR TItemRenderDetails.dwHistoryWindow
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** This is one of the following params,
- //** saying what kind of history window displays
- //** processed item.
-
- // IRDHW_CONTACTHISTORY. The window is ordinary
- // contact history.
- IRDHW_CONTACTHISTORY = $0001;
- // IRDHW_GLOBALHISTORY. The window is global
- // history (system history). Invokes by
- // Menu -> System History
- IRDHW_GLOBALHISTORY = $0002;
- // IRDHW_GLOBALSEARCH. The window is search
- // window and the processed item is the
- // result of the global search.
- IRDHW_GLOBALSEARCH = $0003;
- // IRDHW_EXTERNAL. The window is external window
- IRDHW_EXTERNALGRID = $0004;
-
- //** VALUES FOR TItemRenderDetails.dwFlags
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** These flags inform you about what you are
- //** processing. Like saying that the item is
- //** selected or it's inline or such stuff
-
- // IRDF_SELECTED. The processed item is selected.
- // The background color will always be clHighlight
- // even if you change it (i will change it back).
- // Though, I will not touch font or font color.
- IRDF_SELECTED = $0001;
- // IRDF_INLINE. The RichEdit provided is not one
- // that is used for drawing a cell, but the one
- // used for "inline editing".
- IRDF_INLINE = $0002;
- // IRDF_EVENT. The RichEdit provided is from "Open Event"
- // window. It's the window which opens when you right-click
- // item in contact's history and select "Open"
- IRDF_EVENT = $0004;
-
-type
- TItemRenderDetails = packed record
- cbSize :DWord; // size of the structure in bytes
- hContact :THandle; // handle to the contact for which the event is processed
- hDBEvent :THandle; // handle to the event which is processed
- dwEventTime :DWord; // timestamp of the event
- wEventType :Word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
- IsEventSent :ByteBool; // Outgoing event. True if DBEF_SENT event flag is present (see m_database)
- dwFlags :DWord; // Any reasonable combination of IRDF_* flags.
- bHistoryWindow:Byte; // What kind of window history. See IRDHW_* values
- pProto :PAnsiChar; // Proto of the event, if available
- pModule :PAnsiChar; // Module of the event, if available
- pText :PWideChar; // Text of the event, not used now
- pExtended :PAnsiChar; // Extended text, used for storing urls, paths and so on
- end;
-
- PItemRenderDetails = ^TItemRenderDetails;
-
-const
- // ME_HPP_RICHEDIT_ITEMPROCESS
- // (supported from 1.5.0)
- // Called when next RichEdit history item
- // is rendered. Third-party plugins can alter it
- // like adding smileys, changing color and so on.
- // wParam - RichEdit control handle
- // lParam - pointer to TItemRenderDetails structure, information
- // about processed item, see TItemRenderDetails for details
- //
- // Note: Changing richedit background color will change the background
- // color of the whole cell! Additionally, the background color
- // of the *selected* cell and richedit is ALWAYS clHighlight,
- // no matter what you do. But font is untouched, so if your
- // plugin changes font color, you may need to handle selected
- // cells differently (use IF_SELECTED flag).
- //
- // Warn: Remeber about changing fonts. You CAN NOT have *different* fonts
- // for the *same* item, depening on your wish. For example, the
- // first time event is fired you set font for Item1 'Arial 10',
- // and the next time you set font for the same Item1 'Arial 12'.
- // Because height is calculated only once, and you may have
- // problems with text painting (when you change font text can
- // become too large and be cut or override another cell)
- //
- // See: hpp_itemprocess_samples.pas for some sample event handlers
- // like SmileyAdd and TextFormat support and special handler
- // kinda of conversation separation
- ME_HPP_RICHEDIT_ITEMPROCESS = 'History++/RichEdit/ItemProcessEvent';
-
- // MS_HPP_SHOWGLOBALSEARCH
- // (supported from 1.5.0)
- // Show Global history search window
- // If already opened, bring it to front
- // wParam - zero
- // lParam - zero
- MS_HPP_SHOWGLOBALSEARCH = 'History++/ShowGlobalSearch';
-
-type
- TOpenEventParams = packed record
- cbSize : DWord;
- hContact : DWord;
- hDBEvent : DWord;
- pPassword: PAnsiChar;
- end;
-
- POpenEventParams = ^TOpenEventParams;
-
-const
-
- // MS_HPP_OPENHISTORYEVENT
- // (supported from 1.5.0)
- // (changed in 1.5.110)
- //
- // Opens contact's history and selects
- // provided event
- // wParam - pointer to TOpenEventParams structure
- // lParam - zero
- // Return - BOOL, True if contact opened, False if password
- // field opened
- // Note: if you just want to show contact's history,
- // use system service MS_HISTORY_SHOWCONTACTHISTORY
- MS_HPP_OPENHISTORYEVENT = 'History++/OpenHistoryEvent2';
-
- // MS_HPP_GETVERSION
- // (supported from 1.5.0)
- // Get current History++ version
- // Third-party plugins can use it to know if installed
- // version of History++ supports particular feature
- // wParam - zero
- // lParam - zero
- // Return - current version, via PLUGIN_MAKE_VERSION macro
- MS_HPP_GETVERSION = 'History++/GetVersion';
-
- // MS_HPP_EMPTYHISTORY
- // (supported from 1.5.0.118)
- // Erases contact's history
- // wParam - hContact
- // lParam - zero
- // Notes - hContact can be NULL(0) to empty system history
- MS_HPP_EMPTYHISTORY = 'History++/EmptyHistory';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_historystats.inc b/delphi/Awkward/include/reserve/m_historystats.inc
deleted file mode 100644
index 03955de..0000000
--- a/delphi/Awkward/include/reserve/m_historystats.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-{$IFNDEF M_HISTORYSTATS}
-{$DEFINE M_HISTORYSTATS}
-
-const
-(**
- * The unique plugin interface ID provided by HistoryStats.
- *
- * @version 0.1.5.1+
- *)
- MIID_HISTORYSTATS:TGUD:= '$AF0DAD8E-$0695-$414B-$B306-$F4C7B7B41DA0';
-
-(**
- * Checks if a specified contact is set to be excluded from the statistics generated
- * by HistoryStats. If you check this for a MetaContact or for subcontacts of a
- * MetaContact you might want to check the subcontacts and the MetaContact itself, too.
- *
- * @version 0.1.5.1+
- * @param wParam (WPARAM)(HANDLE) of the contact you'd like to query. NULL is not a
- * valid value for this parameter.
- * @param lParam Must be set to 0.
- * @return Returns 1 if the specified contact is set to be excluded and 0 otherwise.
- *)
- MS_HISTORYSTATS_ISEXCLUDED = 'HistoryStats/IsExcluded';
-
-(**
- * Sets if a specified contact should be included in or excluded from the statistics
- * generated by HistoryStats. Setting this on a MetaContact or on a subcontact of a
- * MetaContact might have no effect, depending on the users configuration. Setting
- * this for a MetaContact and all its subcontacts at once should always produce the
- * expected result.
- *
- * @version 0.1.5.1+
- * @param wParam (WPARAM)(HANDLE) of the contact you'd like to manipulate. NULL is
- * not a valid value for this parameter.
- * @param lParam (LPARAM)(int) of 1 if you want to exclude the specified contact or
- * 0 if you no longer want to exclude the specified contact.
- * @return Always returns 0.
- *)
- MS_HISTORYSTATS_SETEXCLUDE = 'HistoryStats/SetExclude';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_hotkeysplus.inc b/delphi/Awkward/include/reserve/m_hotkeysplus.inc
deleted file mode 100644
index 662ad83..0000000
--- a/delphi/Awkward/include/reserve/m_hotkeysplus.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-{$IFNDEF M_HOTKEYPLUS}
-{$DEFINE M_HOTKEYPLUS}
-const
- MS_HOTKEYSPLUS_ADDKEY = 'HotkeysPlus/Add';
-{
-This service registers hotkey for
-WPARAM - service to perform
-LPARAM - decription of the service
-Returned values:
- 0 - success,
- 1 - hotkey for this function is already existing,
- 2 - the service, that you try to register the hotkey for, not exists
-}
-
- MS_HOTKEYSPLUS_EXISTKEY = 'HotkeysPlus/Exist';
-{
-This service checks whether hotkey for service (WPARAM) exists
-LPARAM - not used
-Returned values:
- 0 - failed,
- 1 - the hotkey for this function exists,
- 2 - the service not exists
-}
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_httpserver.inc b/delphi/Awkward/include/reserve/m_httpserver.inc
deleted file mode 100644
index 1e0f089..0000000
--- a/delphi/Awkward/include/reserve/m_httpserver.inc
+++ /dev/null
@@ -1,103 +0,0 @@
-{
-This file is part of HTTPServer a Miranda IM plugin
-Copyright (C)2002 Kennet Nielsen
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$IFNDEF M_HTTP_SERVER}
-{$DEFINE M_HTTP_SERVER}
-
-const
- OPT_SEND_LINK = 1;
-
-typedef struct
- PSTFileShareInfo = ^TSTFileShareInfo;
- TSTFileShareInfo = record
- lStructSize :dword; // Set to sizeof(STFileShareInfo)
- pszSrvPath :PAnsiChar; // Server path
- dwMaxSrvPath :dword; // Buffer allocated for Server path only used when information
- // is requested from HTTP server.
- pszRealPath :PAnsiChar; // Real path can be relative or complete
- dwMaxRealPath:dword; // Buffer allocated for Real path only used when information is
- // requested from HTTP server.
- dwAllowedIP :dword; // The IP address which is allowed to access this share
- dwAllowedMask:dword; // A mask which is applied to IP address to allow other IP addresses
- nMaxDownloads:int; // The maximum number of download which can be made on this share.
- dwOptions :dword; // Use OPT_SEND_LINK to open a message window with the link to file
- end;
-
-// dwMaxSrvPath Specifies the size, in chars, of the buffer pointed to by pszSrvPath.
-// The buffer must be large enough to store the path and file name string,
-// including the terminating null character.
-
-/////////////////////////////////////////////
-/// Service MS_HTTP_ADD_CHANGE_REMOVE ///
-/////////////////////////////////////////////
-//
-// wParam = (WPARAM)0
-// lParam = (LPARAM)LPSTFileShareInfo;
-// Server path is the key when working with FileShareInfo.
-// Two files can not be shared with the same "Server path" in the HTTP server.
-// If the server path does not exists it will be added.
-// If it does exists the action depends on what real path is.
-// If real path is empty the entity will be removed else it
-// will just be updated with the new settings.
-//
-// returns 0 on success, nonzero on failure
- MS_HTTP_ADD_CHANGE_REMOVE = 'HTTPServer/AddChangeRemove';
-
-/////////////////////////////////////////////
-////// Service MS_HTTP_GET_SHARE //////
-/////////////////////////////////////////////
-//
-// wParam = (WPARAM)0;
-// lParam = (LPARAM)LPSTFileShareInfo;
-// Returns the information for a share
-// Server path must be set the the share you wish information for.
-//
-// returns 0 on success, nonzero on failure
-
- MS_HTTP_GET_SHARE = 'HTTPServer/GetShare';
-
-/////////////////////////////////////////////
-/// Service MS_HTTP_ACCEPT_CONNECTIONS ///
-/////////////////////////////////////////////
-//
-// wParam = (WPARAM)boolean(true/false);
-// lParam = (LPARAM)0;
-// Toggles the HTTP server state if wParam is FALSE
-// Force enable HTTP server if wParam is TRUE
-//
-// returns 0 on success, nonzero on failure
-
- MS_HTTP_ACCEPT_CONNECTIONS = 'HTTPServer/AcceptConnections';
-
-/////////////////////////////////////////////
-//// Service MS_HTTP_GET_ALL_SHARES /////
-/////////////////////////////////////////////
-//
-// wParam = (WPARAM)0;
-// lParam = (LPARAM)&LPSTFileShareInfo;
-// Returns an array of all currently shared files in the HTTP Server
-// LPSTFileShareInfo points to the first share.
-// You must free the memory returned by using the miranda MS_SYSTEM_GET_MMI
-// and calling MM_INTERFACE->free( LPSTFileShareInfo )
-//
-// returns the count of shares in the buffer pointed to by LPSTFileShareInfo
-
- MS_HTTP_GET_ALL_SHARES = 'HTTPServer/GetAllShares';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_idle.inc b/delphi/Awkward/include/reserve/m_idle.inc
deleted file mode 100644
index 10525f6..0000000
--- a/delphi/Awkward/include/reserve/m_idle.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- Miranda IM: the free IM client for Microsoft Windows
-
- Copyright 2000-2005 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_IDLE}
-{$DEFINE M_IDLE}
-
- { The idle module checks how long the user has been idle, it can be at the Miranda level
- or the OS level - the user has optional two settings, one for "short" idle and another
- for "long" idle. Thie module will generate long/short events based on these user preferences
- and other information too. If you are unsure which idle mode to report for, report it
- for short idle. }
-const
- IDF_ISIDLE = $1; // idle has become active (if not set, inactive)
- IDF_PRIVACY = $8; // if set, the information provided shouldn't be given to third parties.
-
-const
- {
- wParam: 0
- lParam: IDF_ (or'd field)
- Affect: This event is fired when information about idle changes.
- Note: You will get multiple calls with IDF_ISIDLE set, the first is for short idle
- then long idle, then anytime during you might get IDF_ONFORCE if the screensaver
- or station become locked.
-
- It is up to you to keep state, i.e. once the idle that you care about is reported
- ignore other status notifications with IDF_ISIDLE set until you get one with
- IDF_ISIDLE isn't set.
- Version: 0.3.4a+ (2004/09/16)
- }
- ME_IDLE_CHANGED = 'Miranda/Idle/Changed';
-
- MIRANDA_IDLE_INFO_SIZE_1 = 20;
-
-type
- PMIRANDA_IDLE_INFO = ^TMIRANDA_IDLE_INFO;
- TMIRANDA_IDLE_INFO = record
- cbSize : int; // sizeof()
- idleTime: int; // idle in mins, if zero then disabled
- privacy : int; // user doesnt want other people seeing anything more than they are idle
- aaStatus: int; // status to go to when user is auto away
- aaLock : int; // the status shouldn't be unset if its set
- idleType: int;
- end;
- {
- wParam; 0
- lParam: address of MIRANDA_IDLE_INFO
- Affect: Return information about current idle settings, like short/long idle time in mins
- and if the user wants that info kept private, etc
- Returns: zero on success, non zero on failure
- Version: 0.3.4 (2004/09/16)
- }
-const
- MS_IDLE_GETIDLEINFO = 'Miranda/Idle/GetInfo';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_ieview.inc b/delphi/Awkward/include/reserve/m_ieview.inc
deleted file mode 100644
index 1449b80..0000000
--- a/delphi/Awkward/include/reserve/m_ieview.inc
+++ /dev/null
@@ -1,184 +0,0 @@
-{
- IEView Plugin for Miranda IM
- Copyright (C) 2005 Piotr Piastucki
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_IEVIEW}
-{$DEFINE M_IEVIEW}
-
-const
- MS_IEVIEW_WINDOW = 'IEVIEW/NewWindow';
- MS_IEVIEW_EVENT = 'IEVIEW/Event';
- MS_IEVIEW_UTILS = 'IEVIEW/Utils';
- MS_IEVIEW_SHOWSMILEYSELECTION = 'IEVIEW/ShowSmileySelection';
- ME_IEVIEW_OPTIONSCHANGED = 'IEVIEW/OptionsChanged';
- ME_IEVIEW_NOTIFICATION = 'IEVIEW/Notification';
-
- IEW_CREATE = 1; // create new window (control)
- IEW_DESTROY = 2; // destroy control
- IEW_SETPOS = 3; // set window position and size
- IEW_SCROLLBOTTOM = 4; // scroll text to bottom
-
- IEWM_SRMM = 0; // regular SRMM
- IEWM_TABSRMM = 1; // TabSRMM-compatible HTML builder
- IEWM_HTML = 2; // HTML
- IEWM_SCRIVER = 3; // HTML
- IEWM_MUCC = 4; // MUCC group chats GUI
- IEWM_CHAT = 5; // chat.dll group chats GUI
- IEWM_HISTORY = 6; // history viewer
-
-type
- PIEVIEWWINDOW = ^TIEVIEWWINDOW;
- TIEVIEWWINDOW = record
- cbSize : int; // size of the strusture
- iType : int; // one of IEW_* values
- dwMode : DWORD; // compatibility mode - one of IEWM_* values
- dwFlags: DWORD; // flags, one of IEWF_* values
- parent : THWND; // parent window HWND
- hwnd : THWND; // IEW_CREATE returns WebBrowser control's HWND here
- x : int; // IE control horizontal position
- y : int; // IE control vertical position
- cx : int; // IE control horizontal size
- cy : int; // IE control vertical size
- end;
-
-const
- IEEDF_UNICODE = 1; // if set pszText is a pointer to wchar_t string instead of AnsiChar string
- IEEDF_UNICODE_TEXT = 1; // if set pszText is a pointer to wchar_t string instead of AnsiChar string
- IEEDF_UNICODE_NICK = 2; // if set pszNick is a pointer to wchar_t string instead of AnsiChar string
- IEEDF_UNICODE_TEXT2 = 4; // if set pszText2 is a pointer to wchar_t string instead of AnsiChar string
-// The following flags are valid only for message events (IEED_EVENT_MESSAGE)
- IEEDF_FORMAT_FONT = $00000100; // if set pszFont (font name) is valid and should be used
- IEEDF_FORMAT_SIZE = $00000200; // if set fontSize is valid and should be used
- IEEDF_FORMAT_COLOR = $00000400; // if set color is valid and should be used
- IEEDF_FORMAT_STYLE = $00000800; // if set fontSize is valid and should be used
-
- IEEDF_READ = $00001000; // if set
- IEEDF_SENT = $00002000; // if set
-
- IEED_EVENT_MESSAGE = $0001; // message
- IEED_EVENT_STATUSCHANGE = $0002; // status change
- IEED_EVENT_FILE = $0003; // file
- IEED_EVENT_URL = $0004; // url
- IEED_EVENT_ERRMSG = $0005; // error message
- IEED_EVENT_SYSTEM = $0006; // system event
-
- IEED_MUCC_EVENT_MESSAGE = $0001; // message
- IEED_MUCC_EVENT_TOPIC = $0002; // topic change
- IEED_MUCC_EVENT_JOINED = $0003; // user joined
- IEED_MUCC_EVENT_LEFT = $0004; // user left
- IEED_MUCC_EVENT_ERROR = $0005; // error
-
- IEED_GC_EVENT_HIGHLIGHT = $8000;
- IEED_GC_EVENT_MESSAGE = $0001;
- IEED_GC_EVENT_TOPIC = $0002;
- IEED_GC_EVENT_JOIN = $0003;
- IEED_GC_EVENT_PART = $0004;
- IEED_GC_EVENT_QUIT = $0006;
- IEED_GC_EVENT_NICK = $0007;
- IEED_GC_EVENT_ACTION = $0008;
- IEED_GC_EVENT_KICK = $0009;
- IEED_GC_EVENT_NOTICE = $000A;
- IEED_GC_EVENT_INFORMATION = $000B;
- IEED_GC_EVENT_ADDSTATUS = $000C;
- IEED_GC_EVENT_REMOVESTATUS = $000D;
-
- IE_FONT_BOLD = $000100; // Bold font flag
- IE_FONT_ITALIC = $000200; // Italic font flag
- IE_FONT_UNDERLINE = $000400; // Underlined font flags
-
-type
- PtagIEVIEWEVENTDATA = ^TtagIEVIEWEVENTDATA;
- TtagIEVIEWEVENTDATA = record
- cbSize :int;
- iType :int; // Event type, one of MUCC_EVENT_* values
- dwFlags :dword; // Event flags - IEEF_*
- fontName :PAnsiChar; // Text font name
- fontSize :int; // Text font size (in pixels)
- fontStyle:int; // Text font style (combination of IE_FONT_* flags)
- color :TCOLORREF; // Text color
- Nick :TChar; // Nick, usage depends on type of event
- Text :TChar; // Text, usage depends on type of event
- dwData :dword; // DWORD data e.g. status
- bIsMe :BOOL; // TRUE if the event is related to the user
- time :dword; // Time of the event
- next :PtagIEVIEWEVENTDATA;
- Text2 :TChar; // Text, usage depends on type of event
- end;
- PIEVIEWEVENTDATA = PtagIEVIEWEVENTDATA;
- TIEVIEWEVENTDATA = TtagIEVIEWEVENTDATA;
-
-const
- IEE_LOG_DB_EVENTS = 1; // log specified number of DB events
- IEE_CLEAR_LOG = 2; // clear log
- IEE_GET_SELECTION = 3; // get selected text
- IEE_SAVE_DOCUMENT = 4; // save current document
- IEE_LOG_MEM_EVENTS = 5; // log specified number of IEView events
-
- IEEF_RTL = 1; // turn on RTL support
- IEEF_NO_UNICODE = 2; // disable Unicode support
- IEEF_NO_SCROLLING = 4; // do not scroll logs to bottom
-
- IEVIEWEVENT_SIZE_V1 = 28;
- IEVIEWEVENT_SIZE_V2 = 32;
- IEVIEWEVENT_SIZE_V3 = 36;
-
-type
- tagIEVIEWEVENT = record
- case byte of
- 0: (hDbEventFirst: THANDLE);
- 1: (eventData :PIEVIEWEVENTDATA);
- end;
-
- PIEVIEWEVENT = ^TIEVIEWEVENT;
- TIEVIEWEVENT = record
- cbSize :longint; // size of the strusture
- iType :longint; // one of IEE_* values
- dwFlags :DWORD; // one of IEEF_* values
- hwnd :HWND; // HWND returned by IEW_CREATE
- hContact :THANDLE; // contact
- Event :tagIEVIEWEVENT; // first event to log, when IEE_LOG_EVENTS
- // returns it will contain the last event
- // actually logged or NULL if no event was logged
- count :int; // number of events to log
- codepage :int; // ANSI codepage
- pszProto :PAnsiChar;
- end;
-
-type
- PIEVIEWSHOWSMILEYSEL = ^TIEVIEWSHOWSMILEYSEL;
- TIEVIEWSHOWSMILEYSEL = record
- cbSize : int; // size of the structure
- Protocolname : PAnsiChar; // protocol to use... if you have defined a protocol,
- // u can use your own protocol name. Smiley add will
- // automatically select the smileypack that is
- // defined for your protocol. Or, use "Standard" for
- // standard smiley set. Or "ICQ", "MSN" if you
- // prefer those icons. If not found or NULL:
- // "Standard" will be used
- xPosition : int; // Postition to place the selectwindow
- yPosition : int;
- Direction : int; // Direction (i.e. size upwards/downwards/etc) of
- // the window 0, 1, 2, 3
- hwndTarget : HWND; // Window, where to send the message when smiley is
- // selected.
- targetMessage: DWORD; // Target message, to be sent.
- targetWParam : LPARAM; // Target WParam to be sent (LParam will be AnsiChar*
- // to select smiley) see the example file.
- end;
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_ircscript.inc b/delphi/Awkward/include/reserve/m_ircscript.inc
deleted file mode 100644
index 0157443..0000000
--- a/delphi/Awkward/include/reserve/m_ircscript.inc
+++ /dev/null
@@ -1,125 +0,0 @@
-{
- This file is a description of the interface between the Miranda Scripting
- Plugin (MSP) and IRC. It is mainly an internal draft.
-
- The MSP is a powerful PHP based scripting engine
- which can automate many tasks in Miranda IM. With the implementation of
- this interface IRC can also benefit from the advantages MSP brings. The
- interface has been constructed by the respective authors of IRC and MSP.
-
- The idea is that MSP and IRC should communicate via the interface outlined herein,
- but MSP should "package" the data in attractive functions that can be easily
- used by eager scripters.
-
- Note that m_chat.h should be #included as the events defined therein is used in this interface
-
- The IRC plugin communicates with MSP mainly through 8 (2 x 4) services which are
- illustrated by the following matrix (MSP has 4 services and IRC 4 services):
-
- --------------------------------------------------
- | | |
- | Incoming raw data | Data going |
- | from server | to GUI |
- | (before processing) | (after processing) |
- | | |
- --------------------------------------------------
- | | |
- | Outgoing raw data | Data going |
- | to server | from GUI |
- | (after processing) | (before processing) |
- | | |
- --------------------------------------------------
-
- (processing refers to the IRC plugin reacting to different commands)
-}
-
-{$IFNDEF M_IRCSCRIPT}
-{$DEFINE M_IRCSCRIPT}
-
-//------------------------- HANDLING RAW MESSAGES ------------------------
-{
- The two leftmost boxes are related to data sent to and from the server in RAW form.
- (a typical RAW message looks like this: ":nick!user@host COMMAND PARAMETERS")
-
- It is very useful for scripters to be able to manipulate and add RAW streams of data.
-
- The below structure is used when RAW data is generated and IRC must trigger an
- event in MSP so the scripts can do their magic.
-
- If the data is modified make sure to use MS_SYSTEM_GET_MMI and then mmi_realloc() to
- allocate from the same heap. Do not free the data.
-
- wParam= Module name
- lParam= (LPARAM)(AnsiChar *)pszRaw
- returns nonzero if the message should be dropped
-}
-
-{
- NOTE! IRC will implement two services which also uses the same parameters:
-
- "<Module Name>/InsertRawIn" //used for inserting a "fake" incoming RAW event
- "<Module Name>/InsertRawOut" //used for inserting a "fake" outgoing RAW event
-}
-
-const
- MS_MBOT_IRC_RAW_IN = 'MBot/IrcRawIn';
- MS_MBOT_IRC_RAW_OUT = 'MBot/IrcRawOut';
-
-//------------------------- HANDLING GUI MESSAGES 1 ------------------------
-{
- The top rightmost box is related to data sent to the gui
- (currently chat.dll) in the form of GCEVENT's. (see m_chat.h)
-
- While maybe not as useful to the scripter, it can be useful to be able to
- "tap into" messages to the GUI from the IRC plugin.
-
- If the data is modified make sure to realloc() or similar.
-
- wParam= (WPARAM) (WPARAM_GUI_IN) &wgi
- lParam= (LPARAM)(GCEVENT *)&gce // see m_chat.h
- returns nonzero if the message should be dropped
-}
-
-{
- NOTE! IRC will implement a service which also uses the same parameters:
-
- "<Module Name>/InsertGuiIn" //used for inserting a "fake" event to the GUI
-}
-type
- PWPARAM_GUI_IN = ^WPARAM_GUI_IN;
- WPARAM_GUI_IN = record
- pszModule:PAnsiChar;
- wParam:WPARAM;
- end;
- PMBOT_GUI_WPARAM_IN_STRUCT = PWPARAM_GUI_IN;
- TMBOT_GUI_WPARAM_IN_STRUCT = WPARAM_GUI_IN;
-
-const
- MS_MBOT_IRC_GUI_IN = 'MBot/IrcGuiIn';
-
-//------------------------- HANDLING GUI MESSAGES 2 ------------------------
-{
- The bottom rightmost box is related to data sent from the gui
- (currently chat.dll) in the form of GCHOOKS's. Originally this is carried out in a hook,
- but for MSP this is done via a service instead.
-
- It can be useful for scripters to simulate user actions, like entering text, closing the window etc
-
- If the data is modified make sure to realloc() or similar.
-
- wParam= Module name
- lParam= (LPARAM)(GCHOOK *)gch // see m_chat.h
- returns nonzero if the message should be dropped
-}
-
-{
- NOTE! IRC will implement a service which also uses the same parameters:
-
- "<Module Name>/InsertGuiOut" //used for inserting a "fake" outgoing event to the GUI
-}
-
- MS_MBOT_IRC_GUI_OUT = 'MBot/IrcGuiOut';
-
- MS_MBOT_REGISTERIRC = 'MBot/RegisterIRCModule';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_kbdnotify.inc b/delphi/Awkward/include/reserve/m_kbdnotify.inc
deleted file mode 100644
index b6967ec..0000000
--- a/delphi/Awkward/include/reserve/m_kbdnotify.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_KBDNOTIFY}
-{$DEFINE M_KBDNOTIFY}
-
-const
-//Enables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
- MS_KBDNOTIFY_ENABLE = 'KeyboardNotify/Enable';
-
-//Disables all notifications (for use by BossKey)
-//wParam=0
-//lParam=0
-//returns 0
- MS_KBDNOTIFY_DISABLE = 'KeyboardNotify/Disable';
-
-//Makes the flashing begin
-//wParam=(unsigned int)eventCount
-//lParam=(AnsiChar *)szFlashingSequence or NULL if you want the plugin to use current settings
-//returns 0
- MS_KBDNOTIFY_STARTBLINK = 'KeyboardNotify/StartBlinking';
-
-//Receives the number of events that were opened (usuful for the 'until events opened' setting)
-//wParam=(unsigned int)eventCount
-//lParam=0
-//returns 0
- MS_KBDNOTIFY_EVENTSOPENED = 'KeyboardNotify/EventsWereOpened';
-
-
-//Informs if the flashing is active
-//wParam=0
-//lParam=0
-//returns 0 if the flashing is inactive or a pointer to the string representing the sequence being used
- MS_KBDNOTIFY_FLASHINGACTIVE = 'KeyboardNotify/IsFlashingActive';
-
-
-//Normalizes the flashing sequence informed
-//wParam=0
-//lParam=(AnsiChar *)szFlashingSequence <- it is rewritten
-//returns a pointer to the string representing the sequence normalized (which is in fact lParam)
- MS_KBDNOTIFY_NORMALSEQUENCE = 'KeyboardNotify/NormalizeSequence';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_langman.inc b/delphi/Awkward/include/reserve/m_langman.inc
deleted file mode 100644
index 4f00797..0000000
--- a/delphi/Awkward/include/reserve/m_langman.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-'Language Pack Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2005-2007 H. Herkenrath
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program (LangMan-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_LANGMAN}
-{$DEFINE M_LANGMAN}
-
-const
-
-{
- Language Pack Manager v1.0.2.1
- If you have any question or extension whishes please let me know:
- hrathh at users.sourceforge.net
-}
-
-{ interface id }
- MIID_LANGMAN: TGUID = '{D80370D5-4B1E-46a8-ACA4-1FAAD79B7D1E}';
-
-{ Show the download language dialog. v1.0.1.2+
- wParam : 0
- lParam : 0
-The dialog can't have a parent due to it's asynchronous nature.
-If the language window is already opened it will be
-brought to front instead (returns success).
-Returns 0 on success, nonzero otherwise.
-}
- MS_LANGMAN_SHOWLANGDIALOG = 'LangMan/ShowLangDialog';
-
-{$ENDIF} // M_LANGMAN
diff --git a/delphi/Awkward/include/reserve/m_listeningto.inc b/delphi/Awkward/include/reserve/m_listeningto.inc
deleted file mode 100644
index 4bb60c4..0000000
--- a/delphi/Awkward/include/reserve/m_listeningto.inc
+++ /dev/null
@@ -1,63 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_LISTENINGTO}
-{$DEFINE M_LISTENINGTO}
-
-// To be used by other plugins to send listening info to miranda
-const
- MIRANDA_WINDOWCLASS = 'Miranda.ListeningTo';
- MIRANDA_DW_PROTECTION = $8754;
-const
- LISTENINGTO_ANSI = 1;
- LISTENINGTO_UNICODE = 2;
-
-{
-Return TRUE if sending listening to is enabled for this protocol
-
-wParam: AnsiChar * - protocol name or NULL for all protocols
-lParam: ignored
-}
- MS_LISTENINGTO_ENABLED:PAnsiChar = 'ListeningTo/Enabled';
-
-{
-Enable/disable sending listening to this protocol
-
-wParam: AnsiChar * - protocol name or NULL for all protocols
-lParam: BOOL - TRUE to enable, FALSE to disable
-}
- MS_LISTENINGTO_ENABLE:PAnsiChar = 'ListeningTo/Enable';
-
-{
-Notification fired when enable state changed
-
-wParam: AnsiChar * - protocol name or NULL for all protocols
-lParam: BOOL - enabled
-}
- ME_LISTENINGTO_ENABLE_STATE_CHANGED:PAnsiChar = 'ListeningTo/EnableStateChanged';
-
-{
-Provide new info about a song change to listening to
-
-wParam: WCHAR * or char * - song data, in format "<Status 0-stoped 1-playing>\\0<Player>\\0<Type>\\0<Title>\\0<Artist>\\0<Album>\\0<Track>\\0<Year>\\0<Genre>\\0<Length (secs)>\\0<Radio Station>\\0"
-lParam: format of wParam: one of LISTENINGTO_ANSI or LISTENINGTO_UNICODE . Anything else will be handled as unicode
-}
- MS_LISTENINGTO_SET_NEW_SONG:PAnsiChar = 'ListeningTo/SetNewSong';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_mathmodule.inc b/delphi/Awkward/include/reserve/m_mathmodule.inc
deleted file mode 100644
index a871fa1..0000000
--- a/delphi/Awkward/include/reserve/m_mathmodule.inc
+++ /dev/null
@@ -1,199 +0,0 @@
-{$IFNDEF M_MATHMODULE}
-{$DEFINE M_MATHMODULE}
- {--------------------------------------------------- }
- {
- 2
- x + 2 Pi
- + R
- Sin(wt)
-
- Math-Module
-
- Miranda Plugin by Stephan Kassemeyer
- MathModule API - (c) Stephan Kassemeyer
- 8 May, 2004
- }
- { --------- }
- {
- Miranda Service-functions defined by MathModule
- call with the
- int ( CallService)(const AnsiChar servicename,WPARAM,LPARAM)
- that you get from miranda when Miranda calls the
- Load(PLUGINLINK link)
- of your PlugIn-dll
- the CallService function then is:
- link->CallServiceSync(Servicename,wparam,lparam)
- }
- { --------- }
-
-const
- MATH_RTF_REPLACE_FORMULAE = 'Math/RtfReplaceFormulae';
- { replace all formulas in a RichEdit with bitmaps. }
- { wParam = 0 }
- { lParam = *TMathRichedit Info }
- { return: TRUE if replacement succeeded, FALSE if not (disable by user?). }
- { handle of richedit. }
- { NULL: replace all. }
-type
- PTMathRicheditInfo = ^TTMathRicheditInfo;
- TTMathRicheditInfo = record
- hwndRichEditControl : HWND;
- sel : PCHARRANGE;
- disableredraw : int;
- end;
- { WARNING: !!! }
- { Strange things happen if you use this function twice on the same CHARRANGE: }
- { if Math-startDelimiter == Math-endDelimiter, there is the following problem: }
- { it might be that someone forgot an endDelimiter, this results in a lonesome startdelimiter. }
- { if you try to MATH_REPLACE_FORMULAE the second time, startDelimiters and endDelimiters are mixed up. }
- { The same problem occours if we have empty formulae, because two succeding delimiters are }
- { replaced with a single delimiter. }
-
-const
- MATH_GET_STARTDELIMITER = 'Math/GetStartDelimiter';
- { returns the delimiter that marks the beginning of a formula }
- { wparam=0 }
- { lparam=0 }
- { result=*AnsiChar Delimiter }
- { !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER }
-
- MATH_GETENDDELIMITER = 'Math/GetEndDelimiter';
- { returns the delimiter that marks the end of a formula }
- { wparam=0 }
- { lparam=0 }
- { result=*AnsiChar Delimiter }
- { !!! the result-buffer must be deleted with MTH_FREE_MATH_BUFFER }
-
- MTH_FREE_MATH_BUFFER = 'Math/FreeRTFBitmapText';
- { deletes any buffer that MathModule has created. }
- { wparam=0 }
- { lparam=(*AnsiChar) buffer }
- { result=0 }
-
- MATH_SETBKGCOLOR = 'Math/SetBackGroundColor';
- { changes the background color of the next formula to be rendered. }
- { wparam=0 }
- { lparam=(COLORREF) color }
- { result=0 }
-
- MATH_SET_PARAMS = 'Math/SetParams';
- { sets a parameter (only integer values) encoded in wparam }
- { wparam=paramcode }
- { lparam=parametervalue }
- { paramcodes: }
-const
- MATH_PARAM_BKGCOLOR = 0; // (COLORREF) std-rgb-color or TRANSPARENT_Color
- MATH_PARAM_FONTCOLOR = 1; // (COLORREF) std-rgb-color
- RESIZE_HWND = 2; // (HWND) preview window resizes RESIZE_HWND when
- // it is being resized.
- ToolboxEdit_HWND = 3; // (HWND) If this hwnd (of an edit-box) is set,
- // MathModule can insert Formula-elements from
- // the Math-Toolbox.
-// you can make the BKGCOLOR Transparent (default) by using this color:
- TRANSPARENT_Color = $FFFFFFFF-1; // this is default
-
-const
- MTH_GETBITMAP = 'Math/GetBitmap';
- {returns Bitmap that represents the formula given in lparam (string-pointer) }
- {this formula has NO Delimiters. }
- {wparam=0 }
- {lparam=(*AnsiChar)Formula }
- {result=(HBITMAP) bitmap }
- {!!! the bitmap must be deleted with DeleteObject(hobject) }
- {example: }
- {HBITMAP Bmp=(HBITMAP)CallService(MTH_GETBITMAP,0, (LPARAM)formula); }
-
- MTH_GET_RTF_BITMAPTEXT = 'Math/GetRTFBitmapText';
- { returns rich-text stream that includes bitmaps from text given in lparam }
- { text included between MATH_GET_STARTDELIMITER and MATH_GETENDDELIMITER }
- { hereby is replaced with a rtf-bitmap-stream that represents the corresponding formula }
- { wparam=0 }
- { lparam=*AnsiChar text }
- { result=*AnsiChar rtfstream }
- { !!! the result-buffer must be deleted with MTH_FREE_RTF_BITMAPTEXT }
-
- MTH_FREE_RTF_BITMAPTEXT = 'Math/FreeRTFBitmapText';
- { deletes the buffer that MTH_GET_RTF_BITMAPTEXT has created. }
- { wparam=0 }
- { lparam=(*AnsiChar) buffer }
- { result=0 }
-
- { ************************************************************** }
- { The following is still SRMM - specific. }
- { I plan to modify it, so that other PlugIns can take advantage of e.g. preview-window.... }
-const
- MTH_SHOW = 'Math/Show';
- { shows the preview-window }
- { wparam=0 }
- { lparam=0 }
- { result=0 }
-
- MTH_HIDE = 'Math/Hide';
- { hides the preview-window }
- { wparam=0 }
- { lparam=0 }
- { result=0 }
-
- MTH_RESIZE = 'Math/Resize';
- { sets the size of the preview-window }
- { wparam=0 }
- { lparam=(*TMathWindowInfo) }
- { result=0 }
-type
- PTMathWindowInfo = ^TTMathWindowInfo;
- TTMathWindowInfo = record
- top : int;
- left : int;
- right : int;
- bottom: int;
- end;
-
-const
- MTH_SETFORMULA = 'Math/SetFormula';
- { sets the text that the preview-window should parse to display formulas found inside }
- { wparam=0 }
- { lparam=(*AnsiChar) text }
- { result=0 }
-
- MTH_Set_ToolboxEditHwnd = 'Math/SetTBhwnd';
- { If this hwnd (of an edit-box) is set, MathModule can insert Formula-elements from the Math-Toolbox. }
- { wparam=0 }
- { lparam=handle }
- {übergibt fenster-Handle des aktuellen Message-Dialogs }
-
- MTH_Set_Srmm_HWND = 'Math/SetSrmmHWND';
- { If MathModule knows the handle of a SRMM-based window, following features exist: }
- { - preview window resizes Math-Srmm when it is being resized. }
- { wparam=0 }
- { lparam=handle }
- { result=0 }
- { todo: umbenennen in MTH_Set_ResizeWindowHandle, zusaetzlich MTH_Set_ToolboxEditHandle erstellen, dann keine SRMM-Abhaengigkeit mehr. }
- { damit ResizeWindows selbst entscheiden koennen, was sie tun, kann man auch ein miranda-event "MTH_preview_resized" einrichten. }
-
- MTH_GET_PREVIEW_HEIGHT = 'Math/getPreviewHeight';
- { returns the height of the whole preview-window (including system-menu-bar) }
- { consider this when maximizing a window to that preview-window is hooked on top or bottom }
- { it returns the height no matter whether preview-window is visible or not }
- { wparam=0 }
- { lparam=0 }
- { result=(int) height }
-
- MTH_GET_PREVIEW_SHOWN = 'Math/getPreviewShown';
- { returns 1 if preview window is visible }
- { returns 0 if preview window is invisible }
- { result=(int) shown }
-
- MTH_SUBSTITUTE_DELIMITER = 'Math/SubstituteDelimiter';
- { replaces Substitute given lparam-structure with internal Math-Delimiter }
- { wparam=0 }
- { lparam=(TMathSubstInfo) substInfo }
- { result=0 }
-
-type
- PTMathSubstInfo = ^TTMathSubstInfo;
- TTMathSubstInfo = record
- EditHandle : HWND;
- Substitute : PAnsiChar;
- end;
-{--------------------------------------------------- }
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_motd.inc b/delphi/Awkward/include/reserve/m_motd.inc
deleted file mode 100644
index 3b986bf..0000000
--- a/delphi/Awkward/include/reserve/m_motd.inc
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-Copyright (C) 2005 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_MOTD}
-{$DEFINE M_MOTD}
-
-//=== SERVICES ===
-
-{
-MOTD/GetMessage service
-Get a MOTD
-
-wparam = (MOTDMessage*)lpMOTDMessage
-lparam = 0
-returns: 0 on success, -1 on failure. On success, lpMOTDMessage is filled with the MOTD
-}
-type
- PMOTDMessage = ^TMOTDMessage;
- TMOTDMessage = record
- cbSize :int; // sizeof(MOTDMessage)
- pszMessage :PAnsiChar; // Buffer to store message
- cbMessageSize:dword; // Size of message buffer (including '\0')
- pszAuthor :PAnsiChar; // Buffer to store author
- cbAuthorSize :dword; // Size of author buffer (including '\0')
- end;
-const
- MS_MOTD_GETMESSAGE = 'MOTD/GetMessage';
-
-{
-MOTD/AddMessage service
-Add a message to the MOTD list
-
-wparam = (MOTDMessage*)lpMOTDMessage
-lparam = 0
-returns: 0 on success, -1 on failure
-}
- MS_MOTD_ADDMESSAGE = 'MOTD/AddMessage';
-
-{
-MOTD/ShowMessage service
-Show a popup with a MOTD
-
-wparam = 0
-lparam = 0
-returns: 0
-}
- MS_MOTD_SHOWMESSAGE ='MOTD/ShowMessage';
-
-{
-MOTD/ShowAddMessage service
-Show a dialog to add a MOTD
-
-wparam = 0
-lparam = 0
-returns: 0
-}
- MS_MOTD_SHOWADDMESSAGE = 'MOTD/ShowAddMessage';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_msg_buttonsbar.inc b/delphi/Awkward/include/reserve/m_msg_buttonsbar.inc
deleted file mode 100644
index b3605d7..0000000
--- a/delphi/Awkward/include/reserve/m_msg_buttonsbar.inc
+++ /dev/null
@@ -1,116 +0,0 @@
-{$IFNDEF M_MSG_BUTTONSBAR}
-{$DEFINE M_MSG_BUTTONSBAR}
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-//
-// wParam = 0
-// lParam = (BBButton *) &description
-const
- MS_BB_ADDBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/AddButton';
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-//
-// wParam = 0
-// lParam = (BBButton *) &description, only button ID and ModuleName used
- MS_BB_REMOVEBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/RemoveButton';
-
-//////////////////////////////////////////////////////////////////////////
-// ModifyButton(global)
-//
-// wParam = 0
-// lParam = (BBButton *) &description
- MS_BB_MODIFYBUTTON:PAnsiChar = 'TabSRMM/ButtonsBar/ModifyButton';
-
-
- BBSF_HIDDEN = 1;
- BBSF_DISABLED = 2;
- BBSF_PUSHED = 4;
- BBSF_RELEASED = 8;
-
-//////////////////////////////////////////////////////////////////////////
-// GetButtonState(local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , only ModuleName and ID used
-// Returns BBButton struct with BBSF_ bbbFlags:
-#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// SetButtonState (local)
-//
-// wParam = hContact
-// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
- MS_BB_SETBUTTONSTATE:PAnsiChar = 'TabSRMM/ButtonsBar/SetButtonState';
-
-
-////////////////////////////////////////////////////////////////
-//Events
-//
-///////////////////////////////////////////////////
-// ToolBar loaded event
-// wParam = 0;
-// lParam = 0;
-// This event will be send after module loaded and after each toolbar reset
-// You should add your buttons on this event
- ME_MSG_TOOLBARLOADED:PAnsiChar = 'TabSRMM/ButtonsBar/ModuleLoaded';
-
-///////////////////////////////////////////////////
-// ButtonClicked event
-// wParam = (HANDLE)hContact;
-// lParam = (CustomButtonClickData *)&CustomButtonClickData;
-// catch to show a popup menu, etc.
- ME_MSG_BUTTONPRESSED:PAnsiChar = 'TabSRMM/ButtonsBar/ButtonPressed';
-
-//event flags
- BBCF_RIGHTBUTTON = 1;
- BBCF_SHIFTPRESSED = 2;
- BBCF_CONTROLPRESSED = 4;
- BBCF_ARROWCLICKED = 8;
-
-type
- CustomButtonClickData = record
- cbSize :int;
- pt :TPOINT; // screen coordinates for menus
- pszModule :PAnsiChar; // button owners name
- dwButtonId:DWORD; // registered button ID
- hwndFrom :HWND; // button parents HWND
- hContact :THANDLE; //
- flags :DWORD; // BBCF_ flags
- end;
-
-
-//button flags
- BBBF_DISABLED = $0001;
- BBBF_HIDDEN = $0002;
- BBBF_ISPUSHBUTTON = $0004;
- BBBF_ISARROWBUTTON = $0008;
- BBBF_ISCHATBUTTON = $0010;
- BBBF_ISIMBUTTON = $0020;
- BBBF_ISLSIDEBUTTON = $0040;
- BBBF_ISRSIDEBUTTON = $0080;
- BBBF_CANBEHIDDEN = $0100;
- BBBF_ISDUMMYBUTTON = $0200;
- BBBF_ANSITOOLTIP = $0400;
- BBBF_CREATEBYID = $0800; //only for tabsrmm internal use
-
-type
- tagBBButton = record
- cbSize :int; // size of structure
- dwButtonID :DWORD; // your button ID, will be combined with pszModuleName for storing settings, etc...
- pszModuleName:PAnsiChar; // module name without spaces and underline symbols (e.g. "tabsrmm")
- szTooltip :TChar; // button's tooltip
- dwDefPos :DWORD; // default order pos of button, counted from window edge (left or right)
- // use value >100, because internal buttons using 10,20,30... 80, etc
- iButtonWidth :int; // must be 0
- bbbFlags :DWORD; // combine of BBBF_ flags above
- hIcon :HICON; // Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
-end;
- BBButton = tagBBButton;
-
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_mwclc.inc b/delphi/Awkward/include/reserve/m_mwclc.inc
deleted file mode 100644
index fb338c1..0000000
--- a/delphi/Awkward/include/reserve/m_mwclc.inc
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-{$IFNDEF M_CLC}
-{$DEFINE M_CLC}
-
-// add a new hotkey so it has a default and can be changed in the options dialog
-// wParam=0
-// lParam=(LPARAM)(SKINHOTKEYDESC*)ssd;
-// returns 0 on success, nonzero otherwise
-type
- PSKINHOTKEYDESCEX = ^TSKINHOTKEYDESCEX;
- TSKINHOTKEYDESCEX = record
- cbSize :int;
- pszName :PAnsiChar; // name to refer to sound when playing and in db
- pszDescription:PAnsiChar; // description for options dialog
-// pszDefaultFile:PAnsiChar; // default sound file to use
- pszSection :PAnsiChar; // section name used to group sounds (NULL is acceptable)
- pszService :PAnsiChar; // Service to call when HotKey Pressed
- DefHotKey :int; // default hot key for action
- end;
-
-const
- MS_SKIN_ADDHOTKEY = 'Skin/HotKeys/AddNew'
- MS_SKIN_PLAYHOTKEY = 'Skin/HotKeys/Run';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_mydetails.inc b/delphi/Awkward/include/reserve/m_mydetails.inc
deleted file mode 100644
index c908849..0000000
--- a/delphi/Awkward/include/reserve/m_mydetails.inc
+++ /dev/null
@@ -1,174 +0,0 @@
-{
-Copyright (C) 2005 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$FINDEF M_MYDETAILS}
-{$DEFINE M_MYDETAILS}
-
-const
-
-{
- MyDetails/SetMyNickname service
- Set the nickname for all possible protocols
-
- wparam = (const AnsiChar *) protocol name or NULL for all protocols
- lparam = (const AnsiChar *) new nickname
- returns: -2 if proto can't set this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_SETMYNICKNAME:PAnsiChar = 'MyDetails/SetMyNickname';
-
-{
- MyDetails/SetMyNicknameUI service
- Shows a dialog to set the nickname for all possible protocols
-
- wparam = 0
- lparam = (const AnsiChar *) protocol name or NULL for all protocols
- returns: -2 if proto can't set this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_SETMYNICKNAMEUI:PAnsiChar = 'MyDetails/SetMyNicknameUI';
-
-{
- MyDetails/SetMyAvatar service
- Set the avatar for all possible protocols
-
- wparam = (const AnsiChar *) protocol name or NULL for all protocols
- lparam = (const AnsiChar *) new avatar file name
- returns: -2 if proto can't set this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_SETMYAVATAR:PAnsiChar = 'MyDetails/SetMyAvatar';
-
-{
- MyDetails/SetMyAvatarUI service
- Shows a dialog to set the avatar for all possible protocols
-
- wparam = 0
- lparam = (const AnsiChar *) protocol name or NULL for all protocols
- returns: -2 if proto can't set this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_SETMYAVATARUI:PAnsiChar = 'MyDetails/SetMyAvatarUI';
-
-{
- MyDetails/GetMyNickname service
- Get the nickname
-
- wparam = (const AnsiChar *) protocol name or NULL for default nick
- lparam = (AnsiChar *) the buffer to save the nickname. Has to have at least 1024 chars
- returns: -1 on protocol not found, else 0
-}
- MS_MYDETAILS_GETMYNICKNAME:PAnsiChar = 'MyDetails/GetMyNickname';
- MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE = 1024;
-
-{
- MyDetails/GetMyAvatar service
- Get the avatar file name
-
- wparam = (const AnsiChar *) protocol name or NULL for default avatar
- lparam = (AnsiChar *) the buffer to save the file name. Has to have at least 1024 chars
- returns: -2 if proto can't get this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_GETMYAVATAR:PAnsiChar = 'MyDetails/GetMyAvatar';
- MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE = 1024;
-
-{
- MyDetails/SetMyStatusMessageUI service
- Shows a dialog to set the status message for all possible protocols
- Today only works if NAS is installed.
-
- wparam = 0
- lparam = (const AnsiChar *) protocol name or NULL for all protocols
- returns: -2 if proto can't set this, -1 on protocol not found, else 0
-}
- MS_MYDETAILS_SETMYSTATUSMESSAGEUI:PAnsiChar = 'MyDetails/SetMyStatusMessageUI';
- MS_MYDETAILS_GETMYSTATUSMESSAGE_BUFFER_SIZE = 1024;
-
-{
- MyDetails/ShowNextProtocol service
- Shows the next protocol in the frame
-
- wparam = 0
- lparam = 0
- returns: -1 on error, 0 on success
-}
- MS_MYDETAILS_SHOWNEXTPROTOCOL:PAnsiChar = 'MyDetails/ShowNextProtocol';
-
-{
- MyDetails/ShowPreviousProtocol service
- Shows the previous protocol in the frame
-
- wparam = 0
- lparam = 0
- returns: -1 on error, 0 on success
-}
- MS_MYDETAILS_SHOWPREVIOUSPROTOCOL:PAnsiChar = 'MyDetails/ShowPreviousProtocol';
-
-{
- MyDetails/ShowProtocol service
- Shows a protocol given its name in the frame
-
- wparam = 0
- lparam = protocol name
- returns: -1 on error, 0 on success
-}
- MS_MYDETAILS_SHOWPROTOCOL:PAnsiChar = 'MyDetails/ShowProtocol';
-
-{
- MyDetails/CicleThroughtProtocols service
- Start/stops the cicling throught protocols
-
- wparam = FALSE to stop, TRUE to start
- lparam = 0
- returns: -1 on error, 0 on success
-}
- MS_MYDETAILS_CICLE_THROUGHT_PROTOCOLS:PAnsiChar = 'MyDetails/CicleThroughtProtocols';
-
-
-// Since ver.1.9
-
-{
-MyDetails/ShowFrame service
-Shows the MyDetails frame/window if it is hidden
-
-wparam = 0
-lparam = 0
-returns: 0
-}
- MS_MYDETAILS_SHOWFRAME:PAnsiChar = 'MyDetails/ShowFrame';
-
-
-{
-MyDetails/HideFrame service
-Hides the MyDetails frame/window if it is shown
-
-wparam = 0
-lparam = 0
-returns: 0
-}
- MS_MYDETAILS_HIDEFRAME:PAnsiChar = 'MyDetails/HideFrame';
-
-
-{
-MyDetails/ShowHideMyDetails service
-Shows the MyDetails frame/window if it is hidden or hides the MyDetails frame/window if it is shown
-
-wparam = 0
-lparam = 0
-returns: 0
-}
- MS_MYDETAILS_SHOWHIDEFRAME:PAnsiChar = 'MyDetails/ShowHideMyDetails';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_nat.inc b/delphi/Awkward/include/reserve/m_nat.inc
deleted file mode 100644
index 9502418..0000000
--- a/delphi/Awkward/include/reserve/m_nat.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-{$IFNDEF M_NAT}
-{$DEFINE M_NAT}
-
-type
- NETLIBIPINFO = record
- cbSize:integer;
- szIP :PAnsiChar; // IP the server returned, it maybe in any form, but assume IP4
- szSite:PAnsiChar; // where I got the IP from
- end;
-
-const
-{
- wParam=0
- lParam=(LPARAM)&NETLIBIPINFO
-
- Hook is fired when the IP is fetched from the server, it maybe still the old IP and I have
- no way of knowing you have the old IP or the newer one (or if it is new) so just check
- with the current and update if you need to.
-}
- ME_NETLIB_EXTERNAL_IP_FETCHED = 'Miranda/Netlib/IpFetched';
-
-{
- wParam=0
- lParam=0
-
- Forces the IP check, this will create a new thread to query the HTTP server and
- so you may get a few more updates (no more than 2 in a row though)
-}
- MS_NETLIB_EXTERNAL_IP_FORCECHECK = 'Miranda/Netlib/ForceCheck';
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_nconvers.inc b/delphi/Awkward/include/reserve/m_nconvers.inc
deleted file mode 100644
index adb9c3c..0000000
--- a/delphi/Awkward/include/reserve/m_nconvers.inc
+++ /dev/null
@@ -1,23 +0,0 @@
-{$IFNDEF M_NCONVERS}
-{$DEFINE M_NCONVERS}
-
-// replace smiley tags in a rich edit control...
-// wParam = (WPARAM) 0; not used
-// lParam = (LPARAM) (NCONVERS_GETICON*) &ncgi;
-// return: TRUE if found, FALSE if not
-
-typ
- PNCONVERS_GETICON = ^NCONVERS_GETICON;
- NCONVERS_GETICON = record
- cbSize :int; // = sizeof(NCONVERS_GETSMILEY)
- Protocolname :PAnsiChar; // NULL means 'default'
- SmileySequence:PAnsiChar; // character string containing the smiley
- SmileyIcon :HICON; // RETURN VALUE: this is filled with the icon handle...
- // do not destroy!
- Smileylength :int; // length of the smiley that is found.
- end;
-
-const
- MS_NCONVERS_GETSMILEYICON = 'nConvers/GetSmileyIcon';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_nickhistory.inc b/delphi/Awkward/include/reserve/m_nickhistory.inc
deleted file mode 100644
index 240fc73..0000000
--- a/delphi/Awkward/include/reserve/m_nickhistory.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_NICKHISTORY}
-{$DEFINE M_NICKHISTORY}
-
-const
- EVENTTYPE_NICKNAME_CHANGE = 9001;
-
-{
-Return TRUE is Nick History is enabled for this contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_NICKHISTORY_ENABLED = 'NickHistory/Enabled';
-
-{
-Enable Nick History for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_NICKHISTORY_ENABLE = 'NickHistory/Enable';
-
-{
-Disable Nick History for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_NICKHISTORY_DISABLE = 'NickHistory/Disable';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_nudge.inc b/delphi/Awkward/include/reserve/m_nudge.inc
deleted file mode 100644
index 6ec9faf..0000000
--- a/delphi/Awkward/include/reserve/m_nudge.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-{$INFDEF NUDGE}
-{$DEFINE NUDGE}
-const
- MS_SHAKE_CLIST = 'SHAKE/Service/ShakeClist';
- MS_SHAKE_CHAT = 'SHAKE/Service/ShakeChat';
- MS_SHAKE_CLIST_TRIGGER = 'SHAKE/Service/TriggerShakeClist';
- MS_SHAKE_CHAT_TRIGGER = 'SHAKE/Service/TirggerShakeChat';
- MS_NUDGE_SEND = 'NUDGE/Send';
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_quickcontacts.inc b/delphi/Awkward/include/reserve/m_quickcontacts.inc
deleted file mode 100644
index d82d23f..0000000
--- a/delphi/Awkward/include/reserve/m_quickcontacts.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-Copyright (C) 2005 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_QUICKCONTACTS}
-{$DEFINE M_QUICKCONTACTS}
-
-{
-Show the dialog to select the contact
-
-wParam: ignored
-lParam: ignored
-}
-const
- MS_QC_SHOW_DIALOG = 'QuickContacts/ShowDialog';
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_rssnews.inc b/delphi/Awkward/include/reserve/m_rssnews.inc
deleted file mode 100644
index cfe4fef..0000000
--- a/delphi/Awkward/include/reserve/m_rssnews.inc
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- RSSNews plugin
- by Angelo Luiz Tartari
-}
-
-{$IFNDEF M_RSSNEWS}
-{$DEFINE M_RSSNEWS}
-
-const
-
-(*
- Retrieve news.
- wParam = (WPARAM)(HANDLE)hContact
- lParam = 0
- Returns: 0 on success, -1 on error.
-*)
- MS_RSSNEWS_GETNEWS = 'RSSNews/GetNews';
-
-(*
- Retrieve news (all feeds).
- wParam = 0
- lParam = 0
- Returns: 0 on success, -1 on error.
-*)
- MS_RSSNEWS_GETALLNEWS = 'RSSNews/GetAllNews';
-
-(*
- Brings up the add new feed dialog.
- wParam = 0
- lParam = 0
- Returns: 0 on success, -1 on error.
-*)
- MS_RSSNEWS_ADDNEWFEED = 'RSSNews/AddNewFeed';
-
-(*
- Brings up the import dialog.
- wParam = 0
- lParam = 0
- Returns: 0 on success, -1 on error.
-*)
- MS_RSSNEWS_IMPORT = 'RSSNews/Import';
-
-(*
- Brings up the export dialog.
- wParam = 0
- lParam = 0
- Returns: 0 on success, -1 on error.
-*)
- MS_RSSNEWS_EXPORT = 'RSSNews/Export';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_sessions.inc b/delphi/Awkward/include/reserve/m_sessions.inc
deleted file mode 100644
index 0cc18a0..0000000
--- a/delphi/Awkward/include/reserve/m_sessions.inc
+++ /dev/null
@@ -1,347 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SESSION}
-{$DEFINE M_SESSION}
-
-// Pipe Messages
-
-{
- szEntity=szUI, szProto (always != NULL)
- hSession=yes
-
- A new entity handle is about to be created to bind .szUI for usage by .szProto,
- note that this handle is not yet in the handle list and the .szProto will
- get the message first, then the .szUI will.
-
- .szUI must set up any instance data within the given hSession,
- this is done with Sion_EntityCookieSet(hSession,SDR_UI,data).
-
- .szProto may also set up data to associate with the given hSession,
- this is done with Sion_EntityCookieSet(hSession,SDR_PROTO,data);
-
- This message is always sent from the main thread (a thread context switch
- occurs if needed).
-}
-const
- ENTITY_CREATE = 1;
- ENTITY_DESTROY = 2;
-
-// Services/Hooks
-
-{ either .dwTo, dwFrom may have an SDR_* type, and SDR_* flag }
- SDR_ALL = 1;
- SDR_SION = 2;
- SDR_PROTO = 3;
- SDR_UI = 4;
-
-{ you may extend this structure but .cbSize must stay and the reserved data
-at the end of the structure must not be rewritten into }
-type
- PIPE_DATA = record
- cbSize :int;
- szEntity:PAnsiChar; // can be NULL
- hSession:THANDLE; // ""
- dwMsg :DWORD;
- dwTo :DWORD
- dwFrom :DWORD; // SDR_*, SDR_ALL is not a good thing
- wParam :WPARAM;
- lParam :LPARAM;
- reserved[0..1] of DWORD; // is actually apart of the structure and is used internally
- end;
-
-{
-wParam=0
-lParam=(LPARAM)&PIPE_DATA
-
-Issue a call to an entity by name, type or to everyone, if you send
-a message to an entity by name, e.g. "ICQ" it will only goto "ICQ" and not
-to anyone else.
-}
-const
- MS_SION_PIPE = 'Sion/PipeCall';
-
-{
-wParam=0
-lParam=(LPARAM)&PIPE_DATA
-
-Begin your lovely relationship with everyone else who began a relationship
-before you, uh.. fill a pipe data structure and call this service :
-
-struct PIPE_DATA pd;
-pd.cbSize=sizeof(pd);
-pd.dwTo=SDR_PROTO;
-pd.szEntity="ICQ";
-pd.lParam=(MIRANDASERVICE)MyCallback;
-CallService(MS_SION_PIPEHOOK,0,(LPARAM)&pd);
-
-The service returns 0 on success and non zero on failure, once you have registered either as a UI or a protocol
-your MIRANDASERVICE will be called on the event on a pipe message that is
-either directed to your entity name (.szEntity!=NULL) or by SDR_* type.
-
-Note that the entity name may not be yours, but the pipe system may of been
-instructed to issue the call with the caller's entity name given to you, because
-you know what your entity name is already, you should not rely on .szEntity
-being anything, but if it is there, the message is for you only and no one else
-will get it and the value of .szEntity is dependant on the message.
-}
- MS_SION_PIPEHOOK = 'Sion/PipeHook';
-
-{
-wParam=0
-lParam=(LPARAM)&SION_ENTITY_DESCRIPTOR
-
-Create an entity handle binded to .szUI and for .szProto, this service will
-switch threads if it needs to to send ENTITY_CREATE to both .szUI and .szProto
-}
-type
- SION_ENTITY_DESCRIPTOR = record
- cbSize:int;
- szUI:PAnsiChar;
- szProto:PAnsiChar;
- hSession:THANDLE; // returned if successful
- end;
-
-const
- MS_SION_ENTITY_CREATE = 'Sion/EntityCreate';
-
-{
-wParam=0
-lParam=(LPARAM)HANDLE
-
-Decrement the given handle reference count by one, this will cause the
-handle to be freed if the reference count reaches zero, if this is the case
-there will be a thread switch to the main thread (if not called from the main thread)
-
-During handle shutdown, ENTITY_DESTROY will be sent to the protocol and then the UI,
-note that you do not need to give .szUI or .szProto because the handle knows
-who it is binded to.
-}
- MS_SION_ENTITY_RELEASE = 'Sion/EntityRelease';
-
-{
-wParam=0
-lParam=HANDLE
-
-Add one to the reference count of HANDLE.
-}
- MS_SION_ENTITY_CLONE = 'Sion/EntityClone';
-
-{
-wParam=0
-lParam=&SION_ENTITY_COOKIE
-
-Given a .hSession and a .dwSdr (SDR_*) code get/set a cookie pointer,
-if you pass data=NULL, then the current data stored for (SDR_*) will be
-returned, if you want to wipe that data, set persist=0
-
-Note that this function is now thread safe for SDR_UI, SDR_PROTO, SDR_SION,
-also note that UI's must store their instance data using this method.
-}
-type
- SION_ENTITY_COOKIE = record
- cbSize :int;
- hSession:THANDLE;
- dwSdr :dword; // SDR_* type to store data against, this can be SDR_UI or SDR_PROTO
- data :pointer; // can be NULL
- persist :int; // if TRUE and data is NULL then data will not be wiped
- end;
-const
- MS_SION_ENTITY_SETCOOKIE = 'Sion/EntitySetCookie';
-
-{
-wParam=0
-lParam=&SION_ENTITY_COOKIE
-
-Given .data and SDR_code, finds the associated .hSession and returns
-a reference to it, note that .data can not be NULL, .dwSdr is used
-to match the type of cookie.
-}
- MS_SION_ENTITY_FINDCOOKIE = 'Sion/EntityFindCookie';
-
-(*
-// -- Helper functions --
-
-__inline int Sion_PipeRegister(DWORD dwSdr,AnsiChar *szEntity,MIRANDASERVICE pfnService)
-{
- struct PIPE_DATA pd;
- pd.cbSize=sizeof(struct PIPE_DATA);
- pd.dwTo=dwSdr;
- pd.szEntity=szEntity;
- pd.lParam=(LPARAM)pfnService;
- return CallService(MS_SION_PIPEHOOK,0,(LPARAM)&pd);
-}
-
-__inline HANDLE Sion_EntityCreate(AnsiChar *szProto, AnsiChar *szUI)
-{
- struct SION_ENTITY_DESCRIPTOR sed;
- sed.cbSize=sizeof(sed);
- sed.szProto=szProto;
- sed.szUI=szUI;
- sed.hSession=NULL;
- if (!CallService(MS_SION_ENTITY_CREATE,0,(LPARAM)&sed) && sed.hSession) {
- return sed.hSession;
- }
- return NULL;
-}
-
-__inline int Sion_EntityRelease(HANDLE seh)
-{
- return CallService(MS_SION_ENTITY_RELEASE,0,(LPARAM)seh);
-}
-
-__inline int Sion_EntityClone(HANDLE seh)
-{
- return CallService(MS_SION_ENTITY_CLONE,0,(LPARAM)seh);
-}
-
-__inline void* Sion_EntityCookieGet(HANDLE seh, DWORD dwSdr)
-{
- struct SION_ENTITY_COOKIE sec;
- sec.cbSize=sizeof(sec);
- sec.hSession=seh;
- sec.dwSdr=dwSdr;
- sec.data=NULL;
- sec.persist=1;
- CallService(MS_SION_ENTITY_SETCOOKIE,0,(LPARAM)&sec);
- return sec.data;
-}
-
-__inline int Sion_EntityCookieSet(HANDLE seh, DWORD dwSdr, void* cookie)
-{
- struct SION_ENTITY_COOKIE sec;
- sec.cbSize=sizeof(sec);
- sec.hSession=seh;
- sec.dwSdr=dwSdr;
- sec.data=cookie;
- sec.persist=0;
- return CallService(MS_SION_ENTITY_SETCOOKIE,0,(LPARAM)&sec);
-}
-
-__inline HANDLE Sion_EntityCookieFind(DWORD dwSdr, void* cookie)
-{
- struct SION_ENTITY_COOKIE sec;
- sec.cbSize=sizeof(sec);
- sec.hSession=NULL;
- sec.dwSdr=dwSdr;
- sec.data=cookie;
- CallService(MS_SION_ENTITY_FINDCOOKIE,0,(LPARAM)&sec);
- return sec.hSession;
-}
-
-__inline int Sion_PipeBroadcast(AnsiChar* szEntity, HANDLE hSession, DWORD dwMsg,
- WPARAM wParam, LPARAM lParam, DWORD dwFrom, DWORD dwTo) {
- struct PIPE_DATA pd;
- pd.cbSize=sizeof(struct PIPE_DATA);
- pd.szEntity=szEntity;
- pd.hSession=hSession;
- pd.dwMsg=dwMsg;
- pd.dwTo=dwTo;
- pd.dwFrom=dwFrom;
- pd.wParam=wParam;
- pd.lParam=lParam;
- return CallService(MS_SION_PIPE,0,(LPARAM)&pd);
-}
-*)
-
-{
---Pipe Convos--
-
-The following is the planned pathway message, not all may make
-it to the final draft.
-
-Because of the nature of some protocols, there are some
-messages that some protocols can ignore since they have no meaning.
-
-SION : sends ENTITY_CREATE after creating a temporary entity handle
-PROTO,
-UI : both UI and protocol store structures as cookies within the handle
- which it can later fetch. At this point the UI is assumed single
- contact.
-
-SION : sends a message to the protocol to let it know it should allocate transport
-PROTO: the proto can assume this from ENTITY_CREATE, but I'm not sure this a good idea.
-
-PROTO: Protocol needs to send a message to tell the UI about basic channel stuff
- like if it is multiple contact from the start (IRC style) or open to change
- (MSN style) or if it is private and restricted in all forms of JOIN, INVITE, etc.
-UI : Can use this message to present information in a 2 person format even if
- the protocol level is widly different.
-
-
-SION : ATTACH_CHANNEL or ATTACH_CONTACT
-PROTO: will send "JOIN" or "INVITE" to request a join/a contact
- this maybe on the transport just created above.
- These two messages will be have a HPROCESS code
- that must be acknowledged later.
-
- Note that if the protocol does not require contacts
- to be attached in this way (invited) then just fake the
- ATTACHED_* messages.
-
- The contacts(s) will be shown in the channel at the UI level
- even if they are not yet within the channel at the protocol
- level.
-
-PROTO: sends ATTACHED_CHANNEL or ATTACHED_CONTACT with the HPROCESS
- code given by the ATTACH_* messages, this is to signal
- that the JOIN was successful or that the invited contact
- has joined.
-
- Note that there maybe more than one ATTACHED_* message.
-
-PROTO: sends a CHANNEL_WHOLIST
-UI : is supposed to listen out for this WHOLIST and present
- a list of people already inside the channel.
-
- if for a single user, the channel list maybe hidden.
-
-PROTO: sends a CHANNEL_TOPIC
-UI : displays the topic inside the channel, this message is optional and may not be sent
-
-PROTO: sends a CHANNEL_MODE
-UI : displays the modes that the channel is in, the modes still have to be abstracted
- to Miranda, e.g. IRC mode +M have another Miranda spec flag.
-
-PROTO: sends a CHANNEL_DONE
-UI : the UI is now sure that no more messages are expected.
-
-UI : sends a UI_TEXT message, with optional source HCONTACT and of course the message.
-PROTO: picks up on this message and transmits it, it must return
- a HPROCESS code that is later acknowledged.
-
- It is upto the protocol if it processes this message with the protocol
- send chain.
-
-PROTO: sends a UI_TEXTED with HPROCESS code given above
-UI : the UI may show the message as 'sent' or show nothing to the user.
-
-UI : sends UI_IAMTYPING
-PROTO: the protocol may or may not send this message to the other parties
- but it must process it, this message is also optional.
-
-PROTO: sends UI_CONTACT_ISTYPING (source HCONTACT)
-UI : an HCONTACT within the session is typing, the UI may elect to show this
- message in a status bar, or with a visual effect.
-}
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_simpleaway.inc b/delphi/Awkward/include/reserve/m_simpleaway.inc
deleted file mode 100644
index 16bf232..0000000
--- a/delphi/Awkward/include/reserve/m_simpleaway.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-{$IFNDEF M_SIMPLEAWAY}
-{$DEFINE M_SIMPLEAWAY}
-
-const
-// lParam = (AnsiChar *)status message
-// wParam = new status, from statusmodes.h
- MS_SA_SETSTATUSMODE = 'SimpleAway/SetStatusMode';
- MS_AWAYSYS_SETSTATUSMODE = MS_SA_SETSTATUSMODE //for compatibility with some plugins
-
-//Internal use only
- MS_SA_TTCHANGESTATUSMSG = 'SimpleAway/TTChangeStatusMessage';
-
-//wParam=new status, from statusmodes.h
-//lParam=protocol name, NULL if for all protocols (added in v0.3.1alpha)
- MS_SA_CHANGESTATUSMSG = 'SimpleAway/ChangeStatusMessage'
-
-// wParam = 0
-// lParam = 0
-// allways returns 1
- MS_SA_ISSARUNNING = 'SimpleAway/IsSARunning';
-
-// wParam = 0
-// lParam = 0
- MS_SA_COPYAWAYMSG = 'SimpleAway/CopyAwayMsg';
-
-{$ENDIF} \ No newline at end of file
diff --git a/delphi/Awkward/include/reserve/m_smh.inc b/delphi/Awkward/include/reserve/m_smh.inc
deleted file mode 100644
index 134b207..0000000
--- a/delphi/Awkward/include/reserve/m_smh.inc
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SMH}
-{$DEFINE M_SMH}
-
-const
- EVENTTYPE_STATUSMESSAGE_CHANGE = 9002;
-
-{
-Return TRUE is Status Message History is enabled for this contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMH_ENABLED = 'SMH/Enabled';
-
-{
-Enable Status Message History for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMH_ENABLE = 'SMH/Enable';
-
-{
-Disable Status Message History for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMH_DISABLE = 'SMH/Disable';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_smr.inc b/delphi/Awkward/include/reserve/m_smr.inc
deleted file mode 100644
index d8feacf..0000000
--- a/delphi/Awkward/include/reserve/m_smr.inc
+++ /dev/null
@@ -1,59 +0,0 @@
-{
-Copyright (C) 2005 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SMR}
-{$DEFINE M_SMR}
-
-const
-{
-Return TRUE is smr is enabled for this protocol
-If is enabled, status message is kept under CList\StatusMsg db key in user data
-
-wParam: protocol name
-lParam: ignored
-}
- MS_SMR_ENABLED_FOR_PROTOCOL = 'SMR/MsgRetrievalEnabledForProtocol';
-
-{
-Return TRUE is smr is enabled for this contact and its protocol (smr can be
-disabled per user, if protocol is enabled)
-If is enabled, status message is kept under CList\StatusMsg db key in user data
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMR_ENABLED_FOR_CONTACT = 'SMR/MsgRetrievalEnabledForUser';
-
-{
-Enable status message retrieval for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMR_ENABLE_CONTACT = 'SMR/EnableContactMsgRetrieval';
-
-{
-Disable status message retrieval for a contact
-
-wParam: hContact
-lParam: ignored
-}
- MS_SMR_DISABLE_CONTACT = 'SMR/DisableContactMsgRetrieval';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_spamfilter.inc b/delphi/Awkward/include/reserve/m_spamfilter.inc
deleted file mode 100644
index 1e15f7f..0000000
--- a/delphi/Awkward/include/reserve/m_spamfilter.inc
+++ /dev/null
@@ -1,751 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2003-2004 Heiko Herkenrath
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SPAMFILTER}
-{$DEFINE M_SPAMFILTER}
-
-const
-// Spam Filter Version: 2.5.2.1
-// See "spamcheck.c" in the sources for an example on how to use the spam checking services.
-
-// The functionality and the API of Spam Filter is quite complex
-// and not easy to describe or explain.
-// If you have any question or extension whishes please send me an e-mail:
-// hrathh at users.sourceforge.net
-
-// Notes:
-// * All services are fully thread-safe, you can call everything from any thread
-// (If there are problems with it it is a bug :-) )
-// * Unicode parameters can also be passed to the ANSI version of the plugin
-// and the other way round. The strings get converted as they are needed
-// using automatic two-way translation.
-// Unicode support was added in v2.5.0.0.
-
-// -------------------------------------------
-// -- Getting handles ------------------------
-// -------------------------------------------
-
- MS_SPAMFILTER_GETHANDLE = 'SpamFilter/GetHandle';
-
-// Description:
-// -------------
-// Gets a specified icon/window handle.
-
-// Parameters:
-// -------------
-// wParam = (UINT)uHandleType (see below);
-// lParam = 0
-
-// Possible values for wParam:
- SFHT_HWND_PLUGIN_OPTIONS = 2; // HWND of the "Spam Filter" options dialog (if it is loaded; else NULL)
- SFHT_HICON_SPAM = 3; // HICON of the spam icon (small): needs to be destroyed! (DestroyIcon())
- // Added in v2.0.2.0:
- SFHT_HICON_SPAM_LARGE = 4; // HICON of the spam icon (large): needs to be destroyed! (DestroyIcon())
- SFHT_HICON_SPAM_LAYER = 5; // HICON of the spam layer icon (small): needs to be destroyed! (DestroyIcon())
- // Icons are taken directly from resources, not skinned by user
- // Added in v2.0.3.0:
- SFHT_HWND_ADVERTISMENT_FILTER = 6; // HWND of the "Advertisment Filter" settings dialog (if it is opened; else NULL)
- SFHT_HWND_ROBOT_FILTER = 7; // HWND of the "Robot Filter" settings dialog (if it is opened; else NULL)
- SFHT_HWND_DISLIKEDMESSAGES_FILTER = 8; // HWND of the "Disliked Messages Filter" settings dialog (if it is opened; else NULL)
- // Added in v2.5.0.0:
- SFHT_HWND_SPAMDEFINITIONS_INFO = 9; // HWND of the "Spam Definitions" info dialog (if it is opened; else NULL)
- SFHT_HWND_SPAMMERS_INFO = 10; // HWND of the Spammers info dialog (if it is opened; else NULL)
-
- SFHT_BOOL_IS_UNICODE = 100; // No handle, returns TRUE if Spam Filter is installed as Unicode version, FALSE otherwise
- // (You probably never need to call this since Spam Filter performs automatic two-way translation
- // when a service is called)
-
-// Note: Icons are taken directly from resources, they are not skinned by user.
-
-
-// Return Values:
-// --------------
-// Returns the specified handle value: HINSTANCE, HWND, ICON
-//
-// Note:
-// If a handle is not available (or if it was removed) the function will
-// return NULL.
-// When you are using this service you need to check always for the
-// NULL return value.
-
-// -------------------------------------------
-// -- Activating/Deactivating the filters ----
-// -------------------------------------------
-
- MS_SPAMFILTER_CHANGEFILTERACTIVATION = 'SpamFilter/ChangeFilterActivation';
-
-// Description:
-// -------------
-// Provides the possibility to enable or disable the spam filters.
-// Also updates the checkboxes in the spam filter options if the option dialog is opened.
-
-// Parameters:
-// -------------
-// wParam = (UINT)uFilterType (For possible values see below)
-// lParam = (BOOL)bNewState (new activation state of filter)
-
-// Possible filter type values (uFilterType):
- SFT_ADVERTISMENT_FILTER = 1;
- SFT_DISLIKEDMESSAGES_FILTER = 2;
- SFT_ROBOT_FILTER = 3;
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-// -------------------------------------------
-// -- Showing configure dialogs --------------
-// -------------------------------------------
-
- MS_SPAMFILTER_SHOWFILTERDIALOG = 'SpamFilter/ShowFilterDialog';
-
-// Description:
-// -------------
-// Shows the configure dialog of the specified filter.
-
-// Parameters:
-// -------------
-// wParam = (HWND)hwndParent (Can be NULL)
-// lParam = (UINT)uFilterType (For possible values see above)
-// -> since 2.0.2.0: If this is zero then the options dialog will be opened pointing to the Spam Filter options.
-// Note:
-// If hwndParent is not NULL the function will not return
-// until the configure dialog is closed.
-// If hwndParent is NULL the Miranda window will be used as parent
-
-// Since 2.0.2.0:
- SFTEX_OPTIONS_PAGE = 0;
-
-// Since 2.5.0.0:
-// Combine the following flag with the lParam/uFilterType parameter
-// to show the corresponding Spam Definitions info dialog instead
-// of the settings dialog:
- SFTEXF_SPAMDEFINITIONS_INFO = $2000;
-// Note: SFTEXF_SPAMDEFINITIONS_INFO can't be combined with SFT_ROBOT_FILTER
-
-// Combine the following flag with the lParam/uFilterType of 0 parameter
-// to show the Spammers dialog instead of the settings dialog:
- SFTEXF_SPAMMERS_INFO = $4000;
-// Note: SFTEXF_SPAMMERS_INFO can't be combined with SFT_*
-
-
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-// Since v2.0.3.0:
-// If the specified settings window is already opened it will be
-// brought to front (reactivated) instead (returns success though).
-// This might be changed however in the future.
-
-// Changed behaviour in v2.0.3.0:
-// If hwndParent was not set then the function returned the handle to the new window.
-// Now the function returns 0 to indicate success instead.
-
-
-// -------------------------------------------
-// -- Adding message types -------------------
-// -------------------------------------------
-
- MS_SPAMFILTER_REGISTERMESSAGETYPE = 'SpamFilter/MessageTypes/Register';
-
-// Description:
-// -------------
-// Adds a new message type which can be checked for spam.
-// Associated event: ME_SPAMFILTER_PREREGISTERMESSAGETYPE
-
-// Parameters:
-// -------------
-// wParam = 0
-// lParam = (MESSAGETYPEDESC*)mtd (see below)
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-// Already registered message types are:
-// (With pszSection set to the installed network protocol names, e.g. "ICQ")
- SFMT_AUTHREQUEST = 'Auth';
- SFMT_ADDED = 'Added'; // since v2.1.0.0
- SFMT_MESSAGE = 'Msg';
- SFMT_URL = 'URL';
- SFMT_FILE = 'File';
- SFMT_CONTACTS = 'Contacts';
-
-
-// MESSAGETYPEDESC structure:
-type
- PMESSAGETYPEDESC = ^TMESSAGETYPEDESC;
- TMESSAGETYPEDESC = record
- cbSize :Integer; // Set to sizeof(MESSAGETYPEDESC)
- pszSection :PAnsiChar; // Section of message name for database
- // e.g. protocol name (Can not be NULL)
- SectionDescription:TChar; // Readable name of section e.g. protocol name (can be NULL)
- // Ignored if section existed previously
- hSectionIcon :THANDLE; // Icon to show for section e.g. protocol icon (can be NULL)
- // Ignored if section existed previously
- pszName :PAnsiChar; // Name to refer to message type when spam
- // checking and in db (Can not be NULL)
- Description :TChar; // Description for options dialog (can be NULL)
- hIcon :THANDLE; // EITHER: icon handle representing the message
- // type OR: one of mirandas skin constants with
- // a negative sign, e.g (HICON)-SKINICON_EVENT_MESSAGE,
- // same as for LoadSkinnedIcon() -> can be 0
- // and can also be a normal icon handle (HICON)
- bDefaultStatus :BOOL; // Whether checking for this type should be
- // activated or not by default
- dwFlags :DWORD; // Flags for the message type (for possible flags see below)
- iSectionPosition :Integer; // Approx position number for the section in the
- // options list, lower numbers are nearer to the
- // top (Can be 0 to be sorted alphabetically)
- // Ignored if section existed previously (or
- // if pszSection is NULL) Added in v2.1.1.0
- iPosition :Integer; // Approx position number for the item in the
- // options list, lower numbers are nearer to the
- // top (Can be 0 to be sorted alphabetically)
- // Added in v2.1.1.0
- end;
-
-const
-
-// Possible MESSAGETYPEDESC flags:
- MTDF_DEFAULTDISABLED = $00000001; // Is disabled by default
- MTDF_HIDDEN = $00000002; // Does not get shown on the options page
-// Since v2.5.0.0
- MTDF_UNICODE = $00000004; // pszSectionDescription and pszDescription are Unicode strings
-
-
-// -------------------------------------------
-// -- Modify new added message type (Event) --
-// -------------------------------------------
-
- ME_SPAMFILTER_PREREGISTERMESSAGETYPE = 'SpamFilter/MessageTypes/PreRegister';
-
-// Description:
-// -------------
-// Gets fired before a new message type is added to be checked for spam.
-//
-// This is meant for asking other plugins if the specified default data is ok.
-// Other plugins (especially protocols) can disable a message type if either sending spam
-// is not possible for those protocols or if spam checking would cause unwanted side-effects.
-
-// Warning: Most elements of the MESSAGETYPEDESC structure can also be NULL.
-// However, the structure was checked for errors before this events gets called.
-
-// Parameters:
-// -----------------
-// wParam = 0 (same wParam as used for MS_SPAMFILTER_REGISTERMESSAGETYPE)
-// lParam = (MESSAGETYPEDESC*)mtd (see above, contents can be modified)
-
-// Return Values:
-// -----------------
-// Returning 0 on this event will accept the message type to be added.
-// Returning 1 will prevent the the message type to be added.
-
-// Note: Works as it does now since v2.1.1.0
-
-
-// -------------------------------------------
-// -- Uninstalling a message type ------------
-// -------------------------------------------
-
- MS_SPAMFILTER_REMOVEMESSAGETYPE = 'SpamFilter/RemoveMessageType';
-
-// Description:
-// -------------
-// Uninstalls a specifed message type. It removes the database setting related to the given message type.
-// Should only be used for uninstalling purposes (e.g in uninstall function of PluginUninstaller)
-
-// Parameters:
-// -------------
-// wParam = (AnsiChar*)pszMsgTypeName (Message type name; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
-// lParam = (AnsiChar*)pszMsgTypeSection (The section of the message type string; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error..
-
-
-// -------------------------------------------
-// -- Message type activation ----------------
-// -------------------------------------------
-
- MS_SPAMFILTER_ISMESSAGETYPEACTIVATED = 'SpamFilter/MessageTypes/IsActivated';
-
-// Description:
-// -------------
-// Returns if a specified message type is activated or not.
-
-// Parameters:
-// -------------
-// wParam = (AnsiChar*)pszMsgTypeName (Message type name; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
-// lParam = (AnsiChar*)pszMsgTypeSection (The section of the message type string; You need to use MS_SPAMFILTER_REGISTERMESSAGETYPE before)
-
-// Return Values:
-// --------------
-// Returns TRUE if the message type is activated and FALSE otherwise.
-
-
-// -------------------------------------------
-// -- Reset AutoIgnore counters --------------
-// -------------------------------------------
-
- MS_SPAMFILTER_RESETAUTOIGNORE = 'SpamFilter/AutoIgnore/Reset';
-
-// Description:
-// -------------
-// Resets the list in which the total number of spam sent by
-// each user is kept.
-// The list is necessary to determine when a particular user reached the
-// allowed spam messages limit.
-
-// Parameters:
-// -------------
-// wParam = (BOOL)bOnlyCount (if TRUE the service will only return the user count without doing reset)
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-// -----------------------------------------
-// -- Spam Checking ------------------------
-// -----------------------------------------
-
- MS_SPAMFILTER_ADVERTISMENTCHECK = 'SpamFilter/AdvertismentCheck';
- MS_SPAMFILTER_DISLIKEDMESSAGESCHECK = 'SpamFilter/DislikedMessagesCheck';
- MS_SPAMFILTER_ROBOTCHECK = 'SpamFilter/RobotCheck';
-
-// Description:
-// -------------
-// These services provide the possibility to check a specified text for contained spam.
-// The function checks for everything that is activated in the plugin's options.
-
-// Note: These functions work as they do now since v2.1.0.0
-
-// Parameters:
-// -------------
-// wParam = (SPAMCHECKDATA*)scd
-// lParam = 0
-
-// SPAMCHECKDATA structure:
-type
- PSPAMCHECKDATA = ^TSPAMCHECKDATA;
- TSPAMCHECKDATA = record
- cbSize :Integer; // sizeof(SPAMCHECKDATA)
- pszMsgTypeSection:PAnsiChar; // The section of the message type string: You need
- // to use MS_SPAMFILTER_REGISTERMESSAGETYPE before
- pszMsgTypeName :PAnsiChar; // Description of the message: You need to use
- // MS_SPAMFILTER_REGISTERMESSAGETYPE before
- MsgText :TChar; // Pointer to the text of a message which is
- // checked for spam. Can be NULL.
- dwFlags :DWORD; // Flags for the spam checking. (For more details see below.)
- case LongInt of
- 0: (hContact: HCONTACT); // Handle to the sending contact (use pszUserName
- // instead if no hContact is available)
- 1: (UserName: TChar); // Name of the user, e.g. nick (set SCDF_NO_CONTACT
- // in the flags to use this parameter) -> should
- // be as unique as possible
- end;
-
-const
-// Possible flags in the SPAMCHECKDATA structure:
- SCDF_NO_NOTIFY = $00000001; // Don't show a popup, play sound or log to file if the message is spam.
- SCDF_NO_CANCEL = $00000002; // Do check even if user pressed control key to avoid the spam check manually
- SCDF_NO_AUTOIGNORE = $00000004; // Do not use the AutoIgnore feature for this check
- SCDF_NO_CONTACT = $00000008; // Use pszUserName instead of hContact of union
-// Since v2.5.0.0:
- SCDF_UNICODE = $00000010; // Specify this flag if associated message text and/or user name is Unicode
-
-
-// Return Values:
-// --------------
-// Possible return flags:
- SFF_MARKREAD = $00000010; // Flag
- SFF_DELETE = $00000020; // Flag
- SFF_IGNORE = $00000040; // Flag
- SFF_SENDMSG_NOTIFY = $00000100; // Flag, Only MS_SPAMFILTER_DISLIKEDMESSAGESCHECK
- SFF_SENDMSG_INSTRUCTION = $00000200; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
- SFF_SENDMSG_CONFIRMATION = $00000400; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
- SFF_TESTPASSED = $00000080; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
- SFF_ISSPAM = $00000002; // Flag
- SFF_ISNORMAL = $00000001; // Flag
-// Since 2.5.2.0:
- SFF_HIDE = $00001000; // Flag, Only MS_SPAMFILTER_ROBOTCHECK
-
-// -------------------------------------------
-// -- Getting additional Check Info ----------
-// -------------------------------------------
-
- MS_SPAMFILTER_GETSPAMCHECKINFO = 'SpamFilter/GetSpamCheckInfo';
-
-// Description:
-// -------------
-// Gets data needed for the processing of spam mesages.
-
-// Parameters:
-// -------------
-// wParam = (DWORD)dwDataType (For possible values see below)
-// lParam = depends on wParam (see below)
-
-// Possible values for lParam:
-
-// TRUE/FALSE: if the specified filter is enabled
- SFSCI_ACTIVATION_FILTER = 1; // lParam = uFilterType (For possible values see above)
-
-// Strings: Get the message texts specified by the user
-// ANSI
- SFSCI_MSGTEXT_NOTIFYA = 2; // lParam = (SPAMCHECKDATA*)scd, scd->hContact (or scd->pszUserName) and scd->pszMsgText (and scd->cbSize) should be filled in.
- SFSCI_MSGTEXT_INSTRUCTIONA = 3; // lParam: see SFSCI_MSGTEXT_NOTIFYA
- SFSCI_MSGTEXT_CONFIRMATIONA = 4; // lParam: see SFSCI_MSGTEXT_NOTIFYA
-
-// Unicode (since v2.5.0.0)
- SFSCI_MSGTEXT_NOTIFYW = 6; // lParam = (SPAMCHECKDATA*)scd, scd->hContact (or scd->pwszUserName) and scd->pwszMsgText (and scd->cbSize) should be filled in.
- SFSCI_MSGTEXT_INSTRUCTIONW = 7; // lParam: see SFSCI_MSGTEXT_NOTIFYW
- SFSCI_MSGTEXT_CONFIRMATIONW = 8; // lParam: see SFSCI_MSGTEXT_NOTIFYW
-
-// TRUE/FALSE: if the above message text should be added to history.
- SFSCI_ADD_TO_HISTORY = 5; // lParam = SFSCI_MSGTEXT_NOTIFY(A/W), SFSCI_MSGTEXT_INSTRUCTION(A/W) or SFSCI_MSGTEXT_CONFIRMATION(A/W)
-
-// Since 2.5.2.0:
-// Counts of milliseconds to delay the above message texts sending.
- SFSCI_DELAY_TIME_REPLY = 9; // lParam=0
-
-
-// Return Values:
-// --------------
-// SFSCI_ACTIVATION_FILTER -> (BOOL)TRUE/FALSE
-// SFSCI_DELAY_TIME_REPLY -> (BOOL)TRUE/FALSE
-
-// SFSCI_MSGTEXT_NOTIFYA -> (AnsiChar*) free with miranda_sys_free() of "m_system.h", (all %vars% in the text are already resolved)
-// SFSCI_MSGTEXT_INSTRUCTIONA -> see SFSCI_MSGTEXT_NOTIFYA
-// SFSCI_MSGTEXT_CONFIRMATIONA -> see SFSCI_MSGTEXT_NOTIFYA
-
-// SFSCI_MSGTEXT_NOTIFYW -> (WCHAR*) free with miranda_sys_free() of "m_system.h", (all %vars% in the text are already resolved)
-// SFSCI_MSGTEXT_INSTRUCTIONW -> see SFSCI_MSGTEXT_NOTIFYW
-// SFSCI_MSGTEXT_CONFIRMATIONW -> see SFSCI_MSGTEXT_NOTIFYW
-
-// SFSCI_ADD_TO_HISTORY -> (BOOL)TRUE/FALSE
-
-// returns NULL on error
-
-
-// -------------------------------------------
-// -- Confirm spam check (Event) -------------
-// -------------------------------------------
-
- ME_SPAMFILTER_OKTOSPAMCHECK = 'SpamFilter/OkToSpamCheck';
-
-// Description:
-// -------------
-// Gets fired before the spam check for a message starts.
-
-// Parameters:
-// -----------------
-// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
-
-// Return Values:
-// -----------------
-// Returning 0 on this event will accept spam checking for the message,
-// Returning 1 will prevent the spam check.
-
-
-// -------------------------------------------
-// -- Confirm spam detection (Event) ---------
-// -------------------------------------------
-
- ME_SPAMFILTER_OKTOSPAMDETECTION = 'SpamFilter/OkToSpamDetection';
-
-// Description:
-// -------------
-// Gets fired after a spam message is detected.
-
-// Parameters:
-// -----------------
-// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
-
-// Return Values:
-// -----------------
-// Returning 0 on this event will accept the spam detection
-// Returning 1 cause the message not to be seen as spam.
-
-// Note: If you only would like to get the final result hook
-// ME_SPAMFILTER_SPAMRECEIVED instead
-
-
-// -------------------------------------------
-// -- Spam message received (Event) ----------
-// -------------------------------------------
-
- ME_SPAMFILTER_SPAMRECEIVED = 'SpamFilter/SpamReceived';
-
-// Description:
-// -------------
-// Gets fired when a message if recognized as spam.
-
-// Parameters:
-// -----------------
-// wParam = (SPAMCHECKDATA*)scd (Pointer to SPAMCHECKDATA struct)
-// lParam = (UINT)uFilterType (For possible values see above)
-
-// Return Values:
-// -----------------
-// The return value should be 0.
-
-
-// -------------------------------------------
-// -- Spam Filter loaded (Event) -------------
-// -------------------------------------------
-
- ME_SPAMFILTER_MODULELOADED = 'SpamFilter/ModuleLoaded';
-
-// Description:
-// -------------
-// Gets fired when a all parts of the "Spam Filter" were loaded and available
-// to other plugins.
-// Past this event all functionality of the plugin is fully available.
-// The event works quite similar as ME_SYSTEM_MODULESLOADED.
-// You can use ME_SYSTEM_MODULESLOADED in most cases instead. Please do so!
-
-// Parameters:
-// -----------------
-// wParam = 0
-// lParam = 0
-
-// Return Values:
-// -----------------
-// The return value should be 0.
-
-
-
-// -------------------------------------------
-// -- Helper: Duplicate SPAMCHECKDATA --------
-// -------------------------------------------
-
- MS_SPAMFILTER_COPYSPAMCHECKDATA = 'SpamFilter/SpamCheckData/Copy';
-
-// Description:
-// -------------
-// Copys all contents of a SPAMCHECKDATA struct (especially strings) to another one
-// using Miranda's Memory Manager Interface (see m_system.h).
-// Use MS_SPAMFILTER_FREESPAMCHECKDATA to free the result when no longer needed.
-
-// Available since 2.5.2.0.
-
-// Parameters:
-// -------------
-// wParam = (SPAMCHECKDATA*)pscdTo
-// lParam = (SPAMCHECKDATA*)pscdFrom
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-
-// -------------------------------------------
-// -- Helper: Free SPAMCHECKDATA -------------
-// -------------------------------------------
-
- MS_SPAMFILTER_FREESPAMCHECKDATA = 'SpamFilter/SpamCheckData/Free';
-
-// Description:
-// -------------
-// Frees the memory allocated by MS_SPAMFILTER_COPYSPAMCHECKDATA.
-// using Miranda's Memory Manager Interface (see m_system.h).
-
-// Available since 2.5.2.0.
-
-// Parameters:
-// -------------
-// wParam = (SPAMCHECKDATA*)pscd
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on failure.
-
-
-
-// -------------------------------------------
-// -- Showing error messages -----------------
-// -------------------------------------------
-
- MS_SPAMFILTER_SHOWERROR = 'SpamFilter/ShowError';
-
-// Description:
-// -------------
-// Shows a Miranda try balloon tip, popup or message box
-// with the specified error message.
-
-// Parameters:
-// -------------
-// wParam = (UINT)uErrorType (For possible values see below)
-// lParam = 0
-
-// Possible values for wParam:
- SFSE_CRITICAL_ERROR = 1; // Unspecified critical error occured related to spam checking.
- // Only use this for situations that may never ever occur.
- // Please do avoid this if possible.
-
- SFSE_SEND_FAILED = 2; // Show this error when a sending of SFSCI_MSGTEXT_NOTIFY,
- // SFSCI_MSGTEXT_INSTRUCTION, or SFSCI_MSGTEXT_CONFIRMATION failed
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-
-// -------------------------------------------
-// -- Set contact as spammer (Contact) -------
-// -------------------------------------------
-
- MS_SPAMFILTER_CONTACT_SETASSPAMMER = 'SpamFilter/Contact/SetAsSpammer';
-
-// Description:
-// -------------
-// This service adds a specified user to the spammer list (fully ignored).
-
-// Note: works same as MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG
-// but does not prompt the user.
-
-// Available since v2.5.0.0
-
-// Parameters:
-// -------------
-// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
-// lParam = (DWORD)dwFlags (flags about what should be done, see below)
-
-// Available Flags:
- SCASF_NO_NOTIFY = $00000001; // Prevents logging and playing of sounds
- SCASF_USE_ROBOT_SOUND = $00000002; // play robot sound instead of advertisment sound (only if SCASF_NO_NOTIFY is not set)
- SCASF_NO_REMOVE_HISTORY = $00000004; // history is marked read instead of fully removed
- SCASF_NO_DENY_AUTHREQUESTS = $00000008; // do not deny pending auth requests
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-// -------------------------------------------
-// -- Show mark spammer dialog (Contact) -----
-// -------------------------------------------
-
- MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG = 'SpamFilter/Contact/ShowSetAsSpammerDialog';
-
-// Description:
-// -------------
-// This service adds a specified user to the spammer list.
-// Before it shows a dialog to let the user confirm the action.
-// For use for example as action for a button on the message dialog.
-
-// Note: This service performs the same tasks as MS_SPAMFILTER_SETCONTACTASSPAMMER
-// to execute the action the user chooses.
-
-// Available since v2.5.0.0
-
-// Parameters:
-// -------------
-// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
-// lParam = (HWND)hwndParent (Handle to the parent window. Can be NULL.)
-
-// Return Values:
-// --------------
-// Returns FALSE if user clicked cancel on the dialog.
-// TRUE if the contact was handled as spammer.
-
-
-// Changed in v2.5.0.0:
-// The service MS_SPAMFILTER_SETSPAMMANUALLY has been deprecated.
-// New plugins should use MS_SPAMFILTER_CONTACT_SHOWSETASSPAMMERDIALOG instead.
- MS_SPAMFILTER_SETSPAMMANUALLY = 'SpamFilter/SetSpamManually';
-
-
-// -------------------------------------------
-// -- Test if contact is spammer (Contact) ---
-// -------------------------------------------
-
- MS_SPAMFILTER_CONTACT_ISSPAMMER = 'SpamFilter/Contact/IsSpammer';
-
-// Description:
-// -------------
-// This service tests if a specified contact is on the spammer list (fully ignored).
-
-// Available since v2.5.0.0
-
-// Parameters:
-// -------------
-// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns TRUE when the contact is on the spammer list, FALSE otherwise.
-
-
-// -------------------------------------------
-// -- Unmarks a contact as spammer (Contact) -
-// -------------------------------------------
-
- MS_SPAMFILTER_CONTACT_UNSETSPAMMER = 'SpamFilter/Contact/UnSetSpammer';
-
-// Description:
-// -------------
-// This service restores a spammer to be again a normal contact (unignored).
-
-// Available since v2.5.0.0
-
-// Parameters:
-// -------------
-// wParam = (HANDLE)hContact (Handle to a contact in database. Can't be NULL.)
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success, nonzero on error.
-
-
-// -------------------------------------------
-// -- Spammer state changed (Event) ----------
-// -------------------------------------------
-
- ME_SPAMFILTER_CONTACT_SPAMMERSTATECHANGED = 'SpamFilter/Contact/SpammerStateChanged';
-
-// Description:
-// -------------
-// Gets fired when a a contact gets marked as spammer or unmarked.
-
-// Parameters:
-// -----------------
-// wParam = (HANDLE)hContact
-// lParam = (BOOL)bIsSpammer (new state)
-
-// Return Values:
-// -----------------
-// The return value should be 0.
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_spellchecker.inc b/delphi/Awkward/include/reserve/m_spellchecker.inc
deleted file mode 100644
index cd636e1..0000000
--- a/delphi/Awkward/include/reserve/m_spellchecker.inc
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-Copyright (C) 2006 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_SPELLCHECKER}
-{$DEFINE M_SPELLCHECKER}
-
-type
- SPELLCHECKER_ITEM = record
- cbSize :int;
- hContact :THANDLE; // The contact to get the settings from, or NULL
- hwnd :HWND; // The hwnd of the richedit
- window_name:PAnsiChar; // A name for this richedit
- end;
-
-type
- SPELLCHECKER_POPUPMENU = record
- cbSize :int;
- hwnd :HWND; // The hwnd of the richedit
- hMenu :HMENU; // The handle to the menu
- pt :TPOINT; // The point, in screen coords
- hwndOwner:HWND; // The hwnd of owner of the popup menu. If it is null, hwnd is used
- end;
-
-const
-{
-Adds a richedit control for the spell checker to check
-
-wParam: SPELLCHECKER_ITEM *
-lParam: ignored
-return: 0 on success
-}
- MS_SPELLCHECKER_ADD_RICHEDIT = 'SpellChecker/AddRichedit';
-
-{
-Removes a richedit control for the spell checker to check
-
-wParam: HWND
-lParam: ignored
-return: 0 on success
-}
- MS_SPELLCHECKER_REMOVE_RICHEDIT = 'SpellChecker/RemoveRichedit';
-
-{
-Show context menu
-
-wParam: SPELLCHECKER_POPUPMENU
-lParam: ignored
-return: the control id selected by the user, 0 if no one was selected, < 0 on error
-}
- MS_SPELLCHECKER_SHOW_POPUP_MENU = 'SpellChecker/ShowPopupMenu';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_uninstaller.inc b/delphi/Awkward/include/reserve/m_uninstaller.inc
deleted file mode 100644
index 5c01948..0000000
--- a/delphi/Awkward/include/reserve/m_uninstaller.inc
+++ /dev/null
@@ -1,619 +0,0 @@
-{
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-}
-{$IFNDEF M_UNINSTALLER}
-{$DEFINE M_UNINSTALLER}
-
-(*
- | General Info
- -----------------------------
-
- Uninstall Example/Template
- ---------------------------
- Making your plugin uninstallable is very easy.
- Just add the following "Uninstall" function near the "Unload" function
- in your plugin.
- A template plugin is available in the source code package.
-
- Old:
- int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, AnsiChar* pszPluginPath);
-
- New:
-int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-{
- Available Variables:
- -----------------------------
- ppup->bIsMirandaRunning:
- Contains if Miranda is running
- (Currently this is always TRUE).
-
- ppup->bDoDeleteSettings:
- Contains if the users selected
- that he wants all settings be deleted.
-
- ppup->pszPluginsPath:
- Contains the plugins directory name.
-
-
- Notes:
- -----------------------------
-
- Run before "Unload" function:
- -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- All Miranda is still loaded
-
- Here you can do:
- - Delete settings group in database
- - Delete registry items
- - Delete ini-files and other settings files
- - Delete other files
-
- Your plugin dll gets automatically deleted
-
- Services to remove are offered:
- MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- Getting other useful paths:
- -----------------------------
-
- System directory:
-
- AnsiChar szSysPath[MAX_PATH];
- GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- Windows directory:
-
- AnsiChar szWinPath[MAX_PATH];
- GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- Other directories:
-
- AnsiChar szPath[MAX_PATH];
- SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- Some available dirs:
- CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- Delete Files
- const AnsiChar* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- Delete Settings
- if(ppup->bDoDeleteSettings == TRUE)
- {
- if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- {
- Remove plugin's module
- PUIRemoveDbModule("MyPlugin");
-
- Remove plugin's sounds
- PUIRemoveSkinSound("MySoundSetting1");
- PUIRemoveSkinSound("MySoundSetting2");
- }
- }
-
- Remember:
- Do not forget to remove your (eventually) created registry items here, too.
-
-
- The plugin's dll file gets deleted after returning.
-
- Remember:
- If your DLL file is additionally in use by another application (eg. Windows)
- you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
- return 0;
-}
-*)
-
-{
- Changing displayed icon
- ---------------------------
- The icon that gets displayed on the options page is always the "first"
- icon in your DLL file.
- An icon in your DLL file is the first icon when it has the lowest recource ID.
- If you would like to have an other icon shown in the options please change your
- icon resource IDs so that the icon you would like to have has the lowest one.
- For example if you use MS Visual C++, open "resource.h" and change the resource define
- of your prefered icon to the lowest icon number.
-
-
- Changing displayed docs
- ---------------------------
- The items "License" and "More Information" on the plugin details page
- are created when the a license and/or a readme file for the plugin exists.
- The files get detected automatically and need a special name
- so that they get detected.
- The text files need to be either placed in the "Plugins" directory or
- in the "Docs" directory. Whereof the last one is the better one :-)
-
- For the license file the following file name formatings are possible:
- PluginName-License.txt (I personally think that this is the best naming solution... :-) )
- PluginName_License.txt,
-
- For the readme file the following ones are possible:
- PluginName-Readme.txt (Again...I like this one :-D ),
- PluginName_Readme.txt,
-
- Message boxes on uninstall
- ---------------------------
- If you would like to ask the user for something to remove/uninstall
- please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
- message box there. Save the action the user chose in a
- global BOOL variable and do the chosen action in "UninstallEx".
- You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
- Service Accessibility
- ---------------------------
- Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
- or later because "PluginUninstaller" needs to be loaded first.
- Normally you only use them in your "UninstallEx" function.
-
- IMPORTANT!:
- Please make sure that you always use the macro PUICallService
- in the "UninstallEx" function instead of the CallService function.
-
-
- Including this file
- ---------------------------
- To use some of the uninstalling functionality you have to include this file
- into your project.
-
- IMPORTANT!:
- Please make sure that you include the file "newpluginapi.h" before this one.
- If this isn't the case there may some compile errors come up.
-
- -> Example:
- If your plugin is in the directory "Plugins/MyPlugin/" and
- this include file is in the directory "Plugins/PluginUninstaller"
- you can use the following:
-
- #include "../PluginUninstaller/m_uninstaller.h"
-
- If your plugin is in an directory that is different to that one just
- change the include path to the one you want.
-}
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-type
- THELPERPROC = function(proc:PAnsiChar;wParam:WPARAM;lParam:LPARAM) :int;cdecl;
-
-type
- PLUGINUNINSTALLPARAMS = record
- bIsMirandaRunning :bool; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- bDoDeleteSettings :bool; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- pszPluginsPath :PAnsiChar; // Contains the plugin directory path
- pszDocsPath :PAnsiChar; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- pszIconsPath :PAnsiChar; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- pHelperProcAddress:THELPERPROC; // Used internally (Contains proc address for PUICallService)
- end;
-
-(*
- Description:
- -------------
- This service provides the possibility to call a Miranda
- service in the "UninstallEx" function.
- Important!: Use this macro always instead of "CallService",
- because else a crash occurs when the plugin was decativated
- and gets uninstalled
-
- Parameters:
- -------------
- Same parameters as CallService of Miranda Core.
-
- Return Values:
- --------------
- Return values are the same as the CallService function of Miranda Core.
- Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
- which means the services are not accessable.
-
- Example:
- ----------------------------------
-
- if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- {
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- }
-*)
-
-{
- ---------------------------------------------
- -- Function: Remove some files in directory -
- ---------------------------------------------
-
- Function: PUIRemoveFilesInDirectory
-}
-//static BOOL __inline PUIRemoveFilesInDirectory(AnsiChar* pszPath, const AnsiChar* apszFiles[]);
-
-{
- Description:
- -------------
- This helper provides the possibility to easily
- remove specified files in a specified directory.
-
- Note: The last version of this helper (PUIRemoveFilesInPath)
- did not work correctly.
- Please do now always append a NULL slot to the end of your array.
-
- Parameters:
- -------------
- AnsiChar* pszPath = Path to the files in array
- const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
- Return Values:
- --------------
- Returns TRUE if the files could be deleted.
- FALSE if the files could not be deleted or did not exist.
-}
-(*
-static BOOL __inline PUIRemoveFilesInDirectory(AnsiChar* pszPath, const AnsiChar* apszFiles[])
-{
- AnsiChar szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, sizeof(szFile));
- strncat(szFile, apszFiles[iFile], sizeof(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- Example:
- ----------------------------------
-
- const AnsiChar* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-*)
-
-const
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
- ME_PLUGINUNINSTALLER_OKTOUNINSTALL = 'PluginUninstaller/OkToUninstall';
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
- ME_PLUGINUNINSTALLER_UNINSTALL = 'PluginUninstaller/Uninstall';
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-// | Services
-// -----------------------------
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
- MS_PLUGINUNINSTALLER_REMOVEDBMODULE = 'PluginUninstaller/RemoveDbModule';
-
-{
- Description:
- -------------
- This service provides the possibility to delete all database modules
- associated to your plugin.
- The specified database module will be removed in all contacts
- including the NULL contact.
- Remember to call it always with PUICallService in "UninstallEx" function.
-
- Parameters:
- -------------
- wParam = (AnsiChar*)pszModule // Pointer to a string containd module name. Can't be NULL
- lParam = (const AnsiChar*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
- Return Values:
- --------------
- Returns 0 on success.
- Nonzero if the module was not present in database.
-}
-(*
- Example 1:
- ----------------------------------
-
- PUIRemoveDbModule("MyPlugin");
-
-
- Example 2:
- ----------------------------------
-
- AnsiChar szModule[] = "MyModule";
- PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- Example 3:
- ----------------------------------
-
- This deletes all settings in the specified module exept
- the specified settings: "Setting1",..."Setting4"
-
- AnsiChar szModule[] = "MyModule";
- const AnsiChar* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-*)
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
- MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY = 'PluginUninstaller/RemoveDbSettingGlobally';
-
-{
- Description:
- -------------
- This service provides the possibility to delete a specific
- setting in database in all contacts including the NULL contact.
- Remember to call it always with PUICallService in "UninstallEx" function.
-
- Parameters:
- -------------
- wParam = (AnsiChar*)pszModule
- lParam = (AnsiChar*)pszSetting
-
- Return Values:
- --------------
- Returns 0 on success.
- Nonzero if the setting was not present in database.
-}
-
-(*
- Example 1:
- ----------------------------------
-
- PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- Example 2:
- ----------------------------------
-
- szModule[] = "MyPlugin";
- szSetting[] = "MySetting";
- PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-*)
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
- MS_PLUGINUNINSTALLER_REMOVESKINSOUND = 'PluginUninstaller/RemoveSkinSound';
-
-{
- Description:
- -------------
- This service provides the possibility to delete all your sound settings
- associated to your plugin.
- The specified sound will be be removed.
- Remember to call it always with PUICallService in "UninstallEx" function.
-
- Parameters:
- -------------
- wParam = (AnsiChar*)pszSoundSetting
- lParam = 0
-
- Return Values:
- --------------
- Returns 0 on success.
- Nonzero if the sound was not present in database.
-}
-(*
- Example 1:
- ----------------------------------
-
- PUIRemoveSkinSound("MySoundSetting");
-
-
- Example 2:
- ----------------------------------
-
- szSoundModule[] = "MySoundSetting";
- PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-*)
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
- MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN = 'PluginUninstaller/UninstallPlugin';
-
-{
- Description:
- -------------
- This service marks a plugin to be uninstalled at next restart of Miranda IM.
- It uses the default value for "Delete all settings".
- You can use this service for example when you want that your sub-plugin gets
- also removed when your main-plugin is uninstalled.
- Note: This service is not needed for the normal uninstalling functionality.
-
- Parameters:
- -------------
- wParam = (AnsiChar*)pszPluginName // do not translate this!
- lParam = (AnsiChar*)pszPluginFile // without path, only file name!
-
- Return Values:
- --------------
- Returns always 0.
-}
-(*
- Example 1:
- ----------------------------------
-
- PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- Example 2:
- ----------------------------------
-
- hInst => Handle of a specific (your?) plugin
- AnsiChar szPluginName[] = "YourPluginName";
-
- AnsiChar* pFileName;
- AnsiChar szPath[MAX_PATH];
-
- GetModuleFileName(hInst, szPath, sizeof(szPath));
- pFileName = strrchr(szPath, '\\');
- pFileName = pFileName+1; // Pointer arithmetic
-
- CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-*)
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
- MS_PLUGINUNINSTALLER_GETHANDLE = 'PluginUninstaller/GetHandle';
-
-{
- Description:
- -------------
- This service gets a specified window/instance handle.
-
- Note: This service must not be used in "UninstallEx" function.
- It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
- to give out a MessageBox or something like that.
-
- Parameters:
- -------------
- wParam = UINT uHandleType;
- lParam = 0
-}
-// Possible values for wParam:
- PUIHT_HINST_PLUGIN_INSTANCE = 0; // HINSTANCE of the PluginUninstaller plugin
- PUIHT_HWND_PLUGIN_OPTIONS = 1; // HWND of the plugin options dialog (if it is loaded; else NULL)
-(*
- Return Values:
- --------------
- Returns the specified handle value.
- If no handle type is specified it returns NULL.
- The handle doesn't need to be destroyed.
-
- Example
- ----------------------------------
-
- HWND hwndDlg;
- hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-*)
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_versioninfo.inc b/delphi/Awkward/include/reserve/m_versioninfo.inc
deleted file mode 100644
index 2257845..0000000
--- a/delphi/Awkward/include/reserve/m_versioninfo.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-Version information plugin for Miranda IM
-
-Copyright © 2002-2006 Luca Santarelli, Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_VERSIONINFO}
-{$DEFINE M_VERSIONINFO}
-
-const
-{
- Brings up the versioninfo post as configured in the options
- wParam - not used
- lParam - not used
-}
- MS_VERSIONINFO_MENU_COMMAND = 'VersionInfo/MenuCommand';
-
-{
- Returns a string containing the versioninfo post
- wParam - (BOOL) suppress forum style formatting. If true the post won't have forum
- style formatting even if the option is checked in miranda's options.
- lParam - (^PAnsiChar) Pointer to a string that receives the info. Memory is allocated
- using miranda's version of malloc() and you need to use miranda's version
- of free() on it.
- Returns 0 on success.
-
-how to use:
-//...
- data:PAnsiChar;
- if GetInfoService(TRUE,LPARAM(@data))=0 then
- //success
-}
- MS_VERSIONINFO_GETINFO = 'Versioninfo/GetInfo';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_voice.inc b/delphi/Awkward/include/reserve/m_voice.inc
deleted file mode 100644
index 41213d5..0000000
--- a/delphi/Awkward/include/reserve/m_voice.inc
+++ /dev/null
@@ -1,156 +0,0 @@
-{
-Copyright (C) 2006-2009 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF __M_VOICE}
-{$DEFINE __M_VOICE}
-
-const
- EVENTTYPE_VOICE_CALL = 8739;
-
- VOICE_CAPS_VOICE = 1 shl 0; // Voice is supported for this protocol. You need to set this one.
- VOICE_CAPS_CALL_CONTACT = 1 shl 1; // Set if a call can be made to a hContact (PS_VOICE_CALL_CONTACT_VALID is used to validate the string)
- VOICE_CAPS_CALL_STRING = 1 shl 3; // Set if a call can be made to some string (PS_VOICE_CALL_STRING_VALID is used to validate the string)
-{
- Request to the protocol capabilities relative to voice.
-
- wParam: 0
- lParam: 0
- return: VOICE_CAPS_*
-}
- PS_VOICE_CAPS = '/Voice/Caps';
-
- VOICE_SECURE = $00000001;
- VOICE_UNICODE = $80000000;
-
- VOICE_STATE_TALKING = 0;
- VOICE_STATE_RINGING = 1;
- VOICE_STATE_CALLING = 2;
- VOICE_STATE_ON_HOLD = 3;
- VOICE_STATE_ENDED = 4;
- VOICE_STATE_BUSY = 5;
-
-type
- TVOICE_CALL = record
- cbSize :int; // Struct size
- moduleName:PAnsiChar; // The name of the protocol module (the same as VOICE_MODULE.name or the protocol szModule)
- id :PAnsiChar; // Protocol especific ID for this call
- flags :int; // VOICE_UNICODE to say the string is unicode or 0.
- // VOICE_SECURE to say this is a encrypted call
- hContact :THANDLE; // Contact associated with the call (can be NULL)
- szNumber :TChar; // Number to call (can be NULL)
- // Or the contact or the number must be != NULL
- // If both are != NULL the call will be made to the number
- // and will be associated with the contact
- // This fields are only needed in first notification for a call id
- szName :TChar; // Name of the caller. This makes sense only on incoming calls,
- // where no contact is associated and the caller has a name and a number.
- state :int; // VOICE_STATE_*
- end;
-
-const
-{
-Notifies that a voice call changed state
-
-wParam: const VOICE_CALL *
-lParam: ignored
-return: 0 on success
-}
- PE_VOICE_CALL_STATE = '/Voice/State';
-
-{
-Request to the protocol a make voice call
-
-wParam: (HANDLE) hContact
-lParam: (const TCHAR *) number
-return: 0 on success
-Or the contact or the number must be != NULL. If both are != NULL the call will be
-made to the number and will be associated with the contact.
-}
- PS_VOICE_CALL = '/Voice/Call';
-
-{
-Service called to make the protocol answer a call or restore a hold call.
-It is an async call. If the call was answered, the PE_VOICE_CALL_STATE
-notification will be fired.
-
-wParam: (const char *) id
-lParam: ignored
-return: 0 on success
-}
- PS_VOICE_ANSWERCALL = '/Voice/AnswerCall';
-
-{
-Service called to make the protocol answer a call. This can be called if the
-call is ringing or has started. If called any other time it should be ignored.
-It is an async call. If the call was droped, the PE_VOICE_CALL_STATE
-notification will be fired.
-
-wParam: (const char *) id
-lParam: ignored
-return: 0 on success
-}
- PS_VOICE_DROPCALL = '/Voice/DropCall';
-
-{
-Service called to make the protocol hold a call. This means that the call should not
-be droped, but it should be muted and put in a hold, to allow other call to be answered.
-If the protocol can't hold a cal, it should be droped.
-
-This can be called if the call has started. If called any other time it should be ignored.
-It is an async call. If the call was droped, the PE_VOICE_CALL_STATE
-notification will be fired.
-
-wParam: (const char *) id
-lParam: ignored
-return: 0 on success
-}
- PS_VOICE_HOLDCALL = '/Voice/HoldCall';
-
-{
-Send a DTMF (one digit text) to a talking call.
-
-wParam: (const char *) id
-lParam: (TCHAR) dtmf
-return: 0 on success
-}
- PS_VOICE_SEND_DTMF = '/Voice/SendDTMF';
-
-{
-Used if protocol support VOICE_CALL_STRING. The call string is passed as
-wParam and the proto should validate it. If this service does not exist all numbers can be called.
-
-wParam: (const TCHAR *) call string
-lParam: ignored
-return: 0 if wrong, 1 if correct
-}
- PS_VOICE_CALL_STRING_VALID = '/Voice/CallStringValid';
-
-{
-Used if protocol support VOICE_CALL_CONTACT.
-The hContact is passed as wParam and the proto should tell if this contact can be
-called. If this service does not exist all contacts can be called (or, if it is a protocol,
-all contacts from the protocol can be called).
-
-wParam: (HANDLE) hContact
-lParam: (BOOL) TRUE if it is a test for 'can call now?', FALSE if is a test for 'will be possible to call someday?'
-return: 0 if can't be called, 1 if can
-}
- PS_VOICE_CALL_CONTACT_VALID = '/Voice/CallContactValid';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_voiceservice.inc b/delphi/Awkward/include/reserve/m_voiceservice.inc
deleted file mode 100644
index 3312123..0000000
--- a/delphi/Awkward/include/reserve/m_voiceservice.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-{
-Copyright (C) 2007 Ricardo Pescuma Domenecci
-
-This is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this file; see the file license.txt. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_VOICESERVICE}
-{$DEFINE M_VOICESERVICE}
-
-const
- MIID_VOICESERVICE:MUUID='{7D64437-EF2E-4F60-BB2D-3C518FE24D63};
-
-{
-This services are a mirror of the services/notifications in m_voice.h,
-with the difference that that ones are to be used by protocols, and this ones
-are to be used by plugins that can make calls to contacts in multiple protocols.
-
-To get the devices for input/output and some options, query the db directly:
- VoiceService/EchoCancelation BYTE default: TRUE
- VoiceService/MicBoost BYTE default: TRUE
- VoiceService/Input TString default: windows default
- VoiceService/Output TString default: windows default
-}
-
-type
- TVOICE_MODULE = record
- cbSize :int; // sizeof(VOICE_MODULE)
- description:TChar; // The description of the voice provider. This is the name that
- // will be shown to the user
- name :PAnsiChar; // The internal name of the voice provider. All PS_* serivces
- // defined in m_voide.h need to be created based in this name.
- // For example, PS_VOICE_CALL (/Voice/Call) need to be created
- // as <name>/Voice/Call
- icon :PAnsiChar; // Icon to identify provider (from icolib)
- flags :int; // or of VOICE_CAPS_*. You don't need to send VOICE_CAPS_VOICE.
- end;
-
-{
-Register a new plugin that can make/receive voice calls (a voice provider).
-
-wParam: const VOICE_MODULE *
-lParam: ignored
-return: 0 on success
-}
- MS_VOICESERVICE_REGISTER:PAnsiChar = 'VoiceService/Register';
-
-{
-Unregister a plugin that can make/receive voice calls (a voice provider).
-
-wParam: (const char *) Provider name
-lParam: ignored
-return: 0 on success
-}
- MS_VOICESERVICE_UNREGISTER:PAnsiChar = 'VoiceService/Unregister';
-
-{
-Request a voice call to hContact.
-
-wParam: (HANDLE) hContact
-lParam: ignored
-return: the number of option calls for a contact. If > 0, it can be called
-}
- MS_VOICESERVICE_CAN_CALL:PAnsiChar = 'VoiceService/CanCall';
-
-{
-Request a voice call to hContact.
-
-wParam: (HANDLE) hContact
-lParam: (char *) Voice provider or NULL to use any provider avaiable
-return: 0 on success
-}
- MS_VOICESERVICE_CALL:PAnsiChar = 'VoiceService/Call';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_yamn.inc b/delphi/Awkward/include/reserve/m_yamn.inc
deleted file mode 100644
index a44debb..0000000
--- a/delphi/Awkward/include/reserve/m_yamn.inc
+++ /dev/null
@@ -1,156 +0,0 @@
-{$IFNDEF M_YAMN}
-{$DEFINE M_YAMN}
-
-//
-//================================== VARIABLES STRUCT ========================================
-//
-
-{$IFNDEF MIRANDASERVICE}
-type
- MIRANDASERVICE = function(WPARAM,LPARAM:int):int; cdecl;
-{$ENDIF}
-
-const
- YAMN_VARIABLESVERSION = 3;
-
-type
- PYAMN_VARIABLES = ^TYAMN_VARIABLES;
- TYAMN_VARIABLES = record
- hInst:HINSTANCE;
- MessageWnds:THANDLE;
- NewMailAccountWnd:THANDLE;
- Shutdown:int;
- end;
- CYAMNVariables = TYAMN_VARIABLES;
-
-//
-//================================== EXPORTED FUNCTIONS STRUCT ===============================
-//
-type
- CExportedFunctions = record
- ID:PAnsiChar;
- Ptr:pointer;
- end;
-
-type
- CExportedServices = record
- ID:PAnsiChar;
- Ptr:MIRANDASERVICE;
- end;
-
-//
-//================================== YAMN EVENTS ==================================
-//
-
-const
-//UninstallPlugin Event
-//Sent when user wants to uninstall YAMN and all its plugins
- ME_YAMN_UNINSTALLPLUGINS = 'YAMN/MirandaEvents/UninstallPlugins';
-
-//NewMail Event
-//Notifies you about new mail
-//no arguments now (Developers, send mail, which params would you like to have, but note there's problem that
-//params are 32b numbers. When it is pointer to some data, these data should persist while every plugin read them and
-//after that they can be removed from memory. So it is problem)
- ME_YAMN_NEWMAIL = 'YAMN/MirandaEvents/NewMail';
-
-//
-//================================== YAMN SERVICES ==================================
-//
-
-//GetFcnPtr Service
-//Your plugin can co-operate with YAMN in 2 ways: with Miranda services and with YAMN exported functions
-//Some commands are written in services, some are functions. The advantage of function calling instead of
-//service calling is, that your code is more clear and it is faster than service calling (smaller, FASTER,
-//easier- it is slogan of Miranda, isn't it ?). Miranda service has only 2 parameters, that can be
-//disadvantage too.
-//In every way, it is discutable which functions should be exported or if they should be implemented as
-//services. And if YAMN should export some functions etc. Functions not used very often are now implemented
-//as Miranda services.
-//
-//This service gets pointer to YAMN function. Then you can use function directly. In m_?????.h files you have
-//definitions of some functions, with definitions of structure variable, so you can use functions very
-//clearly, just look to header file.
-//WPARAM- function ID. It is string representating function you need to get pointer (e.g. YAMN_WRITEWAITID)
-//LPARAM- not used now, but set it to 0
-//returns pointer to YAMN function or NULL when functions does not exist
- MS_YAMN_GETFCNPTR = 'YAMN/Service/GetFcn';
-
-//GetVariables Service
-//Ask YAMN for pointer to CYAMNVariables structure.
-//WPARAM- YAMN_VARIABLESVERSION
-//LPARAM- any value
-//returns pointer to YAMN_VARIABLES or NULL when version of structure does not match
- MS_YAMN_GETVARIABLES = 'YAMN/Service/GetVar';
-
-//ForceCheck Service
-//Check mail on accounts
-//WPARAM- not used
-//LPARAM- not used
- MS_YAMN_FORCECHECK = 'YAMN/Service/ForceCheck';
-
-//AccountCheck Service
-//Check mail on individual account
-//WPARAM- HACCOUNT
-//LPARAM- not used
- MS_YAMN_ACCOUNTCHECK = 'YAMN/Service/AccountCheck';
-
-//Contact List Context Menu Click
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
- MS_YAMN_CLISTCONTEXT = 'YAMN/Service/ClistContactContextMenu';
-
-//Contact List Context Menu Click for application
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
- MS_YAMN_CLISTCONTEXTAPP = 'YAMN/Service/ClistContactContextMenuApp';
-
-//Contact List Double Click
-//wParam=(WPARAM)hContact
-//lParam=0
-//
-//Event is fired when there is a double click on a CList contact,
-//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
-//sense to store all this information in memory, etc.
- MS_YAMN_CLISTDBLCLICK = 'YAMN/Service/ClistContactDoubleclicked';
-
-//FilterMail Service
-//Ask YAMN to process mail filtering. YAMN calls filter plugins to mark mail as spam etc... Warning! Leave all
-//read or write access to mail as this function waits for write-access to mail!
-//WPARAM- (HACCOUNT) account to which mail belongs
-//LPARAM- (HYAMNMAIL) mail to filter
- MS_YAMN_FILTERMAIL = 'YAMN/Service/FilterMail';
-
-//MailBrowser Service
-//runs mail browser window (or tray icon only or popups only)
-//WPARAM- pointer to YAMN_MAILBROWSERPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_MAILBROWSERPARAM structure version param. Use YAMN_MAILBROWSERVERSION definition.
-//returns zero if failed, nonzero if succeed
- MS_YAMN_MAILBROWSER = 'YAMN/Service/RunMailBrowser';
-
-//NoNewMail Service
-//runs no new mail procedure (shows popups e.g.)
-//WPARAM- pointer to YAMN_NONEWMAILPARAM structure, data to no new mail procedure. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_NONEWMAILPARAM structure version param. Use YAMN_NONEWMAILVERSION definition.
-//returns zero if failed, nonzero if succeed
- MS_YAMN_NONEWMAILPROC = 'YAMN/Service/NoNewMailProc';
-
-//BadConnection Service
-//runs bad connection window
-//WPARAM- pointer to YAMN_BADCONNECTIONPARAM structure, data to mailbrowser. You do not need to fill ThreadRunningEV event member.
-//LPARAM- YAMN_BADCONNECTIONPARAM structure version param. Use YAMN_BADCONNECTIONVERSION definition.
-//returns zero if failed, nonzero if succeed
- MS_YAMN_BADCONNECTION = 'YAMN/Service/BadConnection';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/reserve/m_yapp.inc b/delphi/Awkward/include/reserve/m_yapp.inc
deleted file mode 100644
index 772c5cc..0000000
--- a/delphi/Awkward/include/reserve/m_yapp.inc
+++ /dev/null
@@ -1,88 +0,0 @@
-{$IFNDEF M_YAPP}
-{$DEFINE M_YAPP}
-
-////////////////////////////////////////////////
-// YAPP API
-///////////////////////////////////////////////
-
-type
- TPopupData = record
- cbSize :int;
- flags :int; // OR of PDF_* flags below
- hContact :HANDLE;
- hIcon :HICON;
- szTitle :TChar;
- szText :TChar;
- colorBack :COLORREF; // if colorBack and colorText are equal, defaults will be used
- colorText :COLORREF;
- windowProc:WNDPROC; // optional custom window procedure
- timeout :int; // -1 == infinite, 0 == default, otherwise timeout in seconds
- opaque :pointer;
- end;
-
-const
- PDF_UNICODE = $0001;
-
-// windowProc messages
- PM_INIT = WM_USER+$0202; // message sent to your windowProc after the window has been initialized
- PM_DIENOTIFY = WM_USER+$0200; // message sent to your windowProc just before the window is destroyed (can be used e.g. to free your opaque data)
- PM_DESTROY = WM_USER+$0201; // send to the popup hWnd (use PostMessage generally, or SendMessage inside your windowProc) to kill it
-
-// Show a popup
-//wParam = &PopupData
-//lParam = 0
-// returns -1 if popups disabled
- MS_YAPP_SHOWPOPUP = 'YAPP/ShowPopup';
-
-// get hContact from PopupData
-// wParam = hWnd
-// lParam = 0
-// return hContact
- MS_YAPP_GETCONTACT = 'YAPP/GetContact';
-
-// get opaque from PopupData
-// wParam = hWnd
-// lParam = 0
-// returns opaque
- MS_YAPP_GETOPAQUE = 'YAPP/GetOpaque';
-
-//------------- Class API ----------------//
-
-type
- TPopupClass = record
- cbSize :int;
- flags :int;
- pszName :PAnsiChar;
- szDescription:TChar;
- hIcon :HICON;
- colorBack :COLORREF;
- colorText :COLORREF;
- windowProc :WNDPROC;
- timeout :int;
- end;
-
-const
- PCF_UNICODE = $0001;
-
-// wParam = 0
-// lParam = (POPUPCLASS *)&pc
- MS_YAPP_REGISTERCLASS = 'YAPP/RegisterClass'; // old
- MS_POPUP_REGISTERCLASS = 'PopUp/RegisterClass';
-
-type
- TPopupClassInstance = record
- cbSize :int;
- pszClassName:PAnsiChar;
- szTitle :TChar;
- szText :TChar;
- opaque :pointer;
- hContact :HANDLE;
- end;
-
-const
-// wParam = 0
-// lParam = (POPUPDATACLASS *)&pdc
- MS_YAPP_CLASSINSTANCE = 'YAPP/ClassInstance'; // old
- MS_POPUP_ADDPOPUPCLASS = 'PopUp/AddPopupClass';
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/statusmodes.inc b/delphi/Awkward/include/statusmodes.inc
deleted file mode 100644
index e555c80..0000000
--- a/delphi/Awkward/include/statusmodes.inc
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF STATUSMODES}
-{$DEFINE STATUSMODES}
-
-const
- // add 1 to the ID_STATUS_CONNECTING to mark retries (v0.1.0.1+)
- // e.g. ID_STATUS_CONNECTING+2 is the third connection attempt, or the second retry
- ID_STATUS_CONNECTING = 1;
-
- // max retries is just a marker, so that the clist knows what
- // numbers represent retries, it should set any kind of limit on the number
- // of retries you can and/or should do
- MAX_CONNECT_RETRIES = 10000;
-
- // and the modes!
-
- ID_STATUS_OFFLINE = 40071;
- ID_STATUS_ONLINE = 40072;
- ID_STATUS_AWAY = 40073;
- ID_STATUS_DND = 40074;
- ID_STATUS_NA = 40075;
- ID_STATUS_OCCUPIED = 40076;
- ID_STATUS_FREECHAT = 40077;
- ID_STATUS_INVISIBLE = 40078;
- ID_STATUS_ONTHEPHONE = 40079;
- ID_STATUS_OUTTOLUNCH = 40080;
- ID_STATUS_IDLE = 40081; // do not use as a status
-
- MAX_STATUS_COUNT = (ID_STATUS_OUTTOLUNCH-ID_STATUS_OFFLINE+1);
-
-{$ENDIF}
diff --git a/delphi/Awkward/include/testdll.dpr b/delphi/Awkward/include/testdll.dpr
deleted file mode 100644
index 42af508..0000000
--- a/delphi/Awkward/include/testdll.dpr
+++ /dev/null
@@ -1,94 +0,0 @@
-library testdll;
-
-uses
- m_api, Windows;
-
-const
- PluginInfo:TPLUGININFOEX=(
- cbSize :sizeof(TPLUGININFOEX);
- shortName :'Plugin Template';
- version :$00000001;
- description:'The long description of your plugin, to go in the plugin options dialog';
- author :'J. Random Hacker';
- authorEmail:'noreply@sourceforge.net';
- copyright :'(c) 2003 J. Random Hacker';
- homepage :'http://miranda-icq.sourceforge.net/';
- flags :UNICODE_AWARE;
- replacesDefaultModule:0;
- uuid:'{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}';
- );
-
-var
- PluginInterfaces:array [0..1] of MUUID;
-
-function MirandaPluginInfo(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize:=SizeOf(TPLUGININFO);
-end;
-
-function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
-begin
- result:=@PluginInfo;
- PluginInfo.cbSize:=SizeOf(TPLUGININFOEX);
-end;
-
-function PluginMenuCommand(wParam: WPARAM; lParam: LPARAM):Integer; cdecl;
-begin
- Result:=0;
- // this is called by Miranda, thus has to use the cdecl calling convention
- // all services and hooks need this.
- MessageBox(0, 'Just groovy, baby!', 'Plugin-o-rama', MB_OK);
-end;
-
-var
- onloadhook:THANDLE;
-
-function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
-var
- mi:TCListMenuItem;
-begin
- Result:=0;
- PluginLink^.UnhookEvent(onloadhook);
-
- PluginLink^.CreateServiceFunction('TestPlug/MenuCommand', @PluginMenuCommand);
- FillChar(mi,SizeOf(mi),0);
- mi.cbSize :=SizeOf(mi);
- mi.position :=$7FFFFFFF;
- mi.flags :=0;
- mi.hIcon :=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- mi.szName.a :='&Test Plugin...';
- mi.pszService:='TestPlug/MenuCommand';
- PluginLink^.CallService(MS_CLIST_ADDMAINMENUITEM,0,dword(@mi));
-end;
-
-function Load(link:PPLUGINLINK):int; cdecl;
-begin
- // this line is VERY VERY important, if it's not present, expect crashes.
- PluginLink:=Pointer(link);
- InitMMI;
-
- onloadhook:=PluginLink^.HookEvent(ME_SYSTEM_MODULESLOADED,@OnModulesLoaded);
-
- Result:=0;
-end;
-
-function Unload:int; cdecl;
-begin
- Result:=0;
-end;
-
-function MirandaPluginInterfaces:PMUUID; cdecl;
-begin
- PluginInterfaces[0]:=MIID_TESTPLUGIN;
- PluginInterfaces[1]:=MIID_LAST;
- result:=@PluginInterfaces;
-end;
-
-exports
- Load, Unload,
- MirandaPluginInfo,
- MirandaPluginInterfaces,MirandaPluginInfoEx;
-
-begin
-end.
diff --git a/delphi/Awkward/utils/appcmdapi.pas b/delphi/Awkward/utils/appcmdapi.pas
deleted file mode 100644
index b316838..0000000
--- a/delphi/Awkward/utils/appcmdapi.pas
+++ /dev/null
@@ -1,97 +0,0 @@
-unit appcmdapi;
-interface
-
-uses windows;
-
-const
- APPCOMMAND_BROWSER_BACKWARD = 1; // Navigate backward.
- APPCOMMAND_BROWSER_FORWARD = 2; // Navigate forward.
- APPCOMMAND_BROWSER_REFRESH = 3; // Refresh page.
- APPCOMMAND_BROWSER_STOP = 4; // Stop download.
- APPCOMMAND_BROWSER_SEARCH = 5; // Open search.
- APPCOMMAND_BROWSER_FAVORITES = 6; // Open favorites.
- APPCOMMAND_BROWSER_HOME = 7; // Navigate home.
- APPCOMMAND_VOLUME_MUTE = 8; // Mute the volume.
- APPCOMMAND_VOLUME_DOWN = 9; // Lower the volume.
- APPCOMMAND_VOLUME_UP = 10; // Raise the volume
- APPCOMMAND_MEDIA_NEXTTRACK = 11; // Go to next track.
- APPCOMMAND_MEDIA_PREVIOUSTRACK = 12; // Go to previous track.
- APPCOMMAND_MEDIA_STOP = 13; // Stop playback.
- APPCOMMAND_MEDIA_PLAY_PAUSE = 14; // Play or pause playback. If there are discrete Play
- // and Pause buttons, applications should take action
- // on this command as well as APPCOMMAND_MEDIA_PLAY and
- // APPCOMMAND_MEDIA_PAUSE.
- APPCOMMAND_LAUNCH_MAIL = 15; // Open mail.
- APPCOMMAND_LAUNCH_MEDIA_SELECT = 16; // Go to Media Select mode
- APPCOMMAND_MEDIA_SELECT = APPCOMMAND_LAUNCH_MEDIA_SELECT;
- APPCOMMAND_LAUNCH_APP1 = 17; // Start App1.
- APPCOMMAND_LAUNCH_APP2 = 18; // Start App2.
- APPCOMMAND_BASS_DOWN = 19; // Decrease the bass.
- APPCOMMAND_BASS_BOOST = 20; // Toggle the bass boost on and off.
- APPCOMMAND_BASS_UP = 21; // Increase the bass.
- APPCOMMAND_TREBLE_DOWN = 22; // Decrease the treble.
- APPCOMMAND_TREBLE_UP = 23; // Increase the treble.
-
- APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24; // Windows XP: Mute the microphone.
- APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25; // Windows XP: Decrease microphone volume.
- APPCOMMAND_MICROPHONE_VOLUME_UP = 26; // Windows XP: Increase microphone volume.
- APPCOMMAND_HELP = 27; // Windows XP: Open the Help dialog.
- APPCOMMAND_FIND = 28; // Windows XP: Open the Find dialog.
- APPCOMMAND_NEW = 29; // Windows XP: Create a new window.
- APPCOMMAND_OPEN = 30; // Windows XP: Open a window.
- APPCOMMAND_CLOSE = 31; // Windows XP: Close the window (not the application).
- APPCOMMAND_SAVE = 32; // Windows XP: Save current document.
- APPCOMMAND_PRINT = 33; // Windows XP: Print current document.
- APPCOMMAND_UNDO = 34; // Windows XP: Undo last action.
- APPCOMMAND_REDO = 35; // Windows XP: Redo last action.
- APPCOMMAND_COPY = 36; // Windows XP: Copy the selection.
- APPCOMMAND_CUT = 37; // Windows XP: Cut the selection.
- APPCOMMAND_PASTE = 38; // Windows XP: Paste
- APPCOMMAND_REPLY_TO_MAIL = 39; // Windows XP: Reply to a mail message.
- APPCOMMAND_FORWARD_MAIL = 40; // Windows XP: Forward a mail message.
- APPCOMMAND_SEND_MAIL = 41; // Windows XP: Send a mail message.
- APPCOMMAND_SPELL_CHECK = 42; // Windows XP: Initiate a spell check.
- APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43;
- // Windows XP:Toggles between two modes of speech input: dictation and command/control
- // (giving commands to an application or accessing menus).
- APPCOMMAND_MIC_ON_OFF_TOGGLE = 44; // Windows XP: Toggle the microphone.
- APPCOMMAND_CORRECTION_LIST = 45; // Windows XP: Brings up the correction list when
- // a word is incorrectly identified during speech input.
-
- APPCOMMAND_MEDIA_PLAY = 46; // Windows XP SP1: Begin playing at the current position.
- // If already paused, it will resume. This is a direct
- // PLAY command that has no state. If there are
- // discrete Play and Pause buttons, applications should
- // take action on this command as well as
- // APPCOMMAND_MEDIA_PLAY_PAUSE.
- APPCOMMAND_MEDIA_PAUSE = 47; // Windows XP SP1: Pause. If already paused, take no
- // further action. This is a direct PAUSE command that
- // has no state. If there are discrete Play and Pause
- // buttons, applications should take action on this
- // command as well as APPCOMMAND_MEDIA_PLAY_PAUSE.
- APPCOMMAND_MEDIA_RECORD = 48; // Windows XP SP1: Begin recording the current stream.
- APPCOMMAND_MEDIA_FAST_FORWARD = 49; // Windows XP SP1: Increase the speed of stream playback.
- // This can be implemented in many ways, for example,
- // using a fixed speed or toggling through a series of
- // increasing speeds.
- APPCOMMAND_MEDIA_REWIND = 50; // Windows XP SP1: Go backward in a stream at a higher
- // rate of speed. This can be implemented in many ways,
- // for example, using a fixed speed or toggling through
- // a series of increasing speeds.
- APPCOMMAND_MEDIA_CHANNEL_UP = 51; // Windows XP SP1: Increment the channel value.
- APPCOMMAND_MEDIA_CHANNEL_DOWN = 52; // Windows XP SP1: Decrement the channel value.
-
-function SendMMCommand(wnd:HWND; cmd:integer):integer;
-
-implementation
-
-const
- WM_APPCOMMAND = $0319;
-
-function SendMMCommand(wnd:HWND; cmd:integer):integer;
-begin
-// result:=ord(SendMessageW(wnd,WM_APPCOMMAND,wnd,cmd shl 16));
- result:=ord(SendnotifyMessageW(wnd,WM_APPCOMMAND,wnd,cmd shl 16));
-end;
-
-end.
diff --git a/delphi/Awkward/utils/base64.pas b/delphi/Awkward/utils/base64.pas
deleted file mode 100644
index 73ce09b..0000000
--- a/delphi/Awkward/utils/base64.pas
+++ /dev/null
@@ -1,108 +0,0 @@
-unit Base64;
-
-interface
-
-uses windows;
-
-{ Base64 encode and decode a string }
-function BASE64Encode(src:pByte;len:integer):PAnsiChar;
-function BASE64Decode(src:PAnsiChar;var dst:pByte):integer;
-
-{******************************************************************************}
-{******************************************************************************}
-implementation
-
-uses common;
-
-const
- base64chars{:array [0..63] of AnsiChar}:PAnsiChar =
- 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-
-function BASE64Encode(src:pByte;len:integer):PAnsiChar;
-var
- dst:PAnsiChar;
-begin
- if (src=nil) or (len<=0) then
- begin
- result:=nil;
- exit;
- end;
- mGetMem(result,((len*4+11) div (12*4))+1);
- dst:=result;
-
- while len>0 do
- begin
- dst^:=base64chars[src^ shr 2]; inc(dst);
- if len=1 then
- begin
- dst^:=base64chars[(src^ and 3) shl 4]; inc(dst);
- dst^:='='; inc(dst);
- dst^:='='; inc(dst);
- break;
- end;
- dst^:=base64chars[((src^ and 3) shl 4) or (pbyte(PAnsiChar(src)+1)^ shr 4)]; inc(dst); inc(src);
- if len=2 then
- begin
- dst^:=base64chars[(src^ and $F) shl 2]; inc(dst);
- dst^:='='; inc(dst);
- break;
- end;
- dst^:=base64chars[((src^ and $F) shl 2) or (pbyte(PAnsiChar(src)+1)^ shr 6)]; inc(dst); inc(src);
- dst^:=base64chars[src^ and $3F]; inc(dst); inc(src);
- dec(len,3);
- end;
- dst^:=#0;
-end;
-
-function Base64CharToInt(c:AnsiChar):byte;
-begin
- case c of
- 'A'..'Z': result:=ord(c)-ord('A');
- 'a'..'z': result:=ord(c)-ord('a')+26;
- '0'..'9': result:=ord(c)-ord('0')+52;
- '+': result:=62;
- '/': result:=63;
- '=': result:=64;
- else
- result:=255;
- end;
-end;
-
-function BASE64Decode(src:PAnsiChar;var dst:pByte):integer;
-var
- slen:integer;
- ptr:pByte;
- b1,b2,b3,b4:byte;
-begin
- if (src=nil) or (src^=#0) then
- begin
- result:=0;
- dst:=nil;
- exit;
- end;
- ptr:=pbyte(src);
- while ptr^<>0 do inc(ptr);
- slen:=ptr-src;
- mGetMem(ptr,(slen*3) div 4);
- dst:=ptr;
- result:=0;
- while slen>0 do
- begin
- b1:=Base64CharToInt(src^); inc(src);
- b2:=Base64CharToInt(src^); inc(src);
- b3:=Base64CharToInt(src^); inc(src);
- b4:=Base64CharToInt(src^); inc(src);
- dec(slen,4);
- if (b1=255) or (b1=64) or (b2=255) or (b2=64) or (b3=255) or (b4=255) then
- break;
- ptr^:=(b1 shl 2) or (b2 shr 4); inc(ptr); inc(result);
- if b3=64 then
- break;
- ptr^:=(b2 shl 4) or (b3 shr 2); inc(ptr); inc(result);
- if b4=64 then
- break;
- ptr^:=b4 or (b3 shl 6); inc(ptr); inc(result);
- end;
-end;
-
-end.
diff --git a/delphi/Awkward/utils/cbex.pas b/delphi/Awkward/utils/cbex.pas
deleted file mode 100644
index b4f94c6..0000000
--- a/delphi/Awkward/utils/cbex.pas
+++ /dev/null
@@ -1,79 +0,0 @@
-unit CBEx;
-interface
-
-uses windows,commctrl;
-
-// build combobox with xstatus icons and names
-
-function AddCBEx(wnd:HWND;proto:PAnsiChar):HWND;
-
-implementation
-
-uses messages,m_api,kol,common,mirutils;
-
-function AddCBEx(wnd:HWND;proto:PAnsiChar):HWND;
-var
- cbei:TCOMBOBOXEXITEMW;
- total,cnt:integer;
- il:HIMAGELIST;
- icon:HICON;
- buf,buf1:array [0..127] of AnsiChar;
- b:array [0..63] of WideChar;
- ics:TICQ_CUSTOM_STATUS;
-begin
- result:=0;
- SendMessage(wnd,CB_RESETCONTENT,0,0);
- StrCopy(buf,proto);
- StrCat (buf,PS_ICQ_GETCUSTOMSTATUSICON);
- if PluginLink^.ServiceExists(buf)=0 then
- exit;
-
- il:=ImageList_Create(16,16,ILC_COLOR32 or ILC_MASK,0,1);
- if il=0 then exit;
-
- cnt:=0;
- StrCopy(buf1,proto);
- StrCat (buf1,PS_ICQ_GETCUSTOMSTATUSEX);
- cbei.mask:=CBEIF_IMAGE or CBEIF_SELECTEDIMAGE or CBEIF_TEXT; //!!
- ics.cbSize :=SizEOf(ics);
- ics.flags :=CSSF_STATUSES_COUNT;
- ics.szName.w:=@b;
- ics.wParam :=@total;
- CallService(buf1,0,dword(@ics));
- ics.flags :=CSSF_DEFAULT_NAME or CSSF_MASK_NAME or CSSF_UNICODE;
-
- while cnt<=total do
- begin
- if cnt=0 then
- begin
- ImageList_AddIcon(il,CallService(MS_SKIN_LOADICON,SKINICON_OTHER_SMALLDOT,0));
- cbei.pszText:=TranslateW('None');
- end
- else
- begin
- icon:=CallService(buf,cnt,LR_SHARED);
- if icon=0 then break;
- if ImageList_AddIcon(il,icon)=-1 then break;
- ics.wParam:=@cnt;
- CallService(buf1,0,dword(@ics));
- cbei.pszText:=TranslateW(@b);
- end;
- cbei.iItem :=cnt;
- cbei.iImage :=cnt;
- cbei.iSelectedImage:=cnt;
- if SendMessageW(wnd,CBEM_INSERTITEMW,0,dword(@cbei))=-1 then break;
- inc(cnt);
-// DestroyIcon(icon);
- end;
-
- if cnt=0 then
- ImageList_Destroy(il)
- else
- begin
- ImageList_Destroy(SendMessage(wnd,CBEM_SETIMAGELIST,0,il));
- SendMessage(wnd,CB_SETCURSEL,0,0);
- result:=wnd;
- end;
-end;
-
-end. \ No newline at end of file
diff --git a/delphi/Awkward/utils/common.pas b/delphi/Awkward/utils/common.pas
deleted file mode 100644
index cdaabe3..0000000
--- a/delphi/Awkward/utils/common.pas
+++ /dev/null
@@ -1,2116 +0,0 @@
-{$DEFINE USE_MMI}
-{$INCLUDE compilers.inc}
-unit common;
-
-interface
-
-uses windows
-{$IFDEF USE_MMI}
-,m_api
-{$ENDIF}
-;
-
-Const {- Character sets -}
- sBinNum = ['0'..'1'];
- sOctNum = ['0'..'7'];
- sNum = ['0'..'9'];
- sHexNum = ['0'..'9','A'..'F','a'..'f'];
- sWord = ['0'..'9','A'..'Z','a'..'z','_',#128..#255];
- sIdFirst = ['A'..'Z','a'..'z','_'];
- sLatWord = ['0'..'9','A'..'Z','a'..'z','_'];
- sWordOnly = ['A'..'Z','a'..'z'];
- sSpace = [#9,' '];
- sEmpty = [#9,#10,#13,' '];
-
-const
- HexDigitChrLo: array [0..15] of AnsiChar = ('0','1','2','3','4','5','6','7',
- '8','9','a','b','c','d','e','f');
-
- HexDigitChr : array [0..15] of AnsiChar = ('0','1','2','3','4','5','6','7',
- '8','9','A','B','C','D','E','F');
-
-const
- mimecnt = 5;
- mimes:array [0..mimecnt-1] of record
- mime:PAnsiChar;
- ext:array [0..3] of AnsiChar
- end = (
- (mime:'image/gif' ; ext:'GIF'),
- (mime:'image/jpg' ; ext:'JPG'),
- (mime:'image/jpeg'; ext:'JPG'),
- (mime:'image/png' ; ext:'PNG'),
- (mime:'image/bmp' ; ext:'BMP')
-);
-
-var
- IsW2K,
- IsVista,
- IsAnsi:boolean;
-
-const
- CP_UNICODE = 1200;
- CP_REVERSEBOM = 65534;
-const
- SIGN_UNICODE = $FEFF;
- SIGN_REVERSEBOM = $FFFE;
- SIGN_UTF8 = $BFBBEF;
-
-function GetTextFormat(Buffer:pByte;sz:cardinal):integer;
-
-function IIF(cond:bool;ret1,ret2:integer ):integer; overload;
-function IIF(cond:bool;ret1,ret2:PAnsiChar):PAnsiChar; overload;
-function IIF(cond:bool;ret1,ret2:pWideChar):pWideChar; overload;
-function IIF(cond:bool;ret1,ret2:Extended ):Extended; overload;
-function IIF(cond:bool;ret1,ret2:tDateTime):tDateTime; overload;
-function IIF(cond:bool;ret1,ret2:pointer ):pointer; overload;
-function IIF(cond:bool;ret1,ret2:string ):string; overload;
-{$IFNDEF DELPHI7_UP}
-function IIF(cond:bool;ret1,ret2:variant ):variant; overload;
-{$ENDIF}
-
-function GetImageType (buf:pByte;mime:PAnsiChar=nil):dword;
-function GetImageTypeW(buf:pByte;mime:PWideChar=nil):int64;
-
-procedure CopyToClipboard(txt:pointer; ansi:bool);
-function PasteFromClipboard(ansi:boolean;cp:dword=CP_ACP):pointer;
-
-function mGetMem (var dst;size:integer):pointer;
-procedure mFreeMem(var ptr);
-function mReallocMem(var dst; size:integer):pointer;
-
-// String processing
-function WideToCombo(src:PWideChar;var dst;cp:integer=CP_ACP):integer;
-
-function ChangeUnicode(str:PWideChar):PWideChar;
-function UTF8Len(src:PAnsiChar):integer;
-function WideToANSI(src:PWideChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar;
-function ANSIToWide(src:PAnsiChar;var dst:PWideChar;cp:dword=CP_ACP):PWideChar;
-function ANSIToUTF8(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar;
-function UTF8toANSI(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar;
-function UTF8toWide(src:PAnsiChar;var dst:PWideChar;len:cardinal=dword(-1)):PWideChar;
-function WidetoUTF8(src:PWideChar;var dst:PAnsiChar):PAnsiChar;
-
-function FastWideToAnsiBuf(src:PWideChar;dst:PAnsiChar;len:cardinal=dword(-1)):PAnsiChar;
-function FastAnsiToWideBuf(src:PAnsiChar;dst:PWideChar;len:cardinal=dword(-1)):PWideChar;
-function FastWideToAnsi (src:PWideChar;var dst:PAnsiChar):PAnsiChar;
-function FastAnsiToWide (src:PAnsiChar;var dst:PWideChar):PWideChar;
-
-function UnEscape(buf:PAnsiChar):PAnsiChar;
-function Escape (buf:PAnsiChar):PAnsiChar;
-
-// ----- base strings functions -----
-function StrDup (var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-function StrDupW(var dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-function StrDelete (aStr:PAnsiChar;pos,len:cardinal):PAnsiChar;
-function StrDeleteW(aStr:PWideChar;pos,len:cardinal):PWideChar;
-function StrInsert (substr,src:PAnsiChar;pos:cardinal):PAnsiChar;
-function StrInsertW(substr,src:PWideChar;pos:cardinal):PWideChar;
-function StrReplace (src,SubStr,NewStr:PAnsiChar):PAnsiChar;
-function StrReplaceW(src,SubStr,NewStr:pWideChar):PWideChar;
-function CharReplace (dst:pAnsiChar;old,new:AnsiChar):PAnsiChar;
-function CharReplaceW(dst:pWideChar;old,new:WideChar):PWideChar;
-function StrCmp (a,b:PAnsiChar;n:cardinal=$FFFFFFFF):integer;
-function StrCmpW(a,b:PWideChar;n:cardinal=$FFFFFFFF):integer;
-function StrEnd (const a:PAnsiChar):PAnsiChar;
-function StrEndW(const a:PWideChar):PWideChar;
-function StrScan (src:PAnsiChar;c:AnsiChar):PAnsiChar;
-function StrScanW(src:PWideChar;c:WideChar):PWideChar;
-function StrRScan (src:PAnsiChar;c:AnsiChar):PAnsiChar;
-function StrRScanW(src:PWideChar;c:WideChar):PWideChar;
-function StrLen (Str: PAnsiChar): Cardinal;
-function StrLenW(Str: PWideChar): Cardinal;
-function StrCat (Dest: PAnsiChar; const Source: PAnsiChar): PAnsiChar;
-function StrCatW(Dest: PWideChar; const Source: PWideChar): PWideChar;
-function StrCopyE (dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-function StrCopyEW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-function StrCopy (dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-function StrCopyW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-function StrPos (const aStr, aSubStr: PAnsiChar): PAnsiChar;
-function StrPosW(const aStr, aSubStr: PWideChar): PWideChar;
-function StrIndex (const aStr, aSubStr: PAnsiChar):integer;
-function StrIndexW(const aStr, aSubStr: PWideChar):integer;
-
-//procedure FillWord(var buf;count:cardinal;value:word); register;
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
-function Min(a,b:integer):integer;
-function Max(a,b:integer):integer;
-
-function Timestamp(Year,Month,Day:cardinal;Hour:cardinal=0;Min:cardinal=0;Sec:cardinal=0):dword;
-function GetCurrentTime:dword;
-
-function TimeToInt(stime:PAnsiChar):integer; overload;
-function TimeToInt(stime:PWideChar):integer; overload;
-function IntToTime(dst:pWideChar;time:integer):pWideChar; overload;
-function IntToTime(dst:PAnsiChar;time:integer):PAnsiChar; overload;
-
-{
- filesize to string conversion
- value - filelength
- divider - 1=byte; 1024=kbyte; 1024*1024 - Mbyte
- prec - numbers after point (1-3)
- post - 0=none
- 1=(small)' bytes','kb','mb'
- 2=(mix) ' Bytes','Kb','Mb'
- 3=(caps) '' ,'KB','MB'
- postfix calculated from 'divider' value
-}
-function IntToK(dst:pWideChar;value,divider,prec,post:integer):pWideChar;
-
-// string conversion
-function IntToHex(dst:pWideChar;Value:dword ;Digits:integer=0):pWideChar; overload;
-function IntToHex(dst:PAnsiChar;Value:dword ;Digits:integer=0):PAnsiChar; overload;
-function IntToStr(dst:pWideChar;Value:integer;Digits:integer=0):pWideChar; overload;
-function IntToStr(dst:PAnsiChar;Value:integer;Digits:integer=0):PAnsiChar; overload;
-function StrToInt(src:pWideChar):integer; overload;
-function StrToInt(src:PAnsiChar):integer; overload;
-function HexToInt(src:pWideChar):integer; overload;
-function HexToInt(src:PAnsiChar):integer; overload;
-
-// filename work
-function ChangeExt (src,ext:PAnsiChar):PAnsiChar;
-function ChangeExtW(src,ext:PWideChar):PWideChar;
-function Extract (s:PAnsiChar;name:Boolean=true):PAnsiChar;
-function ExtractW(s:pWideChar;name:Boolean=true):pWideChar;
-function GetExt(fname,dst:pWideChar;maxlen:dword=100):pWideChar; overload;
-function GetExt(fname,dst:PAnsiChar;maxlen:dword=100):PAnsiChar; overload;
-
-procedure UpperCase(src:pWideChar);
-procedure LowerCase(src:pWideChar);
-function GetPairChar(ch:AnsiChar):AnsiChar; overload;
-function GetPairChar(ch:WideChar):WideChar; overload;
-
-type
- lSortProc = function (First,Second:integer):integer;
- {0=equ; 1=1st>2nd; -1=1st<2nd }
-procedure ShellSort(size:integer;Compare,Swap:lSortProc);
-
-function isPathAbsolute(path:pWideChar):boolean; overload;
-function isPathAbsolute(path:PAnsiChar):boolean; overload;
-
-implementation
-
-const
- IS_TEXT_UNICODE_ASCII16 = $1;
- IS_TEXT_UNICODE_REVERSE_ASCII16 = $10;
- IS_TEXT_UNICODE_STATISTICS = $2;
- IS_TEXT_UNICODE_REVERSE_STATISTICS = $20;
- IS_TEXT_UNICODE_CONTROLS = $4;
- IS_TEXT_UNICODE_REVERSE_CONTROLS = $40;
- IS_TEXT_UNICODE_SIGNATURE = $8;
- IS_TEXT_UNICODE_REVERSE_SIGNATURE = $80;
- IS_TEXT_UNICODE_ILLEGAL_CHARS = $100;
- IS_TEXT_UNICODE_ODD_LENGTH = $200;
- IS_TEXT_UNICODE_DBCS_LEADBYTE = $400;
- IS_TEXT_UNICODE_NULL_BYTES = $1000;
- IS_TEXT_UNICODE_UNICODE_MASK = $F;
- IS_TEXT_UNICODE_REVERSE_MASK = $F0;
- IS_TEXT_UNICODE_NOT_UNICODE_MASK = $F00;
- IS_TEXT_UNICODE_NOT_ASCII_MASK = $F000;
-
-function IsTextUTF8(Buffer:pbyte;Length:integer):boolean;
-var
- Ascii:boolean;
- Octets:cardinal;
- c:byte;
-begin
- Ascii:=true;
- Octets:=0;
-
- if Length=0 then
- Length:=-1;
- repeat
- if (Length=0) or (Buffer^=0) then
- break;
- dec(Length);
- c:=Buffer^;
- if (c and $80)<>0 then
- Ascii:=false;
- if Octets<>0 then
- begin
- if (c and $C0)<>$80 then
- begin
- result:=false;
- exit;
- end;
- dec(Octets);
- end
- else
- begin
- if (c and $80)<>0 then
- begin
- while (c and $80)<>0 do
- begin
- c:=c shl 1;
- inc(Octets);
- end;
- dec(Octets);
- if Octets=0 then
- begin
- result:=false;
- exit;
- end;
- end
- end;
- inc(buffer);
- until false;
- result:= not ((Octets>0) or Ascii);
-end;
-
-function GetTextFormat(Buffer:pByte;sz:cardinal):integer;
-var
- test:integer;
-begin
- result:=-1;
-
- if sz>=2 then
- begin
- if pword (Buffer)^ =SIGN_UNICODE then result := CP_UNICODE
- else if pword (Buffer)^ =SIGN_REVERSEBOM then result := CP_REVERSEBOM
- else if (sz>=4) and
- ((pdword(Buffer)^ and $00FFFFFF)=SIGN_UTF8) then result := CP_UTF8;
- end;
-
- if result<0 then
- begin
- test:=
- IS_TEXT_UNICODE_STATISTICS or
- IS_TEXT_UNICODE_REVERSE_STATISTICS or
- IS_TEXT_UNICODE_CONTROLS or
- IS_TEXT_UNICODE_REVERSE_CONTROLS or
- IS_TEXT_UNICODE_ILLEGAL_CHARS or
- IS_TEXT_UNICODE_ODD_LENGTH or
- IS_TEXT_UNICODE_NULL_BYTES;
-
- if not odd(sz) and IsTextUnicode(Buffer,sz,@test) then
- begin
- if (test and (IS_TEXT_UNICODE_ODD_LENGTH or IS_TEXT_UNICODE_ILLEGAL_CHARS))=0 then
- begin
- if (test and (IS_TEXT_UNICODE_NULL_BYTES or
- IS_TEXT_UNICODE_CONTROLS or
- IS_TEXT_UNICODE_REVERSE_CONTROLS))<>0 then
- begin
- if (test and (IS_TEXT_UNICODE_CONTROLS or
- IS_TEXT_UNICODE_STATISTICS))<>0 then
- result:=CP_UNICODE
- else if (test and (IS_TEXT_UNICODE_REVERSE_CONTROLS or
- IS_TEXT_UNICODE_REVERSE_STATISTICS))<>0 then
- result:=CP_REVERSEBOM;
- end
- end
- end
- else if IsTextUTF8(Buffer,sz) then
- result:=CP_UTF8
- else
- result:=CP_ACP;
- end;
-end;
-
-function IIF(cond:bool;ret1,ret2:integer):integer; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:PAnsiChar):PAnsiChar; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:pWideChar):pWideChar; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:Extended):Extended; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:tDateTime):tDateTime; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:pointer):pointer; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-function IIF(cond:bool;ret1,ret2:string):string; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-{$IFNDEF DELPHI7_UP}
-function IIF(cond:bool;ret1,ret2:variant):variant; overload;
-begin
- if cond then result:=ret1 else result:=ret2;
-end;
-{$ENDIF}
-
-function GetImageType(buf:pByte;mime:PAnsiChar=nil):dword;
-var
- i:integer;
-begin
- result:=0;
- if (mime<>nil) and (mime^<>#0) then
- begin
- for i:=0 to mimecnt-1 do
- begin
- if {lstrcmpia}StrCmp(mime,mimes[i].mime)=0 then
- begin
- result:=dword(mimes[i].ext);
- exit;
- end;
- end;
- end
- else if buf<>nil then
- begin
- if (pdword(buf)^ and $F0FFFFFF)=$E0FFD8FF then result:=$0047504A // 'JPG'
- else if pdword(buf)^=$38464947 then result:=$00464947 // 'GIF'
- else if pdword(buf)^=$474E5089 then result:=$00474E50 // 'PNG'
- else if pword (buf)^=$4D42 then result:=$00504D42 // 'BMP'
- end;
-end;
-
-function GetImageTypeW(buf:pByte;mime:PWideChar=nil):int64;
-var
- i:integer;
- lmime:array [0..63] of AnsiChar;
-begin
- result:=0;
- if (mime<>nil) and (mime^<>#0) then
- begin
- FastWideToAnsiBuf(mime,lmime);
- for i:=0 to mimecnt-1 do
- begin
- if {lstrcmpia}StrCmp(lmime,mimes[i].mime)=0 then
- begin
-// result:=dword(mimes[i].ext);
- FastAnsiToWideBuf(mimes[i].ext,PWideChar(@result));
- exit;
- end;
- end;
- end
- else if buf<>nil then
- begin
- if (pdword(buf)^ and $F0FFFFFF)=$E0FFD8FF then result:=$000000470050004A // 'JPG'
- else if pdword(buf)^=$38464947 then result:=$0000004600490047 // 'GIF'
- else if pdword(buf)^=$474E5089 then result:=$00000047004E0050 // 'PNG'
- else if pword (buf)^=$4D42 then result:=$00000050004D0042 // 'BMP'
- end;
-end;
-
-procedure CopyToClipboard(txt:pointer; ansi:bool);
-var
- s:pointer;
- fh:THANDLE;
-begin
- if pointer(txt)=nil then
- exit;
- if ansi then
- begin
- if PAnsiChar(txt)^=#0 then exit
- end
- else
- if PWideChar(txt)^=#0 then exit;
-
- if OpenClipboard(0) then
- begin
- if ansi then
- begin
- fh:=GlobalAlloc(GMEM_MOVEABLE+GMEM_DDESHARE,(StrLen(PAnsiChar(txt))+1));
- s:=GlobalLock(fh);
- StrCopy(s,PAnsiChar(txt));
- end
- else
- begin
- fh:=GlobalAlloc(GMEM_MOVEABLE+GMEM_DDESHARE,
- (StrLenW(PWideChar(txt))+1)*SizeOf(WideChar));
- s:=GlobalLock(fh);
- StrCopyW(s,PWideChar(txt));
- end;
- GlobalUnlock(fh);
- EmptyClipboard;
- if ansi then
- SetClipboardData(CF_TEXT,fh)
- else
- SetClipboardData(CF_UNICODETEXT,fh);
- GlobalFree(fh);
- CloseClipboard;
- end;
-end;
-
-function PasteFromClipboard(ansi:boolean;cp:dword=CP_ACP):pointer;
-var
- p:pWideChar;
- fh:tHandle;
-begin
- if OpenClipboard(0) then
- begin
- if not ansi then
- begin
- fh:=GetClipboardData(CF_UNICODETEXT);
- if fh<>0 then
- begin
- p:=GlobalLock(fh);
- StrDupW(pWideChar(result),p);
- end
- else
- begin
- fh:=GetClipboardData(CF_TEXT);
- if fh<>0 then
- begin
- p:=GlobalLock(fh);
- AnsiToWide(PAnsiChar(p),pWideChar(result),cp);
- end;
- end;
- end
- else
- begin
- fh:=GetClipboardData(CF_TEXT);
- if fh<>0 then
- begin
- p:=GlobalLock(fh);
- StrDup(PAnsiChar(result),PAnsiChar(p));
- end;
- end;
- if fh<>0 then
- GlobalUnlock(fh);
- CloseClipboard;
- end
-end;
-
-procedure CheckSystem;
-var
- ovi:TOSVersionInfo;
-begin
- ovi.dwOSVersionInfoSize:=SizeOf(TOSVersionInfo);
- GetVersionEx(ovi);
-//VER_PLATFORM_WIN32_NT for 2KXP
- with ovi do
- begin
- IsAnsi :=dwPlatformId=VER_PLATFORM_WIN32_WINDOWS;
- IsW2K :=(dwMajorVersion=5) and (dwMinorVersion=0);
- IsVista:=(dwMajorVersion=6) and (dwMinorVersion=0);
- end;
-end;
-
-// --------- string conversion ----------
-
-function WideToCombo(src:PWideChar;var dst;cp:integer=CP_ACP):integer;
-var
- pc:PAnsiChar;
- i,j:Cardinal;
-begin
- WideToAnsi(src,pc,cp);
- j:=StrLen(pc)+1;
- i:=j+(StrLenW(src)+1)*SizeOf(WideChar);
- mGetMem(PAnsiChar(dst),i);
- StrCopy(PAnsiChar(dst),pc);
- mFreeMem(pc);
- StrCopyW(pWideChar(PAnsiChar(dst)+j),src);
- result:=i;
-end;
-
-function ChangeUnicode(str:PWideChar):PWideChar;
-var
- i,len:integer;
-begin
- result:=str;
- if (str=nil) or (str^=#0) then
- exit;
- if (word(str^)=$FFFE) or (word(str^)=$FEFF) then
- begin
- len:=StrLenW(str);
- if word(str^)=$FFFE then
- begin
- i:=len-1;
- while i>0 do // str^<>#0
- begin
- pword(str)^:=swap(pword(str)^);
- inc(str);
- dec(i);
- end;
- end;
- move((result+1)^,result^,len*SizeOf(WideChar));
- end;
-end;
-
-function WideToANSI(src:PWideChar;var dst:PAnsiChar; cp:dword=CP_ACP):PAnsiChar;
-var
- len,l:integer;
-begin
- if (src=nil) or (src^=#0) then
- begin
- mGetMem(result,SizeOf(AnsiChar));
- result^:=#0;
- end
- else
- begin
- l:=StrLenW(src);
- len:=WideCharToMultiByte(cp,0,src,l,NIL,0,NIL,NIL)+1;
- mGetMem(result,len);
- FillChar(result^,len,0);
- WideCharToMultiByte(cp,0,src,l,result,len,NIL,NIL);
- end;
- dst:=result;
-end;
-
-function ANSIToWide(src:PAnsiChar;var dst:PWideChar; cp:dword=CP_ACP):PWideChar;
-var
- len,l:integer;
-begin
- if (src=nil) or (src^=#0) then
- begin
- mGetMem(result,SizeOf(WideChar));
- result^:=#0;
- end
- else
- begin
- l:=StrLen(src);
- len:=MultiByteToWideChar(cp,0,src,l,NIL,0)+1;
- mGetMem(result,len*SizeOf(WideChar));
- FillChar(result^,len*SizeOf(WideChar),0);
- MultiByteToWideChar(cp,0,src,l,result,len);
- end;
- dst:=result;
-end;
-
-function ANSIToUTF8(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar;
-var
- tmp:PWideChar;
-begin
- AnsiToWide(src,tmp,cp);
- result:=WideToUTF8(tmp,dst);
- mFreeMem(tmp);
-end;
-
-function UTF8Len(src:PAnsiChar):integer; // w/o zero
-begin
- result:=0;
- if src<>nil then
- begin
- if (pdword(src)^ and $00FFFFFF)=SIGN_UTF8 then
- inc(src,3);
- while src^<>#0 do
- begin
- if (ord(src^) and $80)=0 then
- else if (ord(src^) and $E0)=$E0 then
- inc(src,2)
- else
- inc(src);
- inc(result);
- inc(src);
- end;
- end;
-end;
-
-function CalcUTF8Len(src:pWideChar):integer;
-begin
- result:=0;
- if src<>nil then
- begin
- while src^<>#0 do
- begin
- if src^<#$0080 then
- else if src^<#$0800 then
- inc(result)
- else
- inc(result,2);
- inc(src);
- inc(result);
- end;
- end;
-end;
-
-function UTF8toWide(src:PAnsiChar; var dst:PWideChar; len:cardinal=dword(-1)):PWideChar;
-var
- w:word;
- p:PWideChar;
-begin
- mGetMem(dst,(UTF8Len(src)+1)*SizeOf(WideChar));
- p:=dst;
- if src<>nil then
- begin
- if (pdword(src)^ and $00FFFFFF)=SIGN_UTF8 then
- inc(src,3);
- while (src^<>#0) and (len>0) do
- begin
- if ord(src^)<$80 then
- w:=ord(src^)
- else if (ord(src^) and $E0)=$E0 then
- begin
- w:=(ord(src^) and $1F) shl 12;
- inc(src); dec(len);
- w:=w or (((ord(src^))and $3F) shl 6);
- inc(src); dec(len);
- w:=w or (ord(src^) and $3F);
- end
- else
- begin
- w:=(ord(src^) and $3F) shl 6;
- inc(src); dec(len);
- w:=w or (ord(src^) and $3F);
- end;
- p^:=WideChar(w);
- inc(p);
- inc(src); dec(len);
- end;
- end;
- p^:=#0;
- result:=dst;
-end;
-
-function UTF8toANSI(src:PAnsiChar;var dst:PAnsiChar;cp:dword=CP_ACP):PAnsiChar;
-var
- tmp:pWideChar;
-begin
- UTF8ToWide(src,tmp);
- result:=WideToAnsi(tmp,dst,cp);
- mFreeMem(tmp);
-end;
-
-function WidetoUTF8(src:PWideChar; var dst:PAnsiChar):PAnsiChar;
-var
- p:PAnsiChar;
-begin
- mGetMem(dst,CalcUTF8Len(src)+1);
- p:=dst;
- if src<>nil then
- begin
- while src^<>#0 do
- begin
- if src^<#$0080 then
- p^:=AnsiChar(src^)
- else if src^<#$0800 then
- begin
- p^:=AnsiChar($C0 or (ord(src^) shr 6));
- inc(p);
- p^:=AnsiChar($80 or (ord(src^) and $3F));
- end
- else
- begin
- p^:=AnsiChar($E0 or (ord(src^) shr 12));
- inc(p);
- p^:=AnsiChar($80 or ((ord(src^) shr 6) and $3F));
- inc(p);
- p^:=AnsiChar($80 or (ord(src^) and $3F));
- end;
- inc(p);
- inc(src);
- end;
- end;
- p^:=#0;
- result:=dst;
-end;
-
-procedure FillWord(var buf;count:cardinal;value:word); register; assembler;
-{
- PUSH EDI
- MOV EDI, ECX // Move Value To Write
- MOV ECX, EDX // Move Number to ECX for countdown
- MOV EDX, EAX // Move over buffer
- MOV EAX, EDI // Value to Write needs to be here
- MOV EDI, EDX // Pointer to Buffer[0]
- REP STOSW
- POP EDI
-}
-asm
- push edi
- mov edi,eax // destination
- mov ax,cx // value
- mov ecx,edx // count
- rep stosw
- pop edi
-end;
-
-// from SysUtils
-{ Delphi 7.0
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
-asm
- PUSH ESI
- PUSH EDI
- MOV ESI,P1
- MOV EDI,P2
- MOV EDX,ECX
- XOR EAX,EAX
- AND EDX,3
- SAR ECX,2
- JS @@1 // Negative Length implies identity.
- REPE CMPSD
- JNE @@2
- MOV ECX,EDX
- REPE CMPSB
- JNE @@2
-@@1: INC EAX
-@@2: POP EDI
- POP ESI
-end;
-}
-// Delphi 2009 realization
-function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
-asm
- add eax, ecx
- add edx, ecx
- xor ecx, -1
- add eax, -8
- add edx, -8
- add ecx, 9
- push ebx
- jg @Dword
- mov ebx, [eax+ecx]
- cmp ebx, [edx+ecx]
- jne @Ret0
- lea ebx, [eax+ecx]
- add ecx, 4
- and ebx, 3
- sub ecx, ebx
- jg @Dword
-@DwordLoop:
- mov ebx, [eax+ecx]
- cmp ebx, [edx+ecx]
- jne @Ret0
- mov ebx, [eax+ecx+4]
- cmp ebx, [edx+ecx+4]
- jne @Ret0
- add ecx, 8
- jg @Dword
- mov ebx, [eax+ecx]
- cmp ebx, [edx+ecx]
- jne @Ret0
- mov ebx, [eax+ecx+4]
- cmp ebx, [edx+ecx+4]
- jne @Ret0
- add ecx, 8
- jle @DwordLoop
-@Dword:
- cmp ecx, 4
- jg @Word
- mov ebx, [eax+ecx]
- cmp ebx, [edx+ecx]
- jne @Ret0
- add ecx, 4
-@Word:
- cmp ecx, 6
- jg @Byte
- movzx ebx, word ptr [eax+ecx]
- cmp bx, [edx+ecx]
- jne @Ret0
- add ecx, 2
-@Byte:
- cmp ecx, 7
- jg @Ret1
- movzx ebx, byte ptr [eax+7]
- cmp bl, [edx+7]
- jne @Ret0
-@Ret1:
- mov eax, 1
- pop ebx
- ret
-@Ret0:
- xor eax, eax
- pop ebx
-end;
-
-function Min(a,b:integer):integer;
-begin
- if a>b then
- result:=b
- else
- result:=a;
-end;
-
-function Max(a,b:integer):integer;
-begin
- if a<b then
- result:=b
- else
- result:=a;
-end;
-
-function mGetMem(var dst;size:integer):pointer;
-begin
-{$IFDEF USE_MMI}
- if @mmi.malloc<>nil then
- pointer(dst):=mmi.malloc(size)
- else
-{$ENDIF}
- GetMem(pointer(dst),size);
- result:=pointer(dst);
-end;
-
-procedure mFreeMem(var ptr);
-begin
- if pointer(ptr)<>nil then
- begin
-{$IFDEF USE_MMI}
- if @mmi.free<>nil then
- mmi.free(pointer(ptr))
- else
-{$ENDIF}
- FreeMem(pointer(ptr));
- Pointer(ptr):=nil;
- end;
-end;
-
-function mReallocMem(var dst; size:integer):pointer;
-begin
-{$IFDEF USE_MMI}
- if @mmi.malloc<>nil then
- pointer(dst):=mmi.realloc(pointer(dst),size)
- else
-{$ENDIF}
- ReallocMem(pointer(dst),size);
- result:=pointer(dst);
-end;
-
-function UnEscape(buf:PAnsiChar):PAnsiChar;
-begin
- if (buf<>nil) and (buf^<>#0) then
- begin
- StrReplace(buf,PAnsiChar(#$7F'n'),PAnsiChar(#$0D#$0A));
- StrReplace(buf,PAnsiChar(#$7F't'),PAnsiChar(#$09));
- end;
- result:=buf;
-end;
-
-function Escape(buf:PAnsiChar):PAnsiChar;
-var
- i:integer;
-begin
- i:=StrLen(buf);
- if i<>0 then
- begin
- Move(buf^,(buf+1)^,i+1);
- buf^:=#39;
- (buf+i+1)^:=#39;
- (buf+i+2)^:=#0;
- StrReplace(buf,#$0D#$0A,#$7F'n');
- StrReplace(buf,#$09,#$7F't');
- end;
- result:=buf;
-end;
-
-procedure ShellSort(size:integer;Compare,Swap:lSortProc);
-var
- i,j,gap:longint;
-begin
- gap:=size shr 1;
- while gap>0 do
- begin
- for i:=gap to size-1 do
- begin
- j:=i-gap;
- while (j>=0) and (Compare(j,UInt(j+gap))>0) do
- begin
- Swap(j,UInt(j+gap));
- dec(j,gap);
- end;
- end;
- gap:=gap shr 1;
- end;
-end;
-
-const
- Posts:array [0..8] of PWideChar =
- (' bytes',' Bytes','','kb','Kb','KB','mb','Mb','MB');
-
-function IntToK(dst:pWidechar;value,divider,prec,post:integer):pWidechar;
-var
- tmp:integer;
- p:pWideChar;
- ls:array [0..4] of WideChar;
-begin
- result:=dst;
- IntToStr(dst,value div divider);
- if divider=1 then prec:=0;
- while dst^<>#0 do inc(dst);
- if prec<>0 then
- begin
- if prec=1 then prec:=10
- else if prec=2 then prec:=100
- else {if prec=3 then} prec:=1000;
- tmp:=round(frac(value*1.0/divider)*prec);
- dst^:='.'; inc(dst);
- IntToStr(ls,tmp);
- p:=ls;
- while p^<>#0 do
- begin
- dst^:=p^; inc(dst); inc(p);
- end;
- dst^:=#0;
- end;
- if post<>0 then
- begin
- if divider=1 then
- StrCatW(dst,Posts[post-1])
- else
- begin
- if divider=1024 then tmp:=1
- else {if divider=1024*1024 then} tmp:=2;
- p:=Posts[tmp*3+post-1];
- dst^:=p[0]; inc(dst);
- dst^:=p[1]; inc(dst);
- dst^:=#0;
- end;
- end;
-end;
-
-// ----- base string functions -----
-function StrDup(var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-var
- l:cardinal;
- p:pAnsiChar;
-begin
- if (src=nil) or (src^=#0) then
- dst:=nil
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
-
- mGetMem(dst,l+1);
- move(src^, dst^,l);
- dst[l]:=#0;
- end;
- result:=dst;
-end;
-
-function StrDupW(var dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-var
- l:cardinal;
- p:pWideChar;
-begin
- if (src=nil) or (src^=#0) then
- dst:=nil
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
- mGetMem(dst,(l+1)*SizeOf(WideChar));
- move(src^, dst^,l*SizeOf(WideChar));
- dst[l]:=#0;
- end;
- result:=dst;
-end;
-
-function StrCopyE(dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-var
- l:cardinal;
- p:pAnsiChar;
-begin
- if dst<>nil then
- begin
- if (src=nil) or (src^=#0) then
- dst^:=#0
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
- move(src^, dst^,l);
- inc(dst,l);
- dst^:=#0;
- end;
- end;
- result:=dst;
-end;
-
-function StrCopyEW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-var
- l:cardinal;
- p:pWideChar;
-begin
- if dst<>nil then
- begin
- if (src=nil) or (src^=#0) then
- dst^:=#0
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
- move(src^, dst^,l*SizeOf(WideChar));
- inc(dst,l);
- dst^:=#0;
- end;
- end;
- result:=dst;
-end;
-
-function StrCopy(dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
-var
- l:cardinal;
- p:pAnsiChar;
-begin
- if dst<>nil then
- begin
- if (src=nil) or (src^=#0) then
- dst^:=#0
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
- move(src^, dst^,l);
- dst[l]:=#0;
- end;
- end;
- result:=dst;
-end;
-
-function StrCopyW(dst:PWideChar;src:PWideChar;len:cardinal=0):PWideChar;
-var
- l:cardinal;
- p:pWideChar;
-begin
- if dst<>nil then
- begin
- if (src=nil) or (src^=#0) then
- dst^:=#0
- else
- begin
- if len=0 then
- len:=high(cardinal);
- p:=src;
- l:=len;
- while (p^<>#0) and (l>0) do
- begin
- inc(p); dec(l);
- end;
- l:=p-src;
- move(src^, dst^,l*SizeOf(WideChar));
- dst[l]:=#0;
- end;
- end;
- result:=dst;
-end;
-
-function StrDelete(aStr:PAnsiChar;pos,len:cardinal):PAnsiChar;
-var
- i:cardinal;
-begin
- if len>0 then
- begin
- i:=StrLen(aStr);
- if pos<i then
- begin
- if (pos+len)>i then
- len:=i-pos;
- StrCopy(aStr+pos,aStr+pos+len);
- end;
- end;
- result:=aStr;
-end;
-
-function StrDeleteW(aStr:PWideChar;pos,len:cardinal):PWideChar;
-var
- i:cardinal;
-begin
- if len>0 then
- begin
- i:=StrLenW(aStr);
- if pos<i then
- begin
- if (pos+len)>i then
- len:=i-pos;
- StrCopyW(aStr+pos,aStr+pos+len);
- end;
- end;
- result:=aStr;
-end;
-
-function StrInsert(substr,src:PAnsiChar;pos:cardinal):PAnsiChar;
-var
- i:cardinal;
- p:PAnsiChar;
-begin
- i:=StrLen(substr);
- if i<>0 then
- begin
- p:=src+pos;
- move(p^,(p+i)^,StrLen(src)-pos+1);
- move(substr^,p^,i);
- end;
- result:=src;
-end;
-
-function StrInsertW(substr,src:PWideChar;pos:cardinal):PWideChar;
-var
- i:cardinal;
- p:PWideChar;
-begin
- i:=StrLenW(substr);
- if i<>0 then
- begin
- p:=src+pos;
- move(p^,(p+i)^,(StrLenW(src)-pos+1)*SizeOf(PWideChar));
- move(substr^,p^,i*SizeOf(WideChar));
- end;
- result:=src;
-end;
-
-function StrReplace(src,SubStr,NewStr:PAnsiChar):PAnsiChar;
-var
- i,j,l:integer;
- k:integer;
- p:PAnsiChar;
-begin
- result:=src;
- p:=StrPos(src,SubStr);
- if p=nil then exit;
- i:=StrLen(SubStr);
- j:=StrLen(NewStr);
- l:=i-j;
- repeat
- if j=0 then
- StrCopy(p,p+i)
- else
- begin
- k:=StrLen(p)+1;
- if l>0 then
- move((p+l)^,p^,k-l)
- else if l<>0 then
- move(p^,(p-l)^,k);
- move(NewStr^,p^,j); {new characters}
- inc(p,j);
- end;
- p:=StrPos(p,SubStr);
- if p=nil then break;
- until false;
-end;
-
-function StrReplaceW(src,SubStr,NewStr:pWideChar):PWideChar;
-var
- i,j,l:integer;
- k:integer;
- p:PWideChar;
-begin
- result:=src;
- p:=StrPosW(src,SubStr);
- if p=nil then exit;
- i:=StrLenW(SubStr);
- j:=StrLenW(NewStr);
- l:=i-j;
- repeat
- if j=0 then
- StrCopyW(p,p+i)
- else
- begin
- k:=(StrLenW(p)+1)*SizeOf(WideChar);
- if l>0 then
- move((p+l)^,p^,k-l*SizeOf(WideChar))
- else if l<>0 then
- move(p^,(p-l)^,k);
- move(NewStr^,p^,j*SizeOf(WideChar)); {new characters}
- inc(p,j);
- end;
- p:=StrPosW(p,SubStr);
- if p=nil then break;
- until false;
-end;
-
-function CharReplace(dst:pAnsiChar;old,new:AnsiChar):PAnsiChar;
-begin
- result:=dst;
- if dst<>nil then
- begin
- while dst^<>#0 do
- begin
- if dst^=old then dst^:=new;
- inc(dst);
- end;
- end;
-end;
-
-function CharReplaceW(dst:pWideChar;old,new:WideChar):PWideChar;
-begin
- result:=dst;
- if dst<>nil then
- begin
- while dst^<>#0 do
- begin
- if dst^=old then dst^:=new;
- inc(dst);
- end;
- end;
-end;
-
-function StrCmp(a,b:PAnsiChar;n:cardinal=$FFFFFFFF):integer; // CompareString
-begin
- result:=0;
- if (a=nil) and (b=nil) then
- exit;
- if (a=nil) or (b=nil) then
- begin
- result:=-1;
- exit;
- end;
- while n>0 do
- begin
- result:=ord(a^)-ord(b^);
- if (result<>0) or (a^=#0) then
- break;
- inc(a);
- inc(b);
- dec(n);
- end;
-end;
-
-function StrCmpW(a,b:PWideChar;n:cardinal=$FFFFFFFF):integer;
-begin
- result:=0;
- if (a=nil) and (b=nil) then
- exit;
- if (a=nil) or (b=nil) then
- begin
- result:=-1;
- exit;
- end;
- while n>0 do
- begin
- result:=ord(a^)-ord(b^);
- if (result<>0) or (a^=#0) then
- break;
- inc(a);
- inc(b);
- dec(n);
- end;
-end;
-
-function StrEnd(const a:PAnsiChar):PAnsiChar;
-begin
- result:=a;
- if result<>nil then
- while result^<>#0 do inc(result);
-end;
-
-function StrEndW(const a:PWideChar):PWideChar;
-begin
- result:=a;
- if result<>nil then
- while result^<>#0 do inc(result);
-end;
-
-function StrScan(src:PAnsiChar;c:AnsiChar):PAnsiChar;
-begin
- if src<>nil then
- begin
- while (src^<>#0) and (src^<>c) do inc(src);
- if src^<>#0 then
- begin
- result:=src;
- exit;
- end;
- end;
- result:=nil;
-end;
-
-function StrRScan(src:PAnsiChar;c:AnsiChar):PAnsiChar;
-begin
- if src<>nil then
- begin
- result:=StrEnd(src);
- while (result>=src) and (result^<>c) do dec(result);
- if result<src then
- result:=nil;
- end
- else
- result:=nil;
-end;
-
-function StrScanW(src:PWideChar;c:WideChar):PWideChar;
-begin
- if src<>nil then
- begin
- while (src^<>#0) and (src^<>c) do inc(src);
- if src^<>#0 then
- begin
- result:=src;
- exit;
- end;
- end;
- result:=nil;
-end;
-
-function StrRScanW(src:PWideChar;c:WideChar):PWideChar;
-begin
- if src<>nil then
- begin
- result:=StrEndW(src);
- while (result>=src) and (result^<>c) do dec(result);
- if result<src then
- result:=nil;
- end
- else
- result:=nil;
-end;
-
-function StrLen(Str: PAnsiChar): Cardinal;
-var
- P : PAnsiChar;
-begin
- P := Str;
- if P<>nil then
- while (P^ <> #0) do Inc(P);
- Result := (P - Str);
-end;
-
-function StrLenW(Str: PWideChar): Cardinal;
-var
- P : PWideChar;
-begin
- P := Str;
- if P<>nil then
- while (P^ <> #0) do Inc(P);
- Result := (P - Str);
-end;
-
-function StrCat(Dest: PAnsiChar; const Source: PAnsiChar): PAnsiChar;
-begin
- if dest<>nil then
- StrCopy(StrEnd(Dest), Source);
- Result := Dest;
-end;
-
-function StrCatW(Dest: PWideChar; const Source: PWideChar): PWideChar;
-begin
- if dest<>nil then
- StrCopyW(StrEndW(Dest), Source);
- Result := Dest;
-end;
-
-function StrPos(const aStr, aSubStr: PAnsiChar): PAnsiChar;
-var
- Str, SubStr: PAnsiChar;
- Ch: AnsiChar;
-begin
- if (aStr = nil) or (aStr^ = #0) or (aSubStr = nil) or (aSubStr^ = #0) then
- begin
- Result := nil;
- Exit;
- end;
- Result := aStr;
- Ch := aSubStr^;
- repeat
- if Result^ = Ch then
- begin
- Str := Result;
- SubStr := aSubStr;
- repeat
- Inc(Str);
- Inc(SubStr);
- if SubStr^ = #0 then exit;
- if Str^ = #0 then
- begin
- Result := nil;
- exit;
- end;
- if Str^ <> SubStr^ then break;
- until (FALSE);
- end;
- Inc(Result);
- until (Result^ = #0);
- Result := nil;
-end;
-
-function StrIndex(const aStr, aSubStr: PAnsiChar):integer;
-var
- p:pAnsiChar;
-begin
- p:=StrPos(aStr,aSubStr);
- if p=nil then
- result:=0
- else
- result:=p-aStr+1;
-end;
-
-function StrPosW(const aStr, aSubStr: PWideChar): PWideChar;
-var
- Str, SubStr: PWideChar;
- Ch: WideChar;
-begin
- if (aStr = nil) or (aStr^ = #0) or (aSubStr = nil) or (aSubStr^ = #0) then
- begin
- Result := nil;
- Exit;
- end;
- Result := aStr;
- Ch := aSubStr^;
- repeat
- if Result^ = Ch then
- begin
- Str := Result;
- SubStr := aSubStr;
- repeat
- Inc(Str);
- Inc(SubStr);
- if SubStr^ = #0 then exit;
- if Str^ = #0 then
- begin
- Result := nil;
- exit;
- end;
- if Str^ <> SubStr^ then break;
- until (FALSE);
- end;
- Inc(Result);
- until (Result^ = #0);
- Result := nil;
-end;
-
-function StrIndexW(const aStr, aSubStr: PWideChar):integer;
-var
- p:pWideChar;
-begin
- p:=StrPosW(aStr,aSubStr);
- if p=nil then
- result:=0
- else
- result:=(p-aStr)+1; //!!!!
-end;
-
-// ----- filenames -----
-
-function ChangeExt(src,ext:PAnsiChar):PAnsiChar;
-var
- i,j:integer;
-begin
- i:=StrLen(src);
- j:=i;
- while (i>0) and (src[i]<>'\') and (src[i]<>':') and (src[i]<>'.') do dec(i);
- if src[i]<>'.' then
- begin
- i:=j;
- src[i]:='.';
- end;
- if ext=nil then
- ext:='';
- StrCopy(src+i+1,ext);
- result:=src;
-end;
-
-function ChangeExtW(src,ext:PWideChar):PWideChar;
-var
- i,j:integer;
-begin
- i:=StrLenW(src);
- j:=i;
- while (i>0) and (src[i]<>'\') and (src[i]<>':') and (src[i]<>'.') do dec(i);
- if src[i]<>'.' then
- begin
- i:=j;
- src[i]:='.';
- end;
- if ext=nil then
- ext:='';
- StrCopyW(src+i+1,ext);
- result:=src;
-end;
-
-function Extract(s:PAnsiChar;name:Boolean=true):PAnsiChar;
-var
- i,j:integer;
-begin
- i:=StrLen(s)-1;
- j:=i;
- while (i>=0) and ((s[i]<>'\') and (s[i]<>'/')) do dec(i);
- if name then
- begin
- mGetMem(result,(j-i+1));
- StrCopy(result,s+i+1);
- end
- else
- begin
- StrDup(result,s,i+1);
- end;
-end;
-
-function ExtractW(s:pWideChar;name:Boolean=true):pWideChar;
-var
- i,j:integer;
-begin
- i:=StrLenW(s)-1;
- j:=i;
- while (i>=0) and ((s[i]<>'\') and (s[i]<>'/')) do dec(i);
- if name then
- begin
- mGetMem(result,(j-i+1)*SizeOf(WideChar));
- StrCopyW(result,s+i+1);
- end
- else
- begin
- StrDupW(result,s,i+1);
- end;
-end;
-
-function GetExt(fname,dst:pWideChar;maxlen:dword=100):pWideChar;
-var
- ppc,pc:PWideChar;
-begin
- result:=dst;
- dst^:=#0;
- if fname<>nil then
- begin
- pc:=strendw(fname)-1;
- while (pc>fname) and ((pc^='"') or (pc^=' ')) do dec(pc);
- ppc:=pc+1;
- while (pc>fname) and (pc^<>'.') do
- begin
- if maxlen=0 then exit;
- if not (AnsiChar(pc^) in ['0'..'9','A'..'Z','_','a'..'z']) then exit;
- dec(maxlen);
- dec(pc); //empty name not allowed!
- end;
- if pc>fname then
- begin
- repeat
- inc(pc);
- if pc=ppc then
- begin
- dst^:=#0;
- break;
- end;
- if (pc^>='a') and (pc^<='z') then
- dst^:=WideChar(ord(pc^)-$20)
- else
- dst^:=pc^;
- inc(dst);
- until false;
- end;
- end;
-end;
-
-function GetExt(fname,dst:PAnsiChar;maxlen:dword=100):PAnsiChar;
-var
- ppc,pc:PAnsiChar;
-begin
- result:=dst;
- dst^:=#0;
- if fname<>nil then
- begin
- pc:=StrEnd(fname)-1;
- while (pc>fname) and ((pc^='"') or (pc^=' ')) do dec(pc);
- ppc:=pc+1;
- while (pc>fname) and (pc^<>'.') do
- begin
- if maxlen=0 then exit;
- if not (AnsiChar(pc^) in ['0'..'9','A'..'Z','_','a'..'z']) then exit;
- dec(maxlen);
- dec(pc); //empty name not allowed!
- end;
- if pc>fname then
- begin
- repeat
- inc(pc);
- if pc=ppc then
- begin
- dst^:=#0;
- break;
- end;
- if (pc^>='a') and (pc^<='z') then
- dst^:=AnsiChar(ord(pc^)-$20)
- else
- dst^:=pc^;
- inc(dst);
- until false;
- end;
- end;
-end;
-
-type
- PDayTable = ^TDayTable;
- TDayTable = array [0..11] of cardinal;
-
-const
- MonthDays: array [Boolean] of TDayTable =
- ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31),
- (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));
-
-const
- DateDelta = 693594;
-{ Days between TDateTime basis (12/31/1899) and Unix time_t basis (1/1/1970) }
- UnixDateDelta = 25569;
-
-function IsLeapYear(Year:Word):Boolean;
-begin
- Result:=(Year mod 4=0) and ((Year mod 100<>0) or (Year mod 400=0));
-end;
-
-function EncodeTime(Hour, Min, Sec: cardinal): TDateTime;
-begin
- result := (Hour*3600 + Min*60 + Sec) / 86400;
-end;
-
-function EncodeDate(Year, Month, Day: cardinal):TDateTime;
-var
- DayTable: PDayTable;
-begin
- DayTable := @MonthDays[IsLeapYear(Year)];
- dec(Month);
- while Month>0 do
- begin
- dec(Month);
- inc(Day,DayTable^[Month]);
- end;
-
- dec(Year);
- result := Year * 365 + Year div 4 - Year div 100 + Year div 400 + Day - DateDelta;
-end;
-
-function Timestamp(Year,Month,Day:cardinal;Hour:cardinal=0;Min:cardinal=0;Sec:cardinal=0):dword;
-var
- t:tDateTime;
-begin
- t := EncodeDate(Year, Month, Day);
- if t >= 0 then
- t := t + EncodeTime(Hour, Min, Sec)
- else
- t := t - EncodeTime(Hour, Min, Sec);
- result:=Round((t - UnixDateDelta) * 86400)
-end;
-
-function GetCurrentTime:dword;
-var
- st:tSystemTime;
-begin
- GetSystemTime(st);
- result:=Timestamp(st.wYear,st.wMonth,st.wDay,st.wHour,st.wMinute,st.wSecond);
-end;
-
-function TimeToInt(stime:PAnsiChar):integer;
-var
- hour,min,sec,len,i:integer;
-begin
- len:=StrLen(stime);
- i:=0;
- sec :=0;
- min :=0;
- hour:=0;
- while i<len do
- begin
- if (stime[i]<'0') or (stime[i]>'9') then
- begin
- if min>0 then
- hour:=min;
- min:=sec;
- sec:=0;
- end
- else
- sec:=sec*10+ord(stime[i])-ord('0');
- inc(i);
- end;
- result:=hour*3600+min*60+sec;
-end;
-
-function TimeToInt(stime:PWideChar):integer;
-var
- buf:array [0..63] of AnsiChar;
-begin
- result:=TimeToInt(FastWideToAnsiBuf(stime,buf));
-end;
-
-function IntToTime(dst:PAnsiChar;time:integer):PAnsiChar;
-var
- day,hour,min,sec:array [0..7] of AnsiChar;
- d,h:integer;
-begin
- result:=dst;
- h:=time div 3600;
- dec(time,h*3600);
- IntToStr(sec,(time mod 60),2);
- d:=h div 24;
- if d>0 then
- begin
- h:=h mod 24;
- IntToStr(day,d);
- dst^:=day[0]; inc(dst);
- if day[1]<>#0 then // now only 99 days max
- begin
- dst^:=day[1]; inc(dst);
- end;
- dst^:=' '; inc(dst);
- end;
- if h>0 then
- begin
- IntToStr(hour,h);
- IntToStr(min,(time div 60),2);
- dst^:=hour[0]; inc(dst);
- if hour[1]<>#0 then
- begin
- dst^:=hour[1]; inc(dst);
- end;
- dst^:=':'; inc(dst);
- dst^:=min[0]; inc(dst);
- dst^:=min[1]; inc(dst);
- end
- else
- begin
- IntToStr(min,time div 60);
- dst^:=min[0]; inc(dst);
- if min[1]<>#0 then
- begin
- dst^:=min[1]; inc(dst);
- end;
- end;
- dst^:=':'; inc(dst);
- dst^:=sec[0]; inc(dst);
- dst^:=sec[1]; inc(dst);
- dst^:=#0;
-end;
-
-function IntToTime(dst:pWideChar;time:integer):pWideChar;
-var
- buf:array [0..63] of AnsiChar;
-begin
- result:=FastAnsiToWideBuf(IntToTime(buf,time),dst);
-end;
-
-function StrToInt(src:pWideChar):integer;
-var
- sign:boolean;
-begin
- result:=0;
- if src<>nil then
- begin
- sign:=src^='-';
- if sign then inc(src);
- while src^<>#0 do
- begin
- if (src^>='0') and (src^<='9') then
- result:=result*10+ord(src^)-ord('0')
- else
- break;
- inc(src);
- end;
- if sign then result:=-result;
- end;
-end;
-
-function StrToInt(src:PAnsiChar):integer;
-var
- sign:boolean;
-begin
- result:=0;
- if src<>nil then
- begin
- sign:=src^='-';
- if sign then inc(src);
- while src^<>#0 do
- begin
- if (src^>='0') and (src^<='9') then
- result:=result*10+ord(src^)-ord('0')
- else
- break;
- inc(src);
- end;
- if sign then result:=-result;
- end;
-end;
-
-function IntToStr(dst:PAnsiChar;Value:integer;Digits:integer=0):PAnsiChar;
-var
- i:dword;
-begin
- if Digits<=0 then
- begin
- if Value<0 then
- Digits:=1
- else
- Digits:=0;
- i:=ABS(Value);
- repeat
- i:=i div 10;
- inc(Digits);
- until i=0;
- end;
- dst[Digits]:=#0;
- i:=ABS(Value);
- repeat
- dec(Digits);
- dst[Digits]:=AnsiChar(ord('0')+(i mod 10));
- i:=i div 10;
- if (Value<0) and (Digits=1) then
- begin
- dst[0]:='-';
- break;
- end;
- until Digits=0;
- result:=dst;
-end;
-
-function IntToStr(dst:pWideChar;Value:integer;Digits:integer=0):pWideChar;
-var
- i:dword;
-begin
- if Digits<=0 then
- begin
- if Value<0 then
- Digits:=1
- else
- Digits:=0;
- i:=ABS(Value);
- repeat
- i:=i div 10;
- inc(Digits);
- until i=0;
- end;
- dst[Digits]:=#0;
- i:=ABS(Value);
- repeat
- dec(Digits);
- dst[Digits]:=WideChar(ord('0')+(i mod 10));
- i:=i div 10;
- if (Value<0) and (Digits=1) then
- begin
- dst[0]:='-';
- break;
- end;
- until Digits=0;
- result:=dst;
-end;
-
-function HexToInt(src:pWideChar):integer;
-begin
- result:=0;
- while src^<>#0 do
- begin
- if (src^>='0') and (src^<='9') then
- result:=result*16+ord(src^)-ord('0')
- else if ((src^>='A') and (src^<='F')) then
- result:=result*16+ord(src^)-ord('A')+10
- else if ((src^>='a') and (src^<='f')) then
- result:=result*16+ord(src^)-ord('a')+10
- else
- break;
- inc(src);
- end;
-end;
-
-function HexToInt(src:PAnsiChar):integer;
-begin
- result:=0;
- while src^<>#0 do
- begin
- if (src^>='0') and (src^<='9') then
- result:=result*16+ord(src^)-ord('0')
- else if ((src^>='A') and (src^<='F')) then
- result:=result*16+ord(src^)-ord('A')+10
- else if ((src^>='a') and (src^<='f')) then
- result:=result*16+ord(src^)-ord('a')+10
- else
- break;
- inc(src);
- end;
-end;
-
-function IntToHex(dst:pWidechar;Value:dword;Digits:integer=0):pWideChar;
-var
- i:dword;
-begin
- if Digits<=0 then
- begin
- Digits:=0;
- i:=Value;
- repeat
- i:=i shr 4;
- inc(Digits);
- until i=0;
- end;
- dst[Digits]:=#0;
- repeat
- Dec(Digits);
- dst[Digits]:=WideChar(HexDigitChr[Value and $F]);
- Value:=Value shr 4;
- until Digits=0;
- result:=dst;
-end;
-
-function IntToHex(dst:PAnsiChar;Value:dword;Digits:integer=0):PAnsiChar;
-var
- i:dword;
-begin
- if Digits<=0 then
- begin
- Digits:=0;
- i:=Value;
- repeat
- i:=i shr 4;
- inc(Digits);
- until i=0;
- end;
- dst[Digits]:=#0;
- repeat
- Dec(Digits);
- dst[Digits]:=HexDigitChr[Value and $F];
- Value:=Value shr 4;
- until Digits=0;
- result:=dst;
-end;
-
-procedure UpperCase(src:pWideChar);
-var
- c:WideChar;
-begin
- if src<>nil then
- begin
- while src^<>#0 do
- begin
- c:=src^;
- if (c>='a') and (c<='z') then
- src^:=WideChar(ord(c)-$20);
- inc(src);
- end;
- end;
-end;
-
-procedure LowerCase(src:pWideChar);
-var
- c:WideChar;
-begin
- if src<>nil then
- begin
- while src^<>#0 do
- begin
- c:=src^;
- if (c>='A') and (c<='Z') then
- src^:=WideChar(ord(c)+$20);
- inc(src);
- end;
- end;
-end;
-
-function GetPairChar(ch:AnsiChar):AnsiChar;
-begin
- case ch of
- '[': result:=']';
- '<': result:='>';
- '(': result:=')';
- '{': result:='}';
- else // ' and " too
- result:=ch;
- end;
-end;
-
-function GetPairChar(ch:WideChar):WideChar;
-begin
- case ch of
- '[': result:=']';
- '<': result:='>';
- '(': result:=')';
- '{': result:='}';
- else // ' and " too
- result:=ch;
- end;
-end;
-
-function FastWideToAnsiBuf(src:PWideChar;dst:PAnsiChar;len:cardinal=dword(-1)):PAnsiChar;
-begin
- result:=dst;
- if src<>nil then
- begin
- repeat
- dst^:=AnsiChar(src^);
- if src^=#0 then
- break;
- dec(len);
- if len=0 then
- begin
- (dst+1)^:=#0;
- break;
- end;
- inc(src);
- inc(dst);
- until false;
- end
- else
- dst^:=#0;
-end;
-
-function FastWideToAnsi(src:PWideChar;var dst:PAnsiChar):PAnsiChar;
-begin
- if src=nil then
- dst:=nil
- else
- begin
- mGetMem(dst,StrLenW(src)+1);
- FastWideToAnsiBuf(src,dst);
- end;
- result:=dst;
-end;
-
-function FastAnsiToWideBuf(src:PAnsiChar;dst:PWideChar;len:cardinal=dword(-1)):PWideChar;
-begin
- result:=dst;
- if src<>nil then
- begin
- repeat
- dst^:=WideChar(src^);
- if src^=#0 then
- break;
- dec(len);
- if len=0 then
- begin
- (dst+1)^:=#0;
- break;
- end;
- inc(src);
- inc(dst);
- until false;
- end
- else
- dst^:=#0;
-end;
-
-function FastAnsiToWide(src:PAnsiChar;var dst:PWideChar):PWideChar;
-begin
- if src=nil then
- dst:=nil
- else
- begin
- mGetMem(dst,(StrLen(src)+1)*SizeOf(WideChar));
- FastAnsiToWideBuf(src,dst);
- end;
- result:=dst;
-end;
-
-function isPathAbsolute(path:pWideChar):boolean;
-begin
- result:=((path[1]=':') and (path[2]='\')) or ((path[0]='\') {and (path[1]='\')}) or
- (StrPosW(path,'://')<>nil);
-end;
-
-function isPathAbsolute(path:PAnsiChar):boolean;
-begin
- result:=((path[1]=':') and (path[2]='\')) or ((path[0]='\') {and (path[1]='\')}) or
- (StrPos(path,'://')<>nil);
-end;
-
-begin
- CheckSystem;
-end.
diff --git a/delphi/Awkward/utils/compilers.inc b/delphi/Awkward/utils/compilers.inc
deleted file mode 100644
index af89289..0000000
--- a/delphi/Awkward/utils/compilers.inc
+++ /dev/null
@@ -1,735 +0,0 @@
-{$IFDEF VER210} // Delphi 2010
- {$DEFINE COMPILER13}
- {$DEFINE VCL71}
- {$DEFINE DELPHI13}
- {$DEFINE DELPHI2010}
- {$DEFINE BCB13}
- {$DEFINE BCB2010}
- {$DEFINE BDS7}
- {$DEFINE BDS2010}
-{$ENDIF}
-
-{$IFDEF VER200}
- {$DEFINE COMPILER12}
- {$DEFINE VCL71}
- {$DEFINE DELPHI12}
- {$DEFINE DELPHI2009}
- {$DEFINE BCB12}
- {$DEFINE BCB2009}
- {$DEFINE BDS6}
- {$DEFINE BDS2009}
-{$ENDIF}
-
-{$IFDEF VER185}
- {$DEFINE COMPILER11}
- {$DEFINE VCL71}
- {$DEFINE DELPHI11}
- {$DEFINE DELPHI2007}
- {$DEFINE BCB11}
- {$DEFINE BCB2007}
- {$DEFINE BDS5}
- {$DEFINE BDS2007}
- {$UNDEF VER180}
-{$ENDIF}
-
-{$IFDEF VER180}
- {$DEFINE COMPILER10}
- {$DEFINE VCL71}
- {$DEFINE DELPHI10}
- {$DEFINE DELPHI2006}
- {$DEFINE BCB10}
- {$DEFINE BCB2006}
- {$DEFINE BDS4}
- {$DEFINE BDS2006}
-{$ENDIF}
-
-{$IFDEF VER170}
- {$DEFINE COMPILER9}
- {$DEFINE VCL71}
- {$DEFINE DELPHI9}
- {$DEFINE DELPHI2005}
- {$DEFINE BDS3}
- {$DEFINE BDS2005}
-{$ENDIF}
-
-{$IFDEF VER160}
- {$DEFINE COMPILER8}
- {$DEFINE VCL71}
- {$DEFINE DELPHI8}
- {$DEFINE BDS2}
-{$ENDIF}
-
-{$IFDEF VER150}
- {$DEFINE COMPILER7}
- {$IFDEF LINUX}
- {$DEFINE CLX10}
- {$ELSE}
- {$DEFINE VCL70}
- {$DEFINE CLX10}
- {$IFDEF BCB}
- {$DEFINE BCB7}
- {$ELSE}
- {$DEFINE DELPHI7}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VER140}
- {$DEFINE COMPILER6}
- {$IFDEF LINUX}
- {$DEFINE CLX10}
- {$IFDEF CONDITIONALEXPRESSIONS}
- {$IFDEF CompilerVersion}
- {.$IF System.RTLVersion = 14.1}
- {.$DEFINE KYLIX2}
- {.$IFEND}
- {.$IF System.RTLVersion = 14.5}
- {.$DEFINE KYLIX3}
- {.$IFEND}
- {$ELSE}
- {$DEFINE KYLIX1}
- {$ENDIF}
- {$ENDIF}
- {$ELSE}
- {$DEFINE VCL60}
- {$DEFINE CLX10}
- {$IFDEF BCB}
- {$DEFINE BCB6}
- {$ELSE}
- {$DEFINE DELPHI6}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VER130}
- {$DEFINE COMPILER5}
- {$DEFINE VCL50}
- {$IFDEF BCB}
- {$DEFINE BCB5}
- {$ELSE}
- {$DEFINE DELPHI5}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VER125}
- {$DEFINE COMPILER4}
- {$DEFINE VCL40}
- {$DEFINE BCB4}
-{$ENDIF}
-
-{$IFDEF VER120}
- {$DEFINE COMPILER4}
- {$DEFINE VCL40}
- {$DEFINE DELPHI4}
-{$ENDIF}
-
-{$IFDEF VER110}
- {$DEFINE COMPILER35}
- {$DEFINE VCL30}
- {$DEFINE BCB3}
-{$ENDIF}
-
-{$IFDEF VER100}
- {$DEFINE COMPILER3}
- {$DEFINE VCL30}
- {$DEFINE DELPHI3}
-{$ENDIF}
-
-{$IFDEF VER93}
- {$DEFINE COMPILER2}
- {$DEFINE VCL20}
- {$DEFINE BCB1}
-{$ENDIF}
-
-{$IFDEF VER90}
- {$DEFINE COMPILER2}
- {$DEFINE VCL20}
- {$DEFINE DELPHI2}
-{$ENDIF}
-
-{$IFDEF VER80}
- {$DEFINE COMPILER1}
- {$DEFINE VCL10}
- {$DEFINE DELPHI1}
-{$ENDIF}
-
-// DELPHIX_UP from DELPHIX mappings
-
-{$IFDEF DELPHI13}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI13_UP}
- {$DEFINE DELPHI12_UP}
- {$DEFINE DELPHI11_UP}
- {$DEFINE DELPHI10_UP}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2010}
- {$DEFINE DELPHI2010_UP}
- {$DEFINE DELPHI2009_UP}
- {$DEFINE DELPHI2007_UP}
- {$DEFINE DELPHI2006_UP}
- {$DEFINE DELPHI2005_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI12}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI12_UP}
- {$DEFINE DELPHI11_UP}
- {$DEFINE DELPHI10_UP}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2009}
- {$DEFINE DELPHI2009_UP}
- {$DEFINE DELPHI2007_UP}
- {$DEFINE DELPHI2006_UP}
- {$DEFINE DELPHI2005_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI11}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI11_UP}
- {$DEFINE DELPHI10_UP}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2007}
- {$DEFINE DELPHI2007_UP}
- {$DEFINE DELPHI2006_UP}
- {$DEFINE DELPHI2005_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI10}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI10_UP}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2006}
- {$DEFINE DELPHI2006_UP}
- {$DEFINE DELPHI2005_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI9}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI9_UP}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2005}
- {$DEFINE DELPHI2005_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI8}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI8_UP}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI7}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI7_UP}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI6}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI6_UP}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI5}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI5_UP}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI4}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI4_UP}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI3}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI3_UP}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI2}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI2_UP}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-{$IFDEF DELPHI1}
- {$DEFINE DELPHI}
- {$DEFINE DELPHI1_UP}
-{$ENDIF}
-
-// BCBX_UP from BCBX mappings
-
-{$IFDEF BCB12}
- {$DEFINE BCB}
- {$DEFINE BCB12_UP}
- {$DEFINE BCB11_UP}
- {$DEFINE BCB10_UP}
- {$DEFINE BCB7_UP}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB2008}
- {$DEFINE BCB2008_UP}
- {$DEFINE BCB2007_UP}
- {$DEFINE BCB2006_UP}
-{$ENDIF}
-
-{$IFDEF BCB11}
- {$DEFINE BCB}
- {$DEFINE BCB11_UP}
- {$DEFINE BCB10_UP}
- {$DEFINE BCB7_UP}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB2007}
- {$DEFINE BCB2007_UP}
- {$DEFINE BCB2006_UP}
-{$ENDIF}
-
-{$IFDEF BCB10}
- {$DEFINE BCB}
- {$DEFINE BCB10_UP}
- {$DEFINE BCB7_UP}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB2006}
- {$DEFINE BCB2006_UP}
-{$ENDIF}
-
-{$IFDEF BCB7}
- {$DEFINE BCB}
- {$DEFINE BCB7_UP}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB6}
- {$DEFINE BCB}
- {$DEFINE BCB6_UP}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB5}
- {$DEFINE BCB}
- {$DEFINE BCB5_UP}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB4}
- {$DEFINE BCB}
- {$DEFINE BCB4_UP}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB3}
- {$DEFINE BCB}
- {$DEFINE BCB3_UP}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-{$IFDEF BCB1}
- {$DEFINE BCB}
- {$DEFINE BCB1_UP}
-{$ENDIF}
-
-// KYLIXX_UP from KYLIXX mappings
-
-{$IFDEF KYLIX3}
- {$DEFINE KYLIX}
- {$DEFINE KYLIX3_UP}
- {$DEFINE KYLIX2_UP}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-{$IFDEF KYLIX2}
- {$DEFINE KYLIX}
- {$DEFINE KYLIX2_UP}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-{$IFDEF KYLIX1}
- {$DEFINE KYLIX}
- {$DEFINE KYLIX1_UP}
-{$ENDIF}
-
-// BDSXX_UP from BDSXX mappings
-
-{$IFDEF BDS6}
- {$DEFINE BDS}
- {$DEFINE BDS6_UP}
- {$DEFINE BDS5_UP}
- {$DEFINE BDS4_UP}
- {$DEFINE BDS3_UP}
- {$DEFINE BDS2_UP}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-{$IFDEF BDS2008}
- {$DEFINE BDS2008_UP}
- {$DEFINE BDS2007_UP}
- {$DEFINE BDS2006_UP}
- {$DEFINE BDS2005_UP}
-{$ENDIF}
-
-{$IFDEF BDS5}
- {$DEFINE BDS}
- {$DEFINE BDS5_UP}
- {$DEFINE BDS4_UP}
- {$DEFINE BDS3_UP}
- {$DEFINE BDS2_UP}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-{$IFDEF BDS2007}
- {$DEFINE BDS2007_UP}
- {$DEFINE BDS2006_UP}
- {$DEFINE BDS2005_UP}
-{$ENDIF}
-
-{$IFDEF BDS4}
- {$DEFINE BDS}
- {$DEFINE BDS4_UP}
- {$DEFINE BDS3_UP}
- {$DEFINE BDS2_UP}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-{$IFDEF BDS2006}
- {$DEFINE BDS2006_UP}
- {$DEFINE BDS2005_UP}
-{$ENDIF}
-
-{$IFDEF BDS3}
- {$DEFINE BDS}
- {$DEFINE BDS3_UP}
- {$DEFINE BDS2_UP}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-{$IFDEF BDS2005}
- {$DEFINE BDS2005_UP}
-{$ENDIF}
-
-{$IFDEF BDS2}
- {$DEFINE BDS}
- {$DEFINE BDS2_UP}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-{$IFDEF BDS1}
- {$DEFINE BDS}
- {$DEFINE BDS1_UP}
-{$ENDIF}
-
-// COMPILERX_UP from COMPILERX mappings
-
-{$IFDEF COMPILER12}
- {$DEFINE COMPILER12_UP}
- {$DEFINE COMPILER11_UP}
- {$DEFINE COMPILER10_UP}
- {$DEFINE COMPILER9_UP}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER11}
- {$DEFINE COMPILER11_UP}
- {$DEFINE COMPILER10_UP}
- {$DEFINE COMPILER9_UP}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER10}
- {$DEFINE COMPILER10_UP}
- {$DEFINE COMPILER9_UP}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER9}
- {$DEFINE COMPILER9_UP}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER8}
- {$DEFINE COMPILER8_UP}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER7}
- {$DEFINE COMPILER7_UP}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER6}
- {$DEFINE COMPILER6_UP}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER5}
- {$DEFINE COMPILER5_UP}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER4}
- {$DEFINE COMPILER4_UP}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER35}
- {$DEFINE COMPILER35_UP}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER3}
- {$DEFINE COMPILER3_UP}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER2}
- {$DEFINE COMPILER2_UP}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-{$IFDEF COMPILER1}
- {$DEFINE COMPILER1_UP}
-{$ENDIF}
-
-// VCLXX_UP from VCLXX mappings
-
-{$IFDEF VCL71}
- {$DEFINE VCL71_UP}
- {$DEFINE VCL70_UP}
- {$DEFINE VCL60_UP}
- {$DEFINE VCL50_UP}
- {$DEFINE VCL40_UP}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL70}
- {$DEFINE VCL70_UP}
- {$DEFINE VCL60_UP}
- {$DEFINE VCL50_UP}
- {$DEFINE VCL40_UP}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL60}
- {$DEFINE VCL60_UP}
- {$DEFINE VCL50_UP}
- {$DEFINE VCL40_UP}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL50}
- {$DEFINE VCL50_UP}
- {$DEFINE VCL40_UP}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL40}
- {$DEFINE VCL40_UP}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL30}
- {$DEFINE VCL30_UP}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL20}
- {$DEFINE VCL20_UP}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-{$IFDEF VCL10}
- {$DEFINE VCL10_UP}
-{$ENDIF}
-
-// CLXXX_UP from CLXXX mappings
-
-{$IFDEF CLX10}
- {$DEFINE CLX10_UP}
-{$ENDIF}
-
-//------------------------
-
-{$ALIGN ON}
-{$BOOLEVAL OFF}
-
-{$ifdef COMPILER_7_UP}
- {$define THEME_7_UP} { Allows experimental theme support on pre-Delphi 7. }
-{$endif}
-
-{$IFDEF COMPILER_6_UP}
- {$WARN SYMBOL_PLATFORM OFF} { We are going to use Win32 specific symbols! }
-{$ENDIF}
-
-{$IFDEF COMPILER_7_UP}
- {$WARN UNSAFE_CODE OFF} { We are not going to be "safe"! }
- {$WARN UNSAFE_TYPE OFF}
- {$WARN UNSAFE_CAST OFF}
-{$ENDIF}
diff --git a/delphi/Awkward/utils/dbsettings.pas b/delphi/Awkward/utils/dbsettings.pas
deleted file mode 100644
index 05482e6..0000000
--- a/delphi/Awkward/utils/dbsettings.pas
+++ /dev/null
@@ -1,421 +0,0 @@
-unit dbsettings;
-interface
-
-uses windows,m_api;
-
-function DBReadByte (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte =0):byte;
-function DBReadWord (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:word =0):word;
-function DBReadDword(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
-
-function DBReadSetting (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-function DBReadSettingStr(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-
-function DBReadStringLength(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
-function DBReadString (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- default:PAnsiChar=nil;enc:integer=DBVT_ASCIIZ):PAnsiChar;
-function DBReadUTF8 (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
-function DBReadUnicode(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
-
-function DBReadStruct (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
-function DBWriteStruct(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
-
-function DBWriteSetting(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-function DBWriteByte (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:Byte ):Integer;
-function DBWriteWord (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:Word ):Integer;
-function DBWriteDWord(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):Integer;
-
-function DBWriteString (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- val:PAnsiChar;enc:integer=DBVT_ASCIIZ):Integer;
-function DBWriteUTF8 (hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):Integer;
-function DBWriteUnicode(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):Integer;
-
-function DBFreeVariant(dbv:PDBVARIANT):integer;
-function DBDeleteSetting(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar):Integer;
-function DBDeleteGroup(hContact:THANDLE;szModule:PAnsiChar):integer;
-function DBDeleteModule(szModule:PAnsiChar):integer; // 0.8.0+
-
-function DBGetSettingType(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
-
-implementation
-
-function DBReadByte(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:byte=0):byte;
-var
- dbv:TDBVARIANT;
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING,hContact,lParam(@cgs))<>0 then
- Result:=default
- else
- Result:=dbv.bVal;
-end;
-
-function DBReadWord(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:word=0):word;
-var
- dbv:TDBVARIANT;
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING,hContact,lParam(@cgs))<>0 then
- Result:=default
- else
- Result:=dbv.wVal;
-end;
-
-function DBReadDword(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:dword=0):dword;
-var
- dbv:TDBVARIANT;
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- If PluginLink^.CallService(MS_DB_CONTACT_GETSETTING,hContact,lParam(@cgs))<>0 then
- Result:=default
- else
- Result:=dbv.dVal;
-end;
-
-function DBReadSetting(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-var
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=dbv;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_GETSETTING,hContact,lParam(@cgs));
-end;
-
-function DBReadSettingStr(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-var
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=dbv;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,hContact,lParam(@cgs));
-end;
-
-function DBReadStringLength(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
-var
- cgs:TDBCONTACTGETSETTING;
- dbv:TDBVARIANT;
- i:integer;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- i:=PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,hContact,lParam(@cgs));
- if (i<>0) or (dbv.szVal.a=nil) or (dbv.szVal.a^=#0) then
- result:=0
- else
- result:=lstrlena(dbv.szVal.a);
- if i=0 then
- DBFreeVariant(@dbv);
-end;
-
-function DBReadString(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- default:PAnsiChar=nil;enc:integer=DBVT_ASCIIZ):PAnsiChar;
-var
- cgs:TDBCONTACTGETSETTING;
- dbv:TDBVARIANT;
- i:integer;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- dbv._type :=enc;
- i:=PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,hContact,lParam(@cgs));
- if i=0 then
- default:=dbv.szVal.a;
- if (default=nil) or (default^=#0) then
- result:=nil
- else
- begin
- result:=mmi.malloc(lstrlena(default)+1);
- if result<>nil then
- lstrcpya(result,default);
- end;
- if i=0 then
- DBFreeVariant(@dbv);
-end;
-
-function DBReadUTF8(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:PAnsiChar=nil):PAnsiChar;
-begin
- result:=DBReadString(hContact,szModule,szSetting,default,DBVT_UTF8);
-end;
-
-function DBReadUnicode(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;default:PWideChar=nil):PWideChar;
-var
- cgs:TDBCONTACTGETSETTING;
- dbv:TDBVARIANT;
- i:integer;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- cgs.pValue :=@dbv;
- dbv._type :=DBVT_WCHAR;
- i:=PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,hContact,lParam(@cgs));
- if i=0 then
- default:=dbv.szVal.w;
- if (default=nil) or (default^=#0) then
- result:=nil
- else
- begin
- result:=mmi.malloc((lstrlenw(default)+1)*SizeOf(WideChar));
- if result<>nil then
- lstrcpyw(result,default);
- end;
- if i=0 then
- DBFreeVariant(@dbv);
-end;
-
-function DBReadStruct(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
-var
- dbv:TDBVariant;
-begin
- dbv._type:=DBVT_BLOB;
- dbv.pbVal:=nil;
- if (DBReadSetting(0,szModule,szSetting,@dbv)=0) and
- (dbv.pbVal<>nil) and (dbv.cpbVal=size) then
- begin
- move(dbv.pbVal^,ptr^,size);
- DBFreeVariant(@dbv);
- result:=1;
- end
- else
- result:=0;
-end;
-
-function DBWriteStruct(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- ptr:pointer;size:dword):Integer;
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type :=DBVT_BLOB;
- cws.value.pbVal :=ptr;
- cws.value.cpbVal:=size;
- result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,0,lParam(@cws));
-end;
-
-function DBWriteSetting(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;dbv:PDBVARIANT):Integer;
-var
- cws: TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- move(dbv^,cws.value,SizeOf(TDBVARIANT));
- Result := PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING, hContact, lParam(@cws));
-end;
-
-function DBWriteByte(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:Byte):Integer;
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type:=DBVT_BYTE;
- cws.value.bVal :=Val;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws));
-end;
-
-function DBWriteWord(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:Word):Integer;
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type:=DBVT_WORD;
- cws.value.wVal :=Val;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws));
-end;
-
-function DBWriteDWord(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:dword):Integer;
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type:=DBVT_DWORD;
- cws.value.dVal :=Val;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws));
-end;
-
-function DBWriteString(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;
- val:PAnsiChar;enc:integer=DBVT_ASCIIZ):Integer;
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type :=enc;
- if val=nil then
- val:='';
- cws.value.szVal.a:=Val;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws));
-end;
-
-function DBWriteUTF8(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):Integer;
-begin
- result:=DBWriteString(hContact,szModule,szSetting,val,DBVT_UTF8);
-end;
-
-function DBWriteUnicode(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):Integer;
-begin
- result:=DBWriteString(hContact,szModule,szSetting,PAnsiChar(val),DBVT_WCHAR);
-{
-var
- cws:TDBCONTACTWRITESETTING;
-begin
- cws.szModule :=szModule;
- cws.szSetting :=szSetting;
- cws.value._type :=DBVT_WCHAR;
- cws.value.szVal.w:=Val;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,hContact,lParam(@cws));
-}
-end;
-
-function DBFreeVariant(dbv:PDBVARIANT):integer;
-begin
- Result:=PluginLink^.CallService(MS_DB_CONTACT_FREEVARIANT,0,lParam(dbv));
-end;
-
-function DBDeleteSetting(hContact:THandle;szModule:PAnsiChar;szSetting:PAnsiChar):Integer;
-var
- cgs:TDBCONTACTGETSETTING;
-begin
- cgs.szModule :=szModule;
- cgs.szSetting:=szSetting;
- Result:=PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING,hContact,lParam(@cgs));
-end;
-{
-type
- pdbenumrec = ^dbenumrec;
- dbenumrec = record
- num:integer;
- ptr:PAnsiChar;
- end;
-function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
-begin
- with pdbenumrec(lParam)^ do
- begin
- lstrcpya(ptr,szSetting);
- while ptr^<>#0 do inc(ptr);
- inc(ptr);
- inc(num);
- end;
- result:=0;
-end;
-// hContact = 0
-function DBDeleteGroup(hContact:THANDLE;szModule:PAnsiChar):integer;
-var
- ces:TDBCONTACTENUMSETTINGS;
- cgs:TDBCONTACTGETSETTING;
- p:PAnsiChar;
- rec:dbenumrec;
-begin
- GetMem(p,65520);
- rec.num :=0;
- rec.ptr :=p;
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.szModule :=szModule;
- ces.lParam :=integer(@rec);
- ces.ofsSettings:=0;
- result:=PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,dword(@ces));
- cgs.szModule :=szModule;
- rec.ptr:=p;
- with rec do
- while num>0 do
- begin
- dec(num);
- cgs.szSetting:=ptr;
- PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING,hContact,lParam(@cgs));
- while ptr^<>#0 do inc(ptr);
- inc(ptr);
- end;
- FreeMem(p);
-end;
-}
-type
- ppchar = ^pAnsiChar;
-
-function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
-begin
- lstrcpya(ppchar(lParam)^,szSetting);
- while ppchar(lParam)^^<>#0 do inc(ppchar(lParam)^);
- inc(ppchar(lParam)^);
- result:=0;
-end;
-function EnumSettingsProcCalc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
-begin
- inc(pdword(lParam)^,lstrlena(szSetting)+1);
- result:=0;
-end;
-// hContact = 0
-function DBDeleteGroup(hContact:THANDLE;szModule:PAnsiChar):integer;
-var
- ces:TDBCONTACTENUMSETTINGS;
- cgs:TDBCONTACTGETSETTING;
- p:PAnsiChar;
- num:integer;
- ptr:pAnsiChar;
-begin
- ces.szModule:=szModule;
- num:=0;
-
- ces.pfnEnumProc:=@EnumSettingsProcCalc;
- ces.lParam :=integer(@num);
- ces.ofsSettings:=0;
- PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,dword(@ces));
-
- GetMem(p,num+1);
- ptr:=p;
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.lParam :=integer(@ptr);
- ces.ofsSettings:=0;
- result:=PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,dword(@ces));
- ptr^:=#0;
-
- cgs.szModule:=szModule;
- ptr:=p;
- while ptr^<>#0 do
- begin
- cgs.szSetting:=ptr;
- PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING,hContact,lParam(@cgs));
- while ptr^<>#0 do inc(ptr);
- inc(ptr);
- end;
- FreeMem(p);
-end;
-
-function DBDeleteModule(szModule:PAnsiChar):integer; // 0.8.0+
-begin
- result:=0;
- PluginLink^.CallService(MS_DB_MODULE_DELETE,0,dword(szModule));
-end;
-
-function DBGetSettingType(hContact:THANDLE;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
-var
- ldbv:TDBVARIANT;
-begin
- if DBReadSetting(hContact,szModule,szSetting,@ldbv)=0 then
- begin
- result:=ldbv._type;
- DBFreeVariant(@ldbv);
- end
- else
- result:=DBVT_DELETED;
-end;
-
-begin
-end.
-
diff --git a/delphi/Awkward/utils/hotkeys.pas b/delphi/Awkward/utils/hotkeys.pas
deleted file mode 100644
index 738bd55..0000000
--- a/delphi/Awkward/utils/hotkeys.pas
+++ /dev/null
@@ -1,571 +0,0 @@
-{Hotkey and timer related functions}
-unit hotkeys;
-
-interface
-
-uses windows;
-
-type
- AWKHotKeyProc = function(hotkey:integer):integer;
-
-function AddProc(aproc:AWKHotKeyProc;ahotkey:integer;global:bool=false):integer; overload;
-function AddProc(ahotkey:integer;wnd:HWND;aproc:AWKHotKeyProc ):integer; overload;
-function AddProc(ahotkey:integer;wnd:HWND;msg:DWORD ):integer; overload;
-function DelProc(hotkey:integer ):integer; overload;
-function DelProc(hotkey:integer;wnd:HWND):integer; overload;
-
-procedure InitHotKeys;
-procedure FreeHotKeys;
-
-implementation
-
-uses messages;
-
-var
- CurThread:THANDLE;
-
-type
- PKBDLLHOOKSTRUCT = ^TKBDLLHOOKSTRUCT;
- TKBDLLHOOKSTRUCT = record
- vkCode :dword;
- scanCode :dword;
- flags :dword;
- time :dword;
- dwExtraInfo:dword;
- end;
-
-const
- WH_KEYBOARD_LL = 13;
- WM_MYMESSAGE = WM_USER +13;
-
-// const from commctrl module;
-const
- HOTKEYF_SHIFT = $01;
- HOTKEYF_CONTROL = $02;
- HOTKEYF_ALT = $04;
- HOTKEYF_EXT = $08;
-
-const
- hkAssigned = 1;
- hkGlobal = 2;
- hkMessage = 4;
-const
- kbHook:THANDLE=0;
- hiddenwindow:HWND=0;
- modifiers:dword=0;
-const
- PageStep = 10;
-type
- PHKRec = ^THKRec;
- THKRec = record
- proc :AWKHotKeyProc; // procedure
- flags :integer; // options
- handle:THANDLE; // thread or window?
- atom :TATOM; // hotkey id
- hotkey:integer; // hotkey
- end;
- PHKRecs = ^THKRecs;
- THKRecs = array [0..15] of THKRec;
-
-const
- NumRecs:integer=0;
- MaxRecs:integer=10;
- hkRecs:pHKRecs=nil;
-
-//----- simpler version of 'common' function -----
-
-const
- HexDigitChr: array [0..15] of AnsiChar = ('0','1','2','3','4','5','6','7',
- '8','9','A','B','C','D','E','F');
-
-function IntToHex(dst:PAnsiChar;Value:cardinal):PAnsiChar;
-var
- Digits:integer;
-begin
- dst[8]:=#0;
- Digits:=8;
- repeat
- Dec(Digits);
- dst[Digits]:=HexDigitChr[Value and $F];
- Value:=Value shr 4;
- until Digits=0;
- result:=dst;
-end;
-
-//----- utils -----
-
-function GetAtom(hotkey:dword):dword;
-const
- HKPrefix = 'awk_';
-var
- p:array [0..15] of AnsiChar;
-begin
- lstrcpya(p,HKPrefix);
- IntToHex(p+Length(HKPrefix),hotkey);
- result:=GlobalAddAtomA(p);
-end;
-
-function HotKeyDlgToHook(w:cardinal):cardinal; register;
-asm
- movzx ecx,al
- xor al,al
- test ah,HOTKEYF_ALT
- je @L1
- or al,MOD_ALT
-@L1:
- test ah,HOTKEYF_CONTROL
- je @L2
- or al,MOD_CONTROL
-@L2:
- test ah,HOTKEYF_SHIFT
- je @L3
- or al,MOD_SHIFT
-@L3:
- test ah,HOTKEYF_EXT
- je @L4
- or al,MOD_WIN
-@L4:
- mov ch,al
- mov eax,ecx
-{
-begin
- result:=w and $FF;
- if (w and (HOTKEYF_ALT shl 8))<>0 then result:=result or (MOD_ALT shl 8);
- if (w and (HOTKEYF_CONTROL shl 8))<>0 then result:=result or (MOD_CONTROL shl 8);
- if (w and (HOTKEYF_SHIFT shl 8))<>0 then result:=result or (MOD_SHIFT shl 8);
- if (w and (HOTKEYF_EXT shl 8))<>0 then result:=result or (MOD_WIN shl 8);
-}
-end;
-
-function HotKeyHookToDlg(w:cardinal):cardinal; register;
-asm
- movzx ecx,al
- xor al,al
- test ah,MOD_ALT
- je @L1
- or al,HOTKEYF_ALT
-@L1:
- test ah,MOD_CONTROL
- je @L2
- or al,HOTKEYF_CONTROL
-@L2:
- test ah,MOD_SHIFT
- je @L3
- or al,HOTKEYF_SHIFT
-@L3:
- test ah,MOD_WIN
- je @L4
- or al,HOTKEYF_EXT
-@L4:
- mov ch,al
- mov eax,ecx
-{
-begin
- result:=w and $FF;
- if (w and (MOD_ALT shl 8))<>0 then result:=result or (HOTKEYF_ALT shl 8);
- if (w and (MOD_CONTROL shl 8))<>0 then result:=result or (HOTKEYF_CONTROL shl 8);
- if (w and (MOD_SHIFT shl 8))<>0 then result:=result or (HOTKEYF_SHIFT shl 8);
- if (w and (MOD_WIN shl 8))<>0 then result:=result or (HOTKEYF_EXT shl 8);
-}
-end;
-
-//----- Hook -----
-
-function FindHotkey(keycode:integer;local:boolean):pointer;
-var
- i:integer;
- p:pHKRec;
-begin
- i:=NumRecs;
- p:=pointer(HKRecs);
- while i>0 do
- begin
- dec(i);
- with p^ do
- begin
- if (flags and hkAssigned)<>0 then
- begin
- if (local xor ((flags and hkGlobal)<>0)) then
- begin
- if hotkey=keycode then
- begin
- if handle<>0 then
- begin
- if GetFocus=handle then
- begin
- if (flags and hkMessage)<>0 then
- begin
- PostMessage(handle,dword(@proc),keycode,0);
- result:=pointer(-1);
- end
- else
- result:=@proc;
- exit;
- end;
- end
- else
- begin
- result:=@proc;
- exit;
- end;
- end;
- end;
- end;
- end;
- inc(p);
- end;
- result:=nil;
-end;
-
-function wmKeyboard_hook(code:integer;wParam:integer;lParam:longint):longint; stdcall;
-var
- key:dword;
- proc:pointer;
-begin
- if (code=HC_ACTION) and
- (lParam>0) and (LoWord(lParam)=1) then
- begin
- key:=0;
- if (GetKeyState(VK_SHIFT ) and $8000)<>0 then key:=key or (MOD_SHIFT shl 8);
- if (GetKeyState(VK_CONTROL) and $8000)<>0 then key:=key or (MOD_CONTROL shl 8);
- if (GetKeyState(VK_MENU ) and $8000)<>0 then key:=key or (MOD_ALT shl 8);
- if (GetKeyState(VK_LWIN ) and $8000)<>0 then key:=key or (MOD_WIN shl 8);
- if (GetKeyState(VK_RWIN ) and $8000)<>0 then key:=key or (MOD_WIN shl 8);
-// if (GetKeyState(VK_APPS) and $8000)<>0 then
-// if (GetKeyState(VK_SLEEP) and $8000)<>0 then
- key:=key or lo(wParam);
- proc:=FindHotkey(key,true);
- if proc<>nil then
- begin
- if integer(proc)<>-1 then
- PostMessageA(hiddenwindow,WM_MYMESSAGE,key,dword(proc));
- result:=1;
- exit;
- end;
- end;
- result:=CallNextHookEx(KbHook,code,wParam,lParam);
-end;
-
-function wmKeyboardLL_hook(code:integer;wParam:integer;lParam:integer):integer; stdcall;
-const
- lastkey:dword=0;
-var
- mask:dword;
- key:dword;
- proc:pointer;
-begin
- if code=HC_ACTION then
- begin
- case PKBDLLHOOKSTRUCT(lParam)^.vkCode of
- VK_MENU,
- VK_LMENU,
- VK_RMENU: mask:=MOD_ALT shl 8;
- VK_LWIN,
- VK_RWIN: mask:=MOD_WIN shl 8;
- VK_SHIFT,
- VK_LSHIFT,
- VK_RSHIFT: mask:=MOD_SHIFT shl 8;
- VK_CONTROL,
- VK_LCONTROL,
- VK_RCONTROL: mask:=MOD_CONTROL shl 8;
- else
- if (PKBDLLHOOKSTRUCT(lParam)^.flags and 128)=0 then
- begin
- // local only
-// maybe process will better choice?
- if //(lastkey=0) and
- (CurThread=GetWindowThreadProcessId(GetForegroundWindow,nil)) then
- begin
- key:=PKBDLLHOOKSTRUCT(lParam)^.vkCode or modifiers;
- proc:=FindHotkey(key,true);
- if proc<>nil then
- begin
- lastkey:=PKBDLLHOOKSTRUCT(lParam)^.vkCode;
- if integer(proc)<>-1 then
- PostMessageA(hiddenwindow,WM_MYMESSAGE,key,dword(proc));
- result:=1;
- exit;
- end;
- end;
- end
- else if (lastkey<>0) and (lastkey=PKBDLLHOOKSTRUCT(lParam)^.vkCode) then
- begin
- lastkey:=0;
- result :=1;
- exit;
- end;
- mask:=0;
- end;
- if mask<>0 then
- begin
- if (PKBDLLHOOKSTRUCT(lParam)^.flags and 128)=0 then
- modifiers:=modifiers or mask
- else
- modifiers:=modifiers and not mask;
- end
- end;
- result:=CallNextHookEx(KbHook,code,wParam,lParam);
-end;
-
-function HiddenWindProc(wnd:HWnd; msg,wParam,lParam:integer):integer; stdcall;
-var
- key:dword;
-begin
- if Msg=WM_HOTKEY then
- begin
- key:=(lParam shr 16)+(Lo(lParam) shl 8);
- result:=dword(FindHotKey(key,false));
- if result<>0 then
- begin
- result:=AWKHotKeyProc(result)(HotkeyHookToDlg(key));
- exit;
- end;
- end
- else if Msg=WM_MYMESSAGE then
- begin
- result:=AWKHotKeyProc(lParam)(HotkeyHookToDlg(wParam));
- exit;
- end;
- result:=DefWindowProcA(wnd,msg,wparam,lparam);
-end;
-
-procedure DestroyHiddenWindow;
-begin
- if hiddenwindow<>0 then
- begin
- DestroyWindow(hiddenwindow);
- hiddenwindow:=0;
- end;
-end;
-
-procedure CreateHiddenWindow;
-var
- wnd:HWND;
-begin
- if hiddenwindow=0 then
- begin
- wnd:=CreateWindowExA(0,'STATIC',nil,0,
- 1,1,1,1,dword(HWND_MESSAGE),0,hInstance,nil);
- if wnd<>0 then
- begin
- SetWindowLongA(wnd,GWL_WNDPROC,dword(@HiddenWindProc));
- hiddenwindow:=wnd;
- end
- end
-end;
-//----- interface -----
-
-function CheckTable(ahotkey:integer;global:bool):integer;
-var
- tmp:pHKRecs;
- i:integer;
- p:pHKRec;
-begin
- if HKRecs=nil then
- begin
- MaxRecs:=PageStep;
- GetMem (HKRecs ,MaxRecs*SizeOf(THKRec));
- FillChar(HKRecs^,MaxRecs*SizeOf(THKRec),0);
- NumRecs:=0;
- end;
- // search existing
- i:=0;
- p:=pointer(HKRecs);
- while i<NumRecs do
- begin
- if (p^.flags and hkAssigned)<>0 then
- begin
- if (p^.hotkey=ahotkey) and
- (((p^.flags and hkGlobal)<>0) xor not global) then
- break;
- end;
- inc(p);
- inc(i);
- end;
- //search empty
- if i=NumRecs then
- begin
- i:=0;
- p:=pointer(HKRecs);
- while i<NumRecs do
- begin
- if (p^.flags and hkAssigned)=0 then
- break;
- inc(p);
- inc(i);
- end;
- end;
- if i=NumRecs then // allocate if not found
- begin
- if NumRecs=MaxRecs then
- begin
- inc(MaxRecs,PageStep);
- GetMem (tmp ,MaxRecs*SizeOf(THKRec));
- FillChar(tmp^,MaxRecs*SizeOf(THKRec),0);
- move(HKRecs^,tmp^,NumRecs*SizeOf(THKRec));
- FreeMem(HKRecs);
- HKRecs:=tmp;
- end;
- inc(NumRecs);
- end;
- if global then
- HKRecs^[i].flags:=hkAssigned or hkGlobal
- else
- HKRecs^[i].flags:=hkAssigned;
- HKRecs^[i].hotkey:=HotKeyDlgToHook(ahotkey);
- result:=i;
-end;
-
-function AddProc(aproc:AWKHotKeyProc;ahotkey:integer;global:bool=false):integer;
-begin
- result:=1;
- if @aproc=nil then exit;
-
- with HKRecs^[CheckTable(ahotkey,global)] do
- begin
- proc :=aproc;
- handle:=0;
- if global then
- begin
- atom:=GetAtom(hotkey);
- if not RegisterHotKey(hiddenwindow,atom,hi(hotkey),lo(hotkey)) then
- result:=0;
- end;
- end;
-end;
-
-// search needed
-function AddProcWin(ahotkey:integer;wnd:HWND):integer;
-begin
- result:=CheckTable(ahotkey,false);
- with HKRecs^[result] do
- begin
- handle:=wnd;
- end;
-end;
-
-function AddProc(ahotkey:integer;wnd:HWND;aproc:AWKHotKeyProc):integer;
-begin
- if @aproc=nil then
- begin
- result:=0;
- exit;
- end;
-
- result:=AddProcWin(ahotkey,wnd);
- if result<0 then
- result:=0
- else
- begin
- HKRecs^[result].proc:=@aproc;
- end;
-end;
-
-function AddProc(ahotkey:integer;wnd:HWND;msg:DWORD):integer;
-begin
- result:=AddProcWin(ahotkey,wnd);
- if result<0 then
- result:=0
- else
- begin
- HKRecs^[result].flags:=HKRecs^[result].flags or hkMessage;
- HKRecs^[result].proc :=pointer(msg);
- end;
-end;
-
-function DelProc(hotkey:integer):integer;
-var
- i:integer;
- p:pHKRec;
-begin
- hotkey:=HotKeyDlgToHook(hotkey); //!!
- p:=pointer(HKRecs);
- i:=NumRecs;
- while i>0 do
- begin
- dec(i);
- if ((p^.flags and hkAssigned)<>0) and (p^.handle=0) then
- if p^.hotkey=hotkey then
- begin
- if (p^.flags and hkGlobal)<>0 then
- begin
- UnregisterHotKey(hiddenwindow,p^.atom);
- GlobalDeleteAtom(p^.atom);
- end;
- p^.flags:=p^.flags and not hkAssigned;
- result:=i;
- exit;
- end;
- inc(p);
- end;
- result:=0;
-end;
-
-function DelProc(hotkey:integer;wnd:HWND):integer;
-var
- i:integer;
- p:pHKRec;
-begin
- hotkey:=HotKeyDlgToHook(hotkey); //!!
- p:=pointer(HKRecs);
- i:=NumRecs;
- while i>0 do
- begin
- dec(i);
- if (p^.flags and hkAssigned)<>0 then
- if (p^.handle=wnd) {and ((p^.flags and hkGlobal)=0)} then
- begin
- if (hotkey=0) or (hotkey=p^.hotkey) then
- begin
- p^.flags:=p^.flags and not hkAssigned;
- result:=i;
- exit;
- end;
- end;
- inc(p);
- end;
- result:=0;
-end;
-
-procedure InitHotKeys;
-begin
- MaxRecs:=10;
- GetMem(HKRecs,SizeOf(THKRec)*MaxRecs);
- FillChar(HKRecs^,SizeOf(THKRec)*MaxRecs,0);
- NumRecs:=0;
- CreateHiddenWindow;
- kbhook:=SetWindowsHookExA(WH_KEYBOARD_LL,@wmKeyboardLL_hook,hInstance,0);
-
- if KbHook=0 then
- KbHook:=SetWindowsHookExA(WH_KEYBOARD,@wmKeyboard_hook,0,GetCurrentThreadId);
-end;
-
-procedure FreeHotKeys;
-var
- i:integer;
- p:pHKRec;
-begin
- i:=NumRecs;
- p:=pointer(HKRecs);
- while i>0 do
- begin
- dec(i);
- if (p^.flags and (hkAssigned or hkGlobal))=(hkAssigned or hkGlobal) then
- begin
- UnregisterHotKey(hiddenwindow,p^.atom);
- GlobalDeleteAtom(p^.atom);
- end;
- inc(p);
- end;
- DestroyHiddenWindow;
- if kbhook<>0 then
- UnhookWindowsHookEx(kbhook);
- FreeMem(HKRecs);
- HKRecs:=nil;
- MaxRecs:=0;
- NumRecs:=0;
-end;
-
-initialization
- CurThread:=GetCurrentThreadId();
-end. \ No newline at end of file
diff --git a/delphi/Awkward/utils/ini.pas b/delphi/Awkward/utils/ini.pas
deleted file mode 100644
index 7c1e50d..0000000
--- a/delphi/Awkward/utils/ini.pas
+++ /dev/null
@@ -1,857 +0,0 @@
-unit INI;
-
-interface
-
-uses windows;
-
-{+}function SetStorage(name:PAnsiChar;inINI:boolean):cardinal;
-{+}procedure FreeStorage(aHandle:cardinal);
-
-{+}procedure SetDefaultSection(aHandle:cardinal;name:PAnsiChar);
-{+}procedure SetCurrentSection(aHandle:cardinal;sect:PAnsiChar);
-
-{+}procedure FlushSettings(aHandle:cardinal);
-{+}procedure FlushSection(aHandle:cardinal);
-
-{+}procedure WriteNCInt(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;value:integer);
-{+}procedure WriteNCStr(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;value:PAnsiChar);
-
-{+}procedure WriteNCStruct(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;ptr:pointer;size:integer);
-{*}procedure WriteStruct(aHandle:cardinal;param:PAnsiChar;ptr:pointer;size:integer);
-{+}function ReadStruct (aHandle:cardinal;param:PAnsiChar;ptr:pointer;size:integer):boolean;
-
-{+}procedure WriteFlag(aHandle:cardinal;param:PAnsiChar;value:integer);
-{+}procedure WriteInt (aHandle:cardinal;param:PAnsiChar;value:integer);
-{+}procedure WriteStr (aHandle:cardinal;param:PAnsiChar;value:PWideChar);
-procedure WriteAnsiStr(aHandle:cardinal;param:PAnsiChar;value:PAnsiChar);
-{+}function ReadFlag(aHandle:cardinal;param:PAnsiChar; default:integer):integer;
-{+}function ReadInt (aHandle:cardinal;param:PAnsiChar; default:integer):integer;
-procedure ReadStr (aHandle:cardinal;var dst:PWideChar;param:PAnsiChar;default:PWideChar);
-procedure ReadAnsiStr(aHandle:cardinal;var dst:PAnsiChar;param:PAnsiChar;default:PAnsiChar);
-
-procedure WriteSect(aHandle:cardinal;src:PAnsiChar);
-procedure ReadSect (aHandle:cardinal;var dst:PAnsiChar);
-
-{*}procedure ClearSection(aHandle:cardinal);
-{+}procedure DeleteParam(aHandle:cardinal;param:PAnsiChar);
-
-implementation
-
-uses common,io,m_api,dbsettings;
-
-type
- PStorage = ^TStorage;
- TStorage = record
- SName :PAnsiChar;
- SType :bool;
- SHandle :THANDLE;
- DefSection:PAnsiChar;
- Section :Array [0..127] of AnsiChar;
- ParOffset :integer;
- Buffer :PAnsiChar;
- INIBuffer :PAnsiChar;
- end;
- PStHeap = ^TStHeap;
- TStHeap = array [0..10] of TStorage;
-
-const
- Storage:PStHeap=nil;
- NumStorage:cardinal=0;
-
-type
- pbrec=^brec;
- brec=record
- ptr:PAnsiChar;
- handle:cardinal;
- end;
-
-const
- DefDefSection:PAnsiChar = 'default';
-
-{+}function SetStorage(name:PAnsiChar;inINI:boolean):cardinal;
-var
- i:integer;
- tmp:PStHeap;
-begin
- if Storage=nil then
- begin
- mGetMem(Storage,SizeOf(TStorage));
- FillChar(Storage^,SizeOf(TStorage),0);
- NumStorage:=1;
- result:=0;
- end
- else
- begin
- integer(result):=-1;
- for i:=0 to NumStorage-1 do
- begin
- if Storage^[i].SName=nil then // free cell
- begin
- result:=i;
- break;
- end;
- end;
- if integer(result)<0 then
- begin
- mGetMem(tmp,SizeOf(TStorage)*(NumStorage+1));
- move(Storage^,tmp^,SizeOf(TStorage)*NumStorage);
- mFreeMem(Storage);
- Storage:=tmp;
- FillChar(Storage^[NumStorage],SizeOf(TStorage),0);
- result:=NumStorage;
- inc(NumStorage);
- end
- end;
- with Storage^[result] do
- begin
- StrDup(SName,name);
- SType:=inINI;
- end;
-end;
-
-{+}procedure FreeStorage(aHandle:cardinal);
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- begin
- mFreeMem(SName);
- mFreeMem(DefSection);
- mFreeMem(Buffer);
- mFreeMem(INIBuffer);
- end;
-end;
-
-{+}procedure WriteNCStruct(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;ptr:pointer;size:integer);
-var
- cws:TDBCONTACTWRITESETTING;
- pn:array [0..127] of AnsiChar;
- i:integer;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- if (sect=nil) or (sect^=#0) then
- sect:=DefSection;
- if sect=nil then
- sect:=DefDefSection;
- WritePrivateProfileStructA(sect,param,ptr,size,SName);
- end
- else
- begin
- if (sect<>nil) and (sect^<>#0) then
- begin
- i:=StrLen(sect);
- move(sect^,pn,i);
- pn[i]:='/';
- inc(i);
- end
- else
- i:=0;
- StrCopy(pn+i,param);
- cws.szModule :=SName;
- cws.szSetting :=pn;
- cws.value._type :=DBVT_BLOB;
- cws.value.pbVal :=ptr;
- cws.value.cpbVal:=size;
- PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,0,lParam(@cws));
- end
-end;
-
-{*}procedure WriteStruct(aHandle:cardinal;param:PAnsiChar;ptr:pointer;size:integer);
-const
- hex:array [0..15] of AnsiChar = '0123456789ABCDEF';
-var
- lptr:PAnsiChar;
- buf,buf1:PAnsiChar;
- i:integer;
- crc:integer;
- cws:TDBCONTACTWRITESETTING;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- mGetMem(buf,(size+1)*2);
- crc:=0;
- buf1:=buf;
- for i:=0 to size-1 do
- begin
- inc(crc,PByte(ptr)^);
- buf1^ :=hex[pbyte(ptr)^ shr 4];
- (buf1+1)^:=hex[pbyte(ptr)^ and $0F];
- inc(buf1,2);
- inc(pbyte(ptr));
- end;
- buf1^ :=hex[(crc and $FF) shr 4];
- (buf1+1)^:=hex[(crc and $0F)];
-
- StrCat(Buffer,param);
- lptr:=StrEnd(Buffer);
- lptr^:='=';
- inc(lptr);
- move(buf^,lptr^,(size+1)*2);
- mFreeMem(buf);
- inc(lptr,(size+1)*2);
- lptr^ :=#13;
- (lptr+1)^:=#10;
- (lptr+2)^:=#0;
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- cws.szModule :=SName;
- cws.szSetting :=Section;
- cws.value._type :=DBVT_BLOB;
- cws.value.pbVal :=ptr;
- cws.value.cpbVal:=size;
- PluginLink^.CallService(MS_DB_CONTACT_WRITESETTING,0,lParam(@cws));
- end
-end;
-
-{+}function ReadStruct(aHandle:cardinal;param:PAnsiChar;ptr:pointer;size:integer):boolean;
-var
- dbv:TDBVariant;
-begin
- if aHandle>=NumStorage then
- begin
- result:=false;
- exit;
- end;
- with Storage^[aHandle] do
- if SType then
- begin
- result:=GetPrivateProfileStructA(Section,param,ptr,size,SName);
- end
- else
- begin
- dbv._type:=DBVT_BLOB;
- dbv.pbVal:=nil;
- StrCopy(Section+ParOffset,param);
- if (DBReadSetting(0,SName,Section,@dbv)=0) and
- (dbv.pbVal<>nil) and (dbv.cpbVal=size) then
- begin
- move(dbv.pbVal^,ptr^,size);
- DBFreeVariant(@dbv);
- result:=true;
- end
- else
- result:=false;
- end
-end;
-
-{+}procedure WriteNCInt(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;value:integer);
-var
- pn:array [0..127] of AnsiChar;
- i:integer;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if Stype then
- begin
- if (sect=nil) or (sect^=#0) then
- sect:=DefSection;
- if sect=nil then
- sect:=DefDefSection;
- WritePrivateProfileStringA(sect,param,IntToStr(pn,value),SName);
- end
- else
- begin
- if (sect<>nil) and (sect^<>#0) then
- begin
- i:=StrLen(sect);
- move(sect^,pn,i);
- pn[i]:='/';
- inc(i);
- end
- else
- i:=0;
- StrCopy(pn+i,param);
- DBWriteDWord(0,SName,pn,value)
- end
-end;
-
-{+}procedure WriteNCStr(aHandle:cardinal;sect:PAnsiChar;param:PAnsiChar;value:PAnsiChar);
-var
- pn:array [0..127] of AnsiChar;
- i:integer;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- if (sect=nil) or (sect^=#0) then
- sect:=DefSection;
- if sect=nil then
- sect:=DefDefSection;
- WritePrivateProfileStringA(sect,param,value,SName);
- end
- else
- begin
- if (sect<>nil) and (sect^<>#0) then
- begin
- i:=StrLen(sect);
- move(sect^,pn,i);
- pn[i]:='/';
- inc(i);
- end
- else
- i:=0;
- StrCopy(pn+i,param);
- DBWriteString(0,SName,pn,value);
- end
-end;
-
-{+}procedure SetDefaultSection(aHandle:cardinal;name:PAnsiChar);
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- begin
- mFreeMem(DefSection);
- StrDup(DefSection,name);
- end;
-end;
-
-{+}procedure SetCurrentSection(aHandle:cardinal;sect:PAnsiChar);
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- begin
- if sect=nil then
- sect:=DefSection;
- if sect=nil then
- sect:='';
- if SType then
- begin
- if (sect=nil) or (sect^=#0) then
- sect:=DefDefSection;
- StrCopy(Section,sect);
- mGetMem(Buffer,16384);
- Buffer^ :=#13;
- (Buffer+1)^:=#10;
- (Buffer+2)^:=#0;
- end
- else
- begin
- if sect<>nil then
- begin
- StrCopy(Section,sect);
- ParOffset:=StrLen(Section);
- Section[ParOffset]:='/';
- inc(ParOffset);
- end
- else
- ParOffset:=0;
- end
- end;
-end;
-
-{+}procedure FlushSettings(aHandle:cardinal);
-var
- size:integer;
- ptr:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- begin
- if SType then
- begin
- if INIBuffer=nil then
- exit;
- ptr:=INIBuffer+1;
- size:=StrLen(ptr);
- seek(SHandle,0);
- BlockWrite(SHandle,ptr^,size);
- SetEndOfFile(SHandle);
- mFreeMem(INIBuffer);
- CloseHandle(SHandle);
- end;
- end;
-end;
-
-{+}procedure FlushSection(aHandle:cardinal);
-var
- size,i:integer;
- sect:array [0..127] of AnsiChar;
- ptr1,ptr:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- if INIBuffer=nil then
- begin
- mGetMem(INIBuffer,32768);
- INIBuffer[0]:=#10;
- SHandle:=Reset(SName);
- if dword(SHandle)=INVALID_HANDLE_VALUE then
- INIBuffer[1]:=#0
- else
- begin
- size:=FileSize(SHandle);
- INIBuffer[size+1]:=#0;
- BlockRead(SHandle,(INIBuffer+1)^,size);
- CloseHandle(SHandle);
- end;
- SHandle:=ReWrite(SName);
- end;
- // construct section name
- sect[0]:=#10;
- sect[1]:='[';
- size:=StrLen(Section);
- move(Section,sect[2],size);
- sect[size+2]:=']';
- sect[size+3]:=#0;
- // search section
- ptr:=StrPos(INIBuffer,sect);
- // delete section
- if ptr<>nil then
- begin
- ptr1:=ptr;
-//!! inc(ptr);
- while (ptr^<>#0) and ((ptr^<>#10) or ((ptr+1)^<>'[')) do inc(ptr);
- if ptr^<>#0 then
- StrCopy(ptr1,ptr+1)
- else
- ptr1^:=#0;
- end;
- // append section
- if (Buffer<>nil) and (StrLen(Buffer)>0) then
- begin
- i:=StrLen(INIBuffer);
- if INIBuffer[i-1]<>#10 then
- begin
- INIBuffer[i] :=#13;
- INIBuffer[i+1]:=#10;
- inc(i,2);
- end;
- StrCopy(INIBuffer+i,sect+1);
- StrCat(INIBuffer,Buffer);
- end;
- mFreeMem(Buffer);
- end;
-end;
-
-{+}procedure WriteFlag(aHandle:cardinal;param:PAnsiChar;value:integer);
-var
- ptr:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- StrCat(Buffer,param);
- ptr:=StrEnd(Buffer);
- ptr^:='=';
- (ptr+1)^:=CHR((value and 1)+ORD('0'));
- inc(ptr,2);
- ptr^ :=#13;
- (ptr+1)^:=#10;
- (ptr+2)^:=#0;
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- DBWriteByte(0,SName,Section,value)
- end;
-end;
-
-{+}procedure WriteInt(aHandle:cardinal;param:PAnsiChar;value:integer);
-var
- ptr:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- StrCat(Buffer,param);
- ptr:=StrEnd(Buffer);
- ptr^:='=';
- IntToStr(ptr+1,value);
- ptr:=StrEnd(Buffer);
- ptr^ :=#13;
- (ptr+1)^:=#10;
- (ptr+2)^:=#0;
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- DBWriteDWord(0,SName,Section,value)
- end;
-end;
-
-procedure WriteStrInt(aHandle:cardinal;param:PAnsiChar;value:pointer;wide:bool);
-var
- buf:array [0..2047] of AnsiChar;
- ptr:PAnsiChar;
- lval:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- begin
- StrCat(Buffer,param);
- ptr:=StrEnd(Buffer);
- ptr^:='=';
- inc(ptr);
- if (value<>nil) then
- begin
- buf[0]:=#0;
- if wide then
- begin
- if PWideChar(value)^<>#0 then
- begin
- WideToUTF8(value,lval);
- StrCopy(buf,lval,SizeOf(buf)-1);
- mFreeMem(lval);
- end
- end
- else if PAnsiChar(value)^<>#0 then
- StrCopy(buf,value,SizeOf(buf)-1);
- if buf[0]<>#0 then
- begin
- Escape(buf);
- StrCopy(ptr,buf);
- ptr:=StrEnd(Buffer);
- end;
- end;
- ptr^ :=#13;
- (ptr+1)^:=#10;
- (ptr+2)^:=#0;
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- if wide then
- DBWriteUnicode(0,SName,Section,value)
- else
- DBWriteString(0,SName,Section,value)
- end;
-end;
-
-{+}procedure WriteStr(aHandle:cardinal;param:PAnsiChar;value:PWideChar);
-begin
- WriteStrInt(aHandle,param,value,true);
-end;
-
-{+}procedure WriteAnsiStr(aHandle:cardinal;param:PAnsiChar;value:PAnsiChar);
-begin
- WriteStrInt(aHandle,param,value,false);
-end;
-
-{+}function ReadFlag(aHandle:cardinal; param:PAnsiChar; default:integer):integer;
-begin
- if aHandle>=NumStorage then
- begin
- result:=default;
- exit;
- end;
- with Storage^[aHandle] do
- if SType then
- begin
- result:=GetPrivateProfileIntA(Section,param,default,SName)
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- result:=DBReadByte(0,SName,Section,default)
- end;
-end;
-
-{+}function ReadInt(aHandle:cardinal; param:PAnsiChar; default:integer):integer;
-begin
- if aHandle>=NumStorage then
- begin
- result:=default;
- exit;
- end;
- with Storage^[aHandle] do
- if SType then
- begin
- result:=GetPrivateProfileIntA(Section,param,default,SName)
- end
- else
- begin
- StrCopy(Section+ParOffset,param);
- result:=DBReadDWord(0,SName,Section,default)
- end;
-end;
-
-procedure ReadStrInt(aHandle:cardinal;var dst;param:PAnsiChar;default:pointer;wide:bool);
-
- function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
- var
- p:pbrec;
- i:integer;
- begin
- p:=pbrec(lparam);
- if StrCmp(Storage^[p^.handle].Section,szSetting,Storage^[p^.handle].ParOffset)=0 then
- begin
- i:=StrLen(szSetting)+1;
- move(szSetting^,p^.ptr^,i);
- inc(p^.ptr,i);
- end;
- result:=0;
- end;
-
-var
- buf:array [0..4095] of AnsiChar;
- p:brec;
- ces:TDBCONTACTENUMSETTINGS;
- def:PAnsiChar;
- i:integer;
-begin
- if aHandle>=NumStorage then
- begin
- if wide then
- StrDupW(pWideChar(dst),pWideChar(default))
- else
- StrDup(PAnsiChar(dst),PAnsiChar(default));
- exit;
- end;
- with Storage^[aHandle] do
- if SType then
- begin
- if wide then
- begin
- if default=nil then
- StrDup(def,'')
- else
- WideToUTF8(default,def);
- end
- else
- begin
- if default=nil then
- def:=''
- else
- def:=default;
- end;
- i:=GetPrivateProfileStringA(Section,param,def,buf,4095,SName)+1;
- mFreeMem(def);
- if param<>nil then
- begin
- if buf[0]<>#0 then
- begin
- Unescape(buf);
- if wide then
- UTF8ToWide(buf,pWideChar(dst))
- else
- StrDup(PAnsiChar(dst),buf);
- end
- else
- PAnsiChar(dst):=nil;
- end
- else //!! full section
- begin
- mGetMem(dst,i);
- move(buf,PAnsiChar(dst)^,i);
- buf[i-1]:=#0;
- end;
- end
- else
- begin
- if param<>nil then
- begin
- StrCopy(Section+ParOffset,param);
- if wide then
- pWideChar(dst):=DBReadUnicode(0,SName,Section,pWideChar(default))
- else
- PAnsiChar(dst):=DBReadString(0,SName,Section,PAnsiChar(default));
- end
- else
- begin
- p.ptr:=@buf;
- p.handle:=aHandle;
- FillChar(buf,SizeOf(buf),0);
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.lParam :=dword(@p);
- ces.szModule :=SName;
- ces.ofsSettings:=0;
- PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,0,dword(@ces));
- mGetMem(dst,p.ptr-@buf+1);
- move(buf,PAnsiChar(dst)^,p.ptr-@buf+1);
- end;
- end;
-end;
-
-procedure ReadStr(aHandle:cardinal;var dst:PWideChar;param:PAnsiChar;default:PWideChar);
-begin
- ReadStrInt(aHandle,dst,param,default,true);
-end;
-
-procedure ReadAnsiStr(aHandle:cardinal;var dst:PAnsiChar;param:PAnsiChar;default:PAnsiChar);
-begin
- ReadStrInt(aHandle,dst,param,default,false);
-end;
-
-{*}procedure ClearSection(aHandle:cardinal);
-
- function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
- var
- db:TDBCONTACTGETSETTING;
- begin
- with Storage^[lParam] do
- begin
- db.szModule:=SName;
- StrCopy(Section+ParOffset,szSetting);
- db.szSetting:=Section;
- end;
- PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING,0,dword(@db));
- result:=0;
- end;
-
-var
- ces:TDBCONTACTENUMSETTINGS;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- WritePrivateProfileStringA(Section,nil,nil,SName)
- else
- begin
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.lParam :=aHandle;
- ces.szModule :=SName;
- ces.ofsSettings:=0;
- PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,0,dword(@ces));
- end;
-end;
-
-{*}procedure WriteSect(aHandle:cardinal;src:PAnsiChar);
-var
- p:PAnsiChar;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- if SType then
- WritePrivateProfileSectionA(Section,src,SName)
- else
- begin
- ClearSection(aHandle);
- while src^<>#0 do
- begin
- // write as strings
- p:=src;
- while src^<>'=' do inc(src);
- inc(src);
- DBWriteString(0,SName,p,src);
- while src^<>#0 do inc(src);
- inc(src);
- end;
- end;
-end;
-
-procedure ReadSect(aHandle:cardinal;var dst:PAnsiChar);
-
- function EnumSettingsProc(const szSetting:PAnsiChar;lParam:LPARAM):int; cdecl;
- var
- dbv:TDBVariant;
- i:integer;
- p:pbrec;
- buf:array [0..31] of AnsiChar;
- begin
- result:=1;
-
- p:=pbrec(lparam);
- if (DBReadSetting(0,Storage^[p^.handle].Section,szSetting,@dbv)=0) then
- begin
- i:=StrLen(szSetting);
- move(szSetting^,p^.ptr^,i);
- inc(p^.ptr,i);
- p^.ptr^:='=';
- case dbv._type of
- DBVT_ASCIIZ: begin
- if dbv.szVal.a<>nil then
- begin
- i:=StrLen(dbv.szVal.a)+1;
- move(dbv.szVal.a^,(p^.ptr+1)^,i);
- DBFreeVariant(@dbv);
- end
- end;
- DBVT_BYTE,DBVT_WORD,DBVT_DWORD: begin
- case dbv._type of
- DBVT_BYTE : i:=dbv.bVal;
- DBVT_WORD : i:=dbv.wVal;
- DBVT_DWORD: i:=dbv.dVal;
- end;
- i:=StrLen(IntToStr(buf,i))+1;
- move(buf,(p^.ptr+1)^,i);
- end;
- else
- exit;
- end;
- inc(p^.ptr,i{+1});
- end;
- end;
-
-var
- buf:array [0..16383] of AnsiChar;
- p:brec;
- ces:TDBCONTACTENUMSETTINGS;
- i:integer;
-begin
- if aHandle>=NumStorage then
- begin
- dst:=nil;
- exit;
- end;
- with Storage^[aHandle] do
- begin
- if SType then
- begin
- i:=GetPrivateProfileSectionA(Section,buf,SizeOf(buf),SName)+1;
- end
- else
- begin
- p.ptr:=@buf;
- p.handle:=aHandle;
- FillChar(buf,SizeOf(buf),0);
-
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.lParam :=dword(@p);
- ces.szModule :=SName;
- ces.ofsSettings:=0;
- PluginLink^.CallService(MS_DB_CONTACT_ENUMSETTINGS,0,dword(@ces));
- i:=p.ptr-@buf+1;
- end;
- mGetMem(dst,i);
- move(buf,dst^,i);
- buf[i-1]:=#0;
- end;
-end;
-
-{+}procedure DeleteParam(aHandle:cardinal;param:PAnsiChar);
-var
- db:TDBCONTACTGETSETTING;
-begin
- if aHandle>=NumStorage then
- exit;
- with Storage^[aHandle] do
- begin
- if SType then
- WritePrivateProfileStringA(Section,param,nil,SName)
- else
- begin
- StrCopy(Section+ParOffset,param);
- db.szModule :=SName;
- db.szSetting:=Section;
- PluginLink^.CallService(MS_DB_CONTACT_DELETESETTING,0,dword(@db));
- end;
- end;
-end;
-
-end.
diff --git a/delphi/Awkward/utils/io.pas b/delphi/Awkward/utils/io.pas
deleted file mode 100644
index aedbfeb..0000000
--- a/delphi/Awkward/utils/io.pas
+++ /dev/null
@@ -1,249 +0,0 @@
-unit IO;
-
-interface
-uses windows;
-
-function Reset (fname:PWideChar):THANDLE; overload;
-function Reset (fname:PAnsiChar):THANDLE; overload;
-function ReWrite(fname:PWideChar):THANDLE; overload;
-function ReWrite(fname:PAnsiChar):THANDLE; overload;
-function Append (fname:PWideChar):THANDLE; overload;
-function Append (fname:PAnsiChar):THANDLE; overload;
-
-function GetFSize(name:PWideChar):dword; overload;
-function GetFSize(name:PAnsiChar):dword; overload;
-function FileExists(fname:PAnsiChar):Boolean; overload;
-function FileExists(fname:PWideChar):Boolean; overload;
-
-function Skip(f:THANDLE;count:integer):integer;
-function Seek(f:THANDLE;pos:integer):integer;
-function FilePos(f:THANDLE):dword;
-function FileSize(f:THANDLE):dword;
-function Eof(f:THANDLE):boolean;
-
-function BlockRead (f:THANDLE;var buf;size:integer):dword;
-function BlockWrite(f:THANDLE;var buf;size:integer):dword;
-
-function ForceDirectories(path:PAnsiChar):boolean; overload;
-function ForceDirectories(path:PWideChar):boolean; overload;
-function DirectoryExists(Directory:PAnsiChar):Boolean; overload;
-function DirectoryExists(Directory:PWideChar):Boolean; overload;
-
-implementation
-
-function Reset(fname:PWideChar):THANDLE;
-begin
- result:=CreateFileW(fname,GENERIC_READ,FILE_SHARE_READ+FILE_SHARE_WRITE,nil,OPEN_EXISTING,0,0);
-end;
-
-function Reset(fname:PAnsiChar):THANDLE;
-begin
- result:=CreateFileA(fname,GENERIC_READ,FILE_SHARE_READ+FILE_SHARE_WRITE,nil,OPEN_EXISTING,0,0);
-end;
-
-function Append(fname:PWideChar):THANDLE;
-begin
- result:=CreateFileW(fname,GENERIC_WRITE,FILE_SHARE_READ,nil,OPEN_ALWAYS,0,0);
- SetFilePointer(result,0,nil,FILE_END);
-end;
-
-function Append(fname:PAnsiChar):THANDLE;
-begin
- result:=CreateFileA(fname,GENERIC_WRITE,FILE_SHARE_READ,nil,OPEN_ALWAYS,0,0);
- SetFilePointer(result,0,nil,FILE_END);
-end;
-
-function ReWrite(fname:PWideChar):THANDLE; overload;
-begin
- result:=CreateFileW(fname,GENERIC_WRITE,FILE_SHARE_READ,nil,CREATE_ALWAYS,0,0);
-end;
-
-function ReWrite(fname:PAnsiChar):THANDLE; overload;
-begin
- result:=CreateFileA(fname,GENERIC_WRITE,FILE_SHARE_READ,nil,CREATE_ALWAYS,0,0);
-end;
-
-function Skip(f:THANDLE;count:integer):integer;
-begin
- result:=SetFilePointer(f,count,nil,FILE_CURRENT);
-end;
-
-function Eof(f:THANDLE):boolean;
-begin
- result:=FilePos(f)>=FileSize(f);
-end;
-
-function Seek(f:THANDLE;pos:integer):integer;
-begin
- result:=SetFilePointer(f,pos,nil,FILE_BEGIN);
-end;
-
-function FilePos(f:THANDLE):dword;
-begin
- result:=SetFilePointer(f,0,nil,FILE_CURRENT);
-end;
-
-function FileSize(f:THANDLE):dword;
-begin
- result:=GetFileSize(f,nil);
-end;
-
-function BlockRead(f:THANDLE;var buf;size:integer):dword;
-begin
- ReadFile(f,buf,size,result,nil);
-end;
-
-function BlockWrite(f:THANDLE;var buf;size:integer):dword;
-begin
- WriteFile(f,buf,size,result,nil);
-end;
-
-function GetFSize(name:PWideChar):dword;
-var
- lRec:WIN32_FIND_DATAW;
- h:THANDLE;
-begin
- h:=FindFirstFileW(name,lRec);
- if h=THANDLE(INVALID_HANDLE_VALUE) then
- result:=0
- else
- begin
- result:=lRec.nFileSizeLow;
- FindClose(h);
- end;
-end;
-
-function GetFSize(name:PAnsiChar):dword;
-var
- lRec:WIN32_FIND_DATAA;
- h:THANDLE;
-begin
- h:=FindFirstFileA(name,lRec);
- if h=THANDLE(INVALID_HANDLE_VALUE) then
- result:=0
- else
- begin
- result:=lRec.nFileSizeLow;
- FindClose(h);
- end;
-end;
-
-function ForceDirectories(path:PAnsiChar):boolean;
-var
- p,pc:PAnsiChar;
- i:cardinal;
- c:AnsiChar;
-begin
- result:=true;
- if DirectoryExists(path) then exit;
- if (path<>nil) and (path^<>#0) then
- begin
- i:=lstrlena(path)+1;
- GetMem(pc,i);
- move(path^,pc^,i);
- p:=pc;
- if (p^ in ['A'..'Z','a'..'z']) and (p[1]=':') then inc(p,2);
- if p^ in ['/','\'] then inc(p);
- c:=#0;
- while p^<>#0 do
- begin
- c:=' ';
- if (p^ in ['/','\']) and (p[1]<>#0) then
- begin
- c:=p^;
- p^:=#0;
- if not CreateDirectoryA(pc,nil) then
- begin
- if GetLastError<>ERROR_ALREADY_EXISTS then
- begin
- result:=false;
- FreeMem(pc);
- exit;
- end;
- end;
- p^:=c;
- end;
- inc(p);
- end;
- if (c<>#0) and (c=' ') then
- if not CreateDirectoryA(pc,nil) then
- result:=false;
- FreeMem(pc);
- end;
-end;
-
-function ForceDirectories(path:PWideChar):boolean;
-var
- p,pc:PWideChar;
- i:cardinal;
- c:WideChar;
-begin
- result:=true;
- if DirectoryExists(path) then exit;
- if (path<>nil) and (path^<>#0) then
- begin
- i:=(lstrlenw(path)+1)*SizeOf(WideChar);
- GetMem(pc,i);
- move(path^,pc^,i);
- p:=pc;
- if (((p^>='A') and (p^<='Z')) or ((p^>='a') and (p^<='z'))) and (p[1]=':') then inc(p,2);
- if (p^='/') or (p^='\') then inc(p);
- c:=#0;
- while p^<>#0 do
- begin
- c:=' ';
- if ((p^='/') or (p^='\')) and (p[1]<>#0) then
- begin
- c:=p^;
- p^:=#0;
- if not CreateDirectoryW(pc,nil) then
- if GetLastError<>ERROR_ALREADY_EXISTS then
- begin
- result:=false;
- FreeMem(pc);
- exit;
- end;
- p^:=c;
- end;
- inc(p);
- end;
- if (c<>#0) and (c=' ') then
- if not CreateDirectoryW(pc,nil) then
- result:=false;
- FreeMem(pc);
- end;
-end;
-
-function DirectoryExists(Directory:PAnsiChar):Boolean;
-var
- Code: Integer;
-begin
- Code := GetFileAttributesA(Directory);
- Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)<>0);
-end;
-
-function DirectoryExists(Directory:PWideChar):Boolean;
-var
- Code: Integer;
-begin
- Code := GetFileAttributesW(Directory);
- Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)<>0);
-end;
-
-function FileExists(fname:PAnsiChar):Boolean;
-var
- Code: Integer;
-begin
- Code := GetFileAttributesA(fname);
- Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)=0);
-end;
-
-function FileExists(fname:PWideChar):Boolean;
-var
- Code: Integer;
-begin
- Code := GetFileAttributesW(fname);
- Result := (Code<>-1) and ((Code and FILE_ATTRIBUTE_DIRECTORY)=0);
-end;
-
-end.
diff --git a/delphi/Awkward/utils/mirutils.pas b/delphi/Awkward/utils/mirutils.pas
deleted file mode 100644
index efca1fe..0000000
--- a/delphi/Awkward/utils/mirutils.pas
+++ /dev/null
@@ -1,1026 +0,0 @@
-{$Include compilers.inc}
-unit mirutils;
-
-interface
-
-uses windows,m_api;
-
-function ConvertFileName(src:pAnsiChar;hContact:THANDLE=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;hContact:THANDLE=0):pWideChar; overload;
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:THANDLE=0):pAnsiChar; overload;
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:THANDLE=0):pWideChar; overload;
-
-function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int;
-procedure ShowPopupW(text:pWideChar;title:pWideChar=nil);
-function GetAddonFileName(prefix,altname,path:PAnsiChar;ext:PAnsiChar):PAnsiChar;
-function TranslateA2W(sz:PAnsiChar):PWideChar;
-function MirandaCP:integer;
-
-function isVarsInstalled:bool;
-function ParseVarString(astr:pAnsiChar;aContact:THANDLE=0;extra:pAnsiChar=nil):pAnsiChar; overload;
-function ParseVarString(astr:pWideChar;aContact:THANDLE=0;extra:pWideChar=nil):pWideChar; overload;
-function ShowVarHelp(dlg:HWND;id:integer=0):integer;
-
-function IsChat(hContact:THANDLE):bool;
-procedure SendToChat(hContact:THANDLE;pszText:PWideChar);
-
-function SetCListSelContact(hContact:THANDLE):THANDLE;
-function GetCListSelContact:THANDLE; {$IFDEF DELPHI10_UP}inline;{$ENDIF}
-function GetContactProtoAcc(hContact:THANDLE):PAnsiChar;
-function IsMirandaUser(hContact:THANDLE):integer; // >0=Miranda; 0=Not miranda; -1=unknown
-procedure ShowContactDialog(hContact:THANDLE;DblClk:boolean=true;anystatus:boolean=true);
-function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):THANDLE;
-function WndToContact(wnd:hwnd):integer; overload;
-function WndToContact:integer; overload;
-function GetContactStatus(hContact:THANDLE):integer;
-// -2 - deleted account, -1 - disabled account, 0 - hidden
-// 1 - metacontact, 2 - submetacontact, positive - active
-function IsContactActive(hContact:THANDLE;var proto:pAnsiChar):integer; overload;
-function IsContactActive(hContact:THANDLE):integer; overload;
-
-function CreateGroupW(name:pWideChar;hContact:THANDLE):integer;
-function CreateGroup (name:pAnsiChar;hContact:THANDLE):integer;
-function MakeGroupMenu(idxfrom:integer=100):HMENU;
-function GetNewGroupName(parent:HWND):pWideChar;
-
-const
- HKMT_CORE = 1;
- HKMT_HOTKEYPLUS = 2;
- HKMT_HK = 3;
- HKMT_HKSERVICE = 4;
-
-function DetectHKManager:dword;
-
-const
- MAX_REDIRECT_RECURSE = 4;
-
-function GetFile(url:PAnsiChar;save_file:PAnsiChar;
- hNetLib:THANDLE=0;recurse_count:integer=0):bool; overload;
-// next is just wrapper
-function GetFile(url:PWideChar;save_file:PWideChar;
- hNetLib:THANDLE=0;recurse_count:integer=0):bool; overload;
-
-function GetProxy(hNetLib:THANDLE):PAnsiChar;
-function LoadImageURL(url:pAnsiChar;size:integer=0):HBITMAP;
-
-implementation
-
-uses dbsettings,common,io,syswin,freeimage,kol;
-
-function ConvertFileName(src:pWideChar;dst:pWideChar;hContact:THANDLE=0):pWideChar; overload;
-var
- pc,pc1:pWideChar;
- dat:TREPLACEVARSDATA;
-begin
- result:=dst;
- dst^:=#0;
- if (src<>nil) and (src^<>#0) then
- begin
- pc:=nil;
- if PluginLink^.ServiceExists(MS_UTILS_REPLACEVARS)<>0 then
- begin
- FillChar(dat,SizeOf(TREPLACEVARSDATA),0);
- dat.cbSize:=SizeOf(TREPLACEVARSDATA);
- dat.dwflags:=RVF_UNICODE;
- pc:=pWideChar(PluginLink^.CallService(MS_UTILS_REPLACEVARS,dword(src),dword(@dat)));
- end;
- if isVarsInstalled then
- begin
- if pc<>nil then src:=pc;
- pc1:=pc;
- pc:=ParseVarString(src,hContact);
- if pc1<>nil then mFreeMem(pc1);
- end;
- if pc<>nil then src:=pc;
- PluginLink^.CallService(MS_UTILS_PATHTOABSOLUTEW,dword(src),dword(dst));
- if pc<>nil then mFreeMem(pc);
- end;
-end;
-
-function ConvertFileName(src:pWideChar;hContact:THANDLE=0):pWideChar; overload;
-var
- buf1:array [0..511] of WideChar;
-begin
- if (src<>nil) and (src^<>#0) then
- StrDupW(result,ConvertFileName(src,buf1,hContact))
- else
- result:=nil;
-end;
-
-function ConvertFileName(src:pAnsiChar;dst:pAnsiChar;hContact:THANDLE=0):pAnsiChar; overload;
-var
- pc,pc1:pAnsiChar;
- dat:TREPLACEVARSDATA;
-begin
- result:=dst;
- dst^:=#0;
- if (src<>nil) and (src^<>#0) then
- begin
- pc:=nil;
- if PluginLink^.ServiceExists(MS_UTILS_REPLACEVARS)<>0 then
- begin
- FillChar(dat,SizeOf(TREPLACEVARSDATA),0);
- dat.cbSize:=SizeOf(TREPLACEVARSDATA);
- pc:=pAnsiChar(PluginLink^.CallService(MS_UTILS_REPLACEVARS,dword(src),dword(@dat)));
- end;
- if isVarsInstalled then
- begin
- if pc<>nil then src:=pc;
- pc1:=pc;
- pc:=ParseVarString(src,hContact);
- if pc1<>nil then mFreeMem(pc1);
- end;
- if pc<>nil then src:=pc;
- PluginLink^.CallService(MS_UTILS_PATHTOABSOLUTE,dword(src),dword(dst));
- if pc<>nil then mFreeMem(pc);
- end;
-end;
-
-function ConvertFileName(src:pAnsiChar;hContact:THANDLE=0):pAnsiChar; overload;
-var
- buf1:array [0..511] of AnsiChar;
-begin
- if (src<>nil) and (src^<>#0) then
- StrDup(result,ConvertFileName(src,buf1,hContact))
- else
- result:=nil;
-end;
-
-const
- IsVars:integer=-1;
- MirCP:integer=-1;
-const
- HKManager:integer=-1;
-
-function MirandaCP:integer;
-begin
- if MirCP<0 then
- MirCP:=CallService(MS_LANGPACK_GETCODEPAGE,0,0);
- result:=MirCP;
-end;
-
-function IsChat(hContact:THANDLE):bool;
-begin
- result:=DBReadByte(hContact,
- PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- 'ChatRoom',0)=1;
-end;
-
-function isVarsInstalled:bool;
-begin
- if IsVars<0 then
- IsVars:=PluginLink^.ServiceExists(MS_VARS_FORMATSTRING);
- result:=IsVars<>0;
-end;
-
-function ParseVarString(astr:pAnsiChar;aContact:THANDLE=0;extra:pAnsiChar=nil):pAnsiChar;
-var
- tfi:TFORMATINFO;
- tmp:pAnsiChar;
-begin
- if isVarsInstalled then
- begin
- FillChar(tfi,SizeOf(tfi),0);
- with tfi do
- begin
- cbSize :=SizeOf(TFORMATINFO);
- szFormat.a :=astr;
- szExtraText.a:=extra;
- hContact :=aContact;
- end;
- tmp:=pointer(CallService(MS_VARS_FORMATSTRING,dword(@tfi),0));
- StrDup(result,tmp);
- PluginLink^.CallService(MS_VARS_FREEMEMORY,int(tmp),0);
- end
- else
- begin
- StrDup(result,astr);
- end;
-end;
-
-function ParseVarString(astr:pWideChar;aContact:THANDLE=0;extra:pWideChar=nil):pWideChar;
-var
- tfi:TFORMATINFO;
- tmp:pWideChar;
-begin
- if isVarsInstalled then
- begin
- FillChar(tfi,SizeOf(tfi),0);
- with tfi do
- begin
- cbSize :=SizeOf(TFORMATINFO);
- flags :=FIF_UNICODE;
- szFormat.w :=astr;
- szExtraText.w:=extra;
- hContact :=aContact;
- end;
- tmp:=pointer(CallService(MS_VARS_FORMATSTRING,dword(@tfi),0));
- StrDupW(result,tmp);
- PluginLink^.CallService(MS_VARS_FREEMEMORY,int(tmp),0);
- end
- else
- begin
- StrDupW(result,astr);
- end;
-end;
-
-function ShowVarHelp(dlg:HWND;id:integer=0):integer;
-var
- vhi:TVARHELPINFO;
-begin
- FillChar(vhi,SizeOf(vhi),0);
- with vhi do
- begin
- cbSize:=SizeOf(vhi);
- if id=0 then
- flags:=VHF_NOINPUTDLG
- else
- begin
- flags :=VHF_FULLDLG or VHF_SETLASTSUBJECT;
- hwndCtrl:=GetDlgItem(dlg,id);
- end;
- end;
- result:=PluginLink^.CallService(MS_VARS_SHOWHELPEX,dlg,dword(@vhi));
-end;
-
-function DetectHKManager:dword;
-begin
- if HKManager<0 then
- begin
- with PluginLink^ do
- if ServiceExists('CoreHotkeys/Register' )<>0 then HKManager:=HKMT_CORE
- else if ServiceExists('HotkeysPlus/Add' )<>0 then HKManager:=HKMT_HOTKEYPLUS
- else if ServiceExists('HotKey/CatchHotkey' )<>0 then HKManager:=HKMT_HK
- else if ServiceExists('HotkeysService/RegisterItem')<>0 then HKManager:=HKMT_HKSERVICE
- else HKManager:=0;
- end;
- result:=HKManager;
-// else if (CallService(MS_SYSTEM_GETVERSION,0,0) and $FFFF0000)>=$00080000 then // core
-end;
-
-procedure ShowPopupW(text:pWideChar;title:pWideChar=nil);
-var
- ppdu:TPOPUPDATAW;
-begin
- FillChar(ppdu,SizeOf(TPOPUPDATAW),0);
- if CallService(MS_POPUP_ISSECONDLINESHOWN,0,0)<>0 then
- begin
- StrCopyW(ppdu.lpwzText,text,MAX_SECONDLINE-1);
- if title<>nil then
- StrCopyW(ppdu.lpwzContactName,title,MAX_CONTACTNAME-1)
- else
- ppdu.lpwzContactName[0]:=' ';
- end
- else
- begin
- StrCopyW(ppdu.lpwzContactName,text,MAX_CONTACTNAME-1);
- ppdu.lpwzText[0]:=' ';
- end;
- PluginLink^.CallService(MS_POPUP_ADDPOPUPW,DWORD(@ppdu),APF_NO_HISTORY);
-end;
-
-function TranslateA2W(sz:PAnsiChar):PWideChar;
-var
- tmp:pWideChar;
-begin
- mGetMem(tmp,(StrLen(sz)+1)*SizeOf(WideChar));
- Result:=PWideChar(PluginLink^.CallService(MS_LANGPACK_TRANSLATESTRING,LANG_UNICODE,
- lParam(FastAnsiToWideBuf(sz,tmp))));
- if Result<>tmp then
- begin
- StrDupW(Result,Result);
- mFreeMem(tmp);
- end;
-end;
-
-function GetContactProtoAcc(hContact:THANDLE):PAnsiChar;
-begin
- if PluginLink^.ServiceExists(MS_PROTO_GETCONTACTBASEACCOUNT)<>0 then
- result:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEACCOUNT,hContact,0))
- else
- result:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
-end;
-
-function IsMirandaUser(hContact:THANDLE):integer; // >0=Miranda; 0=Not miranda; -1=unknown
-var
- sz:PAnsiChar;
-begin
- sz:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
- sz:=DBReadString(hContact,sz,'MirVer');
- if sz<>nil then
- begin
- result:=integer(StrPos(sz,'Miranda'));
- mFreeMem(sz);
- end
- else
- result:=-1;
-end;
-
-function WndToContact(wnd:hwnd):integer; overload;
-var
- hContact:integer;
- mwid:TMessageWindowInputData;
- mwod:TMessageWindowOutputData;
-begin
- wnd:=GetParent(wnd); //!!
- hContact:=PluginLink^.CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- with mwid do
- begin
- cbSize:=SizeOf(mwid);
- uFlags:=MSG_WINDOW_UFLAG_MSG_BOTH;
- end;
- mwod.cbSize:=SizeOf(mwod);
- while hContact<>0 do
- begin
- mwid.hContact:=hContact;
- if PluginLink^.CallService(MS_MSG_GETWINDOWDATA,dword(@mwid),dword(@mwod))=0 then
- begin
- if {((mwod.uState and MSG_WINDOW_STATE_FOCUS)<>0) and} (mwod.hwndWindow=wnd) then
- begin
- result:=mwid.hContact;
- exit;
- end
- end;
- hContact:=PluginLink^.CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
- result:=0;
-end;
-
-function SetCListSelContact(hContact:THANDLE):THANDLE;
-var
- wnd:HWND;
-begin
- wnd:=CallService(MS_CLUI_GETHWNDTREE,0,0);
- result:=hContact;
-// hContact:=SendMessage(wnd,CLM_FINDCONTACT ,hContact,0);
- SendMessage(wnd,CLM_SELECTITEM ,hContact,0);
-// SendMessage(wnd,CLM_ENSUREVISIBLE,hContact,0);
-end;
-
-function GetCListSelContact:THANDLE;
-begin
- result:=SendMessageW(CallService(MS_CLUI_GETHWNDTREE,0,0),CLM_GETSELECTION,0,0);
-end;
-
-function WndToContact:integer; overload;
-var
- wnd:HWND;
-begin
- wnd:=GetFocus;
- if wnd=0 then
- wnd:=WaitFocusedWndChild(GetForegroundWindow);
- if wnd<>0 then
- result:=WndToContact(wnd)
- else
- result:=0;
- if result=0 then
- result:=GetCListSelContact;
-end;
-
-function GetContactStatus(hContact:THANDLE):integer;
-var
- szProto:PAnsiChar;
-begin
- szProto:=PAnsiChar(PluginLink^.CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
- if szProto=NIL then
- result:=ID_STATUS_OFFLINE
- else
- result:=DBReadWord(hContact,szProto,'Status',ID_STATUS_OFFLINE);
-end;
-
-function CheckPath(filename,profilepath,path:PAnsiChar):PAnsiChar;
-var
- buf:array [0..511] of AnsiChar;
- f:THANDLE;
- p:PAnsiChar;
-begin
- result:=nil;
- if profilepath<>nil then
- StrCopy(buf,profilepath)
- else
- buf[0]:=#0;
- StrCat(buf,filename);
- f:=Reset(buf);
- if dword(f)=INVALID_HANDLE_VALUE then
- begin
- if path<>nil then
- begin
- CallService(MS_UTILS_PATHTOABSOLUTE,dword(path),dword(@buf));
- p:=StrEnd(buf);
- if p^<>'\' then
- begin
- p^:='\';
- inc(p);
- p^:=#0;
- end;
- end
- else if profilepath=nil then
- exit
- else
- buf[0]:=#0;
- StrCat(buf,filename); //path\prefix+name
- f:=Reset(buf);
- end;
- if dword(f)<>INVALID_HANDLE_VALUE then
- begin
- CloseHandle(f);
- StrDup(result,buf);
- end;
-end;
-
-function GetAddonFileName(prefix,altname,path:PAnsiChar;ext:PAnsiChar):PAnsiChar;
-var
- profilepath:array [0..511] of AnsiChar;
- altfilename,filename:array [0..127] of AnsiChar;
- p:PAnsiChar;
-begin
- CallService(MS_DB_GETPROFILEPATH,300,dword(@profilepath));
- p:=StrEnd(profilepath);
- p^:='\'; inc(p);
- p^:=#0;
- if prefix<>nil then
- begin
- StrCopy(filename,prefix);
- p:=StrEnd(filename);
- CallService(MS_DB_GETPROFILENAME,SizeOf(filename)-integer(p-@filename),dword(p));
- ChangeExt(filename,ext);
- result:=CheckPath(filename,profilepath,path);
- end
- else
- result:=nil;
-
- if (result=nil) and (altname<>nil) then
- begin
- StrCopy(altfilename,altname);
- ChangeExt(altfilename,ext);
- result:=CheckPath(altfilename,profilepath,path);
- end;
- if result=nil then
- begin
- StrCat(profilepath,filename);
- StrDup(result,profilepath);
- end;
-end;
-
-procedure ShowContactDialog(hContact:THANDLE;DblClk:boolean=true;anystatus:boolean=true);
-var
- pc:array [0..127] of AnsiChar;
-begin
-{
-CallService(MS_CLIST_CONTACTDOUBLECLICKED,hContact,0);
-}
- if (hContact<>0) and (CallService(MS_DB_CONTACT_IS,hContact,0)<>0) then
- begin
- StrCopy(pc,PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)));
- if DblClk or (DBReadByte(hContact,pc,'ChatRoom',0)=1) then // chat room
- begin
- if not anystatus then
- begin
- StrCat(pc,PS_GETSTATUS);
- anystatus:=(CallService(pc,0,0)<>ID_STATUS_OFFLINE);
- end;
- if anystatus then
- begin
- CallService(MS_CLIST_CONTACTDOUBLECLICKED,hContact,0); //??
- // if chat exist, open chat
- // else create new session
- end;
- end
- else
- begin
- if PluginLink^.ServiceExists(MS_MSG_CONVERS)<>0 then // Convers compat.
- CallService(MS_MSG_CONVERS,hContact,0)
- else
- CallService(MS_MSG_SENDMESSAGE,hContact,0)
- end;
- end;
-end;
-
-procedure SendChatText(pszID:pointer;pszModule:PAnsiChar;pszText:pointer);
-var
- gcd:TGCDEST;
- gce:TGCEVENT;
-begin
- gcd.pszModule:=pszModule;
- gcd.iType :=GC_EVENT_SENDMESSAGE;
- gcd.szID.w :=pszID;
-
- FillChar(gce,SizeOf(TGCEVENT),0);
- gce.cbSize :=SizeOf(TGCEVENT);
- gce.pDest :=@gcd;
- gce.bIsMe :=true;
- gce.szText.w:=pszText;
- gce.dwFlags :=GCEF_ADDTOLOG+GC_UNICODE;
- gce.time :=GetCurrentTime;
-
- PluginLink^.CallServiceSync(MS_GC_EVENT,0,dword(@gce));
-end;
-
-procedure SendToChat(hContact:THANDLE;pszText:PWideChar);
-var
- gci:TGC_INFO;
- pszModule:PAnsiChar;
- i,cnt:integer;
-begin
- pszModule:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
- cnt:=CallService(MS_GC_GETSESSIONCOUNT,0,dword(pszModule));
- i:=0;
- gci.pszModule:=pszModule;
- while i<cnt do
- begin
- gci.iItem:=i;
- gci.Flags:=GCI_BYINDEX+GCI_HCONTACT+GCI_ID;
- CallService(MS_GC_GETINFO,0,dword(@gci));
- if gci.hContact=hContact then
- begin
- SendChatText(gci.pszID.w,pszModule,pszText);
- break;
- end;
- inc(i);
- end;
-end;
-
-function FindContactHandle(proto:pAnsiChar;const dbv:TDBVARIANT;is_chat:boolean=false):THANDLE;
-var
- uid:pAnsiChar;
- ldbv:TDBVARIANT;
- hContact:THANDLE;
- pw:pWideChar;
-begin
- result:=0;
- if not is_chat then
- begin
- uid:=pAnsiChar(CallProtoService(proto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0));
- if dword(uid)=CALLSERVICE_NOTFOUND then exit;
- end;
-
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
- while hContact<>0 do
- begin
- if is_chat then
- begin
- if IsChat(hContact) then
- begin
- pw:=DBReadUnicode(hContact,proto,'ChatRoomID');
- if StrCmpW(pw,dbv.szVal.W)=0 then result:=hContact;
- mFreeMem(pw);
- end
- end
- else
- begin
- if DBReadSetting(hContact,proto,uid,@ldbv)=0 then
- begin
- if dbv._type=ldbv._type then
- begin
- case dbv._type of
- DBVT_DELETED: ;
- DBVT_BYTE : if dbv.bVal=ldbv.bVal then result:=hContact;
- DBVT_WORD : if dbv.wVal=ldbv.wVal then result:=hContact;
- DBVT_DWORD : if dbv.dVal=ldbv.dVal then result:=hContact;
- DBVT_UTF8,
- DBVT_ASCIIZ : if StrCmp (dbv.szVal.A,ldbv.szVal.A)=0 then result:=hContact;
- DBVT_WCHAR : if StrCmpW(dbv.szVal.W,ldbv.szVal.W)=0 then result:=hContact;
- DBVT_BLOB : begin
- if dbv.cpbVal = ldbv.cpbVal then
- begin
- if CompareMem(dbv.pbVal,ldbv.pbVal,dbv.cpbVal) then
- result:=hContact;
- end;
- end;
- end;
- if result<>0 then break;
- end;
- DBFreeVariant(@ldbv);
- end;
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
- end;
-end;
-
-function IsContactActive(hContact:THANDLE;var proto:pAnsiChar):integer; overload;
-var
- p:PPROTOACCOUNT;
- dbv :TDBVARIANT;
- dbcgs:TDBCONTACTGETSETTING;
- name: array [0..31] of AnsiChar;
-begin
-
- dbv._type :=DBVT_ASCIIZ;
- dbv.szVal.a:=@name;
- dbv.cchVal :=SizeOf(name);
- dbcgs.pValue :=@dbv;
- dbcgs.szModule :='Protocol';
- dbcgs.szSetting:='p';
-
- if PluginLink^.CallService(MS_DB_CONTACT_GETSETTINGSTATIC,hContact,dword(@dbcgs))=0 then
- begin
- result:=0;
-
- if PluginLink^.ServiceExists(MS_PROTO_GETACCOUNT)<>0 then
- begin
- p:=PPROTOACCOUNT(CallService(MS_PROTO_GETACCOUNT,0,dword(dbv.szVal.a)));
- if p=nil then
- result:=-2 // deleted
- else if (p^.bIsEnabled=0) or p^.bDynDisabled then
- result:=-1; // disabled
- end
- else
- begin
- if CallService(MS_PROTO_ISPROTOCOLLOADED,0,dword(dbv.szVal.a))=0 then
- result:=-1;
- end;
-
- if (result=0) and (DBReadByte(hContact,strCList,'Hidden',0)=0) then
- begin
- result:=255;
- if PluginLink^.ServiceExists(MS_MC_GETMETACONTACT)<>0 then
- begin
- if CallService(MS_MC_GETMETACONTACT,hContact,0)<>0 then
- result:=2;
- if StrCmp(
- PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PAnsiChar(CallService(MS_MC_GETPROTOCOLNAME,0,0)))=0 then
- result:=1;
- end;
- end;
- if @proto<>nil then
- StrDup(proto,dbv.szVal.a);
- end
- else
- begin
- result:=-2;
- if @proto<>nil then
- proto:=nil;
- end;
-
-end;
-
-function IsContactActive(hContact:THANDLE):integer; overload;
-type
- ppAnsiChar = ^pAnsiChar;
-begin
- result:=IsContactActive(hContact,ppAnsiChar(nil)^);
-end;
-
-// Import plugin function adaptation
-function CreateGroupW(name:pWideChar;hContact:THANDLE):integer;
-var
- groupId:integer;
- groupIdStr:array [0..10] of AnsiChar;
- dbv:TDBVARIANT;
- cgs:TDBCONTACTGETSETTING;
- grbuf:array [0..127] of WideChar;
- p:pWideChar;
-begin
- if (name=nil) or (name^=#0) then
- begin
- result:=0;
- exit;
- end;
-
- StrCopyW(@grbuf[1],name);
- grbuf[0]:=WideChar(1 or GROUPF_EXPANDED);
-
- // Check for duplicate & find unused id
- groupId:=0;
- cgs.szModule:='CListGroups';
- cgs.pValue :=@dbv;
- repeat
- dbv._type:=DBVT_WCHAR;
- cgs.szSetting:=IntToStr(groupIdStr,groupId);
- if PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,0,lParam(@cgs))<>0 then
- break;
-
- if StrCmpW(dbv.szVal.w+1,@grbuf[1])=0 then
- begin
- if hContact<>0 then
- DBWriteUnicode(hContact,strCList,'Group',@grbuf[1]);
-
- DBFreeVariant(@dbv);
- result:=0;
- exit;
- end;
-
- DBFreeVariant(@dbv);
- inc(groupid);
- until false;
-
- DBWriteUnicode(0,'CListGroups',groupIdStr,grbuf);
-
- if hContact<>0 then
- DBWriteUnicode(hContact,strCList,'Group',@grbuf[1]);
-
- p:=StrRScanW(grbuf,'\');
- if p<>nil then
- begin
- p^:=#0;
- CreateGroupW(grbuf+1,0);
- end;
-
- result:=1;
-end;
-
-function CreateGroup(name:pAnsiChar;hContact:THANDLE):integer;
-var
- groupId:integer;
- groupIdStr:array [0..10] of AnsiChar;
- dbv:TDBVARIANT;
- cgs:TDBCONTACTGETSETTING;
- grbuf:array [0..127] of AnsiChar;
- p:pAnsiChar;
-begin
- if (name=nil) or (name^=#0) then
- begin
- result:=0;
- exit;
- end;
-
- StrCopy(@grbuf[1],name);
- grbuf[0]:=CHAR(1 or GROUPF_EXPANDED);
-
- // Check for duplicate & find unused id
- groupId:=0;
- cgs.szModule:='CListGroups';
- cgs.pValue :=@dbv;
- repeat
- dbv._type:=DBVT_ASCIIZ;
- cgs.szSetting:=IntToStr(groupIdStr,groupId);
- if PluginLink^.CallService(MS_DB_CONTACT_GETSETTING_STR,0,lParam(@cgs))<>0 then
- break;
-
- if StrCmp(dbv.szVal.a+1,@grbuf[1])=0 then
- begin
- if hContact<>0 then
- DBWriteString(hContact,strCList,'Group',@grbuf[1]);
-
- DBFreeVariant(@dbv);
- result:=0;
- exit;
- end;
-
- DBFreeVariant(@dbv);
- inc(groupid);
- until false;
-
- DBWriteString(0,'CListGroups',groupIdStr,grbuf);
-
- if hContact<>0 then
- DBWriteString(hContact,strCList,'Group',@grbuf[1]);
-
- p:=StrRScan(grbuf,'\');
- if p<>nil then
- begin
- p^:=#0;
- CreateGroup(grbuf+1,0);
- end;
-
- result:=1;
-end;
-
-function MakeGroupMenu(idxfrom:integer=100):HMENU;
-var
- sl:PWStrList;
- i:integer;
- b:array [0..15] of AnsiChar;
- p:pWideChar;
-begin
- result:=CreatePopupMenu;
- i:=0;
- AppendMenuW(result,MF_STRING,idxfrom,TranslateW('<Root Group>'));
- AppendMenuW(result,MF_SEPARATOR,0,nil);
- sl:=NewWStrList;
- repeat
- p:=DBReadUnicode(0,'CListGroups',IntToStr(b,i),nil);
- if p=nil then break;
- sl.Add(p+1);
- mFreeMem(p);
- inc(i);
- until false;
- sl.Sort(false);
- for i:=0 to sl.Count-1 do
- begin
- AppendMenuW(result,MF_STRING,idxfrom+1,pWideChar(sl.Items[i]));
- end;
- sl.Clear;
- sl.Free;
-end;
-
-function GetNewGroupName(parent:HWND):pWideChar;
-var
- mmenu:HMENU;
- i:integer;
- buf:array [0..63] of WideChar;
- pt:TPoint;
-begin
- mmenu:=MakeGroupMenu;
- GetCursorPos(pt);
- i:=integer(TrackPopupMenu(mmenu,TPM_RETURNCMD+TPM_NONOTIFY,pt.x,pt.y,0,parent,nil));
- if i>0 then
- begin
- GetMenuStringW(mmenu,i,buf,HIGH(buf)+1,MF_BYCOMMAND);
- StrDupW(result,buf);
- end;
- DestroyMenu(mmenu);
-end;
-
-(*
-static int __inline NLog(AnsiChar *msg) {
- return CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)msg);
-}
-*)
-function GetFile(url:PAnsiChar;save_file:PAnsiChar;
- hNetLib:THANDLE=0;recurse_count:integer=0):bool;
-var
- nlu:TNETLIBUSER;
- req :TNETLIBHTTPREQUEST;
- resp:PNETLIBHTTPREQUEST;
- hSaveFile:THANDLE;
- i:integer;
-begin
- result:=false;
- if recurse_count>MAX_REDIRECT_RECURSE then
- exit;
- if (url=nil) or (url^=#0) or (save_file=nil) or (save_file^=#0) then
- exit;
-
- FillChar(req,SizeOf(req),0);
- req.cbSize :=SizeOf(req);
- req.requestType:=REQUEST_GET;
- req.szUrl :=url;
- req.flags :=NLHRF_NODUMP;
-
-
- FillChar(nlu,SizeOf(nlu),0);
- if hNetLib=0 then
- begin
- nlu.cbSize :=SizeOf(nlu);
- nlu.flags :=NUF_HTTPCONNS or NUF_NOHTTPSOPTION or NUF_OUTGOING or NUF_NOOPTIONS;
- nlu.szSettingsModule:='dummy';
- hNetlib:=CallService(MS_NETLIB_REGISTERUSER,0,dword(@nlu));
- end;
-
- resp:=pointer(CallService(MS_NETLIB_HTTPTRANSACTION,hNetlib,dword(@req)));
-
- if resp<>nil then
- begin
- if resp^.resultCode=200 then
- begin
- hSaveFile:=Rewrite(save_file);
- if dword(hSaveFile)<>INVALID_HANDLE_VALUE then
- begin
- BlockWrite(hSaveFile,resp^.pData^,resp^.dataLength);
- CloseHandle(hSaveFile);
- result:=true;
- end
- end
- else if (resp.resultCode>=300) and (resp.resultCode<400) then
- begin
- // get new location
- for i:=0 to resp^.headersCount-1 do
- begin
- //MessageBox(0,resp^.headers[i].szValue, resp^.headers[i].szName,MB_OK);
- if StrCmp(resp^.headers^[i].szName,'Location')=0 then
- begin
- result:=GetFile(resp^.headers^[i].szValue,save_file,hNetLib,recurse_count+1);
- break;
- end
- end;
- end
- else
- begin
-{
- _stprintf(buff, TranslateT("Failed to download \"%s\" - Invalid response, code %d"), plugin_name, resp->resultCode);
-
- ShowError(buff);
- AnsiChar *ts = GetAString(buff);
- NLog(ts);
-}
- end;
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,dword(resp));
-
- if nlu.cbSize<>0 then
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
- end;
-end;
-
-function GetFile(url:PWideChar;save_file:PWideChar;
- hNetLib:THANDLE=0;recurse_count:integer=0):bool;
-var
- aurl,asave:array [0..MAX_PATH-1] of AnsiChar;
-begin
- FastWideToAnsiBuf(url,aurl);
- FastWideToAnsiBuf(save_file,asave);
- result:=GetFile(aurl,asave,hNetLib,0);
-end;
-
-function GetProxy(hNetLib:THANDLE):PAnsiChar;
-var
- nlus:TNETLIBUSERSETTINGS;
- pc:PAnsiChar;
- proxy:array [0..127] of AnsiChar;
-begin
- result:=nil;
- nlus.cbSize:=SizeOf(nlus);
- if CallService(MS_NETLIB_GETUSERSETTINGS,hNetLib,dword(@nlus))<>0 then
- begin
- if nlus.useProxy<>0 then
- begin
- if nlus.proxyType<>PROXYTYPE_IE then
- begin
- pc:=@proxy;
- if nlus.szProxyServer<>nil then
- begin
- if nlus.useProxyAuth<>0 then
- begin
- if nlus.szProxyAuthUser<>nil then
- begin
- pc:=StrCopyE(proxy,nlus.szProxyAuthUser);
- if nlus.szProxyAuthPassword<>nil then
- begin
- pc^:=':'; inc(pc);
- pc:=StrCopyE(pc,nlus.szProxyAuthPassword);
- end;
- pc^:='@';
- inc(pc);
- end;
- end;
- pc:=StrCopyE(pc,nlus.szProxyServer);
- if nlus.wProxyPort<>0 then
- begin
- pc^:=':'; inc(pc);
- IntToStr(pc,nlus.wProxyPort);
- end;
- end;
- StrDup(result,proxy);
- end
- else // use IE proxy
- begin
- mGetMem(result,1);
- result^:=#0;
- end;
- end;
- end;
-end;
-
-function LoadImageURL(url:pAnsiChar;size:integer=0):HBITMAP;
-var
- nlu:TNETLIBUSER;
- req :TNETLIBHTTPREQUEST;
- resp:PNETLIBHTTPREQUEST;
- hNetLib:THANDLE;
- im:TIMGSRVC_MEMIO;
-begin
- result:=0;
- if (url=nil) or (url^=#0) then
- exit;
-
- FillChar(req,SizeOf(req),0);
- req.cbSize :=SizeOf(req);
- req.requestType:=REQUEST_GET;
- req.szUrl :=url;
- req.flags :=NLHRF_NODUMP;
-
- FillChar(nlu,SizeOf(nlu),0);
- nlu.cbSize :=SizeOf(nlu);
- nlu.flags :=NUF_HTTPCONNS or NUF_NOHTTPSOPTION or NUF_OUTGOING or NUF_NOOPTIONS;
- nlu.szSettingsModule:='dummy';
- hNetlib:=CallService(MS_NETLIB_REGISTERUSER,0,dword(@nlu));
-
- resp:=pointer(CallService(MS_NETLIB_HTTPTRANSACTION,hNetlib,dword(@req)));
-
- if resp<>nil then
- begin
- if resp^.resultCode=200 then
- begin
- im.iLen :=resp.dataLength;
- im.pBuf :=resp.pData;
- im.flags:=size shl 16;
- im.fif :=FIF_JPEG;
- result :=CallService(MS_IMG_LOADFROMMEM,dword(@im),0);
-// if result<>0 then
-// DeleteObject(SendMessage(wnd,STM_SETIMAGE,IMAGE_BITMAP,result)); //!!
- end;
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,dword(resp));
- end;
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
-end;
-
-function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int;
-var
- sid:TSKINICONDESC;
-begin
- FillChar(sid,SizeOf(TSKINICONDESC),0);
- sid.cbSize :=SizeOf(TSKINICONDESC);
- sid.cx :=16;
- sid.cy :=16;
- sid.flags :=0;
- sid.szSection.a:=group;
-
- sid.hDefaultIcon :=LoadImage(hInstance,resname,IMAGE_ICON,16,16,0);
- sid.pszName :=ilname;
- sid.szDescription.a:=descr;
- result:=PluginLink^.CallService(MS_SKIN2_ADDICON,0,dword(@sid));
- DestroyIcon(sid.hDefaultIcon);
-end;
-
-end.
diff --git a/delphi/Awkward/utils/playlist.pas b/delphi/Awkward/utils/playlist.pas
deleted file mode 100644
index d1fb552..0000000
--- a/delphi/Awkward/utils/playlist.pas
+++ /dev/null
@@ -1,431 +0,0 @@
-{Playlist process}
-unit playlist;
-
-interface
-
-type
- tPlaylist = class
- private
- fShuffle :boolean;
- PlSize :cardinal; // playlist entries
- PlCapacity:cardinal;
- base :pWideChar;
- name :pWideChar;
- descr :pWideChar;
- PlStrings :array of PWideChar;
- CurElement:cardinal;
- PlOrder :array of cardinal;
- CurOrder :cardinal;
-
- procedure SetShuffle(value:boolean);
- function GetShuffle:boolean;
- procedure DoShuffle;
-
- function GetTrackNumber:integer;
- procedure SetTrackNumber(value:integer);
-
- procedure AddLine(name,descr:pWideChar;new:boolean=true);
- function ProcessElement(num:integer=-1):PWideChar; //virtual;
-
- public
- constructor Create(fName:pWideChar);
- destructor Free;
-
- procedure SetBasePath(path:pWideChar);
-
- function GetSong(number:integer=-1):pWideChar;
- function GetCount:integer;
-
- function Next :pWideChar;
- function Previous:pWideChar;
-
- property Track :integer read GetTrackNumber write SetTrackNumber;
- property Shuffle:boolean read GetShuffle write SetShuffle;
- end;
-
-function isPlaylist(fname:pWideChar):integer;
-function CreatePlaylist(fname:pWideChar):tPlaylist;
-
-implementation
-
-uses windows, common, io;//, m_api, mirutils;
-
-const
- plSizeStart = 2048;
- plSizeStep = 256;
-const
- pltM3OLD = $100;
- pltM3UTF = $200;
-
-type
- tM3UPlaylist = class(tPlayList)
- private
- public
- constructor Create(fName:pWideChar);
- end;
-
- tPLSPlaylist = class(tPlayList)
- private
- public
- constructor Create(fName:pWideChar);
- end;
-
-function isPlaylist(fname:pWideChar):integer;
-var
- ext:array [0..7] of WideChar;
-begin
- GetExt(fname,ext,7);
- if StrCmpW(ext,'M3U',3)=0 then result:=1
- else if StrCmpW(ext,'PLS' )=0 then result:=2
- else result:=0;
-end;
-
-function CreatePlaylist(fname:pWideChar):tPlaylist;
-begin
- case isPlaylist(fname) of
- 1: result:=tM3UPlaylist.Create(fName);
- 2: result:=tPLSPlaylist.Create(fName);
- else result:=nil;
- end;
-end;
-
-//----- -----
-
-function SkipLine(var p:PWideChar):bool;
-begin
- while p^>=' ' do inc(p);
- while p^<=' ' do // Skip spaces too
- begin
- if p^=#0 then
- begin
- result:=false;
- exit;
- end;
- p^:=#0;
- inc(p);
- end;
- result:=true;
-end;
-
-constructor tM3UPlaylist.Create(fName:pWideChar);
-var
- f:THANDLE;
- i:integer;
- p:PAnsiChar;
- pp,pd:pWideChar;
- plBuf:pAnsiChar;
- plBufW:pWideChar;
- pltNew:boolean;
- lname,ldescr:pWideChar;
- finish:boolean;
-begin
- inherited;
-
- // Load into mem
- f:=Reset(fName);
- if dword(f)<>INVALID_HANDLE_VALUE then
- begin
- i:=integer(FileSize(f));
- if i=-1 then
- i:=integer(GetFSize(fName));
- if i<>-1 then
- begin
- mGetMem(PlBuf,i+1);
- BlockRead(f,PlBuf^,i);
- CloseHandle(f);
- PlBuf[i]:=#0;
-
- p:=PlBuf;
- if (pdword(p)^ and $00FFFFFF)=$00BFBBEF then
- begin
- inc(p,3);
- UTF8ToWide(p,plBufW)
- end
- else
- AnsiToWide(p,plBufW);
-
- mFreeMem(plBuf);
-
- pp:=plBufW;
- pltNew:=StrCmpW(pp,'#EXTM3U',7)=0;
- if pltNew then SkipLine(pp);
-
- repeat
- if pltNew then
- begin
- pd:=StrScanW(pp,',');
- if pd<>nil then
- begin
- ldescr:=pd+1;
- if not SkipLine(pp) then break;
- end;
- end;
- lname:=pp;
- finish:=SkipLine(pp);
- AddLine(lname,ldescr);
- until not finish;
-
- mFreeMem(plBufW);
- end;
- end;
-
-end;
-
-//----- -----
-
-constructor tPLSPlaylist.Create(fName:pWideChar);
-var
- buf:array [0..MAX_PATH-1] of AnsiChar;
- lname,ldescr:pWideChar;
- ffile,ftitle:array [0..31] of AnsiChar;
- plName:array [0..127] of AnsiChar;
- f,t:pAnsiChar;
- i,size:integer;
- plFile:pAnsiChar;
-begin
- inherited;
-
- WideToAnsi(fName,PlFile);
- GetPrivateProfileSectionNamesA(buf,127,PlFile);
- StrCopy(plName,buf);
- size:=GetPrivateProfileIntA(PlName,'NumberOfEntries',0,PlFile);
- f:=StrCopyE(ffile ,'File');
- t:=StrCopyE(ftitle,'Title');
- for i:=1 to size do
- begin
- IntToStr(f,i);
- GetPrivateProfileStringA(PlName,ffile,'',buf,SizeOf(buf),PlFile);
- AnsiToWide(buf,lname);
-
- IntToStr(t,i);
- GetPrivateProfileStringA(PlName,ftitle,'',buf,SizeOf(buf),PlFile);
- AnsiToWide(buf,ldescr);
-
- AddLine(lname,ldescr,false);
- end;
- mFreeMem(plFile);
-end;
-
-//----- -----
-
-constructor tPlaylist.Create(fName:pWideChar);
-begin
- CurElement:=0;
- base:=nil;
- name:=nil;
- descr:=nil;
- Shuffle:=false;
- plSize:=0;
-
- SetBasePath(fname);
-end;
-
-destructor tPlaylist.Free;
-var
- i:integer;
-begin
- PlOrder:=nil;
-
- mFreeMem(base);
- mFreeMem(name);
- mFreeMem(descr);
-
- for i:=0 to PlSize-1 do
- begin
- mFreeMem(plStrings[i*2]);
- mFreeMem(plStrings[i*2+1]);
- end;
- PlStrings:=nil;
-end;
-
-procedure tPlaylist.AddLine(name,descr:pWideChar;new:boolean=true);
-begin
- if PlCapacity=0 then
- begin
- PlCapacity:=plSizeStart;
- SetLength(PlStrings,plSizeStart*2);
- fillChar(plStrings[0],plSizeStart*2*SizeOf(pWideChar),0);
- end
- else if plSize=PlCapacity then
- begin
- inc(plCapacity,plSizeStep);
- SetLength(PlStrings,plCapacity*2);
- fillChar(plStrings[plSize],plSizeStep*2*SizeOf(pWideChar),0);
- end;
- if new then
- begin
- StrDupW(plStrings[plSize*2 ],name);
- StrDupW(plStrings[plSize*2+1],descr);
- end
- else
- begin
- plStrings[plSize*2 ]:=name;
- plStrings[plSize*2+1]:=descr;
- end;
- inc(plSize);
-end;
-
-procedure tPlaylist.SetBasePath(path:pWideChar);
-var
- buf:array [0..MAX_PATH-1] of WideChar;
- p,pp:pWideChar;
-begin
- mFreeMem(base);
-
- pp:=ExtractW(path,false);
- p:=StrCopyEW(buf,pp);
- mFreeMem(pp);
-
- if ((p-1)^<>'\') and ((p-1)^<>'/') then
- begin
- if StrScanW(buf,'/')<>nil then
- p^:='/'
- else
- p^:='\';
- inc(p);
- end;
- p^:=#0;
- StrDupW(base,buf);
-end;
-
-function tPlaylist.GetCount:integer;
-begin
- result:=PlSize;
-end;
-
-function tPlaylist.GetTrackNumber:integer;
-begin
- if fShuffle then
- result:=CurOrder
- else
- result:=CurElement;
-end;
-
-procedure tPlaylist.SetTrackNumber(value:integer);
-begin
- if value<0 then
- value:=0
- else if value>=Integer(PlSize) then
- value:=PlSize-1;
-
- if fShuffle then
- CurOrder:=value
- else
- CurElement:=value;
-end;
-
-function tPlaylist.ProcessElement(num:integer=-1):pWideChar;
-begin
- if num<0 then
- num:=Track
- else if num>=integer(PlSize) then
- num:=PlSize-1;
-
- result:=plStrings[num*2];
-end;
-
-function tPlaylist.GetSong(number:integer=-1):PWideChar;
-var
- buf:array [0..MAX_PATH-1] of WideChar;
-begin
- result:=ProcessElement(number);
-
- if (result<>nil) and not isPathAbsolute(result) and (base<>nil) then
- begin
- StrCopyW(StrCopyEW(buf,base),result);
- mFreeMem(result);
- StrDupW(result,buf);
- end;
-end;
-
-procedure tPlaylist.SetShuffle(value:boolean);
-begin
- if value then
- begin
-// if not fShuffle then // need to set Shuffle
- DoShuffle;
- end;
-
- fShuffle:=value;
-end;
-
-function tPlaylist.GetShuffle:boolean;
-begin
- result:=fShuffle;
-end;
-
-procedure tPlaylist.DoShuffle;
-var
- i,RandInx: cardinal;
- SwapItem: cardinal;
-begin
- SetLength(PlOrder,PlSize);
- Randomize;
- for i:=0 to PlSize-1 do
- PlOrder[i]:=i;
- if PlSize>1 then
- begin
- for i:=0 to PlSize-2 do
- begin
- RandInx:=cardinal(Random(PlSize-i));
- SwapItem:=PlOrder[i];
- PlOrder[i ]:=PlOrder[RandInx];
- PlOrder[RandInx]:=SwapItem;
- end;
- end;
- CurOrder:=0;
-end;
-
-function tPlaylist.Next:PWideChar;
-begin
- if PlSize<>0 then
- begin
- if not Shuffle then
- begin
- inc(CurElement);
- if CurElement=PlSize then
- CurElement:=0;
- end
- else // if mode=plShuffle then
- begin
- inc(CurOrder);
- if CurOrder=PlSize then
- begin
- DoShuffle;
- CurOrder:=0;
- end;
- CurElement:=PlOrder[CurOrder];
- end;
- result:=GetSong;
- end
- else
- result:=nil;
-end;
-
-function tPlaylist.Previous:PWideChar;
-begin
- if PlSize<>0 then
- begin
- if not Shuffle then
- begin
- if CurElement=0 then
- CurElement:=PlSize;
- Dec(CurElement);
- end
- else // if mode=plShuffle then
- begin
- if CurOrder=0 then
- begin
- DoShuffle;
- CurOrder:=PlSize;
- end;
- dec(CurOrder);
- CurElement:=PlOrder[CurOrder];
- end;
- result:=GetSong;
- end
- else
- result:=nil;
-end;
-
-end.
diff --git a/delphi/Awkward/utils/protocols.pas b/delphi/Awkward/utils/protocols.pas
deleted file mode 100644
index ba14288..0000000
--- a/delphi/Awkward/utils/protocols.pas
+++ /dev/null
@@ -1,573 +0,0 @@
-unit protocols;
-
-interface
-
-uses windows,m_api;
-
-function FindProto(proto:PAnsiChar):integer;
-
-function GetStatusNum(status:integer):integer;
-function GetNumProto:cardinal;
-
-function GetProtoSetting(ProtoNum:cardinal;param:boolean=false):dword;
-procedure SetProtoSetting(ProtoNum:cardinal;mask:dword;param:boolean=false);
-
-function IsTunesSupported (ProtoNum:cardinal):bool;
-function IsXStatusSupported(ProtoNum:cardinal):bool;
-function IsChatSupported (ProtoNum:cardinal):bool;
-
-function GetProtoStatus (ProtoNum:cardinal):integer;
-function GetProtoStatusNum(ProtoNum:cardinal):integer;
-function GetProtoName (ProtoNum:cardinal):PAnsiChar;
-
-procedure FillProtoList (list:hwnd;withIcons:bool=false);
-procedure CheckProtoList (list:hwnd);
-procedure FillStatusList (proto:cardinal;list:hwnd;withIcons:bool=false);
-procedure CheckStatusList(list:hwnd;ProtoNum:cardinal);
-
-function CreateProtoList:integer;
-procedure FreeProtoList;
-
-function SetStatus(proto:PAnsiChar;status:integer;txt:PAnsiChar=pointer(-1)):integer;
-function SetXStatus(proto:PAnsiChar;newstatus:integer;
- txt:pWideChar=nil;title:pWideChar=nil):integer;
-function GetXStatus(proto:PAnsiChar;txt:pointer=nil;title:pointer=nil):integer;
-
-const
- psf_online = $0001;
- psf_invisible = $0002;
- psf_shortaway = $0004;
- psf_longaway = $0008;
- psf_lightdnd = $0010;
- psf_heavydnd = $0020;
- psf_freechat = $0040;
- psf_outtolunch = $0080;
- psf_onthephone = $0100;
- psf_enabled = $0800;
- psf_all = $08FF;
- psf_chat = $1000;
- psf_icq = $2000;
- psf_tunes = $4000;
-
-implementation
-
-uses commctrl,common,dbsettings;
-
-{$include m_newawaysys.inc}
-
-const
- defproto = '- default -';
-
-const
- NumStatus = 10;
- StatCodes:array [0..NumStatus-1] of integer=(
- ID_STATUS_OFFLINE,
- ID_STATUS_ONLINE,
- ID_STATUS_INVISIBLE,
- ID_STATUS_AWAY,
- ID_STATUS_NA,
- ID_STATUS_OCCUPIED,
- ID_STATUS_DND,
- ID_STATUS_FREECHAT,
- ID_STATUS_OUTTOLUNCH,
- ID_STATUS_ONTHEPHONE);
-const
- StatNames:array [0..NumStatus-1] of PWideChar=(
- 'Default'{'Offline'},'Online','Invisible','Away','N/A','Occupied','DND',
- 'Free for chat','Out to lunch','On the Phone');
-
-type
- pMyProto = ^tMyProto;
- tMyProto = record
- name :PAnsiChar;
-// xstat :integer; // old ICQ XStatus
- enabled :integer;
- status :integer; // mask
- param :dword;
- end;
- pMyProtos = ^tMyProtos;
- tMyProtos = array [0..100] of tMyProto;
-
-var
- protos:pMyProtos;
- NumProto:cardinal;
- NASPresents:bool;
-
-function FindProto(proto:PAnsiChar):integer;
-var
- i:integer;
-begin
- for i:=1 to NumProto do
- begin
- if StrCmp(proto,protos^[i].name)=0 then
- begin
- result:=i;
- exit;
- end;
- end;
- result:=0;
-end;
-
-function IsTunesSupported(ProtoNum:cardinal):bool;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- if (ProtoNum<=NumProto) and ((protos^[ProtoNum].status and psf_tunes)<>0) then
- result:=true
- else
- result:=false;
-end;
-
-function IsXStatusSupported(ProtoNum:cardinal):bool;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- if (ProtoNum<=NumProto) and ((protos^[ProtoNum].status and psf_icq)<>0) then
- result:=true
- else
- result:=false;
-end;
-
-function IsChatSupported(ProtoNum:cardinal):bool;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- if (ProtoNum<=NumProto) and ((protos^[ProtoNum].status and psf_chat)<>0) then
- result:=true
- else
- result:=false;
-end;
-
-function GetProtoSetting(ProtoNum:cardinal;param:boolean=false):dword;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- if ProtoNum<=NumProto then
- begin
- if param then
- result:=protos^[ProtoNum].param
- else
- result:=protos^[ProtoNum].enabled
- end
- else
- result:=0;
-end;
-
-procedure SetProtoSetting(ProtoNum:cardinal;mask:dword;param:boolean=false);
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- if ProtoNum<=NumProto then
- begin
- if param then
- protos^[ProtoNum].param:=mask
- else
- protos^[ProtoNum].enabled:=mask;
- end;
-end;
-
-function GetStatusNum(status:integer):integer;
-var
- i:integer;
-begin
- for i:=0 to NumStatus-1 do
- if StatCodes[i]=status then
- begin
- result:=i;
- exit;
- end;
- result:=0; //-1
-end;
-
-function GetProtoStatus(ProtoNum:cardinal):integer;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- result:=CallProtoService(protos^[ProtoNum].name,PS_GETSTATUS,0,0);
-end;
-
-function GetProtoStatusNum(ProtoNum:cardinal):integer;
-begin
- if ProtoNum>100 then
- ProtoNum:=FindProto(PAnsiChar(ProtoNum));
- result:=GetStatusNum(GetProtoStatus(ProtoNum));
-end;
-
-function GetNumProto:cardinal;
-begin
- result:=NumProto;
-end;
-
-function GetProtoName(ProtoNum:cardinal):PAnsiChar;
-begin
- if ProtoNum<=NumProto then
- result:=protos^[ProtoNum].name
- else
- result:=nil;
-end;
-
-procedure FillProtoList(list:hwnd;withIcons:bool=false);
-var
- item:TLVITEMA;
- lvc:TLVCOLUMN;
- i,NewItem:integer;
- cli:PCLIST_INTERFACE;
-begin
- FillChar(lvc,SizeOf(lvc),0);
- ListView_SetExtendedListViewStyle(list, LVS_EX_CHECKBOXES);
- if withIcons then
- begin
- dword(cli):=CallService(MS_CLIST_RETRIEVE_INTERFACE,0,0);
- SetWindowLongW(list,GWL_STYLE,
- GetWindowLongW(list,GWL_STYLE) or LVS_SHAREIMAGELISTS);
- ListView_SetImageList(list,
- CallService(MS_CLIST_GETICONSIMAGELIST,0,0),LVSIL_SMALL);
- lvc.mask:=LVCF_FMT+LVCF_IMAGE
- end
- else
- begin
- cli:=nil;
- lvc.mask:=LVCF_FMT;
- end;
-
- lvc.fmt :={LVCFMT_IMAGE or} LVCFMT_LEFT;
- ListView_InsertColumn(list,0,lvc);
-
- FillChar(item,SizeOf(item),0);
- if withIcons then
- item.mask:=LVIF_TEXT+LVIF_IMAGE
- else
- item.mask:=LVIF_TEXT;
- for i:=0 to NumProto do
- begin
- item.iItem:=i;
- item.pszText:=protos^[i].name;
- if withIcons and (i>0) then
- item.iImage:=cli^.pfnIconFromStatusMode(item.pszText,ID_STATUS_ONLINE,0);
- newItem:=ListView_InsertItemA(list,item);
- if newItem>=0 then
- ListView_SetCheckState(list,newItem,(protos^[i].enabled and psf_enabled)<>0)
- end;
- ListView_SetItemState (list,0,LVIS_FOCUSED or LVIS_SELECTED,LVIS_FOCUSED or LVIS_SELECTED);
-
- ListView_SetColumnWidth(list,0,LVSCW_AUTOSIZE);
-end;
-
-procedure CheckProtoList(list:hwnd);
-var
- i:integer;
-begin
- for i:=1 to ListView_GetItemCount(list) do
- begin
- with protos^[i] do
- if ListView_GetCheckState(list,i)=BST_CHECKED then
- enabled:=enabled or psf_enabled
- else
- enabled:=enabled and not psf_enabled;
- end;
-end;
-
-procedure FillStatusList(proto:cardinal;list:hwnd;withIcons:bool=false);
-
- procedure AddString(num:integer;enabled:boolean;cli:PCLIST_INTERFACE);
- var
- item:LV_ITEMW;
- NewItem:integer;
- begin
- FillChar(item,SizeOf(item),0);
- item.iItem :=num;
- item.lParam :=StatCodes[num];
- if cli<>nil then
- begin
- item.mask :=LVIF_TEXT+LVIF_PARAM+LVIF_IMAGE;
- item.iImage:=cli^.pfnIconFromStatusMode(protos^[proto].name,item.lParam,0);
- end
- else
- item.mask :=LVIF_TEXT+LVIF_PARAM;
- item.pszText:=TranslateW(StatNames[num]);
- newItem:=SendMessageW(list,LVM_INSERTITEMW,0,dword(@item));
- if newItem>=0 then
- ListView_SetCheckState(list,newItem,enabled);
- end;
-
-var
- lvc:TLVCOLUMN;
- cli:PCLIST_INTERFACE;
-begin
- if proto=0 then
- withIcons:=false;
- ListView_DeleteAllItems(list);
- ListView_DeleteColumn(list,0);
- FillChar(lvc,SizeOf(lvc),0);
- ListView_SetExtendedListViewStyle(list, LVS_EX_CHECKBOXES);
- if withIcons then
- begin
- dword(cli):=CallService(MS_CLIST_RETRIEVE_INTERFACE,0,0);
- SetWindowLongW(list,GWL_STYLE,
- GetWindowLongW(list,GWL_STYLE) or LVS_SHAREIMAGELISTS);
- ListView_SetImageList(list,
- CallService(MS_CLIST_GETICONSIMAGELIST,0,0),LVSIL_SMALL);
- lvc.mask:=LVCF_FMT+LVCF_IMAGE
- end
- else
- begin
- cli:=nil;
- SetWindowLongW(list,GWL_STYLE,
- GetWindowLongW(list,GWL_STYLE) and not LVS_SHAREIMAGELISTS);
-// ListView_SetImageList(list,0,LVSIL_SMALL);
- lvc.mask:=LVCF_FMT;
- end;
- lvc.fmt:={LVCFMT_IMAGE or} LVCFMT_LEFT;
- ListView_InsertColumn(list,0,lvc);
-
- AddString(0,true,nil);
- ListView_SetItemState (list,0,LVIS_FOCUSED or LVIS_SELECTED,$000F);
- with protos^[proto] do
- begin
- if (status and psf_online )<>0 then AddString(1,(enabled and psf_online )<>0,cli);
- if (status and psf_invisible )<>0 then AddString(2,(enabled and psf_invisible )<>0,cli);
- if (status and psf_shortaway )<>0 then AddString(3,(enabled and psf_shortaway )<>0,cli);
- if (status and psf_longaway )<>0 then AddString(4,(enabled and psf_longaway )<>0,cli);
- if (status and psf_lightdnd )<>0 then AddString(5,(enabled and psf_lightdnd )<>0,cli);
- if (status and psf_heavydnd )<>0 then AddString(6,(enabled and psf_heavydnd )<>0,cli);
- if (status and psf_freechat )<>0 then AddString(7,(enabled and psf_freechat )<>0,cli);
- if (status and psf_outtolunch)<>0 then AddString(8,(enabled and psf_outtolunch)<>0,cli);
- if (status and psf_onthephone)<>0 then AddString(9,(enabled and psf_onthephone)<>0,cli);
- end;
- ListView_SetColumnWidth(list,0,LVSCW_AUTOSIZE);
-end;
-
-procedure CheckStatusList(list:hwnd;ProtoNum:cardinal);
-
- procedure SetStatusMask(stat:integer;state:bool);
- var
- i:integer;
- begin
- case stat of
- ID_STATUS_ONLINE: i:=psf_online;
- ID_STATUS_INVISIBLE: i:=psf_invisible;
- ID_STATUS_AWAY: i:=psf_shortaway;
- ID_STATUS_NA: i:=psf_longaway;
- ID_STATUS_OCCUPIED: i:=psf_lightdnd;
- ID_STATUS_DND: i:=psf_heavydnd;
- ID_STATUS_FREECHAT: i:=psf_freechat;
- ID_STATUS_OUTTOLUNCH: i:=psf_outtolunch;
- ID_STATUS_ONTHEPHONE: i:=psf_onthephone;
- else
- exit;
- end;
- with protos^[ProtoNum] do
- if state then
- enabled:=enabled or i
- else
- enabled:=enabled and not i;
- end;
-
-var
- i:integer;
- Item:TLVITEM;
-begin
- for i:=1 to ListView_GetItemCount(list)-1 do //skip default
- begin
- Item.iItem:=i;
- Item.mask:=LVIF_PARAM;
- ListView_GetItem(list,Item);
- SetStatusMask(Item.lParam,ListView_GetCheckState(list,i)=BST_CHECKED)
- end;
-end;
-
-function CreateProtoList:integer;
-var
- protoCount,i:integer;
- proto:^PPROTOCOLDESCRIPTOR;
- buf:array [0..127] of AnsiChar;
- flag:integer;
- p:pAnsichar;
-begin
- CallService(MS_PROTO_ENUMPROTOCOLS,integer(@protoCount),dword(@proto));
- mGetMem(protos,(protoCount+1)*SizeOf(tMyProto)); // 0 - default
- NumProto:=0;
- with protos^[0] do
- begin
- name :=defproto;
- status :=-1;
- enabled:=-1;
- end;
- for i:=1 to protoCount do
- begin
- if proto^^._type=PROTOTYPE_PROTOCOL then
- begin
- inc(NumProto);
- with protos^[NumProto] do
- begin
- name :=proto^^.szName;
-// xstat :=-1;
- enabled:=psf_all;//psf_enabled;
- status :=0;
- flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_2,0);
- if (flag and PF2_ONLINE) <>0 then status:=status or psf_online;
- if (flag and PF2_INVISIBLE) <>0 then status:=status or psf_invisible;
- if (flag and PF2_SHORTAWAY) <>0 then status:=status or psf_shortaway;
- if (flag and PF2_LONGAWAY) <>0 then status:=status or psf_longaway;
- if (flag and PF2_LIGHTDND) <>0 then status:=status or psf_lightdnd;
- if (flag and PF2_HEAVYDND) <>0 then status:=status or psf_heavydnd;
- if (flag and PF2_FREECHAT) <>0 then status:=status or psf_freechat;
- if (flag and PF2_OUTTOLUNCH)<>0 then status:=status or psf_outtolunch;
- if (flag and PF2_ONTHEPHONE)<>0 then status:=status or psf_onthephone;
-
- flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_1,0);
- if ((flag and PF1_CHAT)<>0) or
- (DBReadByte(0,name,'CtcpChatAccept',13)<>13) or // IRC
- (DBReadByte(0,name,'Jud',13)<>13) then // Jabber
-// flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_1,0);
-// if (flag and PF1_CHAT)<>0 then
- status:=status or psf_chat;
- p:=StrCopyE(buf,name);
- StrCopy(p,PS_ICQ_GETCUSTOMSTATUS);
- if PluginLink^.ServiceExists(buf)<>0 then
- status:=status or psf_icq;
-
- StrCopy(p,PS_SET_LISTENINGTO);
- if PluginLink^.ServiceExists(buf)<>0 then
- status:=status or psf_tunes;
-
- end;
- end;
- inc(proto);
- end;
-
- if PluginLink^.ServiceExists(MS_NAS_SETSTATEA)<>0 then
- NASPresents:=true
- else
- NASPresents:=false;
-
- result:=NumProto;
-end;
-
-procedure FreeProtoList;
-begin
- mFreeMem(protos);
- NumProto:=0;
-end;
-
-function SetStatus(proto:PAnsiChar;status:integer;txt:PAnsiChar=pointer(-1)):integer;
-var
- nas:TNAS_PROTOINFO;
-begin
- if status>0 then
- result:=CallProtoService(proto,PS_SETSTATUS,status,0)
- else
- result:=-1;
- if integer(txt)<>-1 then
- begin
- if not NASPresents then
- result:=CallProtoService(proto,PS_SETAWAYMSG,abs(status),dword(txt))
- else
- begin
- {
- nas.Msg.w:=mmi.malloc((StrLenW(txt)+1)*SizeOf(WideChar));
- nas.Msg.w^:=#0;
- StrCopyW(nas.Msg.w,txt);
- }
- StrDup(nas.Msg.a,txt);
- nas.Flags :=0;
- nas.cbSize :=SizeOf(nas);
- nas.szProto:=proto;
- nas.status :=abs(status){0};
- result:=PluginLink^.CallService(MS_NAS_SETSTATEA,LPARAM(@nas),1);
- end;
- end;
-end;
-
-function SetXStatus(proto:PAnsiChar;newstatus:integer;
- txt:pWideChar=nil;title:pWideChar=nil):integer;
-var
- ics:TICQ_CUSTOM_STATUS;
-begin
- result:=0;
- if IsXStatusSupported(dword(proto)) then
- begin
- with ics do
- begin
- cbSize:=SizeOf(ics);
- flags:=CSSF_UNICODE;
- if newstatus>=0 then
- begin
- flags:=flags or CSSF_MASK_STATUS;
- status:=@newstatus;
- end;
- if integer(title)<>-1 then
- begin
- flags:=flags or CSSF_MASK_NAME;
- szName.w:=title;
- end;
- if integer(title)<>-1 then
- begin
- flags:=flags or CSSF_MASK_MESSAGE;
- szMessage.w:=txt;
- end;
- end;
- result:=CallProtoService(proto,PS_ICQ_SETCUSTOMSTATUSEX,0,dword(@ics));
- end;
-end;
-
-function GetXStatus(proto:PAnsiChar;txt:pointer=nil;title:pointer=nil):integer;
-var
- buf:array [0..127] of AnsiChar;
- pc:PAnsiChar;
- param:array [0..63] of AnsiChar;
-
-// ics:TICQ_CUSTOM_STATUS;
-// i,j:integer;
-begin
- result:=0;
- if IsXStatusSupported(dword(proto)) then
- begin
-{
- with ics do
- begin
- cbSize:=SizeOf(ics);
- flags:=CSSF_STR_SIZES;
- wParam:=@i;
- lParam:=@j;
- end;
- CallProtoService(0,PS_ICQ_GETCUSTOMSTATUSEX,0,dword(@ics));
- if title<>nil then
- mGetMem(title^,(i+1)*SizeOf(WideChar));
- if txt<>nil then
- mGetMem(txt^,(j+1)*SizeOf(WideChar));
-
- with ics do
- begin
- cbSize:=SizeOf(ics);
- flags:=CSSF_MASK_STATUS or CSSF_MASK_NAME or CSSF_MASK_MESSAGE or CSSF_UNICODE;
- status:=@result;
- szName.w :=pdword(title)^;
- szMessage.w:=pdword(txt)^;
- end;
- CallProtoService(0,PS_ICQ_GETCUSTOMSTATUSEX,0,dword(@ics));
-}
-
- StrCopy(buf,proto);
- StrCat (buf,PS_ICQ_GETCUSTOMSTATUS);
- result:=PluginLink^.CallService(buf,0,0);
- if (txt<>nil) or (title<>nil) then
- begin
- move('XStatus',param,7);
- IntToStr(param+7,result);
- pc:=strend(param);
-
- if txt<>nil then
- begin
- StrCopy(pc,'Msg'); pWideChar(txt^):=DBReadUnicode(0,proto,param,nil);
- end;
- if title<>nil then
- begin
- StrCopy(pc,'Name'); pWideChar(title^):=DBReadUnicode(0,proto,param,nil);
- end;
- end;
-
- end;
-end;
-
-end.
diff --git a/delphi/Awkward/utils/syswin.pas b/delphi/Awkward/utils/syswin.pas
deleted file mode 100644
index d22700e..0000000
--- a/delphi/Awkward/utils/syswin.pas
+++ /dev/null
@@ -1,734 +0,0 @@
-unit SysWin;
-{$include compilers.inc}
-
-interface
-
-uses windows;
-
-type
- FFWFilterProc = function(fname:pWideChar):boolean;
-
-const
- ThreadTimeout = 50;
-const
- gffdMultiThread = 1;
- gffdOld = 2;
-
-function GetWorkOfflineStatus:integer;
-
-function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
-function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
-
-function SendString(wnd:HWND;astr:PWideChar):integer; overload;
-function SendString(wnd:HWND;astr:PAnsiChar):integer; overload;
-procedure ProcessMessages;
-function GetFocusedChild(wnd:HWND):HWND;
-function GetAssoc(key:PAnsiChar):PAnsiChar;
-function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar; overload;
-function GetEXEbyWnd(w:HWND; var dst:PAnsiChar):PAnsiChar; overload;
-function IsExeRunning(exename:PWideChar):boolean; {hwnd}
-function GetFileFromWnd(wnd:HWND;Filter:FFWFilterProc;
- flags:dword=gffdMultiThread+gffdOld):pWideChar;
-
-function WaitFocusedWndChild(Wnd:HWnd):HWnd;
-
-implementation
-
-uses shellapi,PSAPI,common,messages;
-
-function GetWorkOfflineStatus:integer;
-var
- lKey:HKEY;
- len,typ:dword;
-begin
- result:=0;
- if RegOpenKeyEx(HKEY_CURRENT_USER,
- 'Software\Microsoft\Windows\CurrentVersion\Internet Settings',0,
- KEY_READ,lKey)=ERROR_SUCCESS then
- begin
- len:=4;
- typ:=REG_DWORD;
- if RegQueryValueEx(lKey,'GlobalUserOffline',NIL,@typ,@result,@len)=ERROR_SUCCESS then
- ;
- RegCloseKey(lKey);
- end;
-end;
-
-function ExecuteWaitW(AppPath:pWideChar; CmdLine:pWideChar=nil; DfltDirectory:PWideChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
-var
- Flags: DWORD;
- Startup: {$IFDEF DELPHI10_UP}TStartupInfoW{$ELSE}TStartupInfo{$ENDIF};
- ProcInf: TProcessInformation;
- App: array [0..1023] of widechar;
- p:PWideChar;
- ext1,ext2:array [0..7] of widechar;
-begin
- Result := cardinal(-1);
- if FindExecutableW(AppPath,DfltDirectory,App)<=32 then
- exit;
- if lstrcmpiw(GetExt(AppPath,ext1,7),GetExt(App,ext2,7))<>0 then
- CmdLine:=AppPath;
- Flags := CREATE_NEW_CONSOLE;
- if Show = SW_HIDE then
- Flags := Flags or CREATE_NO_WINDOW;
- FillChar(Startup, SizeOf(Startup),0);
- with Startup do
- begin
- cb :=SizeOf(Startup);
- wShowWindow:=Show;
- dwFlags :=STARTF_USESHOWWINDOW;
- end;
- if ProcID <> nil then
- ProcID^ := 0;
- p:=StrEndW(App);
- if (CmdLine<>nil) and (CmdLine^<>#0) then
- begin
- p^:=' ';
- inc(p);
- StrCopyW(p,CmdLine);
- end;
- if CreateProcessW(nil,App,nil,nil,FALSE,Flags,nil,DfltDirectory,Startup,ProcInf) then
- begin
- if TimeOut<>0 then
- begin
- if WaitForSingleObject(ProcInf.hProcess,TimeOut)=WAIT_OBJECT_0 then
- begin
- GetExitCodeProcess(ProcInf.hProcess,result);
- CloseHandle(ProcInf.hProcess);
- end
- else
- begin
- result:=1;
- if ProcID<>nil then
- ProcID^:=ProcInf.hProcess;
- end;
- end
- else
- begin
- GetExitCodeProcess(ProcInf.hProcess,result);
- CloseHandle(ProcInf.hProcess);
- end;
- CloseHandle(ProcInf.hThread);
- end;
-end;
-
-function ExecuteWait(AppPath:PAnsiChar; CmdLine:PAnsiChar=nil; DfltDirectory:PAnsiChar=nil;
- Show:DWORD=SW_SHOWNORMAL; TimeOut:DWORD=0; ProcID:PDWORD=nil):dword;
-var
- Flags: DWORD;
- Startup: {$IFDEF DELPHI10_UP}TStartupInfoA{$ELSE}TStartupInfo{$ENDIF};
-// Startup: TStartupInfoA;
- ProcInf: TProcessInformation;
- App: array [0..1023] of AnsiChar;
- p:PAnsiChar;
- ext1,ext2:array [0..7] of AnsiChar;
-begin
- Result := cardinal(-1);
- if FindExecutableA(AppPath,DfltDirectory,App)<=32 then
- exit;
- if lstrcmpia(GetExt(AppPath,ext1,7),GetExt(App,ext2,7))<>0 then
- CmdLine:=AppPath;
- Flags := CREATE_NEW_CONSOLE;
- if Show = SW_HIDE then
- Flags := Flags or CREATE_NO_WINDOW;
- FillChar(Startup, SizeOf(Startup),0);
- with Startup do
- begin
- cb :=SizeOf(Startup);
- wShowWindow:=Show;
- dwFlags :=STARTF_USESHOWWINDOW;
- end;
- if ProcID <> nil then
- ProcID^ := 0;
- p:=StrEnd(App);
- if (CmdLine<>nil) and (CmdLine^<>#0) then
- begin
- p^:=' ';
- inc(p);
- StrCopy(p,CmdLine);
- end;
- if CreateProcessA(nil,App,nil,nil,FALSE,Flags,nil,DfltDirectory,Startup,ProcInf) then
- begin
- if TimeOut<>0 then
- begin
- if WaitForSingleObject(ProcInf.hProcess,TimeOut)=WAIT_OBJECT_0 then
- begin
- GetExitCodeProcess(ProcInf.hProcess,result);
- CloseHandle(ProcInf.hProcess);
- end
- else
- begin
- result:=1;
- if ProcID<>nil then
- ProcID^:=ProcInf.hProcess;
- end;
- end
- else
- begin
- GetExitCodeProcess(ProcInf.hProcess,result);
- CloseHandle(ProcInf.hProcess);
- end;
- CloseHandle(ProcInf.hThread);
- end;
-end;
-
-function WaitFocusedWndChild(Wnd:HWnd):HWnd;
-var
- T1,T2:Integer;
- W:HWnd;
-begin
- Sleep(50);
- T1:=GetTickCount;
- repeat
- W:=GetTopWindow(Wnd);
- if W=0 then W:=Wnd;
- W:=GetFocusedChild(W);
- if W<>0 then
- begin
- Wnd:=W;
- break;
- end;
- T2:=GetTickCount;
- if Abs(T1-T2)>100 then break;
- until false;
- Result:=Wnd;
-end;
-
-function SendString(wnd:HWND;astr:PWideChar):integer;
-var
- s,s0:PWideChar;
- style:integer;
-begin
- result:=0;
- if (astr=nil) or (astr^=#0) then exit;
- if wnd=0 then
- begin
- wnd:=WaitFocusedWndChild(GetForegroundWindow);
- if wnd=0 then Exit;
- end;
- style:=GetWindowLongW(wnd,GWL_STYLE);
- if (style and (WS_DISABLED or ES_READONLY))=0 then
- begin
- StrDupW(s,astr); //??
- s0:=s;
- while s^<>#0 do
- begin
- if s^<>#10 then
- PostMessageW(Wnd,WM_CHAR,ord(s^),1);
- Inc(s);
- end;
- mFreeMem(s0); //??
- result:=1;
- end;
-end;
-
-function SendString(wnd:HWND;astr:PAnsiChar):integer;
-var
- s,s0:PAnsiChar;
- style:integer;
-begin
- result:=0;
- if (astr=nil) or (astr^=#0) then exit;
- if wnd=0 then
- begin
- wnd:=WaitFocusedWndChild(GetForegroundWindow);
- if wnd=0 then Exit;
- end;
- style:=GetWindowLongA(wnd,GWL_STYLE);
- if (style and (WS_DISABLED or ES_READONLY))=0 then
- begin
- StrDup(s,astr); //??
- s0:=s;
- while s^<>#0 do
- begin
- if s^<>#10 then
- PostMessageA(Wnd,WM_CHAR,ord(s^),1);
- Inc(s);
- end;
- mFreeMem(s0); //??
- result:=1;
- end;
-end;
-
-procedure ProcessMessages;
-var
- Unicode: Boolean;
- MsgExists: Boolean;
- Msg:TMsg;
-begin
- repeat
- if PeekMessageA(Msg,0,0,0,PM_NOREMOVE) then
- begin
- Unicode:=(Msg.hwnd<>0) and IsWindowUnicode(Msg.hwnd);
- if Unicode then
- MsgExists:=PeekMessageW(Msg,0,0,0,PM_REMOVE)
- else
- MsgExists:=PeekMessageA(Msg,0,0,0,PM_REMOVE);
- if not MsgExists then break;
-
- if Msg.Message<>WM_QUIT then
- begin
- TranslateMessage(Msg);
- if Unicode then
- DispatchMessageW(Msg)
- else
- DispatchMessageA(Msg);
- end;
- end
- else
- break;
- until false;
-end;
-
-function GetFocusedChild(wnd:HWND):HWND;
-var
- dwTargetOwner:DWORD;
- dwThreadID:DWORD;
- res:boolean;
-begin
- dwTargetOwner:=GetWindowThreadProcessId(wnd,nil);
- dwThreadID:=GetCurrentThreadId();
- res:=false;
- if (dwTargetOwner<>dwThreadID) then
- res:=AttachThreadInput(dwThreadID,dwTargetOwner,TRUE);
- result:=GetFocus;
- if res then
- AttachThreadInput(dwThreadID,dwTargetOwner,FALSE);
-end;
-
-function GetAssoc(key:PAnsiChar):PAnsiChar;
-var
- lKey:HKEY;
- tmpbuf:array [0..511] of AnsiChar;
- len:integer;
-begin
- result:=nil;
- if RegOpenKeyExA(HKEY_CLASSES_ROOT,key,0,
- KEY_READ,lKey)=ERROR_SUCCESS then
- begin
- len:=511;
- if (RegQueryValueExA(lKey,NIL,NIL,NIL,@tmpbuf,@len)=ERROR_SUCCESS) then
- begin
- StrDup(result,tmpbuf);
-// only path
-// while result[len]<>'\' do dec(len);
-// StrCopy(result,result+2,len-3);
- end;
- RegCloseKey(lKey);
- end;
-end;
-
-type
- TThreadInfo = record
- ftCreationTime:TFileTime;
- dwUnknown1:dword;
- dwStartAddress:dword;
- dwOwningPID:dword;
- dwThreadID:dword;
- dwCurrentPriority:dword;
- dwBasePriority:dword;
- dwContextSwitches:dword;
- dwThreadState:dword;
- dwUnknown2:dword;
- dwUnknown3:dword;
- dwUnknown4:dword;
- dwUnknown5:dword;
- dwUnknown6:dword;
- dwUnknown7:dword;
- end;
-
- TProcessInfo = record
- dwOffset:dword;
- dwThreadCount:dword;
- dwUnknown1:array[0..5] of dword;
- ftCreationTime:TFileTime;
- ftUserTime:int64;
- ftKernelTime:int64;
- wLength:word;
- wMaximumLength:word;
- pszProcessName:pWideChar;
- dwBasePriority:dword;
- dwProcessID:dword;
- dwParentProcessID:dword;
- dwHandleCount:dword;
-// not interesting
- dwUnknown7:dword;
- dwUnknown8:dword;
- dwVirtualBytesPeak:dword;
- dwVirtualBytes:dword;
- dwPageFaults:dword;
- dwWorkingSetPeak:dword;
- dwWorkingSet:dword;
- dwUnknown9:dword;
- dwPagedPool:dword;
- dwUnknown10:dword;
- dwNonPagedPool:dword;
- dwPageFileBytesPeak:dword;
- dwPageFileBytes:dword;
- dwPrivateBytes:dword;
- dwUnknown11:dword;
- dwUnknown12:dword;
- dwUnknown13:dword;
- dwUnknown14:dword;
- ati:array[0..0] of TThreadInfo;
- end;
-
-function NtQuerySystemInformation(si_class:cardinal;si:pointer;si_length:cardinal;ret_length:cardinal):cardinal; stdcall; external 'ntdll.dll';
-function NtQueryObject(ObjectHandle:THANDLE;ObjectInformationClass:dword;ObjectInformation:pointer;Length:dword;var ResultLength:dword):cardinal; stdcall; external 'ntdll.dll';
-const
- ObjectNameInformation = 1; // +4 bytes
- ObjectTypeInformation = 2; // +$60 bytes
-const
- STATUS_INFO_LENGTH_MISMATCH = $C0000004;
-
-function GetHandleCount(pid:dword):dword;
-var
- buf:pointer;
- pi:^TProcessInfo;
-begin
-{BOOL GetProcessHandleCount(
- HANDLE hProcess,
- PDWORD pdwHandleCount
-}
- mGetMem(buf,300000);
- NtQuerySystemInformation(5, buf, 300000, 0);
- pi:=buf;
- result:=0;
- repeat
- pi:=pointer(cardinal(pi)+pi^.dwOffset); //first - Idle process
- if pi^.dwProcessID=pid then
- begin
- result:=pi^.dwHandleCount;
- break;
- end;
- if pi^.dwOffset=0 then
- break;
- until false;
- mFreeMem(buf);
-end;
-
-function GetEXEbyWnd(w:HWND; var dst:pWideChar):pWideChar;
-var
- hProcess:THANDLE;
- ProcID:DWORD;
- ModuleName: array [0..300] of WideChar;
-begin
- dst:=nil;
- GetWindowThreadProcessId(w,@ProcID);
- if ProcID<>0 then
- begin
- hProcess:=OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,False,ProcID);
- if hProcess<>0 then
- begin
- ModuleName[0]:=#0;
- GetModuleFilenameExW(hProcess,0,ModuleName,SizeOf(ModuleName));
- StrDupW(dst,ModuleName);
- CloseHandle(hProcess);
- end;
- end;
- result:=dst;
-end;
-
-function GetEXEbyWnd(w:HWND; var dst:PAnsiChar):PAnsiChar;
-var
- hProcess:THANDLE;
- ProcID:DWORD;
- ModuleName: array [0..300] of AnsiChar;
-begin
- dst:=nil;
- GetWindowThreadProcessId(w,@ProcID);
- if ProcID<>0 then
- begin
- hProcess:=OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,False,ProcID);
- if hProcess<>0 then
- begin
- ModuleName[0]:=#0;
- GetModuleFilenameExA(hProcess,0,ModuleName,SizeOf(ModuleName));
- StrDup(dst,ModuleName);
- CloseHandle(hProcess);
- end;
- end;
- result:=dst;
-end;
-
-function IsExeRunning(exename:PWideChar):boolean;{hwnd}
-const
- nCount = 4096;
-var
- Processes:array [0..nCount-1] of dword;
- nProcess:dword;
- hProcess:THANDLE;
- ModuleName: array [0..300] of WideChar;
- i:integer;
-begin
- result:=false;
- EnumProcesses(pointer(@Processes),nCount*SizeOf(DWORD),nProcess);
- nProcess:=(nProcess div 4)-1;
- for i:=2 to nProcess do //skip Idle & System
- begin
- hProcess:=OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,
- False,Processes[i]);
- if hProcess<>0 then
- begin
- GetModuleFilenameExW(hProcess,0,ModuleName,SizeOf(ModuleName));
- result:=lstrcmpiw(extractw(ModuleName,true),exename)=0;
- CloseHandle(hProcess);
- if result then exit;
- end;
- end;
-end;
-
-function TranslatePath(fn:PWideChar):PWideChar;
-const
- LANPrefix:PWideChar = '\Device\LanmanRedirector\';
-var
- szTemp:array [0..511] of WideChar;
- szName:array [0..511] of WideChar;
- p:PWideChar;
- uNameLen:word;
- szTempFile:array [0..511] of WideChar;
-begin
- if StrPosW(fn,LANPrefix)=fn then
- begin
- uNameLen:=StrLenW(LANPrefix);
- mGetMem(result,(StrLenW(fn)-uNameLen+3)*SizeOf(WideChar));
- result[0]:='\';
- result[1]:='\';
- StrCopyW(result+2,fn+uNameLen);
- exit;
- end;
- if GetLogicalDriveStringsW(255,@szTemp)<>0 then
- begin
- p:=szTemp;
- repeat
- p[2]:=#0;
- if QueryDosDeviceW(p,szName,255)<>0 then
- begin
- uNameLen:=StrLenW(szName)+1;
- if uNameLen<255 then
- begin
- StrCopyW(szTempFile,fn,uNameLen-1);
- if lstrcmpiw(szTempFile,szName)=0 then
- begin
- mGetMem(result,(StrLenW(fn+uNameLen)+4)*SizeOf(WideChar));
- result[0]:=WideChar(ORD(p[0]));
- result[1]:=':';
- result[2]:='\';
- StrCopyW(result+3,fn+uNameLen);
- exit;
- end;
- end;
- end;
- inc(p,4);
- until p^=#0;
- end;
- StrDupW(result,fn);
-end;
-
-const
- maxhandles = 15;
-var
- har,hold:array [0..maxhandles-1] of PWideChar;
- harcnt:integer;
-const
- oldcnt:integer=0;
-
-procedure ArSwitch(idx:integer);
-var
- j:integer;
- h:pWideChar;
-begin
-//clear old
- j:=0;
- while j<oldcnt do
- begin
- FreeMem(hold[j]);
- inc(j);
- end;
-//copy new to old
- move(har,hold,SizeOf(har));
- oldcnt:=harcnt;
-// move active to begin
- if idx<>0 then
- begin
- h :=hold[idx];
- hold[idx]:=hold[0];
- hold[0] :=h;
- end;
-end;
-
-function CheckHandles(ReturnNew:bool):integer;
-var
- i,j:integer;
- flg:boolean;
-begin
- result:=0;
- if oldcnt=0 then //first time
- begin
- ArSwitch(0);
- exit;
- end;
- i:=0;
- if ReturnNew then
- begin
- while i<harcnt do
- begin
- flg:=false;
- j:=0;
- while j<oldcnt do
- begin
- if StrCmpW(har[i],hold[j])=0 then
- begin
- flg:=true; //old=new
- break;
- end;
- inc(j);
- end;
- if not flg then // new!!
- begin
- ArSwitch(i);
- exit;
- end;
- inc(i);
- end;
- end
- else
- begin
- while i<oldcnt do
- begin
- j:=0;
- while j<harcnt do
- begin
- if StrCmpW(hold[i],har[j])=0 then
- begin
- ArSwitch(j);
- exit;
- end;
- inc(j);
- end;
- inc(i);
- end;
- end;
- ArSwitch(0);
- result:=-1;
-end;
-
-const
- MaxHandle = 8192;
-
-type
- prec = ^trec;
- trec = record
- handle:thandle;
- fname:pWideChar;
- end;
-
-const
- BufSize = $1000;
-var
- TmpBuf:array [0..BufSize-1] of WideChar;
-
-function GetName(param:pdword):dword; //stdcall;
-begin
- result:=0;
- if NTQueryObject(prec(param)^.handle,ObjectNameInformation,
- @TmpBuf,BufSize*SizeOf(WideChar),pdword(nil)^)=0 then
- begin
- GetMem(prec(param)^.fname,(lstrlenw(TmpBuf)-3)*SizeOf(WideChar));
- StrCopyW(prec(param)^.fname,TmpBuf+4);
- end;
-end;
-
-function TestHandle(Handle:THANDLE;MultiThread:bool):pWideChar;
-var
- hThread:THANDLE;
- rec:trec;
-begin
- result:=nil;
-
- if (NTQueryObject(Handle,ObjectTypeInformation,
- @TmpBuf,BufSize*SizeOf(WideChar),pdword(nil)^)<>0) or
- (StrCmpW(TmpBuf+$30,'File')<>0) then
- Exit;
-
- rec.handle:=Handle;
- rec.fname:=nil;
-
- if not MultiThread then
- begin
- GetName(@rec);
- result:=rec.fname;
- end
- else
- begin
- hThread:=BeginThread(nil,0,@GetName,@rec,0,pdword(nil)^);
- if WaitForSingleObject(hThread,ThreadTimeout)=WAIT_TIMEOUT then
- begin
- TerminateThread(hThread,0);
- end
- else
- result:=rec.fname;
- CloseHandle(hThread);
- end;
-end;
-
-function GetFileFromWnd(wnd:HWND;Filter:FFWFilterProc;
- flags:dword=gffdMultiThread+gffdOld):pWideChar;
-var
- hProcess,h:THANDLE;
- pid:dword;
- i:cardinal;
- c:thandle;
- Handles:dword;
- pc:pWideChar;
-begin
- result:=nil;
- i:=4;
- GetWindowThreadProcessId(wnd,@c);
- pid:=OpenProcess(PROCESS_DUP_HANDLE,true,c);
- Handles:=GetHandleCount(c)*4;
- harcnt:=0;
- hProcess:=GetCurrentProcess;
-
- while true do
- begin
- if DuplicateHandle(pid,i,hProcess,@h,GENERIC_READ,false,0) then
- begin
- pc:=TestHandle(h,(flags and gffdMultiThread)<>0);
- if pc<>nil then
- begin
-// if GetFileType(h)=FILE_TYPE_DISK then
- begin
- if (@Filter=nil) or Filter(pc) and (harcnt<maxhandles) then
- begin
- har[harcnt]:=pc;
- inc(harcnt);
- end
- else
- FreeMem(pc);
- end;
- end;
- CloseHandle(h);
- end
- else
- begin
- inc(handles,4); //skip empty number and non-duplicates
- if Handles>MaxHandle then break; //file not found
- end;
- inc(i,4);
- if i>Handles then
- break;
- end;
-
- CloseHandle(pid);
- if harcnt>0 then
- begin
- CheckHandles((flags and gffdOld)=0);
- result:=translatePath(hold[0]);
- end
-end;
-
-end.
diff --git a/delphi/Awkward/utils/utils.pas b/delphi/Awkward/utils/utils.pas
deleted file mode 100644
index 8c16e03..0000000
--- a/delphi/Awkward/utils/utils.pas
+++ /dev/null
@@ -1,44 +0,0 @@
-unit Utils;
-
-interface
-
-uses windows;
-
-function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):pWideChar;
-function SaveTemporary (ptr:pointer;size:dword;ext:PAnsiChar=nil):PAnsiChar;
-
-implementation
-
-uses common,io;
-
-function SaveTemporaryW(ptr:pointer;size:dword;ext:PWideChar=nil):pWideChar;
-var
- buf,buf1:array [0..MAX_PATH-1] of WideChar;
- f:THANDLE;
-begin
- GetTempPathW(MAX_PATH,buf);
- GetTempFileNameW(buf,'wat',GetCurrentTime,buf1);
- ChangeExtW(buf1,ext);
-
- f:=ReWrite(buf1);
- BlockWrite(f,pByte(ptr)^,size);
- CloseHandle(f);
- StrDupW(result,buf1);
-end;
-
-function SaveTemporary(ptr:pointer;size:dword;ext:PAnsiChar=nil):PAnsiChar;
-var
- buf,buf1:array [0..MAX_PATH-1] of AnsiChar;
- f:THANDLE;
-begin
- GetTempPathA(SizeOf(buf),buf);
- GetTempFileNameA(buf,'wat',GetCurrentTime,buf1);
- ChangeExt(buf1,ext);
-
- f:=ReWrite(buf1);
- BlockWrite(f,pByte(ptr)^,size);
- CloseHandle(f);
- StrDup(result,buf1);
-end;
-
-end. \ No newline at end of file
diff --git a/delphi/Awkward/utils/wrapper.pas b/delphi/Awkward/utils/wrapper.pas
deleted file mode 100644
index c7b4d05..0000000
--- a/delphi/Awkward/utils/wrapper.pas
+++ /dev/null
@@ -1,450 +0,0 @@
-{$include compilers.inc}
-unit wrapper;
-
-interface
-uses windows;
-
-function GetScreenRect():TRect;
-procedure SnapToScreen(var rc:TRect;dx:integer=0;dy:integer=0{;
- minw:integer=240;minh:integer=100});
-
-function LV_GetLParam (list:HWND;item:integer=-1):integer;
-function LV_SetLParam (list:HWND;lParam:dword;item:integer=-1):integer;
-function LV_ItemAtPos(wnd:HWND;Pt:TPOINT;var SubItem:dword):Integer; overload;
-function LV_ItemAtPos(wnd:HWND;x,y:integer;var SubItem:dword):Integer; overload;
-procedure LV_SetItem (handle:hwnd;str:PAnsiChar;item:integer;subitem:integer=0);
-procedure LV_SetItemW(handle:hwnd;str:PWideChar;item:integer;subitem:integer=0);
-function LV_MoveItem(list:hwnd;direction:integer;item:integer=-1):integer;
-function LV_GetColumnCount(list:HWND):integer;
-function LV_CheckDirection(list:HWND):integer; // bit 0 - can move up, bit 1 - down
-
-function GetDlgText(Dialog:HWND;idc:integer;getAnsi:boolean=false):pointer; overload;
-function GetDlgText(wnd:HWND;getAnsi:boolean=false):pointer; overload;
-function ShowDlg (dst:PAnsiChar;fname:PAnsiChar=nil;Filter:PAnsiChar=nil;open:boolean=true):boolean;
-function ShowDlgW(dst:PWideChar;fname:PWideChar=nil;Filter:PWideChar=nil;open:boolean=true):boolean;
-
-function SelectDirectory(Caption:PAnsiChar;var Directory:PAnsiChar;
- Parent:HWND=0;newstyle:bool=false):Boolean; overload;
-function SelectDirectory(Caption:PWideChar;var Directory:PWideChar;
- Parent:HWND=0;newstyle:bool=false):Boolean; overload;
-
-function CB_SelectData(cb:HWND;data:dword):integer; overload;
-function CB_SelectData(Dialog:HWND;id:cardinal;data:dword):integer; overload;
-function CB_GetData (cb:HWND;idx:integer=-1):dword;
-function CB_AddStrData (cb:HWND;astr:pAnsiChar;data:integer=0;idx:integer=-1):HWND;
-function CB_AddStrDataW(cb:HWND;astr:pWideChar;data:integer=0;idx:integer=-1):HWND;
-
-implementation
-uses messages,common,shlobj,activex,commctrl,commdlg;
-
-{.$IFNDEF DELPHI10_UP}
-const
- LVM_SORTITEMSEX = LVM_FIRST + 81;
-{.$ENDIF}
-{$IFNDEF DELPHI7_UP}
-const
- BIF_NEWDIALOGSTYLE = $0040;
-const
- SM_XVIRTUALSCREEN = 76;
- SM_YVIRTUALSCREEN = 77;
- SM_CXVIRTUALSCREEN = 78;
- SM_CYVIRTUALSCREEN = 79;
-{$ENDIF}
-
-function GetScreenRect():TRect;
-begin
- result.left := GetSystemMetrics( SM_XVIRTUALSCREEN );
- result.top := GetSystemMetrics( SM_YVIRTUALSCREEN );
- result.right := GetSystemMetrics( SM_CXVIRTUALSCREEN ) + result.left;
- result.bottom:= GetSystemMetrics( SM_CYVIRTUALSCREEN ) + result.top;
-end;
-
-procedure SnapToScreen(var rc:TRect;dx:integer=0;dy:integer=0{;
- minw:integer=240;minh:integer=100});
-var
- rect:TRect;
-begin
- rect:=GetScreenRect;
- if rc.right >rect.right then rc.right :=rect.right -dx;
- if rc.bottom>rect.bottom then rc.bottom:=rect.bottom-dy;
- if rc.left <rect.left then rc.left :=rect.left;
- if rc.top <rect.top then rc.top :=rect.top;
-end;
-
-function GetDlgText(wnd:HWND;getAnsi:boolean=false):pointer;
-var
- a:cardinal;
-begin
- result:=nil;
- if getAnsi then
- begin
- a:=SendMessageA(wnd,WM_GETTEXTLENGTH,0,0)+1;
- if a>1 then
- begin
- mGetMem(PAnsiChar(result),a);
- SendMessageA(wnd,WM_GETTEXT,a,longint(result));
- end;
- end
- else
- begin
- a:=SendMessageW(wnd,WM_GETTEXTLENGTH,0,0)+1;
- if a>1 then
- begin
- mGetMem(pWideChar(result),a*SizeOf(WideChar));
- SendMessageW(wnd,WM_GETTEXT,a,longint(result));
- end;
- end;
-end;
-
-function GetDlgText(Dialog:HWND;idc:integer;getAnsi:boolean=false):pointer;
-begin
- result:=GetDlgText(GetDlgItem(Dialog,idc),getAnsi);
-end;
-
-function ShowDlg(dst:PAnsiChar;fname:PAnsiChar=nil;Filter:PAnsiChar=nil;open:boolean=true):boolean;
-var
- NameRec:OpenFileNameA;
-begin
- FillChar(NameRec,SizeOf(NameRec),0);
- with NameRec do
- begin
- LStructSize:=SizeOf(NameRec);
- if fname=nil then
- dst[0]:=#0
- else if fname<>dst then
- StrCopy(dst,fname);
-// lpstrInitialDir:=dst;
- lpStrFile :=dst;
- lpStrFilter:=Filter;
- if Filter<>nil then
- begin
- lpstrDefExt:=StrEnd(Filter)+1;
- inc(lpstrDefExt,2); // skip "*."
- end;
- NMaxFile :=511;
- Flags :=OFN_EXPLORER or OFN_OVERWRITEPROMPT;// or OFN_HIDEREADONLY;
- end;
- if open then
- result:=GetOpenFileNameA(NameRec)
- else
- result:=GetSaveFileNameA(NameRec);
-end;
-
-function ShowDlgW(dst:PWideChar;fname:PWideChar=nil;Filter:PWideChar=nil;open:boolean=true):boolean;
-var
- NameRec:OpenFileNameW;
-begin
- FillChar(NameRec,SizeOf(NameRec),0);
- with NameRec do
- begin
- LStructSize:=SizeOf(NameRec);
- if fname=nil then
- dst[0]:=#0
- else if fname<>dst then
- StrCopyW(dst,fname);
-// lpstrInitialDir:=dst;
- lpStrFile :=dst;
- lpStrFilter:=Filter;
- if Filter<>nil then
- begin
- lpstrDefExt:=StrEndW(Filter)+1;
- inc(lpstrDefExt,2); // skip "*."
- end;
- NMaxFile :=511;
- Flags :=OFN_EXPLORER or OFN_OVERWRITEPROMPT;// or OFN_HIDEREADONLY;
- end;
- if open then
- result:=GetOpenFileNameW(NameRec)
- else
- result:=GetSaveFileNameW(NameRec)
-end;
-
-procedure LV_SetItem(handle:hwnd;str:PAnsiChar;item:integer;subitem:integer=0);
-var
- li:LV_ITEMA;
-begin
-// zeromemory(@li,sizeof(li));
- li.mask :=LVIF_TEXT;
- li.pszText :=str;
- li.iItem :=item;
- li.iSubItem:=subitem;
- SendMessageA(handle,LVM_SETITEMA,0,integer(@li));
-end;
-
-procedure LV_SetItemW(handle:hwnd;str:PWideChar;item:integer;subitem:integer=0);
-var
- li:LV_ITEMW;
-begin
-// zeromemory(@li,sizeof(li));
- li.mask :=LVIF_TEXT;
- li.pszText :=str;
- li.iItem :=item;
- li.iSubItem:=subitem;
- SendMessageW(handle,LVM_SETITEMW,0,integer(@li));
-end;
-
-function SelectDirectory(Caption:PAnsiChar;var Directory:PAnsiChar;
- Parent:HWND=0;newstyle:bool=false):Boolean;
-var
- BrowseInfo:TBrowseInfoA;
- Buffer:array [0..MAX_PATH-1] of AnsiChar;
- ItemIDList:PItemIDList;
- ShellMalloc:IMalloc;
-begin
- Result:=False;
- FillChar(BrowseInfo,SizeOf(BrowseInfo),0);
- if (ShGetMalloc(ShellMalloc)=S_OK) and (ShellMalloc<>nil) then
- begin
- with BrowseInfo do
- begin
- hwndOwner :=Parent;
- pszDisplayName:=Buffer;
- lpszTitle :=Caption;
- ulFlags :=BIF_RETURNONLYFSDIRS;
- end;
- if newstyle then
- if CoInitializeEx(nil,COINIT_APARTMENTTHREADED)<>RPC_E_CHANGED_MODE then
- BrowseInfo.ulFlags:=BrowseInfo.ulFlags or BIF_NEWDIALOGSTYLE;
- try
- ItemIDList:=ShBrowseForFolderA(BrowseInfo);
- Result:=ItemIDList<>nil;
- if Result then
- begin
- ShGetPathFromIDListA(ItemIDList,Buffer);
- StrDup(Directory,Buffer);
- ShellMalloc.Free(ItemIDList);
- end;
- finally
- if newstyle then CoUninitialize;
- end;
- end;
-end;
-
-function SelectDirectory(Caption:PWideChar;var Directory:PWideChar;
- Parent:HWND=0;newstyle:bool=false):Boolean;
-var
- BrowseInfo:TBrowseInfoW;
- Buffer:array [0..MAX_PATH-1] of WideChar;
- ItemIDList:PItemIDList;
- ShellMalloc:IMalloc;
-begin
- Result:=False;
- FillChar(BrowseInfo,SizeOf(BrowseInfo),0);
- if (ShGetMalloc(ShellMalloc)=S_OK) and (ShellMalloc<>nil) then
- begin
- with BrowseInfo do
- begin
- hwndOwner :=Parent;
- pszDisplayName:=Buffer;
- lpszTitle :=Caption;
- ulFlags :=BIF_RETURNONLYFSDIRS;
- end;
- if newstyle then
- if CoInitializeEx(nil,COINIT_APARTMENTTHREADED)<>RPC_E_CHANGED_MODE then
- BrowseInfo.ulFlags:=BrowseInfo.ulFlags or BIF_NEWDIALOGSTYLE;
- try
- ItemIDList:=ShBrowseForFolderW(BrowseInfo);
- Result:=ItemIDList<>nil;
- if Result then
- begin
- ShGetPathFromIDListW(ItemIDList,Buffer);
- StrDupW(Directory,Buffer);
- ShellMalloc.Free(ItemIDList);
- end;
- finally
- if newstyle then CoUninitialize;
- end;
- end;
-end;
-
-//----- ListView functions -----
-
-function LV_GetLParam(list:HWND;item:integer=-1):integer;
-var
- li:LV_ITEMW;
-begin
- if item<0 then
- begin
- item:=SendMessage(list,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
- if item<0 then
- begin
- result:=-1;
- exit;
- end;
- end;
- li.iItem :=item;
- li.mask :=LVIF_PARAM;
- li.iSubItem:=0;
- SendMessageW(list,LVM_GETITEMW,0,dword(@li));
- result:=li.lParam;
-end;
-
-function LV_SetLParam(list:HWND;lParam:dword;item:integer=-1):integer;
-var
- li:LV_ITEMW;
-begin
- if item<0 then
- begin
- item:=SendMessage(list,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
- if item<0 then
- begin
- result:=-1;
- exit;
- end;
- end;
- li.iItem :=item;
- li.mask :=LVIF_PARAM;
- li.lParam :=lParam;
- li.iSubItem:=0;
- SendMessageW(list,LVM_SETITEMW,0,dword(@li));
- result:=lParam;
-end;
-
-function LV_ItemAtPos(wnd:HWND;Pt:TPOINT;var SubItem:dword):Integer;
-var
- HTI:LV_HITTESTINFO;
-begin
- HTI.pt.x := Pt.X;
- HTI.pt.y := Pt.Y;
- SendMessage(wnd,LVM_SUBITEMHITTEST,0,Integer(@HTI));
- Result :=HTI.iItem;
- if @SubItem<>nil then
- SubItem:=HTI.iSubItem;
-end;
-
-function LV_ItemAtPos(wnd:HWND;x,y:integer;var SubItem:dword):Integer; overload;
-var
- HTI:LV_HITTESTINFO;
-begin
- HTI.pt.x := x;
- HTI.pt.y := y;
- SendMessage(wnd,LVM_SUBITEMHITTEST,0,Integer(@HTI));
- Result :=HTI.iItem;
- if @SubItem<>nil then
- SubItem:=HTI.iSubItem;
-end;
-
-function LV_Compare(lParam1,lParam2,param:LPARAM):integer; stdcall;
-var
- olditem,neibor:integer;
-begin
- result:=lParam1-lParam2;
- neibor :=hiword(param);
- olditem:=loword(param);
- if neibor>olditem then
- begin
- if (lParam1=olditem) and (lParam2<=neibor) then
- result:=1;
- end
- else
- begin
- if (lParam2=olditem) and (lParam1>=neibor) then
- result:=1;
- end;
-end;
-
-function LV_MoveItem(list:hwnd;direction:integer;item:integer=-1):integer;
-begin
- if ((direction>0) and (item=(SendMessage(list,LVM_GETITEMCOUNT,0,0)-1))) or
- ((direction<0) and (item=0)) then
- begin
- result:=item;
- exit;
- end;
-
- if item<0 then
- item:=SendMessage(list,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
- SendMessageW(list,LVM_SORTITEMSEX,dword(item)+(dword(item+direction) shl 16),dword(@LV_Compare));
- result:=item+direction;
-end;
-
-function LV_GetColumnCount(list:HWND):integer;
-begin
- result:=SendMessage(SendMessage(list,LVM_GETHEADER,0,0),HDM_GETITEMCOUNT,0,0);
-end;
-
-function LV_CheckDirection(list:HWND):integer;
-var
- i,cnt{,selcnt}:integer;
- stat,first,last,focus: integer;
-begin
- first :=-1;
- last :=-1;
- focus :=-1;
- cnt :=SendMessage(list,LVM_GETITEMCOUNT,0,0)-1;
-// selcnt:=SendMessage(list,LVM_GETSELECTEDCOUNT,0,0);
- for i:=0 to cnt do
- begin
- stat:=SendMessage(list,LVM_GETITEMSTATE,i,LVIS_SELECTED or LVIS_FOCUSED);
- if (stat and LVIS_SELECTED)<>0 then
- begin
- if (stat and LVIS_FOCUSED)<>0 then
- focus:=i;
- if first<0 then first:=i;
- last:=i;
- end;
- end;
- result:=0;
- if focus<0 then
- focus:=first;
- if focus>=0 then
- result:=result or ((focus+1) shl 16);
- if first>0 then // at least one selected and not first
- begin
- result:=(result or 1){ or (first+1) shl 16};
- end;
- if (last>=0) and (last<cnt) then
- result:=result or 2;
-end;
-
-//----- Combobox functions -----
-
-function CB_SelectData(cb:HWND;data:dword):integer; overload;
-var
- i:integer;
-begin
- result:=0;
- for i:=0 to SendMessage(cb,CB_GETCOUNT,0,0)-1 do
- begin
- if data=dword(SendMessage(cb,CB_GETITEMDATA,i,0)) then
- begin
- result:=i;
- break;
- end;
- end;
- result:=SendMessage(cb,CB_SETCURSEL,result,0);
-end;
-
-function CB_SelectData(Dialog:HWND;id:cardinal;data:dword):integer; overload;
-begin
- result:=CB_SelectData(GetDlgItem(Dialog,id),data);
-end;
-
-function CB_GetData(cb:HWND;idx:integer=-1):dword;
-begin
- if idx<0 then
- idx:=SendMessage(cb,CB_GETCURSEL,0,0);
- result:=SendMessage(cb,CB_GETITEMDATA,idx,0);
-end;
-
-function CB_AddStrData(cb:HWND;astr:pAnsiChar;data:integer=0;idx:integer=-1):HWND;
-begin
- result:=cb;
- if idx<0 then
- idx:=SendMessage(cb,CB_ADDSTRING,0,dword(astr))
- else
- idx:=SendMessage(cb,CB_INSERTSTRING,idx,dword(astr));
- SendMessage(cb,CB_SETITEMDATA,idx,data);
-end;
-
-function CB_AddStrDataW(cb:HWND;astr:pWideChar;data:integer=0;idx:integer=-1):HWND;
-begin
- result:=cb;
- if idx<0 then
- idx:=SendMessageW(cb,CB_ADDSTRING,0,dword(astr))
- else
- idx:=SendMessageW(cb,CB_INSERTSTRING,idx,dword(astr));
- SendMessage(cb,CB_SETITEMDATA,idx,data);
-end;
-
-end.