1 #ifndef SCROLLBAR_H 2 #define SCROLLBAR_H 3 4 /* TN5250 - An implementation of the 5250 telnet protocol. 5 * Copyright (C) 2005-2008 James Rich 6 * 7 * This file is part of TN5250. 8 * 9 * TN5250 is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU Lesser General Public License as published by 11 * the Free Software Foundation; either version 2.1, or (at your option) 12 * any later version. 13 * 14 * TN5250 is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public License 20 * along with this software; see the file COPYING. If not, write to 21 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 * Boston, MA 02111-1307 USA 23 * 24 */ 25 26 #ifdef __cplusplus 27 extern "C" 28 { 29 #endif 30 31 struct _Tn5250Scrollbar; 32 struct _Tn5250DBuffer; 33 34 /***** lib5250/Tn5250Scrollbar 35 * NAME 36 * Tn5250Scrollbar 37 * SYNOPSIS 38 * Tn5250Scrollbar *scrollbar = tn5250_scrollbar_new (); 39 * DESCRIPTION 40 * The Tn5250Scrollbar object manages a 5250 scrollbar on the display. 41 * SOURCE 42 */ 43 struct _Tn5250Scrollbar 44 { 45 struct _Tn5250Scrollbar *next; 46 struct _Tn5250Scrollbar *prev; 47 unsigned int id; /* Numeric ID of this scrollbar */ 48 unsigned int direction; /* 1=horizontal, 0=vertical */ 49 unsigned int rowscols; /* number of scrollable rows/columns */ 50 unsigned int sliderpos; /* position of slider */ 51 unsigned int size; /* size (in characters) of scrollbar */ 52 struct _Tn5250DBuffer *table; 53 }; 54 55 typedef struct _Tn5250Scrollbar Tn5250Scrollbar; 56 /*******/ 57 58 /* Manipulate scrollbars */ 59 extern Tn5250Scrollbar *tn5250_scrollbar_new (); 60 extern Tn5250Scrollbar *tn5250_scrollbar_copy (Tn5250Scrollbar * This); 61 extern void tn5250_scrollbar_destroy (Tn5250Scrollbar * This); 62 extern int tn5250_scrollbar_direction (Tn5250Scrollbar * This); 63 extern int tn5250_scrollbar_rowscols (Tn5250Scrollbar * This); 64 extern int tn5250_scrollbar_sliderpos (Tn5250Scrollbar * This); 65 extern int tn5250_scrollbar_size (Tn5250Scrollbar * This); 66 67 /* Manipulate scrollbar lists */ 68 extern Tn5250Scrollbar *tn5250_scrollbar_list_destroy (Tn5250Scrollbar * 69 list); 70 extern Tn5250Scrollbar *tn5250_scrollbar_list_add (Tn5250Scrollbar * list, 71 Tn5250Scrollbar * node); 72 extern Tn5250Scrollbar *tn5250_scrollbar_list_remove (Tn5250Scrollbar * 73 list, 74 Tn5250Scrollbar * 75 node); 76 extern Tn5250Scrollbar *tn5250_scrollbar_list_find_by_id (Tn5250Scrollbar * 77 list, int id); 78 extern Tn5250Scrollbar *tn5250_scrollbar_list_copy (Tn5250Scrollbar * list); 79 80 #ifdef __cplusplus 81 } 82 83 #endif 84 #endif /* SCROLLBAR_H */ 85