Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

Window.c File Reference

#include <stdlib.h>
#include <string.h>
#include "macros.h"
#include "debug.h"
#include "Bases.h"
#include "Locale.h"
#include "Common.h"
#include "Memory.h"
#include "Skin.h"
#include "xml_Gui.h"
#include "classes.h"
#include "Prefs.h"
#include "Gui.h"
#include "Window.h"
#include "Net.h"
#include "gadgets/gadget_SysDrag.h"

Include dependency graph for Window.c:

Include dependency graph

Go to the source code of this file.

Functions

u32 window_RefreshWindow (u32 firsttag,...)
u32 window_RefreshWindowTL (tag *taglist)
u32 window_GetFocusedGadget (u32 firsttag,...)
u32 window_GetFocusedGadgetTL (tag *taglist)
u32 window_AddMask (u32 firsttag,...)
u32 window_AddMaskTL (tag *taglist)
u32 window_SetFocusedGadget (u32 firsttag,...)
u32 window_SetFocusedGadgetTL (tag *taglist)
u32 window_SetActive (u32 firsttag,...)
u32 window_SetActiveTL (tag *taglist)
u32 window_GetUserdata (u32 firsttag,...)
u32 window_GetUserdataTL (tag *taglist)
u32 window_GetActive (u32 firsttag,...)
u32 window_GetActiveTL (tag *taglist)
u32 window_ChangeSkin (u32 firsttag,...)
u32 window_ChangeSkinTL (tag *taglist)
u32 window_OpenWindow (u32 firsttag,...)
u32 window_OpenWindowTL (tag *taglist)
u32 window_CloseWindow (u32 firsttag,...)
u32 window_CloseWindowTL (tag *taglist)
int window_DamageWindow (Window_t *win, Rect_t *rect)
void window_CloseAllWindows (gui_App_t *app)
int window_WindowEvent (Window_t *window, u32 gadget_id, int event, u32 event_data)
Skin_twindow_GetSkin (Window_t *win)
gui_App_twindow_GetApp (Window_t *win)
Bitmap_twindow_GetMask (Window_t *win)
u32 window_GetConnection (Window_t *win)
int window_IsSleep (Window_t *win)
Gadget_twindow_GetRootGadget (Window_t *win)
List_twindow_GetTimerList (Window_t *win)
u32 window_Call (int function, u32 firsttag,...)
u32 window_CallTL (int function, tag *taglist)
int window_Init (void)
void window_CleanUp (void)

Variables

u32(* call_vector [WINDOW_FUNC_DONE-WINDOW_FUNCBASE+1])(tag *)
gadget_Check_t window_checklist []


Function Documentation

u32 window_AddMask u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *
TAG_WIN_X  int
TAG_WIN_Y  int
TAG_WIN_BITMAP  Bitmap_t *

Definition at line 137 of file Window.c.

References u32, and window_AddMaskTL.

u32 window_AddMaskTL tag   taglist
 

Definition at line 141 of file Window.c.

References bitmap_Copy, debug_Begin, debug_End, Window_s::mask, NULL, TAG_BMP_OBJECT, TAG_BMP_SOURCE, TAG_BMP_X, TAG_BMP_Y, TAG_DONE, tag_GetTagData, TAG_WIN_BITMAP, TAG_WIN_OBJECT, TAG_WIN_X, TAG_WIN_Y, and u32.

Referenced by window_Init.

u32 window_Call int    function,
u32    firsttag,
...   
 

Definition at line 738 of file Window.c.

References u32, and window_CallTL.

Referenced by window_Init.

u32 window_CallTL int    function,
tag   taglist
 

Definition at line 742 of file Window.c.

References call_vector, debug_Begin, debug_End, debug_Message, debug_Warning, u32, WINDOW_FUNC_DONE, and WINDOW_FUNCBASE.

Referenced by window_Init.

u32 window_ChangeSkin u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *
TAG_WIN_SKINNAME  char *

Definition at line 290 of file Window.c.

References u32, and window_ChangeSkinTL.

u32 window_ChangeSkinTL tag   taglist
 

Definition at line 294 of file Window.c.

References Window_s::app, gui_App_t::conn, debug_Begin, debug_End, debug_Message, debug_Warning, Window_s::flags, gadget_Attach, gadget_ChangeSkin, gadget_DeleteSubtree, gadget_Detach, gadget_GetExtent, gadget_MethodCall, gadget_Search, GADGET_SYSBASE, Window_s::gadgetapp, Window_s::gadgetroot, glw_GetWindowDimensions, glw_SetWindowDimensions, glw_SetWindowLimits, gxml_CreateGadgetTree, Window_s::handle, Extent_t::height, Rect_t::height, gui_App_t::locale, max, mem_free, MET_SYSDRAG_SET_TITLE, min, net_LoadFile, NULL, gui_App_t::skin, skin_CreateSkin, skin_DeleteSkin, skin_GetWindowDecorationName, TAG_DONE, TAG_GADGET_GADGET_ID, TAG_GADGET_MAX, TAG_GADGET_METHOD, TAG_GADGET_MIN, TAG_GADGET_NEW_CHILD, TAG_GADGET_NEW_PARENT, TAG_GADGET_OBJECT, TAG_GADGET_ROOT, TAG_GADGET_WINDOW, tag_GetTagData, TAG_GXML_APPNAME, TAG_GXML_CHECK, TAG_GXML_LAYOUTNAME, TAG_GXML_LOCALE, TAG_GXML_TYPE, TAG_GXML_WINDOW, TAG_GXML_XML_FILE, TAG_NET_CONN, TAG_NET_NAME, TAG_SSZ_TITLE, TAG_WIN_OBJECT, TAG_WIN_SKINNAME, Window_s::title, u32, Extent_t::width, Rect_t::width, WIN_FLAGS_NOBORDER, and window_RefreshWindow.

Referenced by window_Init.

void window_CleanUp void   
 

Definition at line 802 of file Window.c.

References debug_Begin, and debug_End.

Referenced by gui_CleanUp.

void window_CloseAllWindows gui_App_t   app
 

Definition at line 683 of file Window.c.

References debug_Begin, debug_End, list_GetNodeData, list_GetNodeHead, NULL, TAG_DONE, TAG_WIN_OBJECT, window_CloseWindow, and gui_App_t::windowlist.

u32 window_CloseWindow u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *

Definition at line 620 of file Window.c.

References u32, and window_CloseWindowTL.

u32 window_CloseWindowTL tag   taglist
 

Definition at line 624 of file Window.c.

References Window_s::app, bitmap_Delete, CBK_CHILD_WINDOW_CLOSED, debug_Begin, debug_End, Window_s::flags, gadget_DeleteSubtree, Window_s::gadgetroot, glw_CloseWindow, gui_TimerDelete, Window_s::handle, list_DeleteList, list_DeleteNode, list_GetNodeData, list_GetNodeHead, list_RemoveNode, list_SetNodeData, Window_s::mask, mem_free, Window_s::name, Window_s::node, NULL, Window_s::parent, Window_s::parentdata, Window_s::sleep, TAG_BMP_OBJECT, TAG_DONE, TAG_GADGET_OBJECT, tag_GetTagData, TAG_WIN_OBJECT, Window_s::timerlist, Window_s::title, u32, WIN_FLAGS_SLEEPPARENT, window_WindowEvent, and gui_App_t::windowlist.

Referenced by window_Init.

int window_DamageWindow Window_t   win,
Rect_t   rect
 

Definition at line 671 of file Window.c.

References debug_Begin, debug_End, gadget_Damage, Window_s::gadgetroot, TAG_DONE, TAG_GADGET_OBJECT, and TAG_GADGET_RECT.

u32 window_GetActive u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *

Definition at line 264 of file Window.c.

References u32, and window_GetActiveTL.

u32 window_GetActiveTL tag   taglist
 

Definition at line 268 of file Window.c.

References Window_s::active_gadget, debug_Begin, debug_End, NULL, tag_GetTagData, TAG_WIN_OBJECT, and u32.

Referenced by window_Init.

gui_App_t* window_GetApp Window_t   win
 

Definition at line 712 of file Window.c.

References Window_s::app.

u32 window_GetConnection Window_t   win
 

Definition at line 720 of file Window.c.

References Window_s::app, gui_App_t::conn, and u32.

u32 window_GetFocusedGadget u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *

Definition at line 109 of file Window.c.

References u32, and window_GetFocusedGadgetTL.

u32 window_GetFocusedGadgetTL tag   taglist
 

Definition at line 113 of file Window.c.

References debug_Begin, debug_End, Window_s::focused_gadget, NULL, tag_GetTagData, TAG_WIN_OBJECT, and u32.

Referenced by window_Init.

Bitmap_t* window_GetMask Window_t   win
 

Definition at line 716 of file Window.c.

References Window_s::mask.

Gadget_t* window_GetRootGadget Window_t   win
 

Definition at line 728 of file Window.c.

References Window_s::gadgetroot.

Skin_t* window_GetSkin Window_t   win
 

Definition at line 708 of file Window.c.

References Window_s::app, and gui_App_t::skin.

List_t* window_GetTimerList Window_t   win
 

Definition at line 732 of file Window.c.

References Window_s::timerlist.

u32 window_GetUserdata u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *

Definition at line 239 of file Window.c.

References u32, and window_GetUserdataTL.

u32 window_GetUserdataTL tag   taglist
 

Definition at line 243 of file Window.c.

References debug_Begin, debug_End, NULL, tag_GetTagData, TAG_WIN_OBJECT, u32, and Window_s::userdata.

Referenced by window_Init.

int window_Init void   
 

Definition at line 773 of file Window.c.

References call_vector, debug_Begin, debug_End, WINDOW_ADDMASK, window_AddMaskTL, window_Call, window_CallTL, WINDOW_CHANGESKIN, window_ChangeSkinTL, WINDOW_CLOSEWINDOW, window_CloseWindowTL, WINDOW_FUNCBASE, WINDOW_GETACTIVE, window_GetActiveTL, WINDOW_GETFOCUSEDGADGET, window_GetFocusedGadgetTL, WINDOW_GETUSERDATA, window_GetUserdataTL, WINDOW_OPENWINDOW, window_OpenWindowTL, WINDOW_REFRESHWINDOW, window_RefreshWindowTL, WINDOW_SETACTIVE, window_SetActiveTL, WINDOW_SETFOCUSEDGADGET, and window_SetFocusedGadgetTL.

Referenced by gui_Init.

int window_IsSleep Window_t   win
 

Definition at line 724 of file Window.c.

References Window_s::sleep.

u32 window_OpenWindow u32    firsttag,
...   
 

Parameters:
TAG_WIN_APP  gui_App_t *
TAG_WIN_NAME  char *
TAG_WIN_EVENT_HANDLER  int (*)(gui_App_t *,Window_t *,u32,int,u32)
TAG_WIN_FLAGS  u32
TAG_WIN_CHECKLIST  gadget_Check_t *
TAG_WIN_TITLE  char *
TAG_WIN_WINFLAGS  u32
TAG_WIN_PARENT  Window_t *
TAG_WIN_PARENTDATA  u32
TAG_WIN_NOBORDER  int
TAG_WIN_GUI_FILE  char *
TAG_WIN_USERDATA  u32
TAG_WIN_LEFT  int
TAG_WIN_RIGHT  int
TAG_WIN_TOP  int
TAG_WIN_BOTTOM  int
TAG_WIN_PXWIDTH  int
TAG_WIN_PXHEIGHT  int
TAG_WIN_PXTOP  int
TAG_WIN_PXLEFT  int

Definition at line 397 of file Window.c.

References u32, and window_OpenWindowTL.

u32 window_OpenWindowTL tag   taglist
 

Definition at line 401 of file Window.c.

References Window_s::active_gadget, Window_s::app, CBK_CHILD_WINDOW_OPENED, common_strdup, gui_App_t::conn, debug_Begin, debug_End, debug_Error, debug_Message, Window_s::event_handler, Window_s::flags, Window_s::focused_gadget, gadget_Attach, gadget_GetExtent, gadget_MethodCall, gadget_Search, GADGET_SYSBASE, Window_s::gadgetapp, Window_s::gadgetroot, glw_GetScreenDimensions, glw_OpenWindow, glw_SetWindowLimits, glw_SetWindowState, glw_SetWindowTransparency, glw_Sleep, gxml_CreateGadgetTree, Window_s::handle, Extent_t::height, Rect_t::height, Rect_t::left, list_CreateList, list_CreateNode, list_InsertNodeTail, list_SetNodeData, gui_App_t::locale, max, mem_calloc, mem_free, mem_malloc, MET_SYSDRAG_SET_TITLE, min, Window_s::name, gui_App_t::name, net_LoadFile, Window_s::node, NULL, Window_s::over, Window_s::parent, Window_s::parentdata, gui_App_t::skin, skin_GetWindowDecorationName, Window_s::sleep, TAG_DONE, TAG_GADGET_GADGET_ID, TAG_GADGET_MAX, TAG_GADGET_METHOD, TAG_GADGET_MIN, TAG_GADGET_NEW_CHILD, TAG_GADGET_NEW_PARENT, TAG_GADGET_OBJECT, TAG_GADGET_ROOT, TAG_GADGET_WINDOW, tag_GetTagData, TAG_GXML_APPNAME, TAG_GXML_CHECK, TAG_GXML_LAYOUTNAME, TAG_GXML_LOCALE, TAG_GXML_TYPE, TAG_GXML_WINDOW, TAG_GXML_XML_FILE, TAG_NET_CONN, TAG_NET_NAME, TAG_SSZ_TITLE, TAG_WIN_APP, TAG_WIN_BOTTOM, TAG_WIN_CHECKLIST, TAG_WIN_EVENT_HANDLER, TAG_WIN_FLAGS, TAG_WIN_GUI_FILE, TAG_WIN_LEFT, TAG_WIN_NAME, TAG_WIN_OBJECT, TAG_WIN_PARENT, TAG_WIN_PARENTDATA, TAG_WIN_PXHEIGHT, TAG_WIN_PXLEFT, TAG_WIN_PXTOP, TAG_WIN_PXWIDTH, TAG_WIN_RIGHT, TAG_WIN_TITLE, TAG_WIN_TOP, TAG_WIN_USERDATA, TAG_WIN_WINFLAGS, Window_s::timerlist, Window_s::title, Rect_t::top, u32, Window_s::userdata, Extent_t::width, Rect_t::width, WIN_FLAGS_NOBORDER, WIN_FLAGS_SLEEPPARENT, window_CloseWindow, window_RefreshWindow, window_WindowEvent, and gui_App_t::windowlist.

Referenced by window_Init.

u32 window_RefreshWindow u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *

Definition at line 59 of file Window.c.

References u32, and window_RefreshWindowTL.

u32 window_RefreshWindowTL tag   taglist
 

Definition at line 63 of file Window.c.

References bitmap_Create, bitmap_Delete, bitmap_IsSolid, bitmap_ObtainVector, bitmap_ReleaseVector, BMP_ITY_FILL, Vector_t::data, debug_Begin, debug_End, gadget_Layout, Window_s::gadgetroot, glw_GetWindowDimensions, glw_RefreshWindow, glw_SetWindowShape, Window_s::handle, Rect_t::height, Rect_t::left, Window_s::mask, NULL, Vector_t::size, TAG_BMP_BYTEWIDTH, TAG_BMP_HEIGHT, TAG_BMP_INITTYPE, TAG_BMP_OBJECT, TAG_BMP_VALUE, TAG_BMP_VECTOR, TAG_BMP_WIDTH, TAG_DONE, TAG_GADGET_OBJECT, TAG_GADGET_RECT, tag_GetTagData, TAG_WIN_OBJECT, Rect_t::top, u32, and Rect_t::width.

Referenced by window_Init.

u32 window_SetActive u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *
TAG_WIN_GADGET  Gadget_t *

Definition at line 206 of file Window.c.

References u32, and window_SetActiveTL.

u32 window_SetActiveTL tag   taglist
 

Definition at line 210 of file Window.c.

References Window_s::active_gadget, debug_Begin, debug_End, glw_StartMouseTracking, glw_StopMouseTracking, Window_s::handle, NULL, TAG_DONE, tag_GetTagData, TAG_WIN_GADGET, TAG_WIN_OBJECT, and u32.

Referenced by window_Init.

u32 window_SetFocusedGadget u32    firsttag,
...   
 

Parameters:
TAG_WIN_OBJECT  Window_t *
TAG_WIN_GADGET  Gadget_t *

Definition at line 172 of file Window.c.

References u32, and window_SetFocusedGadgetTL.

u32 window_SetFocusedGadgetTL tag   taglist
 

Definition at line 176 of file Window.c.

References debug_Begin, debug_End, Gadget_s::flags, Window_s::focused_gadget, GAD_ONSCREEN, gadget_SetState, GADST_FOCUSED, GADST_NORMAL, NULL, TAG_DONE, TAG_GADGET_OBJECT, TAG_GADGET_STATE, TAG_GADGET_VISUAL, tag_GetTagData, TAG_WIN_GADGET, TAG_WIN_OBJECT, and u32.

Referenced by window_Init.

int window_WindowEvent Window_t   window,
u32    gadget_id,
int    event,
u32    event_data
 

Definition at line 701 of file Window.c.

References Window_s::app, Window_s::event_handler, and u32.


Variable Documentation

u32(* call_vector[WINDOW_FUNC_DONE-WINDOW_FUNCBASE+1])(tag *) [static]
 

Definition at line 45 of file Window.c.

Referenced by window_CallTL, and window_Init.

gadget_Check_t window_checklist[] [static]
 

Initial value:

{
 { GADGET_SYSBASE+1, "Group", GADGET_REQUIRED },
 { GADGET_SYSBASE+2, "SysDrag", 0L },
 { GADGET_SYSBASE+3, "Group", 0L },
 GADGET_CHECK_DONE
}

Definition at line 47 of file Window.c.


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