Mercurial > dwindows
comparison dw.h @ 1598:a2cd4b78048f
Added initial API deprecation support for clang, GCC and Visual C.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 25 Feb 2012 23:12:11 +0000 |
parents | 080b764e8982 |
children | d2864925afb9 |
comparison
equal
deleted
inserted
replaced
1597:ed09531b7f0e | 1598:a2cd4b78048f |
---|---|
1429 #define UCHAR_TYPEDEFED 1 | 1429 #define UCHAR_TYPEDEFED 1 |
1430 #define CHAR_TYPEDEFED 1 | 1430 #define CHAR_TYPEDEFED 1 |
1431 #define UINT_TYPEDEFED 1 | 1431 #define UINT_TYPEDEFED 1 |
1432 #define INT_TYPEDEFED 1 | 1432 #define INT_TYPEDEFED 1 |
1433 | 1433 |
1434 /* Support for API deprecation in supported compilers */ | |
1435 #if defined(__has_feature) && !defined(__has_extension) | |
1436 #define __has_extension __has_feature | |
1437 #endif | |
1438 | |
1439 /* Visual C */ | |
1440 #if defined(_MSC_VER) | |
1441 #define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func | |
1442 /* Clang with message */ | |
1443 #elif defined(__has_extension) && __has_extension(attribute_deprecated_with_message)) | |
1444 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) | |
1445 /* GCC with message */ | |
1446 #elif defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 | |
1447 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message))) | |
1448 /* Clang or GCC without message */ | |
1449 #elif defined(__clang__) || defined(__GNUC__) | |
1450 #define DW_DEPRECATED(func, message) func __attribute__ ((deprecated)) | |
1451 #else | |
1452 /* Compiler without deprecation support */ | |
1453 #define DW_DEPRECATED(func) func | |
1454 #endif | |
1455 | |
1434 /* Public function prototypes */ | 1456 /* Public function prototypes */ |
1435 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | 1457 void API dw_box_pack_start(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); |
1436 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); | 1458 void API dw_box_pack_end(HWND box, HWND item, int width, int height, int hsize, int vsize, int pad); |
1437 void API dw_box_pack_at_index(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad); | 1459 void API dw_box_pack_at_index(HWND box, HWND item, int index, int width, int height, int hsize, int vsize, int pad); |
1438 #if !defined(__OS2__) && !defined(__WIN32__) && !defined(__EMX__) && !defined(__MAC__) | 1460 #if !defined(__OS2__) && !defined(__WIN32__) && !defined(__EMX__) && !defined(__MAC__) |
1460 HWND API dw_box_new(int type, int pad); | 1482 HWND API dw_box_new(int type, int pad); |
1461 HWND API dw_scrollbox_new(int type, int pad); | 1483 HWND API dw_scrollbox_new(int type, int pad); |
1462 int API dw_scrollbox_get_pos( HWND handle, int orient ); | 1484 int API dw_scrollbox_get_pos( HWND handle, int orient ); |
1463 int API dw_scrollbox_get_range( HWND handle, int orient ); | 1485 int API dw_scrollbox_get_range( HWND handle, int orient ); |
1464 HWND API dw_groupbox_new(int type, int pad, char *title); | 1486 HWND API dw_groupbox_new(int type, int pad, char *title); |
1465 HWND API dw_mdi_new(unsigned long id); | 1487 DW_DEPRECATED(HWND API dw_mdi_new(unsigned long id), "Due to lack of full Mac support consider avoiding this function."); |
1466 HWND API dw_bitmap_new(unsigned long id); | 1488 HWND API dw_bitmap_new(unsigned long id); |
1467 HWND API dw_bitmapbutton_new(char *text, unsigned long id); | 1489 HWND API dw_bitmapbutton_new(char *text, unsigned long id); |
1468 HWND API dw_bitmapbutton_new_from_file(char *text, unsigned long id, char *filename); | 1490 HWND API dw_bitmapbutton_new_from_file(char *text, unsigned long id, char *filename); |
1469 HWND API dw_bitmapbutton_new_from_data(char *text, unsigned long id, char *str, int len); | 1491 HWND API dw_bitmapbutton_new_from_data(char *text, unsigned long id, char *str, int len); |
1470 HWND API dw_container_new(unsigned long id, int multi); | 1492 HWND API dw_container_new(unsigned long id, int multi); |
1601 float API dw_splitbar_get(HWND handle); | 1623 float API dw_splitbar_get(HWND handle); |
1602 HMENUI API dw_menu_new(unsigned long id); | 1624 HMENUI API dw_menu_new(unsigned long id); |
1603 HMENUI API dw_menubar_new(HWND location); | 1625 HMENUI API dw_menubar_new(HWND location); |
1604 HWND API dw_menu_append_item(HMENUI menu, char *title, unsigned long id, unsigned long flags, int end, int check, HMENUI submenu); | 1626 HWND API dw_menu_append_item(HMENUI menu, char *title, unsigned long id, unsigned long flags, int end, int check, HMENUI submenu); |
1605 int API dw_menu_delete_item(HMENUI menu, unsigned long id); | 1627 int API dw_menu_delete_item(HMENUI menu, unsigned long id); |
1606 void API dw_menu_item_set_check(HMENUI menu, unsigned long id, int check); | 1628 DW_DEPRECATED(void API dw_menu_item_set_check(HMENUI menu, unsigned long id, int check), "Use dw_menu_item_set_state() for new code."); |
1607 void API dw_menu_item_set_state( HMENUI menux, unsigned long id, unsigned long state); | 1629 void API dw_menu_item_set_state( HMENUI menux, unsigned long id, unsigned long state); |
1608 void API dw_menu_popup(HMENUI *menu, HWND parent, int x, int y); | 1630 void API dw_menu_popup(HMENUI *menu, HWND parent, int x, int y); |
1609 void API dw_menu_destroy(HMENUI *menu); | 1631 void API dw_menu_destroy(HMENUI *menu); |
1610 void API dw_pointer_query_pos(long *x, long *y); | 1632 void API dw_pointer_query_pos(long *x, long *y); |
1611 void API dw_pointer_set_pos(long x, long y); | 1633 void API dw_pointer_set_pos(long x, long y); |