CN108536540B - Method and device for acquiring mouse message of desktop icon - Google Patents

Method and device for acquiring mouse message of desktop icon Download PDF

Info

Publication number
CN108536540B
CN108536540B CN201710116282.5A CN201710116282A CN108536540B CN 108536540 B CN108536540 B CN 108536540B CN 201710116282 A CN201710116282 A CN 201710116282A CN 108536540 B CN108536540 B CN 108536540B
Authority
CN
China
Prior art keywords
desktop
icon
message
window
mouse
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.)
Active
Application number
CN201710116282.5A
Other languages
Chinese (zh)
Other versions
CN108536540A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710116282.5A priority Critical patent/CN108536540B/en
Publication of CN108536540A publication Critical patent/CN108536540A/en
Application granted granted Critical
Publication of CN108536540B publication Critical patent/CN108536540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • 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/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons

Landscapes

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

Abstract

The invention discloses a method and a device for acquiring mouse messages of desktop icons, and belongs to the technical field of terminals. The method comprises the following steps: acquiring a mouse message aiming at a desktop icon generated in the desktop window through the desktop window, wherein the desktop icon is any desktop icon displayed by the desktop window, and a covering layer window is not covered on the desktop icon; sending the mouse message to a parent window of the desktop window through the desktop window so that the parent window can respond to the mouse message conveniently; and when the parent window receives the mouse message, the injection component in the parent window sends the mouse message to the application corresponding to the desktop icon, so that the application can acquire the mouse message conveniently. The invention avoids the problem that the desktop window loses the mouse message when the overlay window forwards the mouse message to the desktop window, and improves the success rate of the desktop window responding to the mouse operation.

Description

Method and device for acquiring mouse message of desktop icon
Technical Field
The invention relates to the technical field of terminals, in particular to a method and a device for acquiring mouse messages of desktop icons.
Background
The desktop window is a window in which the terminal directly interacts with the user, and includes various desktop icons, such as application icons, file icons, and the like, and the user can control applications or files corresponding to the desktop icons by performing mouse operation on the desktop icons. In the process, various mouse messages are generated in the desktop window, such as click messages, double click messages, moving messages and the like of the mouse. Moreover, in order to facilitate a user to intuitively obtain notification messages of an application from a desktop window without opening a related application, when the user moves a mouse pointer to a desktop icon of an application, the application needs to be able to automatically display notification messages (tips) of the application beside the desktop icon of the application, and therefore the application is required to be able to timely obtain the mouse messages of the desktop icon.
However, in the current Windows operating system, there is no communication interface between the desktop window and the application corresponding to the desktop icon, so the application cannot obtain the mouse message corresponding to the desktop icon from the desktop window. Therefore, in the related art, a cover layer window can be created for each desktop icon and covered on the corresponding desktop icon to serve as a communication interface between the desktop window and the application, so that when a mouse pointer moves to a certain desktop icon, a mouse message aiming at the desktop icon can be intercepted by the cover layer window on the desktop icon, and then the mouse message is sent to the application corresponding to the desktop icon through the cover layer window. Meanwhile, the overlay window also needs to forward the mouse message of the desktop icon to the desktop window, so that the desktop window responds to the mouse message by calling the parent window of the desktop window. Specifically, after receiving the mouse message forwarded by the cover window, the desktop window sends the mouse message to the parent window, the parent window sends a response instruction to the desktop window based on the mouse message, and the desktop window executes an operation corresponding to the mouse message according to the response instruction.
In the method, although the application can obtain the mouse message corresponding to the desktop icon through the overlay window, in the process that the overlay window forwards the mouse message of the desktop icon to the desktop window, a situation that the mouse message is unsuccessfully forwarded may occur, so that the desktop window loses the mouse message, and the desktop window cannot respond to the mouse operation.
Disclosure of Invention
In order to solve the problem that mouse messages are easily lost in a desktop window in the related art, the embodiment of the invention provides a method and a device for acquiring the mouse messages of a desktop icon. The technical scheme is as follows:
in one aspect, a method for acquiring a mouse message of a desktop icon is provided, where the method includes:
acquiring a mouse message aiming at a desktop icon generated in a desktop window through the desktop window, wherein the desktop icon is any desktop icon displayed by the desktop window, and a covering window is not covered on the desktop icon;
sending the mouse message to a parent window of the desktop window through the desktop window so that the parent window can respond to the mouse message conveniently;
and when the parent window receives the mouse message, sending the mouse message to an application corresponding to the desktop icon through an injection component in the parent window so that the application can acquire the mouse message conveniently.
In another aspect, an apparatus for acquiring a mouse message of a desktop icon is provided, the apparatus including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a mouse message aiming at a desktop icon generated in a desktop window through the desktop window, the desktop icon is any desktop icon displayed by the desktop window, and the desktop icon is not covered with a covering window;
the first sending module is used for sending the mouse message to a parent window of the desktop window through the desktop window so as to facilitate the parent window to respond to the mouse message;
and the second sending module is used for sending the mouse message to the application corresponding to the desktop icon through the injection component in the parent window when the parent window receives the mouse message, so that the application can obtain the mouse message conveniently.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the mouse message aiming at the desktop icon generated in the desktop window can be directly acquired through the desktop window so as to facilitate the parent window to respond, the mouse message is not required to be acquired through the overlay window and forwarded to the desktop window, and then the desktop window is sent to the parent window of the desktop window, and when the parent window receives the mouse message sent by the desktop window, the mouse message can be sent to the application corresponding to the desktop icon through the injection component in the parent window so as to facilitate the application to acquire the mouse message, so that the problem that the mouse message is lost when the mouse message is forwarded to the desktop window through the overlay window can be avoided on the premise that the application can acquire the mouse message, and the success rate of the desktop window responding to the mouse operation is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1A is a flowchart of a method for acquiring a mouse message of a desktop icon according to an embodiment of the present invention;
fig. 1B is a schematic diagram of a desktop icon display notification message according to an embodiment of the present invention;
fig. 1C is a schematic diagram illustrating a redrawing of a desktop icon according to an embodiment of the present invention;
FIG. 1D is a schematic diagram of a desktop icon according to an embodiment of the present invention;
fig. 1E is a schematic diagram of an implementation environment of a method for acquiring a mouse message of a desktop icon according to an embodiment of the present invention;
fig. 1F is a schematic diagram of an implementation environment of another method for obtaining a mouse message of a desktop icon according to an embodiment of the present invention;
FIG. 2 is a block diagram of a device for obtaining a mouse message of a desktop icon according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Before explaining the embodiments of the present invention in detail, the environment in which the embodiments of the present invention are implemented will be described. The method provided by the embodiment of the invention is applied to a desktop window of a terminal, the terminal can be a Computer, a smart phone, a tablet Computer, a notebook Computer, a super-mobile Personal Computer (UMPC), a netbook, a Personal Digital Assistant (PDA) and the like, and the embodiment of the invention does not limit the terminal. That is, the desktop window may be a desktop window of a fixed terminal such as a computer, or a desktop window of a mobile terminal such as a mobile phone, which is not limited in the embodiment of the present invention.
It should be noted that the desktop window may be displayed based on an operating system of the terminal, where the operating system may be a computer operating system such as a Windows operating system, a Unix operating system, a Linux operating system, a Mac OS operating system, and the like, or a mobile Phone operating system such as an IOS operating system, an android operating system, a Windows Phone operating system, and the like, which is not limited in the embodiment of the present invention.
In practical application, the method according to the embodiment of the present invention may be implemented by adding a code to an operating system of the terminal.
Fig. 1A is a flowchart of a method for acquiring a mouse message of a desktop icon according to an embodiment of the present invention, where the method is used in a terminal. Referring to fig. 1A, the method includes:
step 101: the method comprises the steps of obtaining mouse messages aiming at desktop icons generated in a desktop window through the desktop window, wherein the desktop icons are any desktop icons displayed by the desktop window, and covering layer windows are not covered on the desktop icons.
That is, in the embodiment of the present invention, it is not necessary to cover a overlay window on a desktop icon, so that the desktop window can directly obtain a mouse message generated therein for the desktop icon without forwarding through the overlay window, and thus, a situation that the desktop window loses the mouse message does not occur, and thus, reliability of obtaining the mouse message by the desktop window is improved.
The desktop window is a graphical user interface which is displayed by the terminal and can be directly interacted with a user, is mainly used for displaying desktop icons, task bars and the like, and specifically can be a window with a class name of SysListView32 in a Windows operating system.
The desktop icon refers to an icon of a file or an application displayed on a desktop window. For example, the file icon may be a folder icon, a document icon, an audio-video icon, or the like; the application icon may be a game application icon, an instant messaging application icon, an audio/video application icon, a news application icon, a management application icon, a payment application icon, or the like, and the desktop icon is not specifically limited in the embodiment of the present invention. For convenience of explanation, the application icon will be taken as a game application icon as an example.
The mouse message of the desktop icon may include a click message, a double click message, a Hover state message, and the like of the mouse for the desktop icon, and the Hover state message refers to a message generated when a mouse pointer moves onto the desktop icon. The click messages also include left mouse click messages and right mouse click messages.
In practical applications, the mouse message of the desktop icon can be generated by the user through mouse operation. For example, the Hover state message of the desktop icon may be generated by a user moving a mouse pointer to a certain desktop icon by operating a mouse, and the click message of the desktop icon may be generated by clicking a left or right mouse button after the user moves the mouse pointer to a certain desktop icon by operating the mouse.
Step 102: and sending the mouse message to a parent window of the desktop window through the desktop window so that the parent window responds to the mouse message.
The parent window of the desktop window refers to a previous-level window of the desktop window, specifically, a window with a class name of SHELLDLL _ DefView in a Windows operating system, and is mainly used for responding to a notification message sent by the desktop window.
Wherein, the process of the parent window responding to the mouse message may include: and the parent window sends a response instruction to the desktop window based on the mouse message, wherein the response instruction is used for instructing the desktop window to execute the operation corresponding to the mouse message.
In an operating system of a terminal, such as a Windows operating system, after a desktop window receives a mouse message, the mouse message needs to be sent to a parent window of the desktop window, and the parent window intervenes. That is, the parent window may determine whether to perform an intervention process on the mouse message, further process the mouse message when the intervention process is required, and return a first response instruction to the desktop window, where the first response instruction is used to instruct the desktop window not to perform any operation; and returning a second response instruction to the desktop window when the mouse message does not need to be subjected to intervention processing, wherein the second response instruction is used for indicating the desktop window to execute default operation specified by an operating system and corresponding to the mouse message.
For example, if the mouse message is a double-click message for a desktop icon of the application a, and the desktop window receives a second response instruction returned by the parent window based on the mouse message, the desktop window automatically executes an operation of opening the application a according to the second response instruction.
Step 103: and when the parent window receives the mouse message, the injection component in the parent window sends the mouse message to the application corresponding to the desktop icon, so that the application can acquire the mouse message conveniently.
The injection component is obtained by injecting in the parent window in advance, and is used for monitoring the mouse message of the desktop icon received in the parent window and sending the mouse message to the application corresponding to the desktop icon. That is, the injection component is a communication interface between a parent window of the desktop window and the application, and can send the mouse message of the desktop icon received in the parent window to the corresponding application, and accordingly, the application can acquire the mouse message of the desktop icon through the injection component.
In order to implement the method, the injection component needs to be injected into the parent window of the resource manager process in advance when the resource manager is started, so that the injected injection component can be directly called by the subsequent parent window. In colloquial, injecting an injection component into the parent window means that the injection component which is pre-programmed by a technician is loaded into the parent window for subsequent direct invocation. In practical applications, there are various injection manners for injecting the injection Component into the parent window, such as injection via a COM (Component Object Model) mechanism, injection via creating a remote thread, or injection via creating a hook program, etc.
In a possible implementation manner, before the mouse message is sent to the application corresponding to the desktop icon through the injection component in the parent window, when the resource manager is started, the injection component may be injected into the parent window through a COM mechanism. Taking Windows operating system as an example, the specific technical code implementation process may be: when the explorer (resource manager) is started, the injection component is injected into the explorer process through a COM mechanism, and takes over the window process of SHELLDLL _ DefView (the parent window of a desktop window), and monitors LVN _ HOTTRACK (mouse message).
The COM is an object-oriented programming mode, defines the behavior mode of an object in a single application program or among a plurality of application programs, and is a software component technology for interaction between a web page server and a client, and between a gain set and Office series software by Microsoft. The COM mechanism is a way of injection through registry injection, and an injection component programmed in a COM programming mode can be injected into the parent window.
After the application acquires the mouse message of the desktop icon, the application can execute corresponding service according to the mouse message. Therefore, the application can be ensured to acquire the mouse message, the desktop window can be ensured not to lose the mouse message, and the stability of the operating system is improved.
In a possible implementation manner, after the application acquires the mouse message of the desktop icon, when it is determined that the received mouse message is used to indicate that the mouse pointer has currently moved to the desktop icon of the application, the application may acquire a target notification message to be displayed, and display the target notification message beside the desktop icon through a corresponding processing mechanism.
For example, the desktop icon shown in fig. 1B is a desktop icon of a QQ game application, and when a user moves a mouse pointer onto the desktop icon, the QQ game application may receive a Hover state message of the desktop icon through the injection component, and may pop up a notification message shown in fig. 1B beside the desktop icon according to the Hover state message.
By the method, the user can directly tell the current state of the application on the desktop icon without opening the application, and meanwhile, the behavior of the user on the icon (such as single mouse, double click, entering/exiting of the desktop icon) can be monitored, so that corresponding interactive experience is established with the user, and therefore the user can conveniently and visually obtain the application information, and the application can conveniently display the own information to the user side.
It should be noted that the mouse message of the desktop icon refers to a mouse message generated in an area where the desktop icon is located in the desktop window, and besides the mouse message of the desktop icon, the desktop window may further obtain mouse information generated in other areas except the area where the desktop icon is located, for example, mouse information generated in a blank area of the desktop window. That is, all the mouse messages generated by the desktop window can be directly obtained by the desktop window and can be sent to the parent window through the desktop window. And the mouse message sent to the parent window will be received by the injection component in the parent window first.
In practice, the injection component may include a message interception component and a mouse messaging component. The message interception component is used for receiving all mouse messages sent by the desktop window to the parent window and extracting the mouse messages of the desktop icon from the mouse messages. The mouse message sending component is a communication component between the injection component and the application, and the mouse message of the desktop icon extracted by the message intercepting component can be sent to the corresponding application through the mouse message sending component. In addition, the mouse message sending component is also provided with a filter layer, and the filter layer can determine the application corresponding to the mouse message of the desktop icon to be sent, namely determine the application to which the mouse message of the desktop icon is sent.
In addition, the application layer of the application may include a mouse message receiving component and a business component. The mouse message receiving component is a communication component between the application layer of the application and the injection component, can perform message communication with the mouse message sending component, and receives the mouse message of the desktop icon sent by the mouse message sending component. The service component is a component for processing specific services by an application layer of the application, and can process corresponding services according to the received mouse message, for example, tips can be displayed according to the received Hover state mouse message.
Further, the injection component can also implement an animation effect of the desktop icon.
The specific method comprises the following steps: when the desktop icon is determined to be required to be redrawn based on the preset icon dynamic effect rule of the application, sending an icon updating request to the desktop window through the injection assembly, wherein the icon updating request carries the identifier of the application and is used for indicating that the desktop icon is updated to be a dynamic effect icon which accords with the preset icon dynamic effect rule; sending a drawing message of the desktop icon to the parent window through the desktop window based on the icon updating request, wherein the drawing message is used for indicating redrawing of the desktop icon; and when the parent window receives the drawing message, redrawing the desktop icon through the injection component based on the drawing message so as to realize the animation effect of the desktop icon.
By the method, the animation effect can be added to a single desktop icon, and a user is attracted to click, so that the user quantity of the application can be increased.
Wherein the icon update request is further used to instruct the desktop window to send a drawing message to the parent window. In the current terminal operating system, when a desktop icon of a desktop window needs to be redrawn, the desktop window sends a drawing message (NM _ custodraw) to a parent window, and the parent window redraws based on the drawing message, that is, the redrawing of the desktop icon can be triggered only when the desktop window sends the drawing message. Accordingly, when the application determines that the desktop icon needs to be redrawn, an icon update request can be sent to the desktop window by the injection component such that the desktop window sends a drawing message to the parent window based on the icon update request, thereby triggering redrawing of the desktop icon.
The preset icon dynamic effect rule of the application is a rule which is preset for the application and used for drawing the dynamic effect desktop icon of the application in the desktop window, and the preset icon dynamic effect rule of the application can be preset by the server of the application, can be set by the default of the terminal, and can also be set by the user.
It should be noted that the preset icon animation rule applied may include a redrawing timing and an icon animation effect of the corresponding desktop icon, where the redrawing timing is used to indicate when the desktop icon needs to be redrawn, and the icon animation effect is used to indicate what kind of animation icon should be redrawn in the desktop window when the desktop icon needs to be redrawn.
In practical applications, the redrawing timing may be set based on the installation time of the application, the running time of the application, an unread message of the application, a mouse message of a desktop icon of the application, or the like, and may also be set periodically or randomly, which is not limited in the embodiment of the present invention.
For example, if the setting is performed based on the installation time of the application, the redrawing time may be the time when the application icon needs to be displayed on the desktop window after the application installation is completed, the preset time duration after the application installation is completed, or the time when the application icon needs to be displayed on the desktop window again after the application update is completed.
If the redrawing timing is set based on the running time of the application, the redrawing timing may be when the application starts running, or after the application runs for a preset time period, or the like.
If the unread messages are set based on the application, the redrawing opportunity can be when the application has unread messages, or when the number of the unread messages of the application is greater than the preset number, and the like.
If the mouse message of the desktop icon based on the application is set, the redrawing time can be when the specified mouse message of the desktop icon is detected, and the specified mouse message can be a Hover state mouse message or a click message and the like.
If the redrawing timing is set periodically, the redrawing timing may be set every preset time period, and the like. For example, the preset time period may be 1 minute, 1 hour, or the like.
Based on the redrawing time, in a specific embodiment, the determining, by the application, that the desktop icon needs to be redrawn according to the preset icon activity rule may include any one of the following manners:
the first implementation mode comprises the following steps: and when the application installation is completed, determining that the desktop icon needs to be redrawn. That is, when the user initializes the installation application, it may be determined that the default desktop icon needs to be redrawn to show the dynamic effect icon to attract the user to click.
The second implementation mode comprises the following steps: and when the number of the unread messages of the application is greater than the preset number, determining that the desktop icon needs to be redrawn. That is, when the unread messages exist or the unread messages are too many, it is determined that the default desktop icon needs to be redrawn, so that the user is prompted that the unread messages need to be viewed currently by displaying the dynamic effect icon.
The preset number may be set by an application default or by a user, which is not limited in the embodiment of the present invention. For example, the predetermined number may be 1, 10, 20, or the like.
The third implementation mode comprises the following steps: when the application receives the mouse message sent by the injection component and the mouse message is used for indicating that a mouse pointer is moved to the desktop icon currently, the desktop icon is determined to need to be redrawn. That is, when the user moves the mouse pointer to the desktop icon, it is determined that the default desktop icon needs to be redrawn, so as to improve interactivity and enrich user experience.
The fourth implementation mode comprises the following steps: and determining that the desktop icon needs to be redrawn every other preset time. That is, the desktop icon may be periodically redrawn, so that the animation icon may be periodically displayed.
The preset duration may be preset by the server of the application, or may be set by default by the terminal, or may be set by the user, which is not limited in the embodiment of the present invention. For example, if the preset duration is 1 hour, it may be determined that the desktop icon needs to be redrawn every 1 hour.
It should be noted that, the embodiments of the present invention are only described by taking the several redrawing timings as examples, and in practical applications, other redrawing timings of applications may also be set according to specific needs, which is not limited in the embodiments of the present invention.
In practical applications, the default desktop icon of an application is usually a uniform static icon, so that when a user does not need to use the application, the user does not pay attention to the desktop icon of the application. In the embodiment of the invention, the dynamic effect icons can be displayed to the user by presetting the icon animation effect in the icon dynamic effect rule, so that the attention of the user is attracted, and the user is attracted to click.
The icon animation effect can be that the original desktop icon is entirely replaced by a preset animation icon, part of icon components of the original desktop icon are displayed with animation effect, a mark or an animation component is added on the original desktop icon, and the like.
Furthermore, the preset icon animation rules can also comprise various different types of icon animation effects, and different redrawing opportunities can correspond to the different types of icon animation effects.
For different types of icon animation effects included in the preset icon animation rule, the icon update request may also be used to instruct the desktop window to send different drawing messages to the parent window, that is, the different types of icon animation effects may correspond to the different drawing messages, so that the injection component may redraw the desktop icons with different animation effects according to the different drawing messages.
For example, when it is determined that the desktop icon needs to be redrawn based on the preset icon animation rule of the application and needs to be redrawn into the first type animation icon, the desktop icon update request is further used for instructing the desktop window to send a first drawing message to the parent window, and when the parent window receives the first drawing message, the desktop icon can be redrawn into the first type animation icon through the injection component based on the first drawing message; when the desktop icon is determined to need to be redrawn based on the preset icon dynamic effect rule of the application and needs to be redrawn into a second type dynamic effect icon, the desktop icon updating request is also used for indicating the desktop window to send a second drawing message to the parent window, and the desktop icon can be redrawn into the second type dynamic effect icon through the injection component based on the second drawing message when the parent window receives the second drawing message.
In a particular embodiment, redrawing the desktop icon by the injection component based on the draw message may include any of the following:
the first mode is as follows: and when the drawing message is the first drawing message, drawing a preset animation icon at the position of the desktop icon through the injection component.
That is, the icon animation effect corresponding to the first drawing message is to replace the original desktop icon as a whole with a preset animation icon. The preset animation icon may be set by the server of the application, may also be set by default by the terminal, and may also be set by the user, which is not limited in the embodiment of the present invention.
In the process of redrawing the desktop icon, the injection component needs to acquire the preset animation icon first and then redraws the preset animation icon based on the acquired preset animation icon. In practical application, the injection component may directly obtain the preset animation icon from the server of the application, or obtain the preset animation icon currently set by the user, or obtain the preset animation icon stored in the terminal. The preset animation icon stored in the terminal can be obtained by the terminal from the server of the application in advance, or preset by a user, or can be obtained by default setting of the terminal.
For example, the preset animation icon may be a GIF (Graphics Interchange Format) animation, so that the desktop window may carousel animation frames in the GIF animation at the position of the desktop icon to achieve an animation effect.
The second mode is as follows: and when the drawing message is a second drawing message, drawing a preset prompt mark at the preset position of the desktop icon through the injection component.
That is, the icon animation effect corresponding to the second drawing message is to add a preset prompt mark on the original desktop icon. The preset prompting mark can be used for prompting the user that the application has an unread message, or prompting the user that the application has an added function, and the like.
The preset position and the preset prompt mark of the desktop icon can be set by an application default or by a user. For example, the preset prompting mark may be a dot, a frame, an arrow, and the like, and the prompting mark of the dot, the frame, the arrow, and the like may also be displayed in a color form.
For example, if the preset position is the upper right corner of the desktop icon and the preset prompt mark is a dot, a small dot may be added to the upper right corner of the original desktop icon when the redrawing is completed, as shown in fig. 1C.
The third mode is as follows: and when the drawing message is a third drawing message, drawing a preset dynamic effect component at the position of the designated icon component of the desktop icon through the injection component.
That is, the icon animation effect corresponding to the third drawing message is to replace the designated icon component of the original desktop icon with a preset animation component, so that the designated icon component is displayed with the animation effect.
In practical applications, the desktop icon is usually formed by combining or overlapping a plurality of icon components. The designated icon component may be any one or more of a plurality of icon components that make up the desktop icon. For example, referring to fig. 1D, the desktop icon a is composed of a penguin component 1 and a slider component 2 under the penguin component to indicate that a penguin foot-operated slider is surfing, and the default slider component is typically a static icon component. The designated icon component may be a slider component 2.
Wherein, the animation effect of the preset animation effect component can be that the designated icon component moves in a plurality of positions, repeatedly shrinks and enlarges, rotates and the like.
Referring to fig. 1D, taking the designated icon component as the slider component 2 and the preset dynamic effect component as the dynamic effect slider component as an example, when the drawing message is the third drawing message, the dynamic effect slider component can be drawn at the position of the slider component 2 of the desktop icon through the injection component. The dynamic skateboard component can be an animation effect that the skateboard component floats up and down, so that the dynamics of penguins surfing through the skateboard can be vividly displayed to attract the attention of users.
The fourth mode is that: and when the drawing message is a fourth drawing message, drawing a preset dynamic effect component on the desktop icon through the injection component.
That is, the icon animation effect corresponding to the fourth drawing message is to add a preset animation element to the original desktop icon. For example, one or more moving star components, or rotating snowflake components, etc. may be added to the original desktop icon.
By the method, the original style of the desktop icon can be changed, and the application can be presented to the user in the selectable dynamic effect style, so that the current state of the application can be better shown, the experience effect is enriched, and the interactivity is improved.
Further, any desktop icon on the desktop window can be dynamically applied through the dynamic effect setting switch. That is, the terminal can also select a plurality of desktop icons displayed in the desktop window based on the dynamic effect setting switch, and redraw the selected desktop icons according to the correspondingly applied preset icon dynamic effect rules.
In a first implementation manner, the terminal may provide a dynamic effect setting interface, where the dynamic effect setting interface includes application identifiers corresponding to a plurality of desktop icons displayed on the desktop window, and each application identifier corresponds to one dynamic effect setting switch. The dynamic effect setting switch corresponding to each application identifier is used for turning on or turning off the dynamic effect redrawing function of the desktop icon corresponding to the application identifier.
When the dynamic effect setting switch is turned on, the dynamic effect redrawing function of the desktop icon is turned on, so that the desktop icon can be redrawn through the injection assembly based on the preset icon dynamic effect rule of the application. When the dynamic effect setting switch is turned off, the dynamic effect redrawing function of the desktop icon is turned off, so that only the default desktop icon can be displayed on the desktop window, and the dynamic effect cannot be realized.
Through this move and imitate the setting interface, can will want to realize moving the application of imitating the redrawing function and move and imitate the setting switch and open, will not want to realize moving the application of imitating the redrawing function and move and imitate the setting switch and close to improve user experience.
In a second implementation manner, the terminal may provide a dynamic effect setting switch for each desktop icon of the desktop window, and the dynamic effect redrawing function of the desktop icon may be conveniently turned on or turned off through the dynamic effect setting switch.
The dynamic effect setting switch of each desktop icon can be triggered and displayed by a user through a specified operation on the desktop icon, and specifically can be displayed at a corresponding position of the desktop icon. For example, a user may operate a right mouse button or the like to trigger a dynamic effect setting switch of the desktop icon, and the dynamic effect setting switch may be displayed beside the desktop icon.
It should be noted that, the embodiment of the present invention is only described by taking the icon animation effects in the above several forms as examples, and in practical applications, icon animation effects in other forms may also be set according to specific needs, which is not limited in the embodiment of the present invention.
It should be further noted that the redrawing timings and the icon animation effects may be combined at will, so as to redraw different icon animation effects at different redrawing timings. For example, when the number of unread messages is greater than a preset number, the application may determine that the desktop icon needs to be redrawn, and draw a preset prompt mark at a preset position of the desktop icon through the injection component, so as to prompt the user that the application has unread messages to be viewed through the preset prompt mark.
In a specific embodiment, referring to fig. 1E, fig. 1E is a schematic diagram of an implementation environment of a method for obtaining a mouse message of a desktop icon according to an embodiment of the present invention, where the implementation environment includes a resource manager process and an application layer.
Wherein, the resource manager process comprises an injection component 10, the injection component 10 is located in a parent window of the desktop window, and comprises a message interception component 11 and a mouse message sending component 12. The message interception component 11 is used for receiving all mouse messages sent by the desktop window to the parent window and extracting the mouse messages of the desktop icon from the mouse messages. The mouse message sending component 12 is a communication component between the injection component and the application layer, and the mouse message of the desktop icon extracted by the message intercepting component 11 can be sent to the application layer through the mouse message sending component 12.
Wherein the application layer comprises a service component 21 and a mouse message receiving component 22 of the application layer. The mouse message receiving component 22 is a communication component between the application layer and the injection component 10, and can communicate with the mouse message sending component 12 to receive the mouse message of the desktop icon sent by the mouse message sending component 12. The service component 21 of the application layer is a component for processing a specific service by the application layer, and can process a corresponding service according to a received mouse message.
It should be noted that the application layer may be an application layer of any application installed in the terminal, and the injection component 10 may send the received mouse message of the desktop icon to the application layer of the corresponding application.
For example, in practical applications, based on the above implementation environment, when the message interception component 11 receives a notification message sent to the parent window, it can determine whether the notification message is a mouse message of a desktop icon, and when the notification message is a mouse message of a desktop icon, the mouse message can be sent to the mouse message receiving component 22 of the application layer of the corresponding application through the mouse message sending component 12. When the service component 21 of the application layer acquires the mouse message through the mouse message receiving component 22, the corresponding service can be processed according to the received mouse message. For example, the service component 21 of the application layer may determine whether the mouse message is a Hover state mouse message of the desktop icon, and when the mouse message is determined to be the Hover state mouse message of the desktop icon, may obtain notification messages (tips) to be displayed, and call a related display interface to display the notification messages beside the desktop icon.
In addition, in addition to sending the mouse message of the desktop icon to the application layer, the injection component 10 may respond to the mouse message of the desktop icon according to the original operation logic of the parent window. For example, after receiving the mouse message of the desktop icon, the injection component 10 may instruct the desktop window to perform system default processing, that is, send a response instruction to the desktop window through the message interception component 11, and instruct the desktop window to perform a system default operation corresponding to the mouse message.
In another specific embodiment, referring to fig. 1F, fig. 1F is a schematic diagram of an implementation environment of another method for obtaining a mouse message of a desktop icon according to an embodiment of the present invention, where the implementation environment includes a resource manager process and an application layer.
Wherein, the resource manager process comprises an injection component 10, the injection component 10 is located in a parent window of the desktop window, and comprises a message interception component 11, a mouse message sending component 12 and an icon self-drawing component 13. The message interception component 11 is configured to receive a notification message sent by a desktop window to a parent window of the desktop window, and extract a mouse message and a drawing message therefrom. For a mouse message, the message interception component 11 may send the mouse message to the application layer through the mouse message sending component 12; for drawn messages, the message interception component 11 can send the drawn message to the icon self-drawing component 13. The icon self-drawing component 13 is used to redraw the desktop icon based on the drawn message.
Wherein, the application layer comprises a service component 21, a mouse message receiving component 22 and an icon action component 23 of the application layer. The mouse message receiving component 22 can be in message communication with the mouse messaging component 12 and the icon animation component 23 can be in message communication with the icon self-drawing component 13. Therefore, the application layer can monitor the mouse message of the desktop icon in real time and control the desktop icon drawing process to change the drawing parameters to achieve different dynamic effects.
In practical applications, the injection component 10 may send the mouse message of the desktop icon to the application layer, and the specific implementation process may refer to the related description of the embodiment in fig. 1E, which is not described herein again. Unlike the embodiment of FIG. 1E, the implementation environment shown in FIG. 1F may also redraw desktop icons.
Specifically, based on the implementation environment, the service component 21 of the application layer may send the redrawing parameters corresponding to the icon animation effect in the preset icon animation rule to the icon self-drawing component 13 through the icon animation component 23 in advance, so that the icon self-drawing component 13 stores the redrawing parameters. Then, when the service component 21 of the application layer determines that the desktop icon needs to be redrawn based on the preset icon dynamic effect rule, the service component notifies the icon self-drawing component 13 through the icon dynamic effect component 23, so that the icon self-drawing component 13 sends an icon updating request to the desktop window through the message interception component 11, and when the icon self-drawing component 13 receives a redrawing message sent by the desktop window based on the icon updating request, the stored redrawing parameter can be obtained based on the redrawing message, and the desktop icon is redrawn based on the redrawing parameter, thereby realizing the animation effect of the desktop icon.
In addition, for other notification messages that the injection component 10 does not need to intervene, the injection component 10 may further instruct the desktop window to perform system default processing, i.e., send a response instruction to the desktop window through the message interception component, and instruct the desktop window to perform system default operation.
In the embodiment of the invention, the mouse message aiming at the desktop icon generated in the desktop window can be directly acquired through the desktop window so as to facilitate the parent window to respond, the mouse message is not required to be acquired through the overlay window and forwarded to the desktop window, and then the desktop window is sent to the parent window of the desktop window, and when the parent window receives the mouse message sent by the desktop window, the mouse message can be sent to the application corresponding to the desktop icon through the injection component in the parent window so as to facilitate the application to acquire the mouse message, so that the problem that the mouse message is lost when the mouse message is forwarded to the desktop window through the overlay window can be avoided on the premise that the application can acquire the mouse message, and the success rate of the desktop window responding to the mouse operation is improved.
Fig. 2 is a block diagram of a device for acquiring a mouse message of a desktop icon, which may be a terminal according to an embodiment of the present invention, and referring to fig. 2, the device includes:
an obtaining module 201, configured to perform step 101 of the foregoing embodiment;
a first sending module 202, configured to perform step 102 of the foregoing embodiment;
a second sending module 203, configured to execute step 103 of the foregoing embodiment.
Optionally, the apparatus further comprises:
and the injection module is used for injecting the injection component into the parent window through a Component Object Model (COM) mechanism when the resource manager is started.
Optionally, the apparatus further comprises:
a third sending module, configured to send an icon update request to the desktop window through the injection component when it is determined that the desktop icon needs to be redrawn based on a preset icon dynamic effect rule of the application, where the icon update request carries an identifier of the application and is used to indicate that the desktop icon is updated to a dynamic effect icon that meets the preset icon dynamic effect rule;
a fourth sending module, configured to send, based on the icon update request, a drawing message of the desktop icon to the parent window through the desktop window, where the drawing message is used to instruct redrawing of the desktop icon;
and the redrawing module is used for redrawing the desktop icon through the injection component based on the drawing message when the parent window receives the drawing message so as to realize the animation effect of the desktop icon.
Optionally, the apparatus further comprises a determining module configured to perform any of the following:
when the application is installed, determining that the desktop icon needs to be redrawn;
when the number of the unread messages of the application is larger than the preset number, determining that the desktop icon needs to be redrawn;
when the application receives the mouse message sent by the injection component and the mouse message is used for indicating that a mouse pointer is moved to the desktop icon currently, the desktop icon is determined to need to be redrawn.
Optionally, the redraw module is configured to perform any one of the following:
when the drawing message is a first drawing message, drawing a preset animation icon at the position of the desktop icon through the injection component;
and when the drawing message is a second drawing message, drawing a preset prompt mark at the preset position of the desktop icon through the injection component.
In the embodiment of the invention, the mouse message acquisition device of the desktop icon can directly acquire the mouse message aiming at the desktop icon generated in the desktop window through the desktop window so as to facilitate the parent window to respond, and does not need to acquire the mouse message through the cover window and forward the mouse message to the desktop window, and then the mouse message is sent to the parent window of the desktop window by the desktop window, and when the parent window receives the mouse message sent by the desktop window, the mouse message can be sent to the application corresponding to the desktop icon through the injection component in the parent window so as to facilitate the application to acquire the mouse message, so that the problem that the mouse message is lost when the mouse message is forwarded to the desktop window through the cover window can be avoided on the premise of ensuring that the application can acquire the mouse message, and the success rate of the desktop window to respond to the mouse operation is improved.
It should be noted that: the mouse message acquiring device for a desktop icon provided in the above embodiment is only illustrated by the division of the above functional modules when acquiring the mouse message of the desktop icon, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the device for acquiring a mouse message of a desktop icon and the method for acquiring a mouse message of a desktop icon provided in the embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention. Referring to fig. 3, the terminal 300 may include components such as a communication unit 310, a memory 320 including one or more computer-readable storage media, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a WIFI (Wireless Fidelity) module 370, a processor 380 including one or more processing cores, and a power supply 390. Those skilled in the art will appreciate that the terminal structure shown in fig. 3 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the communication unit 310 may be used for receiving and transmitting information or signals during a call, and the communication unit 310 may be an RF (Radio Frequency) circuit, a router, a modem, or other network communication devices. In particular, when the communication unit 310 is an RF circuit, downlink information of the base station is received and then processed by the one or more processors 380; in addition, data relating to uplink is transmitted to the base station. Generally, the RF circuit as a communication unit includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the communication unit 310 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like. The memory 320 may be used to store software programs and modules, and the processor 380 executes various functional applications and data processing by operating the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 300, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 320 may also include a memory controller to provide the processor 380 and the input unit 330 with access to the memory 320.
The input unit 330 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Preferably, the input unit 330 may include a touch-sensitive surface 331 as well as other input devices 332. The touch-sensitive surface 331, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 331 (e.g., operations by a user on or near the touch-sensitive surface 331 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 331 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch-sensitive surface 331 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 330 may comprise other input devices 332 in addition to the touch sensitive surface 331. Preferably, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal 300, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 331 may overlay display panel 341, and when touch-sensitive surface 331 detects a touch operation thereon or thereabout, communicate to processor 380 to determine the type of touch event, and processor 380 then provides a corresponding visual output on display panel 341 in accordance with the type of touch event. Although in FIG. 3, touch-sensitive surface 331 and display panel 341 are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 331 and display panel 341 may be integrated for input and output functions.
The terminal 300 may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. The light sensor may include an ambient light sensor that may adjust the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 341 and/or a backlight when the terminal 300 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 300, detailed descriptions thereof are omitted.
Audio circuitry 360, speaker 361, microphone 362 may provide an audio interface between a user and terminal 300. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is received by the audio circuit 360 and converted into audio data, which is then processed by the audio data output processor 380 and transmitted to, for example, another terminal via the communication unit 310, or the audio data is output to the memory 320 for further processing. The audio circuit 360 may also include an earbud jack to provide communication of a peripheral headset with the terminal 300.
In order to realize wireless communication, a wireless communication unit 370 may be configured on the terminal, and the wireless communication unit 370 may be a WIFI module. WIFI belongs to a short-distance wireless transmission technology, and the terminal 300 can help a user to send and receive e-mails, browse webpages, access streaming media, and the like through the wireless communication unit 370, and it provides wireless broadband internet access for the user. Although the wireless communication unit 370 is shown in the drawing, it is understood that it does not belong to the essential constitution of the terminal 300 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 380 is a control center of the terminal 300, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 300 and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby integrally monitoring the handset. Optionally, processor 380 may include one or more processing cores; preferably, the processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
The terminal 300 also includes a power supply 390 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 380 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 390 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 300 may further include a camera, a bluetooth module, etc., which will not be described herein.
In this embodiment, the terminal further includes one or more programs, the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs include instructions for executing the method according to the embodiment of fig. 1A in the embodiment of the present invention.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (11)

1. A method for acquiring mouse messages of desktop icons is characterized by comprising the following steps:
acquiring a mouse message aiming at a desktop icon generated in a desktop window through the desktop window, wherein the desktop icon is any desktop icon displayed by the desktop window, and a covering window is not covered on the desktop icon;
sending the mouse message to a parent window of the desktop window through the desktop window so that the parent window can respond to the mouse message conveniently;
when the parent window receives the mouse message, the injection component in the parent window sends the mouse message to the application corresponding to the desktop icon, so that the application can obtain the mouse message conveniently;
the injection component is a communication interface between the parent window and the application corresponding to the desktop icon, and comprises a message interception component and a mouse message sending component; the message interception component is used for receiving all mouse messages sent by the desktop window to the parent window and extracting the mouse messages of the desktop icon from all the mouse messages; the mouse message sending component is a communication component between the injection component and the application and is used for sending the extracted mouse message of the desktop icon to the application corresponding to the desktop icon, and the mouse message sending component is provided with a filter layer which is used for determining the application corresponding to the mouse message of the desktop icon to be sent.
2. The method of claim 1, wherein before sending the mouse message to the application corresponding to the desktop icon via the injection component in the parent window, further comprising:
when the resource manager starts, the injection component is injected into the parent window through a Component Object Model (COM) mechanism.
3. The method of claim 1 or 2, wherein the method further comprises:
when the desktop icon is determined to need to be redrawn based on the preset icon dynamic effect rule of the application, sending an icon updating request to the desktop window through the injection component, wherein the icon updating request carries the identifier of the application and is used for indicating that the desktop icon is updated to a dynamic effect icon which accords with the preset icon dynamic effect rule;
sending a drawing message of the desktop icon to the parent window through the desktop window based on the icon updating request, wherein the drawing message is used for indicating redrawing of the desktop icon;
and when the parent window receives the drawing message, redrawing the desktop icon through the injection component based on the drawing message so as to realize the animation effect of the desktop icon.
4. The method of claim 3, wherein the determining that the desktop icon needs to be redrawn based on the preset icon activity rule of the application comprises any one of:
when the application is installed, determining that the desktop icon needs to be redrawn;
when the number of the unread messages of the application is larger than a preset number, determining that the desktop icon needs to be redrawn;
and when the application receives the mouse message sent by the injection assembly and the mouse message is used for indicating that a mouse pointer is moved to the desktop icon currently, determining that the desktop icon needs to be redrawn.
5. The method of claim 3, wherein redrawing the desktop icon by the injection component based on the draw message comprises any of:
when the drawing message is a first drawing message, drawing a preset animation icon at the position of the desktop icon through the injection assembly;
and when the drawing message is a second drawing message, drawing a preset prompt mark at a preset position of the desktop icon through the injection assembly.
6. An apparatus for obtaining a mouse message of a desktop icon, the apparatus comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a mouse message aiming at a desktop icon generated in a desktop window through the desktop window, the desktop icon is any desktop icon displayed by the desktop window, and the desktop icon is not covered with a covering window;
the first sending module is used for sending the mouse message to a parent window of the desktop window through the desktop window so as to facilitate the parent window to respond to the mouse message;
the second sending module is used for sending the mouse message to the application corresponding to the desktop icon through the injection component in the parent window when the parent window receives the mouse message, so that the application can obtain the mouse message conveniently;
the injection component is a communication interface between the parent window and the application corresponding to the desktop icon, and comprises a message interception component and a mouse message sending component; the message interception component is used for receiving all mouse messages sent by the desktop window to the parent window and extracting the mouse messages of the desktop icon from all the mouse messages; the mouse message sending component is a communication component between the injection component and the application and is used for sending the extracted mouse message of the desktop icon to the application corresponding to the desktop icon, and the mouse message sending component is provided with a filter layer which is used for determining the application corresponding to the mouse message of the desktop icon to be sent.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the injection module is used for injecting the injection component into the parent window through a Component Object Model (COM) mechanism when the resource manager is started.
8. The apparatus of claim 6 or 7, wherein the apparatus further comprises:
a third sending module, configured to send an icon update request to the desktop window through the injection component when it is determined that the desktop icon needs to be redrawn based on the preset icon dynamic effect rule of the application, where the icon update request carries an identifier of the application and is used to indicate that the desktop icon is updated to a dynamic effect icon that meets the preset icon dynamic effect rule;
a fourth sending module, configured to send, based on the icon update request, a drawing message of the desktop icon to the parent window through the desktop window, where the drawing message is used to instruct redrawing of the desktop icon;
and the redrawing module is used for redrawing the desktop icon through the injection assembly based on the drawing message when the parent window receives the drawing message so as to realize the animation effect of the desktop icon.
9. The apparatus of claim 8, further comprising a determination module to perform any of the following:
when the application is installed, determining that the desktop icon needs to be redrawn;
when the number of the unread messages of the application is larger than a preset number, determining that the desktop icon needs to be redrawn;
and when the application receives the mouse message sent by the injection assembly and the mouse message is used for indicating that a mouse pointer is moved to the desktop icon currently, determining that the desktop icon needs to be redrawn.
10. The apparatus of claim 8, wherein the redraw module is to perform any one of the following:
when the drawing message is a first drawing message, drawing a preset animation icon at the position of the desktop icon through the injection assembly;
and when the drawing message is a second drawing message, drawing a preset prompt mark at a preset position of the desktop icon through the injection assembly.
11. A computer-readable storage medium, having stored therein at least one program code, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 5.
CN201710116282.5A 2017-03-01 2017-03-01 Method and device for acquiring mouse message of desktop icon Active CN108536540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710116282.5A CN108536540B (en) 2017-03-01 2017-03-01 Method and device for acquiring mouse message of desktop icon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710116282.5A CN108536540B (en) 2017-03-01 2017-03-01 Method and device for acquiring mouse message of desktop icon

Publications (2)

Publication Number Publication Date
CN108536540A CN108536540A (en) 2018-09-14
CN108536540B true CN108536540B (en) 2022-02-22

Family

ID=63488489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710116282.5A Active CN108536540B (en) 2017-03-01 2017-03-01 Method and device for acquiring mouse message of desktop icon

Country Status (1)

Country Link
CN (1) CN108536540B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799558A (en) * 2021-02-01 2021-05-14 联想(北京)有限公司 Information processing method, information processing device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257788A (en) * 2013-05-17 2013-08-21 北京暴风科技股份有限公司 Windows desktop dynamic icon forming method
CN103699381A (en) * 2013-12-20 2014-04-02 Tcl集团股份有限公司 Method and system for setting Widget based on Firefox OS (Operating System) platform
CN104021016A (en) * 2014-06-13 2014-09-03 北京奇虎科技有限公司 Method and browser for loading browser plug-in icons

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257788A (en) * 2013-05-17 2013-08-21 北京暴风科技股份有限公司 Windows desktop dynamic icon forming method
CN103699381A (en) * 2013-12-20 2014-04-02 Tcl集团股份有限公司 Method and system for setting Widget based on Firefox OS (Operating System) platform
CN104021016A (en) * 2014-06-13 2014-09-03 北京奇虎科技有限公司 Method and browser for loading browser plug-in icons

Also Published As

Publication number Publication date
CN108536540A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US10516640B2 (en) Group message updating and displaying method, apparatus, and terminal
CN108062190B (en) Application running state control method and mobile terminal
WO2016150331A1 (en) Method and device for operating game client
WO2018188289A1 (en) Information display method, apparatus, and terminal
WO2016169465A1 (en) Method, apparatus and system for displaying screen information
CN108549519B (en) Split screen processing method and device, storage medium and electronic equipment
CN108055408B (en) Application program control method and mobile terminal
WO2019080929A1 (en) Message prompting method and mobile terminal
WO2017129031A1 (en) Information acquisition method and device
US10474507B2 (en) Terminal application process management method and apparatus
CN110990741B (en) Page display method and device, electronic equipment, server and storage medium
US10845981B2 (en) Operation control method, device and storage medium
WO2015035796A1 (en) Tabletop display method, apparatus, and terminal
CN107066268B (en) Display position switching method and device for widget application
CN108039963B (en) Container configuration method and device and storage medium
CN108170361B (en) Application running state control method and mobile terminal
CN106254910B (en) Method and device for recording image
US10171640B2 (en) Method, apparatus, and system for displaying message in mobile terminal
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
US10506292B2 (en) Video player calling method, apparatus, and storage medium
CN106713608B (en) Application function state modification method and device and terminal
CN106302101B (en) Message reminding method, terminal and server
CN110908757B (en) Method and related device for displaying media content
CN116594616A (en) Component configuration method and device and computer readable storage medium
CN108536540B (en) Method and device for acquiring mouse message of desktop icon

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
GR01 Patent grant
GR01 Patent grant