/* Copyright (c) 2000-2006 ActiveState Software Inc.
   See the file LICENSE.txt for licensing information. */

// ISciMozEvents.idl
// Event interface from the Scintilla Mozilla plugin.
// Author: Neil Hodgson

#include "nsISupports.idl"

[scriptable, uuid(1b7577c0-ba94-42b6-879d-c4783b9e3c78)]
interface ISciMozEvents : nsISupports {
    // XXX several events are commented out because we don't
    // actually use them in komodo.  If we end up needing to
    // use them, we will need to split into two or more
    // ISci*Events interfaces.  Note that usage of these items
    // is also commented out in nsSciMoz.cxx
    
    const long SME_STYLENEEDED       = (1 << 0);
    const long SME_CHARADDED         = (1 << 1);
    const long SME_SAVEPOINTREACHED  = (1 << 2);
    const long SME_SAVEPOINTLEFT     = (1 << 3);
    const long SME_MODIFYATTEMPTRO   = (1 << 4);
    const long SME_KEY               = (1 << 5);
    const long SME_DOUBLECLICK       = (1 << 6);
    const long SME_UPDATEUI          = (1 << 7);
    const long SME_MODIFIED          = (1 << 8);
    const long SME_MACRORECORD       = (1 << 9);
    const long SME_MARGINCLICK       = (1 << 10);
    const long SME_NEEDSHOWN         = (1 << 11);
    // const long SME_UNUSED1        = (1 << 12);
    const long SME_PAINTED           = (1 << 13);
    const long SME_USERLISTSELECTION = (1 << 14);
    const long SME_URIDROPPED        = (1 << 15);
    const long SME_DWELLSTART        = (1 << 16);
    const long SME_DWELLEND          = (1 << 17);
    const long SME_ZOOM              = (1 << 18);
    const long SME_HOTSPOTCLICK      = (1 << 19);
    const long SME_HOTSPOTDOUBLECLICK= (1 << 20);
    const long SME_CALLTIPCLICK      = (1 << 21);
    const long SME_AUTOCSELECTION    = (1 << 22);
    const long SME_INDICATORCLICK    = (1 << 23);
    const long SME_INDICATORRELEASE  = (1 << 24);
    const long SME_AUTOCCANCELLED    = (1 << 25);
    const long SME_AUTOCCHARDELETED  = (1 << 26);
    // Komodo specific
    const long SME_COMMANDUPDATE     = (1 << 27);

    const long SME_ALL               = (1 << 28) - 1;

    // void onStyleNeeded(in long position);
    void onCharAdded(in long ch);
    void onSavePointReached();
    void onSavePointLeft();
    // void onModifyAttemptRO();
    // onKey is specific to the GTK+ version
    // void onKey(in long ch, in long modifiers);
    void onDoubleClick();
    void onUpdateUI(in long updated,
                    in long horizScrollPageIncrement);
    void onModified(in long position, in long modificationType,
                    in AString text, in uint32_t length,
                    in long linesAdded, in long line,
                    in long foldLevelNow, in long foldLevelPrev);
    // void onMacroRecord(in long message, in long wParam, in long lParam);
    void onMarginClick(in long modifiers, in long position, in long margin);
    // void onNeedShown(in long position, in long length);
    void onZoom();
    void onHotSpotDoubleClick(in long position, in long modifiers);
    // void onPainted();
    void onDwellStart(in long position, in long x, in long y);
    void onDwellEnd(in long position, in long x, in long y);

    // Komodo additions
    void onCommandUpdate(in string commandset);
    // Any other events (like SME_AUTOCSELECTION, SME_INDICATORCLICK, etc...).
    // Note: Not all fields will be useful for all events, some will be NULL or
    //       0 if they are unused - consult the Scintilla docs for details.
    void onOtherNotification(in long notificationType, in long position,
                             in AString text, in long modifiers);

};
