1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
/**
* @namespace biewlib
* @file biewlib/tw_class.h
* @brief This file contains prototypes of classes for Text Window manager.
* @version -
* @remark this source file is part of Binary vIEW project (BIEW).
* The Binary vIEW (BIEW) is copyright (C) 1995 Nick Kurshev.
* All rights reserved. This software is redistributable under the
* licence given in the file "Licence.en" ("Licence.ru" in russian
* translation) distributed in the BIEW archive.
* @note Requires POSIX compatible development system
*
* @author Nick Kurshev
* @since 2000
* @note Development, fixes and improvements
**/
#ifndef __TW_CLASS_H
#define __TW_CLASS_H 1
#ifndef __TWIN_H
#error Never use this header file directly. Use twin.h instead
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** Defines class callback routine type
* @return 0L if no action performed
* not 0 depends from event
* @param win indicates handle of window for which
* event handler is called
* @param event indicates event type
* @param event_param indicates parameters of event
* @param event_data indicates data of event
**/
typedef long (__FASTCALL__ *twClassFunc)(TWindow *win,unsigned event,
unsigned long event_param, void *event_data);
#define __CS_ORDINAL 0x0000 /**< Indicates ordinal type of callback function */
/** Internal structure of text window class */
typedef struct tagTwClass
{
char *name; /**< name of class */
twClassFunc method; /**< callback routine */
unsigned flags; /**< flags */
}TwClass;
/** Registers new class
* @return True if successful
* @param name indicates symbolic name of class
* @param flags indicates __CS_* flags family
* @param method indicates callback routine
**/
tBool __FASTCALL__ twcRegisterClass(const char *name, unsigned flags, twClassFunc method);
/** Destroys set of classes
* @return none
* @param note Do not call it directly. It is
automatically called by library.
* @param warning Library don't contain
DeregisterClass function from
safety reasons.
**/
void __FASTCALL__ twcDestroyClassSet(void);
/** Finds class descriptor
* @return pointer to class descriptor or
* NULL if error occured
* @param name indicates symbolic name of class
**/
TwClass * __FASTCALL__ twcFindClass(const char *name);
#ifdef __cplusplus
}
#endif
#endif
|