Пример #1
0
class QueryTextExtents(rq.ReplyRequest):
    _request = rq.Struct(
        rq.Opcode(48),
        rq.OddLength('string'),
        rq.RequestLength(),
        rq.Fontable('font'),
        rq.String16('string'),
        )

    _reply = rq.Struct(
        rq.ReplyCode(),
        rq.Card8('draw_direction'),
        rq.Card16('sequence_number'),
        rq.ReplyLength(),
        rq.Int16('font_ascent'),
        rq.Int16('font_descent'),
        rq.Int16('overall_ascent'),
        rq.Int16('overall_descent'),
        rq.Int32('overall_width'),
        rq.Int32('overall_left'),
        rq.Int32('overall_right'),
        rq.Pad(4),
        )
Пример #2
0
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

from Xlib import X, Xutil
from Xlib.protocol import rq

Aspect = rq.Struct( rq.Int32('num'), rq.Int32('denum') )

WMNormalHints = rq.Struct( rq.Card32('flags'),
                           rq.Pad(16),
                           rq.Int32('min_width', default = 0),
                           rq.Int32('min_height', default = 0),
                           rq.Int32('max_width', default = 0),
                           rq.Int32('max_height', default = 0),
                           rq.Int32('width_inc', default = 0),
                           rq.Int32('height_inc', default = 0),
                           rq.Object('min_aspect', Aspect, default = (0, 0)),
                           rq.Object('max_aspect', Aspect, default = (0, 0)),
                           rq.Int32('base_width', default = 0),
                           rq.Int32('base_height', default = 0),
                           rq.Int32('win_gravity', default = 0),
                           )