From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Some Emacs outside Emacs Date: Thu, 28 Jul 2022 10:53:10 +0300 Message-ID: <83h731ad21.fsf@gnu.org> References: <87sfml692a.fsf@elite.giraud> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29585"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 28 09:58:55 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGyQ3-0007SB-2W for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Jul 2022 09:58:55 +0200 Original-Received: from localhost ([::1]:50900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGyQ1-0002Ec-FN for ged-emacs-devel@m.gmane-mx.org; Thu, 28 Jul 2022 03:58:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGyKQ-0008J4-Rm for emacs-devel@gnu.org; Thu, 28 Jul 2022 03:53:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGyKL-0003TN-D6; Thu, 28 Jul 2022 03:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Vu+XPmJas3ypXVgeLUqZ5xNa1+97MNynMtfONWptHDc=; b=fQ/t85RyEtf5 DhnUdWm0ASVHY37NJsSROf3c8/Z45FDatFZlCoYUdUelzqJJWaK95HOTISerkEKN6nuyrlaUtedDz Nh4fO8RDozqG7Q874NYWa0SOj3f1eMpbgjras79UzZERJrBLN/sUNAP+zOLVNBjgpqMny3XJie2RE +FIpj09XOQrcsslMDk+lMVx/pkmWjYf+3XQx8onbEdBg3jQMVzLiXdGTmOBT5kpD+7nflG/E7ahS+ 0AkoB3J1ia5QQcReRq2grjz+Q5PGgsFj0RCNXlH5uRXM6szNQW3+uwGaOc1e/gozJ1P7k6MVFP66H 3bGmbE07X8/HLdcO2/N8cQ==; Original-Received: from [87.69.77.57] (port=2359 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGyKK-0003cv-QE; Thu, 28 Jul 2022 03:53:01 -0400 In-Reply-To: <87sfml692a.fsf@elite.giraud> (message from Manuel Giraud on Thu, 28 Jul 2022 08:33:01 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292769 Archived-At: > From: Manuel Giraud > Date: Thu, 28 Jul 2022 08:33:01 +0200 > > I'm trying to access some Emacs functions from lwlib. So far, I'm able > to get the frame for a given menu but whenever I try to access into that > frame I get the following error from the compiler: > > --8<---------------cut here---------------start------------->8--- > xlwmenu.c:1175:11: error: incomplete definition of type 'struct Lisp_X' > fs = FRAME_XIC_FONTSET (frame); > ^~~~~~~~~~~~~~~~~~~~~~~~~ > ../src/xterm.h:1225:34: note: expanded from macro 'FRAME_XIC_FONTSET' > #define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs) > ~~~^ > ./../src/lisp.h:300:16: note: forward declaration of 'struct Lisp_X' > typedef struct Lisp_X *Lisp_Word; > ^ > --8<---------------cut here---------------end--------------->8--- > > AFAIU, "struct Lisp_X" is a non existent struct and we are just interest > in the pointer. Is it a matter of a compiler option? Something else? What is 'frame' in your code? how was it defined? There's no such variable in the current code of xlwmenu.c, so I cannot know what you did. To use FRAME_XIC_FONTSET, its argument must be a pointer to 'struct frame'.