mi32/micon.h File Reference

<mi32/micon.h> Definitions for portable "icon" functions More...

#include <mi32/stddefns.h>
#include <mi32/iconid.h>
#include <mi32/simplear.h>

Include dependency graph for micon.h:

mi32/stddefns.hmi32/iconid.hmi32/simplear.hmi32/dlldefns.hmi32/sort.hmi32/memalloc.hmi32/membuf.hstring.h

Go to the source code of this file.

Classes

struct  MICONSTRUCT

Enumerations

enum  MICONFLAGS {
  MICONFLAG_None = 0x0000, MICONFLAG_Stippled = 0x0001, MICONFLAG_DefaultBackground = 0x0002, MICONFLAG_StippledSelected = 0x0008,
  MICONFLAG_SizeMask = 0x0FF0, MICONFLAG_Size16 = 0x0100, MICONFLAG_Size32 = 0x0200, MICONFLAG_NoDarkenSelected = 0x1000,
  MICONFLAG_DisplayError = 0x2000
}

Functions

 DEFINE_ENUM_OPERATORS (MICONFLAGS)
 DEPRECATED_MSG ("Use MICONSTRUCT*") typedef MICONSTRUCT *MICON
int MiconCreate (MICONSTRUCT **icon, ICONID iconid, MPIXEL bgpixel, UINT8 width, UINT8 height, UINT32 flags)
int MiconCreate (MICONSTRUCT **icon, const char *group, const char *name, MPIXEL bgpixel, UINT8 width, UINT8 height, UINT32 flags)
void MiconDestroy (MICONSTRUCT *icon)
UINT8 MiconGetHeight (const MICONSTRUCT *icon)
UINT8 MiconGetWidth (const MICONSTRUCT *icon)
ERRVALUE MiconOpen (RVC::STYLE &Object, const MIUNICODE *group)
ERRVALUE MiconOpen (RVC::STYLE &Object, const FILEPATH &filepath, const MIUNICODE *group)
ERRVALUE MiconRead (const char *group, const char *name, RVC::STYLEPATTERN_BITMAP &pattern)
ERRVALUE MiconRead (ICONID iconid, RVC::STYLEPATTERN_BITMAP &pattern)
ERRVALUE MiconRead (ICONID iconid, SIMPLE_ARRAY< UINT32 > &data)
ERRVALUE MiconRead (ICONID iconid, MICONSTRUCT **normalicon, MICONSTRUCT **armselicon, MPIXEL normalbg, MPIXEL armselbg, MICONFLAGS flags=MICONFLAG_None)
ERRVALUE MiconRead (ICONID iconid, MICONSTRUCT **normalicon, MICONSTRUCT **armselicon=0, MICONFLAGS flags=MICONFLAG_None)
int MiconRead (const char *group, const char *name, MICONSTRUCT **normalicon, MICONSTRUCT **armeselicon, UINT32 flags)
int MiconRead (const char *group, const char *name, MICONSTRUCT **normalicon, MICONSTRUCT **armselicon, MPIXEL normalbg, MPIXEL armselbg, UINT32 flags, RVC::STYLE *StyleObj=0)
int MiconReadPatternExt (RVC::STYLE &StyleObj, INT32 pattnum, const MIUNICODE *name, int width, int height, SIMPLE_ARRAY< UINT8 > &pattdata)


Detailed Description

<mi32/micon.h> Definitions for portable "icon" functions

Definition in file micon.h.


Enumeration Type Documentation

enum MICONFLAGS

Enumeration for flags used in various Micon functions.

Enumerator:
MICONFLAG_None  No flags specified.
MICONFLAG_Stippled  Create a "dimmed" pixmap as well as a normal pixmap.
MICONFLAG_DefaultBackground  Use MxTopLevel()'s XmNbackground resource.
MICONFLAG_StippledSelected  Create "dimmed" pixmap for armed/selected state.
MICONFLAG_SizeMask  Bit mask for sizes from 1 to 255.
MICONFLAG_Size16  Resize icon to 16 by 16 if smaller.
MICONFLAG_Size32  Resize icon to 32 by 32 if smaller.
MICONFLAG_NoDarkenSelected  Don't darken background for "selected" state.
MICONFLAG_DisplayError  Display icon reading error even in non-programmer mode.

Definition at line 96 of file micon.h.


Function Documentation

DEFINE_ENUM_OPERATORS ( MICONFLAGS   ) 

DEPRECATED_MSG ( "Use MICONSTRUCT*"   ) 

int MiconCreate ( MICONSTRUCT **  icon,
ICONID  iconid,
MPIXEL  bgpixel,
UINT8  width,
UINT8  height,
UINT32  flags 
)

Create new icon using ICONID.

Flags: MICONFLAG_DefaultBackground Use MxTopLevel()'s XmNbackground resource MICONFLAG_SizeMask Bit mask for sizes from 1 to 255 MICONFLAG_Size16 16 by 16 MICONFLAG_Size32 32 by 32 MICONFLAG_Stippled Create a "dimmed" pixmap as well as a normal pixmap

Parameters:
icon  Icon returned
iconid  Icon ID
bgpixel  Background pixel
width  Icon width (0 to use value from file)
height  Icon height (0 to use value from file)
flags  Flags

int MiconCreate ( MICONSTRUCT **  icon,
const char *  group,
const char *  name,
MPIXEL  bgpixel,
UINT8  width,
UINT8  height,
UINT32  flags 
)

Create new icon.

Flags: MICONFLAG_DefaultBackground Use MxTopLevel()'s XmNbackground resource MICONFLAG_SizeMask Bit mask for sizes from 1 to 255 MICONFLAG_Size16 16 by 16 MICONFLAG_Size32 32 by 32 MICONFLAG_Stippled Create a "dimmed" pixmap as well as a normal pixmap

Parameters:
icon  Icon returned
group  Icon group, NULL for "standard"
name  Icon name
bgpixel  Background pixel
width  Icon width (0 to use value from file)
height  Icon height (0 to use value from file)
flags  Flags

void MiconDestroy ( MICONSTRUCT icon  ) 

Destroy icon.

Parameters:
icon  Icon to destroy

UINT8 MiconGetHeight ( const MICONSTRUCT icon  )  [inline]

Get icon height in pixels.

Parameters:
icon  Icon to use

Definition at line 198 of file micon.h.

UINT8 MiconGetWidth ( const MICONSTRUCT icon  )  [inline]

Get icon width in pixels.

Parameters:
icon  Icon to use

Definition at line 203 of file micon.h.

ERRVALUE MiconOpen ( RVC::STYLE Object,
const MIUNICODE group 
)

Open icon group in icons.ref.

Parameters:
Object  Style object to open
group  Icon group name

ERRVALUE MiconOpen ( RVC::STYLE Object,
const FILEPATH filepath,
const MIUNICODE group 
)

Open icon group in user-specified icon file.

Parameters:
Object  Style object to open
filepath  Icon file to open
group  Icon group name

ERRVALUE MiconRead ( const char *  group,
const char *  name,
RVC::STYLEPATTERN_BITMAP pattern 
)

Parameters:
group  Icon group, NULL for "standard"
name  Icon name

ERRVALUE MiconRead ( ICONID  iconid,
RVC::STYLEPATTERN_BITMAP pattern 
)

ERRVALUE MiconRead ( ICONID  iconid,
SIMPLE_ARRAY< UINT32 > &  data 
)

Read icon for use as a _NET_WM_ICON X window property The data returned is an array of 32-bit values in the local byte-order (the X server worries about byte swapping if necessary).

Format is height followed by width, followed by height*width 32-bit color values in ARGB order.

Parameters:
iconid  Icon ID
data  Icon data returned

ERRVALUE MiconRead ( ICONID  iconid,
MICONSTRUCT **  normalicon,
MICONSTRUCT **  armselicon,
MPIXEL  normalbg,
MPIXEL  armselbg,
MICONFLAGS  flags = MICONFLAG_None 
)

Read icon for use with widget with background pixel override.

Parameters:
iconid  Icon ID
normalicon  Icon with "normal" colors returned, NULL if don't need
armselicon  Icon with "armed/selected" colors returned, NULL if don't need
normalbg  Normal background pixel if default not used
armselbg  Armed/selected background pixel if default not used
flags  Flags

ERRVALUE MiconRead ( ICONID  iconid,
MICONSTRUCT **  normalicon,
MICONSTRUCT **  armselicon = 0,
MICONFLAGS  flags = MICONFLAG_None 
)

Read icon for use with widget.

Parameters:
iconid  Icon ID
normalicon  Icon with "normal" colors returned, NULL if don't need
armselicon  Icon with "armed/selected" colors returned, NULL if don't need
flags  Flags

int MiconRead ( const char *  group,
const char *  name,
MICONSTRUCT **  normalicon,
MICONSTRUCT **  armeselicon,
UINT32  flags 
)

Read icon(s) in standard format for use with widget.

Flags: MICONFLAG_DefaultBackground Use MxTopLevel()'s XmNbackground resource MICONFLAG_NoDarkenSelected Don't darken background for "armed/selected" state MICONFLAG_SizeMask Bit mask for sizes from 1 to 255 MICONFLAG_Size16 16 by 16 MICONFLAG_Size32 32 by 32 MICONFLAG_Stippled Create a "dimmed" pixmap as well as a normal pixmap

Parameters:
group  Icon group, NULL for "standard"
name  Icon name
normalicon  Icon with "normal" colors returned, NULL if don't need
armeselicon  Icon with "armed/selected" colors returned, NULL if don't need
flags  Flags

int MiconRead ( const char *  group,
const char *  name,
MICONSTRUCT **  normalicon,
MICONSTRUCT **  armselicon,
MPIXEL  normalbg,
MPIXEL  armselbg,
UINT32  flags,
RVC::STYLE StyleObj = 0 
)

Read icon(s) in standard format for use with widget.

Flags: MICONFLAG_DefaultBackground Use MxTopLevel()'s XmNbackground resource MICONFLAG_NoDarkenSelected Don't darken background for "armed/selected" state MICONFLAG_SizeMask Bit mask for sizes from 1 to 255 MICONFLAG_Size16 16 by 16 MICONFLAG_Size32 32 by 32 MICONFLAG_Stippled Create a "dimmed" pixmap as well as a normal pixmap

Parameters:
group  Icon group, NULL for "standard"
name  Icon name
normalicon  Icon with "normal" colors returned, NULL if don't need
armselicon  Icon with "armed/selected" colors returned, NULL if don't need
normalbg  Normal background pixel if default not used
armselbg  Armed/selected background pixel if default not used
flags  Flags

int MiconReadPatternExt ( RVC::STYLE StyleObj,
INT32  pattnum,
const MIUNICODE name,
int  width,
int  height,
SIMPLE_ARRAY< UINT8 > &  pattdata 
)

Parameters:
pattnum  Pattern number if known
name  Icon name
width  Width, 0 for value from file
height  Height, 0 for value from file
pattdata  Pattern buffer allocated and returned


Generated on Thu Apr 26 04:08:05 2007 for TNTsdk by  doxygen 1.5.2