Go to the documentation of this file.00001
00023 #include <stdio.h>
00024 #include "win_button.h"
00025
00026
00027 #include "gen/win_button_gen.c"
00028
00029
00030
00031
00038 static void
00039 win_button_button_paint (button_handle button_h)
00040 {
00041 if (NULL == button_h) {
00042 return;
00043 }
00044
00045 printf("I'm a WinButton\n");
00046 }
00047
00056 static void
00057 win_button_data_delete (win_button_data_handle *win_button_data_h)
00058 {
00059 if ((NULL == win_button_data_h) || (NULL == *win_button_data_h)) {
00060 return;
00061 }
00062
00063 free(*win_button_data_h);
00064 *win_button_data_h = NULL;
00065 }
00066
00075 static bool
00076 win_button_data_create (win_button_data_handle *win_button_data_h,
00077 void *context)
00078 {
00079 if (NULL == win_button_data_h) {
00080 return (false);
00081 }
00082
00083
00084 *win_button_data_h = NULL;
00085
00086 return (true);
00087 }
00088
00094 win_button_handle
00095 win_button_new1 (void)
00096 {
00097 win_button_st *win_button = NULL;
00098 bool rc;
00099
00100 win_button = calloc(1, sizeof(*win_button));
00101 if (NULL != win_button) {
00102 rc = win_button_init(win_button, NULL);
00103 if (!rc) {
00104 goto err_exit;
00105 }
00106 }
00107
00108 return (win_button);
00109
00110 err_exit:
00111
00112 win_button_delete(win_button);
00113
00114 return (NULL);
00115 }