comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Predefined Cursors in X Windows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Predefined Cursors in X Windows [message #40354] Mon, 09 August 2004 10:18
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
marcuirl wrote:
> Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> writes:
>
>
>> David Fanning <davidf@dfanning.com> writes:
>>
>>> In X Windows, these numbers have to be something else. Something
>>> that is defined in /usr/include/X11/cursorfont.h.
>>>
>>> Here is my question for you X windows guys. Is this file
>>> standard across all X windows implementations? If so,
>>> what number would I use to obtain these two types of
>>> cursors?
>>
>> David, I just looked on Linux, Solaris, SunOS, and Alpha machines.
>> They all have essentially the same file (authored by either X
>> Consortium or OpenGroup), and more importantly the numeric constants
>> are all the same.
>>
>> The cursors you want are:
>> #define XC_arrow 2
>> #define XC_xterm 152
>
>
> But does not necessarily live in the same place: redhat 7.3, 7.2 and
> recent fedora fc1
>
> /usr/X11R6/include/X11/cursorfont.h
>
> a bit different from that above! HTH

The generic locations are links to the specific:

lnx142:/usr/include : dir | grep X11
lrwxrwxrwx 1 root root 20 May 13 13:57 DPS -> ../X11R6/include/DPS/
lrwxr-xr-x 1 root root 20 Mar 10 10:19 Mrm -> ../X11R6/include/Mrm/
lrwxrwxrwx 1 root root 20 May 13 13:57 X11 -> ../X11R6/include/X11/
lrwxr-xr-x 1 root root 19 Mar 10 10:19 Xm -> ../X11R6/include/Xm/
lrwxr-xr-x 1 root root 20 Mar 10 10:19 uil -> ../X11R6/include/uil/

paulv
Re: Predefined Cursors in X Windows [message #40356 is a reply to message #40354] Mon, 09 August 2004 09:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul Van Delst writes:

> Anyway, here's my cursorfont.h from my RHE WS3.0 setup

Lovely! Thanks, all.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Predefined Cursors in X Windows [message #40357 is a reply to message #40356] Mon, 09 August 2004 09:01 Go to previous message
marcuirl is currently offline  marcuirl
Messages: 14
Registered: December 2003
Junior Member
Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> writes:

> David Fanning <davidf@dfanning.com> writes:
>> In X Windows, these numbers have to be something else. Something
>> that is defined in /usr/include/X11/cursorfont.h.
>>
>> Here is my question for you X windows guys. Is this file
>> standard across all X windows implementations? If so,
>> what number would I use to obtain these two types of
>> cursors?
>
> David, I just looked on Linux, Solaris, SunOS, and Alpha machines.
> They all have essentially the same file (authored by either X
> Consortium or OpenGroup), and more importantly the numeric constants
> are all the same.
>
> The cursors you want are:
> #define XC_arrow 2
> #define XC_xterm 152

But does not necessarily live in the same place: redhat 7.3, 7.2 and
recent fedora fc1

/usr/X11R6/include/X11/cursorfont.h

a bit different from that above! HTH

marcu
Re: Predefined Cursors in X Windows [message #40358 is a reply to message #40357] Mon, 09 August 2004 08:45 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Folks,
>
> I'm working on my annotation tool this morning and I am
> having cursor questions. Specifically, I want my cursor
> to shift into a I-beam shape when the user is typing text
> in the window, and into an arrow when the user is selecting
> text to move around in the window.
>
> In Windows this is easily accomplished with the CURSOR_STANDARD
> command:
>
> Device, Cursor_Standard=32512L ; Arrow
> Device, Cursor_Standard=32513L ; I-Beam
>
> In X Windows, these numbers have to be something else. Something
> that is defined in /usr/include/X11/cursorfont.h.
>
> Here is my question for you X windows guys. Is this file
> standard across all X windows implementations? If so,
> what number would I use to obtain these two types of
> cursors?

I thought using the numbers directly was A Bad Thing? Is there a way to use the definiton
names in the cursorfonts.h available in idl under X? I just tried and couldn't get,

device, cursor_standard=XC_pirate

to work, but

device, cursor_standard=88

gave me the skull and crossbones. Anyway, here's my cursorfont.h from my RHE WS3.0 setup:

#define XC_num_glyphs 154
#define XC_X_cursor 0
#define XC_arrow 2
#define XC_based_arrow_down 4
#define XC_based_arrow_up 6
#define XC_boat 8
#define XC_bogosity 10
#define XC_bottom_left_corner 12
#define XC_bottom_right_corner 14
#define XC_bottom_side 16
#define XC_bottom_tee 18
#define XC_box_spiral 20
#define XC_center_ptr 22
#define XC_circle 24
#define XC_clock 26
#define XC_coffee_mug 28
#define XC_cross 30
#define XC_cross_reverse 32
#define XC_crosshair 34
#define XC_diamond_cross 36
#define XC_dot 38
#define XC_dotbox 40
#define XC_double_arrow 42
#define XC_draft_large 44
#define XC_draft_small 46
#define XC_draped_box 48
#define XC_exchange 50
#define XC_fleur 52
#define XC_gobbler 54
#define XC_gumby 56
#define XC_hand1 58
#define XC_hand2 60
#define XC_heart 62
#define XC_icon 64
#define XC_iron_cross 66
#define XC_left_ptr 68
#define XC_left_side 70
#define XC_left_tee 72
#define XC_leftbutton 74
#define XC_ll_angle 76
#define XC_lr_angle 78
#define XC_man 80
#define XC_middlebutton 82
#define XC_mouse 84
#define XC_pencil 86
#define XC_pirate 88
#define XC_plus 90
#define XC_question_arrow 92
#define XC_right_ptr 94
#define XC_right_side 96
#define XC_right_tee 98
#define XC_rightbutton 100
#define XC_rtl_logo 102
#define XC_sailboat 104
#define XC_sb_down_arrow 106
#define XC_sb_h_double_arrow 108
#define XC_sb_left_arrow 110
#define XC_sb_right_arrow 112
#define XC_sb_up_arrow 114
#define XC_sb_v_double_arrow 116
#define XC_shuttle 118
#define XC_sizing 120
#define XC_spider 122
#define XC_spraycan 124
#define XC_star 126
#define XC_target 128
#define XC_tcross 130
#define XC_top_left_arrow 132
#define XC_top_left_corner 134
#define XC_top_right_corner 136
#define XC_top_side 138
#define XC_top_tee 140
#define XC_trek 142
#define XC_ul_angle 144
#define XC_umbrella 146
#define XC_ur_angle 148
#define XC_watch 150
#define XC_xterm 152


>
> Thanks,
>
> David
>
Re: Predefined Cursors in X Windows [message #40359 is a reply to message #40358] Mon, 09 August 2004 08:18 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <davidf@dfanning.com> writes:
> In X Windows, these numbers have to be something else. Something
> that is defined in /usr/include/X11/cursorfont.h.
>
> Here is my question for you X windows guys. Is this file
> standard across all X windows implementations? If so,
> what number would I use to obtain these two types of
> cursors?

David, I just looked on Linux, Solaris, SunOS, and Alpha machines.
They all have essentially the same file (authored by either X
Consortium or OpenGroup), and more importantly the numeric constants
are all the same.

The cursors you want are:
#define XC_arrow 2
#define XC_xterm 152

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Predefined Cursors in X Windows
Next Topic: Re: IDL 6.1 released

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:39:26 PDT 2025

Total time taken to generate the page: 0.96276 seconds