#include "protocol.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include "lookup.h"
#include "network.h"
#include "data_send.h"
#include "variables.h"
#include "container.h"
#include "window.h"
#include "dialog.h"
#include "grid.h"
#include "button.h"
#include "check_button.h"
#include "label.h"
#include "image.h"
#include "entry.h"
#include "menu_bar.h"
#include "menu.h"
#include "menu_item.h"
#include "tool_bar.h"
#include "tool_item.h"
#include "tool_button.h"
#include "tool_menu_button.h"
#include "radio_group.h"
#include "radio_button.h"
#include "notebook.h"
#include "notebook_page.h"
#include "scrollpane.h"
#include "list_model.h"
#include "tree_model.h"
#include "table.h"
#include "table_column.h"
#include "frame.h"
#include "split_pane.h"
#include "combo_box.h"
#include "combo_box_entry.h"
#include "image_buffer.h"
#include "cached_image.h"
#include "status_bar.h"
#include "spin_button.h"
#include "slider.h"
#include "progress_bar.h"
#include "text_editor.h"
#include "persist.h"
#include "timer.h"
Go to the source code of this file.
Data Structures | |
struct | ntw_event_data |
struct | ntw_data_stack |
Defines | |
#define | FALSE 0 |
#define | TRUE 1 |
#define | NTW_WIDGET_SET_FLAG(x, y) x->flags = x->flags | htonl(y) |
#define | NTW_WIDGET_CLEAR_FLAG(x, y) x->flags = x->flags & htonl(0xffffffff ^ y) |
#define | NTW_WIDGET_TOGGLE_FLAG(x, y) x->flags = x->flags ^ htonl(y) |
#define | NTW_WIDGET_GET_FLAG(x, y) ((x->flags & htonl(y)) > 0) |
#define | NTW_INIT_CALLBACK(x) ntw_init_callback(#x, &x); |
Typedefs | |
typedef widget_header | ntwWidget |
typedef int(* | func_ptr )(void *, void *) |
Functions | |
void | ntw_print_error (char *function_name, char *error) |
Prints an error message. | |
widget_data * | ntw_initialize_widget (int32 type, int32 length) |
Sets data on a newly created widget to sane values. | |
ntw_event_table * | ntw_initialize_event_handler (int32 event_count) |
Create event table. | |
int | ntw_widget_remove_default_event_handler (ntwWidget *widget) |
Removes a widget's default event handler. | |
int | ntw_widget_show (ntwWidget *widget) |
Makes invisible widgets visible. | |
int | ntw_widget_hide (ntwWidget *widget) |
Makes visible widgets invisible. | |
int | ntw_widget_destroy (ntwWidget *widget) |
Completely destroy a widget and all its children. | |
int | ntw_init (int argc, char **argv) |
Initialize network connection. | |
void | ntw_main () |
Main event loop. | |
void | ntw_main_quit () |
Exit event loop. | |
int | ntw_add_callback (ntwWidget *widget, int32 event, func_ptr callback, ntwWidget *user_data, int32 synchronized) |
Add a callback to a widget. |
|
Add a callback to a widget. This assigns a particular function as a callback to a particular widget event. This function will be run after the default event handler, if any.
|
|
Initialize network connection. Initializes the ntw library for use. Most importantly, this initializes the server's socket to listen for clients.
|
|
Create event table.
For NTW internal use only
|
|
Sets data on a newly created widget to sane values.
For NTW internal use only
|
|
Main event loop. This is the main event handling loop that must be called to handle messages from the client. This should be called after all callbacks are initialized and after ntw_init(). |
|
Exit event loop. Programatic means to force the main event loop to exit and halt execution. |
|
Prints an error message. Standard error printing facility that keeps things looking nice.
|
|
Completely destroy a widget and all its children. This will recursively deconstruct widgets, reclaim all associated memory, and send appropriate messages to the client program to do the same. This is permanent -- to hide a widget, use ntw_widget_hide().
|
|
Makes visible widgets invisible.
|
|
Removes a widget's default event handler. Some widgets, like the text entry widget, have a default event handler that handles changes automatically. A developer might want to do this manually, however, (so he could convert all text to uppercase before setting the widget state, for example) so this function exists.
|
|
Makes invisible widgets visible.
|