Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

Gui.c File Reference

#include <stdlib.h>
#include <string.h>
#include "macros.h"
#include "debug.h"
#include "Bases.h"
#include "Locale.h"
#include "Memory.h"
#include "Net.h"
#include "Skin.h"
#include "xml_Gui.h"
#include "classes.h"
#include "Image.h"
#include "Prefs.h"
#include "Window.h"
#include "Common.h"
#include "Bitmap.h"
#include "Terminal.h"

Include dependency graph for Gui.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  gui_Timer_s

Defines

#define GUI_TMP_STRING_BUFFER_SIZE   64

Functions

int gui_TimerCanceller (Window_t *win, u32 userdata)
 VERSION ("gui server", 1, 0,"Gergely Gati","g.gati @freemail.hu")
u32 gui_IsOverlap (u32 firsttag,...)
u32 gui_IsOverlapTL (tag *taglist)
u32 gui_CalculateOverlap (u32 firsttag,...)
u32 gui_CalculateOverlapTL (tag *taglist)
u32 gui_LoadFile (u32 firsttag,...)
u32 gui_LoadFileTL (tag *taglist)
u32 gui_LoadSubgadgetDescriptor (u32 firsttag,...)
u32 gui_LoadSubgadgetDescriptorTL (tag *taglist)
u32 gui_UnLoadSubgadgetDescriptor (u32 firsttag,...)
u32 gui_UnLoadSubgadgetDescriptorTL (tag *taglist)
u32 gui_IsInside (u32 firsttag,...)
u32 gui_IsInsideTL (tag *taglist)
u32 gui_TimerStart (u32 firsttag,...)
u32 gui_TimerStartTL (tag *taglist)
u32 gui_TimerCancel (u32 firsttag,...)
u32 gui_TimerCancelTL (tag *taglist)
u32 gui_GetLimitedTextLength (u32 firsttag,...)
u32 gui_GetLimitedTextLengthTL (tag *taglist)
u32 gui_GetTextFitLength (u32 firsttag,...)
u32 gui_GetTextFitLengthTL (tag *taglist)
u32 gui_GetTextWrapLength (u32 firsttag,...)
u32 gui_GetTextWrapLengthTL (tag *taglist)
int gui_Event (u32 conn, struct glw_Event *event)
void gui_check_types (void)
int gui_Init (void)
void gui_CleanUp (void)
int gui_ServerMain (u32 conn)
void gui_TimerDelete (gui_Timer_t *timer)
u32 gui_Call (int function, u32 firsttag,...)
u32 gui_CallTL (int function, tag *taglist)

Variables

u32(* call_vector [GUI_FUNC_DONE-GUI_FUNCBASE+1])(tag *)
char * langs []


Define Documentation

#define GUI_TMP_STRING_BUFFER_SIZE   64
 

Definition at line 77 of file Gui.c.

Referenced by gui_GetLimitedTextLengthTL.


Function Documentation

u32 gui_CalculateOverlap u32    firsttag,
...   
 

Parameters:
TAG_GUI_R1  Rect_t *
TAG_GUI_R2  Rect_t *
TAG_GUI_R3  Rect_t *

Definition at line 149 of file Gui.c.

References gui_CalculateOverlapTL, and u32.

u32 gui_CalculateOverlapTL tag   taglist
 

Definition at line 153 of file Gui.c.

References debug_Begin, debug_End, Rect_t::height, Rect_t::left, max, min, tag_GetTagData, TAG_GUI_R1, TAG_GUI_R2, TAG_GUI_R3, Rect_t::top, u32, and Rect_t::width.

Referenced by gui_Init.

u32 gui_Call int    function,
u32    firsttag,
...   
 

Definition at line 882 of file Gui.c.

References gui_CallTL, and u32.

Referenced by gui_Init.

u32 gui_CallTL int    function,
tag   taglist
 

Definition at line 886 of file Gui.c.

References call_vector, debug_Begin, debug_End, debug_Message, debug_Warning, GUI_FUNC_DONE, GUI_FUNCBASE, and u32.

Referenced by gui_Init.

void gui_check_types void    [static]
 

Definition at line 708 of file Gui.c.

Referenced by gui_Init.

void gui_CleanUp void   
 

Definition at line 767 of file Gui.c.

References bitmap_CleanUp, debug_Begin, debug_End, gadget_CleanUp, gxml_CleanUp, img_CleanUp, net_CleanUp, prefs_CleanUp, skin_CleanUp, term_CleanUp, and window_CleanUp.

Referenced by WinMain.

int gui_Event u32    conn,
struct glw_Event   event
 

Definition at line 565 of file Gui.c.

References gui_Timer_s::callback, CBK_WINDOW_ACTIVATED, CBK_WINDOW_INACTIVATED, glw_Event::data, debug_Begin, debug_End, debug_Message, glw_Event::event, gui_Timer_s::flags, gadget_PostMessage, glw_GetWindowUserdata, glw_TimerStart, GUI_TIMER_REPEAT, gui_TimerDelete, Window_s::handle, glw_Event::mask, mem_malloc, gui_Timer_s::millisec, net_SerProcessMessage, NULL, TAG_DONE, TAG_GADGET_EVENT, TAG_GADGET_OBJECT, TAG_GADGET_WINDOW, TAG_WIN_OBJECT, u32, glw_Event::userdata, gui_Timer_s::userdata, glw_Event::window, window_DamageWindow, window_GetRootGadget, window_GetUserdata, window_IsSleep, window_RefreshWindow, and window_WindowEvent.

u32 gui_GetLimitedTextLength u32    firsttag,
...   
 

Parameters:
TAG_GUI_FONT  u32
TAG_GUI_STR  char *
TAG_GUI_LEN  int

Definition at line 409 of file Gui.c.

References gui_GetLimitedTextLengthTL, and u32.

u32 gui_GetLimitedTextLengthTL tag   taglist
 

Definition at line 413 of file Gui.c.

References debug_Begin, debug_End, glw_GetTextLength, GUI_TMP_STRING_BUFFER_SIZE, mem_free, mem_malloc, NULL, TAG_DONE, tag_GetTagData, TAG_GUI_FONT, TAG_GUI_LEN, TAG_GUI_STR, and u32.

Referenced by gui_Init.

u32 gui_GetTextFitLength u32    firsttag,
...   
 

Parameters:
TAG_GUI_FONT  u32
TAG_GUI_STR  char *
TAG_GUI_WIDTH  int

Definition at line 458 of file Gui.c.

References gui_GetTextFitLengthTL, and u32.

u32 gui_GetTextFitLengthTL tag   taglist
 

Definition at line 462 of file Gui.c.

References debug_Begin, debug_End, gui_GetLimitedTextLength, NULL, TAG_DONE, tag_GetTagData, TAG_GUI_FONT, TAG_GUI_LEN, TAG_GUI_STR, TAG_GUI_WIDTH, and u32.

Referenced by gui_Init.

u32 gui_GetTextWrapLength u32    firsttag,
...   
 

Parameters:
TAG_GUI_FONT  u32
TAG_GUI_STR  char *
TAG_GUI_WIDTH  int

Definition at line 500 of file Gui.c.

References gui_GetTextWrapLengthTL, and u32.

u32 gui_GetTextWrapLengthTL tag   taglist
 

Definition at line 504 of file Gui.c.

References debug_Begin, debug_End, gui_GetTextFitLength, NULL, tag_GetTagData, TAG_GUI_FONT, TAG_GUI_STR, TAG_GUI_WIDTH, and u32.

Referenced by gui_Init.

int gui_Init void   
 

Definition at line 725 of file Gui.c.

References bitmap_Init, call_vector, debug_Begin, debug_End, gadget_Init, GUI_CALCULATEOVERLAP, gui_CalculateOverlapTL, gui_Call, gui_CallTL, gui_check_types, GUI_FUNCBASE, GUI_GETLIMITEDTEXTLENGTH, gui_GetLimitedTextLengthTL, GUI_GETTEXTFITLENGTH, gui_GetTextFitLengthTL, GUI_GETTEXTWRAPLENGTH, gui_GetTextWrapLengthTL, GUI_ISINSIDE, gui_IsInsideTL, GUI_ISOVERLAP, gui_IsOverlapTL, GUI_LOADFILE, gui_LoadFileTL, GUI_LOADSUBGADGETDESCRIPTOR, gui_LoadSubgadgetDescriptorTL, GUI_TIMERCANCEL, gui_TimerCancelTL, GUI_TIMERSTART, gui_TimerStartTL, GUI_UNLOADSUBGADGETDESCRIPTOR, gui_UnLoadSubgadgetDescriptorTL, gxml_Init, img_Init, net_Init, prefs_Init, skin_Init, term_Init, and window_Init.

Referenced by WinMain.

u32 gui_IsInside u32    firsttag,
...   
 

Parameters:
TAG_GUI_RECT  Rect_t *
TAG_GUI_X  int
TAG_GUI_Y  int

Definition at line 293 of file Gui.c.

References gui_IsInsideTL, and u32.

u32 gui_IsInsideTL tag   taglist
 

Definition at line 297 of file Gui.c.

References debug_Begin, debug_End, FALSE, Rect_t::height, Rect_t::left, tag_GetTagData, TAG_GUI_RECT, TAG_GUI_X, TAG_GUI_Y, Rect_t::top, TRUE, u32, and Rect_t::width.

Referenced by gui_Init.

u32 gui_IsOverlap u32    firsttag,
...   
 

Parameters:
TAG_GUI_R1  Rect_t *
TAG_GUI_R2  Rect_t *

Definition at line 114 of file Gui.c.

References gui_IsOverlapTL, and u32.

u32 gui_IsOverlapTL tag   taglist
 

Definition at line 118 of file Gui.c.

References debug_Begin, debug_End, FALSE, Rect_t::height, Rect_t::left, tag_GetTagData, TAG_GUI_R1, TAG_GUI_R2, Rect_t::top, TRUE, u32, and Rect_t::width.

Referenced by gui_Init.

u32 gui_LoadFile u32    firsttag,
...   
 

Parameters:
TAG_GUI_NAME  char *
TAG_GUI_LEN  int *

Definition at line 185 of file Gui.c.

References gui_LoadFileTL, and u32.

u32 gui_LoadFileTL tag   taglist
 

Definition at line 189 of file Gui.c.

References debug_Begin, debug_End, debug_Warning, mem_malloc, NULL, tag_GetTagData, TAG_GUI_LEN, TAG_GUI_NAME, and u32.

Referenced by gui_Init.

u32 gui_LoadSubgadgetDescriptor u32    firsttag,
...   
 

Parameters:
TAG_GUI_WIN  Window_t *
TAG_GUI_CLASS_NAME  char *

Definition at line 230 of file Gui.c.

References gui_LoadSubgadgetDescriptorTL, and u32.

u32 gui_LoadSubgadgetDescriptorTL tag   taglist
 

Definition at line 234 of file Gui.c.

References debug_Begin, debug_End, mem_free, mem_malloc, net_LoadFile, NULL, TAG_DONE, tag_GetTagData, TAG_GUI_CLASS_NAME, TAG_GUI_WIN, TAG_NET_CONN, TAG_NET_NAME, u32, and window_GetConnection.

Referenced by gui_Init.

int gui_ServerMain u32    conn
 

Definition at line 786 of file Gui.c.

References glw_ConnUser::app, glw_ConnUser::appname, gui_App_t::conn, debug_Begin, debug_End, debug_Message, glw_MainLoop, langs, list_CreateList, list_DeleteList, gui_App_t::locale, locale_CleanUp, locale_Init, mem_free, mem_malloc, gui_App_t::name, net_SerSendApp, NULL, gui_App_t::prefs, prefs_CleanUpApp, prefs_GetString, prefs_InitApp, gui_App_t::skin, skin_CreateSkin, skin_DeleteSkin, u32, window_CloseAllWindows, and gui_App_t::windowlist.

u32 gui_TimerCancel u32    firsttag,
...   
 

Parameters:
TAG_GUI_WIN  Window_t *
TAG_GUI_TIMER_ID  u32

Definition at line 373 of file Gui.c.

References gui_TimerCancelTL, and u32.

int gui_TimerCanceller Window_t   win,
u32    userdata
[static]
 

Definition at line 827 of file Gui.c.

References debug_Begin, debug_End, and u32.

Referenced by gui_TimerCancelTL.

u32 gui_TimerCancelTL tag   taglist
 

Definition at line 377 of file Gui.c.

References gui_Timer_s::callback, debug_Begin, debug_End, gui_TimerCanceller, NULL, tag_GetTagData, TAG_GUI_TIMER_ID, TAG_GUI_WIN, and u32.

Referenced by gui_Init.

void gui_TimerDelete gui_Timer_t   timer
 

Definition at line 835 of file Gui.c.

References debug_Begin, debug_End, glw_TimerCancel, Window_s::handle, gui_Timer_s::id, list_DeleteNode, list_RemoveNode, list_SetNodeData, mem_free, gui_Timer_s::node, NULL, TAG_DONE, gui_Timer_s::win, and window_GetTimerList.

u32 gui_TimerStart u32    firsttag,
...   
 

Parameters:
TAG_GUI_WIN  Window_t *
TAG_GUI_MILLISEC  u32
TAG_GUI_FLAGS  int
TAG_GUI_USERDATA  u32
TAG_GUI_CALLBACK  int (*)(Window_t *,u32)

Definition at line 327 of file Gui.c.

References gui_TimerStartTL, and u32.

u32 gui_TimerStartTL tag   taglist
 

Definition at line 331 of file Gui.c.

References gui_Timer_s::callback, debug_Begin, debug_End, gui_Timer_s::flags, glw_TimerStart, Window_s::handle, gui_Timer_s::id, list_CreateNode, list_InsertNodeTail, list_SetNodeData, mem_malloc, gui_Timer_s::millisec, gui_Timer_s::node, NULL, TAG_DONE, tag_GetTagData, TAG_GUI_CALLBACK, TAG_GUI_FLAGS, TAG_GUI_MILLISEC, TAG_GUI_USERDATA, TAG_GUI_WIN, u32, gui_Timer_s::userdata, gui_Timer_s::win, and window_GetTimerList.

Referenced by gui_Init.

u32 gui_UnLoadSubgadgetDescriptor u32    firsttag,
...   
 

Parameters:
TAG_GUI_FILE  char *

Definition at line 268 of file Gui.c.

References gui_UnLoadSubgadgetDescriptorTL, and u32.

u32 gui_UnLoadSubgadgetDescriptorTL tag   taglist
 

Definition at line 272 of file Gui.c.

References debug_Begin, debug_End, mem_free, NULL, tag_GetTagData, TAG_GUI_FILE, and u32.

Referenced by gui_Init.

VERSION "gui server"   ,
 ,
 ,
"Gergely Gati"   ,
"g.gati @freemail.hu"   
 


Variable Documentation

u32(* call_vector[GUI_FUNC_DONE-GUI_FUNCBASE+1])(tag *) [static]
 

Definition at line 96 of file Gui.c.

Referenced by gui_CallTL, and gui_Init.

char* langs[] [static]
 

Initial value:

{
  "ro",
  "hu",
  "ru",
  NULL
}

Definition at line 100 of file Gui.c.

Referenced by gui_ServerMain.


Generated on Tue Jan 7 12:12:16 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002