Re: Can 'graphics' be a file descriptor?

Liste des GroupesRevenir à cl c 
Sujet : Re: Can 'graphics' be a file descriptor?
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.lang.c
Date : 03. Jan 2025, 00:35:12
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vl77rg$3e5um$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Thu, 02 Jan 2025 16:08:57 -0600, BGB wrote:

On 1/2/2025 3:06 PM, Keith Thompson wrote:
wij <wyniijj5@gmail.com> writes:
On Wed, 2025-01-01 at 14:33 -0800, Keith Thompson wrote:
wij <wyniijj5@gmail.com> writes:
On Wed, 2025-01-01 at 01:29 -0800, Keith Thompson wrote:
[...]
A file *descriptor* is a small integer referring to some file-like
entity, used with open/close/read/write.  There's no such thing in
standard C; it's a POSIX concept.
[...]
I would like to have opinions about the idea "graphics being a file
descriptor".  The implement is irrevent for the discussion. Some
imagination is required.
>
Why do you insist on referring to "file descriptors"?  That's a specific
term with a specific meaning: a small integer value used in POSIX I/O
(not in standard C).
>
I do not insist anything. I would just like to have an opinion on the idea
"graphics being a file descriptor".
 
So you insist on talking about "file descriptors".
 
Standard C doesn't have file descriptors.  Consider discussing this in
comp.unix.programmer.
 
 
It is also kinda moot...
 
If it were "integer handle" or even "integer value in the same numbering
space as file handles", I would be like "yeah, sure, whatever".
 
POSIX sockets also share the same numbering space, and some of the same
calls (Windows sockets do not, and many functions gain an WSA prefix and
changes to capitalization and similar).
 
 
 
If one wants it so that read/write/lseek/etc do something useful with
them, this is a different matter.
 
What happens then, does one represent a window as a BMP file or
something, which one writes to to update the contents?... This is likely
more overhead than is worthwhile.

I refer you to the X11 specifications and example implementation found at
x.org

X is a networked protocol that performs graphics functions. The network
communications used by X, on Unix and unix-like systems, accesses a socket
(which others have pointed out is, on Unix a "file descriptor"-like object)

Granted, some dislike /how/ X uses network sockets for communication, and X
implementations (for Unixish systems) often provide alternatives such as
"unix domain sockets" and "shared memory" communications. Still, X has found
it "useful" to use these "file descriptor"-like objects to implement
"graphics" facilities.

[snip]


Other methods, like sockets or local RPC, still likely make more sense.

Oh, I'm glad that the techniques and technologies in use for over 30 years
gain your (apparently grudging) approval.

:-)


--
Lew Pitcher
"In Skills We Trust"

Date Sujet#  Auteur
1 Jan 25 * Can 'graphics' be a file descriptor?18wij
1 Jan 25 +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
1 Jan 25 `* Re: Can 'graphics' be a file descriptor?16Keith Thompson
1 Jan 25  `* Re: Can 'graphics' be a file descriptor?15wij
1 Jan 25   +* Re: Can 'graphics' be a file descriptor?4bart
1 Jan 25   i+* Re: Can 'graphics' be a file descriptor?2wij
2 Jan 25   ii`- Re: Can 'graphics' be a file descriptor?1bart
1 Jan 25   i`- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
1 Jan 25   `* Re: Can 'graphics' be a file descriptor?10Keith Thompson
2 Jan 25    +- Re: Can 'graphics' be a file descriptor?1Alexis
2 Jan 25    +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
2 Jan 25    `* Re: Can 'graphics' be a file descriptor?7wij
2 Jan 25     `* Re: Can 'graphics' be a file descriptor?6Keith Thompson
2 Jan 25      `* Re: Can 'graphics' be a file descriptor?5BGB
3 Jan 25       +* Re: Can 'graphics' be a file descriptor?2Lew Pitcher
3 Jan 25       i`- Re: Can 'graphics' be a file descriptor?1BGB
3 Jan 25       +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
3 Jan 25       `- Re: Can 'graphics' be a file descriptor?1Chris M. Thomasson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal