⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmp.h

📁 安装DDD之前
💻 H
📖 第 1 页 / 共 4 页
字号:
/** * * $Id: XmP.h,v 1.1 2004/08/28 19:23:27 dannybackx Exp $ * * Copyright (C) 1995 Free Software Foundation, Inc. * Copyright (C) 1995-2002 LessTif Development Team * * This file is part of the GNU LessTif Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * **/#ifndef _XM_XMP_H#define _XM_XMP_H#include <X11/IntrinsicP.h>#include <Xm/Xm.h>#include <Xm/DrawP.h>#ifndef XmConst#define XmConst	const#endif /* !XmConst */#ifdef __cplusplusextern "C" {#endif/* * shorthand macros */#ifdef XtDisplay#undef XtDisplay#endif#define XtDisplay(widget) \    (XtIsWidget(widget) \	? ((Widget)(widget))->core.screen->display \	: ((Object)(widget))->object.parent->core.screen->display)#ifdef XtScreen#undef XtScreen#endif#define XtScreen(widget) \    (XtIsWidget(widget) \	? ((Widget)(widget))->core.screen \	: ((Object)(widget))->object.parent->core.screen)#ifdef XtWindow#undef XtWindow#endif#define XtWindow(widget) \    (XtIsWidget(widget) \	? ((Widget)(widget))->core.window \	: ((Object)(widget))->object.parent->core.window)#ifdef XtName#undef XtName#endif#define XtName(widget) \    XrmQuarkToString(((Object)(widget))->object.xrm_name)#ifdef XtClass#undef XtClass#endif#define XtClass(widget) \    (((Object)(widget))->object.widget_class)#ifdef XtSuperclass#undef XtSuperclass#endif#define XtSuperclass(widget) \    (XtClass(widget)->core_class.superclass)#ifdef XtIsRealized#undef XtIsRealized#endif#define XtIsRealized(widget) \    (XtIsWidget(widget) \	? ((Widget)(widget))->core.window \	: ((Object)(widget))->object.parent->core.window)#ifdef XtIsManaged#undef XtIsManaged#endif#define XtIsManaged(widget) \    (((XmGadget)(widget))->rectangle.managed)#ifdef XtParent#undef XtParent#endif#define XtParent(widget) \    (((Object)(widget))->object.parent)/* * #defines for useful core record variables */#define XtWidth(w)	 (((Widget)(w))->core.width)#define XtHeight(w)	 (((Widget)(w))->core.height)#define XtX(w)		 (((Widget)(w))->core.x)#define XtY(w)		 (((Widget)(w))->core.y)#define XtBackground(w)	 (((Widget)(w))->core.background_pixel)#define XtBorderWidth(w) (((Widget)(w))->core.border_width)#define XtSensitive(w)	 (((Widget)(w))->core.sensitive && \			  ((Widget)(w))->core.ancestor_sensitive)#define XtCoreProc(w,p)  (((Widget)(w))->core.widget_class->core_class.p)/* * menu values */enum {    XmMENU_POPDOWN,    XmMENU_PROCESS_TREE,     XmMENU_TRAVERSAL,     XmMENU_SHELL_POPDOWN,    XmMENU_CALLBACK,    XmMENU_BUTTON,    XmMENU_CASCADING,    XmMENU_SUBMENU,    XmMENU_ARM,    XmMENU_DISARM,    XmMENU_BAR_CLEANUP,    XmMENU_STATUS,    XmMENU_MEMWIDGET_UPDATE,    XmMENU_BUTTON_POPDOWN,    XmMENU_RESTORE_EXCLUDED_TEAROFF_TO_TOPLEVEL_SHELL,    XmMENU_RESTORE_TEAROFF_TO_TOPLEVEL_SHELL,    XmMENU_RESTORE_TEAROFF_TO_MENUSHELL,    XmMENU_GET_LAST_SELECT_TOPLEVEL,    XmMENU_TEAR_OFF_ARM};#define XmMENU_TORN_BIT                         (1 << 0)#define XmMENU_TEAR_OFF_SHELL_DESCENDANT_BIT    (1 << 1)#define XmMENU_POPUP_POSTED_BIT                 (1 << 2)#define XmIsTorn(m) \    ((m) & XmMENU_TORN_BIT)#define XmPopupPosted(m) \    ((m) & XmMENU_POPUP_POSTED_BIT)#define XmIsTearOffShellDescendant(m) \    ((m) & XmMENU_TEAR_OFF_SHELL_DESCENDANT_BIT)/* * constants used in button/SimpleMenu communication */typedef struct _XmSimpleMenuRec {    int count;    int post_from_button;    XtCallbackProc callback;    XmStringTable label_string;    String *accelerator;    XmStringTable accelerator_text;    XmKeySymTable mnemonic;    XmStringCharSetTable mnemonic_charset;    XmButtonTypeTable button_type;    int button_set;    XmString option_label;    KeySym option_mnemonic;} XmSimpleMenuRec, *XmSimpleMenu;/* For MapEvent: _XmMatchBtnEvent */#define XmIGNORE_EVENTTYPE      -1/* Default minimum Toggle indicator dimension */#define XmDEFAULT_INDICATOR_DIM   9/* DefaultButtonShadow stuff */#define Xm3D_ENHANCE_PIXEL              2#define XmDEFAULT_TOP_MARGIN            0#define XmDEFAULT_BOTTOM_MARGIN         0/* * synthetic resource stuff */typedef enum {     XmSYNTHETIC_NONE,     XmSYNTHETIC_LOAD } XmImportOperator;typedef void (*XmExportProc)(Widget, int, XtArgVal *);typedef XmImportOperator (*XmImportProc)(Widget, int, XtArgVal*);typedef struct _XmSyntheticResource {    String resource_name;    Cardinal resource_size;    Cardinal resource_offset;    XmExportProc export_proc;    XmImportProc import_proc;} XmSyntheticResource;/* * ParentProcess structures */enum {    XmPARENT_PROCESS_ANY,     XmINPUT_ACTION};enum {    XmPARENT_ACTIVATE,    XmPARENT_CANCEL};#define XmRETURN XmPARENT_ACTIVATE#define XmCANCEL XmPARENT_CANCELtypedef struct {    int process_type;} XmParentProcessAnyRec;typedef struct {    int process_type;    XEvent *event;    int action;    String *params;    Cardinal *num_params;} XmParentInputActionRec;typedef union {    XmParentProcessAnyRec any;    XmParentInputActionRec input_action;} XmParentProcessDataRec, *XmParentProcessData;#define XmINVALID_DIMENSION (0xFFFF)enum {    XmBASELINE_GET,    XmBASELINE_SET};typedef struct _XmBaselineMargins {    unsigned char get_or_set;    Dimension margin_top;    Dimension margin_bottom;    Dimension shadow;    Dimension highlight;    Dimension text_height;    Dimension text_width;    Dimension margin_height;} XmBaselineMargins;typedef enum {    XmFOCUS_IN,    XmFOCUS_OUT,    XmENTER,    XmLEAVE} XmFocusChange;typedef enum{    XmNOT_NAVIGABLE,    XmCONTROL_NAVIGABLE,    XmTAB_NAVIGABLE,    XmDESCENDANTS_NAVIGABLE,    XmDESCENDANTS_TAB_NAVIGABLE} XmNavigability;#define XmVoidProc      XtProctypedef Boolean (*XmParentProcessProc)(Widget, XmParentProcessData);typedef void    (*XmWidgetDispatchProc)			(Widget gadget, XEvent *event, Mask event_mask);typedef void    (*XmMenuPopupProc)(Widget, Widget, XEvent *);typedef void    (*XmMenuTraversalProc)( Widget, Widget, XmTraversalDirection);typedef void    (*XmResizeFlagProc)(Widget, Boolean);typedef void    (*XmRealizeOutProc)(Widget, Mask *, XSetWindowAttributes *);typedef Boolean (*XmVisualChangeProc)			(Widget gadget, Widget cur_mgr, Widget new_mgr);typedef void    (*XmTraversalProc)(Widget, XtPointer, XtPointer, int);typedef void    (*XmFocusMovedProc)( Widget, XtPointer, XtPointer) ;typedef void    (*XmCacheCopyProc)(XtPointer, XtPointer, size_t);typedef int     (*XmCacheCompareProc)(XtPointer, XtPointer);typedef Boolean (*XmWidgetBaselineProc)			(Widget w, Dimension **baselines, int *num_baselines);typedef Boolean (*XmWidgetDisplayRectProc)(Widget w, XRectangle *rect);typedef void    (*XmWidgetMarginsProc)(Widget w, XmBaselineMargins *margins);typedef XmNavigability    (*XmWidgetNavigableProc)(Widget w);typedef void    (*XmFocusChangeProc)(Widget w, XmFocusChange change);typedef void    (*XmMenuProc)(int function, Widget widget, ...);typedef void    (*XmGadgetCacheProc)(XtPointer);typedef Boolean (*XmTraversalChildrenProc)			(Widget mw, Widget **children, Cardinal *num_children);/* * virtkey stuff */typedef struct {    Modifiers mod;    char      *key;    char      *action;} _XmBuildVirtualKeyStruct;/* * stuff needed by the Text and TextField widgets to do their rendering */typedef struct {    XmTextPosition position;    XmHighlightMode mode;} _XmHighlightRec;typedef struct {    Cardinal number;    Cardinal maximum;    _XmHighlightRec *list;} _XmHighlightData;typedef struct {    Atom selection;    Atom target;} _XmTextInsertPair;typedef enum {    XmDEST_SELECT,    XmPRIM_SELECT} XmSelectType;typedef struct {    Boolean done_status;    Boolean success_status;    XmSelectType select_type;    XSelectionRequestEvent *event;} _XmInsertSelect;typedef struct {    XEvent *event;    String *params;    Cardinal *num_params;} _XmTextActionRec;typedef struct {    Widget widget;    XmTextPosition insert_pos;    int num_chars;    Time timestamp;    Boolean move;} _XmTextDropTransferRec;typedef struct {    XmTextPosition position;    Atom target;    Time time;    int num_chars;    int ref_count;} _XmTextPrimSelect;typedef struct {    Screen *screen;    XContext context;    unsigned char type;} XmTextContextDataRec, *XmTextContextData;enum {    _XM_IS_DEST_CTX,    _XM_IS_GC_DATA_CTX,    _XM_IS_PIXMAP_CTX};#define XmTEXT_DRAG_ICON_WIDTH  64#define XmTEXT_DRAG_ICON_HEIGHT 64#define XmTEXT_DRAG_ICON_X_HOT  10#define XmTEXT_DRAG_ICON_Y_HOT   4/* * geometry stuff, used in GeoUtils.c */enum{    XmGET_ACTUAL_SIZE = 1,    XmGET_PREFERRED_SIZE,    XmGEO_PRE_SET,    XmGEO_POST_SET};/* fill modes for the GeoLayoutRec's below */enum {    XmGEO_EXPAND,    XmGEO_CENTER,    XmGEO_PACK};/* fit modes for the GeoLayoutRec's below */enum {    XmGEO_PROPORTIONAL,    XmGEO_AVERAGING,    XmGEO_WRAP};enum {    XmGEO_ROW_MAJOR,    XmGEO_COLUMN_MAJOR};typedef struct _XmGeoMatrixRec *XmGeoMatrix;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -