2025-09-29 00:06:16 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
#ifndef __MW_CORE_H__
|
|
|
|
|
#define __MW_CORE_H__
|
|
|
|
|
|
|
|
|
|
#include <Mw/MachDep.h>
|
|
|
|
|
#include <Mw/TypeDefs.h>
|
|
|
|
|
|
|
|
|
|
#define MwDispatch(x, y) \
|
2025-09-29 00:19:49 +00:00
|
|
|
if(x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x)
|
2025-09-29 00:06:16 +00:00
|
|
|
|
2025-09-29 00:19:49 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
MWDECL MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height);
|
|
|
|
|
MWDECL MwWidget MwVaCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...);
|
|
|
|
|
MWDECL MwWidget MwVaListCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, va_list va);
|
2025-09-29 00:10:20 +00:00
|
|
|
MWDECL void MwDestroyWidget(MwWidget handle);
|
2025-09-29 00:06:16 +00:00
|
|
|
|
|
|
|
|
MWDECL void MwLoop(MwWidget handle);
|
|
|
|
|
MWDECL void MwStep(MwWidget handle);
|
2025-09-29 00:10:20 +00:00
|
|
|
MWDECL int MwPending(MwWidget handle);
|
2025-09-29 00:06:16 +00:00
|
|
|
|
2025-09-29 00:10:20 +00:00
|
|
|
MWDECL void MwSetInteger(MwWidget handle, const char* key, int n);
|
|
|
|
|
MWDECL void MwSetText(MwWidget handle, const char* key, const char* value);
|
|
|
|
|
MWDECL int MwGetInteger(MwWidget handle, const char* key);
|
2025-09-29 00:06:16 +00:00
|
|
|
MWDECL const char* MwGetText(MwWidget handle, const char* key);
|
2025-09-29 00:10:20 +00:00
|
|
|
MWDECL void MwSetDefault(MwWidget handle);
|
|
|
|
|
MWDECL void MwVaApply(MwWidget handle, ...);
|
|
|
|
|
MWDECL void MwVaListApply(MwWidget handle, va_list va);
|
2025-09-29 00:06:16 +00:00
|
|
|
|
|
|
|
|
MWDECL void MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data);
|
|
|
|
|
MWDECL void MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data);
|
|
|
|
|
|
2025-09-29 00:19:49 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-09-29 00:06:16 +00:00
|
|
|
#endif
|