24#include <proto/clicktab.h>
25#include <proto/datatypes.h>
27#include <proto/exec.h>
28#include <proto/graphics.h>
29#include <proto/icon.h>
30#include <proto/intuition.h>
32#include <gadgets/clicktab.h>
33#include <gadgets/space.h>
35#include <graphics/blitattr.h>
37#include <intuition/pointerclass.h>
38#include <workbench/icon.h>
114 POINTERTYPE_CONTEXTMENU,
115 POINTERTYPE_NORTHRESIZE,
116 POINTERTYPE_SOUTHRESIZE,
117 POINTERTYPE_WESTRESIZE,
118 POINTERTYPE_EASTRESIZE,
119 POINTERTYPE_NORTHEASTRESIZE,
120 POINTERTYPE_SOUTHWESTRESIZE,
121 POINTERTYPE_NORTHWESTRESIZE,
122 POINTERTYPE_SOUTHEASTRESIZE,
128 POINTERTYPE_NOTALLOWED,
129 POINTERTYPE_PROGRESS,
131 POINTERTYPE_DRAGANDDROP};
136 char themefile[1024];
140 AddPart(themefile,
"Theme",100);
142 lock = Lock(themefile,ACCESS_READ);
147 strcpy(themefile,
"PROGDIR:Resources/Themes/Default/Theme");
155 lock = Lock(themefile,ACCESS_READ);
175 char throbberfile[1024];
201 strcpy(filename,
"file:///");
227 BOOL ptr_delay = FALSE;
230 SetWindowPointer(win,
231 WA_PointerType, osmouseptr[shape],
232 WA_PointerDelay, ptr_delay,
241 SetWindowPointer(win, TAG_DONE);
245 SetWindowPointer(win,
246 WA_BusyPointer, TRUE,
247 WA_PointerDelay, TRUE,
253 SetWindowPointer(win, WA_Pointer,
mouseptrobj[shape], TAG_DONE);
255 SetWindowPointer(win, TAG_DONE);
264 SetWindowPointer(win, WA_Pointer,
mouseptrobj[shape], TAG_DONE);
270 SetWindowPointer(win,
271 WA_BusyPointer, TRUE,
272 WA_PointerDelay, TRUE,
277 SetWindowPointer(win, TAG_DONE);
289 struct RastPort mouseptr;
290 struct DiskObject *dobj;
292 int32 mousexpt=0,mouseypt=0;
294 InitRastPort(&mouseptr);
305 if((dobj = GetIconTags(ptrfname,ICONGETA_UseFriendBitMap,TRUE,TAG_DONE))) {
311 ICONCTRLA_GetWidth, &
width,
312 ICONCTRLA_GetHeight, &
height,
313 ICONCTRLA_GetImageData1, &data,
319 if((tooltype = FindToolType(dobj->do_ToolTypes,
"XOFFSET")))
320 mousexpt = atoi(tooltype);
322 if((tooltype = FindToolType(dobj->do_ToolTypes,
"YOFFSET")))
323 mouseypt = atoi(tooltype);
325 if ((mousexpt < 0) || (mousexpt >=
width))
327 if ((mouseypt < 0) || (mouseypt >=
height))
330 static uint8 dummyPlane[64 * 64 / 8];
331 static struct BitMap dummyBitMap = { 64 / 8, 64, 0, 2, 0, { dummyPlane, dummyPlane, 0, 0, 0, 0, 0, 0 }, };
334 POINTERA_BitMap, &dummyBitMap,
335 POINTERA_XOffset, -mousexpt,
336 POINTERA_YOffset, -mouseypt,
337 POINTERA_WordWidth, (
width + 15) / 16,
338 POINTERA_XResolution, POINTERXRESN_SCREENRES,
339 POINTERA_YResolution, POINTERYRESN_SCREENRESASPECT,
340 POINTERA_ImageData, data,
341 POINTERA_Width,
width,
354 if((ptrfile = Open(ptrfname,MODE_OLDFILE)))
357 UBYTE *pprefsbuf = malloc(1061);
358 Read(ptrfile, pprefsbuf, 1061);
360 mouseptrbm[i] = malloc(
sizeof(
struct BitMap));
362 mouseptrbm[i]->Planes[0] = AllocRaster(32, 32);
363 mouseptrbm[i]->Planes[1] = AllocRaster(32, 32);
370 SetAPen(&mouseptr,pprefsbuf[(my*(33))+mx]-
'0');
371 WritePixel(&mouseptr,mx,my);
375 mousexpt = ((pprefsbuf[1056]-
'0')*10)+(pprefsbuf[1057]-
'0');
376 mouseypt = ((pprefsbuf[1059]-
'0')*10)+(pprefsbuf[1060]-
'0');
380 POINTERA_WordWidth,2,
381 POINTERA_XOffset,-mousexpt,
382 POINTERA_YOffset,-mouseypt,
383 POINTERA_XResolution,POINTERXRESN_SCREENRES,
384 POINTERA_YResolution,POINTERYRESN_SCREENRESASPECT,
456 bbox->Left, bbox->Top,
493 BLITA_DestX, bbox->Left,
494 BLITA_DestY, bbox->Top,
499 BLITA_SrcType, BLITT_BITMAP,
500 BLITA_DestType, BLITT_RASTPORT,
506 bbox->Left, bbox->Top,
struct Window * ami_gui_get_window(struct gui_window *gw)
Get window from gui_window.
struct Node * ami_gui_get_tab_node(struct gui_window *gw)
Get tab node from gui_window.
void ami_gui_set_throbbing(struct gui_window *gw, bool throbbing)
Set throbbing status in gui_window.
void ami_set_pointer(struct gui_window_2 *gwin, gui_pointer_shape shape, bool update)
bool ami_gui_get_throbbing(struct gui_window *gw)
Get throbbing status from gui_window.
nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox)
Compatibility function to get space.gadget render area.
Object * ami_gui2_get_object(struct gui_window_2 *gwin, int object_type)
Get object from gui_window.
int ami_gui_get_throbber_frame(struct gui_window *gw)
Get throbbing frame from gui_window.
ULONG ami_gui2_get_tabs(struct gui_window_2 *gwin)
Get tabs from gui_window_2.
void ami_gui_free_space_box(struct IBox *bbox)
Free any data obtained via ami_gui_get_space_box().
struct gui_window_2 * ami_gui_get_gui_window_2(struct gui_window *gw)
Get gui_window_2 from gui_window.
void ami_gui_set_throbber_frame(struct gui_window *gw, int frame)
Set throbbing frame in gui_window.
#define IS_CURRENT_GW(GWIN, GW)
nserror amiga_warn_user(const char *warning, const char *detail)
Warn the user of an event.
bool ami_plot_screen_is_palettemapped(void)
nserror ami_schedule(int t, void(*callback)(void *p), void *p)
Schedule a callback.
void ami_mouse_pointers_free(void)
void gui_window_stop_throbber(struct gui_window *g)
void ami_theme_throbber_free(void)
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
Change mouse pointer shape.
int ami_theme_throbber_get_width(void)
const char * ptrs32[AMI_LASTPOINTER+1]
static Object * mouseptrobj[AMI_LASTPOINTER+1]
void gui_window_start_throbber(struct gui_window *g)
static struct BitMap * mouseptrbm[AMI_LASTPOINTER+1]
static void ami_throbber_update(void *p)
static int throbber_update_interval
static int throbber_frames
void ami_theme_init(void)
void ami_init_mouse_pointers(void)
const char * ptrs[AMI_LASTPOINTER+1]
void ami_theme_throbber_setup(void)
void ami_throbber_redraw_schedule(int t, struct gui_window *g)
int ami_theme_throbber_get_height(void)
static struct bitmap * throbber_nsbm
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
void ami_get_theme_filename(char *filename, const char *themestring, bool protocol)
bool ami_drag_has_data(void)
struct BitMap * ami_bitmap_get_native(struct bitmap *bitmap, int width, int height, bool palette_mapped, struct BitMap *friendbm)
int bitmap_get_width(void *bitmap)
get width of a bitmap.
int bitmap_get_height(void *bitmap)
get height of a bitmap.
struct bitmap * ami_bitmap_from_datatype(char *filename)
void amiga_bitmap_destroy(void *bitmap)
Free a bitmap.
Core mouse and pointer states.
Interface to platform-specific graphical user interface window operations.
nserror messages_add_from_file(const char *path)
Read keys and values from messages file into the standard Messages hash.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
APTR NewObject(struct IClass *classPtr, CONST_STRPTR classID, ULONG tagList,...)
Minimal compatibility header for AmigaOS 3.
#define ICONCTRLA_GetImageDataFormat
#define LIB_IS_AT_LEAST(B, V, R)
#define IDFMT_DIRECTMAPPED
core web search facilities interface.
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
first entry in window list
Option reading and saving interface.
#define nsoption_charp(OPTION)
Get the value of a string option.
#define nsoption_set_charp(OPTION, VALUE)
set string option in default table
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Interface to a number of general purpose functionality.