delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/20/08:14:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: Corinna Vinschen <cygwin AT cygwin DOT com>
Date: Wed, 20 Dec 2000 14:13:24 +0100
X-Mailer: KMail [version 1.1.99]
To: cygwin AT cygwin DOT com
References: <3A40BB0F DOT 83C5E52 AT epita DOT fr>
In-Reply-To: <3A40BB0F.83C5E52@epita.fr>
Subject: Re: get windows messages
MIME-Version: 1.0
Message-Id: <0012201413240R.28008@cygbert>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id IAA11609

On Wednesday 20 December 2000 14:58, flav wrote:
> hello,
> 	I would like to know if it is possible to get the windows
> message and if it is possible, how to get them (without using the
> windows
> main loop)

From the Cygwin source code:

===== SNIP =====
The following unix-style calls are supported:

        open ("/dev/windows", flags, mode=0)
                - create a unix fd for message queue.
                  O_NONBLOCK flag controls the read() call behavior.

        read (fd, buf, len)
                - return next message from queue. buf must point to MSG
                  structure, len must be >= sizeof (MSG). If read is set to
                  non-blocking and the queue is empty, read call returns -1
                  immediately with errno set to EAGAIN, otherwise it blocks
                  untill the message will be received.

        write (fd, buf, len)
                - send a message pointed by buf. len argument ignored.

        ioctl (fd, command, *param)
                - control read()/write() behavior.
                ioctl (fd, WINDOWS_POST, NULL): write() will PostMessage();
                ioctl (fd, WINDOWS_SEND, NULL): write() will SendMessage();
                ioctl (fd, WINDOWS_HWND, &hWnd): read() messages for
                        hWnd window.

        select () call marks read fd when any message posted to queue.
===== SNAP =====

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019