summary refs log blame commit diff stats
path: root/src/fe-gtk/notifications/notifications-winrt.vcxproj
blob: 1f392b6b2dbc4acefa38c2cab997b99f3313d515 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                                                 
                                            








                                                                      
                                        
                                            
                                                          
                                         

                                                            


                                                                                                                                                                                  
                                                   
                                           


                                                                                    

                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                

                 






                                                                                                                          

                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                

                 





                                                                                                                          
           
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="notification-winrt.cpp">
      <CompileAsWinRT>true</CompileAsWinRT>
    </ClCompile>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{C53145CC-D021-40C9-B97C-0249AB9A43C9}</ProjectGuid>
    <Keyword>Win32Proj</Keyword>
    <RootNamespace>notifications-winrt</RootNamespace>
    <ProjectName>notifications-winrt</ProjectName>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Label="Configuration">
    <PlatformToolset>v140</PlatformToolset>
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  <Import Project="..\..\..\win32\hexchat.props" />
  <PropertyGroup>
    <TargetName>hcnotifications-winrt</TargetName>
    <OutDir>$(HexChatRel)plugins\</OutDir>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <SDLCheck>true</SDLCheck>
      <AdditionalUsingDirectories>$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
    </ClCompile>
    <Link>
      <AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <MinimumRequiredVersion>6.03</MinimumRequiredVersion>
      <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <SDLCheck>true</SDLCheck>
      <AdditionalUsingDirectories>$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
    </ClCompile>
    <Link>
      <AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <MinimumRequiredVersion>6.03</MinimumRequiredVersion>
      <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
n class="kt">long *free, unsigned long long *total) { unsigned long long result = (*free) * (unsigned long long)1000 / (*total); return result / 10.0; } char *pretty_freespace(const char *desc, unsigned long long *free_k, unsigned long long *total_k) { char *result, *bytesize; double free_space, total_space; free_space = *free_k; total_space = *total_k; result = malloc(bsize * sizeof(char)); const char *quantities = "KB\0MB\0GB\0TB\0PB\0EB\0ZB\0YB\0"; int i=0; if (total_space == 0) { snprintf(result, bsize, "%s: none", desc); return result; } bytesize = malloc(3 * sizeof(char)); while (total_space > 1023 && i <= 14) { i=i+3; *bytesize=*(quantities+i); *(bytesize+1)=*(quantities+i+1); *(bytesize+2)=*(quantities+i+2); free_space = free_space / 1024; total_space = total_space / 1024; } if (sysinfo_get_percent () != 0) snprintf(result, bsize, "%s: %.1f%s, %.1f%% free", desc, total_space, bytesize, percentage(free_k, total_k)); else snprintf(result, bsize, "%s: %.1f%s/%.1f%s free", desc, free_space, bytesize, total_space, bytesize); free (bytesize); return result; } void remove_leading_whitespace(char *buffer) { char *buffer2 = NULL; int i = 0, j = 0, ews = 0; buffer2 = (char*)malloc(strlen(buffer) * sizeof(char)); if (buffer2 == NULL) return; memset (buffer2, (char)0, strlen(buffer)); while (i < strlen(buffer)) { /* count tabs, spaces as whitespace. */ if (!(buffer[i] == (char)32 || buffer[i] == (char)9) || ews == 1) { ews = 1; buffer2[j] = buffer[i]; j++; } i++; } memset (buffer, (char)0, strlen(buffer)); strcpy (buffer, buffer2); free (buffer2); } char *decruft_filename(char *buffer) { char *match, *match_end; while ((match = strstr(buffer, "%20"))) { match_end = match + 3; *match++ = ' '; while (*match_end) *match++ = *match_end++; *match = 0; } return buffer; } void find_match_char(char *buffer, char *match, char *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; strcpy(result, position); position = strstr(result, "\n"); *(position) = '\0'; remove_leading_whitespace(result); } else strcpy(result, "\0"); } } void find_match_double(char *buffer, char *match, double *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = strtod(position, NULL); } else *result = 0; } } void find_match_double_hex(char *buffer, char *match, double *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { memcpy(position,"0x",2); *result = strtod(position,NULL); } else *result = 0; } } void find_match_int(char *buffer, char *match, unsigned int *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = atoi(position); } else *result = 0; } } void find_match_ll(char *buffer, char *match, unsigned long long *result) { char *position; remove_leading_whitespace(buffer); if(strstr(buffer, match) == strstr(buffer, buffer)) { position = strpbrk(buffer, delims); if (position != NULL) { position += 1; *result = strtoll(position, NULL, 10); } else *result = 0; } } void format_output(const char *arg, char *string, char *format) { char *pos1, *pos2, buffer[bsize]; pos1 = &format[0]; strncpy(buffer, string, bsize); string[0] = '\0'; while((pos2 = strstr(pos1, "%")) != NULL) { strncat(string, pos1, (size_t)(pos2-pos1)); if(*(pos2+1) == '1') strcat(string, arg); else if(*(pos2+1) == '2') strcat(string, buffer); else if(*(pos2+1) == 'C' || *(pos2+1) == 'c') strcat(string, "\003"); else if(*(pos2+1) == 'B' || *(pos2+1) == 'b') strcat(string, "\002"); else if(*(pos2+1) == 'R' || *(pos2+1) == 'r') strcat(string, "\026"); else if(*(pos2+1) == 'O' || *(pos2+1) == 'o') strcat(string, "\017"); else if(*(pos2+1) == 'U' || *(pos2+1) == 'u') strcat(string, "\037"); else if(*(pos2+1) == '%') strcat(string, "%"); pos1=pos2+2; } strcat(string, pos1); } void flat_format_output(const char *arg, char *string, char *format) { char *pos1, *pos2, buffer[bsize]; pos1 = &format[0]; strncpy(buffer, string, bsize); string[0] = '\0'; while((pos2 = strstr(pos1, "%")) != NULL) { strncat(string, pos1, (size_t)(pos2-pos1)); if(*(pos2+1) == '1') strcat(string, arg); else if(*(pos2+1) == '2') strcat(string, buffer); else if(*(pos2+1) == '%') strcat(string, "%"); pos1=pos2+2; } strcat(string, pos1); }