From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Patch to trunk: merge common code in hourglass impl Date: Tue, 3 Jun 2008 20:05:27 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v924) Content-Type: multipart/mixed; boundary=Apple-Mail-2-155010347 X-Trace: ger.gmane.org 1212537968 32117 80.91.229.12 (4 Jun 2008 00:06:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Jun 2008 00:06:08 +0000 (UTC) To: emacs- devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 04 02:06:49 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K3gWc-0008Gq-T8 for ged-emacs-devel@m.gmane.org; Wed, 04 Jun 2008 02:06:48 +0200 Original-Received: from localhost ([127.0.0.1]:43557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3gVq-0000Ed-5I for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2008 20:05:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3gVl-0000Cv-Sb for emacs-devel@gnu.org; Tue, 03 Jun 2008 20:05:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3gVk-0000AL-Fn for emacs-devel@gnu.org; Tue, 03 Jun 2008 20:05:53 -0400 Original-Received: from [199.232.76.173] (port=58889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3gVk-0000AC-8N for emacs-devel@gnu.org; Tue, 03 Jun 2008 20:05:52 -0400 Original-Received: from wx-out-0506.google.com ([66.249.82.224]:22581) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3gVj-0001jU-Km for emacs-devel@gnu.org; Tue, 03 Jun 2008 20:05:51 -0400 Original-Received: by wx-out-0506.google.com with SMTP id h28so1423568wxd.24 for ; Tue, 03 Jun 2008 17:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:to:content-type:mime-version:subject:date:x-mailer:from; bh=a1DIu5Rn2FExylphqaTWZzcAEA84J1fzFrTBp5ymdvg=; b=L97fHaPMJYaja6eapfVV7US/PccPlLwXilYb5mWABP2xO0pVgowp7ATmk5vcxJ2iXHOCI6jCojqq/NNJw+1A7r2859knZqbSeAth9NkGEpnrGXiL+vbIx+oB8Cz4Y0tWFCzf6bsPgMKMMuh/+ocrc67RcMRQeMedjaJjyb4f2os= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:to:content-type:mime-version:subject:date:x-mailer:from; b=Q1uYpugx1lmFUeVa2gUV48/boMPsATuIDaJQ4lTNbg+nRA3IlMGTW0YghZl/A7b1n/wviafPdut4+bWQqC0gv4mugRN/coFTkEfJW2rTTLlBPfbWB/T2evgs/NLRUwmAj0mAKupMHRJSOHmHADJLT48GKg6J2hM1UOOI+OHa1Ek= Original-Received: by 10.90.54.11 with SMTP id c11mr14044220aga.33.1212537948288; Tue, 03 Jun 2008 17:05:48 -0700 (PDT) Original-Received: from ?192.168.10.101? ( [97.73.30.9]) by mx.google.com with ESMTPS id 38sm766591aga.13.2008.06.03.17.05.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 03 Jun 2008 17:05:47 -0700 (PDT) X-Mailer: Apple Mail (2.924) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98341 Archived-At: --Apple-Mail-2-155010347 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hello, When I updated the hourglass implementation in the NS (Cocoa) port for the hourglass changes of 2008-03-19 I put some code that was duplicated in {x,mac,w32}fns.c into xdisp.c, leaving only {show,hide}_hourglass functions for the port to implement. Other GUIs could use this common code as well, and here is a patch against trunk to do so. There are three issues: - I have tested only the X version. - Under W32, atimers are not currently used, so the common code cannot be either. If atimers will work under W32, then the patch can be improved to benefit W32 as well. - Under Mac, the hourglass impl is under #ifdef MAC_OSX. I replicate this constraint in xdisp.c as "#if !defined (MAC_OS) || defined (MAC_OSX)". Hopefully this is correct. (Patch attached) --Apple-Mail-2-155010347 Content-Disposition: attachment; filename=hourglass_common.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="hourglass_common.patch" Content-Transfer-Encoding: quoted-printable =3D=3D=3D=20modified=20file=20'src/dispextern.h'=0A---=20= src/dispextern.h=092008-06-01=2011:04:21=20+0000=0A+++=20= src/dispextern.h=092008-06-03=2023:27:30=20+0000=0A@@=20-2908,6=20= +2908,15=20@@=0A=20extern=20void=20cancel_hourglass=20P_=20((void));=0A=20= extern=20int=20hourglass_started=20P_=20((void));=0A=20extern=20int=20= display_hourglass_p;=0A+extern=20int=20hourglass_shown_p;=0A+struct=20= atimer;=09=09=09/*=20Defined=20in=20atimer.h.=20=20*/=0A+/*=20If=20= non-null,=20an=20asynchronous=20timer=20that,=20when=20it=20expires,=20= displays=0A+=20=20=20an=20hourglass=20cursor=20on=20all=20frames.=20=20= */=0A+extern=20struct=20atimer=20*hourglass_atimer;=0A+=0A+/*=20Each=20= GUI=20implements=20these.=20=20PENDING:=20move=20into=20RIF.=20*/=0A= +extern=20void=20show_hourglass=20P_=20((struct=20atimer=20*));=0A= +extern=20void=20hide_hourglass=20P_=20((void));=0A=20=0A=20/*=20Returns=20= the=20background=20color=20of=20IMG,=20calculating=20one=20heuristically=20= if=0A=20=20=20=20necessary.=20=20If=20non-zero,=20XIMG=20is=20an=20= existing=20XImage=20object=20to=20use=20for=0A=0A=3D=3D=3D=20modified=20= file=20'src/macfns.c'=0A---=20src/macfns.c=092008-05-22=2020:51:54=20= +0000=0A+++=20src/macfns.c=092008-06-03=2023:57:56=20+0000=0A@@=20-57,10=20= +57,6=20@@=0A=20=0A=20#endif=09/*=20TARGET_API_MAC_CARBON=20*/=0A=20=0A= -/*=20Non-zero=20means=20we're=20allowed=20to=20display=20an=20hourglass=20= cursor.=20=20*/=0A-=0A-int=20display_hourglass_p;=0A-=0A=20/*=20The=20= background=20and=20shape=20of=20the=20mouse=20pointer,=20and=20shape=20= when=20not=0A=20=20=20=20over=20text=20or=20in=20the=20modeline.=20=20*/=0A= =20=0A@@=20-3420,89=20+3416,6=20@@=0A=20=09=09=09=09Busy=20cursor=0A=20=20= ***********************************************************************/=0A= =20=0A-/*=20If=20non-null,=20an=20asynchronous=20timer=20that,=20when=20= it=20expires,=20displays=0A-=20=20=20an=20hourglass=20cursor=20on=20all=20= frames.=20=20*/=0A-=0A-static=20struct=20atimer=20*hourglass_atimer;=0A-=0A= -/*=20Non-zero=20means=20an=20hourglass=20cursor=20is=20currently=20= shown.=20=20*/=0A-=0A-static=20int=20hourglass_shown_p;=0A-=0A-/*=20= Number=20of=20seconds=20to=20wait=20before=20displaying=20an=20hourglass=20= cursor.=20=20*/=0A-=0A-static=20Lisp_Object=20Vhourglass_delay;=0A-=0A= -/*=20Default=20number=20of=20seconds=20to=20wait=20before=20displaying=20= an=20hourglass=0A-=20=20=20cursor.=20=20*/=0A-=0A-#define=20= DEFAULT_HOURGLASS_DELAY=201=0A-=0A-/*=20Function=20prototypes.=20=20*/=0A= -=0A-static=20void=20show_hourglass=20P_=20((struct=20atimer=20*));=0A= -static=20void=20hide_hourglass=20P_=20((void));=0A-=0A-/*=20Return=20= non-zero=20if=20houglass=20timer=20has=20been=20started=20or=20hourglass=20= is=20shown.=20=20*/=0A-=0A-int=0A-hourglass_started=20()=0A-{=0A-=20=20= return=20hourglass_shown_p=20||=20hourglass_atimer=20!=3D=20NULL;=0A-}=0A= -=0A-=0A-/*=20Cancel=20a=20currently=20active=20hourglass=20timer,=20and=20= start=20a=20new=20one.=20=20*/=0A-=0A-void=0A-start_hourglass=20()=0A-{=0A= -#ifdef=20MAC_OSX=0A-=20=20EMACS_TIME=20delay;=0A-=20=20int=20secs,=20= usecs=20=3D=200;=0A-=0A-=20=20cancel_hourglass=20();=0A-=0A-=20=20if=20= (INTEGERP=20(Vhourglass_delay)=0A-=20=20=20=20=20=20&&=20XINT=20= (Vhourglass_delay)=20>=200)=0A-=20=20=20=20secs=20=3D=20XFASTINT=20= (Vhourglass_delay);=0A-=20=20else=20if=20(FLOATP=20(Vhourglass_delay)=0A= -=09=20=20=20&&=20XFLOAT_DATA=20(Vhourglass_delay)=20>=200)=0A-=20=20=20=20= {=0A-=20=20=20=20=20=20Lisp_Object=20tem;=0A-=20=20=20=20=20=20tem=20=3D=20= Ftruncate=20(Vhourglass_delay,=20Qnil);=0A-=20=20=20=20=20=20secs=20=3D=20= XFASTINT=20(tem);=0A-=20=20=20=20=20=20usecs=20=3D=20(XFLOAT_DATA=20= (Vhourglass_delay)=20-=20secs)=20*=201000000;=0A-=20=20=20=20}=0A-=20=20= else=0A-=20=20=20=20secs=20=3D=20DEFAULT_HOURGLASS_DELAY;=0A-=0A-=20=20= EMACS_SET_SECS_USECS=20(delay,=20secs,=20usecs);=0A-=20=20= hourglass_atimer=20=3D=20start_atimer=20(ATIMER_RELATIVE,=20delay,=0A-=09= =09=09=09=20=20=20=20=20show_hourglass,=20NULL);=0A-#endif=20/*=20= MAC_OSX=20*/=0A-}=0A-=0A-=0A-/*=20Cancel=20the=20hourglass=20cursor=20= timer=20if=20active,=20hide=20a=20busy=20cursor=20if=0A-=20=20=20shown.=20= =20*/=0A-=0A-void=0A-cancel_hourglass=20()=0A-{=0A-#ifdef=20MAC_OSX=0A-=20= =20if=20(hourglass_atimer)=0A-=20=20=20=20{=0A-=20=20=20=20=20=20= cancel_atimer=20(hourglass_atimer);=0A-=20=20=20=20=20=20= hourglass_atimer=20=3D=20NULL;=0A-=20=20=20=20}=0A-=0A-=20=20if=20= (hourglass_shown_p)=0A-=20=20=20=20hide_hourglass=20();=0A-#endif=20/*=20= MAC_OSX=20*/=0A-}=0A-=0A-=0A=20/*=20Timer=20function=20of=20= hourglass_atimer.=20=20TIMER=20is=20equal=20to=0A=20=20=20=20= hourglass_atimer.=0A=20=0A@@=20-3510,7=20+3423,7=20@@=0A=20=20=20=20= arrows)=20at=20the=20upper-right=20corner=20of=20each=20frame=20instead=20= of=20the=0A=20=20=20=20hourglass=20pointer.=20=20*/=0A=20=0A-static=20= void=0A+void=0A=20show_hourglass=20(timer)=0A=20=20=20=20=20=20struct=20= atimer=20*timer;=0A=20{=0A@@=20-3545,7=20+3458,7=20@@=0A=20/*=20Hide=20= the=20progress=20indicators=20on=20all=20frames,=20if=20it=20is=20= currently=0A=20=20=20=20shown.=20=20*/=0A=20=0A-static=20void=0A+void=0A=20= hide_hourglass=20()=0A=20{=0A=20#if=20TARGET_API_MAC_CARBON=0A@@=20= -4379,15=20+4292,6=20@@=0A=20or=20when=20you=20set=20the=20mouse=20= color.=20=20*/);=0A=20=20=20Vx_hourglass_pointer_shape=20=3D=20Qnil;=0A=20= =0A-=20=20DEFVAR_BOOL=20("display-hourglass",=20&display_hourglass_p,=0A= -=20=20=20=20doc:=20/*=20Non-zero=20means=20Emacs=20displays=20an=20= hourglass=20pointer=20on=20window=20systems.=20=20*/);=0A-=20=20= display_hourglass_p=20=3D=201;=0A-=0A-=20=20DEFVAR_LISP=20= ("hourglass-delay",=20&Vhourglass_delay,=0A-=20=20=20=20doc:=20/*=20= *Seconds=20to=20wait=20before=20displaying=20an=20hourglass=20pointer.=0A= -Value=20must=20be=20an=20integer=20or=20float.=20=20*/);=0A-=20=20= Vhourglass_delay=20=3D=20make_number=20(DEFAULT_HOURGLASS_DELAY);=0A-=0A=20= #if=200=20/*=20This=20doesn't=20really=20do=20anything.=20=20*/=0A=20=20=20= DEFVAR_LISP=20("x-mode-pointer-shape",=20&Vx_mode_pointer_shape,=0A=20=20= =20=20=20doc:=20/*=20The=20shape=20of=20the=20pointer=20when=20over=20= the=20mode=20line.=0A=0A=3D=3D=3D=20modified=20file=20'src/w32fns.c'=0A= ---=20src/w32fns.c=092008-06-02=2012:09:12=20+0000=0A+++=20src/w32fns.c=09= 2008-06-03=2023:58:37=20+0000=0A@@=20-149,10=20+149,6=20@@=0A=20/*=20Non=20= nil=20if=20no=20window=20manager=20is=20in=20use.=20=20*/=0A=20= Lisp_Object=20Vx_no_window_manager;=0A=20=0A-/*=20Non-zero=20means=20= we're=20allowed=20to=20display=20a=20hourglass=20pointer.=20=20*/=0A-=0A= -int=20display_hourglass_p;=0A-=0A=20/*=20If=20non-zero,=20a=20w32=20= timer=20that,=20when=20it=20expires,=20displays=20an=0A=20=20=20=20= hourglass=20cursor=20on=20all=20frames.=20=20*/=0A=20static=20unsigned=20= hourglass_timer=20=3D=200;=0A@@=20-344,10=20+340,6=20@@=0A=20extern=20= void=20syms_of_w32uniscribe=20();=0A=20extern=20int=20= uniscribe_available;=0A=20=0A-/*=20Function=20prototypes=20for=20= hourglass=20support.=20=20*/=0A-static=20void=20show_hourglass=20P_=20= ((struct=20frame=20*));=0A-static=20void=20hide_hourglass=20P_=20= ((void));=0A-=0A=20=0A=20=0C=0A=20/*=20Error=20if=20we=20are=20not=20= connected=20to=20MS-Windows.=20=20*/=0A@@=20-7224,20=20+7216,9=20@@=0A=20= =09=09=09=09Busy=20cursor=0A=20=20= ***********************************************************************/=0A= =20=0A-/*=20Non-zero=20means=20an=20hourglass=20cursor=20is=20currently=20= shown.=20=20*/=0A-=0A-static=20int=20hourglass_shown_p;=0A-=0A-/*=20= Number=20of=20seconds=20to=20wait=20before=20displaying=20an=20hourglass=20= cursor.=20=20*/=0A-=0A-static=20Lisp_Object=20Vhourglass_delay;=0A-=0A= -/*=20Default=20number=20of=20seconds=20to=20wait=20before=20displaying=20= an=20hourglass=0A-=20=20=20cursor.=20=20*/=0A-=0A-#define=20= DEFAULT_HOURGLASS_DELAY=201=0A-=0A=20/*=20Return=20non-zero=20if=20= houglass=20timer=20has=20been=20started=20or=20hourglass=20is=20shown.=20= =20*/=0A+/*=20PENDING:=20if=20W32=20can=20use=20atimers=20(atimer.[hc])=20= then=20the=20common=20impl=20in=0A+=20=20=20=09=20=20=20=20xdisp.c=20= could=20be=20used.=20*/=0A=20=0A=20int=0A=20hourglass_started=20()=0A@@=20= -9142,15=20+9123,6=20@@=0A=20or=20when=20you=20set=20the=20mouse=20= color.=20=20*/);=0A=20=20=20Vx_hourglass_pointer_shape=20=3D=20Qnil;=0A=20= =0A-=20=20DEFVAR_BOOL=20("display-hourglass",=20&display_hourglass_p,=0A= -=09=20=20=20=20=20=20=20doc:=20/*=20Non-zero=20means=20Emacs=20displays=20= an=20hourglass=20pointer=20on=20window=20systems.=20=20*/);=0A-=20=20= display_hourglass_p=20=3D=201;=0A-=0A-=20=20DEFVAR_LISP=20= ("hourglass-delay",=20&Vhourglass_delay,=0A-=09=20=20=20=20=20=20=20doc:=20= /*=20*Seconds=20to=20wait=20before=20displaying=20an=20hourglass=20= pointer.=0A-Value=20must=20be=20an=20integer=20or=20float.=20=20*/);=0A-=20= =20Vhourglass_delay=20=3D=20make_number=20(DEFAULT_HOURGLASS_DELAY);=0A-=0A= =20=20=20DEFVAR_LISP=20("x-sensitive-text-pointer-shape",=0A=20=09=20=20=20= =20=20=20=20&Vx_sensitive_text_pointer_shape,=0A=20=09=20=20=20=20=20=20=20= doc:=20/*=20The=20shape=20of=20the=20pointer=20when=20over=20= mouse-sensitive=20text.=0A@@=20-9348,7=20+9320,7=20@@=0A=20=0A=20=20=20= hourglass_timer=20=3D=200;=0A=20=20=20hourglass_hwnd=20=3D=20NULL;=0A-=20= =20hourglass_shown_p=20=3D=200;=0A+=0A=20=20=20defsubr=20(&Sx_show_tip);=0A= =20=20=20defsubr=20(&Sx_hide_tip);=0A=20=20=20tip_timer=20=3D=20Qnil;=0A=0A= =3D=3D=3D=20modified=20file=20'src/xdisp.c'=0A---=20src/xdisp.c=09= 2008-06-01=2011:04:21=20+0000=0A+++=20src/xdisp.c=092008-06-03=20= 23:30:44=20+0000=0A@@=20-836,6=20+836,25=20@@=0A=20=0A=20static=20struct=20= glyph_slice=20null_glyph_slice=20=3D=20{=200,=200,=200,=200=20};=0A=20=0A= +/*=20Platform-independent=20portion=20of=20hourglass=20implementation.=20= */=0A+=0A+/*=20Non-zero=20means=20we're=20allowed=20to=20display=20a=20= hourglass=20pointer.=20=20*/=0A+int=20display_hourglass_p;=0A+=0A+/*=20= Non-zero=20means=20an=20hourglass=20cursor=20is=20currently=20shown.=20=20= */=0A+int=20hourglass_shown_p;=0A+=0A+/*=20If=20non-null,=20an=20= asynchronous=20timer=20that,=20when=20it=20expires,=20displays=0A+=20=20=20= =20an=20hourglass=20cursor=20on=20all=20frames.=20=20*/=0A+struct=20= atimer=20*hourglass_atimer;=0A+=0A+/*=20Number=20of=20seconds=20to=20= wait=20before=20displaying=20an=20hourglass=20cursor.=20=20*/=0A+static=20= Lisp_Object=20Vhourglass_delay;=0A+=0A+/*=20Default=20number=20of=20= seconds=20to=20wait=20before=20displaying=20an=20hourglass=0A+=20=20=20= cursor.=20=20*/=0A+#define=20DEFAULT_HOURGLASS_DELAY=201=0A+=0A=20=0C=0A=20= /*=20Function=20prototypes.=20=20*/=0A=20=0A@@=20-24791,6=20+24810,17=20= @@=0A=20The=20default=20value=20is=202:=20the=20height=20of=20the=20= overline=20(1=20pixel)=20plus=201=20pixel=0A=20margin=20to=20the=20= caracter=20height.=20=20*/);=0A=20=20=20overline_margin=20=3D=202;=0A+=20= =20DEFVAR_BOOL=20("display-hourglass",=20&display_hourglass_p,=0A+=09=20=20= =20=20=20=20=20doc:=20/*=20Non-zero=20means=20Emacs=20displays=20an=20= hourglass=20pointer=20on=20window=20systems.=20=20*/);=0A+=20=20= display_hourglass_p=20=3D=201;=0A+=0A+=20=20DEFVAR_LISP=20= ("hourglass-delay",=20&Vhourglass_delay,=0A+=09=20=20=20=20=20=20=20doc:=20= /*=20*Seconds=20to=20wait=20before=20displaying=20an=20hourglass=20= pointer.=0A+Value=20must=20be=20an=20integer=20or=20float.=20=20*/);=0A+=20= =20Vhourglass_delay=20=3D=20make_number=20(DEFAULT_HOURGLASS_DELAY);=0A+=0A= +=20=20hourglass_atimer=20=3D=20NULL;=0A+=20=20hourglass_shown_p=20=3D=20= 0;=0A=20}=0A=20=0A=20=0A@@=20-24846,6=20+24876,64=20@@=0A=20=20=20= help_echo_showing_p=20=3D=200;=0A=20}=0A=20=0A+/*=20Platform-independent=20= portion=20of=20hourglass=20implementation.=20*/=0A+=0A+/*=20Return=20= non-zero=20if=20houglass=20timer=20has=20been=20started=20or=20hourglass=20= is=20shown.=20=20*/=0A+int=0A+hourglass_started=20()=0A+{=0A+=20=20= return=20hourglass_shown_p=20||=20hourglass_atimer=20!=3D=20NULL;=0A+}=0A= +=0A+=0A+/*=20Cancel=20a=20currently=20active=20hourglass=20timer,=20and=20= start=20a=20new=20one.=20=20*/=0A+void=0A+start_hourglass=20()=0A+{=0A= +#if=20!defined=20(MAC_OS)=20||=20defined=20(MAC_OSX)=0A+=20=20= EMACS_TIME=20delay;=0A+=20=20int=20secs,=20usecs=20=3D=200;=0A+=0A+=20=20= cancel_hourglass=20();=0A+=0A+=20=20if=20(INTEGERP=20(Vhourglass_delay)=0A= +=20=20=20=20=20=20&&=20XINT=20(Vhourglass_delay)=20>=200)=0A+=20=20=20=20= secs=20=3D=20XFASTINT=20(Vhourglass_delay);=0A+=20=20else=20if=20(FLOATP=20= (Vhourglass_delay)=0A+=09=20=20=20&&=20XFLOAT_DATA=20(Vhourglass_delay)=20= >=200)=0A+=20=20=20=20{=0A+=20=20=20=20=20=20Lisp_Object=20tem;=0A+=20=20= =20=20=20=20tem=20=3D=20Ftruncate=20(Vhourglass_delay,=20Qnil);=0A+=20=20= =20=20=20=20secs=20=3D=20XFASTINT=20(tem);=0A+=20=20=20=20=20=20usecs=20= =3D=20(XFLOAT_DATA=20(Vhourglass_delay)=20-=20secs)=20*=201000000;=0A+=20= =20=20=20}=0A+=20=20else=0A+=20=20=20=20secs=20=3D=20= DEFAULT_HOURGLASS_DELAY;=0A+=0A+=20=20EMACS_SET_SECS_USECS=20(delay,=20= secs,=20usecs);=0A+=20=20hourglass_atimer=20=3D=20start_atimer=20= (ATIMER_RELATIVE,=20delay,=0A+=09=09=09=09=20=20=20show_hourglass,=20= NULL);=0A+#endif=0A+}=0A+=0A+=0A+/*=20Cancel=20the=20hourglass=20cursor=20= timer=20if=20active,=20hide=20a=20busy=20cursor=20if=0A+=20=20=20shown.=20= =20*/=0A+void=0A+cancel_hourglass=20()=0A+{=0A+#if=20!defined=20(MAC_OS)=20= ||=20defined=20(MAC_OSX)=0A+=20=20if=20(hourglass_atimer)=0A+=20=20=20=20= {=0A+=20=20=20=20=20=20cancel_atimer=20(hourglass_atimer);=0A+=20=20=20=20= =20=20hourglass_atimer=20=3D=20NULL;=0A+=20=20=20=20}=0A+=0A+=20=20if=20= (hourglass_shown_p)=0A+=20=20=20=20hide_hourglass=20();=0A+#endif=0A+}=0A= +=0A=20=0A=20/*=20arch-tag:=20eacc864d-bb6a-4b74-894a-1a4399a1358b=0A=20=20= =20=20(do=20not=20change=20this=20comment)=20*/=0A=0A=3D=3D=3D=20= modified=20file=20'src/xfns.c'=0A---=20src/xfns.c=092008-05-22=20= 20:51:54=20+0000=0A+++=20src/xfns.c=092008-06-03=2023:27:37=20+0000=0A@@=20= -149,10=20+149,6=20@@=0A=20int=20gray_bitmap_height=20=3D=20gray_height;=0A= =20char=20*gray_bitmap_bits=20=3D=20gray_bits;=0A=20=0A-/*=20Non-zero=20= means=20we're=20allowed=20to=20display=20an=20hourglass=20cursor.=20=20= */=0A-=0A-int=20display_hourglass_p;=0A-=0A=20/*=20Non-zero=20means=20= prompt=20with=20the=20old=20GTK=20file=20selection=20dialog.=20=20*/=0A=20= =0A=20int=20x_gtk_use_old_file_dialog;=0A@@=20-4450,85=20+4446,6=20@@=0A=20= =09=09=09=09Busy=20cursor=0A=20=20= ***********************************************************************/=0A= =20=0A-/*=20If=20non-null,=20an=20asynchronous=20timer=20that,=20when=20= it=20expires,=20displays=0A-=20=20=20an=20hourglass=20cursor=20on=20all=20= frames.=20=20*/=0A-=0A-static=20struct=20atimer=20*hourglass_atimer;=0A-=0A= -/*=20Non-zero=20means=20an=20hourglass=20cursor=20is=20currently=20= shown.=20=20*/=0A-=0A-static=20int=20hourglass_shown_p;=0A-=0A-/*=20= Number=20of=20seconds=20to=20wait=20before=20displaying=20an=20hourglass=20= cursor.=20=20*/=0A-=0A-static=20Lisp_Object=20Vhourglass_delay;=0A-=0A= -/*=20Default=20number=20of=20seconds=20to=20wait=20before=20displaying=20= an=20hourglass=0A-=20=20=20cursor.=20=20*/=0A-=0A-#define=20= DEFAULT_HOURGLASS_DELAY=201=0A-=0A-/*=20Function=20prototypes.=20=20*/=0A= -=0A-static=20void=20show_hourglass=20P_=20((struct=20atimer=20*));=0A= -static=20void=20hide_hourglass=20P_=20((void));=0A-=0A-/*=20Return=20= non-zero=20if=20houglass=20timer=20has=20been=20started=20or=20hourglass=20= is=20shown.=20=20*/=0A-=0A-int=0A-hourglass_started=20()=0A-{=0A-=20=20= return=20hourglass_shown_p=20||=20hourglass_atimer=20!=3D=20NULL;=0A-}=0A= -=0A-=0A-/*=20Cancel=20a=20currently=20active=20hourglass=20timer,=20and=20= start=20a=20new=20one.=20=20*/=0A-=0A-void=0A-start_hourglass=20()=0A-{=0A= -=20=20EMACS_TIME=20delay;=0A-=20=20int=20secs,=20usecs=20=3D=200;=0A-=0A= -=20=20cancel_hourglass=20();=0A-=0A-=20=20if=20(INTEGERP=20= (Vhourglass_delay)=0A-=20=20=20=20=20=20&&=20XINT=20(Vhourglass_delay)=20= >=200)=0A-=20=20=20=20secs=20=3D=20XFASTINT=20(Vhourglass_delay);=0A-=20=20= else=20if=20(FLOATP=20(Vhourglass_delay)=0A-=09=20=20=20&&=20XFLOAT_DATA=20= (Vhourglass_delay)=20>=200)=0A-=20=20=20=20{=0A-=20=20=20=20=20=20= Lisp_Object=20tem;=0A-=20=20=20=20=20=20tem=20=3D=20Ftruncate=20= (Vhourglass_delay,=20Qnil);=0A-=20=20=20=20=20=20secs=20=3D=20XFASTINT=20= (tem);=0A-=20=20=20=20=20=20usecs=20=3D=20(XFLOAT_DATA=20= (Vhourglass_delay)=20-=20secs)=20*=201000000;=0A-=20=20=20=20}=0A-=20=20= else=0A-=20=20=20=20secs=20=3D=20DEFAULT_HOURGLASS_DELAY;=0A-=0A-=20=20= EMACS_SET_SECS_USECS=20(delay,=20secs,=20usecs);=0A-=20=20= hourglass_atimer=20=3D=20start_atimer=20(ATIMER_RELATIVE,=20delay,=0A-=09= =09=09=09=20=20=20=20=20show_hourglass,=20NULL);=0A-}=0A-=0A-=0A-/*=20= Cancel=20the=20hourglass=20cursor=20timer=20if=20active,=20hide=20a=20= busy=20cursor=20if=0A-=20=20=20shown.=20=20*/=0A-=0A-void=0A= -cancel_hourglass=20()=0A-{=0A-=20=20if=20(hourglass_atimer)=0A-=20=20=20= =20{=0A-=20=20=20=20=20=20cancel_atimer=20(hourglass_atimer);=0A-=20=20=20= =20=20=20hourglass_atimer=20=3D=20NULL;=0A-=20=20=20=20}=0A-=0A-=20=20if=20= (hourglass_shown_p)=0A-=20=20=20=20hide_hourglass=20();=0A-}=0A-=0A-=0A=20= /*=20Timer=20function=20of=20hourglass_atimer.=20=20TIMER=20is=20equal=20= to=0A=20=20=20=20hourglass_atimer.=0A=20=0A@@=20-4537,7=20+4454,7=20@@=0A= =20=20=20=20output_data.x=20structure=20to=20indicate=20that=20an=20= hourglass=20cursor=20is=0A=20=20=20=20shown=20on=20the=20frames.=20=20*/=0A= =20=0A-static=20void=0A+void=0A=20show_hourglass=20(timer)=0A=20=20=20=20= =20=20struct=20atimer=20*timer;=0A=20{=0A@@=20-4602,7=20+4519,7=20@@=0A=20= /*=20Hide=20the=20hourglass=20pointer=20on=20all=20frames,=20if=20it=20= is=20currently=0A=20=20=20=20shown.=20=20*/=0A=20=0A-static=20void=0A= +void=0A=20hide_hourglass=20()=0A=20{=0A=20=20=20if=20= (hourglass_shown_p)=0A@@=20-5828,15=20+5745,6=20@@=0A=20or=20when=20you=20= set=20the=20mouse=20color.=20=20*/);=0A=20=20=20= Vx_hourglass_pointer_shape=20=3D=20Qnil;=0A=20=0A-=20=20DEFVAR_BOOL=20= ("display-hourglass",=20&display_hourglass_p,=0A-=20=20=20=20doc:=20/*=20= Non-zero=20means=20Emacs=20displays=20an=20hourglass=20pointer=20on=20= window=20systems.=20=20*/);=0A-=20=20display_hourglass_p=20=3D=201;=0A-=0A= -=20=20DEFVAR_LISP=20("hourglass-delay",=20&Vhourglass_delay,=0A-=20=20=20= =20doc:=20/*=20*Seconds=20to=20wait=20before=20displaying=20an=20= hourglass=20pointer.=0A-Value=20must=20be=20an=20integer=20or=20float.=20= =20*/);=0A-=20=20Vhourglass_delay=20=3D=20make_number=20= (DEFAULT_HOURGLASS_DELAY);=0A-=0A=20#if=200=20/*=20This=20doesn't=20= really=20do=20anything.=20=20*/=0A=20=20=20DEFVAR_LISP=20= ("x-mode-pointer-shape",=20&Vx_mode_pointer_shape,=0A=20=20=20=20=20doc:=20= /*=20The=20shape=20of=20the=20pointer=20when=20over=20the=20mode=20line.=0A= @@=20-5976,9=20+5884,6=20@@=0A=20=20=20/*=20Setting=20callback=20= functions=20for=20fontset=20handler.=20=20*/=0A=20=20=20= check_window_system_func=20=3D=20check_x;=0A=20=0A-=20=20= hourglass_atimer=20=3D=20NULL;=0A-=20=20hourglass_shown_p=20=3D=200;=0A-=0A= =20=20=20defsubr=20(&Sx_show_tip);=0A=20=20=20defsubr=20(&Sx_hide_tip);=0A= =20=20=20tip_timer=20=3D=20Qnil;=0A=0A= --Apple-Mail-2-155010347 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-2-155010347--