diff options
author | Owen Taylor <otaylor@gtk.org> | 1998-06-15 21:27:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-06-15 21:27:17 +0000 |
commit | 48a9f44f3172d362eab8a0084865b42084cef383 (patch) | |
tree | 3b700a14292130d483e58d7c9164ee23826f1269 /gtk | |
parent | e144ff2bb588d9e0f2c6237aaa6b9d4c3ec04d6e (diff) | |
download | gtk+-48a9f44f3172d362eab8a0084865b42084cef383.tar.gz |
gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h gtk/Makefile.am gtk/makenums.pl
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/Makefile.am gtk/gtk.h gtk/gtkfontsel.[ch] gtk/testgtk.c:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget,
and a simple example for testgtk.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/Makefile.am | 18 | ||||
-rw-r--r-- | gtk/gtk.defs | 1163 | ||||
-rw-r--r-- | gtk/gtk.h | 1 | ||||
-rw-r--r-- | gtk/gtkdebug.h | 8 | ||||
-rw-r--r-- | gtk/gtkentry.c | 27 | ||||
-rw-r--r-- | gtk/gtkenums.h | 331 | ||||
-rw-r--r-- | gtk/gtkobject.h | 25 | ||||
-rw-r--r-- | gtk/gtkpacker.h | 59 | ||||
-rw-r--r-- | gtk/gtkprivate.h | 17 | ||||
-rw-r--r-- | gtk/gtktext.c | 38 | ||||
-rw-r--r-- | gtk/gtktoolbar.h | 5 | ||||
-rw-r--r-- | gtk/gtktypebuiltins.h | 98 | ||||
-rw-r--r-- | gtk/gtktypebuiltins_evals.c | 777 | ||||
-rw-r--r-- | gtk/gtktypebuiltins_ids.c | 192 | ||||
-rw-r--r-- | gtk/gtktypebuiltins_vars.c | 96 | ||||
-rw-r--r-- | gtk/gtktypeutils.h | 45 | ||||
-rw-r--r-- | gtk/gtkwidget.h | 31 | ||||
-rw-r--r-- | gtk/maketypes.awk | 27 | ||||
-rw-r--r-- | gtk/testgtk.c | 40 |
19 files changed, 1672 insertions, 1326 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am index d6503478d7..0de1799f50 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -32,6 +32,7 @@ libgtk_1_1_la_SOURCES = \ gtkeventbox.c \ gtkfilesel.c \ gtkfixed.c \ + gtkfontsel.c \ gtkframe.c \ gtkgamma.c \ gtkgc.c \ @@ -134,6 +135,7 @@ gtkinclude_HEADERS = \ gtkfeatures.h \ gtkfilesel.h \ gtkfixed.h \ + gtkfontsel.h \ gtkframe.h \ gtkgamma.h \ gtkgc.h \ @@ -212,9 +214,10 @@ auto-files: make $(srcdir)/gtktypebuiltins.h # generate gtk.defs file from gtk-boxed.defs and gcc -E -$(srcdir)/gtk.defs: @MAINT@ makeenums.awk makeenums.h gtk-boxed.defs - $(COMPILE) -E -DG_CODE_GENERATION $(srcdir)/makeenums.h $(CFLAGS) | \ - awk -f $(srcdir)/makeenums.awk - defs > $@ +$(srcdir)/gtk.defs: @MAINT@ makeenums.pl gtk-boxed.defs + srcdir=$(srcdir) \ + perl $(srcdir)/makeenums.pl defs $(srcdir)/gtk*.h \ + $(top_srcdir)/gdk/gdk*.h > $@ cat $(srcdir)/gtk-boxed.defs >> $@ # generate type identifier header (GTK_TYPE_WIDGET_FLAGS) @@ -229,10 +232,11 @@ $(srcdir)/gtktypebuiltins_vars.c: @MAINT@ $(srcdir)/gtk.defs maketypes.awk $(srcdir)/gtktypebuiltins_ids.c: @MAINT@ $(srcdir)/gtk.defs maketypes.awk awk -f $(srcdir)/maketypes.awk $(srcdir)/gtk.defs entries > $@ -# generate enum value arrays from gcc -E -$(srcdir)/gtktypebuiltins_evals.c: @MAINT@ makeenums.awk makeenums.h $(srcdir)/gtk.defs - $(COMPILE) -E -DG_CODE_GENERATION $(srcdir)/makeenums.h $(CFLAGS) | \ - awk -f $(srcdir)/makeenums.awk - arrays > $@ +# generate enum value arrays +$(srcdir)/gtktypebuiltins_evals.c: @MAINT@ makeenums.pl $(srcdir)/gtk.defs + srcdir=$(srcdir) \ + perl $(srcdir)/makeenums.pl arrays $(srcdir)/gtk*.h \ + $(top_srcdir)/gdk/gdk*.h > $@ # special remake rules #$(srcdir)/gtk.defs: @MAINT@ $(srcdir)/makeenums.awk diff --git a/gtk/gtk.defs b/gtk/gtk.defs index 94fa013226..736827288b 100644 --- a/gtk/gtk.defs +++ b/gtk/gtk.defs @@ -1,608 +1,741 @@ ;; generated by makeenums.awk ; -*- scheme -*- -; enumerations from "gdktypes.h" +; enumerations from "../../gtk+/gtk/gtkclist.h" -(define-enum GdkWindowType - (root GDK_WINDOW_ROOT) - (toplevel GDK_WINDOW_TOPLEVEL) - (child GDK_WINDOW_CHILD) - (dialog GDK_WINDOW_DIALOG) - (temp GDK_WINDOW_TEMP) - (pixmap GDK_WINDOW_PIXMAP) - (foreign GDK_WINDOW_FOREIGN)) +(define-enum GtkCellType + (empty GTK_CELL_EMPTY) + (text GTK_CELL_TEXT) + (pixmap GTK_CELL_PIXMAP) + (pixtext GTK_CELL_PIXTEXT) + (widget GTK_CELL_WIDGET)) -(define-enum GdkWindowClass - (input-output GDK_INPUT_OUTPUT) - (input-only GDK_INPUT_ONLY)) +; enumerations from "../../gtk+/gtk/gtkctree.h" -(define-enum GdkImageType - (normal GDK_IMAGE_NORMAL) - (shared GDK_IMAGE_SHARED) - (fastest GDK_IMAGE_FASTEST)) +(define-enum GtkCTreePos + (before GTK_CTREE_POS_BEFORE) + (as-child GTK_CTREE_POS_AS_CHILD) + (after GTK_CTREE_POS_AFTER)) -(define-enum GdkVisualType - (static-gray GDK_VISUAL_STATIC_GRAY) - (grayscale GDK_VISUAL_GRAYSCALE) - (static-color GDK_VISUAL_STATIC_COLOR) - (pseudo-color GDK_VISUAL_PSEUDO_COLOR) - (true-color GDK_VISUAL_TRUE_COLOR) - (direct-color GDK_VISUAL_DIRECT_COLOR)) +(define-enum GtkCTreeLineStyle + (solid GTK_CTREE_LINES_SOLID) + (dotted GTK_CTREE_LINES_DOTTED) + (none GTK_CTREE_LINES_NONE)) -(define-enum GdkFontType - (font GDK_FONT_FONT) - (fontset GDK_FONT_FONTSET)) +; enumerations from "../../gtk+/gtk/gtkdebug.h" -(define-flags GdkWindowAttributesType - (title GDK_WA_TITLE) - (x GDK_WA_X) - (y GDK_WA_Y) - (cursor GDK_WA_CURSOR) - (colormap GDK_WA_COLORMAP) - (visual GDK_WA_VISUAL) - (wmclass GDK_WA_WMCLASS) - (noredir GDK_WA_NOREDIR)) +(define-flags GtkDebugFlag + (objects GTK_DEBUG_OBJECTS) + (misc GTK_DEBUG_MISC) + (signals GTK_DEBUG_SIGNALS)) -(define-flags GdkWindowHints - (pos GDK_HINT_POS) - (min-size GDK_HINT_MIN_SIZE) - (max-size GDK_HINT_MAX_SIZE)) +; enumerations from "../../gtk+/gtk/gtkenums.h" -(define-enum GdkFunction - (copy GDK_COPY) - (invert GDK_INVERT) - (xor GDK_XOR)) +(define-flags GtkAccelFlags + (visible GTK_ACCEL_VISIBLE) + (signal-visible GTK_ACCEL_SIGNAL_VISIBLE) + (locked GTK_ACCEL_LOCKED) + (mask GTK_ACCEL_MASK)) -(define-enum GdkFill - (solid GDK_SOLID) - (tiled GDK_TILED) - (stippled GDK_STIPPLED) - (opaque-stippled GDK_OPAQUE_STIPPLED)) +(define-enum GtkArrowType + (up GTK_ARROW_UP) + (down GTK_ARROW_DOWN) + (left GTK_ARROW_LEFT) + (right GTK_ARROW_RIGHT)) -(define-enum GdkFillRule - (even-odd-rule GDK_EVEN_ODD_RULE) - (winding-rule GDK_WINDING_RULE)) +(define-flags GtkAttachOptions + (expand GTK_EXPAND) + (shrink GTK_SHRINK) + (fill GTK_FILL)) -(define-enum GdkLineStyle - (solid GDK_LINE_SOLID) - (on-off-dash GDK_LINE_ON_OFF_DASH) - (double-dash GDK_LINE_DOUBLE_DASH)) +(define-enum GtkButtonBoxStyle + (default-style GTK_BUTTONBOX_DEFAULT_STYLE) + (spread GTK_BUTTONBOX_SPREAD) + (edge GTK_BUTTONBOX_EDGE) + (start GTK_BUTTONBOX_START) + (end GTK_BUTTONBOX_END)) -(define-enum GdkCapStyle - (not-last GDK_CAP_NOT_LAST) - (butt GDK_CAP_BUTT) - (round GDK_CAP_ROUND) - (projecting GDK_CAP_PROJECTING)) +(define-enum GtkCurveType + (linear GTK_CURVE_TYPE_LINEAR) + (spline GTK_CURVE_TYPE_SPLINE) + (free GTK_CURVE_TYPE_FREE)) -(define-enum GdkJoinStyle - (miter GDK_JOIN_MITER) - (round GDK_JOIN_ROUND) - (bevel GDK_JOIN_BEVEL)) +(define-enum GtkDirectionType + (tab-forward GTK_DIR_TAB_FORWARD) + (tab-backward GTK_DIR_TAB_BACKWARD) + (up GTK_DIR_UP) + (down GTK_DIR_DOWN) + (left GTK_DIR_LEFT) + (right GTK_DIR_RIGHT)) -; enumerations from "gdktypes.h" +(define-enum GtkJustification + (left GTK_JUSTIFY_LEFT) + (right GTK_JUSTIFY_RIGHT) + (center GTK_JUSTIFY_CENTER) + (fill GTK_JUSTIFY_FILL)) -(define-enum GdkFilterReturn - (continue GDK_FILTER_CONTINUE) - (translate GDK_FILTER_TRANSLATE) - (remove GDK_FILTER_REMOVE)) +(define-enum GtkMatchType + (all GTK_MATCH_ALL) + (all-tail GTK_MATCH_ALL_TAIL) + (head GTK_MATCH_HEAD) + (tail GTK_MATCH_TAIL) + (exact GTK_MATCH_EXACT) + (last GTK_MATCH_LAST)) -(define-enum GdkVisibilityState - (unobscured GDK_VISIBILITY_UNOBSCURED) - (partial GDK_VISIBILITY_PARTIAL) - (fully-obscured GDK_VISIBILITY_FULLY_OBSCURED)) +(define-enum GtkMenuFactoryType + (menu GTK_MENU_FACTORY_MENU) + (menu-bar GTK_MENU_FACTORY_MENU_BAR) + (option-menu GTK_MENU_FACTORY_OPTION_MENU)) -(define-enum GdkEventType - (nothing GDK_NOTHING) - (delete GDK_DELETE) - (destroy GDK_DESTROY) - (expose GDK_EXPOSE) - (motion-notify GDK_MOTION_NOTIFY) - (button-press GDK_BUTTON_PRESS) - (2button-press GDK_2BUTTON_PRESS) - (3button-press GDK_3BUTTON_PRESS) - (button-release GDK_BUTTON_RELEASE) - (key-press GDK_KEY_PRESS) - (key-release GDK_KEY_RELEASE) - (enter-notify GDK_ENTER_NOTIFY) - (leave-notify GDK_LEAVE_NOTIFY) - (focus-change GDK_FOCUS_CHANGE) - (configure GDK_CONFIGURE) - (map GDK_MAP) - (unmap GDK_UNMAP) - (property-notify GDK_PROPERTY_NOTIFY) - (selection-clear GDK_SELECTION_CLEAR) - (selection-request GDK_SELECTION_REQUEST) - (selection-notify GDK_SELECTION_NOTIFY) - (proximity-in GDK_PROXIMITY_IN) - (proximity-out GDK_PROXIMITY_OUT) - (drag-begin GDK_DRAG_BEGIN) - (drag-request GDK_DRAG_REQUEST) - (drop-enter GDK_DROP_ENTER) - (drop-leave GDK_DROP_LEAVE) - (drop-data-avail GDK_DROP_DATA_AVAIL) - (client-event GDK_CLIENT_EVENT) - (visibility-notify GDK_VISIBILITY_NOTIFY) - (no-expose GDK_NO_EXPOSE) - (other-event GDK_OTHER_EVENT)) +(define-enum GtkMetricType + (pixels GTK_PIXELS) + (inches GTK_INCHES) + (centimeters GTK_CENTIMETERS)) -(define-flags GdkEventMask - (exposure-mask GDK_EXPOSURE_MASK) - (pointer-motion-mask GDK_POINTER_MOTION_MASK) - (pointer-motion-hint-mask GDK_POINTER_MOTION_HINT_MASK) - (button-motion-mask GDK_BUTTON_MOTION_MASK) - (button1-motion-mask GDK_BUTTON1_MOTION_MASK) - (button2-motion-mask GDK_BUTTON2_MOTION_MASK) - (button3-motion-mask GDK_BUTTON3_MOTION_MASK) - (button-press-mask GDK_BUTTON_PRESS_MASK) - (button-release-mask GDK_BUTTON_RELEASE_MASK) - (key-press-mask GDK_KEY_PRESS_MASK) - (key-release-mask GDK_KEY_RELEASE_MASK) - (enter-notify-mask GDK_ENTER_NOTIFY_MASK) - (leave-notify-mask GDK_LEAVE_NOTIFY_MASK) - (focus-change-mask GDK_FOCUS_CHANGE_MASK) - (structure-mask GDK_STRUCTURE_MASK) - (property-change-mask GDK_PROPERTY_CHANGE_MASK) - (visibility-notify-mask GDK_VISIBILITY_NOTIFY_MASK) - (proximity-in-mask GDK_PROXIMITY_IN_MASK) - (proximity-out-mask GDK_PROXIMITY_OUT_MASK) - (substructure-mask GDK_SUBSTRUCTURE_MASK) - (all-events-mask GDK_ALL_EVENTS_MASK)) +(define-enum GtkOrientation + (horizontal GTK_ORIENTATION_HORIZONTAL) + (vertical GTK_ORIENTATION_VERTICAL)) -(define-enum GdkNotifyType - (ancestor GDK_NOTIFY_ANCESTOR) - (virtual GDK_NOTIFY_VIRTUAL) - (inferior GDK_NOTIFY_INFERIOR) - (nonlinear GDK_NOTIFY_NONLINEAR) - (nonlinear-virtual GDK_NOTIFY_NONLINEAR_VIRTUAL) - (unknown GDK_NOTIFY_UNKNOWN)) +(define-enum GtkPackType + (start GTK_PACK_START) + (end GTK_PACK_END)) -(define-enum GdkCrossingMode - (crossing-normal GDK_CROSSING_NORMAL) - (crossing-grab GDK_CROSSING_GRAB) - (crossing-ungrab GDK_CROSSING_UNGRAB)) +(define-enum GtkPathPriorityType + (lowest GTK_PATH_PRIO_LOWEST) + (gtk GTK_PATH_PRIO_GTK) + (application GTK_PATH_PRIO_APPLICATION) + (rc GTK_PATH_PRIO_RC) + (highest GTK_PATH_PRIO_HIGHEST) + (mask GTK_PATH_PRIO_MASK)) -(define-flags GdkModifierType - (shift-mask GDK_SHIFT_MASK) - (lock-mask GDK_LOCK_MASK) - (control-mask GDK_CONTROL_MASK) - (mod1-mask GDK_MOD1_MASK) - (mod2-mask GDK_MOD2_MASK) - (mod3-mask GDK_MOD3_MASK) - (mod4-mask GDK_MOD4_MASK) - (mod5-mask GDK_MOD5_MASK) - (button1-mask GDK_BUTTON1_MASK) - (button2-mask GDK_BUTTON2_MASK) - (button3-mask GDK_BUTTON3_MASK) - (button4-mask GDK_BUTTON4_MASK) - (button5-mask GDK_BUTTON5_MASK) - (modifier-mask GDK_MODIFIER_MASK)) +(define-enum GtkPathType + (widget GTK_PATH_WIDGET) + (widget-class GTK_PATH_WIDGET_CLASS) + (class GTK_PATH_CLASS)) -(define-enum GdkSubwindowMode - (clip-by-children GDK_CLIP_BY_CHILDREN) - (include-inferiors GDK_INCLUDE_INFERIORS)) +(define-enum GtkPolicyType + (always GTK_POLICY_ALWAYS) + (automatic GTK_POLICY_AUTOMATIC)) -(define-flags GdkInputCondition - (read GDK_INPUT_READ) - (write GDK_INPUT_WRITE) - (exception GDK_INPUT_EXCEPTION)) +(define-enum GtkPositionType + (left GTK_POS_LEFT) + (right GTK_POS_RIGHT) + (top GTK_POS_TOP) + (bottom GTK_POS_BOTTOM)) -(define-enum GdkStatus - (ok GDK_OK) - (error GDK_ERROR) - (error-param GDK_ERROR_PARAM) - (error-file GDK_ERROR_FILE) - (error-mem GDK_ERROR_MEM)) +(define-enum GtkPreviewType + (color GTK_PREVIEW_COLOR) + (grayscale GTK_PREVIEW_GRAYSCALE)) -(define-enum GdkByteOrder - (lsb-first GDK_LSB_FIRST) - (msb-first GDK_MSB_FIRST)) +(define-enum GtkReliefStyle + (normal GTK_RELIEF_NORMAL) + (none GTK_RELIEF_NONE)) -(define-flags GdkGCValuesMask - (foreground GDK_GC_FOREGROUND) - (background GDK_GC_BACKGROUND) - (font GDK_GC_FONT) - (function GDK_GC_FUNCTION) - (fill GDK_GC_FILL) - (tile GDK_GC_TILE) - (stipple GDK_GC_STIPPLE) - (clip-mask GDK_GC_CLIP_MASK) - (subwindow GDK_GC_SUBWINDOW) - (ts-x-origin GDK_GC_TS_X_ORIGIN) - (ts-y-origin GDK_GC_TS_Y_ORIGIN) - (clip-x-origin GDK_GC_CLIP_X_ORIGIN) - (clip-y-origin GDK_GC_CLIP_Y_ORIGIN) - (exposures GDK_GC_EXPOSURES) - (line-width GDK_GC_LINE_WIDTH) - (line-style GDK_GC_LINE_STYLE) - (cap-style GDK_GC_CAP_STYLE) - (join-style GDK_GC_JOIN_STYLE)) +(define-flags GtkSignalRunType + (first GTK_RUN_FIRST) + (last GTK_RUN_LAST) + (both GTK_RUN_BOTH) + (mask GTK_RUN_MASK) + (no-recurse GTK_RUN_NO_RECURSE) + (action GTK_RUN_ACTION)) -(define-enum GdkSelection - (primary GDK_SELECTION_PRIMARY) - (secondary GDK_SELECTION_SECONDARY)) +(define-enum GtkScrollType + (none GTK_SCROLL_NONE) + (step-backward GTK_SCROLL_STEP_BACKWARD) + (step-forward GTK_SCROLL_STEP_FORWARD) + (page-backward GTK_SCROLL_PAGE_BACKWARD) + (page-forward GTK_SCROLL_PAGE_FORWARD) + (jump GTK_SCROLL_JUMP)) -(define-enum GdkPropertyState - (new-value GDK_PROPERTY_NEW_VALUE) - (delete GDK_PROPERTY_DELETE)) +(define-enum GtkSelectionMode + (single GTK_SELECTION_SINGLE) + (browse GTK_SELECTION_BROWSE) + (multiple GTK_SELECTION_MULTIPLE) + (extended GTK_SELECTION_EXTENDED)) -(define-enum GdkPropMode - (replace GDK_PROP_MODE_REPLACE) - (prepend GDK_PROP_MODE_PREPEND) - (append GDK_PROP_MODE_APPEND)) +(define-enum GtkShadowType + (none GTK_SHADOW_NONE) + (in GTK_SHADOW_IN) + (out GTK_SHADOW_OUT) + (etched-in GTK_SHADOW_ETCHED_IN) + (etched-out GTK_SHADOW_ETCHED_OUT)) -(define-enum GdkDndType - (notdnd GDK_DNDTYPE_NOTDND) - (unknown GDK_DNDTYPE_UNKNOWN) - (rawdata GDK_DNDTYPE_RAWDATA) - (file GDK_DNDTYPE_FILE) - (files GDK_DNDTYPE_FILES) - (text GDK_DNDTYPE_TEXT) - (dir GDK_DNDTYPE_DIR) - (link GDK_DNDTYPE_LINK) - (exe GDK_DNDTYPE_EXE) - (url GDK_DNDTYPE_URL) - (mime GDK_DNDTYPE_MIME) - (end GDK_DNDTYPE_END)) +(define-enum GtkStateType + (normal GTK_STATE_NORMAL) + (active GTK_STATE_ACTIVE) + (prelight GTK_STATE_PRELIGHT) + (selected GTK_STATE_SELECTED) + (insensitive GTK_STATE_INSENSITIVE)) -(define-enum GdkInputSource - (mouse GDK_SOURCE_MOUSE) - (pen GDK_SOURCE_PEN) - (eraser GDK_SOURCE_ERASER) - (cursor GDK_SOURCE_CURSOR)) +(define-enum GtkSubmenuDirection + (left GTK_DIRECTION_LEFT) + (right GTK_DIRECTION_RIGHT)) -(define-enum GdkInputMode - (disabled GDK_MODE_DISABLED) - (screen GDK_MODE_SCREEN) - (window GDK_MODE_WINDOW)) +(define-enum GtkSubmenuPlacement + (top-bottom GTK_TOP_BOTTOM) + (left-right GTK_LEFT_RIGHT)) -(define-enum GdkAxisUse - (ignore GDK_AXIS_IGNORE) - (x GDK_AXIS_X) - (y GDK_AXIS_Y) - (pressure GDK_AXIS_PRESSURE) - (xtilt GDK_AXIS_XTILT) - (ytilt GDK_AXIS_YTILT) - (last GDK_AXIS_LAST)) +(define-enum GtkToolbarStyle + (icons GTK_TOOLBAR_ICONS) + (text GTK_TOOLBAR_TEXT) + (both GTK_TOOLBAR_BOTH)) -(define-enum GdkTarget - (bitmap GDK_TARGET_BITMAP) - (colormap GDK_TARGET_COLORMAP) - (drawable GDK_TARGET_DRAWABLE) - (pixmap GDK_TARGET_PIXMAP) - (string GDK_TARGET_STRING)) +(define-enum GtkTroughType + (none GTK_TROUGH_NONE) + (start GTK_TROUGH_START) + (end GTK_TROUGH_END) + (jump GTK_TROUGH_JUMP)) -(define-enum GdkSelectionType - (atom GDK_SELECTION_TYPE_ATOM) - (bitmap GDK_SELECTION_TYPE_BITMAP) - (colormap GDK_SELECTION_TYPE_COLORMAP) - (drawable GDK_SELECTION_TYPE_DRAWABLE) - (integer GDK_SELECTION_TYPE_INTEGER) - (pixmap GDK_SELECTION_TYPE_PIXMAP) - (window GDK_SELECTION_TYPE_WINDOW) - (string GDK_SELECTION_TYPE_STRING)) +(define-enum GtkUpdateType + (continuous GTK_UPDATE_CONTINUOUS) + (discontinuous GTK_UPDATE_DISCONTINUOUS) + (delayed GTK_UPDATE_DELAYED)) -(define-enum GdkExtensionMode - (none GDK_EXTENSION_EVENTS_NONE) - (all GDK_EXTENSION_EVENTS_ALL) - (cursor GDK_EXTENSION_EVENTS_CURSOR)) +(define-enum GtkVisibility + (none GTK_VISIBILITY_NONE) + (partial GTK_VISIBILITY_PARTIAL) + (full GTK_VISIBILITY_FULL)) -(define-flags GdkWMDecoration - (all GDK_DECOR_ALL) - (border GDK_DECOR_BORDER) - (resizeh GDK_DECOR_RESIZEH) - (title GDK_DECOR_TITLE) - (menu GDK_DECOR_MENU) - (minimize GDK_DECOR_MINIMIZE) - (maximize GDK_DECOR_MAXIMIZE)) +(define-enum GtkWindowPosition + (none GTK_WIN_POS_NONE) + (center GTK_WIN_POS_CENTER) + (mouse GTK_WIN_POS_MOUSE)) -(define-flags GdkWMFunction - (all GDK_FUNC_ALL) - (resize GDK_FUNC_RESIZE) - (move GDK_FUNC_MOVE) - (minimize GDK_FUNC_MINIMIZE) - (maximize GDK_FUNC_MAXIMIZE) - (close GDK_FUNC_CLOSE)) +(define-enum GtkWindowType + (toplevel GTK_WINDOW_TOPLEVEL) + (dialog GTK_WINDOW_DIALOG) + (popup GTK_WINDOW_POPUP)) -(define-enum GdkColorContextMode - (undefined GDK_CC_MODE_UNDEFINED) - (bw GDK_CC_MODE_BW) - (std-cmap GDK_CC_MODE_STD_CMAP) - (true GDK_CC_MODE_TRUE) - (my-gray GDK_CC_MODE_MY_GRAY) - (palette GDK_CC_MODE_PALETTE)) +; enumerations from "../../gtk+/gtk/gtkobject.h" -(define-enum GdkOverlapType - (in GDK_OVERLAP_RECTANGLE_IN) - (out GDK_OVERLAP_RECTANGLE_OUT) - (part GDK_OVERLAP_RECTANGLE_PART)) +(define-flags GtkObjectFlags + (destroyed GTK_DESTROYED) + (floating GTK_FLOATING) + (connected GTK_CONNECTED) + (reserved-2 GTK_RESERVED_2) + (object-flag-last GTK_OBJECT_FLAG_LAST)) -; enumerations from "gdkprivate.h" +(define-flags GtkArgFlags + (readable GTK_ARG_READABLE) + (writable GTK_ARG_WRITABLE) + (construct GTK_ARG_CONSTRUCT) + (mask GTK_ARG_MASK) + (readwrite GTK_ARG_READWRITE)) -(define-flags GdkDebugFlag - (misc GDK_DEBUG_MISC) - (events GDK_DEBUG_EVENTS) - (dnd GDK_DEBUG_DND) - (color-context GDK_DEBUG_COLOR_CONTEXT) - (xim GDK_DEBUG_XIM)) +; enumerations from "../../gtk+/gtk/gtkpacker.h" -; enumerations from "gtkenums.h" +(define-flags GtkPackerOptions + (expand GTK_PACK_EXPAND) + (fill-x GTK_FILL_X) + (fill-y GTK_FILL_Y)) -(define-flags GtkAccelFlags - (visible GTK_ACCEL_VISIBLE) - (signal-visible GTK_ACCEL_SIGNAL_VISIBLE) - (locked GTK_ACCEL_LOCKED) - (mask GTK_ACCEL_MASK)) +(define-enum GtkSideType + (top GTK_SIDE_TOP) + (bottom GTK_SIDE_BOTTOM) + (left GTK_SIDE_LEFT) + (right GTK_SIDE_RIGHT)) -(define-enum GtkArrowType - (up GTK_ARROW_UP) - (down GTK_ARROW_DOWN) - (left GTK_ARROW_LEFT) - (right GTK_ARROW_RIGHT)) +(define-enum GtkAnchorType + (center GTK_ANCHOR_CENTER) + (n GTK_ANCHOR_N) + (nw GTK_ANCHOR_NW) + (ne GTK_ANCHOR_NE) + (s GTK_ANCHOR_S) + (sw GTK_ANCHOR_SW) + (se GTK_ANCHOR_SE) + (w GTK_ANCHOR_W) + (e GTK_ANCHOR_E)) + +; enumerations from "../../gtk+/gtk/gtkprivate.h" -(define-flags GtkAttachOptions - (expand GTK_EXPAND) - (shrink GTK_SHRINK) - (fill GTK_FILL)) +(define-flags GtkPrivateFlags + (user-style PRIVATE_GTK_USER_STYLE) + (redraw-pending PRIVATE_GTK_REDRAW_PENDING) + (resize-pending PRIVATE_GTK_RESIZE_PENDING) + (resize-needed PRIVATE_GTK_RESIZE_NEEDED) + (leave-pending PRIVATE_GTK_LEAVE_PENDING) + (has-shape-mask PRIVATE_GTK_HAS_SHAPE_MASK) + (in-reparent PRIVATE_GTK_IN_REPARENT)) -(define-enum GtkButtonBoxStyle - (default GTK_BUTTONBOX_DEFAULT_STYLE) - (spread GTK_BUTTONBOX_SPREAD) - (edge GTK_BUTTONBOX_EDGE) - (start GTK_BUTTONBOX_START) - (end GTK_BUTTONBOX_END)) +; enumerations from "../../gtk+/gtk/gtkspinbutton.h" -(define-enum GtkCurveType - (linear GTK_CURVE_TYPE_LINEAR) - (spline GTK_CURVE_TYPE_SPLINE) - (free GTK_CURVE_TYPE_FREE)) +(define-flags GtkSpinButtonUpdatePolicy + (always GTK_UPDATE_ALWAYS) + (if-valid GTK_UPDATE_IF_VALID) + (snap-to-ticks GTK_UPDATE_SNAP_TO_TICKS)) -(define-enum GtkDirectionType - (tab-forward GTK_DIR_TAB_FORWARD) - (tab-backward GTK_DIR_TAB_BACKWARD) - (up GTK_DIR_UP) - (down GTK_DIR_DOWN) - (left GTK_DIR_LEFT) - (right GTK_DIR_RIGHT)) +; enumerations from "../../gtk+/gtk/gtktoolbar.h" -(define-enum GtkJustification - (left GTK_JUSTIFY_LEFT) - (right GTK_JUSTIFY_RIGHT) - (center GTK_JUSTIFY_CENTER) - (fill GTK_JUSTIFY_FILL)) +(define-enum GtkToolbarChildType + (space GTK_TOOLBAR_CHILD_SPACE) + (button GTK_TOOLBAR_CHILD_BUTTON) + (togglebutton GTK_TOOLBAR_CHILD_TOGGLEBUTTON) + (radiobutton GTK_TOOLBAR_CHILD_RADIOBUTTON) + (widget GTK_TOOLBAR_CHILD_WIDGET)) -(define-enum GtkMatchType - (all GTK_MATCH_ALL) - (all-tail GTK_MATCH_ALL_TAIL) - (head GTK_MATCH_HEAD) - (tail GTK_MATCH_TAIL) - (exact GTK_MATCH_EXACT) - (last GTK_MATCH_LAST)) +; enumerations from "../../gtk+/gtk/gtktree.h" -(define-enum GtkMenuFactoryType - (menu GTK_MENU_FACTORY_MENU) - (menu-bar GTK_MENU_FACTORY_MENU_BAR) - (option-menu GTK_MENU_FACTORY_OPTION_MENU)) +(define-enum GtkTreeViewMode + (line GTK_TREE_VIEW_LINE) + (item GTK_TREE_VIEW_ITEM)) -(define-enum GtkMetricType - (pixels GTK_PIXELS) - (inches GTK_INCHES) - (centimeters GTK_CENTIMETERS)) +; enumerations from "../../gtk+/gtk/gtktypeutils.h" -(define-enum GtkOrientation - (horizontal GTK_ORIENTATION_HORIZONTAL) - (vertical GTK_ORIENTATION_VERTICAL)) +(define-enum GtkFundamentalType + (invalid GTK_TYPE_INVALID) + (none GTK_TYPE_NONE) + (char GTK_TYPE_CHAR) + (bool GTK_TYPE_BOOL) + (int GTK_TYPE_INT) + (uint GTK_TYPE_UINT) + (long GTK_TYPE_LONG) + (ulong GTK_TYPE_ULONG) + (float GTK_TYPE_FLOAT) + (double GTK_TYPE_DOUBLE) + (string GTK_TYPE_STRING) + (enum GTK_TYPE_ENUM) + (flags GTK_TYPE_FLAGS) + (boxed GTK_TYPE_BOXED) + (foreign GTK_TYPE_FOREIGN) + (callback GTK_TYPE_CALLBACK) + (args GTK_TYPE_ARGS) + (pointer GTK_TYPE_POINTER) + (signal GTK_TYPE_SIGNAL) + (c-callback GTK_TYPE_C_CALLBACK) + (object GTK_TYPE_OBJECT)) + +; enumerations from "../../gtk+/gtk/gtkwidget.h" -(define-enum GtkPackType - (start GTK_PACK_START) - (end GTK_PACK_END)) +(define-flags GtkWidgetFlags + (toplevel GTK_TOPLEVEL) + (no-window GTK_NO_WINDOW) + (realized GTK_REALIZED) + (mapped GTK_MAPPED) + (visible GTK_VISIBLE) + (sensitive GTK_SENSITIVE) + (parent-sensitive GTK_PARENT_SENSITIVE) + (can-focus GTK_CAN_FOCUS) + (has-focus GTK_HAS_FOCUS) + (can-default GTK_CAN_DEFAULT) + (has-default GTK_HAS_DEFAULT) + (has-grab GTK_HAS_GRAB) + (rc-style GTK_RC_STYLE) + (basic GTK_BASIC)) + +; enumerations from "../../gtk+/gdk/gdkprivate.h" -(define-enum GtkPathPriorityType - (lowest GTK_PATH_PRIO_LOWEST) - (gtk GTK_PATH_PRIO_GTK) - (application GTK_PATH_PRIO_APPLICATION) - (rc GTK_PATH_PRIO_RC) - (highest GTK_PATH_PRIO_HIGHEST) - (mask GTK_PATH_PRIO_MASK)) +(define-flags GdkDebugFlag + (misc GDK_DEBUG_MISC) + (events GDK_DEBUG_EVENTS) + (dnd GDK_DEBUG_DND) + (color-context GDK_DEBUG_COLOR_CONTEXT) + (xim GDK_DEBUG_XIM)) -(define-enum GtkPathType - (widget GTK_PATH_WIDGET) - (widget-class GTK_PATH_WIDGET_CLASS) - (class GTK_PATH_CLASS)) +; enumerations from "../../gtk+/gdk/gdktypes.h" -(define-enum GtkPolicyType - (always GTK_POLICY_ALWAYS) - (automatic GTK_POLICY_AUTOMATIC)) +(define-enum GdkWindowType + (root GDK_WINDOW_ROOT) + (toplevel GDK_WINDOW_TOPLEVEL) + (child GDK_WINDOW_CHILD) + (dialog GDK_WINDOW_DIALOG) + (temp GDK_WINDOW_TEMP) + (pixmap GDK_WINDOW_PIXMAP) + (foreign GDK_WINDOW_FOREIGN)) -(define-enum GtkPositionType - (left GTK_POS_LEFT) - (right GTK_POS_RIGHT) - (top GTK_POS_TOP) - (bottom GTK_POS_BOTTOM)) +(define-enum GdkWindowClass + (output GDK_INPUT_OUTPUT) + (only GDK_INPUT_ONLY)) -(define-enum GtkPreviewType - (color GTK_PREVIEW_COLOR) - (grayscale GTK_PREVIEW_GRAYSCALE) - (greyscale GTK_PREVIEW_GREYSCALE)) +(define-enum GdkImageType + (normal GDK_IMAGE_NORMAL) + (shared GDK_IMAGE_SHARED) + (fastest GDK_IMAGE_FASTEST)) -(define-enum GtkReliefStyle - (normal GTK_RELIEF_NORMAL) - (none GTK_RELIEF_NONE)) +(define-enum GdkVisualType + (static-gray GDK_VISUAL_STATIC_GRAY) + (grayscale GDK_VISUAL_GRAYSCALE) + (static-color GDK_VISUAL_STATIC_COLOR) + (pseudo-color GDK_VISUAL_PSEUDO_COLOR) + (true-color GDK_VISUAL_TRUE_COLOR) + (direct-color GDK_VISUAL_DIRECT_COLOR)) -(define-enum GtkScrollType - (none GTK_SCROLL_NONE) - (step-backward GTK_SCROLL_STEP_BACKWARD) - (step-forward GTK_SCROLL_STEP_FORWARD) - (page-backward GTK_SCROLL_PAGE_BACKWARD) - (page-forward GTK_SCROLL_PAGE_FORWARD) - (jump GTK_SCROLL_JUMP)) +(define-enum GdkFontType + (font GDK_FONT_FONT) + (fontset GDK_FONT_FONTSET)) -(define-enum GtkSelectionMode - (single GTK_SELECTION_SINGLE) - (browse GTK_SELECTION_BROWSE) - (multiple GTK_SELECTION_MULTIPLE) - (extended GTK_SELECTION_EXTENDED)) +(define-flags GdkWindowAttributesType + (title GDK_WA_TITLE) + (x GDK_WA_X) + (y GDK_WA_Y) + (cursor GDK_WA_CURSOR) + (colormap GDK_WA_COLORMAP) + (visual GDK_WA_VISUAL) + (wmclass GDK_WA_WMCLASS) + (noredir GDK_WA_NOREDIR)) -(define-enum GtkShadowType - (none GTK_SHADOW_NONE) - (in GTK_SHADOW_IN) - (out GTK_SHADOW_OUT) - (etched-in GTK_SHADOW_ETCHED_IN) - (etched-out GTK_SHADOW_ETCHED_OUT)) +(define-flags GdkWindowHints + (pos GDK_HINT_POS) + (min-size GDK_HINT_MIN_SIZE) + (max-size GDK_HINT_MAX_SIZE)) -(define-flags GtkSignalRunType - (first GTK_RUN_FIRST) - (last GTK_RUN_LAST) - (both GTK_RUN_BOTH) - (mask GTK_RUN_MASK) - (no-recurse GTK_RUN_NO_RECURSE) - (action GTK_RUN_ACTION)) +(define-enum GdkFunction + (copy GDK_COPY) + (invert GDK_INVERT) + (xor GDK_XOR)) -(define-enum GtkStateType - (normal GTK_STATE_NORMAL) - (active GTK_STATE_ACTIVE) - (prelight GTK_STATE_PRELIGHT) - (selected GTK_STATE_SELECTED) - (insensitive GTK_STATE_INSENSITIVE)) +(define-enum GdkFill + (solid GDK_SOLID) + (tiled GDK_TILED) + (stippled GDK_STIPPLED) + (opaque-stippled GDK_OPAQUE_STIPPLED)) -(define-enum GtkSubmenuDirection - (left GTK_DIRECTION_LEFT) - (right GTK_DIRECTION_RIGHT)) +(define-enum GdkFillRule + (even-odd-rule GDK_EVEN_ODD_RULE) + (winding-rule GDK_WINDING_RULE)) -(define-enum GtkSubmenuPlacement - (top-bottom GTK_TOP_BOTTOM) - (left-right GTK_LEFT_RIGHT)) +(define-enum GdkLineStyle + (solid GDK_LINE_SOLID) + (on-off-dash GDK_LINE_ON_OFF_DASH) + (double-dash GDK_LINE_DOUBLE_DASH)) -(define-enum GtkToolbarStyle - (icons GTK_TOOLBAR_ICONS) - (text GTK_TOOLBAR_TEXT) - (both GTK_TOOLBAR_BOTH)) +(define-enum GdkCapStyle + (not-last GDK_CAP_NOT_LAST) + (butt GDK_CAP_BUTT) + (round GDK_CAP_ROUND) + (projecting GDK_CAP_PROJECTING)) -(define-enum GtkTroughType - (none GTK_TROUGH_NONE) - (start GTK_TROUGH_START) - (end GTK_TROUGH_END) - (jump GTK_TROUGH_JUMP)) +(define-enum GdkJoinStyle + (miter GDK_JOIN_MITER) + (round GDK_JOIN_ROUND) + (bevel GDK_JOIN_BEVEL)) + +(define-enum GdkCursorType + (num-glyphs GDK_NUM_GLYPHS) + (x-cursor GDK_X_CURSOR) + (arrow GDK_ARROW) + (based-arrow-down GDK_BASED_ARROW_DOWN) + (based-arrow-up GDK_BASED_ARROW_UP) + (boat GDK_BOAT) + (bogosity GDK_BOGOSITY) + (bottom-left-corner GDK_BOTTOM_LEFT_CORNER) + (bottom-right-corner GDK_BOTTOM_RIGHT_CORNER) + (bottom-side GDK_BOTTOM_SIDE) + (bottom-tee GDK_BOTTOM_TEE) + (box-spiral GDK_BOX_SPIRAL) + (center-ptr GDK_CENTER_PTR) + (circle GDK_CIRCLE) + (clock GDK_CLOCK) + (coffee-mug GDK_COFFEE_MUG) + (cross GDK_CROSS) + (cross-reverse GDK_CROSS_REVERSE) + (crosshair GDK_CROSSHAIR) + (diamond-cross GDK_DIAMOND_CROSS) + (dot GDK_DOT) + (dotbox GDK_DOTBOX) + (double-arrow GDK_DOUBLE_ARROW) + (draft-large GDK_DRAFT_LARGE) + (draft-small GDK_DRAFT_SMALL) + (draped-box GDK_DRAPED_BOX) + (exchange GDK_EXCHANGE) + (fleur GDK_FLEUR) + (gobbler GDK_GOBBLER) + (gumby GDK_GUMBY) + (hand1 GDK_HAND1) + (hand2 GDK_HAND2) + (heart GDK_HEART) + (icon GDK_ICON) + (iron-cross GDK_IRON_CROSS) + (left-ptr GDK_LEFT_PTR) + (left-side GDK_LEFT_SIDE) + (left-tee GDK_LEFT_TEE) + (leftbutton GDK_LEFTBUTTON) + (ll-angle GDK_LL_ANGLE) + (lr-angle GDK_LR_ANGLE) + (man GDK_MAN) + (middlebutton GDK_MIDDLEBUTTON) + (mouse GDK_MOUSE) + (pencil GDK_PENCIL) + (pirate GDK_PIRATE) + (plus GDK_PLUS) + (question-arrow GDK_QUESTION_ARROW) + (right-ptr GDK_RIGHT_PTR) + (right-side GDK_RIGHT_SIDE) + (right-tee GDK_RIGHT_TEE) + (rightbutton GDK_RIGHTBUTTON) + (rtl-logo GDK_RTL_LOGO) + (sailboat GDK_SAILBOAT) + (sb-down-arrow GDK_SB_DOWN_ARROW) + (sb-h-double-arrow GDK_SB_H_DOUBLE_ARROW) + (sb-left-arrow GDK_SB_LEFT_ARROW) + (sb-right-arrow GDK_SB_RIGHT_ARROW) + (sb-up-arrow GDK_SB_UP_ARROW) + (sb-v-double-arrow GDK_SB_V_DOUBLE_ARROW) + (shuttle GDK_SHUTTLE) + (sizing GDK_SIZING) + (spider GDK_SPIDER) + (spraycan GDK_SPRAYCAN) + (star GDK_STAR) + (target GDK_TARGET) + (tcross GDK_TCROSS) + (top-left-arrow GDK_TOP_LEFT_ARROW) + (top-left-corner GDK_TOP_LEFT_CORNER) + (top-right-corner GDK_TOP_RIGHT_CORNER) + (top-side GDK_TOP_SIDE) + (top-tee GDK_TOP_TEE) + (trek GDK_TREK) + (ul-angle GDK_UL_ANGLE) + (umbrella GDK_UMBRELLA) + (ur-angle GDK_UR_ANGLE) + (watch GDK_WATCH) + (xterm GDK_XTERM) + (last-cursor GDK_LAST_CURSOR) + (cursor-is-pixmap GDK_CURSOR_IS_PIXMAP)) -(define-enum GtkUpdateType - (continuous GTK_UPDATE_CONTINUOUS) - (discontinuous GTK_UPDATE_DISCONTINUOUS) - (delayed GTK_UPDATE_DELAYED)) +(define-enum GdkFilterReturn + (continue GDK_FILTER_CONTINUE) + (translate GDK_FILTER_TRANSLATE) + (remove GDK_FILTER_REMOVE)) -(define-enum GtkVisibility - (none GTK_VISIBILITY_NONE) - (partial GTK_VISIBILITY_PARTIAL) - (full GTK_VISIBILITY_FULL)) +(define-enum GdkVisibilityState + (unobscured GDK_VISIBILITY_UNOBSCURED) + (partial GDK_VISIBILITY_PARTIAL) + (fully-obscured GDK_VISIBILITY_FULLY_OBSCURED)) -(define-enum GtkWindowPosition - (none GTK_WIN_POS_NONE) - (center GTK_WIN_POS_CENTER) - (mouse GTK_WIN_POS_MOUSE)) +(define-enum GdkEventType + (nothing GDK_NOTHING) + (delete GDK_DELETE) + (destroy GDK_DESTROY) + (expose GDK_EXPOSE) + (motion-notify GDK_MOTION_NOTIFY) + (button-press GDK_BUTTON_PRESS) + (2button-press GDK_2BUTTON_PRESS) + (3button-press GDK_3BUTTON_PRESS) + (button-release GDK_BUTTON_RELEASE) + (key-press GDK_KEY_PRESS) + (key-release GDK_KEY_RELEASE) + (enter-notify GDK_ENTER_NOTIFY) + (leave-notify GDK_LEAVE_NOTIFY) + (focus-change GDK_FOCUS_CHANGE) + (configure GDK_CONFIGURE) + (map GDK_MAP) + (unmap GDK_UNMAP) + (property-notify GDK_PROPERTY_NOTIFY) + (selection-clear GDK_SELECTION_CLEAR) + (selection-request GDK_SELECTION_REQUEST) + (selection-notify GDK_SELECTION_NOTIFY) + (proximity-in GDK_PROXIMITY_IN) + (proximity-out GDK_PROXIMITY_OUT) + (drag-begin GDK_DRAG_BEGIN) + (drag-request GDK_DRAG_REQUEST) + (drop-enter GDK_DROP_ENTER) + (drop-leave GDK_DROP_LEAVE) + (drop-data-avail GDK_DROP_DATA_AVAIL) + (client-event GDK_CLIENT_EVENT) + (visibility-notify GDK_VISIBILITY_NOTIFY) + (no-expose GDK_NO_EXPOSE) + (other-event GDK_OTHER_EVENT)) -(define-enum GtkWindowType - (toplevel GTK_WINDOW_TOPLEVEL) - (dialog GTK_WINDOW_DIALOG) - (popup GTK_WINDOW_POPUP)) +(define-flags GdkEventMask + (exposure-mask GDK_EXPOSURE_MASK) + (pointer-motion-mask GDK_POINTER_MOTION_MASK) + (pointer-motion-hint-mask GDK_POINTER_MOTION_HINT_MASK) + (button-motion-mask GDK_BUTTON_MOTION_MASK) + (button1-motion-mask GDK_BUTTON1_MOTION_MASK) + (button2-motion-mask GDK_BUTTON2_MOTION_MASK) + (button3-motion-mask GDK_BUTTON3_MOTION_MASK) + (button-press-mask GDK_BUTTON_PRESS_MASK) + (button-release-mask GDK_BUTTON_RELEASE_MASK) + (key-press-mask GDK_KEY_PRESS_MASK) + (key-release-mask GDK_KEY_RELEASE_MASK) + (enter-notify-mask GDK_ENTER_NOTIFY_MASK) + (leave-notify-mask GDK_LEAVE_NOTIFY_MASK) + (focus-change-mask GDK_FOCUS_CHANGE_MASK) + (structure-mask GDK_STRUCTURE_MASK) + (property-change-mask GDK_PROPERTY_CHANGE_MASK) + (visibility-notify-mask GDK_VISIBILITY_NOTIFY_MASK) + (proximity-in-mask GDK_PROXIMITY_IN_MASK) + (proximity-out-mask GDK_PROXIMITY_OUT_MASK) + (substructure-mask GDK_SUBSTRUCTURE_MASK) + (all-events-mask GDK_ALL_EVENTS_MASK)) -; enumerations from "gtktypeutils.h" +(define-enum GdkNotifyType + (ancestor GDK_NOTIFY_ANCESTOR) + (virtual GDK_NOTIFY_VIRTUAL) + (inferior GDK_NOTIFY_INFERIOR) + (nonlinear GDK_NOTIFY_NONLINEAR) + (nonlinear-virtual GDK_NOTIFY_NONLINEAR_VIRTUAL) + (unknown GDK_NOTIFY_UNKNOWN)) -(define-enum GtkFundamentalType - (invalid GTK_TYPE_INVALID) - (none GTK_TYPE_NONE) - (char GTK_TYPE_CHAR) - (bool GTK_TYPE_BOOL) - (int GTK_TYPE_INT) - (uint GTK_TYPE_UINT) - (long GTK_TYPE_LONG) - (ulong GTK_TYPE_ULONG) - (float GTK_TYPE_FLOAT) - (double GTK_TYPE_DOUBLE) - (string GTK_TYPE_STRING) - (enum GTK_TYPE_ENUM) - (flags GTK_TYPE_FLAGS) - (boxed GTK_TYPE_BOXED) - (foreign GTK_TYPE_FOREIGN) - (callback GTK_TYPE_CALLBACK) - (args GTK_TYPE_ARGS) - (pointer GTK_TYPE_POINTER) - (signal GTK_TYPE_SIGNAL) - (c-callback GTK_TYPE_C_CALLBACK) - (object GTK_TYPE_OBJECT)) - -; enumerations from "gtkdebug.h" +(define-enum GdkCrossingMode + (normal GDK_CROSSING_NORMAL) + (grab GDK_CROSSING_GRAB) + (ungrab GDK_CROSSING_UNGRAB)) -(define-flags GtkDebugFlag - (objects GTK_DEBUG_OBJECTS) - (misc GTK_DEBUG_MISC) - (signals GTK_DEBUG_SIGNALS)) +(define-flags GdkModifierType + (shift-mask GDK_SHIFT_MASK) + (lock-mask GDK_LOCK_MASK) + (control-mask GDK_CONTROL_MASK) + (mod1-mask GDK_MOD1_MASK) + (mod2-mask GDK_MOD2_MASK) + (mod3-mask GDK_MOD3_MASK) + (mod4-mask GDK_MOD4_MASK) + (mod5-mask GDK_MOD5_MASK) + (button1-mask GDK_BUTTON1_MASK) + (button2-mask GDK_BUTTON2_MASK) + (button3-mask GDK_BUTTON3_MASK) + (button4-mask GDK_BUTTON4_MASK) + (button5-mask GDK_BUTTON5_MASK) + (modifier-mask GDK_MODIFIER_MASK)) -; enumerations from "gtkobject.h" +(define-enum GdkSubwindowMode + (clip-by-children GDK_CLIP_BY_CHILDREN) + (include-inferiors GDK_INCLUDE_INFERIORS)) -(define-flags GtkObjectFlags - (destroyed GTK_DESTROYED) - (floating GTK_FLOATING) - (connected GTK_CONNECTED) - (object-flag-last GTK_OBJECT_FLAG_LAST)) +(define-flags GdkInputCondition + (read GDK_INPUT_READ) + (write GDK_INPUT_WRITE) + (exception GDK_INPUT_EXCEPTION)) -(define-flags GtkArgFlags - (readable GTK_ARG_READABLE) - (writable GTK_ARG_WRITABLE) - (construct GTK_ARG_CONSTRUCT) - (mask GTK_ARG_MASK) - (readwrite GTK_ARG_READWRITE)) +(define-enum GdkStatus + (ok GDK_OK) + (error GDK_ERROR) + (error-param GDK_ERROR_PARAM) + (error-file GDK_ERROR_FILE) + (error-mem GDK_ERROR_MEM)) -; enumerations from "gtkwidget.h" +(define-enum GdkByteOrder + (lsb-first GDK_LSB_FIRST) + (msb-first GDK_MSB_FIRST)) -(define-flags GtkWidgetFlags - (toplevel GTK_TOPLEVEL) - (no-window GTK_NO_WINDOW) - (realized GTK_REALIZED) - (mapped GTK_MAPPED) - (visible GTK_VISIBLE) - (sensitive GTK_SENSITIVE) - (parent-sensitive GTK_PARENT_SENSITIVE) - (can-focus GTK_CAN_FOCUS) - (has-focus GTK_HAS_FOCUS) - (can-default GTK_CAN_DEFAULT) - (has-default GTK_HAS_DEFAULT) - (has-grab GTK_HAS_GRAB) - (rc-style GTK_RC_STYLE) - (basic GTK_BASIC)) - -; enumerations from "gtkpacker.h" +(define-flags GdkGCValuesMask + (foreground GDK_GC_FOREGROUND) + (background GDK_GC_BACKGROUND) + (font GDK_GC_FONT) + (function GDK_GC_FUNCTION) + (fill GDK_GC_FILL) + (tile GDK_GC_TILE) + (stipple GDK_GC_STIPPLE) + (clip-mask GDK_GC_CLIP_MASK) + (subwindow GDK_GC_SUBWINDOW) + (ts-x-origin GDK_GC_TS_X_ORIGIN) + (ts-y-origin GDK_GC_TS_Y_ORIGIN) + (clip-x-origin GDK_GC_CLIP_X_ORIGIN) + (clip-y-origin GDK_GC_CLIP_Y_ORIGIN) + (exposures GDK_GC_EXPOSURES) + (line-width GDK_GC_LINE_WIDTH) + (line-style GDK_GC_LINE_STYLE) + (cap-style GDK_GC_CAP_STYLE) + (join-style GDK_GC_JOIN_STYLE)) -(define-flags GtkPackerOptions - (pack-expand GTK_PACK_EXPAND) - (fill-x GTK_FILL_X) - (fill-y GTK_FILL_Y)) +(define-enum GdkSelection + (primary GDK_SELECTION_PRIMARY) + (secondary GDK_SELECTION_SECONDARY)) -(define-enum GtkSideType - (top GTK_SIDE_TOP) - (bottom GTK_SIDE_BOTTOM) - (left GTK_SIDE_LEFT) - (right GTK_SIDE_RIGHT)) +(define-enum GdkPropertyState + (new-value GDK_PROPERTY_NEW_VALUE) + (delete GDK_PROPERTY_DELETE)) -(define-enum GtkAnchorType - (center GTK_ANCHOR_CENTER) - (north GTK_ANCHOR_NORTH) - (north-west GTK_ANCHOR_NORTH_WEST) - (north-east GTK_ANCHOR_NORTH_EAST) - (south GTK_ANCHOR_SOUTH) - (south-west GTK_ANCHOR_SOUTH_WEST) - (south-east GTK_ANCHOR_SOUTH_EAST) - (west GTK_ANCHOR_WEST) - (east GTK_ANCHOR_EAST)) - -; enumerations from "gtkprivate.h" +(define-enum GdkPropMode + (replace GDK_PROP_MODE_REPLACE) + (prepend GDK_PROP_MODE_PREPEND) + (append GDK_PROP_MODE_APPEND)) -(define-flags GtkPrivateFlags - (user-style PRIVATE_GTK_USER_STYLE) - (redraw-pending PRIVATE_GTK_REDRAW_PENDING) - (resize-pending PRIVATE_GTK_RESIZE_PENDING) - (resize-needed PRIVATE_GTK_RESIZE_NEEDED) - (leave-pending PRIVATE_GTK_LEAVE_PENDING) - (has-shape-mask PRIVATE_GTK_HAS_SHAPE_MASK) - (in-reparent PRIVATE_GTK_IN_REPARENT)) +(define-enum GdkDndType + (notdnd GDK_DNDTYPE_NOTDND) + (unknown GDK_DNDTYPE_UNKNOWN) + (rawdata GDK_DNDTYPE_RAWDATA) + (file GDK_DNDTYPE_FILE) + (files GDK_DNDTYPE_FILES) + (text GDK_DNDTYPE_TEXT) + (dir GDK_DNDTYPE_DIR) + (link GDK_DNDTYPE_LINK) + (exe GDK_DNDTYPE_EXE) + (url GDK_DNDTYPE_URL) + (mime GDK_DNDTYPE_MIME) + (end GDK_DNDTYPE_END)) + +(define-enum GdkInputSource + (mouse GDK_SOURCE_MOUSE) + (pen GDK_SOURCE_PEN) + (eraser GDK_SOURCE_ERASER) + (cursor GDK_SOURCE_CURSOR)) + +(define-enum GdkInputMode + (disabled GDK_MODE_DISABLED) + (screen GDK_MODE_SCREEN) + (window GDK_MODE_WINDOW)) +(define-enum GdkAxisUse + (ignore GDK_AXIS_IGNORE) + (x GDK_AXIS_X) + (y GDK_AXIS_Y) + (pressure GDK_AXIS_PRESSURE) + (xtilt GDK_AXIS_XTILT) + (ytilt GDK_AXIS_YTILT) + (last GDK_AXIS_LAST)) + +(define-enum GdkTarget + (bitmap GDK_TARGET_BITMAP) + (colormap GDK_TARGET_COLORMAP) + (drawable GDK_TARGET_DRAWABLE) + (pixmap GDK_TARGET_PIXMAP) + (string GDK_TARGET_STRING)) + +(define-enum GdkSelectionType + (atom GDK_SELECTION_TYPE_ATOM) + (bitmap GDK_SELECTION_TYPE_BITMAP) + (colormap GDK_SELECTION_TYPE_COLORMAP) + (drawable GDK_SELECTION_TYPE_DRAWABLE) + (integer GDK_SELECTION_TYPE_INTEGER) + (pixmap GDK_SELECTION_TYPE_PIXMAP) + (window GDK_SELECTION_TYPE_WINDOW) + (string GDK_SELECTION_TYPE_STRING)) + +(define-enum GdkExtensionMode + (none GDK_EXTENSION_EVENTS_NONE) + (all GDK_EXTENSION_EVENTS_ALL) + (cursor GDK_EXTENSION_EVENTS_CURSOR)) + +(define-flags GdkIMStyle + (preedit-area GdkIMPreeditArea) + (preedit-callbacks GdkIMPreeditCallbacks) + (preedit-position GdkIMPreeditPosition) + (preedit-nothing GdkIMPreeditNothing) + (preedit-none GdkIMPreeditNone) + (status-area GdkIMStatusArea) + (status-callbacks GdkIMStatusCallbacks) + (status-nothing GdkIMStatusNothing) + (status-none GdkIMStatusNone)) + +(define-flags GdkWMDecoration + (all GDK_DECOR_ALL) + (border GDK_DECOR_BORDER) + (resizeh GDK_DECOR_RESIZEH) + (title GDK_DECOR_TITLE) + (menu GDK_DECOR_MENU) + (minimize GDK_DECOR_MINIMIZE) + (maximize GDK_DECOR_MAXIMIZE)) + +(define-flags GdkWMFunction + (all GDK_FUNC_ALL) + (resize GDK_FUNC_RESIZE) + (move GDK_FUNC_MOVE) + (minimize GDK_FUNC_MINIMIZE) + (maximize GDK_FUNC_MAXIMIZE) + (close GDK_FUNC_CLOSE)) + +(define-enum GdkColorContextMode + (undefined GDK_CC_MODE_UNDEFINED) + (bw GDK_CC_MODE_BW) + (std-cmap GDK_CC_MODE_STD_CMAP) + (true GDK_CC_MODE_TRUE) + (my-gray GDK_CC_MODE_MY_GRAY) + (palette GDK_CC_MODE_PALETTE)) + +(define-enum GdkOverlapType + (in GDK_OVERLAP_RECTANGLE_IN) + (out GDK_OVERLAP_RECTANGLE_OUT) + (part GDK_OVERLAP_RECTANGLE_PART)) ;; -*- scheme -*- @@ -50,6 +50,7 @@ #include <gtk/gtkfeatures.h> #include <gtk/gtkfilesel.h> #include <gtk/gtkfixed.h> +#include <gtk/gtkfontsel.h> #include <gtk/gtkframe.h> #include <gtk/gtkgamma.h> #include <gtk/gtkgc.h> diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h index dedcc0f6b5..545df04256 100644 --- a/gtk/gtkdebug.h +++ b/gtk/gtkdebug.h @@ -24,10 +24,10 @@ extern "C" { #endif /* __cplusplus */ typedef enum { - G_NV (GTK_DEBUG_OBJECTS, objects, 1 << 0), - G_NV (GTK_DEBUG_MISC, misc, 1 << 1), - G_NV (GTK_DEBUG_SIGNALS, signals, 1 << 2) -} G_FLAGS (GtkDebugFlag); + GTK_DEBUG_OBJECTS = 1 << 0, + GTK_DEBUG_MISC = 1 << 1, + GTK_DEBUG_SIGNALS = 1 << 2 +} GtkDebugFlag; #ifdef G_ENABLE_DEBUG diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 7b258ffd85..60c1ddacc9 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -72,7 +72,7 @@ static void gtk_entry_queue_draw (GtkEntry *entry); static gint gtk_entry_timer (gpointer data); static gint gtk_entry_position (GtkEntry *entry, gint x); - void gtk_entry_adjust_scroll (GtkEntry *entry); +static void gtk_entry_adjust_scroll (GtkEntry *entry); static void gtk_entry_grow_text (GtkEntry *entry); static void gtk_entry_insert_text (GtkEditable *editable, const gchar *new_text, @@ -651,7 +651,6 @@ gtk_entry_size_allocate (GtkWidget *widget, { GtkEntry *entry; GtkEditable *editable; - gint offset; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_ENTRY (widget)); @@ -673,14 +672,6 @@ gtk_entry_size_allocate (GtkWidget *widget, allocation->width - (widget->style->klass->xthickness + INNER_BORDER) * 2, widget->requisition.height - (widget->style->klass->ythickness + INNER_BORDER) * 2); - /* Display as much text as we can */ - offset = MAX(0, entry->char_offset[entry->nchars] - - (allocation->width - - (widget->style->klass->xthickness + INNER_BORDER) * 2)); - - if (entry->scroll_offset > offset) - entry->scroll_offset = offset; - /* And make sure the cursor is on screen */ gtk_entry_adjust_scroll (entry); @@ -1398,12 +1389,12 @@ gtk_entry_find_position (GtkEntry *entry, gint end = entry->nchars; gint half; + if (x <= 0) + return 0; if (x >= entry->char_offset[end]) return end; - if (x < 0) - return 0; - /* invariant - char_pos[start] <= x < char_pos[end] */ + /* invariant - char_offset[start] <= x < char_offset[end] */ while (start != end) { @@ -1429,7 +1420,7 @@ gtk_entry_position (GtkEntry *entry, void gtk_entry_adjust_scroll (GtkEntry *entry) { - gint xoffset; + gint xoffset, max_offset; gint text_area_width; g_return_if_fail (entry != NULL); @@ -1440,6 +1431,13 @@ gtk_entry_adjust_scroll (GtkEntry *entry) gdk_window_get_size (entry->text_area, &text_area_width, NULL); + /* Display as much text as we can */ + max_offset = MAX(0, entry->char_offset[entry->nchars] - text_area_width); + + if (entry->scroll_offset > max_offset) + entry->scroll_offset = max_offset; + + /* And make sure cursor is on screen */ xoffset = entry->char_offset[gtk_entry_find_char (entry, GTK_EDITABLE(entry)->current_pos)]; xoffset -= entry->scroll_offset; @@ -2155,6 +2153,7 @@ gtk_entry_style_set (GtkWidget *widget, scroll_char = gtk_entry_find_position (entry, entry->scroll_offset); gtk_entry_recompute_offsets (GTK_ENTRY (widget)); entry->scroll_offset = entry->char_offset[scroll_char]; + gtk_entry_adjust_scroll (entry); gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); gdk_window_set_background (entry->text_area, &widget->style->base[GTK_STATE_NORMAL]); diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 6604eb3a1a..615c0a8a77 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -8,7 +8,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public @@ -19,293 +19,282 @@ #ifndef __GTK_ENUMS_H__ #define __GTK_ENUMS_H__ -#include <glib.h> - #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus */ - typedef enum { /* should the accelerator appear in * the widget's display? */ - G_NV (GTK_ACCEL_VISIBLE, visible, 1 << 0), + GTK_ACCEL_VISIBLE = 1 << 0, /* should the signal associated with * this accelerator be also visible? */ - G_NV (GTK_ACCEL_SIGNAL_VISIBLE, signal-visible, 1 << 1), + GTK_ACCEL_SIGNAL_VISIBLE = 1 << 1, /* may the accelerator be removed * again? */ - G_NV (GTK_ACCEL_LOCKED, locked, 1 << 2), - G_NV (GTK_ACCEL_MASK, mask, 0x07) -} G_FLAGS (GtkAccelFlags); - + GTK_ACCEL_LOCKED = 1 << 2, + GTK_ACCEL_MASK = 0x07 +} GtkAccelFlags; /* Arrow types */ typedef enum { - G_SV (GTK_ARROW_UP, up), - G_SV (GTK_ARROW_DOWN, down), - G_SV (GTK_ARROW_LEFT, left), - G_SV (GTK_ARROW_RIGHT, right) -} G_ENUM (GtkArrowType); + GTK_ARROW_UP, + GTK_ARROW_DOWN, + GTK_ARROW_LEFT, + GTK_ARROW_RIGHT +} GtkArrowType; /* Attach options (for tables) */ typedef enum { - G_NV (GTK_EXPAND, expand, 1 << 0), - G_NV (GTK_SHRINK, shrink, 1 << 1), - G_NV (GTK_FILL, fill, 1 << 2) -} G_FLAGS (GtkAttachOptions); + GTK_EXPAND = 1 << 0, + GTK_SHRINK = 1 << 1, + GTK_FILL = 1 << 2 +} GtkAttachOptions; -/* button box styles */ -typedef enum +/* Button box styles */ +typedef enum { - G_SV (GTK_BUTTONBOX_DEFAULT_STYLE, default), - G_SV (GTK_BUTTONBOX_SPREAD, spread), - G_SV (GTK_BUTTONBOX_EDGE, edge), - G_SV (GTK_BUTTONBOX_START, start), - G_SV (GTK_BUTTONBOX_END, end) -} G_ENUM (GtkButtonBoxStyle); - -/* curve types */ + GTK_BUTTONBOX_DEFAULT_STYLE, + GTK_BUTTONBOX_SPREAD, + GTK_BUTTONBOX_EDGE, + GTK_BUTTONBOX_START, + GTK_BUTTONBOX_END +} GtkButtonBoxStyle; + +/* Curve types */ typedef enum { - G_SV (GTK_CURVE_TYPE_LINEAR, linear) /* linear interpolation */, - G_SV (GTK_CURVE_TYPE_SPLINE, spline) /* spline interpolation */, - G_SV (GTK_CURVE_TYPE_FREE, free) /* free form curve */ -} G_ENUM (GtkCurveType); - + GTK_CURVE_TYPE_LINEAR, /* linear interpolation */ + GTK_CURVE_TYPE_SPLINE, /* spline interpolation */ + GTK_CURVE_TYPE_FREE /* free form curve */ +} GtkCurveType; + /* Focus movement types */ typedef enum { - G_SV (GTK_DIR_TAB_FORWARD, tab-forward), - G_SV (GTK_DIR_TAB_BACKWARD, tab-backward), - G_SV (GTK_DIR_UP, up), - G_SV (GTK_DIR_DOWN, down), - G_SV (GTK_DIR_LEFT, left), - G_SV (GTK_DIR_RIGHT, right) -} G_ENUM (GtkDirectionType); + GTK_DIR_TAB_FORWARD, + GTK_DIR_TAB_BACKWARD, + GTK_DIR_UP, + GTK_DIR_DOWN, + GTK_DIR_LEFT, + GTK_DIR_RIGHT +} GtkDirectionType; /* justification for label and maybe other widgets (text?) */ typedef enum { - G_SV (GTK_JUSTIFY_LEFT, left), - G_SV (GTK_JUSTIFY_RIGHT, right), - G_SV (GTK_JUSTIFY_CENTER, center), - G_SV (GTK_JUSTIFY_FILL, fill) -} G_ENUM (GtkJustification); + GTK_JUSTIFY_LEFT, + GTK_JUSTIFY_RIGHT, + GTK_JUSTIFY_CENTER, + GTK_JUSTIFY_FILL +} GtkJustification; /* GtkPatternSpec match types */ typedef enum { - G_SV (GTK_MATCH_ALL, all) /* "*A?A*" */, - G_SV (GTK_MATCH_ALL_TAIL, all-tail) /* "*A?AA" */, - G_SV (GTK_MATCH_HEAD, head) /* "AAAA*" */, - G_SV (GTK_MATCH_TAIL, tail) /* "*AAAA" */, - G_SV (GTK_MATCH_EXACT, exact) /* "AAAAA" */, - G_SV (GTK_MATCH_LAST, last) -} G_ENUM (GtkMatchType); - -/* menu factory types (outdated) */ + GTK_MATCH_ALL, /* "*A?A*" */ + GTK_MATCH_ALL_TAIL, /* "*A?AA" */ + GTK_MATCH_HEAD, /* "AAAA*" */ + GTK_MATCH_TAIL, /* "*AAAA" */ + GTK_MATCH_EXACT, /* "AAAAA" */ + GTK_MATCH_LAST +} GtkMatchType; + typedef enum { - G_SV (GTK_MENU_FACTORY_MENU, menu), - G_SV (GTK_MENU_FACTORY_MENU_BAR, menu-bar), - G_SV (GTK_MENU_FACTORY_OPTION_MENU, option-menu) -} G_ENUM (GtkMenuFactoryType); + GTK_MENU_FACTORY_MENU, + GTK_MENU_FACTORY_MENU_BAR, + GTK_MENU_FACTORY_OPTION_MENU +} GtkMenuFactoryType; -/* gtk metrics */ typedef enum { - G_SV (GTK_PIXELS, pixels), - G_SV (GTK_INCHES, inches), - G_SV (GTK_CENTIMETERS, centimeters) -} G_ENUM (GtkMetricType); + GTK_PIXELS, + GTK_INCHES, + GTK_CENTIMETERS +} GtkMetricType; /* Orientation for toolbars, etc. */ typedef enum { - G_SV (GTK_ORIENTATION_HORIZONTAL, horizontal), - G_SV (GTK_ORIENTATION_VERTICAL, vertical) -} G_ENUM (GtkOrientation); + GTK_ORIENTATION_HORIZONTAL, + GTK_ORIENTATION_VERTICAL +} GtkOrientation; /* Packing types (for boxes) */ typedef enum { - G_SV (GTK_PACK_START, start), - G_SV (GTK_PACK_END, end) -} G_ENUM (GtkPackType); + GTK_PACK_START, + GTK_PACK_END +} GtkPackType; /* priorities for path lookups */ typedef enum { - G_NV (GTK_PATH_PRIO_LOWEST, lowest, 0), - G_NV (GTK_PATH_PRIO_GTK, gtk, 4), - G_NV (GTK_PATH_PRIO_APPLICATION, application, 8), - G_NV (GTK_PATH_PRIO_RC, rc, 12), - G_NV (GTK_PATH_PRIO_HIGHEST, highest, 15), - G_NV (GTK_PATH_PRIO_MASK, mask, 0x0f) -} G_ENUM (GtkPathPriorityType); + GTK_PATH_PRIO_LOWEST = 0, + GTK_PATH_PRIO_GTK = 4, + GTK_PATH_PRIO_APPLICATION = 8, + GTK_PATH_PRIO_RC = 12, + GTK_PATH_PRIO_HIGHEST = 15, + GTK_PATH_PRIO_MASK = 0x0f +} GtkPathPriorityType; /* widget path types */ typedef enum { - G_SV (GTK_PATH_WIDGET, widget), - G_SV (GTK_PATH_WIDGET_CLASS, widget-class), - G_SV (GTK_PATH_CLASS, class) -} G_ENUM (GtkPathType); + GTK_PATH_WIDGET, + GTK_PATH_WIDGET_CLASS, + GTK_PATH_CLASS +} GtkPathType; /* Scrollbar policy types (for scrolled windows) */ typedef enum { - G_SV (GTK_POLICY_ALWAYS, always), - G_SV (GTK_POLICY_AUTOMATIC, automatic) -} G_ENUM (GtkPolicyType); + GTK_POLICY_ALWAYS, + GTK_POLICY_AUTOMATIC +} GtkPolicyType; -/* gtk position */ typedef enum { - G_SV (GTK_POS_LEFT, left), - G_SV (GTK_POS_RIGHT, right), - G_SV (GTK_POS_TOP, top), - G_SV (GTK_POS_BOTTOM, bottom) -} G_ENUM (GtkPositionType); + GTK_POS_LEFT, + GTK_POS_RIGHT, + GTK_POS_TOP, + GTK_POS_BOTTOM +} GtkPositionType; -/* GtkPreview types */ typedef enum { - G_SV (GTK_PREVIEW_COLOR, color), - G_SV (GTK_PREVIEW_GRAYSCALE, grayscale), - G_NV (GTK_PREVIEW_GREYSCALE, greyscale, GTK_PREVIEW_GRAYSCALE) -} G_ENUM (GtkPreviewType); + GTK_PREVIEW_COLOR, + GTK_PREVIEW_GRAYSCALE +} GtkPreviewType; /* Style for buttons */ typedef enum { - G_SV (GTK_RELIEF_NORMAL, normal), - G_SV (GTK_RELIEF_NONE, none) -} G_ENUM (GtkReliefStyle); + GTK_RELIEF_NORMAL, + GTK_RELIEF_NONE +} GtkReliefStyle; + +/* signal run types */ +typedef enum /*< flags >*/ +{ + GTK_RUN_FIRST = 0x1, + GTK_RUN_LAST = 0x2, + GTK_RUN_BOTH = 0x3, + GTK_RUN_MASK = 0xF, + GTK_RUN_NO_RECURSE = 0x10, + GTK_RUN_ACTION = 0x20 +} GtkSignalRunType; /* scrolling types */ typedef enum { - G_SV (GTK_SCROLL_NONE, none), - G_SV (GTK_SCROLL_STEP_BACKWARD, step-backward), - G_SV (GTK_SCROLL_STEP_FORWARD, step-forward), - G_SV (GTK_SCROLL_PAGE_BACKWARD, page-backward), - G_SV (GTK_SCROLL_PAGE_FORWARD, page-forward), - G_SV (GTK_SCROLL_JUMP, jump) -} G_ENUM (GtkScrollType); + GTK_SCROLL_NONE, + GTK_SCROLL_STEP_BACKWARD, + GTK_SCROLL_STEP_FORWARD, + GTK_SCROLL_PAGE_BACKWARD, + GTK_SCROLL_PAGE_FORWARD, + GTK_SCROLL_JUMP +} GtkScrollType; /* list selection modes */ typedef enum { - G_SV (GTK_SELECTION_SINGLE, single), - G_SV (GTK_SELECTION_BROWSE, browse), - G_SV (GTK_SELECTION_MULTIPLE, multiple), - G_SV (GTK_SELECTION_EXTENDED, extended) -} G_ENUM (GtkSelectionMode); + GTK_SELECTION_SINGLE, + GTK_SELECTION_BROWSE, + GTK_SELECTION_MULTIPLE, + GTK_SELECTION_EXTENDED +} GtkSelectionMode; /* Shadow types */ typedef enum { - G_SV (GTK_SHADOW_NONE, none), - G_SV (GTK_SHADOW_IN, in), - G_SV (GTK_SHADOW_OUT, out), - G_SV (GTK_SHADOW_ETCHED_IN, etched-in), - G_SV (GTK_SHADOW_ETCHED_OUT, etched-out) -} G_ENUM (GtkShadowType); - -/* signal run types */ -typedef enum -{ - G_NV (GTK_RUN_FIRST, first, 0x1), - G_NV (GTK_RUN_LAST, last, 0x2), - G_NV (GTK_RUN_BOTH, both, 0x3), - G_NV (GTK_RUN_MASK, mask, 0xF), - G_NV (GTK_RUN_NO_RECURSE, no-recurse, 0x10), - G_NV (GTK_RUN_ACTION, action, 0x20) -} G_FLAGS (GtkSignalRunType); + GTK_SHADOW_NONE, + GTK_SHADOW_IN, + GTK_SHADOW_OUT, + GTK_SHADOW_ETCHED_IN, + GTK_SHADOW_ETCHED_OUT +} GtkShadowType; /* Widget states */ typedef enum { - G_SV (GTK_STATE_NORMAL, normal), - G_SV (GTK_STATE_ACTIVE, active), - G_SV (GTK_STATE_PRELIGHT, prelight), - G_SV (GTK_STATE_SELECTED, selected), - G_SV (GTK_STATE_INSENSITIVE, insensitive) -} G_ENUM (GtkStateType); - -/* directions for submenus */ + GTK_STATE_NORMAL, + GTK_STATE_ACTIVE, + GTK_STATE_PRELIGHT, + GTK_STATE_SELECTED, + GTK_STATE_INSENSITIVE +} GtkStateType; + +/* Directions for submenus */ typedef enum { - G_SV (GTK_DIRECTION_LEFT, left), - G_SV (GTK_DIRECTION_RIGHT, right) -} G_ENUM (GtkSubmenuDirection); + GTK_DIRECTION_LEFT, + GTK_DIRECTION_RIGHT +} GtkSubmenuDirection; -/* placement of submenus */ +/* Placement of submenus */ typedef enum { - G_SV (GTK_TOP_BOTTOM, top-bottom), - G_SV (GTK_LEFT_RIGHT, left-right) -} G_ENUM (GtkSubmenuPlacement); + GTK_TOP_BOTTOM, + GTK_LEFT_RIGHT +} GtkSubmenuPlacement; /* Style for toolbars */ typedef enum { - G_SV (GTK_TOOLBAR_ICONS, icons), - G_SV (GTK_TOOLBAR_TEXT, text), - G_SV (GTK_TOOLBAR_BOTH, both) -} G_ENUM (GtkToolbarStyle); + GTK_TOOLBAR_ICONS, + GTK_TOOLBAR_TEXT, + GTK_TOOLBAR_BOTH +} GtkToolbarStyle; -/* trough types for GtkRange */ +/* Trough types for GtkRange */ typedef enum { - G_SV (GTK_TROUGH_NONE, none), - G_SV (GTK_TROUGH_START, start), - G_SV (GTK_TROUGH_END, end), - G_SV (GTK_TROUGH_JUMP, jump) -} G_ENUM (GtkTroughType); + GTK_TROUGH_NONE, + GTK_TROUGH_START, + GTK_TROUGH_END, + GTK_TROUGH_JUMP +} GtkTroughType; /* Data update types (for ranges) */ typedef enum { - G_SV (GTK_UPDATE_CONTINUOUS, continuous), - G_SV (GTK_UPDATE_DISCONTINUOUS, discontinuous), - G_SV (GTK_UPDATE_DELAYED, delayed) -} G_ENUM (GtkUpdateType); + GTK_UPDATE_CONTINUOUS, + GTK_UPDATE_DISCONTINUOUS, + GTK_UPDATE_DELAYED +} GtkUpdateType; /* Generic visibility flags */ typedef enum { - G_SV (GTK_VISIBILITY_NONE, none), - G_SV (GTK_VISIBILITY_PARTIAL, partial), - G_SV (GTK_VISIBILITY_FULL, full) -} G_ENUM (GtkVisibility); + GTK_VISIBILITY_NONE, + GTK_VISIBILITY_PARTIAL, + GTK_VISIBILITY_FULL +} GtkVisibility; -/* window position types */ +/* Window position types */ typedef enum { - G_SV (GTK_WIN_POS_NONE, none), - G_SV (GTK_WIN_POS_CENTER, center), - G_SV (GTK_WIN_POS_MOUSE, mouse) -} G_ENUM (GtkWindowPosition); + GTK_WIN_POS_NONE, + GTK_WIN_POS_CENTER, + GTK_WIN_POS_MOUSE +} GtkWindowPosition; /* Window types */ typedef enum { - G_SV (GTK_WINDOW_TOPLEVEL, toplevel), - G_SV (GTK_WINDOW_DIALOG, dialog), - G_SV (GTK_WINDOW_POPUP, popup) -} G_ENUM (GtkWindowType); - - + GTK_WINDOW_TOPLEVEL, + GTK_WINDOW_DIALOG, + GTK_WINDOW_POPUP +} GtkWindowType; #ifdef __cplusplus } diff --git a/gtk/gtkobject.h b/gtk/gtkobject.h index 271876b759..289e76a42b 100644 --- a/gtk/gtkobject.h +++ b/gtk/gtkobject.h @@ -100,12 +100,12 @@ extern "C" { */ typedef enum { - G_NV (GTK_DESTROYED, destroyed, 1 << 0), - G_NV (GTK_FLOATING, floating, 1 << 1), - G_NV (GTK_CONNECTED, connected, 1 << 2), - GTK_RESERVED_2, - G_NV (GTK_OBJECT_FLAG_LAST, object-flag-last, GTK_RESERVED_2) -} G_FLAGS (GtkObjectFlags); + GTK_DESTROYED = 1 << 0, + GTK_FLOATING = 1 << 1, + GTK_CONNECTED = 1 << 2, + GTK_RESERVED_2 = 1 << 3, + GTK_OBJECT_FLAG_LAST = GTK_RESERVED_2 +} GtkObjectFlags; /* Macros for extracting the object_flags from GtkObject. */ @@ -123,15 +123,14 @@ typedef enum */ typedef enum { - G_NV (GTK_ARG_READABLE, readable, 1 << 0), - G_NV (GTK_ARG_WRITABLE, writable, 1 << 1), - G_NV (GTK_ARG_CONSTRUCT, construct, 1 << 2), - G_NV (GTK_ARG_MASK, mask, 0x03), + GTK_ARG_READABLE = 1 << 0, + GTK_ARG_WRITABLE = 1 << 1, + GTK_ARG_CONSTRUCT = 1 << 2, + GTK_ARG_MASK = 0x03, /* aliases */ - G_NV (GTK_ARG_READWRITE, readwrite, GTK_ARG_READABLE | GTK_ARG_WRITABLE) -} G_FLAGS (GtkArgFlags); - + GTK_ARG_READWRITE = GTK_ARG_READABLE | GTK_ARG_WRITABLE +} GtkArgFlags; typedef struct _GtkObjectClass GtkObjectClass; diff --git a/gtk/gtkpacker.h b/gtk/gtkpacker.h index b9bb87c653..b1c16e3569 100644 --- a/gtk/gtkpacker.h +++ b/gtk/gtkpacker.h @@ -43,41 +43,30 @@ typedef struct _GtkPacker GtkPacker; typedef struct _GtkPackerClass GtkPackerClass; typedef struct _GtkPackerChild GtkPackerChild; -typedef enum -{ - G_NV (GTK_PACK_EXPAND, pack-expand, 1 << 0), - G_NV (GTK_FILL_X, fill-x, 1 << 1), - G_NV (GTK_FILL_Y, fill-y, 1 << 2) -} G_FLAGS (GtkPackerOptions); - -typedef enum -{ - G_SV (GTK_SIDE_TOP, top), - G_SV (GTK_SIDE_BOTTOM, bottom), - G_SV (GTK_SIDE_LEFT, left), - G_SV (GTK_SIDE_RIGHT, right) -} G_ENUM (GtkSideType); - -typedef enum -{ - G_SV (GTK_ANCHOR_CENTER, center), - G_SV (GTK_ANCHOR_NORTH, north), - G_SV (GTK_ANCHOR_NORTH_WEST, north-west), - G_SV (GTK_ANCHOR_NORTH_EAST, north-east), - G_SV (GTK_ANCHOR_SOUTH, south), - G_SV (GTK_ANCHOR_SOUTH_WEST, south-west), - G_SV (GTK_ANCHOR_SOUTH_EAST, south-east), - G_SV (GTK_ANCHOR_WEST, west), - G_SV (GTK_ANCHOR_EAST, east), - GTK_ANCHOR_N = GTK_ANCHOR_NORTH, - GTK_ANCHOR_NW = GTK_ANCHOR_NORTH_WEST, - GTK_ANCHOR_NE = GTK_ANCHOR_NORTH_EAST, - GTK_ANCHOR_S = GTK_ANCHOR_SOUTH, - GTK_ANCHOR_SW = GTK_ANCHOR_SOUTH_WEST, - GTK_ANCHOR_SE = GTK_ANCHOR_SOUTH_EAST, - GTK_ANCHOR_W = GTK_ANCHOR_WEST, - GTK_ANCHOR_E = GTK_ANCHOR_EAST -} G_ENUM (GtkAnchorType); +typedef enum { + GTK_PACK_EXPAND = 1 << 0, /*< nick=expand >*/ + GTK_FILL_X = 1 << 1, + GTK_FILL_Y = 1 << 2 +} GtkPackerOptions; + +typedef enum { + GTK_SIDE_TOP, + GTK_SIDE_BOTTOM, + GTK_SIDE_LEFT, + GTK_SIDE_RIGHT +} GtkSideType; + +typedef enum { + GTK_ANCHOR_CENTER, + GTK_ANCHOR_N, + GTK_ANCHOR_NW, + GTK_ANCHOR_NE, + GTK_ANCHOR_S, + GTK_ANCHOR_SW, + GTK_ANCHOR_SE, + GTK_ANCHOR_W, + GTK_ANCHOR_E +} GtkAnchorType; struct _GtkPackerChild { diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h index d99274f251..3426cff190 100644 --- a/gtk/gtkprivate.h +++ b/gtk/gtkprivate.h @@ -30,19 +30,18 @@ extern "C" { #endif /* __cplusplus */ - /* The private flags that are used in the private_flags member of GtkWidget. */ typedef enum { - G_NV (PRIVATE_GTK_USER_STYLE, user-style, 1 << 0), - G_NV (PRIVATE_GTK_REDRAW_PENDING, redraw-pending, 1 << 1), - G_NV (PRIVATE_GTK_RESIZE_PENDING, resize-pending, 1 << 2), - G_NV (PRIVATE_GTK_RESIZE_NEEDED, resize-needed, 1 << 3), - G_NV (PRIVATE_GTK_LEAVE_PENDING, leave-pending, 1 << 4), - G_NV (PRIVATE_GTK_HAS_SHAPE_MASK, has-shape-mask, 1 << 5), - G_NV (PRIVATE_GTK_IN_REPARENT, in-reparent, 1 << 6) -} G_FLAGS (GtkPrivateFlags); + PRIVATE_GTK_USER_STYLE = 1 << 0, + PRIVATE_GTK_REDRAW_PENDING = 1 << 1, + PRIVATE_GTK_RESIZE_PENDING = 1 << 2, + PRIVATE_GTK_RESIZE_NEEDED = 1 << 3, + PRIVATE_GTK_LEAVE_PENDING = 1 << 4, + PRIVATE_GTK_HAS_SHAPE_MASK = 1 << 5, + PRIVATE_GTK_IN_REPARENT = 1 << 6 +} GtkPrivateFlags; /* Macros for extracting a widgets private_flags from GtkWidget. */ diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 13fd9cb43a..14d683e3c6 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -159,6 +159,7 @@ struct _LineParams static void gtk_text_class_init (GtkTextClass *klass); static void gtk_text_init (GtkText *text); static void gtk_text_destroy (GtkObject *object); +static void gtk_text_finalize (GtkObject *object); static void gtk_text_realize (GtkWidget *widget); static void gtk_text_unrealize (GtkWidget *widget); static void gtk_text_style_set (GtkWidget *widget, @@ -274,6 +275,7 @@ static void scroll_int (GtkText* text, gint diff); static void process_exposes (GtkText *text); /* Cache Management. */ +static void free_cache (GtkText* text); static GList* remove_cache_line (GtkText* text, GList* list); /* Key Motion. */ @@ -460,6 +462,7 @@ gtk_text_class_init (GtkTextClass *class) parent_class = gtk_type_class (gtk_editable_get_type ()); object_class->destroy = gtk_text_destroy; + object_class->finalize = gtk_text_finalize; widget_class->realize = gtk_text_realize; widget_class->unrealize = gtk_text_unrealize; @@ -934,6 +937,38 @@ gtk_text_destroy (GtkObject *object) } static void +gtk_text_finalize (GtkObject *object) +{ + GtkText *text; + GList *tmp_list; + + g_return_if_fail (object != NULL); + g_return_if_fail (GTK_IS_TEXT (object)); + + text = (GtkText *)object; + + /* Clean up the internal structures */ + g_free (text->text); + free_cache (text); + + tmp_list = text->text_properties; + while (tmp_list) + { + g_mem_chunk_free (text_property_chunk, tmp_list->data); + tmp_list = tmp_list->next; + } + + g_list_free (text->text_properties); + + if (text->scratch_buffer) + g_free (text->scratch_buffer); + + g_list_free (text->tab_stops); + + GTK_OBJECT_CLASS(parent_class)->finalize (object); +} + +static void gtk_text_realize (GtkWidget *widget) { GtkText *text; @@ -1113,6 +1148,9 @@ gtk_text_unrealize (GtkWidget *widget) gdk_gc_destroy (text->gc); text->gc = NULL; + gdk_pixmap_unref (text->line_wrap_bitmap); + gdk_pixmap_unref (text->line_arrow_bitmap); + if (GTK_WIDGET_CLASS (parent_class)->unrealize) (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget); } diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h index ea689460be..17c05dddb0 100644 --- a/gtk/gtktoolbar.h +++ b/gtk/gtktoolbar.h @@ -39,16 +39,15 @@ extern "C" { #define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass) #define GTK_IS_TOOLBAR(obj) GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ()) -enum _GtkToolbarChildType +typedef enum { GTK_TOOLBAR_CHILD_SPACE, GTK_TOOLBAR_CHILD_BUTTON, GTK_TOOLBAR_CHILD_TOGGLEBUTTON, GTK_TOOLBAR_CHILD_RADIOBUTTON, GTK_TOOLBAR_CHILD_WIDGET -}; +} GtkToolbarChildType; -typedef enum _GtkToolbarChildType GtkToolbarChildType; typedef struct _GtkToolbarChild GtkToolbarChild; typedef struct _GtkToolbar GtkToolbar; typedef struct _GtkToolbarClass GtkToolbarClass; diff --git a/gtk/gtktypebuiltins.h b/gtk/gtktypebuiltins.h index 4ce4df85db..b4c5a2da1a 100644 --- a/gtk/gtktypebuiltins.h +++ b/gtk/gtktypebuiltins.h @@ -1,45 +1,9 @@ /* type macros, generated by maketypes.awk */ -extern GtkType GTK_TYPE_GDK_WINDOW_TYPE; -extern GtkType GTK_TYPE_GDK_WINDOW_CLASS; -extern GtkType GTK_TYPE_GDK_IMAGE_TYPE; -extern GtkType GTK_TYPE_GDK_VISUAL_TYPE; -extern GtkType GTK_TYPE_GDK_FONT_TYPE; -extern GtkType GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE; -extern GtkType GTK_TYPE_GDK_WINDOW_HINTS; -extern GtkType GTK_TYPE_GDK_FUNCTION; -extern GtkType GTK_TYPE_GDK_FILL; -extern GtkType GTK_TYPE_GDK_FILL_RULE; -extern GtkType GTK_TYPE_GDK_LINE_STYLE; -extern GtkType GTK_TYPE_GDK_CAP_STYLE; -extern GtkType GTK_TYPE_GDK_JOIN_STYLE; -extern GtkType GTK_TYPE_GDK_FILTER_RETURN; -extern GtkType GTK_TYPE_GDK_VISIBILITY_STATE; -extern GtkType GTK_TYPE_GDK_EVENT_TYPE; -extern GtkType GTK_TYPE_GDK_EVENT_MASK; -extern GtkType GTK_TYPE_GDK_NOTIFY_TYPE; -extern GtkType GTK_TYPE_GDK_CROSSING_MODE; -extern GtkType GTK_TYPE_GDK_MODIFIER_TYPE; -extern GtkType GTK_TYPE_GDK_SUBWINDOW_MODE; -extern GtkType GTK_TYPE_GDK_INPUT_CONDITION; -extern GtkType GTK_TYPE_GDK_STATUS; -extern GtkType GTK_TYPE_GDK_BYTE_ORDER; -extern GtkType GTK_TYPE_GDK_G_C_VALUES_MASK; -extern GtkType GTK_TYPE_GDK_SELECTION; -extern GtkType GTK_TYPE_GDK_PROPERTY_STATE; -extern GtkType GTK_TYPE_GDK_PROP_MODE; -extern GtkType GTK_TYPE_GDK_DND_TYPE; -extern GtkType GTK_TYPE_GDK_INPUT_SOURCE; -extern GtkType GTK_TYPE_GDK_INPUT_MODE; -extern GtkType GTK_TYPE_GDK_AXIS_USE; -extern GtkType GTK_TYPE_GDK_TARGET; -extern GtkType GTK_TYPE_GDK_SELECTION_TYPE; -extern GtkType GTK_TYPE_GDK_EXTENSION_MODE; -extern GtkType GTK_TYPE_GDK_W_M_DECORATION; -extern GtkType GTK_TYPE_GDK_W_M_FUNCTION; -extern GtkType GTK_TYPE_GDK_COLOR_CONTEXT_MODE; -extern GtkType GTK_TYPE_GDK_OVERLAP_TYPE; -extern GtkType GTK_TYPE_GDK_DEBUG_FLAG; +extern GtkType GTK_TYPE_CELL_TYPE; +extern GtkType GTK_TYPE_C_TREE_POS; +extern GtkType GTK_TYPE_C_TREE_LINE_STYLE; +extern GtkType GTK_TYPE_DEBUG_FLAG; extern GtkType GTK_TYPE_ACCEL_FLAGS; extern GtkType GTK_TYPE_ARROW_TYPE; extern GtkType GTK_TYPE_ATTACH_OPTIONS; @@ -58,10 +22,10 @@ extern GtkType GTK_TYPE_POLICY_TYPE; extern GtkType GTK_TYPE_POSITION_TYPE; extern GtkType GTK_TYPE_PREVIEW_TYPE; extern GtkType GTK_TYPE_RELIEF_STYLE; +extern GtkType GTK_TYPE_SIGNAL_RUN_TYPE; extern GtkType GTK_TYPE_SCROLL_TYPE; extern GtkType GTK_TYPE_SELECTION_MODE; extern GtkType GTK_TYPE_SHADOW_TYPE; -extern GtkType GTK_TYPE_SIGNAL_RUN_TYPE; extern GtkType GTK_TYPE_STATE_TYPE; extern GtkType GTK_TYPE_SUBMENU_DIRECTION; extern GtkType GTK_TYPE_SUBMENU_PLACEMENT; @@ -71,15 +35,59 @@ extern GtkType GTK_TYPE_UPDATE_TYPE; extern GtkType GTK_TYPE_VISIBILITY; extern GtkType GTK_TYPE_WINDOW_POSITION; extern GtkType GTK_TYPE_WINDOW_TYPE; -extern GtkType GTK_TYPE_FUNDAMENTAL_TYPE; -extern GtkType GTK_TYPE_DEBUG_FLAG; extern GtkType GTK_TYPE_OBJECT_FLAGS; extern GtkType GTK_TYPE_ARG_FLAGS; -extern GtkType GTK_TYPE_WIDGET_FLAGS; extern GtkType GTK_TYPE_PACKER_OPTIONS; extern GtkType GTK_TYPE_SIDE_TYPE; extern GtkType GTK_TYPE_ANCHOR_TYPE; extern GtkType GTK_TYPE_PRIVATE_FLAGS; +extern GtkType GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY; +extern GtkType GTK_TYPE_TOOLBAR_CHILD_TYPE; +extern GtkType GTK_TYPE_TREE_VIEW_MODE; +extern GtkType GTK_TYPE_FUNDAMENTAL_TYPE; +extern GtkType GTK_TYPE_WIDGET_FLAGS; +extern GtkType GTK_TYPE_GDK_DEBUG_FLAG; +extern GtkType GTK_TYPE_GDK_WINDOW_TYPE; +extern GtkType GTK_TYPE_GDK_WINDOW_CLASS; +extern GtkType GTK_TYPE_GDK_IMAGE_TYPE; +extern GtkType GTK_TYPE_GDK_VISUAL_TYPE; +extern GtkType GTK_TYPE_GDK_FONT_TYPE; +extern GtkType GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE; +extern GtkType GTK_TYPE_GDK_WINDOW_HINTS; +extern GtkType GTK_TYPE_GDK_FUNCTION; +extern GtkType GTK_TYPE_GDK_FILL; +extern GtkType GTK_TYPE_GDK_FILL_RULE; +extern GtkType GTK_TYPE_GDK_LINE_STYLE; +extern GtkType GTK_TYPE_GDK_CAP_STYLE; +extern GtkType GTK_TYPE_GDK_JOIN_STYLE; +extern GtkType GTK_TYPE_GDK_CURSOR_TYPE; +extern GtkType GTK_TYPE_GDK_FILTER_RETURN; +extern GtkType GTK_TYPE_GDK_VISIBILITY_STATE; +extern GtkType GTK_TYPE_GDK_EVENT_TYPE; +extern GtkType GTK_TYPE_GDK_EVENT_MASK; +extern GtkType GTK_TYPE_GDK_NOTIFY_TYPE; +extern GtkType GTK_TYPE_GDK_CROSSING_MODE; +extern GtkType GTK_TYPE_GDK_MODIFIER_TYPE; +extern GtkType GTK_TYPE_GDK_SUBWINDOW_MODE; +extern GtkType GTK_TYPE_GDK_INPUT_CONDITION; +extern GtkType GTK_TYPE_GDK_STATUS; +extern GtkType GTK_TYPE_GDK_BYTE_ORDER; +extern GtkType GTK_TYPE_GDK_GC_VALUES_MASK; +extern GtkType GTK_TYPE_GDK_SELECTION; +extern GtkType GTK_TYPE_GDK_PROPERTY_STATE; +extern GtkType GTK_TYPE_GDK_PROP_MODE; +extern GtkType GTK_TYPE_GDK_DND_TYPE; +extern GtkType GTK_TYPE_GDK_INPUT_SOURCE; +extern GtkType GTK_TYPE_GDK_INPUT_MODE; +extern GtkType GTK_TYPE_GDK_AXIS_USE; +extern GtkType GTK_TYPE_GDK_TARGET; +extern GtkType GTK_TYPE_GDK_SELECTION_TYPE; +extern GtkType GTK_TYPE_GDK_EXTENSION_MODE; +extern GtkType GTK_TYPE_GDK_IM_STYLE; +extern GtkType GTK_TYPE_GDK_WM_DECORATION; +extern GtkType GTK_TYPE_GDK_WM_FUNCTION; +extern GtkType GTK_TYPE_GDK_COLOR_CONTEXT_MODE; +extern GtkType GTK_TYPE_GDK_OVERLAP_TYPE; extern GtkType GTK_TYPE_ACCEL_GROUP; extern GtkType GTK_TYPE_SELECTION_DATA; extern GtkType GTK_TYPE_STYLE; @@ -90,4 +98,4 @@ extern GtkType GTK_TYPE_GDK_WINDOW; extern GtkType GTK_TYPE_GDK_EVENT; extern GtkType GTK_TYPE_GDK_COLOR; -#define GTK_TYPE_NUM_BUILTINS (89) +#define GTK_TYPE_NUM_BUILTINS (97) diff --git a/gtk/gtktypebuiltins_evals.c b/gtk/gtktypebuiltins_evals.c index 8a14d79695..404605ccd2 100644 --- a/gtk/gtktypebuiltins_evals.c +++ b/gtk/gtktypebuiltins_evals.c @@ -1,5 +1,356 @@ -/* generated by makeenums.awk */ +/* Generated by makeenums.pl */ +static GtkEnumValue _gtk_cell_type_values[] = { + { GTK_CELL_EMPTY, "GTK_CELL_EMPTY", "empty" }, + { GTK_CELL_TEXT, "GTK_CELL_TEXT", "text" }, + { GTK_CELL_PIXMAP, "GTK_CELL_PIXMAP", "pixmap" }, + { GTK_CELL_PIXTEXT, "GTK_CELL_PIXTEXT", "pixtext" }, + { GTK_CELL_WIDGET, "GTK_CELL_WIDGET", "widget" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_c_tree_pos_values[] = { + { GTK_CTREE_POS_BEFORE, "GTK_CTREE_POS_BEFORE", "before" }, + { GTK_CTREE_POS_AS_CHILD, "GTK_CTREE_POS_AS_CHILD", "as-child" }, + { GTK_CTREE_POS_AFTER, "GTK_CTREE_POS_AFTER", "after" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_c_tree_line_style_values[] = { + { GTK_CTREE_LINES_SOLID, "GTK_CTREE_LINES_SOLID", "solid" }, + { GTK_CTREE_LINES_DOTTED, "GTK_CTREE_LINES_DOTTED", "dotted" }, + { GTK_CTREE_LINES_NONE, "GTK_CTREE_LINES_NONE", "none" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_debug_flag_values[] = { + { GTK_DEBUG_OBJECTS, "GTK_DEBUG_OBJECTS", "objects" }, + { GTK_DEBUG_MISC, "GTK_DEBUG_MISC", "misc" }, + { GTK_DEBUG_SIGNALS, "GTK_DEBUG_SIGNALS", "signals" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_accel_flags_values[] = { + { GTK_ACCEL_VISIBLE, "GTK_ACCEL_VISIBLE", "visible" }, + { GTK_ACCEL_SIGNAL_VISIBLE, "GTK_ACCEL_SIGNAL_VISIBLE", "signal-visible" }, + { GTK_ACCEL_LOCKED, "GTK_ACCEL_LOCKED", "locked" }, + { GTK_ACCEL_MASK, "GTK_ACCEL_MASK", "mask" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_arrow_type_values[] = { + { GTK_ARROW_UP, "GTK_ARROW_UP", "up" }, + { GTK_ARROW_DOWN, "GTK_ARROW_DOWN", "down" }, + { GTK_ARROW_LEFT, "GTK_ARROW_LEFT", "left" }, + { GTK_ARROW_RIGHT, "GTK_ARROW_RIGHT", "right" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_attach_options_values[] = { + { GTK_EXPAND, "GTK_EXPAND", "expand" }, + { GTK_SHRINK, "GTK_SHRINK", "shrink" }, + { GTK_FILL, "GTK_FILL", "fill" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_button_box_style_values[] = { + { GTK_BUTTONBOX_DEFAULT_STYLE, "GTK_BUTTONBOX_DEFAULT_STYLE", "default-style" }, + { GTK_BUTTONBOX_SPREAD, "GTK_BUTTONBOX_SPREAD", "spread" }, + { GTK_BUTTONBOX_EDGE, "GTK_BUTTONBOX_EDGE", "edge" }, + { GTK_BUTTONBOX_START, "GTK_BUTTONBOX_START", "start" }, + { GTK_BUTTONBOX_END, "GTK_BUTTONBOX_END", "end" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_curve_type_values[] = { + { GTK_CURVE_TYPE_LINEAR, "GTK_CURVE_TYPE_LINEAR", "linear" }, + { GTK_CURVE_TYPE_SPLINE, "GTK_CURVE_TYPE_SPLINE", "spline" }, + { GTK_CURVE_TYPE_FREE, "GTK_CURVE_TYPE_FREE", "free" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_direction_type_values[] = { + { GTK_DIR_TAB_FORWARD, "GTK_DIR_TAB_FORWARD", "tab-forward" }, + { GTK_DIR_TAB_BACKWARD, "GTK_DIR_TAB_BACKWARD", "tab-backward" }, + { GTK_DIR_UP, "GTK_DIR_UP", "up" }, + { GTK_DIR_DOWN, "GTK_DIR_DOWN", "down" }, + { GTK_DIR_LEFT, "GTK_DIR_LEFT", "left" }, + { GTK_DIR_RIGHT, "GTK_DIR_RIGHT", "right" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_justification_values[] = { + { GTK_JUSTIFY_LEFT, "GTK_JUSTIFY_LEFT", "left" }, + { GTK_JUSTIFY_RIGHT, "GTK_JUSTIFY_RIGHT", "right" }, + { GTK_JUSTIFY_CENTER, "GTK_JUSTIFY_CENTER", "center" }, + { GTK_JUSTIFY_FILL, "GTK_JUSTIFY_FILL", "fill" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_match_type_values[] = { + { GTK_MATCH_ALL, "GTK_MATCH_ALL", "all" }, + { GTK_MATCH_ALL_TAIL, "GTK_MATCH_ALL_TAIL", "all-tail" }, + { GTK_MATCH_HEAD, "GTK_MATCH_HEAD", "head" }, + { GTK_MATCH_TAIL, "GTK_MATCH_TAIL", "tail" }, + { GTK_MATCH_EXACT, "GTK_MATCH_EXACT", "exact" }, + { GTK_MATCH_LAST, "GTK_MATCH_LAST", "last" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_menu_factory_type_values[] = { + { GTK_MENU_FACTORY_MENU, "GTK_MENU_FACTORY_MENU", "menu" }, + { GTK_MENU_FACTORY_MENU_BAR, "GTK_MENU_FACTORY_MENU_BAR", "menu-bar" }, + { GTK_MENU_FACTORY_OPTION_MENU, "GTK_MENU_FACTORY_OPTION_MENU", "option-menu" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_metric_type_values[] = { + { GTK_PIXELS, "GTK_PIXELS", "pixels" }, + { GTK_INCHES, "GTK_INCHES", "inches" }, + { GTK_CENTIMETERS, "GTK_CENTIMETERS", "centimeters" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_orientation_values[] = { + { GTK_ORIENTATION_HORIZONTAL, "GTK_ORIENTATION_HORIZONTAL", "horizontal" }, + { GTK_ORIENTATION_VERTICAL, "GTK_ORIENTATION_VERTICAL", "vertical" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_pack_type_values[] = { + { GTK_PACK_START, "GTK_PACK_START", "start" }, + { GTK_PACK_END, "GTK_PACK_END", "end" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_path_priority_type_values[] = { + { GTK_PATH_PRIO_LOWEST, "GTK_PATH_PRIO_LOWEST", "lowest" }, + { GTK_PATH_PRIO_GTK, "GTK_PATH_PRIO_GTK", "gtk" }, + { GTK_PATH_PRIO_APPLICATION, "GTK_PATH_PRIO_APPLICATION", "application" }, + { GTK_PATH_PRIO_RC, "GTK_PATH_PRIO_RC", "rc" }, + { GTK_PATH_PRIO_HIGHEST, "GTK_PATH_PRIO_HIGHEST", "highest" }, + { GTK_PATH_PRIO_MASK, "GTK_PATH_PRIO_MASK", "mask" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_path_type_values[] = { + { GTK_PATH_WIDGET, "GTK_PATH_WIDGET", "widget" }, + { GTK_PATH_WIDGET_CLASS, "GTK_PATH_WIDGET_CLASS", "widget-class" }, + { GTK_PATH_CLASS, "GTK_PATH_CLASS", "class" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_policy_type_values[] = { + { GTK_POLICY_ALWAYS, "GTK_POLICY_ALWAYS", "always" }, + { GTK_POLICY_AUTOMATIC, "GTK_POLICY_AUTOMATIC", "automatic" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_position_type_values[] = { + { GTK_POS_LEFT, "GTK_POS_LEFT", "left" }, + { GTK_POS_RIGHT, "GTK_POS_RIGHT", "right" }, + { GTK_POS_TOP, "GTK_POS_TOP", "top" }, + { GTK_POS_BOTTOM, "GTK_POS_BOTTOM", "bottom" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_preview_type_values[] = { + { GTK_PREVIEW_COLOR, "GTK_PREVIEW_COLOR", "color" }, + { GTK_PREVIEW_GRAYSCALE, "GTK_PREVIEW_GRAYSCALE", "grayscale" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_relief_style_values[] = { + { GTK_RELIEF_NORMAL, "GTK_RELIEF_NORMAL", "normal" }, + { GTK_RELIEF_NONE, "GTK_RELIEF_NONE", "none" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_signal_run_type_values[] = { + { GTK_RUN_FIRST, "GTK_RUN_FIRST", "first" }, + { GTK_RUN_LAST, "GTK_RUN_LAST", "last" }, + { GTK_RUN_BOTH, "GTK_RUN_BOTH", "both" }, + { GTK_RUN_MASK, "GTK_RUN_MASK", "mask" }, + { GTK_RUN_NO_RECURSE, "GTK_RUN_NO_RECURSE", "no-recurse" }, + { GTK_RUN_ACTION, "GTK_RUN_ACTION", "action" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_scroll_type_values[] = { + { GTK_SCROLL_NONE, "GTK_SCROLL_NONE", "none" }, + { GTK_SCROLL_STEP_BACKWARD, "GTK_SCROLL_STEP_BACKWARD", "step-backward" }, + { GTK_SCROLL_STEP_FORWARD, "GTK_SCROLL_STEP_FORWARD", "step-forward" }, + { GTK_SCROLL_PAGE_BACKWARD, "GTK_SCROLL_PAGE_BACKWARD", "page-backward" }, + { GTK_SCROLL_PAGE_FORWARD, "GTK_SCROLL_PAGE_FORWARD", "page-forward" }, + { GTK_SCROLL_JUMP, "GTK_SCROLL_JUMP", "jump" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_selection_mode_values[] = { + { GTK_SELECTION_SINGLE, "GTK_SELECTION_SINGLE", "single" }, + { GTK_SELECTION_BROWSE, "GTK_SELECTION_BROWSE", "browse" }, + { GTK_SELECTION_MULTIPLE, "GTK_SELECTION_MULTIPLE", "multiple" }, + { GTK_SELECTION_EXTENDED, "GTK_SELECTION_EXTENDED", "extended" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_shadow_type_values[] = { + { GTK_SHADOW_NONE, "GTK_SHADOW_NONE", "none" }, + { GTK_SHADOW_IN, "GTK_SHADOW_IN", "in" }, + { GTK_SHADOW_OUT, "GTK_SHADOW_OUT", "out" }, + { GTK_SHADOW_ETCHED_IN, "GTK_SHADOW_ETCHED_IN", "etched-in" }, + { GTK_SHADOW_ETCHED_OUT, "GTK_SHADOW_ETCHED_OUT", "etched-out" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_state_type_values[] = { + { GTK_STATE_NORMAL, "GTK_STATE_NORMAL", "normal" }, + { GTK_STATE_ACTIVE, "GTK_STATE_ACTIVE", "active" }, + { GTK_STATE_PRELIGHT, "GTK_STATE_PRELIGHT", "prelight" }, + { GTK_STATE_SELECTED, "GTK_STATE_SELECTED", "selected" }, + { GTK_STATE_INSENSITIVE, "GTK_STATE_INSENSITIVE", "insensitive" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_submenu_direction_values[] = { + { GTK_DIRECTION_LEFT, "GTK_DIRECTION_LEFT", "left" }, + { GTK_DIRECTION_RIGHT, "GTK_DIRECTION_RIGHT", "right" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_submenu_placement_values[] = { + { GTK_TOP_BOTTOM, "GTK_TOP_BOTTOM", "top-bottom" }, + { GTK_LEFT_RIGHT, "GTK_LEFT_RIGHT", "left-right" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_toolbar_style_values[] = { + { GTK_TOOLBAR_ICONS, "GTK_TOOLBAR_ICONS", "icons" }, + { GTK_TOOLBAR_TEXT, "GTK_TOOLBAR_TEXT", "text" }, + { GTK_TOOLBAR_BOTH, "GTK_TOOLBAR_BOTH", "both" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_trough_type_values[] = { + { GTK_TROUGH_NONE, "GTK_TROUGH_NONE", "none" }, + { GTK_TROUGH_START, "GTK_TROUGH_START", "start" }, + { GTK_TROUGH_END, "GTK_TROUGH_END", "end" }, + { GTK_TROUGH_JUMP, "GTK_TROUGH_JUMP", "jump" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_update_type_values[] = { + { GTK_UPDATE_CONTINUOUS, "GTK_UPDATE_CONTINUOUS", "continuous" }, + { GTK_UPDATE_DISCONTINUOUS, "GTK_UPDATE_DISCONTINUOUS", "discontinuous" }, + { GTK_UPDATE_DELAYED, "GTK_UPDATE_DELAYED", "delayed" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_visibility_values[] = { + { GTK_VISIBILITY_NONE, "GTK_VISIBILITY_NONE", "none" }, + { GTK_VISIBILITY_PARTIAL, "GTK_VISIBILITY_PARTIAL", "partial" }, + { GTK_VISIBILITY_FULL, "GTK_VISIBILITY_FULL", "full" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_window_position_values[] = { + { GTK_WIN_POS_NONE, "GTK_WIN_POS_NONE", "none" }, + { GTK_WIN_POS_CENTER, "GTK_WIN_POS_CENTER", "center" }, + { GTK_WIN_POS_MOUSE, "GTK_WIN_POS_MOUSE", "mouse" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_window_type_values[] = { + { GTK_WINDOW_TOPLEVEL, "GTK_WINDOW_TOPLEVEL", "toplevel" }, + { GTK_WINDOW_DIALOG, "GTK_WINDOW_DIALOG", "dialog" }, + { GTK_WINDOW_POPUP, "GTK_WINDOW_POPUP", "popup" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_object_flags_values[] = { + { GTK_DESTROYED, "GTK_DESTROYED", "destroyed" }, + { GTK_FLOATING, "GTK_FLOATING", "floating" }, + { GTK_CONNECTED, "GTK_CONNECTED", "connected" }, + { GTK_RESERVED_2, "GTK_RESERVED_2", "reserved-2" }, + { GTK_OBJECT_FLAG_LAST, "GTK_OBJECT_FLAG_LAST", "object-flag-last" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_arg_flags_values[] = { + { GTK_ARG_READABLE, "GTK_ARG_READABLE", "readable" }, + { GTK_ARG_WRITABLE, "GTK_ARG_WRITABLE", "writable" }, + { GTK_ARG_CONSTRUCT, "GTK_ARG_CONSTRUCT", "construct" }, + { GTK_ARG_MASK, "GTK_ARG_MASK", "mask" }, + { GTK_ARG_READWRITE, "GTK_ARG_READWRITE", "readwrite" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_packer_options_values[] = { + { GTK_PACK_EXPAND, "GTK_PACK_EXPAND", "expand" }, + { GTK_FILL_X, "GTK_FILL_X", "fill-x" }, + { GTK_FILL_Y, "GTK_FILL_Y", "fill-y" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_side_type_values[] = { + { GTK_SIDE_TOP, "GTK_SIDE_TOP", "top" }, + { GTK_SIDE_BOTTOM, "GTK_SIDE_BOTTOM", "bottom" }, + { GTK_SIDE_LEFT, "GTK_SIDE_LEFT", "left" }, + { GTK_SIDE_RIGHT, "GTK_SIDE_RIGHT", "right" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_anchor_type_values[] = { + { GTK_ANCHOR_CENTER, "GTK_ANCHOR_CENTER", "center" }, + { GTK_ANCHOR_N, "GTK_ANCHOR_N", "n" }, + { GTK_ANCHOR_NW, "GTK_ANCHOR_NW", "nw" }, + { GTK_ANCHOR_NE, "GTK_ANCHOR_NE", "ne" }, + { GTK_ANCHOR_S, "GTK_ANCHOR_S", "s" }, + { GTK_ANCHOR_SW, "GTK_ANCHOR_SW", "sw" }, + { GTK_ANCHOR_SE, "GTK_ANCHOR_SE", "se" }, + { GTK_ANCHOR_W, "GTK_ANCHOR_W", "w" }, + { GTK_ANCHOR_E, "GTK_ANCHOR_E", "e" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_private_flags_values[] = { + { PRIVATE_GTK_USER_STYLE, "PRIVATE_GTK_USER_STYLE", "user-style" }, + { PRIVATE_GTK_REDRAW_PENDING, "PRIVATE_GTK_REDRAW_PENDING", "redraw-pending" }, + { PRIVATE_GTK_RESIZE_PENDING, "PRIVATE_GTK_RESIZE_PENDING", "resize-pending" }, + { PRIVATE_GTK_RESIZE_NEEDED, "PRIVATE_GTK_RESIZE_NEEDED", "resize-needed" }, + { PRIVATE_GTK_LEAVE_PENDING, "PRIVATE_GTK_LEAVE_PENDING", "leave-pending" }, + { PRIVATE_GTK_HAS_SHAPE_MASK, "PRIVATE_GTK_HAS_SHAPE_MASK", "has-shape-mask" }, + { PRIVATE_GTK_IN_REPARENT, "PRIVATE_GTK_IN_REPARENT", "in-reparent" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_spin_button_update_policy_values[] = { + { GTK_UPDATE_ALWAYS, "GTK_UPDATE_ALWAYS", "always" }, + { GTK_UPDATE_IF_VALID, "GTK_UPDATE_IF_VALID", "if-valid" }, + { GTK_UPDATE_SNAP_TO_TICKS, "GTK_UPDATE_SNAP_TO_TICKS", "snap-to-ticks" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_toolbar_child_type_values[] = { + { GTK_TOOLBAR_CHILD_SPACE, "GTK_TOOLBAR_CHILD_SPACE", "space" }, + { GTK_TOOLBAR_CHILD_BUTTON, "GTK_TOOLBAR_CHILD_BUTTON", "button" }, + { GTK_TOOLBAR_CHILD_TOGGLEBUTTON, "GTK_TOOLBAR_CHILD_TOGGLEBUTTON", "togglebutton" }, + { GTK_TOOLBAR_CHILD_RADIOBUTTON, "GTK_TOOLBAR_CHILD_RADIOBUTTON", "radiobutton" }, + { GTK_TOOLBAR_CHILD_WIDGET, "GTK_TOOLBAR_CHILD_WIDGET", "widget" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_tree_view_mode_values[] = { + { GTK_TREE_VIEW_LINE, "GTK_TREE_VIEW_LINE", "line" }, + { GTK_TREE_VIEW_ITEM, "GTK_TREE_VIEW_ITEM", "item" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_fundamental_type_values[] = { + { GTK_TYPE_INVALID, "GTK_TYPE_INVALID", "invalid" }, + { GTK_TYPE_NONE, "GTK_TYPE_NONE", "none" }, + { GTK_TYPE_CHAR, "GTK_TYPE_CHAR", "char" }, + { GTK_TYPE_BOOL, "GTK_TYPE_BOOL", "bool" }, + { GTK_TYPE_INT, "GTK_TYPE_INT", "int" }, + { GTK_TYPE_UINT, "GTK_TYPE_UINT", "uint" }, + { GTK_TYPE_LONG, "GTK_TYPE_LONG", "long" }, + { GTK_TYPE_ULONG, "GTK_TYPE_ULONG", "ulong" }, + { GTK_TYPE_FLOAT, "GTK_TYPE_FLOAT", "float" }, + { GTK_TYPE_DOUBLE, "GTK_TYPE_DOUBLE", "double" }, + { GTK_TYPE_STRING, "GTK_TYPE_STRING", "string" }, + { GTK_TYPE_ENUM, "GTK_TYPE_ENUM", "enum" }, + { GTK_TYPE_FLAGS, "GTK_TYPE_FLAGS", "flags" }, + { GTK_TYPE_BOXED, "GTK_TYPE_BOXED", "boxed" }, + { GTK_TYPE_FOREIGN, "GTK_TYPE_FOREIGN", "foreign" }, + { GTK_TYPE_CALLBACK, "GTK_TYPE_CALLBACK", "callback" }, + { GTK_TYPE_ARGS, "GTK_TYPE_ARGS", "args" }, + { GTK_TYPE_POINTER, "GTK_TYPE_POINTER", "pointer" }, + { GTK_TYPE_SIGNAL, "GTK_TYPE_SIGNAL", "signal" }, + { GTK_TYPE_C_CALLBACK, "GTK_TYPE_C_CALLBACK", "c-callback" }, + { GTK_TYPE_OBJECT, "GTK_TYPE_OBJECT", "object" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gtk_widget_flags_values[] = { + { GTK_TOPLEVEL, "GTK_TOPLEVEL", "toplevel" }, + { GTK_NO_WINDOW, "GTK_NO_WINDOW", "no-window" }, + { GTK_REALIZED, "GTK_REALIZED", "realized" }, + { GTK_MAPPED, "GTK_MAPPED", "mapped" }, + { GTK_VISIBLE, "GTK_VISIBLE", "visible" }, + { GTK_SENSITIVE, "GTK_SENSITIVE", "sensitive" }, + { GTK_PARENT_SENSITIVE, "GTK_PARENT_SENSITIVE", "parent-sensitive" }, + { GTK_CAN_FOCUS, "GTK_CAN_FOCUS", "can-focus" }, + { GTK_HAS_FOCUS, "GTK_HAS_FOCUS", "has-focus" }, + { GTK_CAN_DEFAULT, "GTK_CAN_DEFAULT", "can-default" }, + { GTK_HAS_DEFAULT, "GTK_HAS_DEFAULT", "has-default" }, + { GTK_HAS_GRAB, "GTK_HAS_GRAB", "has-grab" }, + { GTK_RC_STYLE, "GTK_RC_STYLE", "rc-style" }, + { GTK_BASIC, "GTK_BASIC", "basic" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gdk_debug_flag_values[] = { + { GDK_DEBUG_MISC, "GDK_DEBUG_MISC", "misc" }, + { GDK_DEBUG_EVENTS, "GDK_DEBUG_EVENTS", "events" }, + { GDK_DEBUG_DND, "GDK_DEBUG_DND", "dnd" }, + { GDK_DEBUG_COLOR_CONTEXT, "GDK_DEBUG_COLOR_CONTEXT", "color-context" }, + { GDK_DEBUG_XIM, "GDK_DEBUG_XIM", "xim" }, + { 0, NULL, NULL } +}; static GtkEnumValue _gdk_window_type_values[] = { { GDK_WINDOW_ROOT, "GDK_WINDOW_ROOT", "root" }, { GDK_WINDOW_TOPLEVEL, "GDK_WINDOW_TOPLEVEL", "toplevel" }, @@ -11,8 +362,8 @@ static GtkEnumValue _gdk_window_type_values[] = { { 0, NULL, NULL } }; static GtkEnumValue _gdk_window_class_values[] = { - { GDK_INPUT_OUTPUT, "GDK_INPUT_OUTPUT", "input-output" }, - { GDK_INPUT_ONLY, "GDK_INPUT_ONLY", "input-only" }, + { GDK_INPUT_OUTPUT, "GDK_INPUT_OUTPUT", "output" }, + { GDK_INPUT_ONLY, "GDK_INPUT_ONLY", "only" }, { 0, NULL, NULL } }; static GtkEnumValue _gdk_image_type_values[] = { @@ -89,6 +440,89 @@ static GtkEnumValue _gdk_join_style_values[] = { { GDK_JOIN_BEVEL, "GDK_JOIN_BEVEL", "bevel" }, { 0, NULL, NULL } }; +static GtkEnumValue _gdk_cursor_type_values[] = { + { GDK_NUM_GLYPHS, "GDK_NUM_GLYPHS", "num-glyphs" }, + { GDK_X_CURSOR, "GDK_X_CURSOR", "x-cursor" }, + { GDK_ARROW, "GDK_ARROW", "arrow" }, + { GDK_BASED_ARROW_DOWN, "GDK_BASED_ARROW_DOWN", "based-arrow-down" }, + { GDK_BASED_ARROW_UP, "GDK_BASED_ARROW_UP", "based-arrow-up" }, + { GDK_BOAT, "GDK_BOAT", "boat" }, + { GDK_BOGOSITY, "GDK_BOGOSITY", "bogosity" }, + { GDK_BOTTOM_LEFT_CORNER, "GDK_BOTTOM_LEFT_CORNER", "bottom-left-corner" }, + { GDK_BOTTOM_RIGHT_CORNER, "GDK_BOTTOM_RIGHT_CORNER", "bottom-right-corner" }, + { GDK_BOTTOM_SIDE, "GDK_BOTTOM_SIDE", "bottom-side" }, + { GDK_BOTTOM_TEE, "GDK_BOTTOM_TEE", "bottom-tee" }, + { GDK_BOX_SPIRAL, "GDK_BOX_SPIRAL", "box-spiral" }, + { GDK_CENTER_PTR, "GDK_CENTER_PTR", "center-ptr" }, + { GDK_CIRCLE, "GDK_CIRCLE", "circle" }, + { GDK_CLOCK, "GDK_CLOCK", "clock" }, + { GDK_COFFEE_MUG, "GDK_COFFEE_MUG", "coffee-mug" }, + { GDK_CROSS, "GDK_CROSS", "cross" }, + { GDK_CROSS_REVERSE, "GDK_CROSS_REVERSE", "cross-reverse" }, + { GDK_CROSSHAIR, "GDK_CROSSHAIR", "crosshair" }, + { GDK_DIAMOND_CROSS, "GDK_DIAMOND_CROSS", "diamond-cross" }, + { GDK_DOT, "GDK_DOT", "dot" }, + { GDK_DOTBOX, "GDK_DOTBOX", "dotbox" }, + { GDK_DOUBLE_ARROW, "GDK_DOUBLE_ARROW", "double-arrow" }, + { GDK_DRAFT_LARGE, "GDK_DRAFT_LARGE", "draft-large" }, + { GDK_DRAFT_SMALL, "GDK_DRAFT_SMALL", "draft-small" }, + { GDK_DRAPED_BOX, "GDK_DRAPED_BOX", "draped-box" }, + { GDK_EXCHANGE, "GDK_EXCHANGE", "exchange" }, + { GDK_FLEUR, "GDK_FLEUR", "fleur" }, + { GDK_GOBBLER, "GDK_GOBBLER", "gobbler" }, + { GDK_GUMBY, "GDK_GUMBY", "gumby" }, + { GDK_HAND1, "GDK_HAND1", "hand1" }, + { GDK_HAND2, "GDK_HAND2", "hand2" }, + { GDK_HEART, "GDK_HEART", "heart" }, + { GDK_ICON, "GDK_ICON", "icon" }, + { GDK_IRON_CROSS, "GDK_IRON_CROSS", "iron-cross" }, + { GDK_LEFT_PTR, "GDK_LEFT_PTR", "left-ptr" }, + { GDK_LEFT_SIDE, "GDK_LEFT_SIDE", "left-side" }, + { GDK_LEFT_TEE, "GDK_LEFT_TEE", "left-tee" }, + { GDK_LEFTBUTTON, "GDK_LEFTBUTTON", "leftbutton" }, + { GDK_LL_ANGLE, "GDK_LL_ANGLE", "ll-angle" }, + { GDK_LR_ANGLE, "GDK_LR_ANGLE", "lr-angle" }, + { GDK_MAN, "GDK_MAN", "man" }, + { GDK_MIDDLEBUTTON, "GDK_MIDDLEBUTTON", "middlebutton" }, + { GDK_MOUSE, "GDK_MOUSE", "mouse" }, + { GDK_PENCIL, "GDK_PENCIL", "pencil" }, + { GDK_PIRATE, "GDK_PIRATE", "pirate" }, + { GDK_PLUS, "GDK_PLUS", "plus" }, + { GDK_QUESTION_ARROW, "GDK_QUESTION_ARROW", "question-arrow" }, + { GDK_RIGHT_PTR, "GDK_RIGHT_PTR", "right-ptr" }, + { GDK_RIGHT_SIDE, "GDK_RIGHT_SIDE", "right-side" }, + { GDK_RIGHT_TEE, "GDK_RIGHT_TEE", "right-tee" }, + { GDK_RIGHTBUTTON, "GDK_RIGHTBUTTON", "rightbutton" }, + { GDK_RTL_LOGO, "GDK_RTL_LOGO", "rtl-logo" }, + { GDK_SAILBOAT, "GDK_SAILBOAT", "sailboat" }, + { GDK_SB_DOWN_ARROW, "GDK_SB_DOWN_ARROW", "sb-down-arrow" }, + { GDK_SB_H_DOUBLE_ARROW, "GDK_SB_H_DOUBLE_ARROW", "sb-h-double-arrow" }, + { GDK_SB_LEFT_ARROW, "GDK_SB_LEFT_ARROW", "sb-left-arrow" }, + { GDK_SB_RIGHT_ARROW, "GDK_SB_RIGHT_ARROW", "sb-right-arrow" }, + { GDK_SB_UP_ARROW, "GDK_SB_UP_ARROW", "sb-up-arrow" }, + { GDK_SB_V_DOUBLE_ARROW, "GDK_SB_V_DOUBLE_ARROW", "sb-v-double-arrow" }, + { GDK_SHUTTLE, "GDK_SHUTTLE", "shuttle" }, + { GDK_SIZING, "GDK_SIZING", "sizing" }, + { GDK_SPIDER, "GDK_SPIDER", "spider" }, + { GDK_SPRAYCAN, "GDK_SPRAYCAN", "spraycan" }, + { GDK_STAR, "GDK_STAR", "star" }, + { GDK_TARGET, "GDK_TARGET", "target" }, + { GDK_TCROSS, "GDK_TCROSS", "tcross" }, + { GDK_TOP_LEFT_ARROW, "GDK_TOP_LEFT_ARROW", "top-left-arrow" }, + { GDK_TOP_LEFT_CORNER, "GDK_TOP_LEFT_CORNER", "top-left-corner" }, + { GDK_TOP_RIGHT_CORNER, "GDK_TOP_RIGHT_CORNER", "top-right-corner" }, + { GDK_TOP_SIDE, "GDK_TOP_SIDE", "top-side" }, + { GDK_TOP_TEE, "GDK_TOP_TEE", "top-tee" }, + { GDK_TREK, "GDK_TREK", "trek" }, + { GDK_UL_ANGLE, "GDK_UL_ANGLE", "ul-angle" }, + { GDK_UMBRELLA, "GDK_UMBRELLA", "umbrella" }, + { GDK_UR_ANGLE, "GDK_UR_ANGLE", "ur-angle" }, + { GDK_WATCH, "GDK_WATCH", "watch" }, + { GDK_XTERM, "GDK_XTERM", "xterm" }, + { GDK_LAST_CURSOR, "GDK_LAST_CURSOR", "last-cursor" }, + { GDK_CURSOR_IS_PIXMAP, "GDK_CURSOR_IS_PIXMAP", "cursor-is-pixmap" }, + { 0, NULL, NULL } +}; static GtkEnumValue _gdk_filter_return_values[] = { { GDK_FILTER_CONTINUE, "GDK_FILTER_CONTINUE", "continue" }, { GDK_FILTER_TRANSLATE, "GDK_FILTER_TRANSLATE", "translate" }, @@ -170,9 +604,9 @@ static GtkEnumValue _gdk_notify_type_values[] = { { 0, NULL, NULL } }; static GtkEnumValue _gdk_crossing_mode_values[] = { - { GDK_CROSSING_NORMAL, "GDK_CROSSING_NORMAL", "crossing-normal" }, - { GDK_CROSSING_GRAB, "GDK_CROSSING_GRAB", "crossing-grab" }, - { GDK_CROSSING_UNGRAB, "GDK_CROSSING_UNGRAB", "crossing-ungrab" }, + { GDK_CROSSING_NORMAL, "GDK_CROSSING_NORMAL", "normal" }, + { GDK_CROSSING_GRAB, "GDK_CROSSING_GRAB", "grab" }, + { GDK_CROSSING_UNGRAB, "GDK_CROSSING_UNGRAB", "ungrab" }, { 0, NULL, NULL } }; static GtkEnumValue _gdk_modifier_type_values[] = { @@ -216,7 +650,7 @@ static GtkEnumValue _gdk_byte_order_values[] = { { GDK_MSB_FIRST, "GDK_MSB_FIRST", "msb-first" }, { 0, NULL, NULL } }; -static GtkEnumValue _gdk_g_c_values_mask_values[] = { +static GtkEnumValue _gdk_gc_values_mask_values[] = { { GDK_GC_FOREGROUND, "GDK_GC_FOREGROUND", "foreground" }, { GDK_GC_BACKGROUND, "GDK_GC_BACKGROUND", "background" }, { GDK_GC_FONT, "GDK_GC_FONT", "font" }, @@ -316,7 +750,19 @@ static GtkEnumValue _gdk_extension_mode_values[] = { { GDK_EXTENSION_EVENTS_CURSOR, "GDK_EXTENSION_EVENTS_CURSOR", "cursor" }, { 0, NULL, NULL } }; -static GtkEnumValue _gdk_w_m_decoration_values[] = { +static GtkEnumValue _gdk_im_style_values[] = { + { GdkIMPreeditArea, "GdkIMPreeditArea", "preedit-area" }, + { GdkIMPreeditCallbacks, "GdkIMPreeditCallbacks", "preedit-callbacks" }, + { GdkIMPreeditPosition, "GdkIMPreeditPosition", "preedit-position" }, + { GdkIMPreeditNothing, "GdkIMPreeditNothing", "preedit-nothing" }, + { GdkIMPreeditNone, "GdkIMPreeditNone", "preedit-none" }, + { GdkIMStatusArea, "GdkIMStatusArea", "status-area" }, + { GdkIMStatusCallbacks, "GdkIMStatusCallbacks", "status-callbacks" }, + { GdkIMStatusNothing, "GdkIMStatusNothing", "status-nothing" }, + { GdkIMStatusNone, "GdkIMStatusNone", "status-none" }, + { 0, NULL, NULL } +}; +static GtkEnumValue _gdk_wm_decoration_values[] = { { GDK_DECOR_ALL, "GDK_DECOR_ALL", "all" }, { GDK_DECOR_BORDER, "GDK_DECOR_BORDER", "border" }, { GDK_DECOR_RESIZEH, "GDK_DECOR_RESIZEH", "resizeh" }, @@ -326,7 +772,7 @@ static GtkEnumValue _gdk_w_m_decoration_values[] = { { GDK_DECOR_MAXIMIZE, "GDK_DECOR_MAXIMIZE", "maximize" }, { 0, NULL, NULL } }; -static GtkEnumValue _gdk_w_m_function_values[] = { +static GtkEnumValue _gdk_wm_function_values[] = { { GDK_FUNC_ALL, "GDK_FUNC_ALL", "all" }, { GDK_FUNC_RESIZE, "GDK_FUNC_RESIZE", "resize" }, { GDK_FUNC_MOVE, "GDK_FUNC_MOVE", "move" }, @@ -350,316 +796,3 @@ static GtkEnumValue _gdk_overlap_type_values[] = { { GDK_OVERLAP_RECTANGLE_PART, "GDK_OVERLAP_RECTANGLE_PART", "part" }, { 0, NULL, NULL } }; -static GtkEnumValue _gdk_debug_flag_values[] = { - { GDK_DEBUG_MISC, "GDK_DEBUG_MISC", "misc" }, - { GDK_DEBUG_EVENTS, "GDK_DEBUG_EVENTS", "events" }, - { GDK_DEBUG_DND, "GDK_DEBUG_DND", "dnd" }, - { GDK_DEBUG_COLOR_CONTEXT, "GDK_DEBUG_COLOR_CONTEXT", "color-context" }, - { GDK_DEBUG_XIM, "GDK_DEBUG_XIM", "xim" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_accel_flags_values[] = { - { GTK_ACCEL_VISIBLE, "GTK_ACCEL_VISIBLE", "visible" }, - { GTK_ACCEL_SIGNAL_VISIBLE, "GTK_ACCEL_SIGNAL_VISIBLE", "signal-visible" }, - { GTK_ACCEL_LOCKED, "GTK_ACCEL_LOCKED", "locked" }, - { GTK_ACCEL_MASK, "GTK_ACCEL_MASK", "mask" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_arrow_type_values[] = { - { GTK_ARROW_UP, "GTK_ARROW_UP", "up" }, - { GTK_ARROW_DOWN, "GTK_ARROW_DOWN", "down" }, - { GTK_ARROW_LEFT, "GTK_ARROW_LEFT", "left" }, - { GTK_ARROW_RIGHT, "GTK_ARROW_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_attach_options_values[] = { - { GTK_EXPAND, "GTK_EXPAND", "expand" }, - { GTK_SHRINK, "GTK_SHRINK", "shrink" }, - { GTK_FILL, "GTK_FILL", "fill" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_button_box_style_values[] = { - { GTK_BUTTONBOX_DEFAULT_STYLE, "GTK_BUTTONBOX_DEFAULT_STYLE", "default" }, - { GTK_BUTTONBOX_SPREAD, "GTK_BUTTONBOX_SPREAD", "spread" }, - { GTK_BUTTONBOX_EDGE, "GTK_BUTTONBOX_EDGE", "edge" }, - { GTK_BUTTONBOX_START, "GTK_BUTTONBOX_START", "start" }, - { GTK_BUTTONBOX_END, "GTK_BUTTONBOX_END", "end" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_curve_type_values[] = { - { GTK_CURVE_TYPE_LINEAR, "GTK_CURVE_TYPE_LINEAR", "linear" }, - { GTK_CURVE_TYPE_SPLINE, "GTK_CURVE_TYPE_SPLINE", "spline" }, - { GTK_CURVE_TYPE_FREE, "GTK_CURVE_TYPE_FREE", "free" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_direction_type_values[] = { - { GTK_DIR_TAB_FORWARD, "GTK_DIR_TAB_FORWARD", "tab-forward" }, - { GTK_DIR_TAB_BACKWARD, "GTK_DIR_TAB_BACKWARD", "tab-backward" }, - { GTK_DIR_UP, "GTK_DIR_UP", "up" }, - { GTK_DIR_DOWN, "GTK_DIR_DOWN", "down" }, - { GTK_DIR_LEFT, "GTK_DIR_LEFT", "left" }, - { GTK_DIR_RIGHT, "GTK_DIR_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_justification_values[] = { - { GTK_JUSTIFY_LEFT, "GTK_JUSTIFY_LEFT", "left" }, - { GTK_JUSTIFY_RIGHT, "GTK_JUSTIFY_RIGHT", "right" }, - { GTK_JUSTIFY_CENTER, "GTK_JUSTIFY_CENTER", "center" }, - { GTK_JUSTIFY_FILL, "GTK_JUSTIFY_FILL", "fill" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_match_type_values[] = { - { GTK_MATCH_ALL, "GTK_MATCH_ALL", "all" }, - { GTK_MATCH_ALL_TAIL, "GTK_MATCH_ALL_TAIL", "all-tail" }, - { GTK_MATCH_HEAD, "GTK_MATCH_HEAD", "head" }, - { GTK_MATCH_TAIL, "GTK_MATCH_TAIL", "tail" }, - { GTK_MATCH_EXACT, "GTK_MATCH_EXACT", "exact" }, - { GTK_MATCH_LAST, "GTK_MATCH_LAST", "last" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_menu_factory_type_values[] = { - { GTK_MENU_FACTORY_MENU, "GTK_MENU_FACTORY_MENU", "menu" }, - { GTK_MENU_FACTORY_MENU_BAR, "GTK_MENU_FACTORY_MENU_BAR", "menu-bar" }, - { GTK_MENU_FACTORY_OPTION_MENU, "GTK_MENU_FACTORY_OPTION_MENU", "option-menu" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_metric_type_values[] = { - { GTK_PIXELS, "GTK_PIXELS", "pixels" }, - { GTK_INCHES, "GTK_INCHES", "inches" }, - { GTK_CENTIMETERS, "GTK_CENTIMETERS", "centimeters" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_orientation_values[] = { - { GTK_ORIENTATION_HORIZONTAL, "GTK_ORIENTATION_HORIZONTAL", "horizontal" }, - { GTK_ORIENTATION_VERTICAL, "GTK_ORIENTATION_VERTICAL", "vertical" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_pack_type_values[] = { - { GTK_PACK_START, "GTK_PACK_START", "start" }, - { GTK_PACK_END, "GTK_PACK_END", "end" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_path_priority_type_values[] = { - { GTK_PATH_PRIO_LOWEST, "GTK_PATH_PRIO_LOWEST", "lowest" }, - { GTK_PATH_PRIO_GTK, "GTK_PATH_PRIO_GTK", "gtk" }, - { GTK_PATH_PRIO_APPLICATION, "GTK_PATH_PRIO_APPLICATION", "application" }, - { GTK_PATH_PRIO_RC, "GTK_PATH_PRIO_RC", "rc" }, - { GTK_PATH_PRIO_HIGHEST, "GTK_PATH_PRIO_HIGHEST", "highest" }, - { GTK_PATH_PRIO_MASK, "GTK_PATH_PRIO_MASK", "mask" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_path_type_values[] = { - { GTK_PATH_WIDGET, "GTK_PATH_WIDGET", "widget" }, - { GTK_PATH_WIDGET_CLASS, "GTK_PATH_WIDGET_CLASS", "widget-class" }, - { GTK_PATH_CLASS, "GTK_PATH_CLASS", "class" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_policy_type_values[] = { - { GTK_POLICY_ALWAYS, "GTK_POLICY_ALWAYS", "always" }, - { GTK_POLICY_AUTOMATIC, "GTK_POLICY_AUTOMATIC", "automatic" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_position_type_values[] = { - { GTK_POS_LEFT, "GTK_POS_LEFT", "left" }, - { GTK_POS_RIGHT, "GTK_POS_RIGHT", "right" }, - { GTK_POS_TOP, "GTK_POS_TOP", "top" }, - { GTK_POS_BOTTOM, "GTK_POS_BOTTOM", "bottom" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_preview_type_values[] = { - { GTK_PREVIEW_COLOR, "GTK_PREVIEW_COLOR", "color" }, - { GTK_PREVIEW_GRAYSCALE, "GTK_PREVIEW_GRAYSCALE", "grayscale" }, - { GTK_PREVIEW_GREYSCALE, "GTK_PREVIEW_GREYSCALE", "greyscale" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_relief_style_values[] = { - { GTK_RELIEF_NORMAL, "GTK_RELIEF_NORMAL", "normal" }, - { GTK_RELIEF_NONE, "GTK_RELIEF_NONE", "none" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_scroll_type_values[] = { - { GTK_SCROLL_NONE, "GTK_SCROLL_NONE", "none" }, - { GTK_SCROLL_STEP_BACKWARD, "GTK_SCROLL_STEP_BACKWARD", "step-backward" }, - { GTK_SCROLL_STEP_FORWARD, "GTK_SCROLL_STEP_FORWARD", "step-forward" }, - { GTK_SCROLL_PAGE_BACKWARD, "GTK_SCROLL_PAGE_BACKWARD", "page-backward" }, - { GTK_SCROLL_PAGE_FORWARD, "GTK_SCROLL_PAGE_FORWARD", "page-forward" }, - { GTK_SCROLL_JUMP, "GTK_SCROLL_JUMP", "jump" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_selection_mode_values[] = { - { GTK_SELECTION_SINGLE, "GTK_SELECTION_SINGLE", "single" }, - { GTK_SELECTION_BROWSE, "GTK_SELECTION_BROWSE", "browse" }, - { GTK_SELECTION_MULTIPLE, "GTK_SELECTION_MULTIPLE", "multiple" }, - { GTK_SELECTION_EXTENDED, "GTK_SELECTION_EXTENDED", "extended" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_shadow_type_values[] = { - { GTK_SHADOW_NONE, "GTK_SHADOW_NONE", "none" }, - { GTK_SHADOW_IN, "GTK_SHADOW_IN", "in" }, - { GTK_SHADOW_OUT, "GTK_SHADOW_OUT", "out" }, - { GTK_SHADOW_ETCHED_IN, "GTK_SHADOW_ETCHED_IN", "etched-in" }, - { GTK_SHADOW_ETCHED_OUT, "GTK_SHADOW_ETCHED_OUT", "etched-out" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_signal_run_type_values[] = { - { GTK_RUN_FIRST, "GTK_RUN_FIRST", "first" }, - { GTK_RUN_LAST, "GTK_RUN_LAST", "last" }, - { GTK_RUN_BOTH, "GTK_RUN_BOTH", "both" }, - { GTK_RUN_MASK, "GTK_RUN_MASK", "mask" }, - { GTK_RUN_NO_RECURSE, "GTK_RUN_NO_RECURSE", "no-recurse" }, - { GTK_RUN_ACTION, "GTK_RUN_ACTION", "action" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_state_type_values[] = { - { GTK_STATE_NORMAL, "GTK_STATE_NORMAL", "normal" }, - { GTK_STATE_ACTIVE, "GTK_STATE_ACTIVE", "active" }, - { GTK_STATE_PRELIGHT, "GTK_STATE_PRELIGHT", "prelight" }, - { GTK_STATE_SELECTED, "GTK_STATE_SELECTED", "selected" }, - { GTK_STATE_INSENSITIVE, "GTK_STATE_INSENSITIVE", "insensitive" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_submenu_direction_values[] = { - { GTK_DIRECTION_LEFT, "GTK_DIRECTION_LEFT", "left" }, - { GTK_DIRECTION_RIGHT, "GTK_DIRECTION_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_submenu_placement_values[] = { - { GTK_TOP_BOTTOM, "GTK_TOP_BOTTOM", "top-bottom" }, - { GTK_LEFT_RIGHT, "GTK_LEFT_RIGHT", "left-right" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_toolbar_style_values[] = { - { GTK_TOOLBAR_ICONS, "GTK_TOOLBAR_ICONS", "icons" }, - { GTK_TOOLBAR_TEXT, "GTK_TOOLBAR_TEXT", "text" }, - { GTK_TOOLBAR_BOTH, "GTK_TOOLBAR_BOTH", "both" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_trough_type_values[] = { - { GTK_TROUGH_NONE, "GTK_TROUGH_NONE", "none" }, - { GTK_TROUGH_START, "GTK_TROUGH_START", "start" }, - { GTK_TROUGH_END, "GTK_TROUGH_END", "end" }, - { GTK_TROUGH_JUMP, "GTK_TROUGH_JUMP", "jump" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_update_type_values[] = { - { GTK_UPDATE_CONTINUOUS, "GTK_UPDATE_CONTINUOUS", "continuous" }, - { GTK_UPDATE_DISCONTINUOUS, "GTK_UPDATE_DISCONTINUOUS", "discontinuous" }, - { GTK_UPDATE_DELAYED, "GTK_UPDATE_DELAYED", "delayed" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_visibility_values[] = { - { GTK_VISIBILITY_NONE, "GTK_VISIBILITY_NONE", "none" }, - { GTK_VISIBILITY_PARTIAL, "GTK_VISIBILITY_PARTIAL", "partial" }, - { GTK_VISIBILITY_FULL, "GTK_VISIBILITY_FULL", "full" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_window_position_values[] = { - { GTK_WIN_POS_NONE, "GTK_WIN_POS_NONE", "none" }, - { GTK_WIN_POS_CENTER, "GTK_WIN_POS_CENTER", "center" }, - { GTK_WIN_POS_MOUSE, "GTK_WIN_POS_MOUSE", "mouse" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_window_type_values[] = { - { GTK_WINDOW_TOPLEVEL, "GTK_WINDOW_TOPLEVEL", "toplevel" }, - { GTK_WINDOW_DIALOG, "GTK_WINDOW_DIALOG", "dialog" }, - { GTK_WINDOW_POPUP, "GTK_WINDOW_POPUP", "popup" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_fundamental_type_values[] = { - { GTK_TYPE_INVALID, "GTK_TYPE_INVALID", "invalid" }, - { GTK_TYPE_NONE, "GTK_TYPE_NONE", "none" }, - { GTK_TYPE_CHAR, "GTK_TYPE_CHAR", "char" }, - { GTK_TYPE_BOOL, "GTK_TYPE_BOOL", "bool" }, - { GTK_TYPE_INT, "GTK_TYPE_INT", "int" }, - { GTK_TYPE_UINT, "GTK_TYPE_UINT", "uint" }, - { GTK_TYPE_LONG, "GTK_TYPE_LONG", "long" }, - { GTK_TYPE_ULONG, "GTK_TYPE_ULONG", "ulong" }, - { GTK_TYPE_FLOAT, "GTK_TYPE_FLOAT", "float" }, - { GTK_TYPE_DOUBLE, "GTK_TYPE_DOUBLE", "double" }, - { GTK_TYPE_STRING, "GTK_TYPE_STRING", "string" }, - { GTK_TYPE_ENUM, "GTK_TYPE_ENUM", "enum" }, - { GTK_TYPE_FLAGS, "GTK_TYPE_FLAGS", "flags" }, - { GTK_TYPE_BOXED, "GTK_TYPE_BOXED", "boxed" }, - { GTK_TYPE_FOREIGN, "GTK_TYPE_FOREIGN", "foreign" }, - { GTK_TYPE_CALLBACK, "GTK_TYPE_CALLBACK", "callback" }, - { GTK_TYPE_ARGS, "GTK_TYPE_ARGS", "args" }, - { GTK_TYPE_POINTER, "GTK_TYPE_POINTER", "pointer" }, - { GTK_TYPE_SIGNAL, "GTK_TYPE_SIGNAL", "signal" }, - { GTK_TYPE_C_CALLBACK, "GTK_TYPE_C_CALLBACK", "c-callback" }, - { GTK_TYPE_OBJECT, "GTK_TYPE_OBJECT", "object" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_debug_flag_values[] = { - { GTK_DEBUG_OBJECTS, "GTK_DEBUG_OBJECTS", "objects" }, - { GTK_DEBUG_MISC, "GTK_DEBUG_MISC", "misc" }, - { GTK_DEBUG_SIGNALS, "GTK_DEBUG_SIGNALS", "signals" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_object_flags_values[] = { - { GTK_DESTROYED, "GTK_DESTROYED", "destroyed" }, - { GTK_FLOATING, "GTK_FLOATING", "floating" }, - { GTK_CONNECTED, "GTK_CONNECTED", "connected" }, - { GTK_OBJECT_FLAG_LAST, "GTK_OBJECT_FLAG_LAST", "object-flag-last" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_arg_flags_values[] = { - { GTK_ARG_READABLE, "GTK_ARG_READABLE", "readable" }, - { GTK_ARG_WRITABLE, "GTK_ARG_WRITABLE", "writable" }, - { GTK_ARG_CONSTRUCT, "GTK_ARG_CONSTRUCT", "construct" }, - { GTK_ARG_MASK, "GTK_ARG_MASK", "mask" }, - { GTK_ARG_READWRITE, "GTK_ARG_READWRITE", "readwrite" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_widget_flags_values[] = { - { GTK_TOPLEVEL, "GTK_TOPLEVEL", "toplevel" }, - { GTK_NO_WINDOW, "GTK_NO_WINDOW", "no-window" }, - { GTK_REALIZED, "GTK_REALIZED", "realized" }, - { GTK_MAPPED, "GTK_MAPPED", "mapped" }, - { GTK_VISIBLE, "GTK_VISIBLE", "visible" }, - { GTK_SENSITIVE, "GTK_SENSITIVE", "sensitive" }, - { GTK_PARENT_SENSITIVE, "GTK_PARENT_SENSITIVE", "parent-sensitive" }, - { GTK_CAN_FOCUS, "GTK_CAN_FOCUS", "can-focus" }, - { GTK_HAS_FOCUS, "GTK_HAS_FOCUS", "has-focus" }, - { GTK_CAN_DEFAULT, "GTK_CAN_DEFAULT", "can-default" }, - { GTK_HAS_DEFAULT, "GTK_HAS_DEFAULT", "has-default" }, - { GTK_HAS_GRAB, "GTK_HAS_GRAB", "has-grab" }, - { GTK_RC_STYLE, "GTK_RC_STYLE", "rc-style" }, - { GTK_BASIC, "GTK_BASIC", "basic" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_packer_options_values[] = { - { GTK_PACK_EXPAND, "GTK_PACK_EXPAND", "pack-expand" }, - { GTK_FILL_X, "GTK_FILL_X", "fill-x" }, - { GTK_FILL_Y, "GTK_FILL_Y", "fill-y" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_side_type_values[] = { - { GTK_SIDE_TOP, "GTK_SIDE_TOP", "top" }, - { GTK_SIDE_BOTTOM, "GTK_SIDE_BOTTOM", "bottom" }, - { GTK_SIDE_LEFT, "GTK_SIDE_LEFT", "left" }, - { GTK_SIDE_RIGHT, "GTK_SIDE_RIGHT", "right" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_anchor_type_values[] = { - { GTK_ANCHOR_CENTER, "GTK_ANCHOR_CENTER", "center" }, - { GTK_ANCHOR_NORTH, "GTK_ANCHOR_NORTH", "north" }, - { GTK_ANCHOR_NORTH_WEST, "GTK_ANCHOR_NORTH_WEST", "north-west" }, - { GTK_ANCHOR_NORTH_EAST, "GTK_ANCHOR_NORTH_EAST", "north-east" }, - { GTK_ANCHOR_SOUTH, "GTK_ANCHOR_SOUTH", "south" }, - { GTK_ANCHOR_SOUTH_WEST, "GTK_ANCHOR_SOUTH_WEST", "south-west" }, - { GTK_ANCHOR_SOUTH_EAST, "GTK_ANCHOR_SOUTH_EAST", "south-east" }, - { GTK_ANCHOR_WEST, "GTK_ANCHOR_WEST", "west" }, - { GTK_ANCHOR_EAST, "GTK_ANCHOR_EAST", "east" }, - { 0, NULL, NULL } -}; -static GtkEnumValue _gtk_private_flags_values[] = { - { PRIVATE_GTK_USER_STYLE, "PRIVATE_GTK_USER_STYLE", "user-style" }, - { PRIVATE_GTK_REDRAW_PENDING, "PRIVATE_GTK_REDRAW_PENDING", "redraw-pending" }, - { PRIVATE_GTK_RESIZE_PENDING, "PRIVATE_GTK_RESIZE_PENDING", "resize-pending" }, - { PRIVATE_GTK_RESIZE_NEEDED, "PRIVATE_GTK_RESIZE_NEEDED", "resize-needed" }, - { PRIVATE_GTK_LEAVE_PENDING, "PRIVATE_GTK_LEAVE_PENDING", "leave-pending" }, - { PRIVATE_GTK_HAS_SHAPE_MASK, "PRIVATE_GTK_HAS_SHAPE_MASK", "has-shape-mask" }, - { PRIVATE_GTK_IN_REPARENT, "PRIVATE_GTK_IN_REPARENT", "in-reparent" }, - { 0, NULL, NULL } -}; - diff --git a/gtk/gtktypebuiltins_ids.c b/gtk/gtktypebuiltins_ids.c index 3e6fe2105c..611759a6ac 100644 --- a/gtk/gtktypebuiltins_ids.c +++ b/gtk/gtktypebuiltins_ids.c @@ -1,85 +1,13 @@ /* type entries, generated by maketypes.awk */ - { "GdkWindowType", >K_TYPE_GDK_WINDOW_TYPE, - GTK_TYPE_ENUM, _gdk_window_type_values }, - { "GdkWindowClass", >K_TYPE_GDK_WINDOW_CLASS, - GTK_TYPE_ENUM, _gdk_window_class_values }, - { "GdkImageType", >K_TYPE_GDK_IMAGE_TYPE, - GTK_TYPE_ENUM, _gdk_image_type_values }, - { "GdkVisualType", >K_TYPE_GDK_VISUAL_TYPE, - GTK_TYPE_ENUM, _gdk_visual_type_values }, - { "GdkFontType", >K_TYPE_GDK_FONT_TYPE, - GTK_TYPE_ENUM, _gdk_font_type_values }, - { "GdkWindowAttributesType", >K_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE, - GTK_TYPE_FLAGS, _gdk_window_attributes_type_values }, - { "GdkWindowHints", >K_TYPE_GDK_WINDOW_HINTS, - GTK_TYPE_FLAGS, _gdk_window_hints_values }, - { "GdkFunction", >K_TYPE_GDK_FUNCTION, - GTK_TYPE_ENUM, _gdk_function_values }, - { "GdkFill", >K_TYPE_GDK_FILL, - GTK_TYPE_ENUM, _gdk_fill_values }, - { "GdkFillRule", >K_TYPE_GDK_FILL_RULE, - GTK_TYPE_ENUM, _gdk_fill_rule_values }, - { "GdkLineStyle", >K_TYPE_GDK_LINE_STYLE, - GTK_TYPE_ENUM, _gdk_line_style_values }, - { "GdkCapStyle", >K_TYPE_GDK_CAP_STYLE, - GTK_TYPE_ENUM, _gdk_cap_style_values }, - { "GdkJoinStyle", >K_TYPE_GDK_JOIN_STYLE, - GTK_TYPE_ENUM, _gdk_join_style_values }, - { "GdkFilterReturn", >K_TYPE_GDK_FILTER_RETURN, - GTK_TYPE_ENUM, _gdk_filter_return_values }, - { "GdkVisibilityState", >K_TYPE_GDK_VISIBILITY_STATE, - GTK_TYPE_ENUM, _gdk_visibility_state_values }, - { "GdkEventType", >K_TYPE_GDK_EVENT_TYPE, - GTK_TYPE_ENUM, _gdk_event_type_values }, - { "GdkEventMask", >K_TYPE_GDK_EVENT_MASK, - GTK_TYPE_FLAGS, _gdk_event_mask_values }, - { "GdkNotifyType", >K_TYPE_GDK_NOTIFY_TYPE, - GTK_TYPE_ENUM, _gdk_notify_type_values }, - { "GdkCrossingMode", >K_TYPE_GDK_CROSSING_MODE, - GTK_TYPE_ENUM, _gdk_crossing_mode_values }, - { "GdkModifierType", >K_TYPE_GDK_MODIFIER_TYPE, - GTK_TYPE_FLAGS, _gdk_modifier_type_values }, - { "GdkSubwindowMode", >K_TYPE_GDK_SUBWINDOW_MODE, - GTK_TYPE_ENUM, _gdk_subwindow_mode_values }, - { "GdkInputCondition", >K_TYPE_GDK_INPUT_CONDITION, - GTK_TYPE_FLAGS, _gdk_input_condition_values }, - { "GdkStatus", >K_TYPE_GDK_STATUS, - GTK_TYPE_ENUM, _gdk_status_values }, - { "GdkByteOrder", >K_TYPE_GDK_BYTE_ORDER, - GTK_TYPE_ENUM, _gdk_byte_order_values }, - { "GdkGCValuesMask", >K_TYPE_GDK_G_C_VALUES_MASK, - GTK_TYPE_FLAGS, _gdk_g_c_values_mask_values }, - { "GdkSelection", >K_TYPE_GDK_SELECTION, - GTK_TYPE_ENUM, _gdk_selection_values }, - { "GdkPropertyState", >K_TYPE_GDK_PROPERTY_STATE, - GTK_TYPE_ENUM, _gdk_property_state_values }, - { "GdkPropMode", >K_TYPE_GDK_PROP_MODE, - GTK_TYPE_ENUM, _gdk_prop_mode_values }, - { "GdkDndType", >K_TYPE_GDK_DND_TYPE, - GTK_TYPE_ENUM, _gdk_dnd_type_values }, - { "GdkInputSource", >K_TYPE_GDK_INPUT_SOURCE, - GTK_TYPE_ENUM, _gdk_input_source_values }, - { "GdkInputMode", >K_TYPE_GDK_INPUT_MODE, - GTK_TYPE_ENUM, _gdk_input_mode_values }, - { "GdkAxisUse", >K_TYPE_GDK_AXIS_USE, - GTK_TYPE_ENUM, _gdk_axis_use_values }, - { "GdkTarget", >K_TYPE_GDK_TARGET, - GTK_TYPE_ENUM, _gdk_target_values }, - { "GdkSelectionType", >K_TYPE_GDK_SELECTION_TYPE, - GTK_TYPE_ENUM, _gdk_selection_type_values }, - { "GdkExtensionMode", >K_TYPE_GDK_EXTENSION_MODE, - GTK_TYPE_ENUM, _gdk_extension_mode_values }, - { "GdkWMDecoration", >K_TYPE_GDK_W_M_DECORATION, - GTK_TYPE_FLAGS, _gdk_w_m_decoration_values }, - { "GdkWMFunction", >K_TYPE_GDK_W_M_FUNCTION, - GTK_TYPE_FLAGS, _gdk_w_m_function_values }, - { "GdkColorContextMode", >K_TYPE_GDK_COLOR_CONTEXT_MODE, - GTK_TYPE_ENUM, _gdk_color_context_mode_values }, - { "GdkOverlapType", >K_TYPE_GDK_OVERLAP_TYPE, - GTK_TYPE_ENUM, _gdk_overlap_type_values }, - { "GdkDebugFlag", >K_TYPE_GDK_DEBUG_FLAG, - GTK_TYPE_FLAGS, _gdk_debug_flag_values }, + { "GtkCellType", >K_TYPE_CELL_TYPE, + GTK_TYPE_ENUM, _gtk_cell_type_values }, + { "GtkCTreePos", >K_TYPE_C_TREE_POS, + GTK_TYPE_ENUM, _gtk_c_tree_pos_values }, + { "GtkCTreeLineStyle", >K_TYPE_C_TREE_LINE_STYLE, + GTK_TYPE_ENUM, _gtk_c_tree_line_style_values }, + { "GtkDebugFlag", >K_TYPE_DEBUG_FLAG, + GTK_TYPE_FLAGS, _gtk_debug_flag_values }, { "GtkAccelFlags", >K_TYPE_ACCEL_FLAGS, GTK_TYPE_FLAGS, _gtk_accel_flags_values }, { "GtkArrowType", >K_TYPE_ARROW_TYPE, @@ -116,14 +44,14 @@ GTK_TYPE_ENUM, _gtk_preview_type_values }, { "GtkReliefStyle", >K_TYPE_RELIEF_STYLE, GTK_TYPE_ENUM, _gtk_relief_style_values }, + { "GtkSignalRunType", >K_TYPE_SIGNAL_RUN_TYPE, + GTK_TYPE_FLAGS, _gtk_signal_run_type_values }, { "GtkScrollType", >K_TYPE_SCROLL_TYPE, GTK_TYPE_ENUM, _gtk_scroll_type_values }, { "GtkSelectionMode", >K_TYPE_SELECTION_MODE, GTK_TYPE_ENUM, _gtk_selection_mode_values }, { "GtkShadowType", >K_TYPE_SHADOW_TYPE, GTK_TYPE_ENUM, _gtk_shadow_type_values }, - { "GtkSignalRunType", >K_TYPE_SIGNAL_RUN_TYPE, - GTK_TYPE_FLAGS, _gtk_signal_run_type_values }, { "GtkStateType", >K_TYPE_STATE_TYPE, GTK_TYPE_ENUM, _gtk_state_type_values }, { "GtkSubmenuDirection", >K_TYPE_SUBMENU_DIRECTION, @@ -142,16 +70,10 @@ GTK_TYPE_ENUM, _gtk_window_position_values }, { "GtkWindowType", >K_TYPE_WINDOW_TYPE, GTK_TYPE_ENUM, _gtk_window_type_values }, - { "GtkFundamentalType", >K_TYPE_FUNDAMENTAL_TYPE, - GTK_TYPE_ENUM, _gtk_fundamental_type_values }, - { "GtkDebugFlag", >K_TYPE_DEBUG_FLAG, - GTK_TYPE_FLAGS, _gtk_debug_flag_values }, { "GtkObjectFlags", >K_TYPE_OBJECT_FLAGS, GTK_TYPE_FLAGS, _gtk_object_flags_values }, { "GtkArgFlags", >K_TYPE_ARG_FLAGS, GTK_TYPE_FLAGS, _gtk_arg_flags_values }, - { "GtkWidgetFlags", >K_TYPE_WIDGET_FLAGS, - GTK_TYPE_FLAGS, _gtk_widget_flags_values }, { "GtkPackerOptions", >K_TYPE_PACKER_OPTIONS, GTK_TYPE_FLAGS, _gtk_packer_options_values }, { "GtkSideType", >K_TYPE_SIDE_TYPE, @@ -160,6 +82,100 @@ GTK_TYPE_ENUM, _gtk_anchor_type_values }, { "GtkPrivateFlags", >K_TYPE_PRIVATE_FLAGS, GTK_TYPE_FLAGS, _gtk_private_flags_values }, + { "GtkSpinButtonUpdatePolicy", >K_TYPE_SPIN_BUTTON_UPDATE_POLICY, + GTK_TYPE_FLAGS, _gtk_spin_button_update_policy_values }, + { "GtkToolbarChildType", >K_TYPE_TOOLBAR_CHILD_TYPE, + GTK_TYPE_ENUM, _gtk_toolbar_child_type_values }, + { "GtkTreeViewMode", >K_TYPE_TREE_VIEW_MODE, + GTK_TYPE_ENUM, _gtk_tree_view_mode_values }, + { "GtkFundamentalType", >K_TYPE_FUNDAMENTAL_TYPE, + GTK_TYPE_ENUM, _gtk_fundamental_type_values }, + { "GtkWidgetFlags", >K_TYPE_WIDGET_FLAGS, + GTK_TYPE_FLAGS, _gtk_widget_flags_values }, + { "GdkDebugFlag", >K_TYPE_GDK_DEBUG_FLAG, + GTK_TYPE_FLAGS, _gdk_debug_flag_values }, + { "GdkWindowType", >K_TYPE_GDK_WINDOW_TYPE, + GTK_TYPE_ENUM, _gdk_window_type_values }, + { "GdkWindowClass", >K_TYPE_GDK_WINDOW_CLASS, + GTK_TYPE_ENUM, _gdk_window_class_values }, + { "GdkImageType", >K_TYPE_GDK_IMAGE_TYPE, + GTK_TYPE_ENUM, _gdk_image_type_values }, + { "GdkVisualType", >K_TYPE_GDK_VISUAL_TYPE, + GTK_TYPE_ENUM, _gdk_visual_type_values }, + { "GdkFontType", >K_TYPE_GDK_FONT_TYPE, + GTK_TYPE_ENUM, _gdk_font_type_values }, + { "GdkWindowAttributesType", >K_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE, + GTK_TYPE_FLAGS, _gdk_window_attributes_type_values }, + { "GdkWindowHints", >K_TYPE_GDK_WINDOW_HINTS, + GTK_TYPE_FLAGS, _gdk_window_hints_values }, + { "GdkFunction", >K_TYPE_GDK_FUNCTION, + GTK_TYPE_ENUM, _gdk_function_values }, + { "GdkFill", >K_TYPE_GDK_FILL, + GTK_TYPE_ENUM, _gdk_fill_values }, + { "GdkFillRule", >K_TYPE_GDK_FILL_RULE, + GTK_TYPE_ENUM, _gdk_fill_rule_values }, + { "GdkLineStyle", >K_TYPE_GDK_LINE_STYLE, + GTK_TYPE_ENUM, _gdk_line_style_values }, + { "GdkCapStyle", >K_TYPE_GDK_CAP_STYLE, + GTK_TYPE_ENUM, _gdk_cap_style_values }, + { "GdkJoinStyle", >K_TYPE_GDK_JOIN_STYLE, + GTK_TYPE_ENUM, _gdk_join_style_values }, + { "GdkCursorType", >K_TYPE_GDK_CURSOR_TYPE, + GTK_TYPE_ENUM, _gdk_cursor_type_values }, + { "GdkFilterReturn", >K_TYPE_GDK_FILTER_RETURN, + GTK_TYPE_ENUM, _gdk_filter_return_values }, + { "GdkVisibilityState", >K_TYPE_GDK_VISIBILITY_STATE, + GTK_TYPE_ENUM, _gdk_visibility_state_values }, + { "GdkEventType", >K_TYPE_GDK_EVENT_TYPE, + GTK_TYPE_ENUM, _gdk_event_type_values }, + { "GdkEventMask", >K_TYPE_GDK_EVENT_MASK, + GTK_TYPE_FLAGS, _gdk_event_mask_values }, + { "GdkNotifyType", >K_TYPE_GDK_NOTIFY_TYPE, + GTK_TYPE_ENUM, _gdk_notify_type_values }, + { "GdkCrossingMode", >K_TYPE_GDK_CROSSING_MODE, + GTK_TYPE_ENUM, _gdk_crossing_mode_values }, + { "GdkModifierType", >K_TYPE_GDK_MODIFIER_TYPE, + GTK_TYPE_FLAGS, _gdk_modifier_type_values }, + { "GdkSubwindowMode", >K_TYPE_GDK_SUBWINDOW_MODE, + GTK_TYPE_ENUM, _gdk_subwindow_mode_values }, + { "GdkInputCondition", >K_TYPE_GDK_INPUT_CONDITION, + GTK_TYPE_FLAGS, _gdk_input_condition_values }, + { "GdkStatus", >K_TYPE_GDK_STATUS, + GTK_TYPE_ENUM, _gdk_status_values }, + { "GdkByteOrder", >K_TYPE_GDK_BYTE_ORDER, + GTK_TYPE_ENUM, _gdk_byte_order_values }, + { "GdkGCValuesMask", >K_TYPE_GDK_GC_VALUES_MASK, + GTK_TYPE_FLAGS, _gdk_gc_values_mask_values }, + { "GdkSelection", >K_TYPE_GDK_SELECTION, + GTK_TYPE_ENUM, _gdk_selection_values }, + { "GdkPropertyState", >K_TYPE_GDK_PROPERTY_STATE, + GTK_TYPE_ENUM, _gdk_property_state_values }, + { "GdkPropMode", >K_TYPE_GDK_PROP_MODE, + GTK_TYPE_ENUM, _gdk_prop_mode_values }, + { "GdkDndType", >K_TYPE_GDK_DND_TYPE, + GTK_TYPE_ENUM, _gdk_dnd_type_values }, + { "GdkInputSource", >K_TYPE_GDK_INPUT_SOURCE, + GTK_TYPE_ENUM, _gdk_input_source_values }, + { "GdkInputMode", >K_TYPE_GDK_INPUT_MODE, + GTK_TYPE_ENUM, _gdk_input_mode_values }, + { "GdkAxisUse", >K_TYPE_GDK_AXIS_USE, + GTK_TYPE_ENUM, _gdk_axis_use_values }, + { "GdkTarget", >K_TYPE_GDK_TARGET, + GTK_TYPE_ENUM, _gdk_target_values }, + { "GdkSelectionType", >K_TYPE_GDK_SELECTION_TYPE, + GTK_TYPE_ENUM, _gdk_selection_type_values }, + { "GdkExtensionMode", >K_TYPE_GDK_EXTENSION_MODE, + GTK_TYPE_ENUM, _gdk_extension_mode_values }, + { "GdkIMStyle", >K_TYPE_GDK_IM_STYLE, + GTK_TYPE_FLAGS, _gdk_im_style_values }, + { "GdkWMDecoration", >K_TYPE_GDK_WM_DECORATION, + GTK_TYPE_FLAGS, _gdk_wm_decoration_values }, + { "GdkWMFunction", >K_TYPE_GDK_WM_FUNCTION, + GTK_TYPE_FLAGS, _gdk_wm_function_values }, + { "GdkColorContextMode", >K_TYPE_GDK_COLOR_CONTEXT_MODE, + GTK_TYPE_ENUM, _gdk_color_context_mode_values }, + { "GdkOverlapType", >K_TYPE_GDK_OVERLAP_TYPE, + GTK_TYPE_ENUM, _gdk_overlap_type_values }, { "GtkAccelGroup", >K_TYPE_ACCEL_GROUP, GTK_TYPE_BOXED, NULL }, { "GtkSelectionData", >K_TYPE_SELECTION_DATA, diff --git a/gtk/gtktypebuiltins_vars.c b/gtk/gtktypebuiltins_vars.c index a23349d8af..10395c3ddc 100644 --- a/gtk/gtktypebuiltins_vars.c +++ b/gtk/gtktypebuiltins_vars.c @@ -1,45 +1,9 @@ /* type variables, generated by maketypes.awk */ -GtkType GTK_TYPE_GDK_WINDOW_TYPE = 0; -GtkType GTK_TYPE_GDK_WINDOW_CLASS = 0; -GtkType GTK_TYPE_GDK_IMAGE_TYPE = 0; -GtkType GTK_TYPE_GDK_VISUAL_TYPE = 0; -GtkType GTK_TYPE_GDK_FONT_TYPE = 0; -GtkType GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE = 0; -GtkType GTK_TYPE_GDK_WINDOW_HINTS = 0; -GtkType GTK_TYPE_GDK_FUNCTION = 0; -GtkType GTK_TYPE_GDK_FILL = 0; -GtkType GTK_TYPE_GDK_FILL_RULE = 0; -GtkType GTK_TYPE_GDK_LINE_STYLE = 0; -GtkType GTK_TYPE_GDK_CAP_STYLE = 0; -GtkType GTK_TYPE_GDK_JOIN_STYLE = 0; -GtkType GTK_TYPE_GDK_FILTER_RETURN = 0; -GtkType GTK_TYPE_GDK_VISIBILITY_STATE = 0; -GtkType GTK_TYPE_GDK_EVENT_TYPE = 0; -GtkType GTK_TYPE_GDK_EVENT_MASK = 0; -GtkType GTK_TYPE_GDK_NOTIFY_TYPE = 0; -GtkType GTK_TYPE_GDK_CROSSING_MODE = 0; -GtkType GTK_TYPE_GDK_MODIFIER_TYPE = 0; -GtkType GTK_TYPE_GDK_SUBWINDOW_MODE = 0; -GtkType GTK_TYPE_GDK_INPUT_CONDITION = 0; -GtkType GTK_TYPE_GDK_STATUS = 0; -GtkType GTK_TYPE_GDK_BYTE_ORDER = 0; -GtkType GTK_TYPE_GDK_G_C_VALUES_MASK = 0; -GtkType GTK_TYPE_GDK_SELECTION = 0; -GtkType GTK_TYPE_GDK_PROPERTY_STATE = 0; -GtkType GTK_TYPE_GDK_PROP_MODE = 0; -GtkType GTK_TYPE_GDK_DND_TYPE = 0; -GtkType GTK_TYPE_GDK_INPUT_SOURCE = 0; -GtkType GTK_TYPE_GDK_INPUT_MODE = 0; -GtkType GTK_TYPE_GDK_AXIS_USE = 0; -GtkType GTK_TYPE_GDK_TARGET = 0; -GtkType GTK_TYPE_GDK_SELECTION_TYPE = 0; -GtkType GTK_TYPE_GDK_EXTENSION_MODE = 0; -GtkType GTK_TYPE_GDK_W_M_DECORATION = 0; -GtkType GTK_TYPE_GDK_W_M_FUNCTION = 0; -GtkType GTK_TYPE_GDK_COLOR_CONTEXT_MODE = 0; -GtkType GTK_TYPE_GDK_OVERLAP_TYPE = 0; -GtkType GTK_TYPE_GDK_DEBUG_FLAG = 0; +GtkType GTK_TYPE_CELL_TYPE = 0; +GtkType GTK_TYPE_C_TREE_POS = 0; +GtkType GTK_TYPE_C_TREE_LINE_STYLE = 0; +GtkType GTK_TYPE_DEBUG_FLAG = 0; GtkType GTK_TYPE_ACCEL_FLAGS = 0; GtkType GTK_TYPE_ARROW_TYPE = 0; GtkType GTK_TYPE_ATTACH_OPTIONS = 0; @@ -58,10 +22,10 @@ GtkType GTK_TYPE_POLICY_TYPE = 0; GtkType GTK_TYPE_POSITION_TYPE = 0; GtkType GTK_TYPE_PREVIEW_TYPE = 0; GtkType GTK_TYPE_RELIEF_STYLE = 0; +GtkType GTK_TYPE_SIGNAL_RUN_TYPE = 0; GtkType GTK_TYPE_SCROLL_TYPE = 0; GtkType GTK_TYPE_SELECTION_MODE = 0; GtkType GTK_TYPE_SHADOW_TYPE = 0; -GtkType GTK_TYPE_SIGNAL_RUN_TYPE = 0; GtkType GTK_TYPE_STATE_TYPE = 0; GtkType GTK_TYPE_SUBMENU_DIRECTION = 0; GtkType GTK_TYPE_SUBMENU_PLACEMENT = 0; @@ -71,15 +35,59 @@ GtkType GTK_TYPE_UPDATE_TYPE = 0; GtkType GTK_TYPE_VISIBILITY = 0; GtkType GTK_TYPE_WINDOW_POSITION = 0; GtkType GTK_TYPE_WINDOW_TYPE = 0; -GtkType GTK_TYPE_FUNDAMENTAL_TYPE = 0; -GtkType GTK_TYPE_DEBUG_FLAG = 0; GtkType GTK_TYPE_OBJECT_FLAGS = 0; GtkType GTK_TYPE_ARG_FLAGS = 0; -GtkType GTK_TYPE_WIDGET_FLAGS = 0; GtkType GTK_TYPE_PACKER_OPTIONS = 0; GtkType GTK_TYPE_SIDE_TYPE = 0; GtkType GTK_TYPE_ANCHOR_TYPE = 0; GtkType GTK_TYPE_PRIVATE_FLAGS = 0; +GtkType GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY = 0; +GtkType GTK_TYPE_TOOLBAR_CHILD_TYPE = 0; +GtkType GTK_TYPE_TREE_VIEW_MODE = 0; +GtkType GTK_TYPE_FUNDAMENTAL_TYPE = 0; +GtkType GTK_TYPE_WIDGET_FLAGS = 0; +GtkType GTK_TYPE_GDK_DEBUG_FLAG = 0; +GtkType GTK_TYPE_GDK_WINDOW_TYPE = 0; +GtkType GTK_TYPE_GDK_WINDOW_CLASS = 0; +GtkType GTK_TYPE_GDK_IMAGE_TYPE = 0; +GtkType GTK_TYPE_GDK_VISUAL_TYPE = 0; +GtkType GTK_TYPE_GDK_FONT_TYPE = 0; +GtkType GTK_TYPE_GDK_WINDOW_ATTRIBUTES_TYPE = 0; +GtkType GTK_TYPE_GDK_WINDOW_HINTS = 0; +GtkType GTK_TYPE_GDK_FUNCTION = 0; +GtkType GTK_TYPE_GDK_FILL = 0; +GtkType GTK_TYPE_GDK_FILL_RULE = 0; +GtkType GTK_TYPE_GDK_LINE_STYLE = 0; +GtkType GTK_TYPE_GDK_CAP_STYLE = 0; +GtkType GTK_TYPE_GDK_JOIN_STYLE = 0; +GtkType GTK_TYPE_GDK_CURSOR_TYPE = 0; +GtkType GTK_TYPE_GDK_FILTER_RETURN = 0; +GtkType GTK_TYPE_GDK_VISIBILITY_STATE = 0; +GtkType GTK_TYPE_GDK_EVENT_TYPE = 0; +GtkType GTK_TYPE_GDK_EVENT_MASK = 0; +GtkType GTK_TYPE_GDK_NOTIFY_TYPE = 0; +GtkType GTK_TYPE_GDK_CROSSING_MODE = 0; +GtkType GTK_TYPE_GDK_MODIFIER_TYPE = 0; +GtkType GTK_TYPE_GDK_SUBWINDOW_MODE = 0; +GtkType GTK_TYPE_GDK_INPUT_CONDITION = 0; +GtkType GTK_TYPE_GDK_STATUS = 0; +GtkType GTK_TYPE_GDK_BYTE_ORDER = 0; +GtkType GTK_TYPE_GDK_GC_VALUES_MASK = 0; +GtkType GTK_TYPE_GDK_SELECTION = 0; +GtkType GTK_TYPE_GDK_PROPERTY_STATE = 0; +GtkType GTK_TYPE_GDK_PROP_MODE = 0; +GtkType GTK_TYPE_GDK_DND_TYPE = 0; +GtkType GTK_TYPE_GDK_INPUT_SOURCE = 0; +GtkType GTK_TYPE_GDK_INPUT_MODE = 0; +GtkType GTK_TYPE_GDK_AXIS_USE = 0; +GtkType GTK_TYPE_GDK_TARGET = 0; +GtkType GTK_TYPE_GDK_SELECTION_TYPE = 0; +GtkType GTK_TYPE_GDK_EXTENSION_MODE = 0; +GtkType GTK_TYPE_GDK_IM_STYLE = 0; +GtkType GTK_TYPE_GDK_WM_DECORATION = 0; +GtkType GTK_TYPE_GDK_WM_FUNCTION = 0; +GtkType GTK_TYPE_GDK_COLOR_CONTEXT_MODE = 0; +GtkType GTK_TYPE_GDK_OVERLAP_TYPE = 0; GtkType GTK_TYPE_ACCEL_GROUP = 0; GtkType GTK_TYPE_SELECTION_DATA = 0; GtkType GTK_TYPE_STYLE = 0; diff --git a/gtk/gtktypeutils.h b/gtk/gtktypeutils.h index 40c984c129..8f8701b08f 100644 --- a/gtk/gtktypeutils.h +++ b/gtk/gtktypeutils.h @@ -33,35 +33,34 @@ extern "C" { */ typedef enum { - G_SV (GTK_TYPE_INVALID, invalid), - G_SV (GTK_TYPE_NONE, none), - G_SV (GTK_TYPE_CHAR, char), - G_SV (GTK_TYPE_BOOL, bool), - G_SV (GTK_TYPE_INT, int), - G_SV (GTK_TYPE_UINT, uint), - G_SV (GTK_TYPE_LONG, long), - G_SV (GTK_TYPE_ULONG, ulong), - G_SV (GTK_TYPE_FLOAT, float), - G_SV (GTK_TYPE_DOUBLE, double), - G_SV (GTK_TYPE_STRING, string), - G_SV (GTK_TYPE_ENUM, enum), - G_SV (GTK_TYPE_FLAGS, flags), - G_SV (GTK_TYPE_BOXED, boxed), - G_SV (GTK_TYPE_FOREIGN, foreign), - G_SV (GTK_TYPE_CALLBACK, callback), - G_SV (GTK_TYPE_ARGS, args), + GTK_TYPE_INVALID, + GTK_TYPE_NONE, + GTK_TYPE_CHAR, + GTK_TYPE_BOOL, + GTK_TYPE_INT, + GTK_TYPE_UINT, + GTK_TYPE_LONG, + GTK_TYPE_ULONG, + GTK_TYPE_FLOAT, + GTK_TYPE_DOUBLE, + GTK_TYPE_STRING, + GTK_TYPE_ENUM, + GTK_TYPE_FLAGS, + GTK_TYPE_BOXED, + GTK_TYPE_FOREIGN, + GTK_TYPE_CALLBACK, + GTK_TYPE_ARGS, - G_SV (GTK_TYPE_POINTER, pointer), + GTK_TYPE_POINTER, /* It'd be great if GTK_TYPE_POINTER and GTK_TYPE_C_CALLBACK * could be removed eventually */ - G_SV (GTK_TYPE_SIGNAL, signal), - G_SV (GTK_TYPE_C_CALLBACK, c-callback), + GTK_TYPE_SIGNAL, + GTK_TYPE_C_CALLBACK, - G_SV (GTK_TYPE_OBJECT, object) - -} G_ENUM (GtkFundamentalType); + GTK_TYPE_OBJECT +} GtkFundamentalType; typedef guint GtkType; diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index 4f9ff90b02..2aa7ec8b94 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -37,22 +37,21 @@ extern "C" { */ typedef enum { - G_NV (GTK_TOPLEVEL, toplevel, 1 << 4), - G_NV (GTK_NO_WINDOW, no-window, 1 << 5), - G_NV (GTK_REALIZED, realized, 1 << 6), - G_NV (GTK_MAPPED, mapped, 1 << 7), - G_NV (GTK_VISIBLE, visible, 1 << 8), - G_NV (GTK_SENSITIVE, sensitive, 1 << 9), - G_NV (GTK_PARENT_SENSITIVE, parent-sensitive, 1 << 10), - G_NV (GTK_CAN_FOCUS, can-focus, 1 << 11), - G_NV (GTK_HAS_FOCUS, has-focus, 1 << 12), - G_NV (GTK_CAN_DEFAULT, can-default, 1 << 13), - G_NV (GTK_HAS_DEFAULT, has-default, 1 << 14), - G_NV (GTK_HAS_GRAB, has-grab, 1 << 15), - G_NV (GTK_RC_STYLE, rc-style, 1 << 16), - G_NV (GTK_BASIC, basic, 1 << 17) -} G_FLAGS (GtkWidgetFlags); - + GTK_TOPLEVEL = 1 << 4, + GTK_NO_WINDOW = 1 << 5, + GTK_REALIZED = 1 << 6, + GTK_MAPPED = 1 << 7, + GTK_VISIBLE = 1 << 8, + GTK_SENSITIVE = 1 << 9, + GTK_PARENT_SENSITIVE = 1 << 10, + GTK_CAN_FOCUS = 1 << 11, + GTK_HAS_FOCUS = 1 << 12, + GTK_CAN_DEFAULT = 1 << 13, + GTK_HAS_DEFAULT = 1 << 14, + GTK_HAS_GRAB = 1 << 15, + GTK_RC_STYLE = 1 << 16, + GTK_BASIC = 1 << 17 +} GtkWidgetFlags; /* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer. * Macros for testing whether `widget' or `klass' are of type GTK_TYPE_WIDGET. diff --git a/gtk/maketypes.awk b/gtk/maketypes.awk index fa9f03bca0..95f3d5a034 100644 --- a/gtk/maketypes.awk +++ b/gtk/maketypes.awk @@ -37,22 +37,17 @@ function set_type (set_type_1) type_counter += 1; type_name = set_type_1; type_macro = "GTK_TYPE"; - type_ident = ""; - for (i = 0; i < length (type_name); i++) - { - ch = substr (type_name, i + 1, 1); - Ch = toupper (ch); - if (Ch == ch) - { - type_macro = type_macro "_" Ch; - type_ident = type_ident "_" tolower (ch); - } - else - { - type_macro = type_macro Ch; - type_ident = type_ident ch; - } - } + + tmp = type_name + gsub ("[A-Z][a-z]", "_&", tmp); +# OK, the following is ridiculous. But easier than writing a loop + gsub ("[a-z]", "&@", tmp); + gsub ("@[A-Z]", "@&", tmp); + gsub ("@@", "_", tmp); + gsub ("@", "", tmp); + type_macro = type_macro toupper (tmp); + type_ident = tolower (tmp); + sub ("^GTK_TYPE_GTK_", "GTK_TYPE_", type_macro); } diff --git a/gtk/testgtk.c b/gtk/testgtk.c index ed1d72244f..493ed3995d 100644 --- a/gtk/testgtk.c +++ b/gtk/testgtk.c @@ -4337,7 +4337,7 @@ void file_selection_ok (GtkWidget *w, GtkFileSelection *fs) { - g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs))); + g_print ("%s\n", gtk_file_selection_get_filename (fs)); gtk_widget_destroy (GTK_WIDGET (fs)); } @@ -4392,6 +4392,43 @@ create_file_selection (void) gtk_widget_destroy (window); } +void +font_selection_ok (GtkWidget *w, + GtkFontSelection *fs) +{ + g_print ("%s\n", gtk_font_selection_get_font_name (fs)); + gtk_widget_destroy (GTK_WIDGET (fs)); +} + +void +create_font_selection (void) +{ + static GtkWidget *window = NULL; + + if (!window) + { + window = gtk_font_selection_dialog_new ("Font Selection Dialog"); + + gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); + + gtk_signal_connect (GTK_OBJECT (window), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroyed), + &window); + + gtk_signal_connect (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->ok_button), + "clicked", GTK_SIGNAL_FUNC(font_selection_ok), + GTK_FONT_SELECTION_DIALOG (window)->fontsel); + gtk_signal_connect_object (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->cancel_button), + "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), + GTK_OBJECT (window)); + } + + if (!GTK_WIDGET_VISIBLE (window)) + gtk_widget_show (window); + else + gtk_widget_destroy (window); +} + /* * GtkDialog @@ -6664,6 +6701,7 @@ create_main_window (void) { "dnd", create_dnd }, { "entry", create_entry }, { "file selection", create_file_selection }, + { "font selection", create_font_selection }, { "gamma curve", create_gamma_curve }, { "handle box", create_handle_box }, { "list", create_list }, |