"Fossies" - the Fresh Open Source Software Archive

Member "jed-0.99-19/doc/tm/rtl/mouse.tm" (14 Dec 2009, 3941 Bytes) of package /linux/misc/jed-0.99-19.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 \function{gpm_disable_mouse}
    2 \synopsis{Disable support for the GPM mouse}
    3 \usage{gpm_disable_mouse ()}
    4 \description
    5   The \var{gpm_disable_mouse} function may be used to inactivate
    6   support for the GPM mouse.
    7 \notes 
    8   This function may not be available on all systems.
    9 \seealso{mouse_get_event_info}
   10 \done
   11 
   12 \function{mouse_get_event_info}
   13 \synopsis{Return information about the last processed mouse event}
   14 \usage{(x, y, state) = mouse_get_event_info ()}
   15 \description
   16   This function returns the position of the last processed
   17   mouse event, and the state of the mouse buttons and shift
   18   keys before the event.
   19 
   20   \var{x} and \var{y} represent the column and row, respectively, where
   21   the event took place. They are measured with relative to the
   22   top left corner of the editor's display.
   23 
   24   \var{state} is a bitmapped integer whose bits are defined as follows:
   25 #v+
   26          1  Left button pressed
   27          2  Middle button pressed
   28          4  Right button pressed
   29          8  Shift key pressed
   30         16  Ctrl key pressed
   31 #v-
   32   Other information such as the button that triggered the event is
   33   available when the mouse handler is called.  As a result, this information
   34   is not returned by \var{mouse_get_event_info}.
   35 \seealso{mouse_set_default_hook, set_buffer_hook.}
   36 \done
   37 
   38 \function{mouse_map_buttons}
   39 \synopsis{Map one mouse button to another}
   40 \usage{Void mouse_map_buttons (Integer x, Integer y)}
   41 \description
   42   This function may be used to map one mouse button to another.  The
   43   button represented by \var{x} will appear as \var{y}.
   44 \done
   45 
   46 \function{mouse_set_current_window}
   47 \synopsis{Change to the window to that of the the mouse event}
   48 \usage{Void mouse_set_current_window ()}
   49 \description
   50   Use of this function results in changing windows to the window that
   51   was current at the time of the mouse event.
   52 \seealso{mouse_set_default_hook}
   53 \done
   54 
   55 \function{mouse_set_default_hook}
   56 \synopsis{Associate a function "fun" with the mouse event "name"}
   57 \usage{Void set_default_mouse_hook (String name, String fun)}
   58 \description
   59   This function associates a slang function \var{fun} with the mouse event
   60   specified by \var{name}.  The first parameter \var{name} must be one of the
   61   following:
   62 #v+
   63             "mouse_up"          "mouse_status_up"
   64             "mouse_down"        "mouse_status_down"
   65             "mouse_drag"        "mouse_status_drag"
   66             "mouse_2click"      "mouse_status_2click"
   67             "mouse_3click"      "mouse_status_3click"
   68 #v-
   69   The meaning of these names should be obvious.  The second parameter,
   70   \var{fun} must be defined as
   71 #v+
   72            define fun (line, column, btn, shift)
   73 #v-
   74   and it must return an integer.  The parameters \var{line} and
   75   \var{column} correspond to the line and column numbers in the
   76   buffer where the event took place. \var{btn} is an integer that
   77   corresonds to the button triggering the event.  It can take
   78   on values \var{1}, \var{2}, and \var{4} corresponding to the left,
   79   middle, and right buttons, respectively.  \var{shift} can take on
   80   values \exmp{0}, \var{1}, or \var{2} where \exmp{0} indicates that no modifier
   81   key was pressed, \var{1} indicates that the SHIFT key was
   82   pressed, and \var{2} indicates that the CTRL key was pressed.
   83   For more detailed information about the modifier keys, use
   84   the function \var{mouse_get_event_info}.
   85 
   86   When the hook is called, the editor will automatically change
   87   to the window where the event occured.  The return value of
   88   the hook is used to dictate whether or not hook handled the
   89   event or whether the editor should switch back to the window
   90   prior to the event.  Specifically, the return value is interpreted
   91   as follows:
   92 
   93 #v+
   94           -1     Event not handled, pass to default hook.
   95            0     Event handled, return active window prior to event
   96            1     Event handled, stay in current window.
   97 #v-
   98 \seealso{mouse_get_event_info, mouse_set_current_window, set_buffer_hook}
   99 \done
  100