Commit 272a5b9e authored by Ercan Ersoy's avatar Ercan Ersoy

Some changes

Some changes of directory tree. Some messages are changed. Add
config.h header file. Translate to Turkish.

Note: Previous commit has been switched GPL v2 to GPL v3.
parent 1712b28e
File mode changed from 100644 to 100755
File added
/***********************************************
* FreeDOS TUI Shell Configuration Header File *
***********************************************/
// Language Configure
#define LANGUAGE TR // EN or TR
Mark J. Olesen
This is the bin directory, which holds binary files.
Currently, nothing gets compiled into this directory.
This diff is collapsed.
/*
ARRAY.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file array.h
\brief A dynamic array that holds pointers to objects
\code
#include "array.h"
struct array myarray;
char * textptr;
#define GROWBY 30
assign_array(&myarray, GROWBY);
#undef GROWBY
for (some loop construct)
{
textptr= input_get_text();
array_push(&m_array, textptr);
}
for (; textptr= array_pop(&m_array) ;)
{
free(text_ptr);
}
array_discharge(&my_array;
\endcode
*/
/*!
\struct array
\brief container to hold objects
\var array::m_slots;
(actual) number of slots allocated
\var array::m_taken;
number of slots occupied
\var array::m_growby;
number of slots to growby. When the array is full, the array will
be expanded by \a m_growby elements
\var array::m_base;
base array that holds objects
*/
/*!
\fn void array_assign(
struct array *const o_arr,
size_t const i_growby)
\brief initialize arrary object
\param[out] o_arr object ot initialize
\param[in] i_growby number of elements to growby (expand) when array is full
\returns none
Memory allocated to store objects is peformed in ::array_push.
*/
/*!
\fn void array_discharge(
struct array *const io_arr)
\brief release resources held by object. The routine will not
release resources held by the object itself.
\param[in,ou] io_arr object to release
\returns none
\code
array myarray;
array_assign(&myarray, 1);
struct mydata* ptr= (struct mydata*)malloc(sizeof(*ptr));
array_push(&array, ptr);
for(; ptr= array_pop(&myarray); ) free(ptr);
array_discharge(&myarray);
\endcode
*/
/*!
\fn void * array_pop(
struct array *const io_arr)
\brief remove an element from the end of the array.
Ownership of the object is transferred to the caller.
\param[in,out] io_arr object to remove an element
\returns 0 array is empty
\returns !0 pointer to element
*/
/*!
\fn int array_push(
struct array *const io_arr,
void * io_object)
\brief adds an element to the end of the array
\param[in,out] io_arr object to store element
\param[in,out] io_object object to store
\returns 0 success object added
\returns -1 error unable to add object
*/
/*!
\fn void * array_remove(
struct array *const io_arr,
size_t const i_index)
\brief removes an element from the array
Ownership of the object is transferred to the caller.
\param[in,out] io_arr object to remove element from
\param[in] i_index zero based slot containing element to remove
\returns 0 array is empty or out of bounds
\returns !0 pointer to removed object
*/
/*
BLOCK.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file block.h
\brief read or write a block of screen memory
The block_read and block_write routines are typically used in the library
to save and restore the background of popups.
*/
/*!
\fn void __FAR* block_read(
struct box const*const i_box)
\brief read a block of screen memory
\param[in] i_box region of screen to read
\returns 0 failure unable to allocate memory
\returns !0 pointer to memory block
*/
/*!
\fn void block_write(
void const __FAR* i_block,
struct box const*const i_box)
\brief write a block of screen memory
\param[in] i_block memory bock to write
\param[in] i_box region to write block
\returns none
*/
/*!
\fn void block_free(
void __FAR* i_block)
\param[in] i_block block to release
\returns none
*/
/*
BOX.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file box.h
\brief a rectanglular region
*/
/*!
\struct box
\brief defines a rectangular region
\var box::m_pos_x
x position
\var box::m_pos_y
y position
\var box::m_len_x
(horizontal) length along x axis
\var box::m_len_y
(vertical) length along y axis
*/
/*!
\fn int box_contains(
int const i_pos_x,
int const i_pos_y,
struct box const* i_box)
\brief test if point is within box
\param[in] i_pos_x x position to test
\param[in] i_pos_y y position to test
\param[in] i_box object to test
\returns 0 point is not in box
\reutrns !0 point is in box
*/
/*!
\fn int box_contains_box(
struct box const* i_box1,
struct box const* i_box2)
\brief test if a box is contained in another
\param[in] i_box1 test if box1 is contained in box2
\param[in] i_box2 container box
\returns 0 \a i_box1 is not in \a i_box2
\returns !0 \a i_box1 is in \a i_box2
*/
/*!
\fn int box_equal(
struct box const* i_box1,
struct box const* i_box2)
\brief test if box is equal to another
\param[in] i_box1 box to test if it is equal to \a i_box2
\param[in] i_box2 container box
\returns 0 boxes are not equal
\returns !0 boxes are equal
*/
/*
BUTTON.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file button.hpp
\brief contains button class
*/
/*! \class button button.hpp
\brief Allows a user to click on a button.
*/
/*!
\typedef void (*button::signal_clicked_t)(
button const* i_button,
void* io_user_data)
\brief function prototype to receive signal
\param[in] i_button button widget
\param[in,out] io_user_data user defined
\returns none
*/
/*!
\enum button::style
\brief indicator of the type of box that should be drawn around the button
\var button::style button::STYLE_FLAT
Flat (no box)
\var button::style button::STYLE_SHADOW
Draw a shadow around box or label
\var button::style button::STYLE_BOX
Draw a box around label
*/
/*!
\fn button::button(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y)
\brief constructor
\param[in] i_pos_x x position to place widget
\param[in] i_pos_y y position to place widget
\param[in] i_len_x x length of widget
\param[in] i_len_y y length of widget
\returns none
*/
/*!
\fn virtual button::~button()
\brief destructor
\returns none
*/
/*!
\fn virtual void button::draw() const
\brief draws the widget
This method should not be called directly.
\see widget::draw for details.
*/
/*!
\fn virtual enum event_response button::event_key(
struct event_key const& i_event)
\brief handle key event
\param[in] i_event key event to handle
\returns response how event was handled
*/
/*!
\fn virtual enum event_response button::event_mouse(
struct event_mouse const& i_event)
\brief handle mouse event
\param[in] i_event mouse event to handle
\returns response how event was handled
*/
/*!
\fn virtual void button::focus_enter()
\brief handle entering focus
\returns none
*/
/*!
\fn virtual void button::focus_leave()
\brief handle leaving focus
\returns none
*/
/*!
\fn void button::set_response(
int const i_response)
\brief sets response generated when button is clicked
\param[in] i_response custom response or one of ::event_response
\returns none
*/
/*!
\fn void button::set_style(
unsigned int const i_style)
\brief set button style (no box, flat or box or box and shadow
\param[in] i_style combination of button::style
\returns none
The routine does not redraw the widget
*/
/*!
\fn void button::set_text(
unsigned char const* i_str)
\param[in] i_str text to set the button label (null terminated)
\returns none
The routine does not redraw the widget
*/
/*!
\fn void button::set_signal_clicked(
signal_clicked_t i_signal)
\brief set callback
\param[in] i_signal callback signal
\returns none
*/
\var button::style button::STYLE_FLAT
/*!
\enum type
\brief type of button (used internally)
\var button::type button::TYPE_BUTTON
behaves as a normal button
\var button::type button::TYPE_CHECK
behaves as a check button
\var button::type button::TYPE_RADIO
behaves as a radio button
*/
/*!
\var button::m_state
\brief on/off state (for normal button ignored)
*/
/*!
\var button::m_type
\brief button type
*/
/*!
\var button::m_style
\brief button style (button::style bit flags)
*/
/*!
\var button::m_label
\brief dynamically allocated buffer to hold label
*/
/*!
\var button::m_response
\brief response generated when user clicks on the button
*/
/*!
\var button::m_signal_clicked;
\brief pointer to signal emit function
*/
/*!
\fn virtual void button::toggled()
\brief method called when button state changes
*/
/*
\fn void button::emit_clicked()
\brief emit the click signal
*/
/*
CHECKBTN.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file checkbtn.hpp
\brief contains checkbutton class
*/
/*! \class checkbutton checkbtn.hpp
\brief check button widget
Button widget, which contains a state of checked or unchecked.
Displays the state on screen in the form of a check mark.
*/
/*!
\fn checkbutton::checkbutton(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y)
\brief constructor
\param[in] i_pos_x x position to place widget
\param[in] i_pos_y y position to place widget
\param[in] i_len_x x length of widget
\param[in] i_len_y y length of widget
\returns none
*/
/*!
\fn virtual checkbutton::~checkbutton()
\brief destructor
\returns none
*/
/*!
\fn void checkbutton::clear_state()
\brief sets the state to unchecked
If the state changes to unchecked, the widget will be redrawn,
and the toggled method will be invoked.
A signal is not emitted.
*/
/*!
\fn bool checkbutton::get_state() const
\brief get current state
\returns false not checked
\returns true checked
*/
/*!
\fn void checkbutton::set_state()
\brief sets the state to checked
If the state changed to checked, the widget will be redrawn,
and the toggle method will be invoked.
A signal is not emitted.
*/
/*
CLIP.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file clip.h
\brief Clipping of a rectangular region
*/
/*!
\fn void clip_cleanup()
\brief release resources held by the global clip object
This routine should be called when the application exits to
release resources created by the clip routines.
*/
/*!
\fn void clip(
struct box*const io_area,
struct box const*const i_clip)
\brief clip a rectangular region
\param[in,out] io_area region to clip
\param[in] i_clip clipping boundaries
\returns none
*/
/*!
\fn void clip_get(
struct box*const o_box)
\brief get the current clipping boundary
\param[out] o_box clipping region to fill in
\returns none
The default clipping region is the screen area.
*/
/*!
\fn void clip_push(
struct box const*const i_box)
\brief pushes a clip region onto the top of the stack
\param[in] i_box clipping region to push on the stack
\returns none
*/
/*!
\fn void clip_pop()
\brief removes a clip region from the top of the stack
\returns none
*/