Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/WM_types.h
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| /** Internal, next time we want to activate the timer. */ | /** Internal, next time we want to activate the timer. */ | ||||
| double ntime; | double ntime; | ||||
| /** Internal, when the timer started. */ | /** Internal, when the timer started. */ | ||||
| double stime; | double stime; | ||||
| /** Internal, put timers to sleep when needed. */ | /** Internal, put timers to sleep when needed. */ | ||||
| bool sleep; | bool sleep; | ||||
| } wmTimer; | } wmTimer; | ||||
| typedef enum wmWarningSize { | |||||
| WM_WARNING_SIZE_SMALL = 0, | |||||
| WM_WARNING_SIZE_LARGE, | |||||
| } wmWarningSize; | |||||
| typedef enum wmWarningPosition { | |||||
| WM_WARNING_POSITON_MOUSE = 0, | |||||
| WM_WARNING_POSITON_CENTER, | |||||
| } wmWarningPosition; | |||||
| typedef struct wmWarningDetails { | |||||
| char title[1024]; | |||||
| char message[1024]; | |||||
| char confirm_button[256]; | |||||
| char cancel_button[256]; | |||||
| int icon; | |||||
| wmWarningSize size; | |||||
| wmWarningPosition position; | |||||
| bool confirm_default; | |||||
| bool cancel_default; | |||||
| bool mouse_move_quit; | |||||
| bool red_alert; | |||||
| } wmWarningDetails; | |||||
| typedef struct wmOperatorType { | typedef struct wmOperatorType { | ||||
| /** Text for UI, undo. */ | /** Text for UI, undo. */ | ||||
| const char *name; | const char *name; | ||||
| /** Unique identifier. */ | /** Unique identifier. */ | ||||
| const char *idname; | const char *idname; | ||||
| const char *translation_context; | const char *translation_context; | ||||
| /** Use for tool-tips and Python docs. */ | /** Use for tool-tips and Python docs. */ | ||||
| const char *description; | const char *description; | ||||
| ▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
| const char *(*get_name)(struct wmOperatorType *, struct PointerRNA *); | const char *(*get_name)(struct wmOperatorType *, struct PointerRNA *); | ||||
| /** | /** | ||||
| * Return a different description to use in the user interface, based on property values. | * Return a different description to use in the user interface, based on property values. | ||||
| * The returned string must be freed by the caller, unless NULL. | * The returned string must be freed by the caller, unless NULL. | ||||
| */ | */ | ||||
| char *(*get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *); | char *(*get_description)(struct bContext *C, struct wmOperatorType *, struct PointerRNA *); | ||||
| /** | |||||
| * If using WM_operator_confirm the following can override all parts of the dialog. | |||||
| */ | |||||
| void (*warning)(struct bContext *C, struct wmOperator *, wmWarningDetails *warning); | |||||
| /** rna for properties */ | /** rna for properties */ | ||||
| struct StructRNA *srna; | struct StructRNA *srna; | ||||
| /** previous settings - for initializing on re-use */ | /** previous settings - for initializing on re-use */ | ||||
| struct IDProperty *last_properties; | struct IDProperty *last_properties; | ||||
| /** | /** | ||||
| * Default rna property to use for generic invoke functions. | * Default rna property to use for generic invoke functions. | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||