NetSurf
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
treeview.h File Reference
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
Include dependency graph for treeview.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  atari_treeview_callbacks
 

Macros

#define ATARI_TREEVIEW_WIDGETS
 Default AES Window widgets for a treeview window, can be passed to atari_treeview_create as the flags parameter to have an standardized treeview window. More...
 

Typedefs

typedef nserror(* atari_treeview_init2_callback) (struct core_window *cw)
 The atari treeview implementation wraps the core_window callbacks So that it can process parameters and then it passes the event further To the specific implementation window. More...
 
typedef void(* atari_treeview_finish_callback) (struct core_window *cw)
 
typedef void(* atari_treeview_keypress_callback) (struct core_window *cw, uint32_t ucs4)
 
typedef void(* atari_treeview_mouse_action_callback) (struct core_window *cw, browser_mouse_state mouse, int x, int y)
 
typedef void(* atari_treeview_draw_callback) (struct core_window *cw, int x, int y, struct rect *clip, const struct redraw_context *ctx)
 

Enumerations

enum  treeview_area_e { TREEVIEW_AREA_WORK = 0 , TREEVIEW_AREA_TOOLBAR , TREEVIEW_AREA_CONTENT }
 

Functions

struct core_window * atari_treeview_create (GUIWIN *win, struct atari_treeview_callbacks *callbacks, void *user_data, uint32_t flags)
 Initalize an window to be an treeview window. More...
 
void atari_treeview_delete (struct core_window *cw)
 Free the Treeview, but not the gemtk window used for the treeview. More...
 
void atari_treeview_open (struct core_window *cw, GRECT *pos)
 Open the treeview window. More...
 
bool atari_treeview_is_open (struct core_window *cw)
 Returns the window "open" state. More...
 
void atari_treeview_close (struct core_window *cw)
 Closes (hides) the treeview window. More...
 
GUIWIN * atari_treeview_get_gemtk_window (struct core_window *cw)
 Get the window manager window handle. More...
 
void atari_treeview_get_grect (struct core_window *cw, enum treeview_area_e mode, GRECT *dest)
 Get an specific area inside the window. More...
 
void atari_treeview_redraw (struct core_window *cw)
 Process all pending redraw requests for a single treeview. More...
 
void atari_treeview_set_user_data (struct core_window *cw, void *user_data_ptr)
 Attach arbitary user data to the treeview. More...
 
void * atari_treeview_get_user_data (struct core_window *cw)
 Return the arbitary user data set by atari_treeview_set_user_data() More...
 
void atari_treeview_flush_redraws (void)
 Process all redraw request of all open Treeview windows. More...
 

Variables

struct core_window_tableatari_core_window_table
 

Macro Definition Documentation

◆ ATARI_TREEVIEW_WIDGETS

#define ATARI_TREEVIEW_WIDGETS
Value:
(CLOSER | MOVER | SIZER| NAME | FULLER | \
SMALLER | VSLIDE | HSLIDE | UPARROW | DNARROW | \
LFARROW | RTARROW)

Default AES Window widgets for a treeview window, can be passed to atari_treeview_create as the flags parameter to have an standardized treeview window.

Definition at line 32 of file treeview.h.

Typedef Documentation

◆ atari_treeview_draw_callback

typedef void(* atari_treeview_draw_callback) (struct core_window *cw, int x, int y, struct rect *clip, const struct redraw_context *ctx)

Definition at line 57 of file treeview.h.

◆ atari_treeview_finish_callback

typedef void(* atari_treeview_finish_callback) (struct core_window *cw)

Definition at line 54 of file treeview.h.

◆ atari_treeview_init2_callback

typedef nserror(* atari_treeview_init2_callback) (struct core_window *cw)

The atari treeview implementation wraps the core_window callbacks So that it can process parameters and then it passes the event further To the specific implementation window.

These callbacks must be implemented by any atari treeview window.

Todo:
atari add drag_status callback

Definition at line 53 of file treeview.h.

◆ atari_treeview_keypress_callback

typedef void(* atari_treeview_keypress_callback) (struct core_window *cw, uint32_t ucs4)

Definition at line 55 of file treeview.h.

◆ atari_treeview_mouse_action_callback

typedef void(* atari_treeview_mouse_action_callback) (struct core_window *cw, browser_mouse_state mouse, int x, int y)

Definition at line 56 of file treeview.h.

Enumeration Type Documentation

◆ treeview_area_e

Enumerator
TREEVIEW_AREA_WORK 
TREEVIEW_AREA_TOOLBAR 
TREEVIEW_AREA_CONTENT 

Definition at line 36 of file treeview.h.

Function Documentation

◆ atari_treeview_close()

void atari_treeview_close ( struct core_window *  cw)

Closes (hides) the treeview window.

Definition at line 804 of file treeview.c.

References atari_treeview_window::is_open, atari_treeview_window::next_open, atari_treeview_window::prev_open, treeviews_open, and atari_treeview_window::window.

Referenced by atari_cookie_manager_close(), atari_global_history_close(), and atari_hotlist_close().

Here is the caller graph for this function:

◆ atari_treeview_create()

struct core_window * atari_treeview_create ( GUIWIN *  win,
struct atari_treeview_callbacks callbacks,
void *  user_data,
uint32_t  flags 
)

Initalize an window to be an treeview window.

Definition at line 547 of file treeview.c.

References atari_warn_user(), callbacks, handle_event(), atari_treeview_callbacks::init_phase2, atari_treeview_window::io, messages_get_errorcode(), NSERROR_NOMEM, NSERROR_OK, NSLOG, atari_treeview_window::user_data, and atari_treeview_window::window.

Referenced by atari_cookie_manager_init(), atari_global_history_init(), and atari_hotlist_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atari_treeview_delete()

void atari_treeview_delete ( struct core_window *  cw)

Free the Treeview, but not the gemtk window used for the treeview.

Definition at line 740 of file treeview.c.

References atari_treeview_callbacks::finish, and atari_treeview_window::io.

Referenced by atari_cookie_manager_destroy(), atari_global_history_destroy(), and atari_hotlist_destroy().

Here is the caller graph for this function:

◆ atari_treeview_flush_redraws()

void atari_treeview_flush_redraws ( void  )

Process all redraw request of all open Treeview windows.

Definition at line 825 of file treeview.c.

References atari_treeview_is_iconified(), atari_treeview_redraw(), atari_treeview_window::is_open, atari_treeview_window::redraw, and treeviews_open.

Referenced by atari_poll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atari_treeview_get_gemtk_window()

GUIWIN * atari_treeview_get_gemtk_window ( struct core_window *  cw)

Get the window manager window handle.

Definition at line 619 of file treeview.c.

References atari_treeview_window::window.

Referenced by handle_event().

Here is the caller graph for this function:

◆ atari_treeview_get_grect()

void atari_treeview_get_grect ( struct core_window *  cw,
enum treeview_area_e  mode,
GRECT *  dest 
)

Get an specific area inside the window.

Definition at line 602 of file treeview.c.

References mode, TREEVIEW_AREA_CONTENT, TREEVIEW_AREA_TOOLBAR, and atari_treeview_window::window.

Referenced by atari_treeview_get_window_dimensions(), atari_treeview_invalidate_area(), atari_treeview_update_size(), handle_event(), and on_redraw_event().

Here is the caller graph for this function:

◆ atari_treeview_get_user_data()

void * atari_treeview_get_user_data ( struct core_window *  cw)

Return the arbitary user data set by atari_treeview_set_user_data()

Definition at line 796 of file treeview.c.

References atari_treeview_window::user_data.

◆ atari_treeview_is_open()

bool atari_treeview_is_open ( struct core_window *  cw)

Returns the window "open" state.

Definition at line 780 of file treeview.c.

References atari_treeview_window::is_open.

Referenced by atari_cookie_manager_destroy(), atari_cookie_manager_open(), atari_global_history_destroy(), atari_global_history_open(), atari_hotlist_destroy(), and atari_hotlist_open().

Here is the caller graph for this function:

◆ atari_treeview_open()

void atari_treeview_open ( struct core_window *  cw,
GRECT *  pos 
)

Open the treeview window.

Definition at line 754 of file treeview.c.

References atari_treeview_window::is_open, atari_treeview_window::next_open, atari_treeview_window::prev_open, treeviews_open, and atari_treeview_window::window.

Referenced by atari_cookie_manager_open(), atari_global_history_open(), and atari_hotlist_open().

Here is the caller graph for this function:

◆ atari_treeview_redraw()

void atari_treeview_redraw ( struct core_window *  cw)

Process all pending redraw requests for a single treeview.

Definition at line 627 of file treeview.c.

References atari_plotters, clip(), atari_treeview_callbacks::draw, redraw_context::interactive, atari_treeview_window::io, atari_treeview_window::is_open, PLOT_FLAG_OFFSCREEN, plot_get_flags(), plot_get_vdi_handle(), plot_lock(), plot_set_dimensions(), plot_unlock(), atari_treeview_window::rdw_area, atari_treeview_window::redraw, and atari_treeview_window::window.

Referenced by atari_cookie_manager_redraw(), atari_global_history_redraw(), atari_hotlist_redraw(), atari_treeview_flush_redraws(), and on_mbutton_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atari_treeview_set_user_data()

void atari_treeview_set_user_data ( struct core_window *  cw,
void *  user_data_ptr 
)

Attach arbitary user data to the treeview.

Definition at line 788 of file treeview.c.

References atari_treeview_window::user_data.

Variable Documentation

◆ atari_core_window_table

struct core_window_table* atari_core_window_table
extern

Definition at line 543 of file treeview.c.

Referenced by main().