how to rotate the screen for 90 angle in Photon

Hello.Has someone done things such as rotating the screen for 90 angle using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:jiegi@public.wh.hb.cn
or:gaoj@jinglun.com.cn
tel:86 (027) 87921111

There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <jiegi@public.wh.hb.cn> wrote:

Hello.Has someone done things such as rotating the screen for 90 angle using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111

IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90 layer?
(transpose X and Y)

Michael Van Reenen <mvr@qnx.com> wrote in message
news:8smqr6$mre$3@nntp.qnx.com

There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90 angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111

Michael J. Ferrador <n2kra@orn.com> wrote:

IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90 layer?
(transpose X and Y)

That sounds like a real elegant way to do it, but it’s not really.

If all you ever had to do was muck with moving the corners around, it
would work, but many drawing operations involve additional data like
bitmaps or images, and those require a bunch of work be done to rotate
the actual data.

We use cyrix Geode™ CS5530,the driver is devg-cyrix.so.
If write the special driver,what’s the interface between Photon and graphics
driver?and anything usable such as documents of how-to, driver
templates,source codes? when will your graphics driver development kit be
ready,can I be a beta user?


GAO JIE – Softare Engineer
mailto:jiegi@public.wh.hb.cn
or:gaoj@jinglun.com.cn
tel:86 (027) 87921111
Michael Van Reenen <mvr@qnx.com> wrote in message
news:8smqr6$mre$3@nntp.qnx.com

There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90 angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111

I’m greener too.Your idea is beautiful but pete@qnx.com is reasonable
too.I’ll ponder your idea .It is hardware-dependent,i think.
Put aside this validity,discuss the software feasibility.We can create a
region sensitive and opaque to some events,can we change the data in the
events as we want?

GAO JIE – Softare Engineer
mailto:jiegi@public.wh.hb.cn
or:gaoj@jinglun.com.cn
tel:86 (027) 87921111
Michael J. Ferrador <n2kra@orn.com> wrote in message
news:8smt20$rhb$1@inn.qnx.com

IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90
layer?
(transpose X and Y)

Michael Van Reenen <> mvr@qnx.com> > wrote in message
news:8smqr6$mre$> 3@nntp.qnx.com> …
There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90 angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea
that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111
\

gaojie wrote:

I’m greener too.Your idea is beautiful but > pete@qnx.com > is reasonable
too.I’ll ponder your idea .It is hardware-dependent,i think.
Put aside this validity,discuss the software feasibility.We can create a
region sensitive and opaque to some events,can we change the data in the
events as we want?

Yes. I used this trick in the early days of Photon to write russian
keyboard driver :wink:
You intercept events, modify the as you want and re-emit them. Beware
though, some events might be ‘jumping’ rather than traveling and you
can’t do a damn thing about them.

Docs are also little bit vague about how exactly events of various type
are traveling. You will need to experiment.

  • igor


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111
Michael J. Ferrador <> n2kra@orn.com> > wrote in message
news:8smt20$rhb$> 1@inn.qnx.com> …
IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90
layer?
(transpose X and Y)

Michael Van Reenen <> mvr@qnx.com> > wrote in message
news:8smqr6$mre$> 3@nntp.qnx.com> …
There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90 angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea
that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111
\

Sure, but with the Photon Draw Stream not all the data is necessarily embedded there.
Images that were created using PgShmemCreate() won’t be in the stream for example, so you’d
have to open up the shared memory object, and make a rotated copy to re-emit (I’m not sure
you’d have enough info from the stream to do this however…) There are probably other
problems as well (ie: Direct Mode app’s stream wouldn’t hit your region,
they go straight to the driver, not even going to the photon server…)

Basically it may be possible, but it’s not simple…it’s probably a lot
easier to just do it in the driver, and would work in more scenarios.

gaojie <jiegi@public.wh.hb.cn> wrote:

I’m greener too.Your idea is beautiful but > pete@qnx.com > is reasonable
too.I’ll ponder your idea .It is hardware-dependent,i think.
Put aside this validity,discuss the software feasibility.We can create a
region sensitive and opaque to some events,can we change the data in the
events as we want?

GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111
Michael J. Ferrador <> n2kra@orn.com> > wrote in message
news:8smt20$rhb$> 1@inn.qnx.com> …
IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90
layer?
(transpose X and Y)

Michael Van Reenen <> mvr@qnx.com> > wrote in message
news:8smqr6$mre$> 3@nntp.qnx.com> …
There is no built-in mechanism for doing this. It would
require a special graphics driver. You could have
a custom engineering job done, or we almost have our Graphics
Driver Development Kit almost ready and you could try to
do your own driver.

What type of video card / graphics chipset were you thinking
of using?

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90 angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea
that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111
\

Yes, I didn’t think about what kind of data
(bitmaps) could be inside the draw messages.


Thinking more about architecture: Did I get event-handling layer, right?
Or is it message passing, since that’s what the whole OS is?

by the way vpim (japanese) support, the help (light bulb) icon points
to a non-existant helpviewer file ///nto/… (not in QNX for news).
Also since I’m just learning, docs in english would help also
(I’ll try to use MS IM english-japanese docs)

Is font rendering a layer? I was thinking about the term stroke font
Are the japanese fonts, in stroke >order< ? could be an interesting
learning tool if you could program the display to draw 1 stroke at a time

pseudocode
for (stroke==1,++stroke,NumStrokes(char)) do
FontRendStroke(char,stroke)
/* then either - delay(time) -or- move to next char cell */
done
play_snd("/path/vje/%s.sndext", char)

sort of build (hiragana/katakana/kanji) pratice sheets

David Rempel <drempel@qnx.com> wrote in message
news:8sph21$c15$1@nntp.qnx.com

Sure, but with the Photon Draw Stream not all the data is necessarily
embedded there.
Images that were created using PgShmemCreate() won’t be in the stream for
example, so you’d
have to open up the shared memory object, and make a rotated copy to
re-emit (I’m not sure
you’d have enough info from the stream to do this however…) There are
probably other
problems as well

IANAPP (I am not a photon programmer) But while reading your architecture
stuff -

Photon is a bunch of event handling layers? could you write a rot-90
layer?
(transpose X and Y)

gaojie <> jiegi@public.wh.hb.cn> > wrote:
Hello.Has someone done things such as rotating the screen for 90
angle
using
any way in Neutrino 2.1 for qnxrtp and Photon 2.0? Or any new idea
that
havn’t tested?I’m very glad to discuss this with you.


GAO JIE – Softare Engineer
mailto:> jiegi@public.wh.hb.cn
or:> gaoj@jinglun.com.cn
tel:86 (027) 87921111

gaojie <jiegi@public.wh.hb.cn> wrote:

I’m greener too.Your idea is beautiful but > pete@qnx.com > is reasonable
too.I’ll ponder your idea .It is hardware-dependent,i think.
Put aside this validity,discuss the software feasibility.We can create a
region sensitive and opaque to some events,can we change the data in the
events as we want?

Yes, you can change the data in the events, but not all the data that
would need to be changed is actually in the event.

An event might say that a certain string is to be drawn using a certain
font, and it’s not until that event is down inside the driver that the
bitmap corresponding to the string is created. Your filter can’t rotate
that data because it doesn’t exist when you would see the event.

There are also images that could be in shared memory, and you can’t just
go into them and rotate them in place because the application may be
relying on the data not to change.

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

Docs are also little bit vague about how exactly events of various type
are traveling. You will need to experiment.

  • igor

Anything specific that the docs people who are reading this could
chase down?

gaojie <jiegi@public.wh.hb.cn> wrote:

We use cyrix Geode™ CS5530,the driver is devg-cyrix.so.
If write the special driver,what’s the interface between Photon and graphics
driver?

It’s a series of tokens passed in a message we call a draw stream.

and anything usable such as documents of how-to, driver
templates,source codes?

In the driver development kit.

when will your graphics driver development kit be ready, can I be a
beta user?

You don’t need to be a beta user… the kit will not be beta it will
be a released kit available to anyone.

It should be there in less than a couple of weeks.

It was long time ago, but from what I remember, docs suggest that all
drivers put their regions in front of ‘device’ region (and that is why
it does exist). So, to intercept driver events one should stick a region
immediately in front of ‘device’ region. In reality if you do that
you’ll see no keyboard events. I had to position my region behind
‘device’, so I concluded that events from keyboard driver are ‘jumping’
to ‘device’.

  • Igor

pete@qnx.com wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:

Docs are also little bit vague about how exactly events of various type
are traveling. You will need to experiment.

  • igor

Anything specific that the docs people who are reading this could
chase down?

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

It was long time ago, but from what I remember, docs suggest that all
drivers put their regions in front of ‘device’ region (and that is why
it does exist). So, to intercept driver events one should stick a region
immediately in front of ‘device’ region. In reality if you do that
you’ll see no keyboard events. I had to position my region behind
‘device’, so I concluded that events from keyboard driver are ‘jumping’
to ‘device’.

Your conclusion is wrong. Keyboard/mouse drivers emit raw input
events (of type Ph_EV_RAW) from their region. These events are
collected by the device region and re-emitted as “cooked” key or pointer
events of various types. If you stick your region in front of the
device region, you should make it sensitive to Ph_EV_RAW events rather
than Ph_EV_KEY events.

\

Wojtek Lerch (wojtek@qnx.com) QNX Software Systems Ltd.

Wojtek Lerch wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
It was long time ago, but from what I remember, docs suggest that all
drivers put their regions in front of ‘device’ region (and that is why
it does exist). So, to intercept driver events one should stick a region
immediately in front of ‘device’ region. In reality if you do that
you’ll see no keyboard events. I had to position my region behind
‘device’, so I concluded that events from keyboard driver are ‘jumping’
to ‘device’.

Your conclusion is wrong. Keyboard/mouse drivers emit raw input
events (of type Ph_EV_RAW) from their region. These events are
collected by the device region and re-emitted as “cooked” key or pointer
events of various types. If you stick your region in front of the
device region, you should make it sensitive to Ph_EV_RAW events rather
than Ph_EV_KEY events.

How I was supposed to know? Just proves the point that docs are somewhat
vague, doesn’t it?
Thanks for the info by the way. How does one identify those ‘RAW’ events
as being ‘undercooked’ KEY events?

  • igor

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

: How I was supposed to know? Just proves the point that docs are somewhat
: vague, doesn’t it?
: Thanks for the info by the way. How does one identify those ‘RAW’ events
: as being ‘undercooked’ KEY events?

From the Photon Architecture appendix of the Programmer’s Guide:

A pointer event emitted from a driver is unfocused, or raw, until it
arrives at the device region, where the Photon Manager intercepts it
and then assigns it a location in the Photon coordinate space.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems Ltd.

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

It was long time ago, but from what I remember, docs suggest that all
drivers put their regions in front of ‘device’ region (and that is why
it does exist). So, to intercept driver events one should stick a region
immediately in front of ‘device’ region. In reality if you do that
you’ll see no keyboard events. I had to position my region behind
‘device’, so I concluded that events from keyboard driver are ‘jumping’
to ‘device’.

  • Igor

Good point… that is true.

Keyboard events hit a `focus’ region that redirects them to the app
that has focus.

Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

How I was supposed to know? Just proves the point that docs are somewhat
vague, doesn’t it?
Thanks for the info by the way. How does one identify those ‘RAW’ events
as being ‘undercooked’ KEY events?

They taste bland and mushy… there is no caramelization that a nice
golden brown event has when it’s properly cooked.

Steve Reid wrote:

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:

: How I was supposed to know? Just proves the point that docs are somewhat
: vague, doesn’t it?
: Thanks for the info by the way. How does one identify those ‘RAW’ events
: as being ‘undercooked’ KEY events?

From the Photon Architecture appendix of the Programmer’s Guide:

A pointer event emitted from a driver is unfocused, or raw, until it
arrives at the device region, where the Photon Manager intercepts it
and then assigns it a location in the Photon coordinate space.

Yes, but that implies they ARE ‘pointer events’ to begin with, just with
unassigned location. While in fact they aren’t really ‘pointer’ events.

  • igor

Well,I know your graphics driver development kit isn’t ready now,but it’s
almost ready.Could you send it to me earlier before releasing it? Or someone
can tell me more about graphics driver writing?
And,please forgive my obtrusion,it’s because our product-development is
somewhat emergency. :slight_smile:

GAO JIE – Softare Engineer
mailto:jiegi@public.wh.hb.cn
or:gaoj@jinglun.com.cn
tel:86 (027) 87921111
<pete@qnx.com> wrote in message news:8sppd9$gqb$3@nntp.qnx.com

gaojie <> jiegi@public.wh.hb.cn> > wrote:
We use cyrix Geode™ CS5530,the driver is devg-cyrix.so.
If write the special driver,what’s the interface between Photon and
graphics
driver?

It’s a series of tokens passed in a message we call a draw stream.

and anything usable such as documents of how-to, driver
templates,source codes?

In the driver development kit.

when will your graphics driver development kit be ready, can I be a
beta user?

You don’t need to be a beta user… the kit will not be beta it will
be a released kit available to anyone.

It should be there in less than a couple of weeks.