CN103577177B - A kind of shape library call method and equipment - Google Patents
A kind of shape library call method and equipment Download PDFInfo
- Publication number
- CN103577177B CN103577177B CN201210273238.2A CN201210273238A CN103577177B CN 103577177 B CN103577177 B CN 103577177B CN 201210273238 A CN201210273238 A CN 201210273238A CN 103577177 B CN103577177 B CN 103577177B
- Authority
- CN
- China
- Prior art keywords
- interface
- shape library
- difference
- library
- shape
- 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
Links
Landscapes
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a kind of shape library call method and equipment, belong to field of mobile communication.This method includes:The call request of shape library user is obtained, call request includes shape library interface identifier;When the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, the shape library version identifier of mobile terminal is obtained;According to shape library version identifier, the corresponding shape library difference process layer of shape library version identifier is called;Difference processing is carried out to difference picture bank interface by shape library difference process layer;The corresponding shape library of shape library version identifier is called by difference treated difference picture bank interface.The equipment includes:First acquisition module, the second acquisition module, the first calling module, difference processing module, the second calling module.The present invention solves the problems, such as that the problem of shape library difference in version is brought and application package are bulky, has saved memory source, realize the compatibility of shape library different editions by introducing shape library difference process layer.
Description
Technical field
The present invention relates to field of mobile communication, more particularly to a kind of shape library call method and equipment.
Background technology
With popularizing for intelligent mobile terminal, the exploitation of the operating system of mobile terminal is more and more important.And it is in operation
In the development process of system, need often to call shape library, and shape library is typically all to be present in movement in the form of dynamic link
In terminal.The shape library of the form calling mobile terminal using dynamic link is needed when developer is using shape library.Due to moving
The operating system version of dynamic terminal and it is different, for example Android system has the versions such as V1.0, V2.1, V2.2, the operation of different editions
The shape library external interface that system provides is different, be to the figure bank interface of different editions when which results in calling shape library
Do compatible processing.
The prior art is when calling image library, for the compatibility issue that the difference in version of shape library is brought, current solution
Certainly scheme is that developer is linked to shape library in a manner of static linkage(Application program)In.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Since shape library is statically linked to own shape library, causes application package bulky, occupied a large amount of
Memory, by taking in Android system band SKIA shape library as an example, institute's band SKIA shape libraries are more than 1 Mbytes, this is for current interior
For depositing nervous embedded device, cost is too big.
Invention content
In order to effectively solve the problems, such as that the problem of shape library difference in version is brought and application package are bulky, the present invention
Embodiment provides a kind of shape library call method and equipment.The technical solution is as follows:
An embodiment of the present invention provides a kind of shape library call method, the method includes:
The call request of shape library user is obtained, the call request includes shape library interface identifier;
When the corresponding figure bank interface of the shape library interface identifier is difference picture bank interface, mobile terminal is obtained
Shape library version identifier;
According to the shape library version identifier, the corresponding shape library difference process layer of the shape library version identifier is called;
Difference processing is carried out to the difference picture bank interface by the shape library difference process layer;
The corresponding shape library of the shape library version identifier is called by difference treated difference picture bank interface.
Specifically, described when the corresponding figure bank interface of the shape library interface identifier is difference picture bank interface, it obtains
Before taking the shape library version identifier of mobile terminal, including:
According to the shape library interface identifier, judge whether the corresponding figure bank interface of the shape library interface identifier is poor
Different figure bank interface.
Further, described according to the shape library interface identifier, judge the corresponding figure of the shape library interface identifier
After whether bank interface is difference picture bank interface, further include:
When the corresponding figure bank interface of the shape library interface identifier is common graphics bank interface, call shape library public
Wrapper;The common graphics bank interface is other all figure bank interfaces other than the difference picture bank interface;
The corresponding shape library of the shape library interface identifier is directly invoked by the public wrapper of the shape library.
Wherein, described when the corresponding figure bank interface of the shape library interface identifier is common graphics bank interface, it calls
Before the public wrapper of shape library, further include:
All common graphics bank interfaces of different editions are packaged into identical figure bank interface, and are encapsulated in the figure
In the public wrapper in library.
Specifically, described according to the shape library version identifier, call the corresponding shape library of the shape library version identifier
Before difference process layer, further include:
According to the shape library version identifier, the difference picture bank interface is divided into different graphic library version identifier
Shape library difference process layer, each shape library difference process layer correspond to a shape library version identifier.
Specifically, by the shape library difference process layer to difference picture bank interface progress difference processing, including but
It is not limited to following manner:
When the interface parameters number that the difference picture bank interface provides is more or less than the shape library version identifier
When the interface parameters number of corresponding shape library, then one corresponding interface of a useless interface parameters or configuration is discarded
Parameter is to adapt to the interface parameters requirement of the shape library;
Or,
When the interface function shape library corresponding with the shape library version identifier that the difference picture bank interface provides
When interface function has differences, then the interface function that the difference picture bank interface provides is packaged into and the figure library facility
Identical uniform interface;
Or,
When the interface name shape library corresponding with the shape library version identifier that the difference picture bank interface provides
When interface name has differences, then the interface name that the difference picture bank interface provides is packaged into and the figure library name
Identical uniform interface;
Or,
When the data member in the corresponding shape library of the shape library version identifier has differences, then by the shape library
Difference process layer configures new interface to the difference picture bank interface, and the new interface obtains the value of the data member and return
To the value for preserving the data member after the value of the shape library user or the acquisition data member.
The embodiment of the present invention additionally provides a kind of shape library calling equipment, and the equipment includes:
First acquisition module, the call request for obtaining shape library user, the call request include shape library
Interface identifier;
Second acquisition module, for being difference picture bank interface when the corresponding figure bank interface of the shape library interface identifier
When, obtain the shape library version identifier of mobile terminal;
First calling module, for according to the shape library version identifier, calling the shape library version identifier corresponding
Shape library difference process layer;
Difference processing module, for carrying out difference to the difference picture bank interface by the shape library difference process layer
Reason;
Second calling module, for calling the shape library version identifier by difference treated difference picture bank interface
Corresponding shape library.
Specifically, the equipment includes:
Judgment module, before the shape library version identifier for obtaining the mobile terminal in the second acquisition module, according to
The shape library interface identifier judges whether the corresponding figure bank interface of the shape library interface identifier is that difference picture library connects
Mouthful.
Further, the equipment includes:
Third calling module, for judging the corresponding figure bank interface of the shape library interface identifier when the judgment module
For common graphics bank interface when, call the public wrapper of shape library;The common graphics bank interface is in addition to the difference picture
Other all figure bank interfaces except bank interface;
4th calling module is corresponded to for directly invoking the shape library interface identifier by the public wrapper of the shape library
Shape library.
Wherein, the third calling module is additionally operable to before calling the public wrapper of shape library, by the institute of different editions
There is common graphics bank interface to be packaged into identical figure bank interface, and is encapsulated in the public wrapper of the shape library.
Specifically, the difference processing module includes:
Division unit, before to difference picture bank interface progress difference processing, according to the shape library version
The difference picture bank interface, is divided into the shape library difference process layer of different graphic library version identifier, each figure by mark
Library difference process layer corresponds to a shape library version identifier.
Specifically, the difference processing module, including but not limited to lower unit:
First processing units, the interface parameters number for being provided when the difference picture bank interface are more or less than institute
When stating the interface parameters number of the corresponding shape library of shape library version identifier, then discards a useless interface parameters or match
A corresponding interface parameters is set to adapt to the interface parameters requirement of the shape library;
Second processing unit, the interface function for being provided when the difference picture bank interface and the shape library version mark
When knowing the interface function of corresponding shape library and having differences, then the interface function that the difference picture bank interface provides is packaged into
Uniform interface identical with the figure library facility;
Third processing unit, the interface name for being provided when the difference picture bank interface and the shape library version mark
When knowing the interface name of corresponding shape library and having differences, then the interface name that the difference picture bank interface provides is packaged into
Uniform interface identical with the figure library name;
Fourth processing unit, for being had differences when the data member in the corresponding shape library of the shape library version identifier
When, then new interface is configured to the difference picture bank interface by the shape library difference process layer, described in the new interface obtains
The value of data member and return to the shape library user or obtain preserve after the value of the data member data at
The value of member.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
Shape library call method provided in an embodiment of the present invention and equipment, by between shape library and shape library user
A layer pattern library difference process layer is introduced, solves the problems, such as that shape library difference in version is brought, and avoid application program
Bulky problem is wrapped, memory source has been saved, realizes the compatibility of shape library different editions.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of flow chart for shape library call method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of shape library call method provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram that a kind of shape library that the embodiment of the present invention three provides calls equipment;
Fig. 4 is another structural schematic diagram that a kind of shape library that the embodiment of the present invention three provides calls equipment;
Fig. 5 is the third structural schematic diagram that a kind of shape library that the embodiment of the present invention three provides calls equipment.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
Fig. 1 is an embodiment of the present invention provides a kind of flow chart of shape library call method, referring to Fig. 1, the embodiment packet
It includes:
101, the call request of shape library user is obtained, call request includes shape library interface identifier;
102, when the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, mobile terminal is obtained
Shape library version identifier;
103, according to shape library version identifier, the corresponding shape library difference process layer of shape library version identifier is called;
104, difference processing is carried out to difference picture bank interface by shape library difference process layer;
105, the corresponding shape library of shape library version identifier is called by difference treated difference picture bank interface.
Specifically, it when the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, obtains mobile whole
Before the shape library version identifier at end, including:
According to shape library interface identifier, judge whether the corresponding figure bank interface of shape library interface identifier is difference picture library
Interface.
Further, according to shape library interface identifier, judge the corresponding figure bank interface of shape library interface identifier whether be
After difference picture bank interface, further include:
When the corresponding figure bank interface of shape library interface identifier is common graphics bank interface, the public packaging of shape library is called
Layer;Common graphics bank interface is other all figure bank interfaces other than difference picture bank interface;
The corresponding shape library of shape library interface identifier is directly invoked by the public wrapper of shape library.
Wherein, when the corresponding figure bank interface of shape library interface identifier is common graphics bank interface, call shape library public
Altogether before wrapper, further include:
All common graphics bank interfaces of different editions are packaged into identical figure bank interface, and are encapsulated in shape library public affairs
Altogether in wrapper.
Specifically, according to shape library version identifier, call the corresponding shape library difference process layer of shape library version identifier it
Before, further include:
According to shape library version identifier, the shape library that difference picture bank interface is divided into different graphic library version identifier is poor
Different process layer, each shape library difference process layer correspond to a shape library version identifier.
Specifically, by the shape library difference process layer to difference picture bank interface progress difference processing, including but
It is not limited to following manner:
When the interface parameters number that difference shape library interface provides is more or less than the corresponding figure of shape library version identifier
When the interface parameters number in shape library, then a useless interface parameters or one corresponding interface parameters of configuration are discarded with suitable
The interface parameters of shape library is answered to require;
Or,
When the interface function for the interface function shape library corresponding with shape library version identifier that difference shape library interface provides
When having differences, then the interface function that difference picture bank interface provides is packaged into uniform interface identical with figure library facility;
Or,
When the interface name for the interface name shape library corresponding with shape library version identifier that difference shape library interface provides
When having differences, then the interface name that difference picture bank interface provides is packaged into uniform interface identical with figure library name;
Or,
When the data member in the corresponding shape library of shape library version identifier has differences, then handled by shape library difference
Layer configures new interface to difference picture bank interface, and new interface obtains the value of data member and returns to shape library user or obtain
Take the value that data member is preserved after the value of data member.
Shape library call method provided in an embodiment of the present invention, by introducing one between shape library and shape library user
Layer pattern library difference process layer solves the problems, such as that shape library difference in version is brought, and avoids application package volume
Huge problem, has saved memory source, realizes the compatibility of shape library different editions.
Embodiment two
Fig. 2 is that an embodiment of the present invention provides a kind of flow charts of shape library call method.The execution of the embodiment of the present invention
Main body is embedded device, or develops software for the operating system of embedded device, and it is to be directed to which, which develops software,
Mobile terminal, mobile terminal can be smart mobile phone, tablet computer, PDA(Personal DigitalAssistant, it is personal
Digital assistants)Deng.Referring to Fig. 2, which includes:
201, all common graphics bank interfaces of different editions are packaged into identical figure bank interface, and are encapsulated in figure
In the public wrapper in library, common graphics bank interface is other figure bank interfaces other than difference picture bank interface;
Specifically, identical figure bank interface is packaged into all common graphics bank interfaces of different editions first, such as
The shape library of the versions such as V1.0, V2.1, V2.2 by Android system is all packaged into identical API (Application
Programming Interface, application programming interface) interface;
Secondly, by the identical shape library interface encapsulation after packaging in the public wrapper of shape library, with dynamic link library
Form exist, the public wrapper of shape library can directly invoke the corresponding shape library of shape library interface identifier.
Figure bank interface in the embodiment of the present invention includes common graphics bank interface and difference picture bank interface, wherein public
Total figure bank interface is all figure bank interfaces that can be general in the various shape libraries for having different editions, and difference picture library connects
Mouth needs to do the general figure bank interface of compatible processing ability to be had differences in the shape library of different editions.
202, according to shape library version identifier, all differences figure bank interface is divided into different graphic library version identifier
Shape library difference process layer, each shape library difference process layer correspond to a shape library version identifier;
Specifically, due to shape library version identifier(Such as the shape library version identifier of Android system be respectively V1.0 versions,
V2.1 versions, V2.2 versions)All differences figure bank interface is then divided into the shape library of different graphic library version identifier by difference
Difference process layer, each shape library difference process layer correspond to a shape library version identifier;
For example all differences figure bank interface of Android system is respectively divided into according to V1.0, V2.1, V2.2 version
V1.0 shape library differences process layer, V2.1 shape library differences process layer, V2.2 shape library difference process layers;V1.0 shape library differences
Process layer corresponds to V1.0 versions, and V2.1 shape library difference process layers correspond to V2.1 versions, V2.2 shape library difference process layers
Correspond to V2.2 versions.
It should be noted that the sequence of the step 201 and step 202 in the embodiment of the present invention can be interchanged, i.e., do not limit
The sequencing of step 201 and step 202 executes step 202 after can first carrying out step 201, can also first carry out step 202
Step 201 is executed afterwards, naturally it is also possible to be performed simultaneously step 201 and step 202.
203, the call request of shape library user is obtained, call request includes shape library interface identifier;
Specifically, when shape library user, which is generally developer, to be needed to call shape library, shape library calling can be sent
Request;The call request of shape library user is obtained, which includes shape library interface identifier, wherein in call request
Including shape library interface identifier can be one or multiple.
204, according to shape library interface identifier, judge whether the corresponding figure bank interface of shape library interface identifier is disparity map
Shape bank interface;
Specifically, according to shape library interface identifier, judge whether the corresponding figure bank interface of shape library interface identifier is poor
Different figure bank interface;
If the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, 205 are thened follow the steps;
If the corresponding figure bank interface of shape library interface identifier is not difference picture bank interface, call shape library public
Wrapper;The public wrapper of shape library directly invokes the corresponding shape library of shape library interface identifier and is used for shape library user;
Further, when call request includes multiple shape library interface identifier, according to shape library interface identifier, judge
Whether the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, including:
According to each shape library interface identifier, the corresponding figure bank interface of each shape library interface identifier is judged respectively whether
For difference picture bank interface;
Correspondingly, when variant figure bank interface in figure bank interface, then step 205 is continued to execute;If shape library connects
When there are multiple difference picture bank interfaces in mouthful, then step 205 is executed respectively;
When figure bank interface is not difference picture bank interface, the public wrapper of shape library is called, and pass through shape library public affairs
Wrapper directly invokes the corresponding shape library of shape library interface identifier and is used for shape library user altogether.
205, when the corresponding figure bank interface of shape library interface identifier is difference picture bank interface, mobile terminal is obtained
Shape library version identifier;
Specifically, when figure bank interface is difference picture bank interface, the shape library version mark of current mobile terminal is obtained
Know, such as in Android system, the shape library version identifier for obtaining current mobile terminal is V1.0 versions.
206, according to shape library version identifier, the corresponding shape library difference process layer of shape library version identifier is called;
Specifically, it after getting shape library version identifier, calls at the corresponding shape library difference of the shape library version identifier
Layer is managed, and loads the shape library difference process layer, shape library difference process layer is existed in the form of dynamic link library.
For example the shape library version identifier of Android system is V2.1 versions, then calls the corresponding V2.1 shape libraries of V2.1 versions
Difference process layer.
207, difference processing is carried out to difference picture bank interface by shape library difference process layer;
Specifically, shape library difference process layer carries out difference processing to difference picture bank interface, including:
When the interface parameters that difference shape library interface provides is joined more than the interface of the corresponding shape library of shape library version identifier
When number, then a useless interface parameters is discarded to adapt to the interface parameters of shape library;Such as when difference shape library interface carries
The interface parameters of confession is 4, and the interface parameters of shape library is 3, then can discard 1 useless interface parameters, with suitable
The interface parameters of shape library is answered to require, to ensure normal call shape library.When the interface parameters that difference shape library interface provides
When the interface parameters of shape library corresponding less than shape library version identifier, then a corresponding parameter is configured to adapt to shape library
Interface parameters.Such as when difference shape library interface provide interface parameters be 4, and the interface parameters of shape library be 5, then need
1 interface parameters is reconfigured or obtained according to the interface parameters of shape library, to adapt to the interface parameters requirement of shape library, from
And ensure normal call shape library.
When the interface function for the interface function shape library corresponding with shape library version identifier that difference shape library interface provides
When having differences, then the interface function that difference picture bank interface provides is packaged into uniform interface identical with figure library facility;
When the interface name for the interface name shape library corresponding with shape library version identifier that difference shape library interface provides
When having differences, then the interface name that difference picture bank interface provides is packaged into uniform interface identical with figure library name;
When the data member in the corresponding shape library of shape library version identifier has differences, then handled by shape library difference
Layer configures new interface to difference picture bank interface, and new interface obtains the value of data member and returns to shape library user or obtain
Take the value that data member is preserved after the value of data member.
208, the corresponding shape library of shape library version identifier is called by difference treated difference picture bank interface.
Specifically, after carrying out difference processing to difference picture bank interface by shape library difference process layer, at this moment difference picture
The interface parameters of bank interface is identical as the interface parameters for the shape library called, and can call shape library.
It is significant to note that method provided in an embodiment of the present invention is shape library call method, for other insertions
Other dynamic link libraries of formula equipment are equally applicable;The figure bank interface of shape library call method provided in an embodiment of the present invention is real
C language interface form now may be used in form, C Plus Plus interface form can also be used, naturally it is also possible to connect using other
Degree of lip-rounding formula is not limited this embodiment of the present invention.
Shape library call method provided in an embodiment of the present invention, by introducing one between shape library and shape library user
Layer pattern library difference process layer solves the problems, such as that shape library difference in version is brought, and avoids application package volume
Huge problem, has saved memory source, realizes the compatibility of shape library different editions.
Embodiment three
Fig. 3 is that an embodiment of the present invention provides a kind of shape libraries to call equipment, and the executive agent of the embodiment of the present invention is embedding
Enter formula shape library and call equipment, is developed for the operating system to mobile terminal, referring to Fig. 3, which includes:
First acquisition module 301, the call request for obtaining shape library user, call request include that shape library connects
Mouth mark;
Second acquisition module 302, for being difference picture bank interface when the corresponding figure bank interface of shape library interface identifier
When, obtain the shape library version identifier of mobile terminal;
First calling module 303, for according to shape library version identifier, calling the corresponding shape library of shape library version identifier
Difference process layer;
Difference processing module 304, for carrying out difference processing to difference picture bank interface by shape library difference process layer;
Second calling module 305, for calling shape library version identifier by difference treated difference picture bank interface
Corresponding shape library.
Specifically, referring to Fig. 4, which includes:
Judgment module 306 is used for before the shape library version identifier that the second acquisition module 302 obtains mobile terminal, root
According to shape library interface identifier, judge whether the corresponding figure bank interface of shape library interface identifier is difference picture bank interface.
Further, referring to Fig. 5, which includes:
Third calling module 307 judges that the corresponding figure bank interface of shape library interface identifier is for working as judgment module 306
When common graphics bank interface, the public wrapper of shape library is called;Common graphics bank interface is other than difference picture bank interface
Other all figure bank interfaces;
4th calling module 308, for directly invoking the corresponding figure of shape library interface identifier by the public wrapper of shape library
Shape library.
Wherein, third calling module 307 is additionally operable to before calling the public wrapper of shape library, by all of different editions
Common graphics bank interface is packaged into identical figure bank interface, and is encapsulated in the public wrapper of shape library.
Specifically, difference processing module 304 includes:
Division unit, will be poor according to shape library version identifier before to the progress difference processing of difference picture bank interface
Different figure bank interface is divided into the shape library difference process layer of different graphic library version identifier, each shape library difference process layer pair
Answer a shape library version identifier.
Specifically, difference processing module 305, including but not limited to lower unit:
First processing units, the interface parameters number for being provided when difference shape library interface are more or less than shape library
When the interface parameters number of the corresponding shape library of version identifier, then one phase of a useless interface parameters or configuration is discarded
The interface parameters answered is to adapt to the interface parameters requirement of shape library;
Second processing unit, the interface function for being provided when difference shape library interface are corresponding with shape library version identifier
When the interface function of shape library has differences, then the interface function that difference picture bank interface provides is packaged into and figure library facility
Identical uniform interface;
Third processing unit, the interface name for being provided when difference shape library interface are corresponding with shape library version identifier
When the interface name of shape library has differences, then the interface name that difference picture bank interface provides is packaged into and figure library name
Identical uniform interface;
Fourth processing unit, for when the data member in the corresponding shape library of shape library version identifier has differences,
New interface then is configured to difference picture bank interface by shape library difference process layer, new interface obtains the value of data member and returns to
The value of data member is preserved after the value of shape library user or acquisition data member.
Equipment provided in an embodiment of the present invention, it is poor by introducing a layer pattern library between shape library and shape library user
Different process layer solves the problems, such as that shape library difference in version is brought, and the problem for avoiding application package bulky,
Memory source has been saved, the compatibility of shape library different editions is realized.
It should be noted that:The shape library that above-described embodiment provides calls equipment when calling shape library, only with above-mentioned each
The division progress of function module, can be as needed and by above-mentioned function distribution by different work(for example, in practical application
Energy module is completed, i.e., calls the internal structure of equipment to be divided into different function modules shape library, described above to complete
All or part of function.In addition, above-described embodiment provide shape library call equipment and shape library call method embodiment
Belong to same design, specific implementation process refers to embodiment of the method, and which is not described herein again.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
Complete, relevant hardware can also be instructed to complete by program, program can be stored in a kind of computer-readable storage
In medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely a prefered embodiment of the invention, is not intended to limit the invention, all in the spirit and principles in the present invention
Within, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.
Claims (8)
1. a kind of shape library call method, which is characterized in that the method includes:
The call request of shape library user is obtained, the call request includes shape library interface identifier;
When the corresponding figure bank interface of the shape library interface identifier is difference picture bank interface, the figure of mobile terminal is obtained
Library version identifier, the difference picture bank interface are to have differences to need to do compatible processing ability in the shape library of different editions
General figure bank interface;
According to the shape library version identifier, the corresponding shape library difference process layer of the shape library version identifier is called;
Difference processing is carried out to the difference picture bank interface by the shape library difference process layer;
The corresponding shape library of the shape library version identifier is called by difference treated difference picture bank interface;
It is described when the corresponding figure bank interface of the shape library interface identifier be difference picture bank interface when, obtain mobile terminal
Before shape library version identifier, including:
According to the shape library interface identifier, judge whether the corresponding figure bank interface of the shape library interface identifier is disparity map
Shape bank interface;
When the corresponding figure bank interface of the shape library interface identifier is common graphics bank interface, the public packaging of shape library is called
Layer;
It is described when the corresponding figure bank interface of the shape library interface identifier be common graphics bank interface when, call shape library it is public
Before wrapper, further include:
All common graphics bank interfaces of different editions are packaged into identical figure bank interface, and it is public to be encapsulated in the shape library
Altogether in wrapper.
2. according to the method described in claim 1, it is characterized in that, the common graphics bank interface is in addition to the difference picture
Other all figure bank interfaces except bank interface;
The corresponding shape library of the shape library interface identifier is directly invoked by the public wrapper of the shape library.
3. according to the method described in claim 1, it is characterized in that, described according to the shape library version identifier, described in calling
Before the corresponding shape library difference process layer of shape library version identifier, further include:
According to the shape library version identifier, the difference picture bank interface is divided into the figure of different graphic library version identifier
Library difference process layer, each shape library difference process layer correspond to a shape library version identifier.
4. according to the method described in claim 1, it is characterized in that, by the shape library difference process layer to the difference picture
Bank interface carries out difference processing, including but not limited to following manner:
When the interface parameters number that the difference picture bank interface provides is corresponded to more or less than the shape library version identifier
Shape library interface parameters number when, then discard a useless interface parameters or configuration one corresponding interface parameters
To adapt to the interface parameters requirement of the shape library;
Or,
When the interface for the interface function shape library corresponding with the shape library version identifier that the difference picture bank interface provides
When function has differences, then the interface function that the difference picture bank interface provides is packaged into identical as the figure library facility
Uniform interface;
Or,
When the interface for the interface name shape library corresponding with the shape library version identifier that the difference picture bank interface provides
When title has differences, then the interface name that the difference picture bank interface provides is packaged into identical as the figure library name
Uniform interface.
5. a kind of shape library calls equipment, which is characterized in that the equipment includes:
First acquisition module, the call request for obtaining shape library user, the call request include figure bank interface
Mark;
Second acquisition module is used for when the corresponding figure bank interface of the shape library interface identifier is difference picture bank interface,
The shape library version identifier of mobile terminal is obtained, the difference picture bank interface is to be had differences in the shape library of different editions
It needs to do the figure bank interface that compatible processing could be general;
First calling module, for according to the shape library version identifier, calling the corresponding figure of the shape library version identifier
Library difference process layer;
Difference processing module, for carrying out difference processing to the difference picture bank interface by the shape library difference process layer;
Second calling module, for calling the shape library version identifier to correspond to by difference treated difference picture bank interface
Shape library;
Judgment module, before the shape library version identifier for obtaining the mobile terminal in the second acquisition module, according to described
Shape library interface identifier judges whether the corresponding figure bank interface of the shape library interface identifier is difference picture bank interface;
Third calling module, for judging the corresponding figure bank interface of the shape library interface identifier for public affairs when the judgment module
Altogether when figure bank interface, the public wrapper of shape library is called;
The third calling module is additionally operable to before calling the public wrapper of shape library, by all common graphics of different editions
Bank interface is packaged into identical figure bank interface, and is encapsulated in the public wrapper of the shape library.
6. equipment according to claim 5, which is characterized in that the equipment includes:
4th calling module, for directly invoking the corresponding figure of the shape library interface identifier by the public wrapper of the shape library
Shape library;
The common graphics bank interface is other all figure bank interfaces other than the difference picture bank interface.
7. equipment according to claim 5, which is characterized in that the difference processing module includes:
Division unit, for before carrying out difference processing to the difference picture bank interface, according to the shape library version identifier,
The difference picture bank interface is divided into the shape library difference process layer of different graphic library version identifier, each shape library difference
Process layer corresponds to a shape library version identifier.
8. equipment according to claim 5, which is characterized in that by difference processing module, including but not limited to lower unit:
First processing units, the interface parameters number for being provided when the difference picture bank interface are more or less than the figure
When the interface parameters number of the corresponding shape library of shape library version identifier, then a useless interface parameters or configuration one are discarded
A corresponding interface parameters is to adapt to the interface parameters requirement of the shape library;
Second processing unit, the interface function for being provided when the difference picture bank interface and the shape library version identifier pair
When the interface function for the shape library answered has differences, then the interface function that the difference picture bank interface provides is packaged into and institute
State the identical uniform interface of figure library facility;
Third processing unit, the interface name for being provided when the difference picture bank interface and the shape library version identifier pair
When the interface name for the shape library answered has differences, then the interface name that the difference picture bank interface provides is packaged into and institute
State the identical uniform interface of figure library name.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210273238.2A CN103577177B (en) | 2012-08-02 | 2012-08-02 | A kind of shape library call method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210273238.2A CN103577177B (en) | 2012-08-02 | 2012-08-02 | A kind of shape library call method and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103577177A CN103577177A (en) | 2014-02-12 |
CN103577177B true CN103577177B (en) | 2018-07-13 |
Family
ID=50049029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210273238.2A Active CN103577177B (en) | 2012-08-02 | 2012-08-02 | A kind of shape library call method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103577177B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107402749B (en) * | 2017-04-14 | 2020-07-07 | 阿里巴巴集团控股有限公司 | Method and device for realizing picture loading library |
CN107918592A (en) * | 2017-11-30 | 2018-04-17 | 郑州云海信息技术有限公司 | A kind of method of compatibility highest version interface |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101277301A (en) * | 2008-04-24 | 2008-10-01 | 华为技术有限公司 | Method and device for invocation of distributed system interface |
CN101566954A (en) * | 2009-05-31 | 2009-10-28 | 珠海金山软件股份有限公司 | Method and device for managing plug-in |
CN101667139A (en) * | 2009-10-13 | 2010-03-10 | 金蝶软件(中国)有限公司 | Service program invocation method based on aggregate type object, device and system therefor |
CN102331931A (en) * | 2011-07-25 | 2012-01-25 | 深圳市万兴软件有限公司 | Dynamic library managing method and device |
-
2012
- 2012-08-02 CN CN201210273238.2A patent/CN103577177B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101277301A (en) * | 2008-04-24 | 2008-10-01 | 华为技术有限公司 | Method and device for invocation of distributed system interface |
CN101566954A (en) * | 2009-05-31 | 2009-10-28 | 珠海金山软件股份有限公司 | Method and device for managing plug-in |
CN101667139A (en) * | 2009-10-13 | 2010-03-10 | 金蝶软件(中国)有限公司 | Service program invocation method based on aggregate type object, device and system therefor |
CN102331931A (en) * | 2011-07-25 | 2012-01-25 | 深圳市万兴软件有限公司 | Dynamic library managing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN103577177A (en) | 2014-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108765158A (en) | A kind of intelligent contract automotive engine system and its contract execution method based on block chain | |
CN108563517B (en) | Calling method and device of system interface | |
CN103677843B (en) | Native capacity development method and device across mobile terminals | |
CN105204823B (en) | Generate the method and device of application program installation kit | |
CN104156225B (en) | A kind of method for down loading of installation kit, system and server | |
CN107562425A (en) | Single-page application creation method and device based on Hybrid applications | |
CN107678778A (en) | Compatibility method, adapter, running gear and system based on Hybrid | |
CN103685564B (en) | Introduce the online operation cloud plateform system of sector application of plug-in unit application power layer | |
CN106372250A (en) | Parameter passing method and device capable of starting local application through URL protocol | |
CN108647032A (en) | Using loading method and device, computer installation and computer readable storage medium | |
CN105630534A (en) | TrustZone framework-based application program execution method and device as well as terminal | |
CN103577177B (en) | A kind of shape library call method and equipment | |
CN104020849B (en) | Based on multiprogram display packing and the system simultaneously of Windows CE | |
CN101969454B (en) | Method, system and mobile terminal for realizing data transmission between mobile terminal and computer | |
CN104636249A (en) | Generation system and method of debugging information of application program | |
CN103729224B (en) | Application loading method and device based on open platform | |
CN107077378B (en) | Communication method, device, electronic equipment and program product | |
CN107133045A (en) | Cross-platform game engine multi-threading correspondence method, device, storage medium and equipment | |
CN110022332B (en) | Hypertext transfer security protocol proxy method, device, equipment and medium | |
CN112579212A (en) | Cross-language calling method, calling party device and called party device | |
CN109739548A (en) | Program packaging method, program packing apparatus and computer readable storage medium | |
CN108616657A (en) | The method and device that softphone is dialed is realized in mobile terminal | |
CN103294589B (en) | Test case implementation method and system as well as middle adaptive device | |
CN113434118A (en) | Layered architecture system of concentrator based on Java platform | |
CN111711940A (en) | Intelligent device data interaction method, intelligent device and storage device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221123 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518100 Patentee after: Shenzhen Yayue Technology Co.,Ltd. Address before: 2 East 403 room, SEG science and technology garden, Futian District, Guangdong, Shenzhen 518000, China Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
TR01 | Transfer of patent right |