Data Structures | |
struct | _component |
The WinDom COMPONENT representation structure. More... | |
struct | _sliderinfo |
struct | _component |
The WinDom COMPONENT representation structure. More... | |
Defines | |
#define | CPNT_MAXSIZE (LONG_MAX) |
#define | CLT_VERTICAL 0 |
COMPONENT layout type values. | |
#define | CLT_HORIZONTAL 1 |
#define | CLT_STACK 2 |
#define | CS_INTERACTIVE 0x0010 |
COMPONENT status bitmask values. can get CM_GETFOCUS and CM_LOSEFOCUS. | |
#define | CS_HSLIDE 0x0020 |
#define | CS_VSLIDE 0x0040 |
#define | CS_HIDDEN 0x0080 |
#define | CS_CLIP 0x0100 |
#define | CS_PROPORTIONAL 0x0200 |
visible contents proportions changes (needs redraw) on resize | |
#define | CS_IN_USE 0x2000 |
COMPONENT is in use: should not be free-ed (see mt_CompDelete()). | |
#define | CS_DESTROYED 0x4000 |
COMPONENT should be free-ed as soon as possible. | |
#define | CS_RESERVED 0x8000 |
reserved for internal use | |
#define | CM_GETFOCUS 0x44c0 |
COMPONENT special messages. received upon getting focus. | |
#define | CM_LOSEFOCUS 0x44c1 |
received upon losing focus | |
#define | CM_REFLOW 0x44c2 |
reflow the component according to the layout settings | |
#define | CM_REPOSED 0x44c3 |
move&resize the component | |
#define | CF_WINDOW 0x44e0 |
COMPONENT special messages. the WINDOW the component is hooked to or NULL if none. | |
#define | CF_MAXSIZE 0x44e1 |
fixed maximum size rectagle FIXME: rename? | |
#define | CF_HSLIDE 0x44d0 |
FIXME: TODO. | |
#define | CF_VSLIDE 0x44d1 |
FIXME: TODO. | |
#define | CF_FOCUS 0x44d2 |
Focus component pointer. | |
#define | WD_CCRT 0x43435254L |
COMPONENT/WINDOW relation magic values. 'CCRT': component container's root win/component component/window. | |
#define | WD_CCWD 0x43435744L |
'CCWD': component window/window component | |
#define | WD_CWGT 0x43573743L |
'CWGT': window widget component | |
#define | FOR_EACH_CHILD(i, list) |
#define | CDT_SLIDER_POS 0x455f4dUL |
#define | CDT_SLIDER_SIZE 0x455f4eUL |
#define | CDT_SLIDER_CONTROL 0x455f4fUL |
#define | WD_CPNT_HSLIDE_INFO 0x43485349L |
COMPONENT slider data magic data defines. | |
#define | WD_CPNT_VSLIDE_INFO 0x43565349L |
#define | VSLIDERINFO(app, c) ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_VSLIDE_INFO)) |
#define | HSLIDERINFO(app, c) ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_HSLIDE_INFO)) |
Typedefs | |
typedef _component | COMPONENT |
typedef void __CDECL(* | func_comp_evntdata )(COMPONENT *, long buff[8], void *, APPvar *app) |
typedef void __CDECL(* | func_comp_evnt )(COMPONENT *, long buff[8], APPvar *app) |
typedef _sliderinfo | C_SLIDERINFO |
Functions | |
COMPONENT * | mt_CompCreate (APPvar *app, short type, long size, short flex) |
Create a COMPONENT. | |
COMPONENT * | mt_CompFind (APPvar *app, COMPONENT *p, short mx, short my) |
int | mt_CompDelete (APPvar *app, COMPONENT *p) |
Delete a COMPONENT created by mt_CompCreate(). | |
void | mt_CompAttach (APPvar *app, COMPONENT *p, COMPONENT *c) |
Attach a COMPONENT as children of an another COMPONENT. | |
int | mt_CompDataAttach (APPvar *app, COMPONENT *c, long magic, void *data) |
Insert data into the component data list. | |
int | mt_CompDataDelete (APPvar *app, COMPONENT *c, long magic) |
Remove a data linked into a component. | |
void * | mt_CompDataSearch (APPvar *app, COMPONENT *c, long magic) |
Component magic value data search. | |
int | mt_CompSet (APPvar *app, COMPONENT *c, short type, long par1, long par2, long par3, long par4) |
int | mt_CompSetPtr (APPvar *app, COMPONENT *c, short mode, void *par1, void *par2) |
int | mt_CompGetLGrect (APPvar *app, COMPONENT *c, short type, LGRECT *rect) |
void * | mt_CompGetPtr (APPvar *app, COMPONENT *c, short type) |
int | mt_CompEvntAdd (APPvar *app, COMPONENT *p, short msg, func_comp_evnt proc, int mode) |
TODO: DOCS. | |
int | mt_CompEvntDataAdd (APPvar *app, COMPONENT *c, short msg, func_comp_evntdata proc, void *data, int mode) |
TODO: DOCS. | |
int | mt_CompEvntAttach (APPvar *app, COMPONENT *p, short msg, func_comp_evnt proc) |
TODO: DOCS. | |
int | mt_CompEvntDataAttach (APPvar *app, COMPONENT *c, short msg, func_comp_evntdata proc, void *data) |
TODO: DOCS. | |
int | mt_CompEvntExec (APPvar *app, COMPONENT *p, long buff[8]) |
TODO: DOCS. | |
void | mt_CompEvntClear (APPvar *app, COMPONENT *c) |
TODO: DOCS. | |
int | mt_CompEvntRemove (APPvar *app, COMPONENT *c, int msg, void *proc) |
TODO: DOCS. | |
int | mt_CompEvntDelete (APPvar *app, COMPONENT *c, int msg) |
TODO: DOCS. | |
void | mt_CompEvntEnable (APPvar *app, COMPONENT *c, int msg) |
Enable all callback functions bound to an event. | |
void | mt_CompEvntDisable (APPvar *app, COMPONENT *c, int msg) |
Disable all callback functions bound to an event. | |
void | mt_CompEvntRedraw (APPvar *app, COMPONENT *c) |
int | mt_CompSliderAttach (APPvar *app, COMPONENT *p, short type) |
Define a COMPONENT to become slidable. |
This is quite experimental at the moment, but we need feedback to stabilise the component API, so don't hesitate to give it a try, and moreover to stress this API !
#define CDT_SLIDER_CONTROL 0x455f4fUL |
#define CDT_SLIDER_POS 0x455f4dUL |
#define CDT_SLIDER_SIZE 0x455f4eUL |
#define CF_FOCUS 0x44d2 |
Focus component pointer.
#define CF_HSLIDE 0x44d0 |
FIXME: TODO.
#define CF_MAXSIZE 0x44e1 |
fixed maximum size rectagle FIXME: rename?
#define CF_VSLIDE 0x44d1 |
FIXME: TODO.
#define CF_WINDOW 0x44e0 |
COMPONENT special messages. the WINDOW the component is hooked to or NULL if none.
#define CLT_HORIZONTAL 1 |
#define CLT_STACK 2 |
#define CLT_VERTICAL 0 |
COMPONENT layout type values.
#define CM_GETFOCUS 0x44c0 |
COMPONENT special messages. received upon getting focus.
#define CM_LOSEFOCUS 0x44c1 |
received upon losing focus
#define CM_REFLOW 0x44c2 |
reflow the component according to the layout settings
#define CM_REPOSED 0x44c3 |
move&resize the component
#define CPNT_MAXSIZE (LONG_MAX) |
#define CS_CLIP 0x0100 |
#define CS_DESTROYED 0x4000 |
COMPONENT should be free-ed as soon as possible.
#define CS_HIDDEN 0x0080 |
#define CS_HSLIDE 0x0020 |
#define CS_IN_USE 0x2000 |
COMPONENT is in use: should not be free-ed (see mt_CompDelete()).
#define CS_INTERACTIVE 0x0010 |
COMPONENT status bitmask values. can get CM_GETFOCUS and CM_LOSEFOCUS.
#define CS_PROPORTIONAL 0x0200 |
visible contents proportions changes (needs redraw) on resize
#define CS_RESERVED 0x8000 |
reserved for internal use
#define CS_VSLIDE 0x0040 |
#define FOR_EACH_CHILD | ( | i, | |||
list | ) |
Value:
listForEach( COMPONENT *, i, list ) \ if ( !(((COMPONENT*)(i))->status & CS_HIDDEN) )
#define HSLIDERINFO | ( | app, | |||
c | ) | ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_HSLIDE_INFO)) |
#define VSLIDERINFO | ( | app, | |||
c | ) | ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_VSLIDE_INFO)) |
#define WD_CCRT 0x43435254L |
COMPONENT/WINDOW relation magic values. 'CCRT': component container's root win/component component/window.
#define WD_CCWD 0x43435744L |
'CCWD': component window/window component
#define WD_CPNT_HSLIDE_INFO 0x43485349L |
COMPONENT slider data magic data defines.
#define WD_CPNT_VSLIDE_INFO 0x43565349L |
#define WD_CWGT 0x43573743L |
'CWGT': window widget component
typedef struct _sliderinfo C_SLIDERINFO |
typedef struct _component COMPONENT |
typedef void __CDECL(* func_comp_evnt)(COMPONENT *, long buff[8], APPvar *app) |
typedef void __CDECL(* func_comp_evntdata)(COMPONENT *, long buff[8], void *, APPvar *app) |
Attach a COMPONENT as children of an another COMPONENT.
app | application descriptor, | |
p | parent component, | |
c | children component. |
Create a COMPONENT.
app | application descriptor, | |
type | Component layout type :
| |
size | size of compoment, avalaible with CLT_VERTICAL and CLT_HORIZONTAL, | |
flex | flexibility of the component. 0 means fixed size. |
Insert data into the component data list.
app | application descriptor, | |
c | component descriptor, | |
magic | magic number identifying data, | |
data | data to link. |
Remove a data linked into a component.
app | application descriptor, | |
magic | magic number identifying data, | |
c | component descriptor. |
Component magic value data search.
app | application descriptor, | |
c | component descriptor to inspect, | |
magic | data magic number to search, |
Delete a COMPONENT created by mt_CompCreate().
This issues the WM_DESTROY event on the particular component and calls itself recursively on the children. After that it deletes and COMPONENT internal data and finally the p
instance itself.
app | application descriptor, | |
p | component to delete. |
int mt_CompEvntAdd | ( | APPvar * | app, | |
COMPONENT * | c, | |||
short | msg, | |||
func_comp_evnt | proc, | |||
int | mode | |||
) |
TODO: DOCS.
app | application descriptor | |
c | ||
msg | ||
proc | ||
mode |
int mt_CompEvntAttach | ( | APPvar * | app, | |
COMPONENT * | c, | |||
short | msg, | |||
func_comp_evnt | proc | |||
) |
TODO: DOCS.
app | application descriptor | |
c | ||
msg | ||
proc |
TODO: DOCS.
app | application descriptor | |
c |
int mt_CompEvntDataAdd | ( | APPvar * | app, | |
COMPONENT * | c, | |||
short | msg, | |||
func_comp_evntdata | proc, | |||
void * | data, | |||
int | mode | |||
) |
TODO: DOCS.
app | application descriptor | |
c | ||
msg | ||
proc | ||
data | ||
mode |
int mt_CompEvntDataAttach | ( | APPvar * | app, | |
COMPONENT * | c, | |||
short | msg, | |||
func_comp_evntdata | proc, | |||
void * | data | |||
) |
TODO: DOCS.
app | application descriptor | |
c | ||
msg | ||
proc | ||
data |
TODO: DOCS.
app | application descriptor | |
c | ||
msg |
Disable all callback functions bound to an event.
app | application descriptor, | |
c | component descriptor. | |
msg | event to disable. |
Enable all callback functions bound to an event.
app | application descriptor, | |
c | target component | |
msg | event to enable. |
TODO: DOCS.
app | application descriptor | |
p | ||
buff |
TODO: DOCS.
app | application descriptor | |
c | ||
msg | ||
proc |
int mt_CompSet | ( | APPvar * | app, | |
COMPONENT * | c, | |||
short | type, | |||
long | par1, | |||
long | par2, | |||
long | par3, | |||
long | par4 | |||
) |
Define a COMPONENT to become slidable.
app | application descriptor, | |
p | targeted component, | |
type | type of slider to define :
|