From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: psachin Newsgroups: gmane.emacs.devel Subject: Re: Take a screenshot from within Emacs Date: Fri, 8 Jul 2016 14:43:00 +0530 Message-ID: References: <577EB137.3000409@gmail.com> <83bn28k6e8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c05539cb2cb3f05371c3608 X-Trace: ger.gmane.org 1467969226 8490 80.91.229.3 (8 Jul 2016 09:13:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2016 09:13:46 +0000 (UTC) Cc: Eli Zaretskii , clement.pit@gmail.com, Emacs developers To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 08 11:13:39 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLRqt-0004VW-CI for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2016 11:13:39 +0200 Original-Received: from localhost ([::1]:44397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRqs-0007kB-MN for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2016 05:13:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRqi-0007iS-Iu for emacs-devel@gnu.org; Fri, 08 Jul 2016 05:13:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLRqh-00060b-4y for emacs-devel@gnu.org; Fri, 08 Jul 2016 05:13:28 -0400 Original-Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:36855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLRqa-0005zh-Gr; Fri, 08 Jul 2016 05:13:20 -0400 Original-Received: by mail-oi0-x243.google.com with SMTP id j134so7072674oib.3; Fri, 08 Jul 2016 02:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GufJfWunEC2pA5MOcPKi5gwQxXVEV+g99Z3un2vYjak=; b=J+TXN8pRaCOyKCT7gWksvuw7Xtm4l97HKhwlWMQJbXX8xGjBUF98+iXvV0PlriXIS3 lgqZMGofaofvlrctFWN1w3F7PiZfbAac+TtjJ20/QFyn9U6uia+ffbQy8FfO4HU2OUjK otv+5v6Cih4QS6Ji0SMGmX0A1xl2hZoSTpkdMMe8lt9plQZwOFW/KHSa4OwTxzKe1VRf vAAQmkBPKcAgCLQVj8v2je2pcywam/fzj0bBLb2E8/oafehoQ8vlaTan1J8wSAX3sDvQ NF86ffUF2S6z0s9mMLfbi6HRkoV+gqXpjccwYbIzA4zLtz2Uc8QrkaV+bYAipaPqtlrP +h7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GufJfWunEC2pA5MOcPKi5gwQxXVEV+g99Z3un2vYjak=; b=G/0mg9kdNx+sQBM/z2c+QmJ2pUbCJ2eFQj1ALApViLSKu/QGXPqZ0//GV1W+YuwuUQ r8/JYua+Tfdb4bTpJSrVsM1A40eBmsDQ3AqxPXhZjHKk/bqVtfcLlcNKc38RRE+szuou J/i0sWZbyeXMN+BIK3Fz48grjMXNxu2XYBsxlgC6ilwsV6LHGGGbfxcjb8GFY7B8pft0 eDRCwyCdaFxZQauXYQQwKXX+MFY7Oy6n8RW+gfr1mOKc6RLjR6PXGr6hUnY14wupV1zr GB+W7CJd2sTt7Ix3JIIl/WV6yTow9JrJ+9OdUJYyZhthZp7Z+Ff3ytJpD+03r9zk8S1k R+hw== X-Gm-Message-State: ALyK8tIVbYSNfuCe0E0OJiG/W7kcP1gOQYPp4taPsAwbTASnYVqkO6s1B+RvjAvUiG6I0tUzMu0kIpiOFoX2EA== X-Received: by 10.157.18.246 with SMTP id g109mr2726713otg.180.1467969199840; Fri, 08 Jul 2016 02:13:19 -0700 (PDT) Original-Received: by 10.202.221.195 with HTTP; Fri, 8 Jul 2016 02:13:00 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::243 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205415 Archived-At: --94eb2c05539cb2cb3f05371c3608 Content-Type: text/plain; charset=UTF-8 https://github.com/psachin/.emacs.d/blob/config.org/custom_functions.org See subsection: 'Screenshot frame' On Fri, Jul 8, 2016 at 1:59 PM, wrote: > Eli Zaretskii writes: > > >> From: joakim@verona.se > >> Date: Thu, 07 Jul 2016 21:57:41 +0200 > >> Cc: Emacs developers > >> > >> I don't think Emacs has the capability to access its internal rendering > >> data out of the box. > > > > Actually, it does, sort of. Take a look at the dump-glyph-matrix > > function and the subroutines it calls. There are also > > dump-frame-glyph-matrix (for TTY frames) and dump-tool-bar-row. They > > describe the data structures Emacs uses to draw its windows and > > frames. We could use them to provide some initial testing capability > > for the display engine. The disadvantages of using these functions > > are that (a) they currently need Emacs build with GLYPH_DEBUG defined, > > and (b) they don't test the terminal-specific parts of the display > > engine (in xterm.c, w32term.c, nsterm.m, etc.) that actually write to > > the glass. > > Yes you are right of course. I even used those routines while working > on the xwidget branch, but forgot. > > -- > Joakim Verona > > -- Sachin psachin.github.io --94eb2c05539cb2cb3f05371c3608 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Fri, Jul 8, 2016 at 1:59 PM, <joakim@verona.se> wrote:=
= Eli Zaretskii <eliz@gnu.org> writ= es:

>> From: joakim@verona.se
>> Date: Thu, 07 Jul 2016 21:57:41 +0200
>> Cc: Emacs developers <em= acs-devel@gnu.org>
>>
>> I don't think Emacs has the capability to access its internal = rendering
>> data out of the box.
>
> Actually, it does, sort of.=C2=A0 Take a look at the dump-glyph-matrix=
> function and the subroutines it calls.=C2=A0 There are also
> dump-frame-glyph-matrix (for TTY frames) and dump-tool-bar-row.=C2=A0 = They
> describe the data structures Emacs uses to draw its windows and
> frames.=C2=A0 We could use them to provide some initial testing capabi= lity
> for the display engine.=C2=A0 The disadvantages of using these functio= ns
> are that (a) they currently need Emacs build with GLYPH_DEBUG defined,=
> and (b) they don't test the terminal-specific parts of the display=
> engine (in xterm.c, w32term.c, nsterm.m, etc.) that actually write to<= br> > the glass.

Yes you are right of course. I even used those routines while w= orking
on the xwidget branch, but forgot.

--
Joakim Verona




--
<= div>
--94eb2c05539cb2cb3f05371c3608--