Changeset 3017

Show
Ignore:
Timestamp:
02/26/03 07:18:02 (6 years ago)
Author:
miyoshi
Message:

* termhooks.h (enum event_kind): Add mw32_mci_event.

* mw32term.c (mw32_message_loop): Generate a Emacs event when
MM_MCINOTIFY is notified.

* mw32mci.h: New file.

* mw32mci.c (Fmw32_mci_send_string): New function.
(Fmw32_mci_get_error_string): Ditto.
(syms_of_mw32mci): Ditto.
(init_mw32mci): Ditto.

* makefile.meadow.w32-in (FULL_LINK_FLAGS): Append mw32mci.c.

* makefile.nt (LINK_FLAGS): Ditto.

* keyboard.c (make_lispy_event): Convert mw32_mci_event to a list
object.

* emacs.c (main): Add initialization of mw32mci.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • work/cvs2svn/src/ChangeLog.Meadow

    r3016 r3017  
     12003-02-26  MIYOSHI Masanori  <miyoshi@boreas.dti.ne.jp> 
     2 
     3        * termhooks.h (enum event_kind): Add mw32_mci_event. 
     4 
     5        * mw32term.c (mw32_message_loop): Generate a Emacs event when 
     6        MM_MCINOTIFY is notified. 
     7 
     8        * mw32mci.h: New file. 
     9 
     10        * mw32mci.c (Fmw32_mci_send_string): New function. 
     11        (Fmw32_mci_get_error_string): Ditto. 
     12        (syms_of_mw32mci): Ditto. 
     13        (init_mw32mci): Ditto. 
     14 
     15        * makefile.meadow.w32-in (FULL_LINK_FLAGS): Append mw32mci.c. 
     16 
     17        * makefile.nt (LINK_FLAGS): Ditto. 
     18 
     19        * keyboard.c (make_lispy_event): Convert mw32_mci_event to a list 
     20        object. 
     21 
     22        * emacs.c (main): Add initialization of mw32mci. 
     23 
    1242003-02-24  MIYOSHI Masanori  <miyoshi@boreas.dti.ne.jp> 
    225 
  • work/cvs2svn/src/emacs.c

    r2942 r3017  
    14831483      syms_of_mw32menu (); 
    14841484      syms_of_mw32reg (); 
     1485      syms_of_mw32mci (); 
    14851486      syms_of_fontset (); 
    14861487#else 
     
    15811582  init_mw32fns (); 
    15821583  init_mw32reg (); 
     1584  init_mw32mci (); 
    15831585#endif 
    15841586  init_fns (); 
  • work/cvs2svn/src/keyboard.c

    r2646 r3017  
    4242#include <shellapi.h> 
    4343#include "mw32sync.h" 
     44#include "mw32mci.h" 
    4445#include "coding.h" 
    4546#endif 
     
    54575458    case meadow_private_event: 
    54585459      return Qnil; 
     5460 
     5461    case mw32_mci_event: 
     5462      { 
     5463        Lisp_Object event_type, device_id, arg; 
     5464 
     5465        switch (event->code) 
     5466          { 
     5467          case MW32_MCI_NOTIFY_ABORTED: 
     5468            event_type = Qmw32_mci_notify_aborted; 
     5469            arg = Qnil; 
     5470            break; 
     5471          case MW32_MCI_NOTIFY_FAILURE: 
     5472            event_type = Qmw32_mci_notify_failure; 
     5473            arg = Qnil; 
     5474            break; 
     5475          case MW32_MCI_NOTIFY_SUCCESSFUL: 
     5476            event_type = Qmw32_mci_notify_successful; 
     5477            arg = Qnil; 
     5478            break; 
     5479          case MW32_MCI_NOTIFY_SUPERSEDED: 
     5480            event_type = Qmw32_mci_notify_superseded; 
     5481            arg = Qnil; 
     5482            break; 
     5483          default: 
     5484            abort (); 
     5485          } 
     5486        device_id = event->arg; 
     5487 
     5488        return Fcons (Qmw32_mci, 
     5489                      Fcons (event_type, 
     5490                             Fcons (device_id,  
     5491                                    Fcons (arg, Qnil)))); 
     5492      } 
    54595493#endif 
    54605494 
  • work/cvs2svn/src/makefile.meadow.w32-in

    r2968 r3017  
    138138           $(BLD)/mw32dl.$(O)           \ 
    139139           $(BLD)/mw32mem.$(O)          \ 
     140           $(BLD)/mw32mci.$(O)          \ 
    140141           $(BLD)/xfaces.$(O) 
    141142ifdef MW32_BDF 
  • work/cvs2svn/src/makefile.nt

    r2968 r3017  
    210210           $(BLD)\mw32reg.obj   \ 
    211211           $(BLD)\mw32dl.obj    \ 
     212           $(BLD)\mw32mci.obj   \ 
    212213           $(BLD)\xfaces.obj 
    213214 
  • work/cvs2svn/src/mw32term.c

    r2996 r3017  
    4545#include <shellapi.h> 
    4646#include "mw32term.h" 
     47#include "mw32mci.h" 
    4748 
    4849#include "systty.h" 
     
    7273#include <limits.h> 
    7374#endif /* __MINGW32__ */ 
     75#include <mmsystem.h> 
    7476 
    7577#define mw32_any_window_to_frame mw32_any_window_to_frame 
     
    87458747          break; 
    87468748#endif 
     8749        case MM_MCINOTIFY: 
     8750          { 
     8751            struct input_event buf; 
     8752            Lisp_Object frame; 
     8753            int reason; 
     8754 
     8755            MW32_INIT_EMACS_EVENT (buf); 
     8756            buf.kind = mw32_mci_event; 
     8757            XSETFRAME (frame, f); 
     8758            buf.frame_or_window = frame; 
     8759            switch (msg.wParam) 
     8760              { 
     8761              case MCI_NOTIFY_ABORTED: 
     8762                reason = MW32_MCI_NOTIFY_ABORTED; 
     8763                break; 
     8764              case MCI_NOTIFY_FAILURE: 
     8765                reason = MW32_MCI_NOTIFY_FAILURE; 
     8766                break; 
     8767              case MCI_NOTIFY_SUCCESSFUL: 
     8768                reason = MW32_MCI_NOTIFY_SUCCESSFUL; 
     8769                break; 
     8770              case MCI_NOTIFY_SUPERSEDED: 
     8771                reason = MW32_MCI_NOTIFY_SUPERSEDED; 
     8772                break; 
     8773              default: 
     8774                abort (); 
     8775              } 
     8776            buf.code = (int) reason; 
     8777            buf.arg = make_number (msg.lParam); 
     8778            buf.timestamp = msg.time; 
     8779            kbd_buffer_store_event (&buf); 
     8780          } 
     8781          break; 
    87478782 
    87488783          /* 
     
    87568791          clear_mouse_face (dpyinfo); 
    87578792          /* Generate a nil HELP_EVENT to cancel a help-echo. 
    8758            Do it only if there's something to cancel. 
     87931          Do it only if there's something to cancel. 
    87598794             Otherwise, the startup message is cleared when 
    87608795             the mouse leaves the frame.  */ 
  • work/cvs2svn/src/termhooks.h

    r2460 r3017  
    321321                                   At present, this is used for generating 
    322322                                   switch_frame */ 
     323  mw32_mci_event,               /* MCI event_kind */ 
    323324#endif 
    324325  USER_SIGNAL_EVENT,            /* A user signal.