,,SVN revion 2009-11-02 - !r43404,, [[TOC]] '''Important Note''': the included code should be used only as conceptual idea of how something works. == EINA == === Accessor === Accessors allow a random access of the data of a container. They can access an element at any position. === Arrays === Create and manage arrays, very fast access to data list. === Benchmarks === Allow you to add benchmark framework in a project for timing critical part and detect slow parts of code. === Convert === These functions allow you to convert integer or real numbers to string or conversely. === Cpu === Get the features of a cpu, like mmx, se, altivec, etc === File === * list the content of a directory, recusrsively or not, and can call a callback function for eachfound file. * split a path into all the subdirectories that compose it, according to the separator of the file system. === Hash === Hash management Hash functions are mostly used to speed up table lookup or data comparison tasks such as finding items in a database, detecting duplicated or similar records in a large file, finding similar stretches in DNA sequences, and so on. === Rectangle === Rectangle coordenades and calculations === Stringshare === These functions allow you to store one copy of a string, and use it throughout your program. It sounds like micro-optimizing, but profiling has shown this can have a significant impact as you scale the number of copies up. It improves string creation/destruction speed, reduces memory use and decreases memory fragmentation, so a win all-around. === Trash === Instead to malloc/free pointers, just put them in the trash, you can reuse it later too, you can free the entire trash later. FIXME: is that ok ? === List === Lists management * for (foreach) * free lists * next/prev/last * append/prepend/*relative * data get * counter * find * sort * remove * promote: move the specified data to the first of the list * nth: get the nth number of the member in the list * merge/split * iterator === Iterator === This is like a cursor to access the elements sequentially in a container === Lalloc === Lazy Allocator, that is, for lazy developers or ppl that has a cheapo keyboard. FIXME === Log === Functions to add logs in your code with level of verbosity control and the management of specific-code logs {{{ #!C EINA_LOG_ERR("BIG FAT ERROR!"); EINA_LOG_INFO("Message only visible running app with high log level set"); EINA_LOG_DBG("Running foo, only with big verbosity"); }}} === Error === The Eina error module provides a way to manage errors in a simple but powerful way in libraries and modules. You can register your own error messages, and so get the last error message ocurred too. {{{ #!C Eina_Error MY_ERROR_NEGATIVE; void *data_new() { eina_error_set(MY_ERROR_NEGATIVE); return; } int main(void) { Eina_Error err; void *data; MY_ERROR_NEGATIVE = eina_error_msg_register("Your data is Negative!"); if (err) printf ("Error is: %s\n", eina_error_msg_get(err)); data = data_new(); // We set the state of an error err = eina_error_get(); // We get the message for the ID of the error if (err) printf ("Error is: %s\n", eina_error_msg_get(err)); } }}} === Magic === Magic checks (WTF, better description) FIXME. Add example FIXME === Matrix Sparse === What's that for, what means the sparse thing there ? FIXME === Red & Black Tree === Self-balancing binary search tree, a data structure, good for use in associative arays, very efficient and fast, removes and insert intelligently the data on the tree, so it is balanced for optimization reasons. FIXME ? === Memory Pool === FIXME: description FIXME: elements: * register/unregister ? * malloc/realloc ? * add/del/free ? * statistics === Modules === Which kind of modules ? eina modules so extra libs features ? FIXME === Safety Checks === Set of macros to check for parameters or values that should never happen, doesn't abort the program but it logs instead The meant of this is to remove possible segfaults when they will be not so important and continue with the process of program FIXME: is this code good ? {{{ #!C EAPI void my_func(Ethumb *e) { EINA_SAFETY_ON_NULL_RETURN(e); // return if our pointer is null do_something; }}} === Tiler === FIXME: description repetitive fill for rectangles (???) === MACROS === FIXME: Add description of these usages: * EINA_WARN_UNUSED_RESULT * EINA_ARG_NONNULL * EINA_DEPRECATED * EINA_PURE * EINA_UNLIKELY/LIKELY * EINA_FALSE/TRUE: equivalent to FALSE/TRUE macros == ECORE == === Main Ecore === Main features of ecore: * '''Spawned Process signals''' * State: Pauses a process (STOP signal), Continue it, Interrupt, Quit, Terminate, Kill, Hup * '''Spawning Functions''' * Priority get/set * Run in Pipe mode. Data send to the child process received from stdin. * Tag: set the string tag for a process * Pid Get * Retreives: command of spawned process. Data attached to process * '''Idlers''': callbacks called when the program exits or is in idle state * List: add a handler, set it as first on the list, etc * When: You can set a handler for when the program Enter on the idle state, when Exits, or During it * '''File Descriptors''' (listeners of standard read/write/error? FIXME) * get if a file-descriptor read, write, error, of boths * callback to call if the event ocurrs, with the data to pass, and which element (r/w/e) to watch to a specific file-descriptor * '''Timers''' * Get times (system, last loop stopped) * Add a timer to run after a given time (may loop) * Interval get/set of the ticks to the timer * Delay add for the next occurence * Pending time get * There's also the pollers that calls a function every X interval of time * '''Loops''' * Iterate: runs a SINGLE iteration of the loop to process all the queue * Loop: run the main loop, quit it, etc * '''Events''' * Handlers: You can add handlers that are functions called when a event is happened, like a singal received, when teh program exits, or when it is connected. * Keyboard and Mouse management * '''Animators''' * Add a animator to tick off at every animaton tick during main loop execution. * Set the animator call interval in seconds. * '''IPC''' * '''STR''' * '''Encoding conversor (txt)''' * '''X Atoms''' * window * XDND * client ID * type of window * state of window * '''X Cursor''': Type of cursor (image/mode) * '''X''' * randr * window remove/add/toggle * window state * selection: primary/secondary/xdnd/clipboard * key up/down * mouse double click time set * mouse move position * move/resize windows * title window * alarms * urgent === Config === Complex and pretty complete configurations system * Listener: you can set a callback for when a configuration file is changed * Get/Set values on the config file, they can be different types of values, even ARGB ones * structures: structures of configurations * bundle ? === Con === Connections / Sockets handler functions * Add/del/connect: connections with the sockets/servers * States: Retrieve if is connected, the list of clients, number of bytes transmitted, the IP of the remote connection, etc * Send/Get: send or receive data to/from server * limits: set limits of clients to handle * SSL: SSL featured * URL: url handlers * FTP: ftp upload type support === Data === Contains threading, list, hash, debugging IMPORTANT NOTE: most of the things are moved to Eina and you should use Eina instead, but other things may work a bit differently like the non-sequential access to list elements. Note too that most of them will be possibly deprecated in the future * Hash: compute hash value of a string, some hash management, etc * Double linked lists mode * Binary heap (binary tree?) * trees * string buffer === Ecore_Evas === Evas Wrapper for Ecore (short name: EE) * Engines: Query if a particular rendering engine is supported on the target machine. List available engines. * Create: Create new ecore_evas objects * Data: get/set data associated to an EE * Event Action: move, resize, show, hide, delete, focus, sticky, geometry, rotate window (FIXME: which tipe of rotation?), shape, alpha, raise/lower/layer, activate (focus via WM), title, name_class, min/max_sizes, size_step, cursor, border, ignore_window(override), maximize/fullscreen/iconize, events_ignore, associate_object... * Event Callback: mouse set (FIXME move?), post_render (post mouse event callback) === !FrameBuffer === Framebuffer management * Keyboard/Mouse events * Size_get * Calibrate === File === File management * Misc: is_dir, exists, size_get, modification_times, mkdir, rm, cp, mv, links, filename/dirname, can_read/write/exec, ls, escape_sequences_add, remove_extension, dir_is_empty * Monitor a path with inotify/polling * applications: (talking about their executables in $PATH), check if is installed, list, etc * Download: downloads a file from url with a good number of features like progress === Getopt === Powerful getopt (commandline options) system. it supports long and short options * Duplicated entry's check * Args Get * Help: show list of options in a nicely formatted way ===