Mercurial > projects > dwt-linux
diff dwt/widgets/Widget.d @ 26:09f5459a5014
Display in work
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 08 Jan 2008 08:07:04 +0100 |
parents | fc2b263b8a3f |
children | ffa3c27c4328 |
line wrap: on
line diff
--- a/dwt/widgets/Widget.d Tue Jan 08 01:23:25 2008 +0100 +++ b/dwt/widgets/Widget.d Tue Jan 08 08:07:04 2008 +0100 @@ -10,8 +10,38 @@ *******************************************************************************/ module dwt.widgets.Widget; +import dwt.internal.gtk.c.gtktypes; +import dwt.internal.gtk.c.gdktypes; + class Widget{ + static const int DISPOSED = 1<<0; + static const int CANVAS = 1<<1; + static const int KEYED_DATA = 1<<2; + static const int HANDLE = 1<<3; + static const int DISABLED = 1<<4; + static const int MENU = 1<<5; + static const int OBSCURED = 1<<6; + static const int MOVED = 1<<7; + static const int RESIZED = 1<<8; + static const int ZERO_WIDTH = 1<<9; + static const int ZERO_HEIGHT = 1<<10; + static const int HIDDEN = 1<<11; + static const int FOREGROUND = 1<<12; + static const int BACKGROUND = 1<<13; + static const int FONT = 1<<14; + static const int PARENT_BACKGROUND = 1<<15; + static const int THEME_BACKGROUND = 1<<16; + int style, state; + int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, GtkWidget* data) { + return 0; + } + void fixedMapProc (GtkWidget* widget) { + } +void rendererGetSizeProc(GtkCellRenderer *cell, GtkWidget *handle, GdkRectangle *cell_area, int *x_offset, int *y_offset, int *width, int *height); +void rendererRenderProc (GtkCellRenderer * cell, GdkDrawable * window, GtkWidget * handle, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, int flags); + } + /++ import dwt.SWT; import dwt.internal.*; @@ -62,106 +92,106 @@ Object data; /* Global state flags */ - static final int DISPOSED = 1<<0; - static final int CANVAS = 1<<1; - static final int KEYED_DATA = 1<<2; - static final int HANDLE = 1<<3; - static final int DISABLED = 1<<4; - static final int MENU = 1<<5; - static final int OBSCURED = 1<<6; - static final int MOVED = 1<<7; - static final int RESIZED = 1<<8; - static final int ZERO_WIDTH = 1<<9; - static final int ZERO_HEIGHT = 1<<10; - static final int HIDDEN = 1<<11; - static final int FOREGROUND = 1<<12; - static final int BACKGROUND = 1<<13; - static final int FONT = 1<<14; - static final int PARENT_BACKGROUND = 1<<15; - static final int THEME_BACKGROUND = 1<<16; + static const int DISPOSED = 1<<0; + static const int CANVAS = 1<<1; + static const int KEYED_DATA = 1<<2; + static const int HANDLE = 1<<3; + static const int DISABLED = 1<<4; + static const int MENU = 1<<5; + static const int OBSCURED = 1<<6; + static const int MOVED = 1<<7; + static const int RESIZED = 1<<8; + static const int ZERO_WIDTH = 1<<9; + static const int ZERO_HEIGHT = 1<<10; + static const int HIDDEN = 1<<11; + static const int FOREGROUND = 1<<12; + static const int BACKGROUND = 1<<13; + static const int FONT = 1<<14; + static const int PARENT_BACKGROUND = 1<<15; + static const int THEME_BACKGROUND = 1<<16; /* A layout was requested on this widget */ - static final int LAYOUT_NEEDED = 1<<17; + static const int LAYOUT_NEEDED = 1<<17; /* The preferred size of a child has changed */ - static final int LAYOUT_CHANGED = 1<<18; + static const int LAYOUT_CHANGED = 1<<18; /* A layout was requested in this widget hierachy */ - static final int LAYOUT_CHILD = 1<<19; + static const int LAYOUT_CHILD = 1<<19; /* More global state flags */ - static final int RELEASED = 1<<20; - static final int DISPOSE_SENT = 1<<21; - static final int FOREIGN_HANDLE = 1<<22; - static final int DRAG_DETECT = 1<<23; + static const int RELEASED = 1<<20; + static const int DISPOSE_SENT = 1<<21; + static const int FOREIGN_HANDLE = 1<<22; + static const int DRAG_DETECT = 1<<23; /* Default size for widgets */ - static final int DEFAULT_WIDTH = 64; - static final int DEFAULT_HEIGHT = 64; + static const int DEFAULT_WIDTH = 64; + static const int DEFAULT_HEIGHT = 64; /* GTK signals data */ - static final int ACTIVATE = 1; - static final int BUTTON_PRESS_EVENT = 2; - static final int BUTTON_PRESS_EVENT_INVERSE = 3; - static final int BUTTON_RELEASE_EVENT = 4; - static final int BUTTON_RELEASE_EVENT_INVERSE = 5; - static final int CHANGED = 6; - static final int CHANGE_VALUE = 7; - static final int CLICKED = 8; - static final int COMMIT = 9; - static final int CONFIGURE_EVENT = 10; - static final int DELETE_EVENT = 11; - static final int DELETE_RANGE = 12; - static final int DELETE_TEXT = 13; - static final int ENTER_NOTIFY_EVENT = 14; - static final int EVENT = 15; - static final int EVENT_AFTER = 16; - static final int EXPAND_COLLAPSE_CURSOR_ROW = 17; - static final int EXPOSE_EVENT = 18; - static final int EXPOSE_EVENT_INVERSE = 19; - static final int FOCUS = 20; - static final int FOCUS_IN_EVENT = 21; - static final int FOCUS_OUT_EVENT = 22; - static final int GRAB_FOCUS = 23; - static final int HIDE = 24; - static final int INPUT = 25; - static final int INSERT_TEXT = 26; - static final int KEY_PRESS_EVENT = 27; - static final int KEY_RELEASE_EVENT = 28; - static final int LEAVE_NOTIFY_EVENT = 29; - static final int MAP = 30; - static final int MAP_EVENT = 31; - static final int MNEMONIC_ACTIVATE = 32; - static final int MOTION_NOTIFY_EVENT = 33; - static final int MOTION_NOTIFY_EVENT_INVERSE = 34; - static final int MOVE_FOCUS = 35; - static final int OUTPUT = 36; - static final int POPUP_MENU = 37; - static final int PREEDIT_CHANGED = 38; - static final int REALIZE = 39; - static final int ROW_ACTIVATED = 40; - static final int SCROLL_CHILD = 41; - static final int SCROLL_EVENT = 42; - static final int SELECT = 43; - static final int SHOW = 44; - static final int SHOW_HELP = 45; - static final int SIZE_ALLOCATE = 46; - static final int STYLE_SET = 47; - static final int SWITCH_PAGE = 48; - static final int TEST_COLLAPSE_ROW = 49; - static final int TEST_EXPAND_ROW = 50; - static final int TEXT_BUFFER_INSERT_TEXT = 51; - static final int TOGGLED = 52; - static final int UNMAP = 53; - static final int UNMAP_EVENT = 54; - static final int UNREALIZE = 55; - static final int VALUE_CHANGED = 56; - static final int VISIBILITY_NOTIFY_EVENT = 57; - static final int WINDOW_STATE_EVENT = 58; - static final int ACTIVATE_INVERSE = 59; - static final int DAY_SELECTED = 60; - static final int MONTH_CHANGED = 61; - static final int LAST_SIGNAL = 62; + static const int ACTIVATE = 1; + static const int BUTTON_PRESS_EVENT = 2; + static const int BUTTON_PRESS_EVENT_INVERSE = 3; + static const int BUTTON_RELEASE_EVENT = 4; + static const int BUTTON_RELEASE_EVENT_INVERSE = 5; + static const int CHANGED = 6; + static const int CHANGE_VALUE = 7; + static const int CLICKED = 8; + static const int COMMIT = 9; + static const int CONFIGURE_EVENT = 10; + static const int DELETE_EVENT = 11; + static const int DELETE_RANGE = 12; + static const int DELETE_TEXT = 13; + static const int ENTER_NOTIFY_EVENT = 14; + static const int EVENT = 15; + static const int EVENT_AFTER = 16; + static const int EXPAND_COLLAPSE_CURSOR_ROW = 17; + static const int EXPOSE_EVENT = 18; + static const int EXPOSE_EVENT_INVERSE = 19; + static const int FOCUS = 20; + static const int FOCUS_IN_EVENT = 21; + static const int FOCUS_OUT_EVENT = 22; + static const int GRAB_FOCUS = 23; + static const int HIDE = 24; + static const int INPUT = 25; + static const int INSERT_TEXT = 26; + static const int KEY_PRESS_EVENT = 27; + static const int KEY_RELEASE_EVENT = 28; + static const int LEAVE_NOTIFY_EVENT = 29; + static const int MAP = 30; + static const int MAP_EVENT = 31; + static const int MNEMONIC_ACTIVATE = 32; + static const int MOTION_NOTIFY_EVENT = 33; + static const int MOTION_NOTIFY_EVENT_INVERSE = 34; + static const int MOVE_FOCUS = 35; + static const int OUTPUT = 36; + static const int POPUP_MENU = 37; + static const int PREEDIT_CHANGED = 38; + static const int REALIZE = 39; + static const int ROW_ACTIVATED = 40; + static const int SCROLL_CHILD = 41; + static const int SCROLL_EVENT = 42; + static const int SELECT = 43; + static const int SHOW = 44; + static const int SHOW_HELP = 45; + static const int SIZE_ALLOCATE = 46; + static const int STYLE_SET = 47; + static const int SWITCH_PAGE = 48; + static const int TEST_COLLAPSE_ROW = 49; + static const int TEST_EXPAND_ROW = 50; + static const int TEXT_BUFFER_INSERT_TEXT = 51; + static const int TOGGLED = 52; + static const int UNMAP = 53; + static const int UNMAP_EVENT = 54; + static const int UNREALIZE = 55; + static const int VALUE_CHANGED = 56; + static const int VISIBILITY_NOTIFY_EVENT = 57; + static const int WINDOW_STATE_EVENT = 58; + static const int ACTIVATE_INVERSE = 59; + static const int DAY_SELECTED = 60; + static const int MONTH_CHANGED = 61; + static const int LAST_SIGNAL = 62; /** * Prevents uninitialized instances from being created outside the package.