/* DOC(int_color is an alias name to signal that an integer parameter or field is for a color value, colors are specified as 32 bit integers (8 bit + 24 bit) with 3 channels: 0x**RRGGBB.) */
/* DOC(Parse_Context_ID identifies a parse context, which is a guiding rule for the parser. Each buffer sets which parse context to use when it is parsed.) */
/* DOC(Buffer_ID is used to name a 4coder buffer. Each buffer has a unique id but when a buffer is closed it's id may be recycled by future, different buffers.) */
/* DOC(Flags for describing the memory protection status of pages that come back from memory allocate. Some combinations may not be available on some platforms, but you are gauranteed to get back a page with at least the permissions you requested. For example if you request just write permission, you may get back a page with read and write permission, but you will never get back a page that doesn't have write permission.) */
/* DOC(A Wrap_Indicator_Mode is used in the buffer setting BufferSetting_WrapIndicator to specify how to indicate that line has been wrapped.) */
ENUM(int32_t,Wrap_Indicator_Mode){
/* DOC(WrapIndicator_Hide tells the buffer rendering system not to put any indicator on wrapped lines.) */
WrapIndicator_Hide,
/* DOC(WrapIndicator_Show_After_Line tells the buffer rendering system to put a backslash indicator on wrapped lines right after the last character of the line.) */
WrapIndicator_Show_After_Line,
/* DOC(WrapIndicator_Show_At_Wrap_Edge tells the buffer rendering system to put a backslash indicator on wrapped lines aligned with the wrap position for that line.) */
/* DOC(GlobalSetting_Null is not a valid setting, it is reserved to detect errors.) */
GlobalSetting_Null,
/* DOC(When GlobalSetting_LAltLCtrlIsAltGr is enabled, keyboard layouts with AltGr will also interpret the left alt and control keys as AltGr. If you do not use a keyboard with AltGr you should have this turned off. This setting is only relevant on Windows and has no effect on other systems.) */
/* DOC(The BufferSetting_LexWithoutStrings tells the system to treat string and character marks as identifiers instead of strings. This settings does nothing if the buffer does not have lexing turned on.) */
/* DOC(The BufferSetting_ParserContext setting determines the parser context that guides the parser for the contents of this buffer. By default the value is 0, which represents the default C++ context.) */
/* DOC(The BufferSetting_WrapLine setting is used to determine whether a buffer prefers to be viewed with wrapped lines, individual views can be set to override this value after being tied to the buffer.) */
/* DOC(The BufferSetting_WrapPosition setting determines after how many pixels a line will wrap. A view set's this value from the global default value when the view is created. This value cannot be set to less than 48, any value passed below 48 will cause the position to be set to 48. This is a potentially expensive operation because the wrap positions of the file have to be reindexed. For best behavior try to only set this setting once per frame, if possible.) */
/* DOC(The BufferSetting_MinimumBaseWrapPosition setting is used to increase the with in pixels allotted to a line for wrapping, by setting a minimum position away from the base of the line. The base of a line is always 0, or the left hand side of the view, in text files. In code files the base of a line is the amount the line is shifted to the right due to brace nesting. This setting allows for deeply nested code to remain readable by ensuring lines deep in the nesting get some minimum base width which may be more wrapping space than the non base adjusted wrap position would have allowed. In any case where the (default wrapping position) is greater than (the base + minimum base position), the larger ) the default will still be used. */
BufferSetting_MinimumBaseWrapPosition,
/* DOC(The BufferSetting_WrapIndicator setting is used to specify how wrapped lines should be marked so the user can see that they have been wrapped. The value should be one of the values in the Wrap_Indicator_Mode enum.) DOC_SEE(Wrap_Indicator_Mode) */
/* DOC(The BufferSetting_Eol setting specifies how line ends should be saved to the backing file. A 1 indicates dos endings "\r\n" and a 0 indicates nix endings "\n".) */
/* DOC(The BufferSetting_Unimportant setting marks a buffer so that its dirty state will be forced to stay at DirtyState_UpToDate when the buffer is edited or when the buffer's paired file, if it has one, is edited.) */
/* DOC(The BufferSetting_ReadOnly setting marks a buffer so that it can only be returned from buffer access calls that include an AccessProtected flag. By convention this means that edit commands that should not be applied to read only buffers will not edit this buffer.) */
/* DOC(The BufferSetting_VirtualWhitespace setting enables virtual whitespace on a buffer. Text buffers with virtual whitespace will set the indentation of every line to zero. Buffers with lexing enabled will use virtual white space to present the code with appealing indentation.) */
/* DOC(When BufferCreate_NeverNew is set it indicates that the buffer should only be created if it is an existing file or if a buffer with the given name is already open.) */
/* DOC(When BufferCreate_JustChangedFile is set it indicates that the file to load has just been saved in the same frame and a change notification for the file should be ignored.) */
/* DOC(Indicates that when create_buffer searches for already existing buffers that match the name parameter, it should only search by file name, and that if it cannot create the buffer with the file attached, it should not create the buffer at all.) */
BufferCreate_MustAttachToFile=0x10,
/* DOC(Indicates that when create_buffer searches for already existing buffers that match the name parameter, it should only search by buffer name, and that it should not attach a file to the buffer even if it can. Caution! Buffers that don't have attached files cannot be saved.) */
/* DOC(Normally the new file hook is called on any created buffer. Passing this flag will prevent the new file hook from being called automatically by the core.) */
/* DOC(A Buffer_Save_Flag field specifies buffer saving behavior.) */
ENUM(uint32_t,Buffer_Save_Flag){
/* DOC(BufferSave_IgnoreDirtyFlag tells the save procedure not to check the dirty flag of the buffer. Usually buffers not marked dirty will not be saved, but sometimes it is useful to force it to save anyway. ) */
/* DOC(The buffer was not killed because it is dirty. This can be overriden with the flag BufferKill_AlwaysKill. This result is usually followed up by launching a "sure to kill" dialogue, but that is entirely optional.) */
/* DOC(The buffer was not killed because it is unkillable. Unkillable buffers are the buffers that must be open for the core's purposes. *messages* and *scratch* are unkillable buffers.) */
/* DOC(An Access_Flag field specifies what sort of permission you grant to an access call. An access call is usually one the returns a summary struct. If a 4coder object has a particular protection flag set and the corresponding bit is not set in the access field, that 4coder object is hidden. On the other hand if a protection flag is set in the access parameter and the object does not have that protection flag, the object is still returned from the access call.) */
/* DOC(AccessProtected is set on buffers and views that are "read only" such as the output from an exec_system_command call into *build*. This is to prevent the user from accidentally editing output that they might prefer to keep in tact.) */
/* DOC(AccessHidden is set on any view that is not currently showing it's file, for instance because it is navigating the file system to open a file.) */
/* DOC(A Dirty_State value describes whether changes have been made to a buffer or to an underlying file since the last sync time between the two. Saving a buffer to it's file or loading the buffer from the file both act as sync points.) */
/* DOC(If CLI_OverlapWithConflict is set if output buffer of the new command is already in use by another command which is still executing, the older command relinquishes control of the buffer and both operate simultaneously with only the newer command outputting to the buffer.) */
/* DOC(If AutoIndent_ClearLine is set, then any line that is only whitespace will be cleared to contain nothing at all, otherwise the line is filled with whitespace to match the nearby indentation.) */
/* DOC(If AutoIndent_UseTab is set, then when putting in leading whitespace to align code, as many tabs will be used as possible until the fine grained control of spaces is needed to finish the alignment.) */
/* DOC(If AutoIndent_ExactAlignBlock is set, then block comments are indented by putting the first non-whitespace character of the line in line with the beginning of the comment.) */
/* DOC(If AutoIndent_FullTokens is set, then the set of lines that are indented is automatically expanded so that any token spanning multiple lines gets entirely indented.) */
/* DOC(Key_Event_Data describes a key event, including the translation to a character, the translation to a character ignoring the state of caps lock, and an array of all the modifiers that were pressed at the time of the event.)
/* DOC(This field is an array indicating the state of modifiers at the time of the key press. The array is indexed using the values of Key_Modifier_Index.
/* DOC(Mouse_State describes an entire mouse state complete with the position, left and right button states, the wheel state, and whether or not the mouse if in the window.) */
/* DOC(The motion of the wheel. Zero indicates no motion. Positive indicates downard scrolling. Negative indicates upward scrolling. The magnitude corresponds to the number of pixels of scroll that would be applied at standard scroll speeds.) */
/* DOC(Range describes an integer range typically used for ranges within a buffer. Ranges are not used to pass into the API, but this struct is used for returns.
/* DOC(The target y position to which the view is moving. If scroll_y is not the same value, then it is still sliding to the target by the smooth scroll rule.) */
/* DOC(The previous value of target y. This value should be ignored as it is the "vestigial" remain of a system that will not be around much longer.) */
/* DOC(The target x position to which the view is moving. If scroll_x is not the same value, then it is still sliding to the target by the smooth scroll rule.) */
/* DOC(The previous value of target x. This value should be ignored as it is the "vestigial" remain of a system that will not be around much longer.) */
/* DOC(Buffer_Seek describes the destination of a seek operation. There are helpers for concisely creating Buffer_Seek structs. They can be found in 4coder_buffer_types.h.)
/* DOC(For xy coordinate seeks, rounding down means that any x in the box of the character lands on that character. For instance when clicking rounding down is the user's expected behavior. Not rounding down means that the right hand portion of the character's box, which is closer to the next character, will land on that next character. The unrounded behavior is the expected behavior when moving vertically and keeping the preferred x.) */
/* DOC(Full_Cursor describes the position of a cursor in every buffer coordinate system supported by 4coder. This cursor type requires that the buffer is associated with a view to give the x/y values meaning.)
/* DOC(Partial_Cursor describes the position of a cursor in all of the coordinate systems that a invariant to the View. In other words the coordinate systems available here can be used on a buffer that is not currently associated with a View.)
/* DOC(Buffer_Edit describes a range of a buffer and string to replace that range. A Buffer_Edit has to be paired with a string that contains the actual text that will be replaced into the buffer.) */
/* DOC(This field indicates whether the Buffer_Summary describes a buffer that is open in 4coder. When this field is false the summary is referred to as a "null summary".) */
/* DOC(If this is not a null summary, this field indicates whether the buffer has up to date tokens available. If this field is false, it may simply mean the tokens are still being generated in a background task and will be available later. If that is the case, is_lexed will be true to indicate that the buffer is trying to get it's tokens up to date.) */
/* DOC(When a marker is inside a range that gets edited, by default the marker 'leans_left' which means it goes to the beginning of the edited range. If the field lean_right is set to true, the marker will lean right with edits and will go to the end of edited range.) */
/* DOC(This field indicates whether the View_Summary describes a view that is open in 4coder. When this field is false the summary is referred to as a "null summary". ) */
/* DOC(This describes the screen position in which this view's buffer is displayed. This is different from view_region, because it does not include any fixed height GUI at the top of the view.) */
/* DOC(A memory object is used for straightforward memory allocation in a managed scope. These objects have no special cleanup, no extra operations, and their memory storage is never touched by the core.) */
/* DOC(A marker object is used to place markers into buffers that move along with the text upon which they are placed. A marker object has a specific buffer to which it is attached, and must be allocated in a scope dependent upon the lifetime of that buffer. Marker objects always use the Marker type for their items, and their item size is always sizeof(Marker). When a marker object is freed, all of the marker visuals attached to it are also freed and the specific buffer of the object no longer adjusts the marker data when edits occur.) */
/* DOC(A handle to a managed scope. A managed scope contains variables and objects all of which can be freed and reset in optimized bulk operations. Many managed scopes are created and destroyed by the core to track the lifetime of entities like buffers and views. Because a managed scope contains it's own copy of the managed variables, managed scopes can also be used as a keying mechanism to store and retrieve special information related to entities like buffers and views.) */
/* DOC(An id refering to a managed variable. Managed variables are created globally, but each managed scope has it's own set of values for the managed variables. Managed variables are created via a unique string. Attempting to create a variable with the same name as an existing variable fails. When naming variables it is recommended that you place a 'module name' followed by a '.' and then a descriptive variable name to distinguish your variables from variables written by other 4coder users that might someday need to work together in the same configuration. Example: "MyUniqueCustomization.variable_name"). The variable's id is used to set and get the value from managed scopes. */
/* DOC(A handle to a managed object. Managed objects have various behaviors and special uses depending on their type. All managed objects share the property of being tied to a managed scope, so that they are cleaned up and freed when that scope's contents are cleared or when the scope is destroyed, they all support store and load operations, although not all with the exact same meanings and implications, and they can all be freed individually instead of with the entire scope.) */
/* DOC(A multi-member identifier for a marker visual. A marker visual is attached to a marker object (Marker_Object), it is freed when the marker object is freed or when it is specifically destroyed. Multiple marker visuals can be placed on a single marker object.)
/* DOC(Shows a block around the background of each marked character. The color aspect determines the color of the block behind the characters, the text_color aspect determines the color of the characters.
/* DOC(Shows a rectangle outline around each marked character. The color aspect determines the color of the rectangle, the text_color aspect is ignored.
/* DOC(Shows a single pixel line on the left side of each marked character. The color aspect determines the color of the line, the text_color aspect is ignored.
/* DOC(Shows a block in the background of the entire line on which the marker is placed. The color aspect determines the color of the highlight, the text_color aspect is ignored.
/* DOC(Shows a block around the background of each character between the range pairs. The color aspect determines the color of the highlight, the text_color aspect is ignored.
/* DOC(Shows a block in the background of the entire line on each line within the range. The color aspect determines the color of the highlight, the text_color aspect is ignored.
/* DOC(Special codes that can be used as the color aspects of marker visual effects. These special codes are for convenience and in some cases effects that could not be expressed as 32-bit colors.) */
/* DOC(When default is used for text_color aspect, the text is unchanged from the coloring the core would apply to it. For all effects, the default value of the color aspect for all effects is the same as transparent. For convenience it is guaranteed this will always be the zero value, so that users may simply pass 0 to color aspects they do not wish to set.) */
/* DOC(Since all symbolic color codes have their alpha channel set to zero, this code is reserved to get the effect one would get for using a tranparent 32-bit color.) */
/* DOC(This flag bit-ored with a style tag will be reevaluated at render time to the color of the specific tag in the currently active palette. The macro SymbolicColorFromPalette(Stag_CODE) applies the bit-or to Stag_CODE. For example SymbolicColorFromPalette(Stag_Cursor) will always evaluate to the color of the current cursor. Note that this evaluation happens at render time, so that if the palette changes, the evaluated color will also change.) */
/* DOC(The take rule of a marker visual specifies how to iterate the markers in the marker object when applying the visual effect. For range marked effects, which use a pair of markers to specify a left inclusive right exclusive range, it is not necessary that two markers be adjacent in the marker object when they are taken. The first taken marker is paired to the second taken marker, the third to the fourth, etc, regardless of any gaps between the consecutively taken markers. If the take rule overflows the marker object, the effect is still applied, but the iteration is cut short as soon as it would overflow.) */
/* DOC(From the start of a "step" take_count_per_step markers. Markers taken in the same step have consectuive indices. For example, if the first marker taken has index = 0, and the take_count_per_step = 2, then the second marker taken will have index = 1. The default value is 1.) */
/* DOC(The stride between each "step". After taking take_count_per_step markers from the current step, the iteation advances to the next step counting from the start of current step. So if 2 markers are taken per step, and the stride is 3, then the pattern of taken markers will be **.**.**.**. where * is a tken marker. The core automatically adjusts this field to be at least equal to take_count_per_step before using it to iterate. The default value is 1.) */
/* DOC(The maximum number of markers to be taken durring iteration. Since overflow does not cause the visual effect to fail, and is prevented internally, this field can be set to the max value of a signed 32-bit integer and will take as many markers as possible until it hits the end of the marker object. If the maximum count is reached mid-step, the iteration stops without completeing the step.) */
/* DOC(A helper enumeration for common priority levels. Although any unsigned integer is a valid priority level, the following five levels are used to establish a standard convention. Highest priority is given to effects immediately at the cursor, mark, and highlighted range. Default priority is given to actively attached effects like compilation error highlights. Passive effects like scope highlighting go to Lowest priority.
/* DOC(Query_Bar is a struct used to store information in the user's control that will be displayed as a drop down bar durring an interactive command.) */
STRUCTQuery_Bar{
/* DOC(This specifies the prompt portion of the drop down bar.) */
Stringprompt;
/* DOC(This specifies the main string portion of the drop down bar.) */
/* DOC(An 'option' is a rectangle with a margin that can be highlighted, and a main string in default text color, and a secondary string in pop2 color, on a single line centered vertically in the item rectangle.) */
/* DOC(A 'text field' is a rectangle with a query string in pop1 color, and a main string in default text color, on a single line centered verticall in the item rectangle.) */
/* DOC(A 'color theme' is a rectangle that ignores the active color palette and previews a specified color palette, with a specified string on the first line. This item is particularly meant for creating the color theme lister, but could be reused for anything, however there is no way to remove all the sample text in the widget added alongside the main string.) */
/* DOC(An enumeration of the coordinate systems in which an item's rectangle can be specified. This is not always a convenience feature as it means after scrolling the widget data does not necessarily needed to be updated, thus saving extra work. All coordiante systems are in pixels, with y increasing downward, and x increasing rightward.) */
/* DOC(The 'scrolled' coordiante system is effected by the scroll value of the view. If the y scroll value is at 100 and an item is placed with a vertical range from 50 to 90, the item is not visible. When the y scroll value is at 0, this coordinate system aligns with the view relative coordiante system.) */
/* DOC(The 'view relative' coordiante system is only effected by the screen coordinates of the view. (0,0) is always the top left corner of space inside the view margin.) */
/* DOC(A UI_Item is essentially the data to specify a single widget. The exact appearance and qualities of a displayed widget are determined by the item's type.)
/* DOC(All items can have an attached user_data pointer to associate the item back to whatever user space data or object is needed for interactign with the item.) */
/* DOC(An array of UI_Items and a set of bounding boxes that store the union item rectangle per coordiante system, used to optimize activation and re-render operations.) */
DOC(EveryfaceisassignedauniqueandconsistentFace_IDforit'slifetime.Thisrepresentsaslotinwhichafacecanexist.Thefaceintheslotisalwaysvalidonceitexists,butthefacemightbechangedorreleaseddurringit'slifetime.AFace_IDvalueofzeroisreservedforthemeaning"not a valid face".)
/* DOC(Indicates a face's association with an available font. This should be an exact copy of an Available_Font returned by get_available_fonts.) DOC_SEE(get_available_font) */
Available_Fontfont;
/* DOC(Indicates the size for the face. Valid values must be greater than 0. Different fonts with the same pt_size do not necessarily have the same line height.) */
int32_tpt_size;
/* DOC(Indicates whether the face tries to use a bold style.) */
bool32bold;
/* DOC(Indicates whether the face tries to use an italic style.) */
bool32italic;
/* DOC(Indicates whether the face tries to underline text.) */
bool32underline;
/* DOC(Indicates whether the face tries to apply hinting.) */
/* DOC(The BatchEdit_PreserveTokens operation is one in which none of the edits add, delete, or change any tokens. This usually applies when whitespace is being replaced with whitespace.) */
/* DOC(Custom_Command_Function is a function type which matches the signature used for commands. To declare a command use CUSTOM_COMMAND_SIG.) DOC_SEE(CUSTOM_COMMAND_SIG) */
/* DOC(If this Generic_Command represents an internal command the cmdid field will have a value less than cmdid_count, and this field is the command id for the command.) */