text stringlengths 81 112k |
|---|
Remove layer(s) from SVG document.
Arguments
---------
svg_source : str or file-like
A file path, URI, or file-like object.
layer_name : str or list
Layer name or list of layer names to remove from SVG document.
Returns
-------
StringIO.StringIO
File-like object con... |
Loader that loads any eggs in `sys.path`.
def load_eggs(entry_point_name):
"""Loader that loads any eggs in `sys.path`."""
def _load_eggs():
distributions, errors = working_set.find_plugins(Environment())
for dist in distributions:
# pylint: disable=unsupported-membership-test
... |
ResfDecl expression of the citation scheme
:rtype: str
:Example: /tei:TEI/tei:text/tei:body/tei:div//tei:l[@n='$1']
def refsDecl(self):
""" ResfDecl expression of the citation scheme
:rtype: str
:Example: /tei:TEI/tei:text/tei:body/tei:div//tei:l[@n='$1']
"""
f... |
Setter for **self.__file** attribute.
:param value: Attribute value.
:type value: unicode
def file(self, value):
"""
Setter for **self.__file** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
assert ... |
Setter for **self.__directory** attribute.
:param value: Attribute value.
:type value: unicode
def directory(self, value):
"""
Setter for **self.__directory** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__attribute** attribute.
:param value: Attribute value.
:type value: unicode
def attribute(self, value):
"""
Setter for **self.__attribute** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__require** attribute.
:param value: Attribute value.
:type value: tuple or list
def require(self, value):
"""
Setter for **self.__require** attribute.
:param value: Attribute value.
:type value: tuple or list
"""
if value is not None... |
Setter for **self.__module** attribute.
:param value: Attribute value.
:type value: ModuleType
def module(self, value):
"""
Setter for **self.__module** attribute.
:param value: Attribute value.
:type value: ModuleType
"""
if value is not None:
... |
Setter for **self.__category** attribute.
:param value: Attribute value.
:type value: unicode
def category(self, value):
"""
Setter for **self.__category** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__title** attribute.
:param value: Attribute value.
:type value: unicode
def title(self, value):
"""
Setter for **self.__title** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
asse... |
Setter for **self.__package** attribute.
:param value: Attribute value.
:type value: unicode
def package(self, value):
"""
Setter for **self.__package** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__version** attribute.
:param value: Attribute value.
:type value: unicode
def version(self, value):
"""
Setter for **self.__version** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__author** attribute.
:param value: Attribute value.
:type value: unicode
def author(self, value):
"""
Setter for **self.__author** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
a... |
Setter for **self.__email** attribute.
:param value: Attribute value.
:type value: unicode
def email(self, value):
"""
Setter for **self.__email** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
asse... |
Setter for **self.__url** attribute.
:param value: Attribute value.
:type value: unicode
def url(self, value):
"""
Setter for **self.__url** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
assert typ... |
Setter for **self.__description** attribute.
:param value: Attribute value.
:type value: unicode
def description(self, value):
"""
Setter for **self.__description** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None... |
Initializes the Component Profile.
:return: Method success.
:rtype: bool
def initializeProfile(self):
"""
Initializes the Component Profile.
:return: Method success.
:rtype: bool
"""
LOGGER.debug("> Building '{0}' profile.".format(self.__file))
... |
Setter for **self.__paths** attribute.
:param value: Attribute value.
:type value: tuple or list
def paths(self, value):
"""
Setter for **self.__paths** attribute.
:param value: Attribute value.
:type value: tuple or list
"""
if value is not None:
... |
Setter for **self.__extension** attribute.
:param value: Attribute value.
:type value: unicode
def extension(self, value):
"""
Setter for **self.__extension** attribute.
:param value: Attribute value.
:type value: unicode
"""
if value is not None:
... |
Setter for **self.__categories** attribute.
:param value: Attribute value.
:type value: dict
def categories(self, value):
"""
Setter for **self.__categories** attribute.
:param value: Attribute value.
:type value: dict
"""
if value is not None:
... |
Registers a Component using given path.
Usage::
>>> manager = Manager()
>>> manager.register_component("tests_component_a.rc")
True
>>> manager.components
{u'core.tests_component_a': <manager.components_manager.Profile object at 0x11c9eb0>}
... |
Registers the Components.
Usage::
>>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",))
>>> manager.register_components()
True
>>> manager.components.keys()
[u'core.tests_component_a', u'core.tests_component_b']
... |
Instantiates given Component.
Usage::
>>> manager = Manager()
>>> manager.register_component("tests_component_a.rc")
True
>>> manager.instantiate_component("core.tests_component_a")
True
>>> manager.get_interface("core.tests_component_a")... |
Instantiates the Components.
Usage::
>>> manager = Manager((tests_manager,))
>>> manager.register_components()
True
>>> manager.instantiate_components()
True
>>> manager.get_interface("core.tests_component_a")
<tests_component... |
Reload given Component module.
Usage::
>>> manager = Manager()
>>> manager.register_component("tests_component_a.rc")
True
>>> manager.instantiate_component("core.tests_component_a")
True
>>> manager.get_interface("core.tests_component_a"... |
Lists the Components by dependency resolving.
Usage::
>>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",))
>>> manager.register_components()
True
>>> manager.list_components()
[u'core.tests_component_a', u'core.tests_co... |
Lists given Component dependents Components.
Usage::
>>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",))
>>> manager.register_components()
True
>>> manager.list_dependents("core.tests_component_a")
[u'core.tests_compon... |
Filters the Components using given regex pattern.
Usage::
>>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",))
>>> manager.register_components()
True
>>> manager.filter_components("\w+A$")
[u'core.tests_component_a']
... |
Gets given Component profile.
Usage::
>>> manager = Manager()
>>> manager.register_component("tests_component_a.rc")
True
>>> manager.get_profile("core.tests_component_a")
<manager.components_manager.Profile object at 0x10258ef10>
:param com... |
Gets given Component interface.
Usage::
>>> manager = Manager()
>>> manager.register_component("tests_component_a.rc")
True
>>> manager.get_interface("core.tests_component_a")
<tests_component_a.TestsComponentA object at 0x17b0d70>
:param co... |
Gets given Component attribute name.
Usage::
>>> Manager.get_component_attribute_name("factory.components_manager_ui")
u'factoryComponentsManagerUi'
:param component: Component to get the attribute name.
:type component: unicode
:return: Component attribute nam... |
Compile the properties to a table.
:param olist: list, Names of the parameters to be in the output table
:param oformat: str, The type of table to be output
:param table_ends: bool, Add ends to the table
:param prefix: str, A string to be added to the start of each parameter name
:return: para, str... |
convert a parameter value into a formatted string with certain significant figures
:param value: the value to be formatted
:param sf: number of significant figures
:return: str
def format_value(value, sf=3):
"""
convert a parameter value into a formatted string with certain significant figures
... |
Adds the latex table ends
:param para:
:param oformat:
:param caption:
:param label:
:return:
def add_table_ends(para, oformat='latex', caption="caption-text", label="table"):
"""
Adds the latex table ends
:param para:
:param oformat:
:param caption:
:param label:
:ret... |
Draw shapes as a layer in a SVG file.
Args:
df_shapes (pandas.DataFrame): Table of shape vertices (one row per
vertex).
shape_i_columns (str or list) : Either a single column name as a string
or a list of column names in ``df_shapes``. Rows in ``df_shapes``
wit... |
Draw lines defined by endpoint coordinates as a layer in a SVG file.
Args:
df_endpoints (pandas.DataFrame) : Each row corresponds to the endpoints
of a single line, encoded through the columns: ``x_source``,
``y_source``, ``x_target``, and ``y_target``.
layer_name (str) : N... |
Create a DTS Error reply
:param error_name: Name of the error
:param message: Message of the Error
:return: DTS Error Response with information (JSON)
def dts_error(self, error_name, message=None):
""" Create a DTS Error reply
:param error_name: Name of the error
:para... |
DTS Collection Metadata reply for given objectId
:param objectId: Collection Identifier
:return: JSON Format of DTS Collection
def r_dts_collection(self, objectId=None):
""" DTS Collection Metadata reply for given objectId
:param objectId: Collection Identifier
:return: JSON F... |
Create a new 'run' in the database.
This creates a new transaction in the database and creates a new
run in this transaction. Afterwards we return both the transaction as
well as the run itself. The user is responsible for committing it when
the time comes.
Args:
cmd: The command that has ... |
Create a new 'run_group' in the database.
This creates a new transaction in the database and creates a new run_group
within this transaction. Afterwards we return both the transaction as well
as the run_group itself. The user is responsible for committing it when the
time comes.
Args:
prj ... |
Persist this project in the benchbuild database.
Args:
project: The project we want to persist.
def persist_project(project):
"""
Persist this project in the benchbuild database.
Args:
project: The project we want to persist.
"""
from benchbuild.utils.schema import Project, Se... |
Persist this experiment in the benchbuild database.
Args:
experiment: The experiment we want to persist.
def persist_experiment(experiment):
"""
Persist this experiment in the benchbuild database.
Args:
experiment: The experiment we want to persist.
"""
from benchbuild.utils.s... |
Persist the run results in the database.
Args:
run: The run we attach this timing results to.
session: The db transaction we belong to.
timings: The timing measurements we want to store.
def persist_time(run, session, timings):
"""
Persist the run results in the database.
Args... |
Persist the flamegraph in the database.
The flamegraph exists as a SVG image on disk until we persist it in the
database.
Args:
run: The run we attach these perf measurements to.
session: The db transaction we belong to.
svg_path: The path to the SVG file we want to store.
def per... |
Persist the run results in the database.
Args:
run: The run we attach the compilestats to.
session: The db transaction we belong to.
stats: The stats we want to store in the database.
def persist_compilestats(run, session, stats):
"""
Persist the run results in the database.
A... |
Persist the configuration in as key-value pairs.
Args:
run: The run we attach the config to.
session: The db transaction we belong to.
cfg: The configuration we want to persist.
def persist_config(run, session, cfg):
"""
Persist the configuration in as key-value pairs.
Args:
... |
Extract columns from the line under "Summary of all tests:"
:param header: content of the results header line
:return: list of string providing columns
def parse_results_header(cls, header):
"""Extract columns from the line under "Summary of all tests:"
:param header: content of the r... |
Extract metrics from a result line
:param columns: list of columns specified under line
"Summary of all tests:"
:param line: string of results below the columns line
:param metrics: output dict where metrics are written
def parse_result_line(cls, columns, line, metrics):
"""Extr... |
List of API to test
def apis(self):
"""List of API to test"""
value = self.attributes['apis']
if isinstance(value, six.string_types):
value = shlex.split(value)
return value |
Make sure the named directory is created if possible
def pre_execute(self, execution, context):
"""Make sure the named directory is created if possible"""
path = self._fspath
if path:
path = path.format(
benchmark=context.benchmark,
api=execution['cat... |
Provides block_size and transfer_size through a list
of dict, for instance: [{'transfer': '1M 4M', 'block': '8M'}]
def sizes(self):
"""Provides block_size and transfer_size through a list
of dict, for instance: [{'transfer': '1M 4M', 'block': '8M'}]
"""
if self.attributes.get('s... |
Additional options appended to the ior command
type: either string or a list of string
def options(self):
"""Additional options appended to the ior command
type: either string or a list of string
"""
options = self.attributes['options']
if isinstance(options, six.string_... |
onefile, fpp, or both
def file_mode(self):
"""onefile, fpp, or both"""
fms = self.attributes['file_mode']
eax = set()
if isinstance(fms, six.string_types):
fms = shlex.split(fms)
for fm in fms:
if fm == 'both':
eax.add('fpp')
... |
Contiguous bytes to write per task (e.g.: 8, 4k, 2m, 1g)
def block_size(self):
"""Contiguous bytes to write per task (e.g.: 8, 4k, 2m, 1g)
"""
bs = self.attributes['block_size']
if isinstance(bs, six.string_types):
bs = shlex.split(bs)
bs = [str(e) for e in bs]
... |
Size of transfer in bytes (e.g.: 8, 4k, 2m, 1g)
def transfer_size(self):
"""Size of transfer in bytes (e.g.: 8, 4k, 2m, 1g)"""
ts = self.attributes['transfer_size']
if isinstance(ts, six.string_types):
ts = shlex.split(ts)
ts = [str(e) for e in ts]
return ts |
Macro to check if this event is
a :class:`~libinput.event.DeviceNotifyEvent`.
def is_device(self):
"""Macro to check if this event is
a :class:`~libinput.event.DeviceNotifyEvent`.
"""
if self in {type(self).DEVICE_ADDED, type(self).DEVICE_REMOVED}:
return True
else:
return False |
Macro to check if this event is
a :class:`~libinput.event.PointerEvent`.
def is_pointer(self):
"""Macro to check if this event is
a :class:`~libinput.event.PointerEvent`.
"""
if self in {type(self).POINTER_MOTION, type(self).POINTER_BUTTON,
type(self).POINTER_MOTION_ABSOLUTE, type(self).POINTER_AXIS}:
... |
Macro to check if this event is
a :class:`~libinput.event.TouchEvent`.
def is_touch(self):
"""Macro to check if this event is
a :class:`~libinput.event.TouchEvent`.
"""
if self in {type(self).TOUCH_DOWN, type(self).TOUCH_UP,
type(self).TOUCH_MOTION, type(self).TOUCH_CANCEL,
type(self).TOUCH_FRAME}:
... |
Macro to check if this event is
a :class:`~libinput.event.TabletToolEvent`.
def is_tablet_tool(self):
"""Macro to check if this event is
a :class:`~libinput.event.TabletToolEvent`.
"""
if self in {type(self).TABLET_TOOL_AXIS, type(self).TABLET_TOOL_BUTTON,
type(self).TABLET_TOOL_PROXIMITY, type(self).TAB... |
Macro to check if this event is
a :class:`~libinput.event.TabletPadEvent`.
def is_tablet_pad(self):
"""Macro to check if this event is
a :class:`~libinput.event.TabletPadEvent`.
"""
if self in {type(self).TABLET_PAD_BUTTON, type(self).TABLET_PAD_RING,
type(self).TABLET_PAD_STRIP}:
return True
else:
... |
Macro to check if this event is
a :class:`~libinput.event.GestureEvent`.
def is_gesture(self):
"""Macro to check if this event is
a :class:`~libinput.event.GestureEvent`.
"""
if self in {type(self).GESTURE_SWIPE_BEGIN, type(self).GESTURE_SWIPE_END,
type(self).GESTURE_SWIPE_UPDATE, type(self).GESTURE_PINC... |
The device associated with this event.
For device added/removed events this is the device added or removed.
For all other device events, this is the device that generated the
event.
Returns:
~libinput.define.Device: Device object.
def device(self):
"""The device associated with this event.
For device... |
The delta between the last event and the current event.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_MOTION`, this property
raises :exc:`AttributeError`.
If a device employs pointer acceleration, the delta
returned by this method is the accelerated delta.
Relative m... |
The relative delta of the unaccelerated motion vector of the
current event.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_MOTION`, this property
raises :exc:`AttributeError`.
Relative unaccelerated motion deltas are raw device coordinates. Note
that these coordinates ... |
The current absolute coordinates of the pointer event,
in mm from the top left corner of the device.
To get the corresponding output screen coordinate, use
:meth:`transform_absolute_coords`.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_MOTION_ABSOLUTE`,
this property... |
Return the current absolute coordinates of the pointer event,
transformed to screen coordinates.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_MOTION_ABSOLUTE`,
this method raises :exc:`AttributeError`.
Args:
width (int): The current output screen width.
height (i... |
The button that triggered this event.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_BUTTON`,
this property raises :exc:`AttributeError`.
Returns:
int: The button triggering this event.
Raises:
AttributeError
def button(self):
"""The button that triggered this e... |
The button state that triggered this event.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_BUTTON`, this property
raises :exc:`AttributeError`.
Returns:
~libinput.constant.ButtonState: The button state triggering this
event.
Raises:
AttributeError
def button_st... |
The total number of buttons pressed on all devices on the
associated seat after the event was triggered.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_BUTTON`, this property
raises :exc:`AssertionError`.
Returns:
int: The seat wide pressed button count for the key of... |
Check if the event has a valid value for the given axis.
If this method returns True for an axis and :meth:`get_axis_value`
returns a value of 0, the event is a scroll stop event.
For pointer events that are not of type
:attr:`~libinput.constant.EventType.POINTER_AXIS`, this method raises
:exc:`AttributeErr... |
Return the axis value of the given axis.
The interpretation of the value depends on the axis. For the two
scrolling axes :attr:`~libinput.constant.PointerAxis.SCROLL_VERTICAL`
and :attr:`~libinput.constant.PointerAxis.SCROLL_HORIZONTAL`, the value
of the event is in relative scroll units, with the positive dir... |
The source for a given axis event.
Axis events (scroll events) can be caused by a hardware item such as
a scroll wheel or emulated from other input sources, such as two-finger
or edge scrolling on a touchpad.
If the source is :attr:`~libinput.constant.PointerAxisSource.FINGER`,
libinput guarantees that a sc... |
Return the axis value in discrete steps for a given axis event.
How a value translates into a discrete step depends on the source.
If the source is :attr:`~libinput.constant.PointerAxisSource.WHEEL`,
the discrete value correspond to the number of physical mouse wheel
clicks.
If the source is :attr:`~libinpu... |
The slot of this touch event.
See the kernel's multitouch protocol B documentation for more
information.
If the touch event has no assigned slot, for example if it is from
a single touch device, this property returns -1.
For events not of type :attr:`~libinput.constant.EventType.TOUCH_DOWN`,
:attr:`~libi... |
The seat slot of the touch event.
A seat slot is a non-negative seat wide unique identifier of an active
touch point.
Events from single touch devices will be represented as one individual
touch point per device.
For events not of type :attr:`~libinput.constant.EventType.TOUCH_DOWN`,
:attr:`~libinput.con... |
The current absolute coordinates of the touch event,
in mm from the top left corner of the device.
To get the corresponding output screen coordinates, use
:meth:`transform_coords`.
For events not of type :attr:`~libinput.constant.EventType.TOUCH_DOWN`,
:attr:`~libinput.constant.EventType.TOUCH_MOTION`, this... |
Return the current absolute coordinates of the touch event,
transformed to screen coordinates.
For events not of type :attr:`~libinput.constant.EventType.TOUCH_DOWN`,
:attr:`~libinput.constant.EventType.TOUCH_MOTION`, this method
raises :exc:`AttributeError`.
Args:
width (int): The current output screen ... |
Return if the gesture ended normally, or if it was cancelled.
For gesture events that are not of type
:attr:`~libinput.constant.EventType.GESTURE_SWIPE_END` or
:attr:`~libinput.constant.EventType.GESTURE_PINCH_END`, this property
raises :exc:`AttributeError`.
Returns:
bool: :obj:`True` indicating that th... |
The delta between the last event and the current event.
For gesture events that are not of type
:attr:`~libinput.constant.EventType.GESTURE_SWIPE_UPDATE` or
:attr:`~libinput.constant.EventType.GESTURE_PINCH_UPDATE`, this
property raises :exc:`AttributeError`.
If a device employs pointer acceleration, the de... |
The relative delta of the unaccelerated motion vector of
the current event.
For gesture events that are not of type
:attr:`~libinput.constant.EventType.GESTURE_SWIPE_UPDATE` or
:attr:`~libinput.constant.EventType.GESTURE_PINCH_UPDATE`, this
property raises :exc:`AttributeError`.
Relative unaccelerated mot... |
The absolute scale of a pinch gesture, the scale is
the division of the current distance between the fingers and
the distance at the start of the gesture.
The scale begins at 1.0, and if e.g. the fingers moved together by
50% then the scale will become 0.5, if they move twice as far apart
as initially the sc... |
The angle delta in degrees between the last and the current
:attr:`~libinput.constant.EventType.GESTURE_PINCH_UPDATE` event.
For gesture events that are not of type
:attr:`~libinput.constant.EventType.GESTURE_PINCH_UPDATE`, this
property raises :exc:`AttributeError`.
The angle delta is defined as the change... |
The (X, Y) coordinates of the tablet tool, in mm from
the top left corner of the tablet in its current logical orientation
and whether they have changed in this event.
Use :meth:`transform_coords` for transforming the axes values into
a different coordinate space.
Note:
On some devices, returned value ma... |
The delta between the last event and the current event.
If the tool employs pointer acceleration, the delta contained in this
property is the accelerated delta.
This value is in screen coordinate space, the delta is to be
interpreted like the value of :attr:`.PointerEvent.delta`.
See `Relative motion for ta... |
The current pressure being applied on the tool in use,
normalized to the range [0, 1] and whether it has changed in this event.
If this axis does not exist on the current tool, this property is
(0, :obj:`False`).
Returns:
(float, bool): The current value of the the axis and whether it has
changed.
def ... |
The current distance from the tablet's sensor,
normalized to the range [0, 1] and whether it has changed in this event.
If this axis does not exist on the current tool, this property is
(0, :obj:`False`).
Returns:
(float, bool): The current value of the the axis.
def distance(self):
"""The current dista... |
The current tilt along the (X, Y) axes of the tablet's
current logical orientation, in degrees off the tablet's Z axis
and whether they have changed in this event.
That is, if the tool is perfectly orthogonal to the tablet,
the tilt angle is 0. When the top tilts towards the logical top/left
of the tablet, t... |
The current Z rotation of the tool in degrees, clockwise
from the tool's logical neutral position and whether it has changed
in this event.
For tools of type :attr:`~libinput.constant.TabletToolType.MOUSE`
and :attr:`~libinput.constant.TabletToolType.LENS` the logical
neutral position is pointing to the curr... |
The current position of the slider on the tool,
normalized to the range [-1, 1] and whether it has changed in this
event.
The logical zero is the neutral position of the slider, or
the logical center of the axis. This axis is available on e.g.
the Wacom Airbrush.
If this axis does not exist on the current... |
The delta for the wheel in degrees and whether it has changed in
this event.
Returns:
(float, bool): The delta of the wheel, in degrees, compared to
the last event and whether it has changed.
def wheel_delta(self):
"""The delta for the wheel in degrees and whether it has changed in
this event.
Return... |
The delta for the wheel in discrete steps (e.g. wheel clicks) and
whether it has changed in this event.
Returns:
(int, bool): The delta of the wheel, in discrete steps, compared to
the last event and whether it has changed.
def wheel_delta_discrete(self):
"""The delta for the wheel in discrete steps (e.g.... |
Return the current absolute (x, y) coordinates of
the tablet tool event, transformed to screen coordinates and
whether they have changed in this event.
Note:
On some devices, returned value may be negative or larger than
the width of the device. See `Out-of-bounds motion events`_
for more details.
Arg... |
The tool that was in use during this event.
If the caller keeps a reference to a tool, the tool object will
compare equal to the previously obtained tool object.
Note:
Physical tool tracking requires hardware support. If unavailable,
libinput creates one tool per type per tablet. See
`Tracking unique t... |
The button that triggered this event.
For events that are not of type
:attr:`~libinput.constant.EventType.TABLET_TOOL_BUTTON`, this property
raises :exc:`AttributeError`.
Returns:
int: The button triggering this event.
def button(self):
"""The button that triggered this event.
For events that are not... |
The button state of the event.
For events that are not of type
:attr:`~libinput.constant.EventType.TABLET_TOOL_BUTTON`, this property
raises :exc:`AttributeError`.
Returns:
~libinput.constant.ButtonState: The button state triggering
this event.
def button_state(self):
"""The button state of the event... |
The total number of buttons pressed on all devices on
the associated seat after the the event was triggered.
For events that are not of type
:attr:`~libinput.constant.EventType.TABLET_TOOL_BUTTON`, this property
raises :exc:`AttributeError`.
Returns:
int: The seat wide pressed button count for the key of... |
The current position of the ring, in degrees
counterclockwise from the northern-most point of the ring in
the tablet's current logical orientation.
If the source is
:attr:`~libinput.constant.TabletPadRingAxisSource.FINGER`,
libinput sends a terminating event with a ring value of -1 when
the finger is lifte... |
The number of the ring that has changed state,
with 0 being the first ring.
On tablets with only one ring, this method always returns 0.
For events not of type
:attr:`~libinput.constant.EventType.TABLET_PAD_RING`, this property
raises :exc:`AssertionError`.
Returns:
int: The index of the ring that cha... |
The source of the interaction with the ring.
If the source is
:attr:`~libinput.constant.TabletPadRingAxisSource.FINGER`,
libinput sends a ring position value of -1 to terminate
the current interaction.
For events not of type
:attr:`~libinput.constant.EventType.TABLET_PAD_RING`, this property
raises :exc... |
The current position of the strip, normalized to
the range [0, 1], with 0 being the top/left-most point in the tablet's
current logical orientation.
If the source is
:attr:`~libinput.constant.TabletPadStripAxisSource.FINGER`,
libinput sends a terminating event with a value of -1 when the finger
is lifted f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.