255 lines
4.7 KiB
ReStructuredText
255 lines
4.7 KiB
ReStructuredText
Object
|
|
######
|
|
|
|
|
|
Copy and Paste
|
|
==============
|
|
|
|
Implements the following functionality
|
|
|
|
a. select, copy/cut and paste
|
|
b. clipboard
|
|
c. drag and drop
|
|
|
|
in order to share data across application windows.
|
|
|
|
Contains functions to select text or a portion of data,
|
|
send it to a buffer, and paste the data into a target.
|
|
|
|
elm_cnp provides a generic copy and paste facility based on its windowing
|
|
system.
|
|
It is not necessary to know the details of each windowing system,
|
|
but some terms and behavior are common.
|
|
Currently the X11 window system is widely used, and only X11 functionality is
|
|
implemented.
|
|
|
|
In X11R6 window system, CopyPaste works like a peer-to-peer communication.
|
|
Copying is an operation on an object in an X server.
|
|
X11 calls those objects 'selections' which have names.
|
|
Generally, two selection types are needed for copy and paste:
|
|
The Primary selection and the Clipboard selection.
|
|
Primary selection is for selecting text (that means highlighted text).
|
|
Clipboard selection is for explicit copying behavior
|
|
(such as ctrl+c, or 'copy' in a menu).
|
|
Thus, in applications most cases only use the clipboard selection.
|
|
As stated before, taking ownership of a selection doesn't move any actual data.
|
|
Copying and Pasting is described as follows:
|
|
|
|
1. Copy text in Program A : Program A takes ownership of the selection
|
|
2. Paste text in Program B : Program B notes that Program A owns the selection
|
|
3. Program B asks A for the text
|
|
4. Program A responds and sends the text to program B
|
|
5. Program B pastes the response
|
|
|
|
More information is on
|
|
- http://www.jwz.org/doc/x-cut-and-paste.html
|
|
- X11R6 Inter-Client Communication Conventions Manual, section 2
|
|
|
|
|
|
Enumerations
|
|
============
|
|
|
|
.. _Elm_Object_Focus_Direction:
|
|
|
|
Focus direction
|
|
---------------
|
|
|
|
.. data:: ELM_FOCUS_PREVIOUS
|
|
|
|
Focus previous
|
|
|
|
.. data:: ELM_FOCUS_NEXT
|
|
|
|
Focus next
|
|
|
|
.. data:: ELM_FOCUS_UP
|
|
|
|
Focus up
|
|
|
|
.. versionadded:: 1.8.1
|
|
|
|
.. data:: ELM_FOCUS_DOWN
|
|
|
|
Focus down
|
|
|
|
.. versionadded:: 1.8.1
|
|
|
|
.. data:: ELM_FOCUS_RIGHT
|
|
|
|
Focus right
|
|
|
|
.. versionadded:: 1.8.1
|
|
|
|
.. data:: ELM_FOCUS_LEFT
|
|
|
|
Focus left
|
|
|
|
.. versionadded:: 1.8.1
|
|
|
|
|
|
.. _Elm_Focus_Move_Policy:
|
|
|
|
Focus move policy
|
|
-----------------
|
|
|
|
.. data:: ELM_FOCUS_MOVE_POLICY_CLICK
|
|
|
|
Give focus to object when they are clicked
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
.. data:: ELM_FOCUS_MOVE_POLICY_IN
|
|
|
|
Give focus to object on mouse-in
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
|
|
.. _Elm_Focus_Autoscroll_Mode:
|
|
|
|
Focus autoscroll mode
|
|
---------------------
|
|
|
|
.. data:: ELM_FOCUS_AUTOSCROLL_MODE_SHOW
|
|
|
|
Directly show the focused region or item automatically.
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
.. data:: ELM_FOCUS_AUTOSCROLL_MODE_NONE
|
|
|
|
Do not show the focused region or item automatically.
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
.. data:: ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN
|
|
|
|
Bring_in the focused region or item automatically which might
|
|
invole the scrolling
|
|
|
|
.. versionadded:: 1.10
|
|
|
|
|
|
.. _Elm_Input_Event_Type:
|
|
|
|
Input event types
|
|
-----------------
|
|
|
|
.. data:: EVAS_CALLBACK_KEY_DOWN
|
|
.. data:: EVAS_CALLBACK_KEY_UP
|
|
.. data:: EVAS_CALLBACK_MOUSE_WHEEL
|
|
|
|
|
|
.. _Elm_Object_Sel_Type:
|
|
|
|
Selection type
|
|
--------------
|
|
|
|
Defines the types of selection property names.
|
|
|
|
:see: http://www.x.org/docs/X11/xlib.pdf for more details.
|
|
|
|
.. data:: ELM_SEL_TYPE_PRIMARY
|
|
|
|
Primary text selection (highlighted or selected text)
|
|
|
|
.. data:: ELM_SEL_TYPE_SECONDARY
|
|
|
|
Used when primary selection is in use
|
|
|
|
.. data:: ELM_SEL_TYPE_XDND
|
|
|
|
Drag 'n' Drop
|
|
|
|
.. data:: ELM_SEL_TYPE_CLIPBOARD
|
|
|
|
Clipboard selection (ctrl+C)
|
|
|
|
|
|
.. _Elm_Object_Sel_Format:
|
|
|
|
Selection format
|
|
----------------
|
|
|
|
Defines the types of content.
|
|
|
|
.. data:: ELM_SEL_FORMAT_TARGETS
|
|
|
|
For matching every possible atom
|
|
|
|
.. data:: ELM_SEL_FORMAT_NONE
|
|
|
|
Content is from outside of Elementary
|
|
|
|
.. data:: ELM_SEL_FORMAT_TEXT
|
|
|
|
Plain unformatted text: Used for things that don't want rich markup
|
|
|
|
.. data:: ELM_SEL_FORMAT_MARKUP
|
|
|
|
Edje textblock markup, including inline images
|
|
|
|
.. data:: ELM_SEL_FORMAT_IMAGE
|
|
|
|
Images
|
|
|
|
.. data:: ELM_SEL_FORMAT_VCARD
|
|
|
|
Vcards
|
|
|
|
.. data:: ELM_SEL_FORMAT_HTML
|
|
|
|
Raw HTML-like data (eg. webkit)
|
|
|
|
|
|
.. _Elm_Object_Xdnd_Action:
|
|
|
|
XDND action
|
|
-----------
|
|
|
|
Defines the kind of action associated with the drop data if for XDND
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
.. data:: ELM_XDND_ACTION_UNKNOWN
|
|
|
|
Action type is unknown
|
|
|
|
.. data:: ELM_XDND_ACTION_COPY
|
|
|
|
Copy the data
|
|
|
|
.. data:: ELM_XDND_ACTION_MOVE
|
|
|
|
Move the data
|
|
|
|
.. data:: ELM_XDND_ACTION_PRIVATE
|
|
|
|
Private action type
|
|
|
|
.. data:: ELM_XDND_ACTION_ASK
|
|
|
|
Ask the user what to do
|
|
|
|
.. data:: ELM_XDND_ACTION_LIST
|
|
|
|
List the data
|
|
|
|
.. data:: ELM_XDND_ACTION_LINK
|
|
|
|
Link the data
|
|
|
|
.. data:: ELM_XDND_ACTION_DESCRIPTION
|
|
|
|
Describe the data
|
|
|
|
|
|
Inheritance diagram
|
|
===================
|
|
|
|
.. inheritance-diagram:: efl.elementary.Object
|
|
:parts: 2
|
|
|
|
|
|
.. autoclass:: efl.elementary.Object
|