mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Is SIGINT sent to plugins ?


Chronological Thread 
  • From: Massimiliano Gubinelli <address@hidden>
  • To: Nicola Mingotti <address@hidden>
  • Cc: texmacs-users <address@hidden>
  • Subject: Re: [TeXmacs] Is SIGINT sent to plugins ?
  • Date: Wed, 12 Dec 2018 21:45:53 +0000

Hi Nicola,

On 12. Dec 2018, at 18:01, Nicola Mingotti <address@hidden> wrote:

I was trying to trace the call from STOP button pressure downwill, but i could not
solve it. In particular I was not able to unfold the thing down until arriving to the
file you point: qt_pipe_link.cpp .  I attach you my notes. I know almost nothing of Qt programming
probably i got lost for it.

TeXmacs programming is quite uniform. Usually there are various (more or less) abstract classes which delegate the actual implementation to classes defined depending on the backend. 

In this case the connection_rep class uses tm_link_rep which is an abstract class (it derives from abstract_struct). This is the signal that this class is meant as an  abstract interface which TeXmacs can use to abstract the concept of “link”. 
So it will come with various functions which are supposed to instantiate the relevant concrete subclass. In this case functions like:

tm_link make_pipe_link (string cmd);
tm_link make_dynamic_link (string lib, string symb, string init, string ses);
tm_link make_socket_link (string h, int p, int t= SOCKET_DEFAULT, int fd= -1);
tm_link make_socket_server (int port);
tm_link find_socket_link (int fd);

as defined in tm_link.hpp.

These functions’ implementation depends on the backend. For QT they are implemented in qt_pipe_link in such a way that they returns objects instatiated from qt_pipe_link_rep and implementing the connection with child processes using the Qt library abstraction. See e.g.

tm_link
make_pipe_link (string cmd) {
  return tm_new<qt_pipe_link_rep> (cmd);
}

in qt_pipe_link.cpp

So in general if you are looking for behaviours which depends on the underlying system (like pipes, UI, image conversion, etc…) then they are likely to be implemented in one of the files in src/Plugins/Qt
all the rest of the sources are independent of the Qt library and thus mostly independent of the operating system functoning (apart from file handling which is always assumed to be UNIX, that is why we need min_gw under windows). 


HTH for the future. :)

Max


 




Archive powered by MHonArc 2.6.19.

Top of page