[go: up one dir, main page]

CN117950767A - Content sharing method, system, electronic device and medium - Google Patents

Content sharing method, system, electronic device and medium Download PDF

Info

Publication number
CN117950767A
CN117950767A CN202211295723.XA CN202211295723A CN117950767A CN 117950767 A CN117950767 A CN 117950767A CN 202211295723 A CN202211295723 A CN 202211295723A CN 117950767 A CN117950767 A CN 117950767A
Authority
CN
China
Prior art keywords
electronic device
control
window
user
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211295723.XA
Other languages
Chinese (zh)
Inventor
陈才龙
吴启明
田旭杨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211295723.XA priority Critical patent/CN117950767A/en
Publication of CN117950767A publication Critical patent/CN117950767A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of communication and discloses a content sharing method, a content sharing system, electronic equipment and a medium. The method comprises the following steps: after the first electronic device receives a first operation of long-pressing a first control in a second window by a user sent by a second electronic device, monitoring an input track taking the first operation as an initial operation; the second window is an application window which is projected onto the first electronic device by the second electronic device; when the first electronic device monitors a movement track input by a user from a first position where the first control is located to a second position outside the second window, if a drag event corresponding to the first control is not acquired, displaying that the application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control in a mode of dragging the first control. Based on the scheme, the electronic equipment can prompt when the file sharing can not be carried out in a dragging mode, so that a user can know the reason that the file can not be dragged conveniently, and user experience is improved.

Description

内容分享方法、系统、电子设备及介质Content sharing method, system, electronic device and medium

技术领域Technical Field

本申请涉及通信技术领域,特别涉及一种内容分享方法、系统、电子设备及介质。The present application relates to the field of communication technology, and in particular to a content sharing method, system, electronic device and medium.

背景技术Background technique

随着电子技术及移动互联网的发展,一个用户可同时拥有多个终端设备,例如手机、平板电脑、计算机等终端设备。多个终端设备可以无线或有线的方式连接起来,实现多个终端的协同使用。其中,存在一些应用,不支持通过拖拽应用内的图片、文件等对象对应的控件的方式进行多设备间的分享,此时,若用户对该应用内控件实施了拖拽,终端设备无法响应用户的拖拽行为,导致用户体验不好。With the development of electronic technology and mobile Internet, a user can have multiple terminal devices at the same time, such as mobile phones, tablet computers, computers and other terminal devices. Multiple terminal devices can be connected wirelessly or wired to achieve the collaborative use of multiple terminals. Among them, there are some applications that do not support sharing between multiple devices by dragging and dropping the controls corresponding to objects such as pictures and files in the application. At this time, if the user drags the controls in the application, the terminal device cannot respond to the user's dragging behavior, resulting in a poor user experience.

发明内容Summary of the invention

为解决上述问题,本申请提供一种内容分享方法、系统、电子设备及介质。To solve the above problems, the present application provides a content sharing method, system, electronic device and medium.

第一方面,本申请提供一种内容分享方法,应用于第一电子设备,第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;方法,包括:第一电子设备接收到第二电子设备发送的用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In a first aspect, the present application provides a content sharing method, which is applied to a first electronic device, wherein the first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device; the method comprises: after the first electronic device receives a first operation sent by the second electronic device in which a user long presses a first control in the second window, the first electronic device monitors an input trajectory starting with the first operation; when the first electronic device monitors a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, if the drag event corresponding to the first control is not obtained, a prompt message is displayed that the application where the first control is located does not support sharing a first object corresponding to the first control by dragging the first control.

基于上述方案,在用户拖拽的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,第一电子设备能够进行提示,如此,能够便于用户知晓无法拖拽的原因,提升用户体验。此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件(即第一操作)精确识别用户意图,避免误判的情况发生。Based on the above solution, when the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, the first electronic device can give a prompt, so that the user can know the reason why the dragging cannot be done, thereby improving the user experience. In addition, in the embodiment of the present application, the user's intention can be accurately identified by combining the dragging trajectory and the dragging event and the long press event (i.e., the first operation) to avoid misjudgment.

本申请中,第一控件可以文件图标,缩略图等控件,第一控件对应的对象可以为文件图标对应的文件、缩略图对应的图片等。In the present application, the first control may be a file icon, a thumbnail, or other control, and the object corresponding to the first control may be a file corresponding to the file icon, a picture corresponding to the thumbnail, or the like.

本申请中,当第一电子设备在监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,接收到了拖拽事件,则可以在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。In the present application, when the first electronic device receives a drag event while monitoring the movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, the object corresponding to the first control can be stored in a set storage position and displayed at the user's drag release position when the user's drag release position is monitored.

其中拖拽事件可以包括第一控件对应的对象的文件名、文件大小、文件路径以及第一控件对应的拖拽阴影等内容。The drag event may include the file name, file size, file path of the object corresponding to the first control, and the drag shadow corresponding to the first control.

在一种可能的实现中,第二位置为第二窗口外的任一位置。In a possible implementation, the second position is any position outside the second window.

可以理解,本申请中,第一电子设备可以在监测到从第一控件所在的第一位置到第二窗口外的任意位置的移动轨迹时,若未接收到拖拽事件,则进行提示。It can be understood that in the present application, when the first electronic device detects a movement trajectory from the first position where the first control is located to any position outside the second window, if no drag event is received, a prompt is given.

在一种可能的实现中,第一窗口为第一电子设备的应用窗口;第二位置为第一窗口的任一位置。In a possible implementation, the first window is an application window of the first electronic device; and the second position is any position of the first window.

可以理解,本申请中,第一电子设备可以在监测到从第一控件所在的第一位置到第一窗口内的任意位置的移动轨迹时,若未接收到拖拽事件,则进行提示。It can be understood that in the present application, when the first electronic device detects a movement trajectory from the first position where the first control is located to any position in the first window, if no drag event is received, a prompt is given.

在一种可能的实现中,第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:第一电子设备监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。In one possible implementation, the first electronic device monitors the movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, including: when the first electronic device monitors the mouse moving from the first position where the first control is located to the second position outside the second window, and the mouse is in a pressed state during the movement, it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is monitored.

在一种可能的实现中,第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:第一电子设备监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。In one possible implementation, the first electronic device monitors a movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, including: when the first electronic device monitors a user touch trajectory moving from the first position where the first control is located to the second position outside the second window, and the touch trajectory is in a continuous state during the movement, it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is monitored.

第二方面,本申请提供一种内容分享方法,应用于第二电子设备,第二电子设备与第一电子设备连接,方法包括:第二电子设备确定第二窗口的中的第一控件被长按时,发送用户长按第一控件的第一操作至第一电子设备;其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第二电子设备确定第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送第一控件对应的拖拽事件至第一电子设备。In a second aspect, the present application provides a content sharing method, which is applied to a second electronic device, and the second electronic device is connected to a first electronic device. The method includes: when the second electronic device determines that a first control in a second window is long pressed, sending a first operation of the user long pressing the first control to the first electronic device; wherein the second window is an application window projected from the second electronic device to the first electronic device; when the second electronic device determines that the application in which the first control is located does not support sharing a first object corresponding to the first control by dragging the first control, the drag event corresponding to the first control is not sent to the first electronic device.

本申请中,第二电子设备可以实时监测长按事件(即第一操作),在监测到第一操作后,若确定第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送拖拽事件至第一电子设备,以使第一电子设备知晓第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。在确定第一控件所处的应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,发送拖拽事件至第一电子设备,以使第一电子设备执行后续拖拽流程。In the present application, the second electronic device can monitor the long press event (i.e., the first operation) in real time. After monitoring the first operation, if it is determined that the application in which the first control is located does not support sharing the first object corresponding to the first control by dragging the first control, the drag event is not sent to the first electronic device, so that the first electronic device knows that the application in which the first control is located does not support sharing the first object corresponding to the first control by dragging the first control. When it is determined that the application in which the first control is located supports sharing the first object corresponding to the first control by dragging the first control, the drag event is sent to the first electronic device, so that the first electronic device performs the subsequent drag process.

在一种可能的实现中,第二电子设备确定第二窗口的中的第一控件被长按,包括:第二电子设备获取第一电子设备发送的用户在第二窗口的操作对应的位置信息;第二电子设备基于位置信息确定第二窗口的中的第一控件被长按。In one possible implementation, the second electronic device determines that the first control in the second window is long pressed, including: the second electronic device obtains location information corresponding to the user's operation in the second window sent by the first electronic device; and the second electronic device determines that the first control in the second window is long pressed based on the location information.

本申请中,位置信息可以为坐标信息。第二电子设备在获取到第一电子设备发送的设定时间内连续的第一控件对应的坐标信息时,可以确定第一控件被长按。In the present application, the location information may be coordinate information. When the second electronic device obtains the coordinate information corresponding to the first control continuously within a set time sent by the first electronic device, it can determine that the first control is long pressed.

第三方面,本申请提供一种内容分享方法,第一电子设备和第二电子设备建立连接;第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第二电子设备监测到用户长按第二窗口中的第一控件的第一操作,第二电子设备发送第一操作至第一电子设备;第一电子设备接收到第一操作后,监测以第一操作为起始操作的输入轨迹;第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In a third aspect, the present application provides a content sharing method, in which a first electronic device and a second electronic device establish a connection; the first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device; the second electronic device detects a first operation of a user long pressing a first control in the second window, and the second electronic device sends the first operation to the first electronic device; after receiving the first operation, the first electronic device monitors an input trajectory starting with the first operation; when the first electronic device detects a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, if the drag event corresponding to the first control is not obtained, a prompt message is displayed that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

在一种可能的实现中,第二位置为第二窗口外的任一位置。In a possible implementation, the second position is any position outside the second window.

在一种可能的实现中,第一窗口为第一电子设备的应用窗口;第二位置为第一窗口的任一位置。In a possible implementation, the first window is an application window of the first electronic device; and the second position is any position of the first window.

在一种可能的实现中,第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:第一电子设备监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。In one possible implementation, the first electronic device monitors the movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, including: when the first electronic device monitors the mouse moving from the first position where the first control is located to the second position outside the second window, and the mouse is in a pressed state during the movement, it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is monitored.

在一种可能的实现中,第一电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:第一电子设备监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。In one possible implementation, the first electronic device monitors a movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, including: when the first electronic device monitors a user touch trajectory moving from the first position where the first control is located to the second position outside the second window, and the touch trajectory is in a continuous state during the movement, it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is monitored.

在一种可能的实现中,方法还包括:第二电子设备监测到用户长按第二窗口中的第一控件的第一操作,包括:第二电子设备获取第一电子设备发送的用户在第二窗口中操作对应的位置信息;第二电子设备基于位置信息确定第一控件被长按时,确定监测到用户长按第二窗口中的第一控件的第一操作。In one possible implementation, the method also includes: the second electronic device monitors the first operation of the user long pressing the first control in the second window, including: the second electronic device obtains the location information corresponding to the user operation in the second window sent by the first electronic device; when the second electronic device determines that the first control is long pressed based on the location information, it determines that the first operation of the user long pressing the first control in the second window is monitored.

第四方面,本申请提供一种内容分享方法,应用于电子设备,电子设备显示第一窗口和第二窗口,其中,第一窗口为电子设备的第一应用窗口,第二窗口为电子设备的第二应用窗口;方法,包括:电子设备监测到用户长按第一窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;电子设备监测到用户输入的从第一控件所在的第一位置到第一窗口外的第二位置的移动轨迹时,若确定未监测到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In a fourth aspect, the present application provides a content sharing method, which is applied to an electronic device, where the electronic device displays a first window and a second window, wherein the first window is a first application window of the electronic device, and the second window is a second application window of the electronic device; the method comprises: after the electronic device detects a first operation of a user long pressing a first control in the first window, monitoring an input trajectory starting with the first operation; when the electronic device detects a movement trajectory of the user input from a first position where the first control is located to a second position outside the first window, if it is determined that a drag event corresponding to the first control is not detected, displaying a prompt message that the application where the first control is located does not support sharing of a first object corresponding to the first control by dragging the first control.

本申请中,第一窗口和第二窗口可以为同一应用的窗口,也可以为不同应用的窗口。即第一应用和第二应用可以为相同应用,也可以为不同应用。In the present application, the first window and the second window may be windows of the same application or windows of different applications, that is, the first application and the second application may be the same application or different applications.

基于上述方案,在单设备场景中,在用户拖拽的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,电子设备能够进行提示,如此,能够便于用户知晓无法拖拽的原因,提升用户体验。此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件(即第一操作)精确识别用户意图,避免误判的情况发生。Based on the above solution, in a single-device scenario, when the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, the electronic device can prompt, so that the user can know the reason why the dragging cannot be done, thereby improving the user experience. In addition, in the embodiment of the present application, the user's intention can be accurately identified by combining the dragging trajectory and the dragging event and the long press event (i.e., the first operation) to avoid misjudgment.

本申请中,当电子设备在监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,接收到了拖拽事件,则可以在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。In the present application, when the electronic device receives a drag event while monitoring the movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, the object corresponding to the first control can be stored in a set storage position and displayed at the user's drag release position when the user's drag release position is monitored.

其中拖拽事件可以包括第一控件对应的对象的文件名、文件大小、文件路径以及第一控件对应的拖拽阴影等内容。The drag event may include the file name, file size, file path of the object corresponding to the first control and the drag shadow corresponding to the first control.

在一种可能的实现中,第二位置为第一窗口外的任一位置。In a possible implementation, the second position is any position outside the first window.

在一种可能的实现中,第二位置为第二窗口的任一位置。In a possible implementation, the second position is any position of the second window.

在一种可能的实现中,电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:电子设备监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。In one possible implementation, the electronic device monitors the movement trajectory of the user input from a first position where the first control is located to a second position outside the second window, including: when the electronic device monitors the mouse moving from the first position where the first control is located to the second position outside the second window, and the mouse is in a pressed state during the movement, it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is monitored.

在一种可能的实现中,电子设备监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹,包括:In a possible implementation, the electronic device monitors a movement track of a user input from a first position where a first control is located to a second position outside a second window, including:

电子设备监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态的情况下,确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。When the electronic device detects that the user's touch trajectory moves from a first position where the first control is located to a second position outside the second window, and the touch trajectory remains continuous during the movement, it determines that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is detected.

在一种可能的实现中,第一窗口为悬浮窗口,和/或,第二窗口为悬浮窗口。In a possible implementation, the first window is a floating window, and/or the second window is a floating window.

本申请中,第一窗口和第二窗口中的其中一个可以为悬浮窗口,或者第一窗口和第二窗口均为悬浮窗口。In the present application, one of the first window and the second window may be a floating window, or both the first window and the second window may be floating windows.

第五方面,本申请提供一种内容分享方法,应用于第一电子设备,第一电子设备和第二电子设备连接,第一电子设备显示第一窗口,第二电子设备显示第二窗口;方法,包括:第一电子设备在接收到第二电子设备发送的第二电子设备的显示屏外的第二位置的位置信息以及从第二窗口内的第一控件所在的第一位置到第二位置的移动轨迹时,未接收到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In a fifth aspect, the present application provides a content sharing method, which is applied to a first electronic device, where the first electronic device is connected to a second electronic device, the first electronic device displays a first window, and the second electronic device displays a second window; the method includes: when the first electronic device receives position information of a second position outside the display screen of the second electronic device and a movement trajectory from the first position to the second position of a first control in the second window sent by the second electronic device, if the first electronic device does not receive a drag event corresponding to the first control, a prompt message is displayed indicating that the application where the first control is located does not support sharing of the first object corresponding to the first control by dragging the first control.

可以理解,当鼠标长按轨迹或用户触摸轨迹移出第二电子设备的显示屏即可以穿越至第一电子设备的显示屏。It can be understood that when the mouse long press track or the user touch track moves out of the display screen of the second electronic device, it can pass through to the display screen of the first electronic device.

即本申请中,从第一窗口的第一控件的第一位置到第二位置的移动轨迹可以指用户的输入操作(如鼠标或用户触摸轨迹)从第一控件的第一位置到移出第二电子设备的显示屏的位置(即第二位置),或者可以指用户的输入操作(如鼠标或用户触摸轨迹)从第一控件的第一位置到移入第一电子设备的显示屏的位置(即第二位置)。That is, in the present application, the movement trajectory from the first position to the second position of the first control of the first window may refer to the user's input operation (such as a mouse or user touch trajectory) from the first position of the first control to a position outside the display screen of the second electronic device (i.e., the second position), or may refer to the user's input operation (such as a mouse or user touch trajectory) from the first position of the first control to a position inside the display screen of the first electronic device (i.e., the second position).

基于上述方案,在键鼠穿越场景中,在用户拖拽的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,电子设备能够进行提示,如此,能够便于用户知晓无法拖拽的原因,提升用户体验。此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件(即第一操作)精确识别用户意图,避免误判的情况发生。Based on the above solution, in the keyboard and mouse crossing scenario, when the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, the electronic device can prompt, so that the user can know the reason why the dragging cannot be done, thereby improving the user experience. In addition, in the embodiment of the present application, the user's intention can be accurately identified by combining the dragging trajectory and the dragging event and the long press event (i.e., the first operation) to avoid misjudgment.

本申请中,当第二电子设备在监测到用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,若确定用户拖拽的第一控件所在的应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象,则可以发送第二位置的坐标信息、从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹以及拖拽事件至第一电子设备,以便第一电子设备执行后续拖拽流程。In the present application, when the second electronic device monitors the movement trajectory of the user input from the first position where the first control is located to the second position outside the display screen of the second electronic device, if it is determined that the application where the first control dragged by the user is located supports sharing the first object corresponding to the first control by dragging the first control, then the coordinate information of the second position, the movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device, and the drag event can be sent to the first electronic device so that the first electronic device can execute the subsequent dragging process.

本申请中,当第二电子设备在监测到用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,若确定用户拖拽的第一控件所在的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,则可以只发送第二位置的坐标信息(位置信息)以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至第一电子设备,以便第一电子设备接收到坐标信息后进行提示。例如,鼠标刚移出第二电子设备的显示屏,进入第一电子设备的显示屏,即到达第二位置,第一电子设备确定只接收到了坐标信息,而未接受到拖拽事件,则可以进行提示。In the present application, when the second electronic device monitors the movement track of the user input from the first position where the first control is located to the second position outside the display screen of the second electronic device, if it is determined that the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, then only the coordinate information (position information) of the second position and the movement track from the first position where the first control is located to the second position outside the display screen of the second electronic device can be sent to the first electronic device, so that the first electronic device can give a prompt after receiving the coordinate information. For example, the mouse has just moved out of the display screen of the second electronic device and entered the display screen of the first electronic device, that is, it has reached the second position. The first electronic device determines that it has only received the coordinate information but has not received the drag event, so it can give a prompt.

本申请中,第一电子设备在接收到位置信息及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,可以判断是否接收到了拖拽事件,若未接收到拖拽事件,则可以确定用户进行了拖拽,存在拖拽意图,但第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,则在此时第一电子设备显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。In the present application, when the first electronic device receives position information and a movement trajectory from a first position where the first control is located to a second position outside the display screen of the second electronic device, it can determine whether a drag event has been received. If no drag event is received, it can be determined that the user has dragged and has the intention to drag, but the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control. At this time, the first electronic device displays a prompt message to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

本申请中,第一电子设备在接收到位置信息及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,若未接收到拖拽事件,也可以在继续监测到用户输入的移至第一窗口内的轨迹时,显示提示信息。In the present application, when the first electronic device receives the position information and the movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device, if no drag event is received, it can also display a prompt message when it continues to monitor the trajectory input by the user to move to the first window.

其中拖拽事件可以包括第一控件对应的对象的文件名、文件大小、文件路径以及第一控件对应的拖拽阴影等内容。The drag event may include the file name, file size, file path of the object corresponding to the first control and the drag shadow corresponding to the first control.

第六方面,本申请提供一种内容分享方法,第一电子设备和第二电子设备连接,第一电子设备显示第一窗口,第二电子设备显示第二窗口;第二电子设备监测到用户输入的从第二窗口内的第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,将第二位置的位置信息以及移动轨迹发送至第一电子设备;第一电子设备在接收到第二电子设备发送的第二位置的位置信息及移动轨迹时,未接收到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In a sixth aspect, the present application provides a content sharing method, in which a first electronic device and a second electronic device are connected, the first electronic device displays a first window, and the second electronic device displays a second window; when the second electronic device monitors a movement trajectory input by a user from a first position where a first control in the second window is located to a second position outside the display screen of the second electronic device, the second electronic device sends the position information of the second position and the movement trajectory to the first electronic device; when the first electronic device receives the position information and the movement trajectory of the second position sent by the second electronic device, if it does not receive a drag event corresponding to the first control, it displays a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

第七方面,本申请提供一种内容分享系统,包括第一电子设备和第二电子设备,第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第二电子设备,用于监测用户长按第二窗口中的第一控件的第一操作,以及发送第一操作至第一电子设备;第一电子设备,用于接收到第一操作后,监测以第一操作为起始操作的输入轨迹;第一电子设备,用于监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In the seventh aspect, the present application provides a content sharing system, including a first electronic device and a second electronic device, the first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device; the second electronic device is used to monitor a first operation of a user long pressing a first control in the second window, and send the first operation to the first electronic device; the first electronic device is used to monitor an input trajectory starting with the first operation after receiving the first operation; the first electronic device is used to monitor a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, and if the drag event corresponding to the first control is not obtained, display a prompt message that the application where the first control is located does not support sharing a first object corresponding to the first control by dragging the first control.

在一种可能的实现中,第一电子设备包括第一系统应用;第二电子设备包括控件模块和第二系统应用;控件模块,用于监测用户长按第二窗口中的第一控件的第一操作,以及发送第一操作至第二系统应用;第二系统应用,用于发送第一操作至第一系统应用;第一系统应用,用于接收到第一操作后,监测以第一操作为起始操作的输入轨迹;第一系统应用,用于监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In one possible implementation, the first electronic device includes a first system application; the second electronic device includes a control module and a second system application; the control module is used to monitor a first operation of a user long pressing a first control in a second window, and send the first operation to the second system application; the second system application is used to send the first operation to the first system application; the first system application is used to monitor an input trajectory starting with the first operation after receiving the first operation; the first system application is used to monitor a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, and if the drag event corresponding to the first control is not obtained, display a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

第八方面,本申请提供一种内容分享系统,包括第一电子设备和第二电子设备,第一电子设备和第二电子设备连接,第一电子设备显示第一窗口,第二电子设备显示第二窗口;第二电子设备,用于监测到用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;第二电子设备,用于监测到用户输入的从第二窗口内的第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,将第二位置的位置信息以及移动轨迹发送至第一电子设备;第一电子设备,用于在接收到第二电子设备发送的第二位置的位置信息以及移动轨迹时,若未接收到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。In an eighth aspect, the present application provides a content sharing system, including a first electronic device and a second electronic device, the first electronic device and the second electronic device are connected, the first electronic device displays a first window, and the second electronic device displays a second window; the second electronic device is used to monitor an input trajectory starting with the first operation after monitoring a first operation of a user long pressing a first control in the second window; the second electronic device is used to send position information and a movement trajectory of the second position to the first electronic device when monitoring a movement trajectory input by the user from a first position where the first control in the second window is located to a second position outside the display screen of the second electronic device; the first electronic device is used to, when receiving the position information and the movement trajectory of the second position sent by the second electronic device, if no drag event corresponding to the first control is received, display a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

第九方面,本申请提供一种电子设备,的电子设备为第一电子设备,第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第一电子设备,用于接收到第二电子设备发送的用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;In a ninth aspect, the present application provides an electronic device, wherein the electronic device is a first electronic device, the first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device; the first electronic device is configured to monitor an input trajectory starting with the first operation after receiving a first operation of a user long pressing a first control in the second window sent by the second electronic device;

第一电子设备,用于监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。The first electronic device is used to monitor the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window. If the drag event corresponding to the first control is not obtained, it will display a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

第十方面,本申请提供一种电子设备,电子设备为第二电子设备;第二电子设备,用于确定第二窗口的中的第一控件被长按时,发送用户长按第二窗口中的第一控件的第一操作至第一电子设备;其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第二电子设备,用于在确定第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送第一控件对应的拖拽事件至第一电子设备。In the tenth aspect, the present application provides an electronic device, which is a second electronic device; the second electronic device is used to send a first operation of the user long pressing the first control in the second window to the first electronic device when determining that the first control in the second window is long pressed; wherein the second window is an application window projected from the second electronic device to the first electronic device; the second electronic device is used to not send a drag event corresponding to the first control to the first electronic device when determining that the application in which the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

第十一方面,本申请提供一种电子设备,包括:存储器,用于存储电子设备的一个或多个处理器执行的指令,以及处理器,是电子设备的一个或多个处理器之一,用于执行本申请提及的内容分享方法。In an eleventh aspect, the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the one or more processors of the electronic device, for executing the content sharing method mentioned in the present application.

第十二方面,本申请提供一种可读存储介质,可读介质上存储有指令,指令在电子设备上执行时使得电子设备执行本申请提及的内容分享方法。In a twelfth aspect, the present application provides a readable storage medium, on which instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the content sharing method mentioned in the present application.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1a根据本申请的一些实施例,示出了一种投屏的场景示意图;FIG. 1a shows a schematic diagram of a screen projection scenario according to some embodiments of the present application;

图1b根据本申请的一些实施例,示出了一种内容分享的场景示意图;FIG. 1b shows a schematic diagram of a content sharing scenario according to some embodiments of the present application;

图1c根据本申请的一些实施例,示出了一种内容分享的场景示意图;FIG1c shows a schematic diagram of a content sharing scenario according to some embodiments of the present application;

图2根据本申请的一些实施例,示出了一种不支持拖拽的场景示意图;FIG2 is a schematic diagram showing a scenario that does not support dragging according to some embodiments of the present application;

图3根据本申请的一些实施例,示出了一种不支持拖拽的场景示意图;FIG3 shows a schematic diagram of a scenario that does not support dragging according to some embodiments of the present application;

图4a根据本申请的一些实施例,示出了一种不支持拖拽的场景示意图;FIG4a is a schematic diagram showing a scenario that does not support dragging according to some embodiments of the present application;

图4b根据本申请的一些实施例,示出了一种不支持拖拽的场景示意图;FIG4b shows a schematic diagram of a scenario that does not support dragging according to some embodiments of the present application;

图5根据本申请的一些实施例,示出了一种投屏场景中,无法拖拽时的页面显示示意图;FIG5 is a schematic diagram showing a page display when dragging is not possible in a screen projection scenario according to some embodiments of the present application;

图6根据本申请的一些实施例,示出了一种键鼠穿越场景中,无法拖拽时的页面显示示意图;FIG6 shows a schematic diagram of a page display when dragging is not possible in a keyboard and mouse traversal scenario according to some embodiments of the present application;

图7根据本申请的一些实施例,示出了一种单设备场景中,无法拖拽时的页面显示示意图;FIG. 7 shows a schematic diagram of page display when dragging is not possible in a single device scenario according to some embodiments of the present application;

图8a根据本申请的一些实施例,示出了一种电子设备的软件架构示意图;FIG8a shows a schematic diagram of a software architecture of an electronic device according to some embodiments of the present application;

图8b根据本申请的一些实施例,示出了一种电子设备的软件架构示意图;FIG8b shows a schematic diagram of a software architecture of an electronic device according to some embodiments of the present application;

图8c根据本申请的一些实施例,示出了一种内容分享方法的示意图;FIG8c is a schematic diagram showing a content sharing method according to some embodiments of the present application;

图9根据本申请的一些实施例,示出了一种投屏场景下,内容分享方法的流程示意图;FIG9 is a schematic diagram showing a flow chart of a content sharing method in a screen projection scenario according to some embodiments of the present application;

图10根据本申请的一些实施例,示出了一种投屏场景下,内容分享方法的流程示意图;FIG10 is a schematic diagram showing a flow chart of a content sharing method in a screen projection scenario according to some embodiments of the present application;

图11根据本申请的一些实施例,示出了一种单设备场景下,内容分享方法的流程示意图;FIG11 is a schematic diagram showing a flow chart of a content sharing method in a single device scenario according to some embodiments of the present application;

图12a根据本申请的一些实施例,示出了一种单设备场景下,无法拖拽时的页面显示示意图;FIG12a is a schematic diagram showing a page display when dragging is not possible in a single device scenario according to some embodiments of the present application;

图12b根据本申请的一些实施例,示出了一种单设备场景下,内容分享方法的流程示意图;FIG12b is a schematic diagram showing a flow chart of a content sharing method in a single device scenario according to some embodiments of the present application;

图13根据本申请的一些实施例,示出了一种键鼠穿越场景下,内容分享方法的流程示意图;FIG13 is a schematic diagram showing a flow chart of a content sharing method in a keyboard and mouse traversal scenario according to some embodiments of the present application;

图14根据本申请的一些实施例,示出了一种键鼠穿越场景下,内容分享方法的流程示意图;FIG14 is a schematic diagram showing a flow chart of a content sharing method in a keyboard and mouse traversal scenario according to some embodiments of the present application;

图15根据本申请的一些实施例,示出了一种电子设备的硬件结构示意图。FIG15 shows a schematic diagram of the hardware structure of an electronic device according to some embodiments of the present application.

具体实施方式Detailed ways

本申请的说明性实施例包括但不限于一种内容分享方法、系统、电子设备及介质。The illustrative embodiments of the present application include but are not limited to a content sharing method, system, electronic device and medium.

下面首先对多设备间进行内容分享的场景进行简要介绍。The following first briefly introduces the scenario of content sharing between multiple devices.

在一些实施例中,如图1a所示,手机100和计算机200之间建立了多屏协同关系,计算机200上可以显示第二窗口201,其中,第二窗口201用于显示手机100的应用界面。手机100当前显示的是第一通讯应用的界面,该通讯应用支持拖拽行为,即支持通过拖拽应用内控件的方式分享控件对应的文件、图片等对象。例如,用户可以通过鼠标拖拽缩略图202的方式将通讯应用中的缩略图202对应的图片拖拽至计算机200中。如图1b中所示,当用户通过鼠标长按要拖拽的缩略图202,鼠标箭头处将会出现可拖拽的阴影,以示意用户可以拖拽移动。例如,用户可以如图1c中所示,将缩略图202拖拽至桌面上的可释放区域203然后释放。若应用中一些图片因为未下载等原因,不能实现拖拽,则应用可以对不能拖拽的原因进行提示,例如,如图2中所示,应用可以在通讯应用窗口的界面顶端提示“该文件未下载,不支持拖出”的提示信息。若用户如图3所示,将缩略图202拖拽至无法释放的区域,例如个人计算机(Personal Computer,PC)管家页面中的区域204,则鼠标会显示为禁止拖入的标志,以提示用户无法将缩略图202拖拽至该区域。In some embodiments, as shown in FIG. 1a, a multi-screen collaborative relationship is established between the mobile phone 100 and the computer 200, and a second window 201 can be displayed on the computer 200, wherein the second window 201 is used to display the application interface of the mobile phone 100. The mobile phone 100 currently displays the interface of the first communication application, which supports dragging behavior, that is, supports sharing files, pictures and other objects corresponding to the control by dragging the control in the application. For example, the user can drag the picture corresponding to the thumbnail 202 in the communication application to the computer 200 by dragging the thumbnail 202 with the mouse. As shown in FIG. 1b, when the user presses the thumbnail 202 to be dragged with the mouse, a draggable shadow will appear at the mouse arrow to indicate that the user can drag and move. For example, as shown in FIG. 1c, the user can drag the thumbnail 202 to the releasable area 203 on the desktop and then release it. If some pictures in the application cannot be dragged because they have not been downloaded, the application can prompt the reason for not being able to drag, for example, as shown in FIG. 2, the application can prompt a prompt message "The file has not been downloaded and dragging is not supported" at the top of the interface of the communication application window. If the user drags the thumbnail 202 to an unreleasable area, such as area 204 in the Personal Computer (PC) housekeeper page, as shown in FIG. 3 , the mouse will display a sign prohibiting dragging to prompt the user that the thumbnail 202 cannot be dragged to the area.

但是存在一些应用不支持通过拖拽控件的方式分享控件对应的对象,例如,如图4a所示,当用户长按另一个不支持拖拽的第二通讯应用中的缩略图202时,鼠标箭头处不会出现拖拽阴影。且如图4b所示,无论当用户移动鼠标并在可释放区域203释放,还是在不可释放区域204释放,缩略图202对应的图片均不会被分享,且应用也不会有任何提示信息。如此,导致用户可能并不知道是应用不支持拖拽的原因,可能会认为是电脑或手机出现了一些系统故障等原因,导致无法拖拽,导致用户体验不好。However, there are some applications that do not support sharing the objects corresponding to the controls by dragging the controls. For example, as shown in FIG4a, when the user long presses the thumbnail 202 in another second communication application that does not support dragging, no drag shadow will appear at the mouse arrow. And as shown in FIG4b, whether the user moves the mouse and releases it in the releasable area 203 or in the non-releasable area 204, the image corresponding to the thumbnail 202 will not be shared, and the application will not have any prompt information. In this way, the user may not know that the application does not support dragging, and may think that there are some system failures in the computer or mobile phone, which makes it impossible to drag, resulting in a poor user experience.

为解决上述技术问题,本申请实施例提供一种内容分享方法,应用于第一电子设备和第二电子设备,假设第一电子设备为数据拖入端(目的端)设备,第二电子设备为数据拖出端(数据源端)设备。第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口。第一窗口可以为第一电子设备的桌面应用的显示窗口,也可以为第一电子设备的其他应用的显示窗口。To solve the above technical problems, an embodiment of the present application provides a content sharing method, which is applied to a first electronic device and a second electronic device, assuming that the first electronic device is a data drag-in end (destination end) device, and the second electronic device is a data drag-out end (data source end) device. The first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device. The first window can be a display window of a desktop application of the first electronic device, or it can be a display window of other applications of the first electronic device.

内容分享方法可以包括:第二电子设备监测到长按事件,将长按事件发送至第一电子设备,其中,长按事件可以指用户长按第二窗口中的第一控件的第一操作,例如可以为第二窗口中的第一控件(例如文件图标及缩略图等控件)被用户按下的时间大于设定时间的操作。The content sharing method may include: the second electronic device detects a long press event and sends the long press event to the first electronic device, wherein the long press event may refer to a first operation in which a user long presses a first control in the second window, for example, the first control in the second window (such as a file icon, thumbnail, etc.) is pressed by the user for a time greater than a set time.

第一电子设备接收到了长按事件后可以一直监测用户拖拽轨迹(用户输入轨迹),当监测到拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置时,此时可进一步判断是否接收到了第二电子设备发送的拖拽事件,若确定未接收到拖拽事件,则证明用户进行了拖拽,存在拖拽意图,但第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,此时第一电子设备显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。After receiving the long press event, the first electronic device can monitor the user's dragging trajectory (user input trajectory) all the time. When the dragging trajectory is monitored to be from the first position where the first control is located to the second position outside the second window, it can further determine whether the drag event sent by the second electronic device is received. If it is determined that the drag event is not received, it proves that the user has dragged and has the intention to drag, but the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control. At this time, the first electronic device displays a prompt message to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

基于上述方案,在用户拖拽的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,第一电子设备能够进行提示,如此,能够便于用户知晓无法拖拽的原因,提升用户体验。此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件精确识别用户意图,避免误判的情况发生。Based on the above solution, when the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, the first electronic device can give a prompt, so that the user can know the reason why the dragging cannot be done, thereby improving the user experience. In addition, in the embodiment of the present application, the user's intention can be accurately identified by combining the dragging trajectory, dragging events, and long press events to avoid misjudgment.

其中拖拽事件可以包括第一控件对应的对象的文件名、文件大小、文件路径以及第一控件对应的拖拽阴影等内容。The drag event may include the file name, file size, file path of the object corresponding to the first control and the drag shadow corresponding to the first control.

在一些实施例中,当第一电子设备在监测到拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置时,接收到了拖拽事件,则可以在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。In some embodiments, when the first electronic device receives a drag event after detecting a drag trajectory from a first position where the first control is located to a second position outside the second window, it can store the object corresponding to the first control at a set storage location and display it at the user's drag release position when detecting the user's drag release position.

可以理解,上述第二位置可以为第二窗口外的任一位置,也可以指第一窗口的任一位置。例如,第一窗口为在计算机上打开的通讯应用窗口,则第二位置可以指通讯应用窗口的任意位置,也可以为鼠标或用户触摸轨迹移出通讯应用窗口外的第一个位置。It is understood that the second position may be any position outside the second window, or any position of the first window. For example, if the first window is a communication application window opened on the computer, the second position may be any position of the communication application window, or the first position where the mouse or user touch track moves outside the communication application window.

可以理解,本申请实施例中,若用户通过鼠标进行第一控件的拖拽,第一电子设备可以在监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态确定出用户拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置。It can be understood that in the embodiment of the present application, if the user drags the first control with the mouse, the first electronic device can determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window when it detects that the mouse moves from the first position where the first control is located to the second position outside the second window and the mouse is in a pressed state during the movement.

在一些实施例中,若用户可以通过触摸屏(例如手机、平板电脑的触摸屏)或触控区域(例如笔记本电脑的触控区域)进行第一控件的拖拽。对应的,第一电子设备可以通过监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态时,确定用户拖拽轨迹为从第一控件所在的第一位置移出至第二窗口外的第二位置。In some embodiments, if the user can drag the first control through a touch screen (such as a touch screen of a mobile phone or tablet computer) or a touch area (such as a touch area of a laptop computer), the first electronic device can correspondingly determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window by monitoring that the user's touch trajectory moves from the first position where the first control is located to the second position outside the second window, and the touch trajectory is in a continuous state during the moving process.

可以理解,第二电子设备在监测到长按事件后,若确定第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送第一控件对应的拖拽事件至第一电子设备。若确定第一控件所处的应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,发送第一控件对应的拖拽事件至第一电子设备。It can be understood that after the second electronic device detects the long press event, if it is determined that the application in which the first control is located does not support sharing the first object corresponding to the first control by dragging the first control, it does not send the drag event corresponding to the first control to the first electronic device. If it is determined that the application in which the first control is located supports sharing the first object corresponding to the first control by dragging the first control, it sends the drag event corresponding to the first control to the first electronic device.

可以理解,本申请实施例中,用户可以使用鼠标或其他输入设备实现选择拖拽的对象(如文件图标、图片缩略图等控件)及被拖拽到的目标位置。It can be understood that in the embodiment of the present application, the user can use a mouse or other input device to select the dragged object (such as a file icon, picture thumbnail, and other controls) and the target location to be dragged.

具体的,当用户采用鼠标进行输入时,用户可通过移动鼠标使得鼠标指针移动到需要拖拽的对象上并通过按下鼠标左键(或为达到此目的某个其他按钮)来指定要拖拽的对象,后续通过移动鼠标可使得该对象实现单设备上的拖拽或者跨设备的拖拽。当采用触屏或触控区域进行输入时,用户可使用在触摸屏或触控区域的连续触屏操作指定要拖拽的对象,并通过触屏轨迹的变化实现单设备上的拖拽或者跨设备的拖拽。Specifically, when the user uses a mouse for input, the user can move the mouse so that the mouse pointer moves to the object to be dragged and specify the object to be dragged by pressing the left mouse button (or some other button for this purpose), and then move the mouse to drag the object on a single device or across devices. When the touch screen or touch area is used for input, the user can use continuous touch screen operations on the touch screen or touch area to specify the object to be dragged, and realize dragging on a single device or across devices through changes in the touch track.

可以理解,本申请实施例中,上述内容分享方法可以用于第二电子设备在第一电子设备上进行投屏跨端拖拽的场景中。例如,如图5所示的场景中,第二电子设备可以为图5中所示的手机100,第一电子设备可以为图5中所示的计算机200。手机100和计算机200进行连接后,计算机200中显示第二窗口201,其中,第二窗口201用于显示手机100的第一通讯应用窗口。使用输入设备(例如与计算机200连接的鼠标)进行控件的拖拽可以实现如控件对应的图片或文件等对象的跨端分享,例如,将缩略图202对应的图片从手机100分享至计算机200。在计算机200确定出拖拽轨迹为从缩略图202对应的第一位置移动到了第二窗口201外的任意位置,且确定出未接收到拖拽事件,此时计算机200显示提示信息,例如,提示信息可以为“应用未适配,不支持拖拽”,以提醒用户当前无法拖拽的原因。It can be understood that in the embodiment of the present application, the above-mentioned content sharing method can be used in the scenario where the second electronic device is dragged across the screen on the first electronic device. For example, in the scenario shown in Figure 5, the second electronic device can be the mobile phone 100 shown in Figure 5, and the first electronic device can be the computer 200 shown in Figure 5. After the mobile phone 100 and the computer 200 are connected, the second window 201 is displayed in the computer 200, wherein the second window 201 is used to display the first communication application window of the mobile phone 100. Using an input device (such as a mouse connected to the computer 200) to drag the control can realize cross-end sharing of objects such as pictures or files corresponding to the control, for example, sharing the picture corresponding to the thumbnail 202 from the mobile phone 100 to the computer 200. When the computer 200 determines that the dragging trajectory is moved from the first position corresponding to the thumbnail 202 to any position outside the second window 201, and determines that no drag event is received, the computer 200 displays a prompt message at this time, for example, the prompt message can be "the application is not adapted and does not support dragging", to remind the user why the current dragging cannot be done.

本申请实施例中,还提供一种用于键鼠穿越拖拽的场景的内容分享方法,其中,第一电子设备和第二电子设备连接,第一电子设备显示第一窗口,第二电子设备显示第二窗口;In an embodiment of the present application, a content sharing method for a keyboard and mouse traversal dragging scenario is also provided, wherein a first electronic device and a second electronic device are connected, the first electronic device displays a first window, and the second electronic device displays a second window;

第二电子设备监测到用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;第二电子设备监测到用户输入的从第二窗口内的第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,将第二位置的位置信息发送至第一电子设备;第一电子设备在接收到第二电子设备发送的第二窗口外的第二位置的位置信息时,未接收到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。After the second electronic device detects the first operation of the user by long pressing the first control in the second window, it monitors the input trajectory starting from the first operation; when the second electronic device detects the movement trajectory of the user input from the first position where the first control in the second window is located to the second position outside the second window, it sends the position information of the second position to the first electronic device; when the first electronic device receives the position information of the second position outside the second window sent by the second electronic device, if it does not receive the drag event corresponding to the first control, it displays a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

如图6中所示,第二电子设备为手机100,第一电子设备为计算机200,手机100和计算机200连接后,在不启动投屏的情况下,借助键鼠共享技术,使用同一个输入设备(例如与计算机200连接的鼠标)也可实现如图片或文件等对象跨设备的分享,例如,将缩略图202对应的图片从手机100分享至计算机200。计算机200在接收到第二电子设备发送的第二显示窗口外的第二位置的位置信息时,未接收到缩略图202对应的拖拽事件,此时计算机200显示提示信息,例如,提示信息可以为“应用未适配,不支持拖拽”,以提醒用户当前无法拖拽的原因。As shown in FIG6 , the second electronic device is a mobile phone 100, and the first electronic device is a computer 200. After the mobile phone 100 and the computer 200 are connected, without starting screen projection, the same input device (such as a mouse connected to the computer 200) can be used to share objects such as pictures or files across devices, for example, the picture corresponding to the thumbnail 202 is shared from the mobile phone 100 to the computer 200. When the computer 200 receives the position information of the second position outside the second display window sent by the second electronic device, it does not receive the drag event corresponding to the thumbnail 202. At this time, the computer 200 displays a prompt message, for example, the prompt message can be "the application is not adapted and does not support dragging", to remind the user why the current dragging is not possible.

可以理解,上述是对多设备之间内容分享方法的说明,本申请实施例中还提供一种内容分享方法,可以用于单设备中的拖拽处理。例如,电子设备可以显示第一窗口和第二窗口,其中,第一窗口为电子设备的第一应用窗口,第二窗口为电子设备的第二应用窗口;第一应用窗口和第二应用窗口可以为同一应用的不同窗口,也可以为不同应用的窗口。It can be understood that the above is an explanation of a method for sharing content between multiple devices. In the embodiment of the present application, a content sharing method is also provided, which can be used for drag processing in a single device. For example, an electronic device can display a first window and a second window, wherein the first window is a first application window of the electronic device, and the second window is a second application window of the electronic device; the first application window and the second application window can be different windows of the same application, or they can be windows of different applications.

在一些实施例中第一应用窗口可以为悬浮窗口,第二应用窗口为正常窗口。在一些实施例中,第一应用窗口和第二应用窗口均可以为悬浮窗口。在一些实施例中第一应用窗口可以为正常窗口,第二应用窗口为悬浮窗口。In some embodiments, the first application window can be a floating window, and the second application window can be a normal window. In some embodiments, both the first application window and the second application window can be floating windows. In some embodiments, the first application window can be a normal window, and the second application window can be a floating window.

用于单设备的内容分享方法,可以包括:电子设备监测到用户长按第一窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;电子设备监测到用户输入的从第一控件所在的第一位置到第一窗口外的第二位置的移动轨迹时,若确定未监测到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。第二位置可以为第一窗口外的任意位置,也可以为第二窗口内的任意位置。A content sharing method for a single device may include: after the electronic device detects a first operation of a user long pressing a first control in a first window, monitoring an input track starting with the first operation; when the electronic device detects a moving track of the user input from a first position where the first control is located to a second position outside the first window, if it is determined that a drag event corresponding to the first control is not detected, displaying a prompt message that the application where the first control is located does not support sharing a first object corresponding to the first control by dragging the first control. The second position may be any position outside the first window or any position within the second window.

例如,如图7所示,单设备为手机100,通过长按并移动第一通讯应用窗口中缩略图202的操作,可以实现将通讯应用中的缩略图202对应的图片分享到至第二应用的悬浮窗口205中。在手机100监测到用户输入的从缩略图202所在的第一位置到悬浮窗口207内的第二位置的移动轨迹时,若确定未监测到缩略图202对应的拖拽事件,此时手机100可以显示提示信息,例如,提示信息可以为“应用未适配,不支持拖拽”,以提醒用户当前应用不支持拖拽。For example, as shown in FIG7 , the single device is a mobile phone 100, and by long pressing and moving the thumbnail 202 in the first communication application window, the picture corresponding to the thumbnail 202 in the communication application can be shared to the floating window 205 of the second application. When the mobile phone 100 detects the moving track input by the user from the first position where the thumbnail 202 is located to the second position in the floating window 207, if it is determined that the drag event corresponding to the thumbnail 202 is not detected, the mobile phone 100 can display a prompt message, for example, the prompt message can be "the application is not adapted and does not support dragging", to remind the user that the current application does not support dragging.

下面在详细介绍本申请实施例中提供的内容分享方法之前,首先对本申请实施例中提及的电子设备进行介绍。可以理解,本申请实施例中的电子设备可以是手机、计算机、虚拟现实(virtual reality,VR)设备、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)设备、笔记本电脑、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本、个人数字助理等任意电子设备。本申请实施例中对电子设备的形态不做具体限定。Before describing in detail the content sharing method provided in the embodiments of the present application, the electronic device mentioned in the embodiments of the present application is first introduced. It can be understood that the electronic device in the embodiments of the present application can be any electronic device such as a mobile phone, a computer, a virtual reality (VR) device, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant, etc. The form of the electronic device in the embodiments of the present application is not specifically limited.

本申请实施例以第二电子设备的软件系统为Android系统,第一电子设备的软件系统为Windows系统为例,示意性说明本申请实施例中第二电子设备和第一电子设备的软件架构。In the embodiment of the present application, the software system of the second electronic device is an Android system and the software system of the first electronic device is a Windows system as an example, and the software architecture of the second electronic device and the first electronic device in the embodiment of the present application is schematically illustrated.

图8a中示出了本申请实施例中一种第二电子设备的软件架构示意图。如图8a所示,第二电子设备可以包括应用层,框架层,安卓运行时(Android runtime)和系统库,以及内核层。Figure 8a shows a schematic diagram of the software architecture of a second electronic device in an embodiment of the present application. As shown in Figure 8a, the second electronic device may include an application layer, a framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.

应用层可以包括一系列应用程序包。应用程序可以包括三方应用和系统应用,其中三方应用可以包括相机应用、通讯应用等,系统应用可以包括PC助手等应用程序。PC助手可以用于向控件模块(view)注册长按事件监听,向拖拽框架注册拖拽事件监听,并在接收到长按事件或拖拽事件后通过第一通信框架将长按事件或拖拽事件发送至与第二电子设备连接的其他设备。The application layer may include a series of application packages. The application may include third-party applications and system applications, wherein the third-party applications may include camera applications, communication applications, etc., and the system applications may include applications such as PC assistants. PC assistants may be used to register a long press event listener with the control module (view), register a drag event listener with the drag framework, and send the long press event or drag event to other devices connected to the second electronic device through the first communication framework after receiving the long press event or drag event.

框架层为应用程序层的应用程序提供应用编程接口(application programminginterface,API)和编程框架。框架层包括一些预先定义的函数。The framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The framework layer includes some predefined functions.

框架层可以包括控件模块(view)、拖拽框架和第一通信框架。其中,view用于监测是否存在长按事件,若存在,则通知PC助手;拖拽框架用于监测是否存在拖拽事件,若存在,则通知PC助手;第一通信框架用于接收和发送长按事件或拖拽事件。The framework layer may include a control module (view), a drag framework, and a first communication framework. The view is used to detect whether there is a long press event, and if so, notify the PC assistant; the drag framework is used to detect whether there is a drag event, and if so, notify the PC assistant; the first communication framework is used to receive and send a long press event or a drag event.

框架层还可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。The framework layer may also include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

应用层和框架层运行在虚拟机中。虚拟机将应用层和框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

下面以第一电子设备的软件系统为Windows系统为例,示意性说明本申请实施例中第一电子设备的软件架构。图8b中示出了本申请实施例中一种第一电子设备的软件架构示意图。如图8b所示,第一电子设备可以包括应用层和Windows框架。The following takes the Windows system as an example to schematically illustrate the software architecture of the first electronic device in the embodiment of the present application. FIG8b shows a schematic diagram of the software architecture of the first electronic device in the embodiment of the present application. As shown in FIG8b, the first electronic device may include an application layer and a Windows framework.

应用层可以包括一系列应用程序包。应用程序可以包括三方应用和系统应用,其中三方应用可以包括相机应用、通讯应用等,系统应用可以包括PC管家等应用程序The application layer can include a series of application packages. Applications can include third-party applications and system applications. Third-party applications can include camera applications, communication applications, etc. System applications can include applications such as PC Manager, etc.

Windows框架可以包括第二通信框架,第二通信框架能够用于接收第二电子设备发送的长按事件和拖拽事件,并将长按事件和拖拽事件发送至PC管家。The Windows framework may include a second communication framework, which can be used to receive a long press event and a drag event sent by the second electronic device, and send the long press event and the drag event to PC Manager.

下面基于以第二电子设备为Android系统和第一电子设备为Windows系统为例对本申请实施例中提及的投屏场景的内容分享方法进行简要描述,其中,第二电子设备可以为手机,第一电子设备可以为计算机。第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口。第一窗口可以为第一电子设备的桌面应用的显示窗口,也可以为第一电子设备的其他应用的显示窗口。The following is a brief description of the content sharing method of the screen projection scenario mentioned in the embodiment of the present application based on the example of the second electronic device being an Android system and the first electronic device being a Windows system, wherein the second electronic device may be a mobile phone and the first electronic device may be a computer. The first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device. The first window may be a display window of a desktop application of the first electronic device, or may be a display window of other applications of the first electronic device.

如图8c所示,手机的PC助手向控件模块(view)注册长按事件监听,向拖拽框架注册拖拽事件监听。手机的view监测到用户长按事件会通知PC助手(即将长按事件发送至PC助手),PC助手将长按事件发送至第一通信框架,第一通信框架将长按事件发送至计算机的第二通信框架,第二通信框架将长按事件发送至计算机的PC管家。拖拽框架监测到拖拽事件会通知到PC助手(即将拖拽事件发送至PC助手),PC助手将拖拽事件发送至第一通信框架,第一通信框架将拖拽事件发送到第二通信框架,第二通信框架再将拖拽事件发送至PC管家。As shown in Figure 8c, the mobile phone's PC assistant registers a long press event listener with the control module (view) and a drag event listener with the drag framework. When the mobile phone's view detects a user long press event, it will notify the PC assistant (i.e., send the long press event to the PC assistant), and the PC assistant will send the long press event to the first communication framework, and the first communication framework will send the long press event to the second communication framework of the computer, and the second communication framework will send the long press event to the PC housekeeper of the computer. When the drag framework detects a drag event, it will notify the PC assistant (i.e., send the drag event to the PC assistant), and the PC assistant will send the drag event to the first communication framework, and the first communication framework will send the drag event to the second communication framework, and the second communication framework will send the drag event to the PC housekeeper.

计算机的PC管家接收到长按事件后,监测到存在用户拖拽轨迹为从第二窗口内的第一控件所在的第一位置到第二窗口外的第二位置时,未接收到拖拽事件,则控制显示屏显示提示信息。After receiving the long press event, the PC manager of the computer detects that the user drags the track from the first position of the first control in the second window to the second position outside the second window, but does not receive the drag event, and controls the display screen to display a prompt message.

下面基于上述对本申请实施例中提及的电子设备,对本申请实施例中的内容分享方法进行详述。首先以投屏场景为例,说明本申请实施例中的内容分享方法。图9示出了本申请实施例中一种内容分享方法的交互流程示意图。假设第一电子设备为数据拖入端设备,第二电子设备为数据拖出端设备。第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口。第一窗口可以为第一电子设备的桌面应用的显示窗口,也可以为第一电子设备的其他应用的显示窗口。如图9所示,方法包括:Based on the above-mentioned electronic devices mentioned in the embodiments of the present application, the content sharing method in the embodiments of the present application is described in detail below. First, taking the screen projection scenario as an example, the content sharing method in the embodiments of the present application is explained. Figure 9 shows a schematic diagram of the interaction process of a content sharing method in the embodiments of the present application. Assume that the first electronic device is a data drag-in end device, and the second electronic device is a data drag-out end device. The first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device. The first window can be a display window of a desktop application of the first electronic device, or it can be a display window of other applications of the first electronic device. As shown in Figure 9, the method includes:

901:第一电子设备和第二电子设备建立连接。901: A first electronic device and a second electronic device establish a connection.

其中,第二电子设备和第一电子设备可通过有线或无线的方式建立连接。基于建立的连接,第二电子设备和第一电子设备可配合一起使用。在本实施例中,第二电子设备和第一电子设备采用无线方式建立连接时采用的无线通信协议可以为无线保真(wirelessfidelity,Wi-Fi)协议、蓝牙(Bluetooth)协议、ZigBee协议、近距离无线通信(Near FieldCommunication,NFC)协议,各种蜂窝网协议等,在此不做具体限制。The second electronic device and the first electronic device may establish a connection via a wired or wireless method. Based on the established connection, the second electronic device and the first electronic device may be used together. In this embodiment, the wireless communication protocol used when the second electronic device and the first electronic device establish a connection wirelessly may be a wireless fidelity (Wi-Fi) protocol, a Bluetooth (Bluetooth) protocol, a ZigBee protocol, a Near Field Communication (NFC) protocol, various cellular network protocols, etc., which are not specifically limited here.

可以理解,本申请实施例中,第二电子设备和第一电子设备建立连接后,第一电子设备可以显示有第二窗口,即第二电子设备投屏在第一电子设备上的应用窗口。例如,如图5所示的场景中,第二电子设备可以为图5中所示的手机100,第一电子设备可以为图5中所示的计算机200。手机100和计算机200进行连接后,计算机200中显示第二窗口201,使用输入设备(例如与计算机200连接的鼠标)进行控件的拖拽可以实现如缩略图202等控件对应的图片的跨端分享,例如,将缩略图202对应的图片从手机100分享至计算机200。It can be understood that in the embodiment of the present application, after the second electronic device and the first electronic device are connected, the first electronic device can display a second window, that is, the second electronic device projects the application window on the first electronic device. For example, in the scenario shown in Figure 5, the second electronic device can be the mobile phone 100 shown in Figure 5, and the first electronic device can be the computer 200 shown in Figure 5. After the mobile phone 100 and the computer 200 are connected, the second window 201 is displayed in the computer 200, and the use of an input device (such as a mouse connected to the computer 200) to drag the control can achieve cross-end sharing of pictures corresponding to the controls such as thumbnails 202, for example, sharing the picture corresponding to the thumbnail 202 from the mobile phone 100 to the computer 200.

902:第二电子设备监测到用户长按第二窗口中的第一控件的第一操作。902: The second electronic device detects a first operation of a user long pressing a first control in the second window.

可以理解,本申请实施例中,用户长按第二窗口中的第一控件的第一操作即长按事件可以为第二窗口中的第一控件(例如文件图标、图片缩略图等控件)被用户按下的时间大于设定时间的操作。It can be understood that in the embodiment of the present application, the first operation of the user long pressing the first control in the second window, i.e., the long press event, can be an operation in which the first control in the second window (such as a file icon, picture thumbnail, etc.) is pressed by the user for a time greater than a set time.

例如,如图5中所示,当手机100监测到用户按下通讯应用窗口中的缩略图202达到设定时间,则可以确定监测到长按事件。For example, as shown in FIG. 5 , when the mobile phone 100 detects that the user presses the thumbnail 202 in the communication application window for a set time, it can be determined that a long press event is detected.

903:第二电子设备将第一操作发送至第一电子设备。903: The second electronic device sends the first operation to the first electronic device.

904:第一电子设备接收到第一操作后,监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。904: After receiving the first operation, the first electronic device monitors a movement track of the user input from a first position where the first control is located to a second position outside the second window.

可以理解,本申请实施例中,第一电子设备在接收到第一操作后,可以实时监测以第一操作为起始操作的用户输入轨迹。在监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹后,则可以证明用户存在拖拽意图,此时可以判断是否接收到拖拽事件。It can be understood that in the embodiment of the present application, after receiving the first operation, the first electronic device can monitor in real time the user input trajectory starting with the first operation. After monitoring the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window, it can be proved that the user has the intention to drag, and at this time it can be determined whether the drag event is received.

第一电子设备接收到第一操作后,具体监测的可以是,用户的输入操作(如鼠标或用户触摸轨迹)移出第二窗口,即第二位置可以为第二窗口外的任一位置。第一电子设备接收到第一操作后,具体监测的也可以是,用户输入(如鼠标或用户触摸轨迹)移入第一窗口,即第二位置也可以指第一窗口的任一位置。After the first electronic device receives the first operation, it may specifically monitor that the user input operation (such as a mouse or a user touch track) moves out of the second window, that is, the second position may be any position outside the second window. After the first electronic device receives the first operation, it may specifically monitor that the user input (such as a mouse or a user touch track) moves into the first window, that is, the second position may also refer to any position of the first window.

例如,一些实施例中,在第二窗口为第二电子设备投屏在第一电子设备上的通讯应用窗口,第一窗口为第一电子桌面的应用窗口时,第一电子设备接收到第一操作后,具体监测的可以是用户的输入操作(如鼠标或用户触摸轨迹)移出通讯应用窗口,即第二位置为通讯应用窗口外的任一位置。第一电子设备接收到第一操作后,具体监测的也可以是用户的输入操作(如鼠标或用户触摸轨迹)移入桌面应用窗口,即第二位置为桌面应用窗口内的任一位置。For example, in some embodiments, when the second window is a communication application window projected by the second electronic device on the first electronic device, and the first window is an application window of the first electronic desktop, after the first electronic device receives the first operation, it may specifically monitor the user's input operation (such as a mouse or a user's touch track) moving out of the communication application window, that is, the second position is any position outside the communication application window. After the first electronic device receives the first operation, it may specifically monitor the user's input operation (such as a mouse or a user's touch track) moving into the desktop application window, that is, the second position is any position within the desktop application window.

可以理解,本申请实施例中,若用户通过鼠标进行第一控件的拖拽,第一电子设备可以在监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态确定出用户拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置。It can be understood that in the embodiment of the present application, if the user drags the first control with the mouse, the first electronic device can determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window when it detects that the mouse moves from the first position where the first control is located to the second position outside the second window and the mouse is in a pressed state during the movement.

在一些实施例中,若用户可以通过触摸屏(例如手机、平板电脑的触摸屏)或触控区域(例如笔记本电脑的触控区域)进行第一控件的拖拽。对应的,第一电子设备可以通过监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态时,确定用户拖拽轨迹为从第一控件所在的第一位置移出至第二窗口外的第二位置。In some embodiments, if the user can drag the first control through a touch screen (such as a touch screen of a mobile phone or tablet computer) or a touch area (such as a touch area of a laptop computer), the first electronic device can correspondingly determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window by monitoring that the user's touch trajectory moves from the first position where the first control is located to the second position outside the second window, and the touch trajectory is in a continuous state during the moving process.

905:第一电子设备判断是否接收到拖拽事件。若否,则转至906,发出提示信息;若是,则转至907,执行拖拽流程。905: The first electronic device determines whether a drag event is received. If not, the process goes to 906 to issue a prompt message; if yes, the process goes to 907 to execute the drag process.

可以理解,第二电子设备在监测到长按事件后,若确定第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送第一控件对应的拖拽事件至第一电子设备。若确定第一控件所处的应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,发送第一控件对应的拖拽事件至第一电子设备。It can be understood that after the second electronic device detects the long press event, if it is determined that the application in which the first control is located does not support sharing the first object corresponding to the first control by dragging the first control, it does not send the drag event corresponding to the first control to the first electronic device. If it is determined that the application in which the first control is located supports sharing the first object corresponding to the first control by dragging the first control, it sends the drag event corresponding to the first control to the first electronic device.

第一电子设备监测到拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置时,若确定未接收到拖拽事件,则证明用户进行了拖拽,存在拖拽意图,但第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,此时第一电子设备显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。When the first electronic device detects that the dragging trajectory is from the first position where the first control is located to the second position outside the second window, if it is determined that no drag event is received, it proves that the user has dragged and has the intention to drag, but the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control. At this time, the first electronic device displays a prompt message to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

第一电子设备监测到拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置时,若确定接收到拖拽事件,则可以直接执行拖拽流程。即可以在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。When the first electronic device detects that the dragging track is from the first position where the first control is located to the second position outside the second window, if it is determined that a dragging event is received, the dragging process can be directly executed. That is, when the user's dragging release position is detected, the object corresponding to the first control can be stored in the set storage position and displayed at the user's dragging release position.

906:第一电子设备发出提示信息。906: The first electronic device sends a prompt message.

可以理解,在一些实施例中,第一电子设备可以显示提示信息,例如,如图5所示,第一电子设备可以显示“应用未适配,不支持拖拽”的提示信息。It can be understood that in some embodiments, the first electronic device may display a prompt message. For example, as shown in FIG. 5 , the first electronic device may display a prompt message of “the application is not adapted and does not support dragging”.

907:第一电子设备执行拖拽流程。907: The first electronic device executes the drag process.

其中,拖拽流程可以包括在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。The dragging process may include storing the object corresponding to the first control at a set storage location and displaying the object at the user's dragging release location when the user's dragging release location is detected.

下面以第二电子设备为手机,第一电子设备为计算机为例,结合第一电子设备和第二电子设备的软件框架对本申请实施例中一种内容分享方法进行说明,其中,第一电子设备包括控件模块、拖拽框架、第一通信框架和PC助手。第二电子设备包括第二通信框架和PC管家。In the following, a content sharing method in an embodiment of the present application is described by taking the second electronic device as a mobile phone and the first electronic device as a computer as an example, combining the software frameworks of the first electronic device and the second electronic device, wherein the first electronic device includes a control module, a drag framework, a first communication framework, and a PC assistant. The second electronic device includes a second communication framework and a PC housekeeper.

假设第一电子设备为数据拖入端设备,第二电子设备为数据拖出端设备。第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口。第一窗口可以为第一电子设备的桌面应用的显示窗口,也可以为第一电子设备的其他应用的显示窗口。图10示出了本申请实施例中一种内容分享方法的流程示意图。如图10所示,方法包括:Assume that the first electronic device is a data-input device and the second electronic device is a data-output device. The first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device. The first window can be a display window of a desktop application of the first electronic device, or a display window of other applications of the first electronic device. FIG10 shows a flow chart of a content sharing method in an embodiment of the present application. As shown in FIG10 , the method includes:

1001:控件模块(view)监测到用户长按第二窗口中的第一控件的第一操作。1001: The control module (view) detects a first operation of a user long pressing a first control in a second window.

可以理解,本申请实施例中,控件模块可以通过onTouchEvent回调,监测是否存在长按事件(即用户长按第二窗口中的第一控件的第一操作)。可以理解,本申请实施例中,当控件模块监测到用户按下第二窗口中的第一控件达到设定时间,则可以确定监测到用户长按第二窗口中的第一控件的第一操作。It is understood that in the embodiment of the present application, the control module can monitor whether there is a long press event (i.e., the first operation of the user long pressing the first control in the second window) through the onTouchEvent callback. It is understood that in the embodiment of the present application, when the control module monitors that the user presses the first control in the second window for a set time, it can be determined that the first operation of the user long pressing the first control in the second window is detected.

可以理解,第一控件可以包括文件图标、图片缩略图等控件。It can be understood that the first control may include controls such as file icons and picture thumbnails.

1002:控件模块(view)发送第一操作至为PC助手。1002: The control module (view) sends a first operation to the PC assistant.

可以理解,手机的PC助手可以向view注册长按事件监听。当view监测到用户长按事件会通知PC助手(即将长按事件发送至PC助手)。It is understandable that the PC assistant of the mobile phone can register a long press event listener with the view. When the view detects a user long press event, it will notify the PC assistant (i.e. send the long press event to the PC assistant).

1003:PC助手发送第一操作至第一通信框架。1003: The PC assistant sends the first operation to the first communication framework.

1004:第一通信框架发送第一操作至第二通信框架。1004: The first communication framework sends the first operation to the second communication framework.

1005:第二通信框架发送第一操作至PC管家。1005: The second communication framework sends the first operation to PC Manager.

1006:拖拽框架监测到拖拽事件。1006: The drag framework detects a drag event.

1007:拖拽框架发送拖拽事件至PC助手。1007: The drag framework sends the drag event to the PC assistant.

可以理解,手机的PC助手可以向拖拽框架注册拖拽事件监听。当拖拽框架监测到用户拖拽事件会通知PC助手(即将长按事件发送至PC助手)。It is understandable that the PC assistant of the mobile phone can register a drag event listener with the drag framework. When the drag framework detects a user drag event, it will notify the PC assistant (i.e., send a long press event to the PC assistant).

1008:PC助手发送拖拽事件至第一通信框架。1008: The PC assistant sends a drag event to the first communication framework.

1009:第一通信框架发送拖拽事件至第二通信框架。1009: The first communication framework sends a drag event to the second communication framework.

1010:第二通信框架将拖拽事件发送至PC管家。1010: The second communication framework sends the drag event to the PC manager.

1011:PC管家接收到第一操作后,监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹。1011: After receiving the first operation, PC Manager monitors a movement track of the user input from a first position where the first control is located to a second position outside the second window.

1012:PC管家判断是否接收到拖拽事件。若未接收到,则转化至1013,控制显示屏显示提示信息。若未接收到,则转至1014,执行拖拽流程。1012: PC Manager determines whether a drag event is received. If not, the process proceeds to 1013 to control the display screen to display a prompt message. If not, the process proceeds to 1014 to execute the drag process.

1013:PC管家控制显示屏显示提示信息。1013: PC Manager controls the display screen to display prompt information.

1014:PC管家执行拖拽流程。1014: PC Manager executes the drag-and-drop process.

其中,拖拽流程可以包括在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。The dragging process may include storing the object corresponding to the first control at a set storage location and displaying the object at the user's dragging release location when the user's dragging release location is detected.

下面以电子设备为手机为例,对本申请实施例中用于单设备的内容分享方法进行说明。例如,电子设备可以显示第一窗口和第二窗口,其中,第一窗口为电子设备的第一应用窗口,第二窗口为电子设备的第二应用窗口;第一应用窗口和第二应用窗口可以为同一应用的不同窗口,也可以为不同应用的窗口。图11示出了本申请实施例中一种内容分享方法的流程示意图。如图11所示,方法包括:The following takes a mobile phone as an example of an electronic device to illustrate a content sharing method for a single device in an embodiment of the present application. For example, the electronic device can display a first window and a second window, wherein the first window is a first application window of the electronic device, and the second window is a second application window of the electronic device; the first application window and the second application window can be different windows of the same application, or they can be windows of different applications. Figure 11 shows a flow chart of a content sharing method in an embodiment of the present application. As shown in Figure 11, the method includes:

1101:控件模块(view)监测到用户长按第一窗口中的第一控件的第一操作。1101: The control module (view) detects a first operation of a user long pressing a first control in a first window.

可以理解,本申请实施例中,当电子设备监测到用户按下第一窗口中的的第一控件达到设定时间,则可以确定监测到用户长按第一窗口中的第一控件的第一操作(即长按事件)。It can be understood that in the embodiment of the present application, when the electronic device detects that the user presses the first control in the first window for a set time, it can determine that the first operation of the user long pressing the first control in the first window (i.e., a long press event) is detected.

可以理解,可以理解,第一控件可以包括文件图标、图片缩略图等控件。It is understandable that the first control may include controls such as file icons and picture thumbnails.

1102:控件模块(view)发送第一操作至PC助手。1102: The control module (view) sends a first operation to the PC assistant.

1103:拖拽框架监测到拖拽事件。1103: The drag framework detects a drag event.

可以理解,本申请实施例中,拖拽框架可以在确定第一控件所处的第一应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,确定监测到拖拽事件。It can be understood that in the embodiment of the present application, the drag framework can determine that a drag event is detected when it is determined that the first application in which the first control is located supports sharing the first object corresponding to the first control by dragging the first control.

1104:拖拽框架发送拖拽事件至PC助手。1104: The drag framework sends a drag event to the PC assistant.

1105:PC助手接收到第一操作后,监测到第一控件所在的第一位置到第一窗口外的第二位置的移动轨迹。1105: After receiving the first operation, the PC assistant monitors a movement trajectory from a first position where the first control is located to a second position outside the first window.

可以理解,本申请实施例中,若用户通过鼠标进行第一控件的拖拽,第一电子设备可以在监测到鼠标从第一控件所在的第一位置移出至第二窗口外的第二位置,且鼠标在移出过程中一直处于按下状态确定出用户拖拽轨迹为从第一控件所在的第一位置到第二窗口外的第二位置。It can be understood that in the embodiment of the present application, if the user drags the first control with the mouse, the first electronic device can determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window when it detects that the mouse moves from the first position where the first control is located to the second position outside the second window and the mouse is in a pressed state during the movement.

在一些实施例中,若用户可以通过触摸屏(例如手机、平板电脑的触摸屏)或触控区域(例如笔记本电脑的触控区域)进行第一控件的拖拽。对应的,第一电子设备可以通过监测到用户触摸轨迹从第一控件所在的第一位置移出至第二窗口外的第二位置,且触摸轨迹在移出过程中一直处于连续状态时,确定用户拖拽轨迹为从第一控件所在的第一位置移出至第二窗口外的第二位置。In some embodiments, if the user can drag the first control through a touch screen (such as a touch screen of a mobile phone or tablet computer) or a touch area (such as a touch area of a laptop computer), the first electronic device can correspondingly determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the second window by monitoring that the user's touch trajectory moves from the first position where the first control is located to the second position outside the second window, and the touch trajectory is in a continuous state during the moving process.

可以理解,上述第二位置可以为第二窗口外的任一位置,也可以指第一窗口的任一位置。It can be understood that the second position can be any position outside the second window, or can refer to any position of the first window.

例如,如图12a所示,第一窗口为通讯应用窗口(即正常全屏显示窗口),第二窗口可以为中转站悬浮窗口,则第二位置可以为中转站悬浮窗口207中的任意位置。For example, as shown in FIG. 12 a , the first window is a communication application window (ie, a normal full-screen display window), and the second window may be a transfer station floating window. The second position may be any position in the transfer station floating window 207 .

在一些实施例中,若第一窗口为中转站悬浮窗口,第二窗口为应用窗口,则第二位置可以为中转站悬浮窗口207外的任意位置。In some embodiments, if the first window is a transfer station floating window and the second window is an application window, the second position may be any position outside the transfer station floating window 207 .

1106:PC助手判断是否接收到拖拽事件,若未接收到,则转至1107,控制显示屏显示提示信息。若接收到,则转至1108,执行拖拽流程。1106: PC Assistant determines whether a drag event is received. If not, the process goes to 1107 to control the display screen to display a prompt message. If received, the process goes to 1108 to execute the drag process.

1107:PC助手控制显示屏显示提示信息。1107: The PC Assistant controls the display screen to display prompt information.

1108:PC助手执行拖拽流程。1108: The PC Assistant executes the drag process.

其中,拖拽流程可以包括在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。The dragging process may include storing the object corresponding to the first control at a set storage location and displaying the object at the user's dragging release location when the user's dragging release location is detected.

在一些实施例中,第一应用窗口可以为悬浮窗口,第二应用窗口为正常窗口。在一些实施例中,第一应用窗口和第二应用窗口均可以为悬浮窗口。在一些实施例中第一应用窗口可以为正常窗口,第二应用窗口为悬浮窗口。In some embodiments, the first application window can be a floating window, and the second application window can be a normal window. In some embodiments, both the first application window and the second application window can be floating windows. In some embodiments, the first application window can be a normal window, and the second application window can be a floating window.

可以理解,在一些实施例中,如图12a所示,当用户通过长按并移动通讯应用窗口中缩略图202的操作,可以实现将通讯应用中的缩略图202对应的图片分享至中转站悬浮窗口207中。在手机100监测到为从通讯应用窗口中缩略图202对应的第一位置移动到了中转站悬浮窗口的任意位置的移动轨迹时,若确定未接收到拖拽事件,此时手机100显示提示信息,例如,提示信息可以为“应用未适配,不支持拖拽”,以提醒用户当前应用不支持拖拽。It can be understood that in some embodiments, as shown in FIG. 12a, when the user long presses and moves the thumbnail 202 in the communication application window, the picture corresponding to the thumbnail 202 in the communication application window can be shared to the transfer station floating window 207. When the mobile phone 100 detects the movement track from the first position corresponding to the thumbnail 202 in the communication application window to any position of the transfer station floating window, if it is determined that no drag event is received, the mobile phone 100 displays a prompt message, for example, the prompt message can be "the application is not adapted and does not support dragging", to remind the user that the current application does not support dragging.

下面以第一窗口为通讯应用窗口,第二窗口为中转站悬浮窗口为例,对本申请实施例中用于单设备的内容分享方法进行说明。图12b示出了本申请实施例中一种内容分享方法的流程示意图。如图12b所示,方法包括:The following uses the first window as a communication application window and the second window as a transfer station floating window as an example to illustrate the content sharing method for a single device in the embodiment of the present application. FIG12b shows a flow chart of a content sharing method in the embodiment of the present application. As shown in FIG12b, the method includes:

1201:控件模块(view)监测到用户长按通讯应用窗口中的第一控件的第一操作。1201: The control module (view) detects a first operation of a user long pressing a first control in a communication application window.

在一些实施例中,如图12a所示,第一控件可以为通讯应用窗口中的缩略图202。In some embodiments, as shown in FIG. 12 a , the first control may be a thumbnail 202 in the communication application window.

1202:控件模块(view)发送第一操作至PC助手。1202: The control module (view) sends a first operation to the PC assistant.

1203:拖拽框架监测到拖拽事件。1203: The drag framework detects a drag event.

可以理解,本申请实施例中,拖拽框架可以在确定通讯应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,确定监测到拖拽事件。It can be understood that in the embodiment of the present application, the drag framework can determine that a drag event is detected when it is determined that the communication application supports sharing the first object corresponding to the first control by dragging the first control.

1204:拖拽框架发送拖拽事件至PC助手。1204: The drag framework sends a drag event to the PC assistant.

1205:PC助手接收到第一操作后,监测到用户输入的从第一控件所在的第一位置至中中转站悬浮窗口中的第二位置的移动轨迹。1205: After receiving the first operation, the PC assistant monitors the movement trajectory of the user input from the first position where the first control is located to the second position in the floating window of the middle transfer station.

1206:PC助手判断是否接收到拖拽事件,若未接收到,则转至1207,控制显示屏显示提示信息。若未接收到,则转至1208,执行拖拽流程。1206: PC Assistant determines whether a drag event is received. If not, the process goes to 1207 to control the display screen to display a prompt message. If not, the process goes to 1208 to execute the drag process.

1207:PC助手控制显示屏显示提示信息。1207: The PC Assistant controls the display screen to display prompt information.

1208:PC助手执行拖拽流程。1208: PC Assistant executes the drag process.

综上,本申请实施例中,当电子设备可以通过结合拖拽轨迹和是否获取到拖拽事件确定应用是否支持拖拽。且在确定应用不支持拖拽时,电子设备提示用户无法拖拽的原因,能够便于用户知晓无法拖拽的原因,提升用户体验。In summary, in the embodiment of the present application, when the electronic device can determine whether the application supports dragging by combining the dragging track and whether the dragging event is obtained, and when it is determined that the application does not support dragging, the electronic device prompts the user why the dragging cannot be performed, which can facilitate the user to know the reason why the dragging cannot be performed, thereby improving the user experience.

此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件精确识别用户意图,避免误判的情况发生。In addition, in the embodiment of the present application, the dragging trajectory, dragging events, and long press events can be combined to accurately identify the user's intention and avoid misjudgment.

下面以键鼠穿越场景为例,说明本申请实施例中的内容分享方法。图9示出了本申请实施例中一种内容分享方法的交互流程示意图。假设第一电子设备为数据拖入端设备,第二电子设备为数据拖出端设备。第一电子设备显示第一窗口,第二电子设备显示第二窗口。The following uses the keyboard and mouse crossing scene as an example to illustrate the content sharing method in the embodiment of the present application. FIG9 shows a schematic diagram of the interaction process of a content sharing method in the embodiment of the present application. Assume that the first electronic device is a data drag-in end device and the second electronic device is a data drag-out end device. The first electronic device displays a first window and the second electronic device displays a second window.

如图13所示,方法包括:As shown in FIG. 13 , the method includes:

1301:第一电子设备和第二电子设备建立连接。1301: A first electronic device and a second electronic device establish a connection.

其中,第二电子设备和第一电子设备可通过有线或无线的方式建立连接。基于建立的连接,第二电子设备和第一电子设备可配合一起使用。在本实施例中,第二电子设备和第一电子设备采用无线方式建立连接时采用的无线通信协议可以为无线保真(wirelessfidelity,Wi-Fi)协议、蓝牙(Bluetooth)协议、ZigBee协议、近距离无线通信(Near FieldCommunication,NFC)协议,各种蜂窝网协议等,在此不做具体限制。The second electronic device and the first electronic device may establish a connection via a wired or wireless method. Based on the established connection, the second electronic device and the first electronic device may be used together. In this embodiment, the wireless communication protocol used when the second electronic device and the first electronic device establish a connection wirelessly may be a wireless fidelity (Wi-Fi) protocol, a Bluetooth (Bluetooth) protocol, a ZigBee protocol, a Near Field Communication (NFC) protocol, various cellular network protocols, etc., which are not specifically limited here.

1302:第二电子设备监测到用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹。1302: After the second electronic device detects a first operation of a user long pressing a first control in the second window, the second electronic device monitors an input track starting with the first operation.

可以理解,本申请实施例中,用户长按第二窗口中的第一控件的第一操作即长按事件可以为第二窗口中的第一控件(例如文件控件及图片控件)被用户按下的时间大于设定时间的操作。It can be understood that in the embodiment of the present application, the first operation of the user long pressing the first control in the second window, i.e., the long press event, can be an operation in which the first control in the second window (such as a file control and a picture control) is pressed by the user for a time greater than a set time.

1303:第二电子设备监测到用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹。1303: The second electronic device monitors a movement track of the user input from a first position where the first control is located to a second position outside the display screen of the second electronic device.

可以理解,本申请实施例中,第二电子设备在检测到第一操作后,可以实时监测以第一操作为起始操作的用户输入轨迹。It can be understood that in the embodiment of the present application, after detecting the first operation, the second electronic device can monitor in real time the user input trajectory starting with the first operation.

可以理解,当鼠标或用户触摸轨迹移出第二电子设备的显示屏即可以穿越至第一电子设备的显示屏。It can be understood that when the mouse or the user touch track moves out of the display screen of the second electronic device, it can pass through to the display screen of the first electronic device.

即本申请中,从第一窗口的第一控件的第一位置到第二位置的移动轨迹可以指用户的输入操作(如鼠标或用户触摸轨迹)从第一控件的第一位置到移出第二电子设备的显示屏的位置(即第二位置),或者可以指用户的输入操作(如鼠标或用户触摸轨迹)从第一控件的第一位置到移入第一电子设备的显示屏的位置(即第二位置)。That is, in the present application, the movement trajectory from the first position to the second position of the first control of the first window may refer to the user's input operation (such as a mouse or user touch trajectory) from the first position of the first control to a position outside the display screen of the second electronic device (i.e., the second position), or may refer to the user's input operation (such as a mouse or user touch trajectory) from the first position of the first control to a position inside the display screen of the first electronic device (i.e., the second position).

可以理解,本申请实施例中,若用户通过鼠标进行第一控件的拖拽,第一电子设备可以在监测到鼠标从第一控件所在的第一位置移出至第二电子设备的显示屏外的第二位置,且鼠标在移出过程中一直处于按下状态确定出用户拖拽轨迹为从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置。It can be understood that in the embodiment of the present application, if the user drags the first control with the mouse, the first electronic device can determine that the user's dragging trajectory is from the first position where the first control is located to the second position outside the display screen of the second electronic device after monitoring that the mouse moves from the first position where the first control is located to the second position outside the display screen of the second electronic device, and the mouse is in a pressed state during the movement.

在一些实施例中,若用户可以通过触摸屏(例如手机、平板电脑的触摸屏)或触控区域(例如笔记本电脑的触控区域)进行第一控件的拖拽。对应的,第一电子设备可以通过监测到用户触摸轨迹从第一控件所在的第一位置移出至第二电子设备的显示屏外的第二位置,且触摸轨迹在移出过程中一直处于连续状态时,确定用户拖拽轨迹为从第一控件所在的第一位置移出至第二电子设备的显示屏外的第二位置。In some embodiments, if the user can drag the first control through a touch screen (such as a touch screen of a mobile phone or tablet computer) or a touch area (such as a touch area of a laptop computer), the first electronic device can detect that the user's touch track moves from the first position where the first control is located to the second position outside the display screen of the second electronic device, and the touch track is in a continuous state during the moving process, and thus determine that the user's dragging track is moving from the first position where the first control is located to the second position outside the display screen of the second electronic device.

1304:第二电子设备发送第二位置对应的位置信息以及用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至第一电子设备。1304: The second electronic device sends the position information corresponding to the second position and the movement track input by the user from the first position where the first control is located to the second position outside the display screen of the second electronic device to the first electronic device.

可以理解,在一些实施例中,第一电子设备可以在监测到第一操作时,判断第一控件所处的应用是否支持通过拖拽第一控件的方式分享第一控件对应的第一对象。若否,则确定监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,只发送第二位置对应的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至第一电子设备;若是,则确定监测到用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,发送第二位置对应的位置信息、从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹和拖拽事件至第一电子设备。It can be understood that in some embodiments, the first electronic device can determine whether the application in which the first control is located supports sharing the first object corresponding to the first control by dragging the first control when the first operation is detected. If not, when it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the second window is detected, only the position information corresponding to the second position and the movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device are sent to the first electronic device; if so, when it is determined that the movement trajectory of the user input from the first position where the first control is located to the second position outside the display screen of the second electronic device is detected, the position information corresponding to the second position, the movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device and the drag event are sent to the first electronic device.

1305:第二电子设备判断是否接收到拖拽事件。若是,则转至1306,发出提示信息;若是,则转至1307,执行拖拽流程。1305: The second electronic device determines whether a drag event is received. If yes, the process goes to 1306 to issue a prompt message; if yes, the process goes to 1307 to execute the drag process.

在一些实施例中,第一电子设备在接收到位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,可以判断是否接收到了拖拽事件,若未接收到拖拽事件,则可以确定用户进行了拖拽,存在拖拽意图,但第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,则在此时第一电子设备显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。In some embodiments, when the first electronic device receives position information and a movement trajectory from a first position where the first control is located to a second position outside the display screen of the second electronic device, it can determine whether a drag event has been received. If no drag event is received, it can be determined that the user has dragged and has an intention to drag, but the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control. At this time, the first electronic device displays a prompt message to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

在一些实施例中,第一电子设备在接收到位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,若未接收到拖拽事件,可以在继续监测到用户输入的移至第一窗口内的轨迹时,则显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。In some embodiments, when the first electronic device receives position information and a movement trajectory from a first position where a first control is located to a second position outside a display screen of a second electronic device, if no drag event is received, it may display a prompt message while continuing to monitor a trajectory input by the user to move into the first window, to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

即第一电子设备进行提示的时刻可以为接收到位置信息及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹,却未接收到拖拽事件的时刻。在一些实施例中,也可以是在继续检测到鼠标或输入轨迹穿越或移动至第一窗口内的时刻。That is, the first electronic device may prompt when it receives the position information and the moving track from the first position where the first control is located to the second position outside the display screen of the second electronic device, but does not receive the drag event. In some embodiments, it may also be when the mouse or input track continues to be detected to cross or move into the first window.

在一些实施例中,第一电子设备若接收到第二位置对应的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹,且接收到拖拽事件,则可以执行拖拽流程。In some embodiments, if the first electronic device receives position information corresponding to the second position and a movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device, and receives a drag event, the drag process can be executed.

1306:第一电子设备发出提示信息。1306: The first electronic device sends a prompt message.

可以理解,在一些实施例中,第一电子设备可以显示提示信息,例如,第一电子设备可以显示“应用未适配,不支持拖拽”的提示信息。It can be understood that in some embodiments, the first electronic device may display prompt information. For example, the first electronic device may display a prompt information of “the application is not adapted and does not support dragging”.

1307:第一电子设备执行拖拽流程。1307: The first electronic device executes the drag process.

其中,拖拽流程可以包括在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。The dragging process may include storing the object corresponding to the first control at a set storage location and displaying the object at the user's dragging release location when the user's dragging release location is detected.

下面以第二电子设备为手机,第一电子设备为计算机为例,结合第一电子设备和第二电子设备的软件框架对本申请实施例中一种内容分享方法进行说明,其中,第一电子设备包括控件模块、拖拽框架、第一通信框架和PC助手。第二电子设备包括第二通信框架和PC管家。In the following, a content sharing method in an embodiment of the present application is described by taking the second electronic device as a mobile phone and the first electronic device as a computer as an example, combining the software frameworks of the first electronic device and the second electronic device, wherein the first electronic device includes a control module, a drag framework, a first communication framework, and a PC assistant. The second electronic device includes a second communication framework and a PC housekeeper.

假设第一电子设备为数据拖入端设备,第二电子设备为数据拖出端设备。第一电子设备显示第一窗口,第二电子设备显示第二窗口。图14示出了本申请实施例中一种内容分享方法的流程示意图。如图14所示,方法包括:Assume that the first electronic device is a data-input end device and the second electronic device is a data-output end device. The first electronic device displays a first window and the second electronic device displays a second window. FIG. 14 shows a flow chart of a content sharing method in an embodiment of the present application. As shown in FIG. 14 , the method includes:

1401:控件模块(view)监测到用户长按第二窗口中的第一控件的第一操作。1401: The control module (view) detects a first operation of a user long pressing a first control in a second window.

可以理解,本申请实施例中,控件模块可以通过onTouchEvent回调,监测是否存在长按事件(即用户长按第二窗口中的第一控件的第一操作)。可以理解,本申请实施例中,当控件模块监测到用户按下第二窗口中的第一控件达到设定时间,则可以确定监测到用户长按第二窗口中的第一控件的第一操作。It is understood that in the embodiment of the present application, the control module can monitor whether there is a long press event (i.e., the first operation of the user long pressing the first control in the second window) through the onTouchEvent callback. It is understood that in the embodiment of the present application, when the control module monitors that the user presses the first control in the second window for a set time, it can be determined that the first operation of the user long pressing the first control in the second window is detected.

可以理解,第一控件可以包括文件图标、图片缩略图等控件。It can be understood that the first control may include controls such as file icons and picture thumbnails.

1402:控件模块(view)发送第一操作至PC助手。1402: The control module (view) sends a first operation to the PC assistant.

可以理解,手机的PC助手可以向view注册长按事件监听。当view监测到用户长按事件会通知PC助手(即将长按事件发送至PC助手)。It is understandable that the PC assistant of the mobile phone can register a long press event listener with the view. When the view detects a user long press event, it will notify the PC assistant (i.e. send the long press event to the PC assistant).

1403:PC助手监测到用户输入的从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹。1403: The PC assistant monitors a movement trajectory of the user input from a first position where the first control is located to a second position outside the display screen of the second electronic device.

1404:PC助手发送第二位置的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至第一通信框架。1404: The PC assistant sends the location information of the second location and a moving track from the first location where the first control is located to the second location outside the display screen of the second electronic device to the first communication framework.

1405:第一通信框架发送第二位置的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至第二通信框架。1405: The first communication framework sends the location information of the second position and a moving track from the first position where the first control is located to the second position outside the display screen of the second electronic device to the second communication framework.

1406:第二通信框架发送第二位置的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹至PC管家。1406: The second communication framework sends the location information of the second position and the movement track from the first position where the first control is located to the second position outside the display screen of the second electronic device to PC Manager.

1407:拖拽框架监测到拖拽事件。1407: The drag framework detects a drag event.

可以理解,本申请实施例中,拖拽框架可以在确定通讯应用支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,确定监测到拖拽事件。并发送拖拽事件至第一电子设备。It can be understood that in the embodiment of the present application, the drag framework can determine that a drag event is detected when it is determined that the communication application supports sharing the first object corresponding to the first control by dragging the first control, and send the drag event to the first electronic device.

拖拽框架可以在确定通讯应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,不发送拖拽事件至第一电子设备。The drag framework may not send a drag event to the first electronic device when it is determined that the communication application does not support sharing the first object corresponding to the first control by dragging the first control.

1408:拖拽框架发送拖拽事件至PC助手。1408: The drag framework sends a drag event to the PC assistant.

可以理解,手机的PC助手可以向拖拽框架注册拖拽事件监听。当拖拽框架监测到用户拖拽事件会通知PC助手(即将长按事件发送至PC助手)。It is understandable that the PC assistant of the mobile phone can register a drag event listener with the drag framework. When the drag framework detects the user's drag event, it will notify the PC assistant (that is, send the long press event to the PC assistant).

1409:PC助手发送拖拽事件至第一通信框架。1409: The PC assistant sends a drag event to the first communication framework.

1410:第一通信框架发送拖拽事件至第二通信框架。1410: The first communication framework sends a drag event to the second communication framework.

1411:第二通信框架将拖拽事件发送至PC管家。1411: The second communication framework sends the drag event to PC Manager.

1412:PC管家接收到第二位置的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹。1412: PC Manager receives the location information of the second location and the movement track from the first location where the first control is located to the second location outside the display screen of the second electronic device.

1413:判断是否接收到拖拽事件。若未接收到,则转至1414,控制显示屏显示提示信息。若接收到,则转至1415,执行拖拽流程。1413: Determine whether a drag event is received. If not, go to 1414 to control the display screen to display a prompt message. If received, go to 1415 to execute the drag process.

在一些实施例中PC管家在接收到位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,可以判断是否接收到了拖拽事件,若未接收到拖拽事件,则可以确定用户进行了拖拽,存在拖拽意图,但第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象,则在此时第一电子设备显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。In some embodiments, when PC Manager receives position information and a movement trajectory from a first position where a first control is located to a second position outside a display screen of a second electronic device, it can determine whether a drag event has been received. If no drag event is received, it can be determined that the user has dragged and has an intention to drag, but the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control. At this time, the first electronic device displays a prompt message to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

在一些实施例中,PC管家在接收到位置信息后,在继续监测到用户输入的移至第一窗口内的轨迹时,可以判断是否接收到了拖拽事件,若未接收到拖拽事件,则显示提示信息,以提示用户第二电子设备的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象。In some embodiments, after receiving the location information, PC Manager can determine whether a drag event has been received while continuing to monitor the trajectory of the user input to move into the first window. If no drag event is received, a prompt message is displayed to prompt the user that the application where the first control of the second electronic device is located does not support sharing the first object corresponding to the first control by dragging the first control.

即第一电子设备进行提示的时刻可以为接收到位置信息及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹的时刻。在一些实施例中,也可以是鼠标或输入轨迹穿越或移动至第一窗口内的时刻。That is, the first electronic device may prompt when receiving the position information and the moving track from the first position where the first control is located to the second position outside the display screen of the second electronic device. In some embodiments, it may also be when the mouse or input track passes through or moves into the first window.

在一些实施例中,第一电子设备若接收到第二位置对应的位置信息以及从第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹,且接收到拖拽事件,则可以执行拖拽流程。In some embodiments, if the first electronic device receives position information corresponding to the second position and a movement trajectory from the first position where the first control is located to the second position outside the display screen of the second electronic device, and receives a drag event, the drag process can be executed.

1414:PC管家控制显示屏显示提示信息。1414: The PC manager controls the display screen to display prompt information.

1415:PC管家执行拖拽流程。1415: PC Manager executes the drag-and-drop process.

其中,拖拽流程可以包括在监测到用户的拖拽释放位置时,将第一控件对应的对象存储在设定存储位置并显示在用户的拖拽释放位置。The dragging process may include storing the object corresponding to the first control at a set storage location and displaying the object at the user's dragging release location when the user's dragging release location is detected.

基于上述方案,在用户拖拽的第一控件所在的应用并不支持通过拖拽第一控件的方式分享第一控件对应的第一对象时,第一电子设备能够进行提示,如此,能够便于用户知晓无法拖拽的原因,提升用户体验。此外,本申请实施例中能够结合拖拽轨迹以及拖拽事件、长按事件精确识别用户意图,避免误判的情况发生。Based on the above solution, when the application where the first control dragged by the user is located does not support sharing the first object corresponding to the first control by dragging the first control, the first electronic device can give a prompt, so that the user can know the reason why the dragging cannot be done, thereby improving the user experience. In addition, in the embodiment of the present application, the user's intention can be accurately identified by combining the dragging trajectory, dragging events, and long press events to avoid misjudgment.

本申请还提供一种内容分享系统,包括第一电子设备和第二电子设备,第一电子设备显示第一窗口和第二窗口,其中,第二窗口为第二电子设备投屏到第一电子设备上的应用窗口;第二电子设备,用于监测用户长按第二窗口中的第一控件的第一操作,以及发送第一操作至第一电子设备;第一电子设备,用于接收到第一操作后,监测以第一操作为起始操作的输入轨迹;第一电子设备,用于监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。The present application also provides a content sharing system, including a first electronic device and a second electronic device, the first electronic device displays a first window and a second window, wherein the second window is an application window projected from the second electronic device to the first electronic device; the second electronic device is used to monitor a first operation of a user long pressing a first control in the second window, and send the first operation to the first electronic device; the first electronic device is used to monitor an input trajectory starting with the first operation after receiving the first operation; the first electronic device is used to monitor a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, and if the drag event corresponding to the first control is not obtained, display a prompt message that the application where the first control is located does not support sharing a first object corresponding to the first control by dragging the first control.

第一电子设备包括第一系统应用;第二电子设备包括控件模块和第二系统应用;控件模块,用于监测用户长按第二窗口中的第一控件的第一操作,以及发送第一操作至第二系统应用;第二系统应用,用于发送第一操作至第一系统应用;第一系统应用,用于接收到第一操作后,监测以第一操作为起始操作的输入轨迹;第一系统应用,用于监测到用户输入的从第一控件所在的第一位置到第二窗口外的第二位置的移动轨迹时,若未获取到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。The first electronic device includes a first system application; the second electronic device includes a control module and a second system application; the control module is used to monitor a first operation of a user long pressing the first control in the second window, and send the first operation to the second system application; the second system application is used to send the first operation to the first system application; the first system application is used to monitor an input trajectory starting with the first operation after receiving the first operation; the first system application is used to monitor a movement trajectory input by the user from a first position where the first control is located to a second position outside the second window, and if the drag event corresponding to the first control is not obtained, then display a prompt message that the application where the first control is located does not support sharing the first object corresponding to the first control by dragging the first control.

本申请提供一种内容分享系统,包括第一电子设备和第二电子设备,第一电子设备和第二电子设备连接,第一电子设备显示第一窗口,第二电子设备显示第二窗口;第二电子设备,用于监测到用户长按第二窗口中的第一控件的第一操作后,监测以第一操作为起始操作的输入轨迹;第二电子设备,用于监测到用户输入的从第二窗口内的第一控件所在的第一位置到第二电子设备的显示屏外的第二位置的移动轨迹时,将第二位置的位置信息以及移动轨迹发送至第一电子设备;第一电子设备,用于在接收到第二电子设备发送的第二位置的位置信息以及移动轨迹时,若未接收到第一控件对应的拖拽事件,则显示第一控件所处的应用不支持通过拖拽第一控件的方式分享第一控件对应的第一对象的提示信息。The present application provides a content sharing system, including a first electronic device and a second electronic device, the first electronic device and the second electronic device are connected, the first electronic device displays a first window, and the second electronic device displays a second window; the second electronic device is used to monitor an input trajectory starting with the first operation after monitoring a first operation of a user long pressing a first control in the second window; the second electronic device is used to send position information and the movement trajectory of the second position to the first electronic device when monitoring a movement trajectory input by the user from a first position where the first control in the second window is located to a second position outside the display screen of the second electronic device; the first electronic device is used to, when receiving the position information and the movement trajectory of the second position sent by the second electronic device, if no drag event corresponding to the first control is received, display a prompt message that the application where the first control is located does not support sharing of a first object corresponding to the first control by dragging the first control.

下面以手机为例对本申请实施例提供的电子设备的硬件结构进行说明。如图15所示,手机10可以包括处理器110、电源模块140、存储器180,移动通信模块130、无线通信模块120、传感器模块190、音频模块150、摄像头170、接口模块160、按键101以及显示屏102等。The hardware structure of the electronic device provided by the embodiment of the present application is described below by taking a mobile phone as an example. As shown in FIG15 , the mobile phone 10 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a button 101, and a display screen 102, etc.

可以理解的是,本发明实施例示意的结构并不构成对手机10的具体限定。在本申请另一些实施例中,手机10可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 10. In other embodiments of the present application, the mobile phone 10 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如,可以包括中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、数字信号处理器DSP、微处理器(Micro-programmed Control Unit,MCU)、人工智能(ArtificialIntelligence,AI)处理器或可编程逻辑器件(Field Programmable Gate Array,FPGA)等的处理模块或处理电路。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器110中可以设置存储单元,用于存储指令和数据。在一些实施例中,处理器110中的存储单元为高速缓冲存储器180。The processor 110 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor DSP, a microprocessor (MCU), an artificial intelligence (AI) processor, or a processing module or processing circuit of a programmable logic device (Field Programmable Gate Array, FPGA). Among them, different processing units can be independent devices or integrated in one or more processors. A storage unit can be set in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180.

其中,处理器可以用于执行本申请实施例提供的内容分享方法。Among them, the processor can be used to execute the content sharing method provided in the embodiment of the present application.

电源模块140可以包括电源、电源管理部件等。电源可以为电池。电源管理部件用于管理电源的充电和电源向其他模块的供电。在一些实施例中,电源管理部件包括充电管理模块和电源管理模块。充电管理模块用于从充电器接收充电输入;电源管理模块用于连接电源,充电管理模块与处理器110。电源管理模块接收电源和/或充电管理模块的输入,为处理器110,显示屏102,摄像头170,及无线通信模块120等供电。The power module 140 may include a power source, a power management component, etc. The power source may be a battery. The power management component is used to manage the charging of the power source and the power supply of the power source to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power source, the charging management module and the processor 110. The power management module receives input from the power source and/or the charging management module, and supplies power to the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.

移动通信模块130可以包括但不限于天线、功率放大器、滤波器、LNA(Low noiseamplify,低噪声放大器)等。移动通信模块130可以提供应用在手机10上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块130可以由天线接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块130还可以对经调制解调处理器调制后的信号放大,经天线转为电磁波辐射出去。在一些实施例中,移动通信模块130的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块130至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code divisionmultiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),蓝牙(bluetooth,BT),全球导航卫星系统(globalnavigation satellite system,GNSS),无线局域网(wireless local area networks,WLAN),近距离无线通信技术(near field communication,NFC),调频(frequencymodulation,FM)和/或field communication,NFC),红外技术(infrared,IR)技术等。GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, an LNA (Low noise amplifier), etc. The mobile communication module 130 may provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the mobile phone 10. The mobile communication module 130 may receive electromagnetic waves through an antenna, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the same device as at least some of the modules of the processor 110. Wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), Bluetooth (BT), global navigation satellite system (GNSS), wireless local area networks (WLAN), near field communication (NFC), frequency modulation (FM) and/or field communication (NFC), infrared technology (IR), etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and/or the satellite based augmentation system (SBAS).

无线通信模块120可以包括天线,并经由天线实现对电磁波的收发。无线通信模块120可以提供应用在手机10上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。手机10可以通过无线通信技术与网络以及其他设备进行通信。The wireless communication module 120 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the mobile phone 10. The mobile phone 10 can communicate with the network and other devices through wireless communication technology.

在一些实施例中,手机10的移动通信模块130和无线通信模块120也可以位于同一模块中。In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the mobile phone 10 may also be located in the same module.

显示屏102用于显示人机交互界面、图像、视频等。显示屏102包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organiclight-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flexlight-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。The display screen 102 is used to display a human-computer interaction interface, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc.

传感器模块190可以包括接近光传感器、压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。其中,陀螺仪传感器可以用于判断手机抖动等信息。The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. Among them, the gyroscope sensor can be used to determine information such as mobile phone shaking.

音频模块150用于将数字音频信息转换成模拟音频信号输出,或者将模拟音频输入转换为数字音频信号。音频模块150还可以用于对音频信号编码和解码。在一些实施例中,音频模块150可以设置于处理器110中,或将音频模块150的部分功能模块设置于处理器110中。在一些实施例中,音频模块150可以包括扬声器、听筒、麦克风以及耳机接口。The audio module 150 is used to convert digital audio information into analog audio signal output, or convert analog audio input into digital audio signal. The audio module 150 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 can be arranged in the processor 110, or some functional modules of the audio module 150 can be arranged in the processor 110. In some embodiments, the audio module 150 can include a speaker, an earpiece, a microphone, and an earphone interface.

摄像头170用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件把光信号转换成电信号,之后将电信号传递给ISP(Image SignalProcessing,图像信号处理)转换成数字图像信号。手机10可以通过ISP,摄像头170,视频编解码器,GPU(Graphic Processing Unit,图形处理器),显示屏102以及应用处理器等实现拍摄功能。The camera 170 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP (Image Signal Processing) to convert it into a digital image signal. The mobile phone 10 can realize the shooting function through the ISP, the camera 170, the video codec, the GPU (Graphic Processing Unit), the display screen 102 and the application processor.

可以理解,本申请实施例中可以摄像头170包括主摄像头和长焦摄像头,也可以包括其他摄像头,其中,主摄像头一般为焦距27mm左右的镜头,用于拍摄中等视角场景;长焦摄像头一般为焦距50mm以上的镜头,用于拍摄特写场景。It can be understood that in the embodiment of the present application, the camera 170 may include a main camera and a telephoto camera, and may also include other cameras, wherein the main camera generally has a lens with a focal length of about 27 mm, which is used to shoot medium-angle scenes; the telephoto camera generally has a lens with a focal length of more than 50 mm, which is used to shoot close-up scenes.

接口模块160包括外部存储器接口、通用串行总线(universal serial bus,USB)接口及用户标识模块(subscriber identification module,SIM)卡接口等。其中外部存储器接口可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机10的存储能力。外部存储卡通过外部存储器接口与处理器110通信,实现数据存储功能。通用串行总线接口用于手机10和其他电子设备进行通信。用户标识模块卡接口用于与安装至手机1010的SIM卡进行通信,例如读取SIM卡中存储的电话号码,或将电话号码写入SIM卡中。The interface module 160 includes an external memory interface, a universal serial bus (USB) interface, and a subscriber identification module (SIM) card interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10. The external memory card communicates with the processor 110 through the external memory interface to implement a data storage function. The universal serial bus interface is used for the mobile phone 10 to communicate with other electronic devices. The subscriber identification module card interface is used to communicate with the SIM card installed in the mobile phone 1010, for example, to read the phone number stored in the SIM card, or to write the phone number into the SIM card.

在一些实施例中,手机10还包括按键101、马达以及指示器等。其中,按键101可以包括音量键、开/关机键等。马达用于使手机10产生振动效果,例如在用户的手机10被呼叫的时候产生振动,以提示用户接听手机10来电。指示器可以包括激光指示器、射频指示器、LED指示器等。In some embodiments, the mobile phone 10 further includes a button 101, a motor, and an indicator. The button 101 may include a volume button, a power on/off button, etc. The motor is used to make the mobile phone 10 vibrate, for example, vibrate when the user's mobile phone 10 is called, so as to prompt the user to answer the call. The indicator may include a laser indicator, a radio frequency indicator, an LED indicator, etc.

本申请公开的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.

可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如,计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.

需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的范围。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements. Although the present application has been illustrated and described with reference to certain preferred embodiments of the present application, it should be understood by those skilled in the art that various changes can be made to it in form and detail without departing from the scope of the present application.

Claims (28)

1. The content sharing method is applied to first electronic equipment and is characterized in that the first electronic equipment displays a first window and a second window, wherein the second window is an application window of the second electronic equipment, which is projected onto the first electronic equipment;
The method comprises the following steps:
After the first electronic device receives a first operation of long-pressing a first control in the second window by a user sent by the second electronic device, monitoring an input track taking the first operation as an initial operation;
When the first electronic device monitors a movement track input by a user from a first position where the first control is located to a second position outside the second window, if a drag event corresponding to the first control is not acquired, displaying that the application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control in a mode of dragging the first control.
2. The method of claim 1, wherein the second location is any location outside the second window.
3. The method of claim 1, wherein the first window is an application window of the first electronic device;
the second position is any position of the first window.
4. A method according to any of claims 1-3, wherein the first electronic device monitoring a movement trajectory of a user input from a first position where the first control is located to a second position outside the second window, comprising:
The first electronic device monitors that the mouse moves out from a first position where the first control is located to a second position outside the second window, and determines a movement track from the first position where the first control is located to the second position outside the second window, which is input by a user, when the mouse is in a pressed state all the time in the moving-out process.
5. A method according to any of claims 1-3, wherein the first electronic device monitoring a movement trajectory of a user input from a first position where the first control is located to a second position outside the second window, comprising:
And under the condition that the first electronic equipment monitors that the touch track of the user moves out from the first position where the first control is positioned to the second position outside the second window and the touch track is always in a continuous state in the moving-out process, determining that the movement track of the user input from the first position where the first control is positioned to the second position outside the second window is monitored.
6. A content sharing method applied to a second electronic device, wherein the second electronic device is connected with a first electronic device, the method comprising:
The second electronic device determines that a first control in a second window is pressed for a long time, and sends a first operation of pressing the first control for a long time to the first electronic device; the second window is an application window which is projected to the first electronic device by the second electronic device;
And when the second electronic equipment determines that the application where the first control is located does not support sharing of the first object corresponding to the first control in a mode of dragging the first control, the dragging event corresponding to the first control is not sent to the first electronic equipment.
7. The method according to claim 6, comprising:
The second electronic device determines that a first control in a second window is pressed for a long time, and the method comprises the following steps:
The second electronic device obtains position information corresponding to the operation of the user on the second window, which is sent by the first electronic device;
the second electronic device determines that a first control in the second window is pressed for a long time based on the position information.
8. The content sharing method is characterized in that a first electronic device and a second electronic device are connected; the first electronic device displays a first window and a second window, wherein the second window is an application window which is projected onto the first electronic device by the second electronic device;
the second electronic device monitors a first operation of long-pressing a first control in the second window by a user, and sends the first operation to the first electronic device;
after the first electronic equipment receives the first operation, monitoring an input track taking the first operation as an initial operation;
When the first electronic device monitors a movement track input by a user from a first position where the first control is located to a second position outside the second window, if a drag event corresponding to the first control is not acquired, displaying that the application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control in a mode of dragging the first control.
9. The method of claim 8, wherein the second location is any location outside the second window.
10. The method of claim 8, wherein the first window is an application window of the first electronic device;
the second position is any position of the first window.
11. The method of any of claims 8-10, wherein the first electronic device monitoring a movement trajectory of a user input from a first location where the first control is located to a second location outside the second window comprises:
The first electronic device monitors that the mouse moves out from a first position where the first control is located to a second position outside the second window, and determines a movement track from the first position where the first control is located to the second position outside the second window, which is input by a user, when the mouse is in a pressed state all the time in the moving-out process.
12. The method of any of claims 8-10, wherein the first electronic device monitoring a movement trajectory of a user input from a first location where the first control is located to a second location outside the second window comprises:
And under the condition that the first electronic equipment monitors that the touch track of the user moves out from the first position where the first control is positioned to the second position outside the second window and the touch track is always in a continuous state in the moving-out process, determining that the movement track of the user input from the first position where the first control is positioned to the second position outside the second window is monitored.
13. The method according to any one of claims 8-12, further comprising:
the second electronic device monitors a first operation of long-pressing a first control in the second window by a user, and the first operation comprises the following steps:
the second electronic device obtains position information corresponding to the operation of the user in the second window, which is sent by the first electronic device;
And the second electronic equipment determines that the first control is pressed for a long time based on the position information, and determines that the first operation of pressing the first control in the second window for a long time by the user is monitored.
14. The content sharing method is applied to electronic equipment and is characterized in that the electronic equipment displays a first window and a second window, wherein the first window is a first application window of the electronic equipment, and the second window is a second application window of the electronic equipment;
The method comprises the following steps:
After the electronic equipment monitors a first operation of long-pressing a first control in the first window by a user, monitoring an input track taking the first operation as an initial operation;
When the electronic device monitors a moving track input by a user from a first position where the first control is located to a second position outside the first window, if it is determined that a drag event corresponding to the first control is not monitored, displaying that the application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control in a mode of dragging the first control.
15. The method of claim 14, wherein the second location is any location outside of the first window.
16. The method of claim 14, wherein the second position is any position of the second window.
17. The method of any of claims 14-16, wherein the electronic device monitoring a trajectory of movement of a user input from a first position where the first control is located to a second position outside the second window comprises:
The electronic equipment monitors that the mouse moves out from a first position where the first control is located to a second position outside the second window, and determines a movement track from the first position where the first control is located to the second position outside the second window, which is input by a user, under the condition that the mouse is always in a pressed state in the moving-out process.
18. The method of any of claims 14-16, wherein the electronic device monitoring a trajectory of movement of a user input from a first position where the first control is located to a second position outside the second window comprises:
and under the condition that the electronic equipment monitors that the touch track of the user moves out from the first position where the first control is positioned to the second position outside the second window and the touch track is always in a continuous state in the moving-out process, determining that the movement track of the user input from the first position where the first control is positioned to the second position outside the second window is monitored.
19. The method of any of claims 14-18, wherein the first window is a floating window and/or the second window is a floating window.
20. The content sharing method is applied to first electronic equipment and is characterized in that the first electronic equipment is connected with second electronic equipment, the first electronic equipment displays a first window, and the second electronic equipment displays a second window;
The method comprises the following steps:
When the first electronic device receives the position information of the second position outside the display screen of the second electronic device and the movement track from the first position of the first control in the second window to the second position, which are sent by the second electronic device, a drag event corresponding to the first control is not received, and then the prompt information that the application of the first control does not support sharing the first object corresponding to the first control in a mode of dragging the first control is displayed.
21. The content sharing method is characterized in that a first electronic device is connected with a second electronic device, the first electronic device displays a first window, and the second electronic device displays a second window;
After the second electronic device monitors a first operation of long-pressing a first control in the second window by a user, monitoring an input track taking the first operation as an initial operation;
When the second electronic device monitors a movement track input by a user from a first position of a first control in the second window to a second position outside a display screen of the second electronic device, sending the position information of the second position and the movement track to the first electronic device;
When the first electronic device receives the position information of the second position and the movement track sent by the second electronic device, and does not receive the dragging event corresponding to the first control, the first electronic device displays that the application where the first control is located does not support sharing of the prompt information of the first object corresponding to the first control in a mode of dragging the first control.
22. The content sharing system is characterized by comprising a first electronic device and a second electronic device, wherein the first electronic device displays a first window and a second window, and the second window is an application window which is projected onto the first electronic device by the second electronic device;
The second electronic device is used for monitoring a first operation of long-pressing a first control in the second window by a user and sending the first operation to the first electronic device;
The first electronic device is configured to monitor an input track using the first operation as an initial operation after receiving the first operation;
And the first electronic device is configured to monitor a movement track input by a user from a first position where the first control is located to a second position outside the second window, and if a drag event corresponding to the first control is not acquired, display that an application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control by dragging the first control.
23. The system of claim 22, wherein the first electronic device comprises a first system application; the second electronic device comprises a control module and a second system application;
the control module is used for monitoring the first operation of long-pressing a first control in the second window by a user and sending the first operation to the second system application;
The second system application is configured to send the first operation to the first system application;
the first system application is used for monitoring an input track taking the first operation as an initial operation after receiving the first operation;
And the first system application is used for monitoring a moving track input by a user from a first position where the first control is located to a second position outside the second window, and if a drag event corresponding to the first control is not acquired, displaying that the application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control in a mode of dragging the first control.
24. The content sharing system is characterized by comprising a first electronic device and a second electronic device, wherein the first electronic device is connected with the second electronic device, the first electronic device displays a first window, and the second electronic device displays a second window;
The second electronic device is configured to monitor an input track using a first operation as an initial operation after monitoring the first operation of the first control in the second window by a user;
The second electronic device is configured to send, when a movement track from a first position where a first control in the second window is located to a second position outside a display screen of the second electronic device, which is input by a user, to the first electronic device, the position information of the second position and the movement track;
And the first electronic device is configured to, when receiving the position information of the second position and the movement track sent by the second electronic device, display a prompt message that an application where the first control is located does not support sharing of the first object corresponding to the first control by dragging the first control if a dragging event corresponding to the first control is not received.
25. The electronic equipment is characterized in that the electronic equipment is first electronic equipment, the first electronic equipment displays a first window and a second window, and the second window is an application window which is projected onto the first electronic equipment by the second electronic equipment;
The first electronic device is configured to monitor an input track using the first operation as an initial operation after receiving a first operation of long-pressing a first control in the second window by a user sent by the second electronic device;
And the first electronic device is configured to monitor a movement track input by a user from a first position where the first control is located to a second position outside the second window, and if a drag event corresponding to the first control is not acquired, display that an application where the first control is located does not support sharing of prompt information of a first object corresponding to the first control by dragging the first control.
26. An electronic device, wherein the electronic device is a second electronic device;
The second electronic device is used for determining that the first control in the second window is pressed for a long time, and sending a first operation of pressing the first control in the second window for a long time to the first electronic device by a user; the second window is an application window which is projected to the first electronic device by the second electronic device;
And the second electronic device is configured to not send a drag event corresponding to the first control to the first electronic device when it is determined that the application in which the first control is located does not support sharing of the first object corresponding to the first control by dragging the first control.
27. An electronic device, comprising: a memory for storing instructions for execution by one or more processors of the electronic device, and the processor, which is one of the one or more processors of the electronic device, for performing the content sharing method of any of claims 1-21.
28. A readable storage medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the content sharing method of any of claims 1-21.
CN202211295723.XA 2022-10-21 2022-10-21 Content sharing method, system, electronic device and medium Pending CN117950767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211295723.XA CN117950767A (en) 2022-10-21 2022-10-21 Content sharing method, system, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211295723.XA CN117950767A (en) 2022-10-21 2022-10-21 Content sharing method, system, electronic device and medium

Publications (1)

Publication Number Publication Date
CN117950767A true CN117950767A (en) 2024-04-30

Family

ID=90803584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211295723.XA Pending CN117950767A (en) 2022-10-21 2022-10-21 Content sharing method, system, electronic device and medium

Country Status (1)

Country Link
CN (1) CN117950767A (en)

Similar Documents

Publication Publication Date Title
US12141101B2 (en) Data transmission method and related device
US10853979B2 (en) Electronic device and method for displaying screen thereof
JP7604493B2 (en) Multi-screen collaboration method and system, and electronic device
US10664010B2 (en) Electronic device and operating method thereof
CN116095881A (en) Multi-device cooperation method, electronic device and related products
CN115348350B (en) Information display method and electronic device
CN110377235B (en) Data processing method and device, mobile terminal and computer readable storage medium
CN110865837B (en) Method and terminal for system upgrade
EP4407421A1 (en) Device collaboration method and related apparatus
CN116095413B (en) Video processing method and electronic device
US20240427486A1 (en) Icon moving method, related graphical interface, and electronic device
CN111656347B (en) Project display method and terminal
KR20150027934A (en) Apparatas and method for generating a file of receiving a shoot image of multi angle in an electronic device
CN115016697A (en) Screen projection method, computer device, readable storage medium, and program product
CN116095412B (en) Video processing method and electronic equipment
CN116700554A (en) Information display method, electronic device and readable storage medium
CN115661301A (en) Method for adding annotations, electronic device, storage medium and program product
US20160196030A1 (en) Method and electronic device for displaying electronic document
CN115981573B (en) Data management method, electronic device and computer readable and writable storage medium
CN118170302A (en) Man-machine interaction method, electronic equipment and storage medium
CN114501389B (en) Mobile terminal, network sharing method and storage medium
CN117950767A (en) Content sharing method, system, electronic device and medium
CN116055627A (en) A screen off control method, electronic device and storage medium
CN113760164A (en) Display device and its response method to control operation
CN116708647B (en) Notification message reply method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination