← Back to team overview

checkbox-dev team mailing list archive

Re: Question regarding the "get_available_rotations" method in xrandr.py

 

Wooo, nice
I saw those defined values but didn't catch this.
Thanks!! (Sorry I forgot to put the [Checkbox-dev] in the title :P)


On Wed, Jun 18, 2014 at 7:24 PM, Zygmunt Krynicki <
zygmunt.krynicki@xxxxxxxxxxxxx> wrote:

> If you inspect xrandr.py you'll see it's doing a ffi call to xrandr
>
> sudo apt-get install libxrandr-dev
> man XRRConfigRotations
>
> look for XRRConfigRotations
>
> You get:
>
>        Rotations/Reflections
>
>        Can be any of:
>        #define RR_Rotate_0             1
>        #define RR_Rotate_90            2
>        #define RR_Rotate_180           4
>        #define RR_Rotate_270           8
>
>        /∗ new in 1.0 protocol, to allow reflection of screen */
>        /∗ reflection is applied after rotation */
>
>        #define RR_Reflect_X            16
>        #define RR_Reflect_Y            32
>
> So 63 is 32 + 16 + 8 + 4 + 2 +1 == I support everything
>
> Thanks
> ZK
>
>
> On Wed, Jun 18, 2014 at 12:59 PM, Po-Hsu Lin <po-hsu.lin@xxxxxxxxxxxxx>
> wrote:
>
>> Hello,
>> I was trying to improve our rotation_test script.
>> When looking into the xrandr.py, there is a method called
>> get_available_rotations.
>> I'm not sure what's the output of it. (What is the "binary flag" stands
>> for)
>> From the comment:
>> """Returns a binary flag that contains the supported rotations of the
>> hardware pipe"""
>>
>> This is how I test it:
>> >>> import xrandr
>> >>> screen = xrandr.get_current_screen()
>> >>> screen.get_available_rotations()
>> 63
>>
>> It always dump 63, even on a rotation-disabled system.
>> Does anyone knows about it?
>>
>> Thanks,
>> Sam
>>
>> --
>> Mailing list: https://launchpad.net/~checkbox-dev
>> Post to     : checkbox-dev@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~checkbox-dev
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

References