[go: up one dir, main page]

CN100367198C - Method and apparatus for realizing message prompt - Google Patents

Method and apparatus for realizing message prompt Download PDF

Info

Publication number
CN100367198C
CN100367198C CNB2004100517692A CN200410051769A CN100367198C CN 100367198 C CN100367198 C CN 100367198C CN B2004100517692 A CNB2004100517692 A CN B2004100517692A CN 200410051769 A CN200410051769 A CN 200410051769A CN 100367198 C CN100367198 C CN 100367198C
Authority
CN
China
Prior art keywords
color data
data
icon
color
message notifying
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.)
Expired - Lifetime
Application number
CNB2004100517692A
Other languages
Chinese (zh)
Other versions
CN1755612A (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 CNB2004100517692A priority Critical patent/CN100367198C/en
Publication of CN1755612A publication Critical patent/CN1755612A/en
Application granted granted Critical
Publication of CN100367198C publication Critical patent/CN100367198C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The present invention discloses a method for realizing message prompt which comprises the following steps that: a data structure of an original message prompt icon is analyzed to obtain an original color data of a message prompt icon; a target value of the color data is received, and the original color data of the icon is converted to a new color data according to the target value; under the control of a timer, the original color data and the stored new color data are alternately used for generating the message prompt icon, the flicker of the message prompt icon is realized, and the message prompt is carried out. Accordingly, the present invention also discloses an apparatus for realizing message prompt.

Description

A kind of method and apparatus of realizing message notifying
Technical field
The present invention relates to the computer picture data processing technique, particularly relate to a kind of method and apparatus of realizing message notifying.
Background technology
Icon is the fundamental element that various data handling systems such as computing machine are used, and in order to present special display effect, often needs to realize flashing or glimmering of icon.For example, in some application program, need carry out message notifying by the mode that icon flashes.
Along with society and development of science and technology, people more and more pay attention to the promptness of information interchange and communication, therefore, can so that people each other contact and link up day by day easily instant communicating system gradually by the recognition and acceptance of user institute.As a kind of mode of and other people contact instant by the internet, instant communicating system have interactive by force, characteristics such as low price.Adopt the instant communicating system of instruments such as QQ, MSN, Yahoo Expert therefore can be popularized in the not long time.
At instant communication client, adopt the mode that icon (ICON) flashes to carry out the prompting of message usually.At present, on instant communication client, a kind of prior art that realizes that icon flashes is to be undertaken by the continuous change of the position of ICON.Specifically: a plurality of different coordinate datas are set for ICON, when message arrives client, start a timer, make ICON move around in the adjacent locations of aforementioned coordinate data correspondence according to the default time interval, reach and attract user, the purpose of call user's attention.
This method implements fairly simple, but because form is single, makes the user feel uninteresting rather when experiencing message notifying.This is a bigger defective for an exigent software product of user experience sense, so improve this user experience, adopting new prompting mode is an important problem.
The another kind of prior art of message notifying that realizes is undertaken by gif, can reach a kind of special effect, but make the burden that gif will increase the weight of the user-interface design personnel; If need realize that for each the ICON that flashes needs a gif to be supported that then the expense of program will be bigger simultaneously; Support to gif also needs a large amount of programs to realize on the other hand.
Summary of the invention
The technical matters that the present invention solves is to provide a kind of method and apparatus of realizing message notifying, can flash mode and attract the user's attention by enriching changeable icon, and the resource overhead of system is less; And can improve sense of experience of users.
For this reason, the technical scheme of technical solution problem of the present invention is: a kind of method that realizes message notifying is provided, comprises step:
1) resolves the data structure that origination message is pointed out icon, obtain the primitive color data of this message notifying icon;
2) receive the desired value of color data, according to described desired value, with the color data of the primitive color data-switching Cheng Xin of icon;
3) under timer control, alternately adopt described primitive color data and as 2) as described in new color data generate the message notifying icon, message notifying is carried out in the flicker of realization message notifying icon.
Preferably, the color data of obtaining in the described step 1) specifically comprises: extract the bitmap handle of icon, comprising color bitmap and illiteracy card layout; Obtain the data field of described color bitmap and illiteracy card layout; Traversal pixel extraction color data and illiteracy plate data.
Preferably, also comprise in the described step 1) color data and illiteracy plate data are carried out the step-by-step XOR, obtain actual color data.
Preferably, described step 2) the converting colors data in specifically comprise: open up new data space, the rgb value of the color in the new data space is transformed into the HIS value that obtains this color after the HIS pattern, judge whether it is the color data that needs modification, if, then be converted to new color data, newer color data be converted to rgb value at last; If not, then directly color data is converted into rgb value.
It is preferably, described that to be converted to new color data specifically be to adopt desired value to replace brightness value or color-values in the color data.
Preferably, in described step 2) also comprise afterwards and store described new color data.
Preferably, described storing process specifically comprises: with new color data with cover the plate data and combine and generate color data and preserve.
Preferably, described combining specifically refers to new color data and illiteracy plate data are carried out XOR.
Preferably, described message notifying icon is the icon that instant communication client adopts in the instant communicating system.
The present invention also provides a kind of device of realizing message notifying, comprising:
The color data acquiring unit is used to obtain the primitive color data that origination message is pointed out icon;
The color data converting unit is used to obtain desired value, and according to described desired value the primitive color data is changed, and obtains new color data;
Data storage cell is used to preserve this new color data;
The icon generation unit alternately adopts primitive color data and new color data to generate the message notifying icon;
Timer is used to control the above-mentioned time interval that replaces, thereby realizes flashing of message notifying icon.
Preferably, bitmap handle acquiring unit is used to extract the bitmap handle of icon, comprising the color bitmap with cover card layout; Data bitmap district acquiring unit, the data field that is used to obtain described color bitmap and covers card layout; The color value generation unit is used to travel through the pixel extraction color data and covers the plate data, and color data and illiteracy plate data are carried out the step-by-step XOR, obtains actual color data.
Preferably, this color data converting unit comprises interface, mode switching unit and color value replacement unit; Described interface is used to receive primitive color data and desired value; Described mode switching unit is used to realize the RGB pattern of color data and the conversion between the HIS pattern; Described color value is replaced the unit and is used for utilizing desired value to replace the brightness value or the color-values of primitive color data.
With respect to prior art, the invention has the beneficial effects as follows: because the present invention is by obtaining the color data of icon, according to desired value color data is made amendment, and according to the new message notifying icon of amended color data generation, thereby under the control of timer, realize the flicker effect of icon, make the relative prior art of the variation horn of plenty more of icon; And with respect to making gif, resource overhead is less.
In addition, the present invention be except can changing the brightness of icon, and the parameters such as color that can also revise icon realize the effect of glimmering.
In addition and since this present invention is directed to as if the fundamental element at Wndows interface, so have the prospect of using preferably, can be used in instant communicating system or other Windows software products.
Description of drawings
Fig. 1 is the process flow diagram that the present invention realizes the method for message notifying;
Fig. 2 is a process flow diagram of revising the message notifying icon in the inventive method;
Fig. 3 is the process flow diagram of conversion color data in the inventive method;
Fig. 4 is the block diagram that the present invention realizes the device of message notifying.
Embodiment
In order to improve the experience of user when the message notifying, the main design of the present invention is to adopt the scheme of image variable color to realize the variable color of ICON.Its specific implementation is constantly to adjust the shading value of ICON under the prerequisite that keeps the ICON color, reach the flicker effect of ICON, because ICON is a basic interface element in the Windows program, so after having realized the light and shade flicker scheme of ICON, users' interfaces is experienced will obtain very big improvement, this The Application of Technology not only can be improved the interface of instant communication client significantly and experience, and this technology also can be easy to be transplanted in other application program, can produce good effect equally.
ICON is one of fundamental element on the Windows program interface.For ICON, Windows provides relatively abundanter API that ICON is operated.A basic API is GETICONINFO, shows ICON by two bitmap (color bitmap and illiteracy card layout).
In addition, can obtain the view data of bitmap by GetBitmapPixels, obtain the pixel data of image after, can revise this data field to obtain different effects in conjunction with digital image processing techniques.
Although can not directly change the characteristic of original ICON to the operation of bitmap. but can utilize amended data field to generate new ICON and replace old ICON by CreateIconIndirect, finally finish the change of the form of ICON, realize special display effect.
Wherein, described digital image processing techniques can adopt the method for dermatodyschroia, promptly realize the extraction of color characteristic by the color of pixel mode-conversion, no matter reach the purpose that changes color by revising these features, be that brightness or the color that changes ICON can be realized by this method.Certainly, can also adopt other digital image processing techniques, as methods such as image upset, rotations.
Seeing also Fig. 1, is the main process flow diagram of method that the present invention realizes message notifying.
At first, resolve the data structure of origination message prompting icon, obtain the primitive color data of this message notifying icon; Secondly, the receiving target value according to the primitive color data and the desired value of described icon, generates new color data; Subsequently, store described new color data; When new message arrives client, start timer, alternately adopt the new color data of described primitive color data and storage to generate the message notifying icon, realize flashing of message notifying icon, carry out message notifying.
Seeing also Fig. 2, is the process flow diagram of one embodiment of the invention.
At first, need to resolve the data structure of ICON, obtain the color data of ICON, judge the type of ICON.
In the present embodiment, step S110 is the bitmap handle (HBITMAP) that one of API GETICONINFO extracts ICON that carries that adopts Window, comprising color bitmap (hbmpcolor) and illiteracy card layout (hbmpmask), and if the transparent illiteracy card layout that will have a non-NULL of ICON realization.
Execution in step S120 again obtains the data field of these two bitmaps by GetBitmapPixels, needs to judge the data layout of bitmap.
The color data of ICON is generally preserved with 16 bitmap forms in the Windows program, and the arrangement of the color data in 16 bitmaps has two kinds of form X555 and 565, so at first should obtain according to the bitcount among the bitmapinfo is that a kind of pattern, if bitcount is 15 then is X555, if 16 is 565.
The illiteracy plate data of ICON are not 16, generally use the corresponding pixel in a byte position, so the illiteracy plate data of the ICON of a 16*16 have only 32 bytes.
Secondly, the view data of ICON is handled, comprised color data and cover the plate data, the data layout traversal bitmap pixels data according to bitmap change the brightness of pixel data.Need to prove,, then do not process if this pixel belongs to the ICON transparent region; If this pixel is not at transparent region then in conjunction with covering the color value that the plate data of corresponding positions calculates reality.
In the present embodiment, at first execution in step S130 obtains the first frame brightness value.
Execution in step S140 and step S150 travel through first color data of pixel extraction and cover the plate data then.According to the dissimilar rgb values that extract pixel of bitmap, 24 bitmap RGB extract fairly simple; More complicated for 16 bitmaps, the illiteracy plate pixel value that at first takes out correspondence position (generally is a byte position, so this byte position need be extended to 16), then according to bitcount judge 16 bitmaps be the X555 form or 565 forms, carry out bit manipulation then it extracted respectively.
Step S160, the combination of color data and illiteracy plate data just can obtain actual color data, and present embodiment is to adopt step-by-step to carry out xor operation to obtain color value.
Step S170 handles the color value that obtains, and data is carried out conversion obtain new color data.
Seeing also Fig. 3, is the process flow diagram of revising color value in the present embodiment.At first, open up new data space, the rgb value of the color in the new data space is transformed into the HIS value that obtains this color after the HIS pattern, judge whether it is the color data that needs modification, if, then revise I value (being brightness value), newer color data is converted to rgb value at last; If not, then directly color data is converted into rgb value again.
Step S180 combines the new color data that obtains to carry out computing with covering the plate data once more, is then written to the color data among the bitmap.In the present embodiment, after obtaining new color data, data are carried out an xor operation just be written among the bitmap, to guarantee the correctness of display result.
Step S190 judges that whether traversal finishes, and if not, then obtains next pixel color, and returns step S150; If execution in step S210 then is stored in data the data field of corresponding frame.
Subsequently, carry out step S220, the new ICON color data that obtains is set up the new old ICON of ICON replacement in conjunction with covering the plate data.
Among the present invention, efficient when changing the ICON color for the ease of improving, can set up a plurality of ICON memory field in advance, preserve the bitmap data of multiframe ICON under different brightness values, when replacing, each ICON can avoid the computing of color value like this, directly carry out the foundation of ICON, improve display efficiency according to the data in the memory field.Certainly, described color data can also be stored in the various storage mediums such as buffer memory, hard disk, flash memory, and this does not give unnecessary details.
Then execution in step S230, whether judgment frame is compiled to go through and is finished, if then quit a program; If not, then obtain the pointer in next color data district, and return step S140.
In the embodiments of the invention, adopt a timer to be used to excite and the color of controlling ICON is flashed.Under the control of timer, alternately adopt the new color data of described primitive color data and storage to generate the message notifying icon, thereby realize flashing of message notifying icon, carry out message notifying.
One embodiment of the present of invention are that the client that is applied to instant communicating system realizes message notifying.Certainly, the present invention can also be applied to other software products with iconic element, and this does not give unnecessary details.
See also Fig. 4, the present invention also provides a kind of device of realizing message notifying.
This device 100 comprises color data acquiring unit 110, color data converting unit 120, data storage cell 130, icon generation unit 140 and timer 150.
Described color data acquiring unit 110 is used to obtain the primitive color data of origination message prompting icon; Described color data converting unit 120 is used to obtain desired value, and according to described desired value the primitive color data is changed, and obtains new color data; Described data storage cell 130 is used to preserve this new color data; Described icon generation unit 140 is used for generating new message notifying icon according to aforementioned new color data; Described timer 150 is used to control the time interval that icon generation unit 140 generates the message notifying icon, thereby realizes flashing of message notifying icon, with call user's attention.
This color data acquiring unit 110 comprises bitmap handle acquiring unit 111, data bitmap district acquiring unit 112, color value generation unit 113.Described bitmap handle generally includes the color bitmap and covers card layout, and if the transparent illiteracy card layout that will have a non-NULL of icon realization.Described color value generation unit 113 is mainly used in according to color data and data bitmap and generates actual color data.
This color data converting unit 120 comprises interface 121, mode switching unit 122, color value replacement unit 123; Described interface 121 is used to receive primitive color data and desired value; Described mode switching unit 122 is used to realize the RGB pattern of color data and the conversion between the HIS pattern; Described color value is replaced the unit and is used for utilizing desired value to replace the parameter of primitive color data.
In sum, realization of the present invention mainly is to obtain by the color data of revising icon, so be not restricted to the brightness of the described change icon of embodiment, can also flash by the realization icons such as color that change icon, make that the variation of icon can be more abundant.
In one embodiment of the present of invention, described device is arranged in the client of instant communicating system, and this instant communication client can adopt QQ or other similar immediate communication tool.
Be understandable that application of the present invention not only can improve the interface of instant communication client significantly to be experienced, and this technology can be easy to also be transplanted in other application program, can produce good effect equally.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (12)

1. a method that realizes message notifying is characterized in that, comprises step:
1) resolves the data structure that origination message is pointed out icon, obtain the primitive color data of this message notifying icon;
2) receive the desired value of color data, according to described desired value, with the color data of the primitive color data-switching Cheng Xin of icon;
3) under timer control, alternately adopt described primitive color data and as 2) described new color data generation message notifying icon, realize the flicker of message notifying icon, carry out message notifying.
2. the method for realization message notifying according to claim 1 is characterized in that, the color data of obtaining in the described step 1) specifically comprises: extract the bitmap handle of icon, comprising color bitmap and illiteracy card layout; Obtain the data field of described color bitmap and illiteracy card layout; Traversal pixel extraction color data and illiteracy plate data.
3. the method for realization message notifying according to claim 2 is characterized in that: also comprise in the described step 1) color data and illiteracy plate data are carried out the step-by-step XOR, obtain actual color data.
4. the method for realization message notifying according to claim 1, it is characterized in that, described step 2) the converting colors data in specifically comprise: open up new data space, the rgb value of the color in the new data space is transformed into the HIS value that obtains this color after the HIS pattern, judge whether it is the color data that needs modification, if, then be converted to new color data, newer color data is converted to rgb value at last; If not, then directly color data is converted into rgb value.
5. the method for realization message notifying according to claim 4 is characterized in that: described to be converted to new color data specifically be to adopt desired value to replace brightness value or color-values in the color data.
6. the method for realization message notifying according to claim 2 is characterized in that: in described step 2) also comprise afterwards and store described new color data.
7. the method for realization message notifying according to claim 6 is characterized in that: described storing process specifically comprises: with new color data with cover the plate data and combine and generate color data and preserve.
8. the method for realization message notifying according to claim 7 is characterized in that: described combining specifically refers to new color data and illiteracy plate data are carried out XOR.
9. according to the method for each described realization message notifying of claim 1 to 8, it is characterized in that: described message notifying icon is the icon that instant communication client adopts in the instant communicating system.
10. a device of realizing message notifying is characterized in that, comprising:
The color data acquiring unit is used to obtain the primitive color data that origination message is pointed out icon;
The color data converting unit is used to obtain desired value, and according to described desired value the primitive color data is changed, and obtains new color data;
Data storage cell is used to preserve this new color data;
The icon generation unit alternately adopts primitive color data and new color data to generate the message notifying icon;
Timer is used to control the above-mentioned time interval that replaces, thereby realizes flashing of message notifying icon.
11. the device of realization message notifying according to claim 10 is characterized in that: this color data acquiring unit comprises:
Bitmap handle acquiring unit is used to extract the bitmap handle of icon, comprising the color bitmap with cover card layout;
Data bitmap district acquiring unit, the data field that is used to obtain described color bitmap and covers card layout;
The color value generation unit is used to travel through the pixel extraction color data and covers the plate data, and color data and illiteracy plate data are carried out the step-by-step XOR, obtains actual color data.
12. the device according to claim 10 or 11 described realization message notifyings is characterized in that: this color data converting unit comprises interface, mode switching unit and color value replacement unit; Described interface is used to receive primitive color data and desired value; Described mode switching unit is used to realize the RGB pattern of color data and the conversion between the HIS pattern; Described color value is replaced the unit and is used for utilizing desired value to replace the parameter of primitive color data HIS pattern.
CNB2004100517692A 2004-09-30 2004-09-30 Method and apparatus for realizing message prompt Expired - Lifetime CN100367198C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100517692A CN100367198C (en) 2004-09-30 2004-09-30 Method and apparatus for realizing message prompt

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100517692A CN100367198C (en) 2004-09-30 2004-09-30 Method and apparatus for realizing message prompt

Publications (2)

Publication Number Publication Date
CN1755612A CN1755612A (en) 2006-04-05
CN100367198C true CN100367198C (en) 2008-02-06

Family

ID=36688889

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100517692A Expired - Lifetime CN100367198C (en) 2004-09-30 2004-09-30 Method and apparatus for realizing message prompt

Country Status (1)

Country Link
CN (1) CN100367198C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330755A (en) * 2007-06-22 2008-12-24 鸿富锦精密工业(深圳)有限公司 Radio communication device and method
CN102447689B (en) * 2010-09-30 2015-05-20 腾讯科技(深圳)有限公司 Information updating prompt method and network client side
CN102736920B (en) * 2012-06-11 2015-09-09 广东欧珀移动通信有限公司 A kind of self-adaptation color matching method of desktop icon background mask
CN103001852B (en) * 2012-08-29 2015-10-07 五八同城信息技术有限公司 A kind of system tray processing method based on instant messaging and device
CN103324471B (en) 2012-10-22 2018-05-15 中兴通讯股份有限公司 Dynamic modification application starts figure calibration method, the sending method of message, terminal
CN103106004A (en) * 2013-02-06 2013-05-15 广东欧珀移动通信有限公司 Method and device for reminding pending event of application program based on mobile terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1044544A (en) * 1989-01-13 1990-08-08 米德公司 Color image processing method
CN1391678A (en) * 1999-09-24 2003-01-15 折扣网控股有限公司 Interactive system and method for riewing on line advertising
CN1444158A (en) * 2002-03-13 2003-09-24 三星电子株式会社 Colour signal processing device and method for efficient storage colour gamut

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1044544A (en) * 1989-01-13 1990-08-08 米德公司 Color image processing method
CN1391678A (en) * 1999-09-24 2003-01-15 折扣网控股有限公司 Interactive system and method for riewing on line advertising
CN1444158A (en) * 2002-03-13 2003-09-24 三星电子株式会社 Colour signal processing device and method for efficient storage colour gamut

Also Published As

Publication number Publication date
CN1755612A (en) 2006-04-05

Similar Documents

Publication Publication Date Title
CN104216752B (en) A kind of information loading method and device based on window
CN102999254B (en) The display control method of desktop icons and device
CN103092612B (en) Realize method and the electronic installation of Android operation system 3D desktop pinup picture
EP2525294A1 (en) Method and device for rendering user interface font
CN102163216A (en) Picture display method and device thereof
CN103123581B (en) A kind of application interface replacing options of mobile terminal and device and mobile terminal
CN104750393B (en) Wallpaper method to set up and device
CN103543925B (en) A kind of method and apparatus for operating picture
CN106775543A (en) A kind of terminal display control method and device
CN108228677A (en) Switch the method and apparatus of subject of Web site style
CN105138317A (en) Window display processing method and device applied to terminal equipment
CN102768625B (en) Resurfacing method and device of Windows user interface
CN100468305C (en) Communication information displaying method in communication system
CN100367198C (en) Method and apparatus for realizing message prompt
CN108762597A (en) The method for drafting and E-book reader of E-book reader handwriting
CN109118556A (en) A kind of method that realizing UI interface cartoon transition effect, system and storage medium
CN105975324A (en) Method for memorizing human-computer interface operation habits
CN106855800A (en) A kind of display methods of interface element background picture, device and smart machine
CN101299209B (en) Method and device for high bright displaying form editing row
CN107463307A (en) Document display method and device
CN113778304B (en) Method and device for displaying layer, electronic equipment and computer readable storage medium
CN110879739A (en) Display method and display device of notification bar
CN106126254A (en) A kind of association look squarely interface game editing system and method
CN109739496A (en) Method and device for displaying calling page of application program
CN109074220A (en) The method that dynamic changes user interface element

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CX01 Expiry of patent term

Granted publication date: 20080206

CX01 Expiry of patent term