Module: GdkX11

Defined in:
lib/gdk3/x11-loader.rb

Overview

Copyright (C) 2017 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: X11DeviceType Classes: Loader, X11AppLaunchContext, X11DeviceManagerXI2, X11DeviceXI2, X11Display, X11Drag, X11GLContext, X11Monitor, X11Screen, X11Surface

Instance Method Summary collapse

Instance Method Details

#x11_device_get_id(device) ⇒ Integer

Returns the device ID as seen by XInput2.

Parameters:

Returns:

  • (Integer)

    the XInput2 device ID

#x11_device_manager_lookup(device_manager, device_id) ⇒ GdkX11::X11DeviceXI2

Returns the GdkDevice that wraps the given device ID.

Parameters:

  • device_manager (GdkX11::X11DeviceManagerXI2)

    a GdkDeviceManager

  • device_id (Integer)

    a device ID, as understood by the XInput2 protocol

Returns:

  • (GdkX11::X11DeviceXI2)

    The GdkDevice wrapping the device ID, or nil if the given ID doesn’t currently represent a device.

#x11_free_compound_text(ctext) ⇒ nil

Frees the data returned from gdk_x11_display_string_to_compound_text().

Parameters:

  • ctext (Integer)

    The pointer stored in ctext from a call to gdk_x11_display_string_to_compound_text().

Returns:

  • (nil)

#x11_free_text_list(list) ⇒ nil

Frees the array of strings created by gdk_x11_display_text_property_to_text_list().

Parameters:

  • list (String)

    the value stored in the list parameter by a call to gdk_x11_display_text_property_to_text_list().

Returns:

  • (nil)

#x11_get_server_time(surface) ⇒ Integer

Routine to get the current X server time stamp.

Parameters:

  • surface (GdkX11::X11Surface)

    a GdkSurface, used for communication with the server. The surface must have GDK_PROPERTY_CHANGE_MASK in its events mask or a hang will result.

Returns:

  • (Integer)

    the time stamp

#x11_get_xatom_by_name_for_display(display, atom_name) ⇒ xlib::Atom

Returns the X atom for a GdkDisplay corresponding to atom_name. This function caches the result, so if called repeatedly it is much faster than XInternAtom(), which is a round trip to the server each time.

Parameters:

Returns:

  • (xlib::Atom)

    a X atom for a GdkDisplay

#x11_get_xatom_name_for_display(display, xatom) ⇒ String

Returns the name of an X atom for its display. This function is meant mainly for debugging, so for convenience, unlike XAtomName() and the result doesn’t need to be freed.

Parameters:

  • display (GdkX11::X11Display)

    the GdkDisplay where xatom is defined

  • xatom (xlib::Atom)

    an X atom

Returns:

  • (String)

    name of the X atom; this string is owned by GDK, so it shouldn’t be modified or freed.

#x11_lookup_xdisplay(xdisplay) ⇒ GdkX11::X11Display

Find the GdkDisplay corresponding to xdisplay, if any exists.

Parameters:

  • xdisplay (xlib::Display)

    a pointer to an X Display

Returns:

#x11_set_sm_client_id(sm_client_id) ⇒ nil

Sets the SM_CLIENT_ID property on the application’s leader window so that the window manager can save the application’s state using the X11R6 ICCCM session management protocol.

See the X Session Management Library documentation for more information on session management and the Inter-Client Communication Conventions Manual

Parameters:

  • sm_client_id (String)

    the client id assigned by the session manager when the connection was opened, or nil to remove the property.

Returns:

  • (nil)