packign classes... :)

SVN revision: 4354
This commit is contained in:
Carsten Haitzler 2001-03-08 19:33:54 +00:00
parent 845efd93f7
commit f7b571fb1b
5 changed files with 62 additions and 0 deletions

View File

@ -21,6 +21,7 @@ ipc.c \
main.c \
menu.c \
menudb.c \
pack.c \
resist.c \
shelf.c \
util.c \

40
src/e.h
View File

@ -139,6 +139,8 @@ typedef struct _E_Menu E_Menu;
typedef struct _E_Menu_Item E_Menu_Item;
typedef struct _E_Build_Menu E_Build_Menu;
typedef struct _E_Entry E_Entry;
typedef struct _E_Pack_Object_Class E_Pack_Object_Class;
typedef struct _E_Pack_Object E_Pack_Object;
struct _E_Object
{
@ -572,6 +574,44 @@ struct _E_Entry
void *data_focus_out;
};
struct _E_Pack_Object_Class
{
void * (*new) (void);
void (*free) (void *object);
void (*show) (void *object);
void (*hide) (void *object);
void (*raise) (void *object);
void (*lower) (void *object);
void (*layer) (void *object, int l);
void (*evas) (void *object, Evas e);
void (*clip) (void *object, Evas_Object clip);
void (*unclip) (void *object);
void (*move) (void *object, int x, int y);
void (*resize) (void *object, int w, int h);
void (*min) (void *object, int *w, int *h);
void (*max) (void *object, int *w, int *h);
};
struct _E_Pack_Object
{
int type;
E_Pack_Object_Class class;
struct {
Evas evas;
Evas_Object clip;
int layer;
int visible;
int x, y, w, h;
void *object;
} data;
int references;
E_Pack_Object *parent;
Evas_List children;
};
#define DO(_object, _method, _args...) \
{ if (_object->class._method) _object->class._method(_object, ## _args); }
void e_entry_init(void);
void e_entry_free(E_Entry *entry);
E_Entry *e_entry_new(void);

View File

@ -379,6 +379,7 @@ e_entry_new(void)
void
e_entry_handle_keypress(E_Entry *entry, Ev_Key_Down *e)
{
if (!entry->focused) return;
if (!strcmp(e->key, "Up"))
{
}

20
src/pack.c Normal file
View File

@ -0,0 +1,20 @@
#include "e.h"
E_Pack_Object_Class classes[1];
void
e_pack_object_init(void)
{
}
E_Pack_Object *
e_pack_object_new(int type)
{
E_Pack_Object *po;
po = NEW(E_Pack_Object, 1);
ZERO(po, E_Pack_Object, 1);
po->type = type;
po->class = classes[type];
return po;
}