mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
fix pixmap leak
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@82 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -106,6 +106,14 @@ MWDECL void MwSetInteger(MwWidget handle, const char* key, int n);
|
||||
*/
|
||||
MWDECL void MwSetText(MwWidget handle, const char* key, const char* value);
|
||||
|
||||
/*!
|
||||
* %brief Sets a void pointer property
|
||||
* %param handle Widget
|
||||
* %param key Key
|
||||
* %param value Value
|
||||
*/
|
||||
MWDECL void MwSetVoid(MwWidget handle, const char* key, void* value);
|
||||
|
||||
/*!
|
||||
* %brief Gets the integer property
|
||||
* %param handle Widget
|
||||
@@ -122,6 +130,14 @@ MWDECL int MwGetInteger(MwWidget handle, const char* key);
|
||||
*/
|
||||
MWDECL const char* MwGetText(MwWidget handle, const char* key);
|
||||
|
||||
/*!
|
||||
* %brief Gets the void pointer property
|
||||
* %param handle Widget
|
||||
* %param key Key
|
||||
* %return Value
|
||||
*/
|
||||
MWDECL void* MwGetVoid(MwWidget handle, const char* key);
|
||||
|
||||
/*!
|
||||
* %brief Sets the default property
|
||||
* %param handle Widget
|
||||
|
||||
@@ -60,6 +60,14 @@ MWDECL void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int in
|
||||
*/
|
||||
MWDECL void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color);
|
||||
|
||||
/*!
|
||||
* %brief Creates a pixmap from image
|
||||
* %param handle Widget
|
||||
* %param path Path
|
||||
* %return Pixmap
|
||||
*/
|
||||
MWDECL MwLLPixmap MwLoadImage(MwWidget handle, const char* path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#define MwNbackground "Sbackground"
|
||||
#define MwNforeground "Sforeground"
|
||||
|
||||
#define MwNpixmap "Vpixmap"
|
||||
|
||||
#define MwNactivateHandler "Cactivate"
|
||||
#define MwNresizeHandler "Cresize"
|
||||
#define MwNtickHandler "Ctick"
|
||||
|
||||
@@ -14,6 +14,7 @@ typedef struct _MwRect MwRect;
|
||||
typedef struct _MwIntegerKeyValue MwIntegerKeyValue;
|
||||
typedef struct _MwTextKeyValue MwTextKeyValue;
|
||||
typedef struct _MwUserHandlerKeyValue MwUserHandlerKeyValue;
|
||||
typedef struct _MwVoidKeyValue MwVoidKeyValue;
|
||||
typedef struct _MwFont MwFont;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _MwWidget *MwWidget, MwWidgetRec;
|
||||
@@ -56,6 +57,11 @@ struct _MwUserHandlerKeyValue {
|
||||
MwUserHandler value;
|
||||
};
|
||||
|
||||
struct _MwVoidKeyValue {
|
||||
char* key;
|
||||
void* value;
|
||||
};
|
||||
|
||||
#ifdef _MILSKO
|
||||
struct _MwWidget {
|
||||
char* name;
|
||||
@@ -74,6 +80,7 @@ struct _MwWidget {
|
||||
MwIntegerKeyValue* integer;
|
||||
MwTextKeyValue* text;
|
||||
MwUserHandlerKeyValue* handler;
|
||||
MwVoidKeyValue* data;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,11 +19,15 @@
|
||||
struct _MwLL {
|
||||
Display* display;
|
||||
Window window;
|
||||
Pixmap pixmap;
|
||||
GC gc;
|
||||
Colormap colormap;
|
||||
void* user;
|
||||
Atom wm_delete;
|
||||
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
MwLLHandler handler;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user