create_buffer
September 8th 2024
Create a new buffer
Signature
Buffer_ID
create_buffer(Application_Links* app,
String_Const_u8 file_name,
Buffer_Create_Flag flags);
Parameters
app
the standard custom layer context pointer
file_name
if there exists a file with the given name, and no buffer for that file, a new buffer is created, attached to the file, and named after the file; if no such file exists, or the buffer is forbidden from attaching to a file by the flags, then this is the name of a newly created detached buffer
flags
flags controlling behavior of the buffer creation
Return
if a buffer matching the file name already exists, it's id is returned, otherwise if a new buffer can be created according to the flags, a buffer is created and it's id is returned, if no matching buffer exists and no buffer can be created from it, zero is returned
Related