Resource Managerment

Data Structures

Defines

Typedefs

Enumerations

Functions


Detailed Description

Id
mresmgr.h 1617 2011-03-24 09:48:44Z shidazhi

Copyright (C) 2009 Feynman Software.


Define Documentation

#define HPACKAGE_NULL   0

Null resource package handle.

Definition at line 48 of file mresmgr.h.

#define ncsLoadResPackage   ncsLoadResPackageFromFile

An alias of ncsLoadResPackageFromFile.

See also:
ncsLoadResPackageFromFile

Definition at line 377 of file mresmgr.h.

#define NCSRM_ENCODING_LEN   16

The maximum length of encoding.

Definition at line 100 of file mresmgr.h.

#define NCSRM_SYSSTR_BASEID   1

Base value of system string id.

Maximum value of system string id.

#define NCSRM_SYSSTR_DEFRDR   (NCSRT_STRING << 16) |NCSRM_SYSSTR_BASEID

The system string id of default renderer.

Definition at line 76 of file mresmgr.h.

#define NCSRM_VENDOR_LEN   16

The maximum length of vendor.

Definition at line 94 of file mresmgr.h.

#define NCSRM_VERSION_LEN   4

The maximum length of resource package version.

Definition at line 88 of file mresmgr.h.

#define NCSRT_EXT_LEN   15

The maximum length of resource extension.

Definition at line 82 of file mresmgr.h.


Typedef Documentation

typedef unsigned int HPACKAGE

Handle to resource package.

Definition at line 42 of file mresmgr.h.

Structure defines default locale information.

typedef struct _NCSRM_HEADER NCSRM_HEADER

Structure defines MiniGUI resource package header.

typedef struct _NCSRM_IDITEM NCSRM_IDITEM

Structure defines resource ID item information.

Structure defines the header of incore image resource.

Structure defines locale item information.

typedef struct _NCSRM_PROP NCSRM_PROP

Strucutre defines properties information.

Strucutre defines the header of renderer information.

typedef struct _NCSRM_RDRINFO NCSRM_RDRINFO

Strucutre defines window renderer information.

Structure defines the header of section.

Structure defines resouce type information.

Structure defines UI resource header.


Enumeration Type Documentation

Renderer resource type.

Enumerator:
NCSRM_RDRTYPE_COLOR 

Color

NCSRM_RDRTYPE_METRIC 

Metric

NCSRM_RDRTYPE_IMAGE 

Image

NCSRM_RDRTYPE_FONT 

Font

NCSRM_RDRTYPE_BINARY 

Binary

NCSRM_RDRTYPE_STRING 

String

NCSRM_RDRTYPE_FILE 

File

NCSRM_RDRTYPE_TEXT 

Text

NCSRM_RDRTYPE_MAX 

Maximum value

Definition at line 285 of file mresmgr.h.


Function Documentation

int ncsAddRefResPackage ( HPACKAGE  package  ) 

add the reference count for resource package

See also:
ncsLoadResPackage
mMainWnd * ncsCreateMainWindowIndirectFromID ( HPACKAGE  package,
Uint32  wndId,
HWND  owner,
HICON  hIcon,
HMENU  hMenu,
NCS_EVENT_HANDLER_INFO *  handlers,
NCS_EVENT_CONNECT_INFO connects,
DWORD  user_data 
)

Create main window.

This function create main window according to UI resource ID, parent handle, and other informations.

Parameters:
package The handle of resource package.
wndId The UI resource id.
owner The handle of parent window.
hIcon The handle of icon.
hMenu The handle of menu.
handlers The handler set.
connects The handler set of connect
user_data The user_data
Returns:
window class on success, otherwise NULL.
void ncsFreeWndTemplate ( NCS_MNWND_TEMPLATE ptempl  ) 

free the window template create by ncsGetWndTemplFromID

free the content of window template, but don't free itself

Parameters:
ptempl the template to be free
Returns:
void
See also:
ncsGetWndTemplFromID
int ncsGetBitmap ( HDC  hdc,
HPACKAGE  package,
Uint32  resId,
PBITMAP  pBitmap 
)

Load a device-dependent bitmap from resource id.

Parameters:
hdc The device context.
package The handle of resource package.
resId The resource id.
pBitmap The pointer to the BITMAP object.
Returns:
0 on success, otherwise failure.
const char * ncsGetDefaultLocale ( void   ) 

Get default locale information.

Returns:
Locale value.
const char * ncsGetImageFileName ( HPACKAGE  package,
Uint32  resId 
)

Get the name of image file.

Parameters:
package The handle of resource package.
resId The resource id.
Returns:
string on success, otherwise NULL.
int ncsGetMyBitmap ( HPACKAGE  package,
Uint32  resId,
PMYBITMAP  myBmp,
RGB *  pal 
)

Load a device-independent bitmap from resource id.

Parameters:
package The handle of resource package.
resId The resource id.
myBmp The pointer to the MYBITMAP object.
pal The palette will be returned through this pointer.
Returns:
0 on success, otherwise failure.
const char * ncsGetString ( HPACKAGE  package,
Uint32  resId 
)

Get string.

This function gets string according to the specified id resId.

Parameters:
package The handle of resource package.
resId The string resource id.
Returns:
string on success, otherwise NULL.
BOOL ncsGetWndTemplFromID ( HPACKAGE  package,
Uint32  wndId,
NCS_MNWND_TEMPLATE ptempl,
NCS_EVENT_HANDLER_INFO *  handlers 
)

get the window template from package

This function get the info from package. It will create the memory to save the children controls and properties.

Parameters:
package The handler of resource package
wndId The window template id in resource
ptempl The template buffer
handlers The event handlers of window
Returns:
If success, return TRUE, or Failed return FALSE
HPACKAGE ncsLoadResPackageFromFile ( const char *  fileName  ) 

Load a resource package from resource package file.

Parameters:
fileName The name of resource package.
Returns:
Nonzero on success, otherwize HPACKAGE_NULL.
HPACKAGE ncsLoadResPackageFromMem ( const void *  mem,
int  size 
)

Load a resource package from memory. User get the information of incore resource package by getIncoreResPackInfo firstly, then call this function to load resource package.

Parameters:
mem The memory address.
size The size of memory.
Returns:
Nonzero on success, otherwize HPACKAGE_NULL.
void ncsReleaseBitmap ( PBITMAP  pBitmap  ) 

Releases a bitmap.

This function unloads the specified bitmap pBitmap. It will free the private pixel format and the bits of the bitmap.

Parameters:
pBitmap The BITMAP object.
See also:
ncsGetBitmapFromID
void ncsReleaseMyBitmap ( PMYBITMAP  myBmp  ) 

Releases a bitmap.

This function releases the specified MYBITMAP object myBmp.

Parameters:
myBmp The MYBITMAP object.
See also:
ncsGetMyBitmapFromID
const char * ncsSetDefaultLocale ( char *  language,
char *  country 
)

Set default locale information.

Parameters:
language The system language environment.
country The country environment.
Returns:
Locale value.
BOOL ncsSetSysRdr ( HPACKAGE  package,
Uint32  rdrSetId 
)

Set system renderer.

This function set system renderer according to the specified renderer set id rdrSetId.

Parameters:
package The handle of resource package.
rdrSetId The renderer set resource id.
Returns:
TRUE on success, otherwise FALSE.
BOOL ncsSetWinRdr ( HWND  hWnd,
HPACKAGE  package,
Uint32  rdrId 
)

Set window renderer.

This function set window renderer according to the specified renderer id rdrId.

Parameters:
hWnd The handle of window.
package The handle of resource package.
rdrId The renderer resource id.
Returns:
TRUE on success, otherwise FALSE.
void ncsUnloadResPackage ( HPACKAGE  package  ) 

Unload a resource package.

Parameters:
package The handle of resource package.
Generated on Fri Jun 10 11:18:07 2011 for New Control Set V1.0.0 API Reference by  doxygen 1.6.3